**Created**: 2026-02-10
**Source**: [[3 Archives/Readwise/Documents/Claude Code tip when implementing a feature -|Claude Code Tip: Plans and Documentation]] (Drew Wilson, February 2026)
## Core Concept
A three-step Claude Code workflow where documentation serves as both planning artifact and verification mechanism:
1. **Plan first**: Have Claude write a complete plan before any code changes
2. **Document after**: After implementation, update clear, well-named documents describing what was built
3. **Verify consistency**: Have Claude explicitly check that the documentation matches the actual code
The key insight is step 3: documentation is not just a record of intent (the plan) or a record of outcome (the post-implementation docs)—it is an active verification tool. When Claude checks docs against code, discrepancies reveal either incomplete implementation or documentation drift. This creates a self-correcting feedback loop.
## Analysis
This pattern synthesizes two existing vault concepts into a unified workflow:
- **Plan-First Workflow Gates**: Step 1 (plan before coding)
- **Test-Driven Document Quality**: Step 3 (validate documents against criteria)
The novel contribution is the explicit "verify docs match code" step. In traditional development, documentation diverges from code almost immediately because no one checks. By making Claude responsible for the consistency check, the loop stays closed.
**Implementation in Claude Code**:
- Plans could be written as markdown files in a `plans/` directory or as TodoWrite entries
- Post-implementation docs could update CLAUDE.md, README files, or dedicated architecture docs
- The verification step could be a custom skill: `/verify-docs` that reads both docs and code and reports mismatches
- A PreToolUse hook could trigger doc verification before `git commit`
**The verification step is what makes this a loop rather than a pipeline**:
- Pipeline: Plan -> Code -> Document (linear, one-way)
- Loop: Plan -> Code -> Document -> Verify -> Fix (cyclical, self-correcting)
## Cross-Domain Applications
- **Quality assurance**: Documentation-as-test-case extends the "bugs as missing test cases" philosophy to documentation
- **Knowledge management**: Second Brain notes should be verified against their sources periodically; same principle of artifact-reality consistency
- **Household systems**: Operational procedures (home procedures, equipment manuals) should be verified against actual practice
- **Regulatory compliance**: Documentation-reality alignment is the core requirement of audit frameworks
## Related Concepts
- [[Plan-First Workflow Gates]] — Provides the planning phase (step 1) of this loop
- [[Test-Driven Document Quality]] — Provides the validation methodology (step 3) of this loop
- [[Self-Healing Git Workflow]] — Complementary automation: self-healing handles lint, this handles documentation
- [[Scope Misinterpretation as Trust Boundary]] — Plans reduce misinterpretation; verification catches what plans miss
## Topic Metadata
**Primary Domains**: Claude Code, Documentation, Quality Assurance
**Extraction Date**: 2026-02-10
**Discoverability Score**: 8/10