compound-docs
Process
Single-file architecture -- one markdown file per problem in its symptom category directory (e.g., docs/solutions/performance-issues/n-plus-one-briefs.md), with YAML frontmatter for metadata.
Follow the 7-step documentation capture process. For full details, see documentation-process.md.
- Detect confirmation -- Auto-invoke after "that worked", "it's fixed", etc. Skip trivial fixes.
- Gather context -- Extract module, symptom, investigation attempts, root cause, solution, prevention. BLOCK if critical context missing.
- Check existing docs -- Search
docs/solutions/ for similar issues. If found, offer: new doc with cross-reference, update existing, or other.
- Generate filename -- Format:
[sanitized-symptom]-[module]-[YYYYMMDD].md
- Validate YAML -- Save the draft to a temporary Markdown file, then run validate-frontmatter.sh against it. The validator requires Python 3 and PyYAML; report a missing dependency rather than claiming validation. If invalid, fix the frontmatter and re-run until it passes.
- Create documentation -- Write file to
docs/solutions/[category]/[filename].md using resolution-template.md.
- Cross-reference -- Link related issues. Detect critical patterns (3+ similar issues).
Capture gate (step 1): capture only if, without this doc, a future engineer reading the final code, tests, comments, CLAUDE.md/AGENTS.md, and existing docs or skills would still repeat the mistake or redo the investigation. Skip when any of those already carries the lesson.
Decision Menu
After successful documentation, present and WAIT for user response:
Solution documented
File created:
- docs/solutions/[category]/[filename].md
What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill
5. Create new skill - Extract into new learning skill
6. View documentation - See what was captured
7. Other
For detailed response handling, see documentation-process.md.
Success Criteria
- YAML frontmatter validated (all required fields, correct formats)
- File created in
docs/solutions/[category]/[filename].md
- Enum values match schema exactly
- Code examples included in solution section
- Cross-references added if related issues found
- User presented with decision menu and action confirmed
References
Integration
- Stale-learning review (
/ia-compound-refresh in Claude Code) -- reviews docs/solutions/ for entries that have aged out
1---2name: compound-docs3class: workflow4description: >-5 Document solved problems for team reuse. Provides process knowledge for6 /ia-compound. Use when documenting a resolved issue, writing up7 lessons learned, capturing a post-mortem, adding to the knowledge base,8 or building searchable institutional knowledge after debugging.9disable-model-invocation: true10---1112# compound-docs1314## Process1516Single-file architecture -- one markdown file per problem in its symptom category directory (e.g., `docs/solutions/performance-issues/n-plus-one-briefs.md`), with YAML frontmatter for metadata.1718Follow the 7-step documentation capture process. For full details, see [documentation-process.md](./references/documentation-process.md).19201. **Detect confirmation** -- Auto-invoke after "that worked", "it's fixed", etc. Skip trivial fixes.212. **Gather context** -- Extract module, symptom, investigation attempts, root cause, solution, prevention. BLOCK if critical context missing.223. **Check existing docs** -- Search `docs/solutions/` for similar issues. If found, offer: new doc with cross-reference, update existing, or other.234. **Generate filename** -- Format: `[sanitized-symptom]-[module]-[YYYYMMDD].md`245. **Validate YAML** -- Save the draft to a temporary Markdown file, then run [validate-frontmatter.sh](./scripts/validate-frontmatter.sh) against it. The validator requires Python 3 and PyYAML; report a missing dependency rather than claiming validation. If invalid, fix the frontmatter and re-run until it passes.256. **Create documentation** -- Write file to `docs/solutions/[category]/[filename].md` using [resolution-template.md](./assets/resolution-template.md).267. **Cross-reference** -- Link related issues. Detect critical patterns (3+ similar issues).2728**Capture gate (step 1):** capture only if, without this doc, a future engineer reading the final code, tests, comments, CLAUDE.md/AGENTS.md, and existing docs or skills would still repeat the mistake or redo the investigation. Skip when any of those already carries the lesson.2930---3132## Decision Menu3334After successful documentation, present and WAIT for user response:3536```37Solution documented3839File created:40- docs/solutions/[category]/[filename].md4142What's next?431. Continue workflow (recommended)442. Add to Required Reading - Promote to critical patterns453. Link related issues - Connect to similar problems464. Add to existing skill - Add to a learning skill475. Create new skill - Extract into new learning skill486. View documentation - See what was captured497. Other50```5152For detailed response handling, see [documentation-process.md](./references/documentation-process.md).5354---5556## Success Criteria5758- YAML frontmatter validated (all required fields, correct formats)59- File created in `docs/solutions/[category]/[filename].md`60- Enum values match schema exactly61- Code examples included in solution section62- Cross-references added if related issues found63- User presented with decision menu and action confirmed6465---6667## References6869- [documentation-process.md](./references/documentation-process.md) - Full 7-step process with validation gates70- [yaml-schema.md](./references/yaml-schema.md) - YAML frontmatter schema and enum values71- [quality-guidelines.md](./references/quality-guidelines.md) - Quality standards, execution rules, error handling72- [example-scenario.md](./references/example-scenario.md) - Complete walkthrough of documenting an N+1 query fix73- [resolution-template.md](./assets/resolution-template.md) - Template for documentation files74- [critical-pattern-template.md](./assets/critical-pattern-template.md) - Template for critical pattern entries75- [validate-frontmatter.sh](./scripts/validate-frontmatter.sh) - Validate YAML frontmatter against schema76- [validate-frontmatter.py](./scripts/validate-frontmatter.py) - Safe YAML parser and field validation; install its dependency with `python3 -m pip install PyYAML` when authorized7778## Integration7980- Stale-learning review (`/ia-compound-refresh` in Claude Code) -- reviews `docs/solutions/` for entries that have aged out