Repository navigation
feat(assets): seed the four fixed docs/ documents at init - #7
Merged
Merged
Conversation
init created docs/adr/, docs/codewiki/, docs/raw/ and docs/wiki/ and left every one of them empty, so a fresh workspace shipped eight validators and not one document telling the user what they check. glossary.md, stack.md, wiki/index.md and wiki/changelog.md are the knowledge base's only fixed-name documents — a wiki page, an ADR and a codewiki page are named after what they are about — so those four are seeded and the directories stay correctly empty. Each seed carries its validator's format: the guidance in prose, the example in a fence, the marker in an HTML comment. That is exactly what mdscan excludes from Body, so nothing scc just wrote fires a finding. A seed is a third template category, and it is untracked: not in the manifest, not in scc update. The moment the file exists it holds project knowledge scc has no improved version of, which is the same terms the artifact templates ship on. Untracked also settles the two-harness case without a rule of its own, because docs/ is one tree per repo rather than one per harness. Side effect on the stack validator: a repo with dependencies used to get one stack.missing, and now gets one line per undocumented dependency pointing at a file that already explains what an entry looks like. assets.Version is unchanged — no workspace template moved, and a bump would rewrite every manifest to record a number nobody read. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GchWF6iL5PjTdXAT8H3mhb
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.
scc initcreateddocs/adr/,docs/codewiki/,docs/raw/anddocs/wiki/and left every one of them empty. A fresh workspace therefore shipped eight validators and not one document saying what they check — the formats existed only in the skills, which the user meets after a finding rather than before.What this adds
initnow seeds the knowledge base's four fixed-name documents:docs/glossary.md- **term** — definition. Avoid: …) and when to coin onedocs/stack.mddocs/wiki/index.md[[slug]]reachability ruledocs/wiki/changelog.mdThose four are the only
docs/documents with a fixed name — a wiki page, an ADR and a codewiki page are named after what they are about — so the rest of the tree is still correctly scaffolded empty.Each seed puts its guidance in prose, its example in a fence and its marker in an HTML comment, which is exactly what
mdscanexcludes fromBody.TestFreshArtifactsPassTheirOwnValidatorsstays green in all three harnesses: nothing scc just wrote fires a finding.A seed is a third category, and it is untracked
Not in the manifest, not in
scc update. The moment the file exists it holds project knowledge scc has no improved version of to deliver — the same terms the artifact templates ship on. Untracked also settles the two-harness case without a rule of its own:docs/is one tree per repo rather than one per harness, so the secondinitfinds the files and leaves them alone, as it does for any existing file.--forcestill overwrites and still names what it destroyed.assets.Versionis deliberately unchanged: no workspace template moved, and a bump would rewrite every manifest to record a number nobody read.Side effect worth calling out
The
stackvalidator gets better first contact. A repo with dependencies used to receive onestack.missing; it now receives onestack.undocumented-dependencyper unrecorded dependency, pointing at a file that already explains what an entry looks like. Verified in a temp workspace with ago.mod: one finding forgithub.com/go-chi/chi/v5, gone once the entry is added.Tests
New assertions cover: seeds land where the validators look and in sorted order; no seed collides with a managed file; seeds are harness-neutral and carry no template action;
Dirs()covers every seed's parent; the manifest never names one; an editedglossary.mdsurvives a secondinit; andscc update's plan does not mention them.gofmt,go vetandgo test ./...are clean locally.-racewas not run locally (no cgo toolchain on this machine); CI covers it on all three platforms.Existing workspaces
scc updateignores seeds by construction, so the path forward there is re-runningscc init— idempotent and additive, it writes only what is missing.🤖 Generated with Claude Code
https://claude.ai/code/session_01GchWF6iL5PjTdXAT8H3mhb