feat(plan): plan mode, decision records, and the glossary#48
Merged
Conversation
Land the plan layer above specs and the two knowledge contracts that ride on it. Plan mode (substrate): docs/plans/<slug>/ decomposes an initiative into feats, each becoming exactly one spec. Adds the plan grammar (parse/validate), the approval hash gate, the sequencer, deterministic briefs, the autonomous runner and its sandbox, the /prd + quick-prd authoring skills, plan/feat graph nodes, and the web read model. Decision records (docs/adr/): a decision passing the triple gate — hard to reverse, surprising without context, a real trade-off — becomes an ADR at docs/adr/NNNN-<slug>.md. Feats cite it as adr:<slug>, a third ref token beside stack: and [[wiki]]. `csdd plan validate` reports broken/ambiguous/malformed and cites-superseded citations plus docs/adr well-formedness; `csdd plan brief` inlines cited records in full with the open-decision forbidden line; the graph emits adr nodes with cites/superseded_by edges and a broken/orphan-decision lint. The prd skill grills gate-positive decisions one at a time (recording each ADR inline), sweeps assumptions at Present, and funnels run deviations through supersession; quick-prd carries the light gate. Dogfood: ADRs 0001-0003. The glossary (docs/glossary.md): one canonical term per domain concept with an _Avoid_ synonym list. A shared internal/glossary package parses, normalizes, and whole-token matches identifiers. `csdd plan validate` reports an avoided term in a feat/plan slug; `csdd graph analyze` / `csdd wiki lint` catch spec dirs and wiki page names; the graph emits term nodes and references edges (orphan-term lint). The glossary skill (challenge/sharpen/stress-test/record, the tombstone rule) and /glossary command own the discipline; prd/quick-prd/wiki gain invocation hooks. Dogfood: docs/glossary.md.
- runner.go: check the fmt.Fprintf return in the log closures and summarize (errcheck). - sandbox_test.go: skip the POSIX exec-bit assertion on Windows, which has no exec bit (matches the web_test.go token-perm guard). - glossary_cli_test.go: drop the ineffectual code assignment in the analyze step.
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.
Lands the plan layer above specs and the two knowledge contracts that ride on it. All three land together because they share the plan grammar / validate / brief / graph seams (the in-flight plan-mode substrate this branch also carries).
Plan mode (substrate)
docs/plans/<slug>/decomposes an initiative into feats, each becoming exactly one spec: plan grammar (parse/validate), the approval hash gate, the sequencer, deterministic briefs, the autonomous runner + sandbox, the/prd+quick-prdauthoring skills, plan/feat graph nodes, and the web read model.Decision records —
docs/adr/A decision passing the triple gate (hard to reverse · surprising without context · a real trade-off) becomes an ADR at
docs/adr/NNNN-<slug>.md. Feats cite it asadr:<slug>— a third ref token besidestack:and[[wiki]].csdd plan validate— broken / ambiguous / malformed / cites-superseded citations +docs/adrwell-formedness (malformed filenames, duplicate numbers, missing title, dangling supersession).csdd plan brief— cited records inlined in full, a WARNING on a broken ref, and the open-decision forbidden-actions line.csdd graph build|analyze—adrnodes withcites/superseded_byedges, broken-decision-ref parity with wiki refs, informational orphan-decision.[DEFERRED-BY-HUMAN]), and the Revise supersession funnel; quick-prd carries the light gate.The glossary —
docs/glossary.mdOne canonical term per domain concept with an
_Avoid_synonym list; a sharedinternal/glossarypackage parses, normalizes, and whole-token matches identifiers (multi-word contiguous runs;clientnever matchesclientele).csdd plan validate— avoided term in a feat/plan slug (names the canonical) + glossary well-formedness.csdd graph analyze/csdd wiki lint— avoided terms in spec dirs and wiki page names (domain-tagged so wiki lint renders the wiki subset);termnodes +referencesedges; informational orphan-term.glossaryskill (challenge / sharpen / stress-test / record inline, the tombstone rule) and/glossarycommand own the discipline; prd / quick-prd / wiki gain invocation hooks.docs/glossary.md(csdd's own domain language).Tests
gofmt,go vet, andgo test -race ./...all clean on an LF-normalized tree (the CI-equivalent). New coverage:internal/plan(adr grammar/resolution/validate/brief),internal/glossary(parse/match/well-formedness),internal/graph(adr + term extractors and findings), andinternal/cli(ADR + glossary end-to-end, installed-skill assertions).