Skip to content

feat(plan): plan mode, decision records, and the glossary#48

Merged
protonspy merged 2 commits into
mainfrom
feat/plan-decisions-glossary
Jul 7, 2026
Merged

feat(plan): plan mode, decision records, and the glossary#48
protonspy merged 2 commits into
mainfrom
feat/plan-decisions-glossary

Conversation

@protonspy

Copy link
Copy Markdown
Owner

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-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 — broken / ambiguous / malformed / cites-superseded citations + docs/adr well-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|analyzeadr nodes with cites / superseded_by edges, broken-decision-ref parity with wiki refs, informational orphan-decision.
  • prd skill: two-tier Draft (batch scope facts, grill gate-positive decisions one at a time, ADR written inline), the Present assumption sweep ([DEFERRED-BY-HUMAN]), and the Revise supersession funnel; quick-prd carries the light gate.
  • Dogfood: ADRs 0001–0003 (storage, two-tier interview, glossary deferral).

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 (multi-word contiguous runs; client never matches clientele).

  • 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); term nodes + references edges; informational orphan-term.
  • The glossary skill (challenge / sharpen / stress-test / record inline, the tombstone rule) and /glossary command own the discipline; prd / quick-prd / wiki gain invocation hooks.
  • Dogfood: docs/glossary.md (csdd's own domain language).

Tests

gofmt, go vet, and go 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), and internal/cli (ADR + glossary end-to-end, installed-skill assertions).

protonspy added 2 commits July 7, 2026 05:30
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.
@protonspy protonspy merged commit 9455242 into main Jul 7, 2026
6 checks passed
@protonspy protonspy deleted the feat/plan-decisions-glossary branch July 7, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant