It is now February 9, 2026, in the afternoon.
As I mentioned earlier, CZON has implemented link checking functionality, but there were a few minor hiccups along the way. Initially, I only implemented checks for dead links and links that point outside the project scope. This successfully detected some dead links, and I then fed these error messages to OpenCode + MiniMax M2.1 for fixing.
A typical case was: in .czon/AIGC/SUMMARY/summary-popular.md, there was a reference to ../LOGS/25.md. In reality, this was an AI hallucination—the link did not exist.
The actual file was at LOGS/25.md, and the correct relative path reference should have been: ../../../LOGS/25.md.
However, MiniMax M2.1's fix was rather clumsy. At first, it scanned the entire project, found that .czon/src/zh-Hans/LOGS/25.md existed, and then changed the reference to ../src/zh-Hans/LOGS/25.md.
This changed the link to point to the compiled output directory, which was obviously incorrect.
So, I added a new rule to the link checker: it must not allow references to files under .czon/src.
As a result, the AI started searching for files under .czon/dist, which is even further downstream (the HTML static resource files). After I interrupted it, the AI clearly went haywire—it began creating symbolic links and even copying my original files all over the place in an attempt to pass the link check. But in reality, the environment was getting worse, with new files creating even more link errors. I had to interrupt everything and restore the entire environment. Sorry, AI, I shouldn't have called you stupid; I was just frustrated in the moment.
Alright, the real issues are:
- The AI Agent does not scan the entire project's files by default. This can be attributed to OpenCode's design scenario, which often needs to handle very large projects, making it impractical to scan all files by default.
- The AI itself has an insufficient understanding of relative paths. I saw this in its Thinking chain—it was trying to run some scripts and experiment to grasp the concept of relative paths. (By the way, I also can't always intuitively understand the result after many
../..steps.)
The solution is:
I need to provide it with a list of candidate fixes for the links, presented in a relative path format based on the problematic file. This way, the AI won't need to scan the entire project or try to understand relative paths on its own.
npx czon@latest check
The link checking feature is already available in CZON version 0.9.1 and successfully enabled MiniMax M2.1 to fix 500 link errors, which is fairly efficient.
This experience made me realize that compilation checks and AI fixes need to complement each other. Compilation checks must be AI-friendly. However, the prerequisite for being AI-friendly is understanding the AI's limitations and designing a check output format that suits it.