A Two-Year AI Workflow Finally Works, Thanks to Opus 4.8
The gap between writing AI rules and having the model actually follow them has been the central frustration of AI-assisted coding. Opus 4.8 crosses a threshold where evidence-based verification rules stop being aspirational and start reshaping the entire development workflow — from how the model searches for information to how it tests its own changes.
The same `CLAUDE.md` rules that older models ignored now produce a fundamentally different behavior in Opus 4.8: the model actively doubts itself, uses `gh api` to pull real source code for verification, and leaves `@TODO` markers instead of fabricating APIs. This shift from guessing to verifying forced a complete rethinking of the AI's research pipeline — where it looks, how it reads code, and how it tests its own output.
The resulting system replaces the built-in web search with a five-tier routing skill (Context7 docs → GitHub repo → code search → Exa → fallback), uses shallow git clones for deep source reading, and exposes the editor's live LSP server to the AI so it queries real symbol definitions instead of grepping for strings. A `feasibility` skill blocks any code change until a structured report with explicit ✅/⚠️/❌ conclusions is approved, and a `how-to-test` skill delivers a single runnable command with expected pass/fail counts — or honestly states that a test isn't worth writing.
Hooks replace Claude Code's prefix-based permission system with tree-sitter AST parsing to catch compound command bypasses, auto-format every write via ESLint and LSP, and fire desktop notifications when tasks complete or need attention. The whole configuration, including a code-review skill that grades six dimensions of code quality without touching the code, is available as a drop-in dotfiles repo.
The entire workflow is predicated on a single behavioral shift in Opus 4.8 — active self-doubt and verification — that no amount of prompt engineering could reliably produce in earlier models. The rules didn't change; the model's willingness to comply did.
Routing search through a fixed priority chain (docs first, general web last) is a form of capability restriction that paradoxically increases reliability. The model is worse at choosing where to look than at looking once the destination is chosen.
Using the editor's existing LSP process rather than spawning a separate language server instance is a zero-memory-cost integration that most MCP-based approaches miss. The LSP is already running and already indexed the project.
The `how-to-test` skill's most important feature is permission to decline writing tests. Without an explicit 'this is not worth testing' escape hatch, models default to writing assertions against implementation details that pass forever and catch nothing.
Tree-sitter AST parsing for command allowlisting is a materially different security posture than prefix matching. A regex or prefix check sees `cd /safe && rm -rf /` as safe; an AST sees two separate command nodes and can block the second.
Disabling specific lint rules during auto-formatting acknowledges that AI writes code incrementally across multiple turns — an import added now may be used in the next message, and a `let` declared now may be reassigned later. Static linting assumptions break under incremental generation.