feat(docs): comprehensive documentation standard in vxd core (training + ADRs + index)#107
Merged
Merged
Conversation
…ing + ADRs + docs index)
Extends the post-merge documentation loop beyond README + SVG diagrams to the
complete software-factory standard, with deterministic + best-effort backstops so
the standard holds even when the scribe agent falls short:
- factory_docs.go: ensureFactoryDocs runs after the SVG step in generateDocumentation.
- ensureTrainingGuide: generates docs/training.md from the codebase only if missing.
- ensureDocsIndex: DETERMINISTIC docs/README.md index over everything in docs/
(guides, diagrams, ADR index) — always present, no LLM.
- factory_docs_adr.go: ensureADRs asks the doc model for 3-6 real architecture
decisions (JSON), validates title+decision, writes docs/adr/0001-*.md with
Status/Context/Decision/Consequences + an index; skips if the agent supplied ADRs.
- planner.go buildScribeStory now mandates the full set up front (training, SVGs,
ADRs, docs index) in its brief, acceptance criteria, and OwnedFiles.
Every backstop is best-effort — model failure logs and skips, never blocking
requirement completion. Tests: factory_docs_test.go (index determinism, training
+ ADR generate/skip, parse/render/slug), upgraded TestGenerateDocumentation_ProducesSVGDiagrams
(full set produced + committed end-to-end), TestPlanner_EmitsScribeStory.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the full software-factory documentation set part of vxd's core, not just README + SVG diagrams. Every completed requirement now ships: README,
docs/architecture.svg,docs/sequence.svg,docs/training.md,docs/adr/ADRs + index, anddocs/README.mdindex.Motivated by a real shortfall: across a 6-app build, the projects needed ADRs + a docs index added by hand. This bakes that standard in so vxd fills it automatically.
How
factory_docs.go—ensureFactoryDocs(called after the SVG step ingenerateDocumentation):ensureTrainingGuide— generatesdocs/training.mdfrom the codebase via the doc model, only if missing.ensureDocsIndex— fully deterministicdocs/README.mdindex over everything indocs/(guides, diagrams, ADR index). No LLM; always present.factory_docs_adr.go—ensureADRs— asks the doc model for a JSON array of 3-6 real architecture decisions (grounded in the file tree + manifest), validates each has title + decision, writesdocs/adr/0001-*.md(Status/Context/Decision/Consequences) + an index. Skips if the agent already supplied ADRs.planner.go buildScribeStory— the scribe brief, acceptance criteria, andOwnedFilesnow mandate the whole set up front.Backstops are best-effort: a model failure logs and skips — never blocks requirement completion. The agent is asked to produce everything; the backstops guarantee it ships anyway.
Test plan
factory_docs_test.go— docs-index determinism + humanize, training skip/generate, ADR parse/render/slug/skip/generateTestGenerateDocumentation_ProducesSVGDiagrams(upgraded) — README + 2 SVGs + training + ADRs + index all produced and committed end-to-endTestPlanner_EmitsScribeStory— standards baked into the brief + OwnedFilesgo build,go vet,golangci-lint(0 issues), full engine suite greenFollow-up
🤖 Generated with Claude Code