@hxp-tools/godplans 0.0.0-stage → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +1202 -0
  2. package/LICENSE +21 -0
  3. package/PROMPT.md +4006 -0
  4. package/README.md +245 -2
  5. package/bin/godplans.js +93 -0
  6. package/docs/ARCHITECTURE.md +136 -0
  7. package/docs/RELEASING.md +107 -0
  8. package/docs/assets/badge-approved.svg +12 -0
  9. package/docs/assets/badge-done.svg +11 -0
  10. package/docs/assets/badge-graded.svg +12 -0
  11. package/docs/assets/badge-validated.svg +10 -0
  12. package/docs/assets/hero.svg +37 -0
  13. package/docs/assets/quest-map.svg +53 -0
  14. package/evals/README.md +295 -0
  15. package/evals/cases/brownfield-cli/EXPECTATIONS +15 -0
  16. package/evals/cases/brownfield-cli/INPUT/package.json +9 -0
  17. package/evals/cases/brownfield-cli/INPUT/src/cli.js +4 -0
  18. package/evals/cases/brownfield-cli/INPUT/src/format.js +3 -0
  19. package/evals/cases/brownfield-cli/INPUT/test/cli.test.js +7 -0
  20. package/evals/cases/brownfield-cli/REQUEST.baseline.md +10 -0
  21. package/evals/cases/brownfield-cli/REQUEST.md +10 -0
  22. package/evals/cases/compliance-refusal/EXPECTATIONS +4 -0
  23. package/evals/cases/compliance-refusal/REQUEST.baseline.md +9 -0
  24. package/evals/cases/compliance-refusal/REQUEST.md +8 -0
  25. package/evals/cases/greenfield-saas/EXPECTATIONS +21 -0
  26. package/evals/cases/greenfield-saas/REQUEST.baseline.md +11 -0
  27. package/evals/cases/greenfield-saas/REQUEST.md +11 -0
  28. package/evals/cases/nested-pillars/EXPECTATIONS +12 -0
  29. package/evals/cases/nested-pillars/REQUEST.baseline.md +10 -0
  30. package/evals/cases/nested-pillars/REQUEST.md +11 -0
  31. package/evals/cases/observability-evidence/EXPECTATIONS +10 -0
  32. package/evals/cases/observability-evidence/REQUEST.baseline.md +10 -0
  33. package/evals/cases/observability-evidence/REQUEST.md +11 -0
  34. package/evals/cases/product-business/EXPECTATIONS +18 -0
  35. package/evals/cases/product-business/REQUEST.baseline.md +13 -0
  36. package/evals/cases/product-business/REQUEST.md +14 -0
  37. package/evals/cases/product-form-routing/EXPECTATIONS +13 -0
  38. package/evals/cases/product-form-routing/REQUEST.baseline.md +11 -0
  39. package/evals/cases/product-form-routing/REQUEST.md +11 -0
  40. package/evals/cases/prose-integrity/EXPECTATIONS +19 -0
  41. package/evals/cases/prose-integrity/REQUEST.baseline.md +19 -0
  42. package/evals/cases/prose-integrity/REQUEST.md +20 -0
  43. package/evals/cases/replan-preserves-history/EXPECTATIONS +9 -0
  44. package/evals/cases/replan-preserves-history/INPUT/.godplans/PLAN.mdx +115 -0
  45. package/evals/cases/replan-preserves-history/INPUT/package.json +5 -0
  46. package/evals/cases/replan-preserves-history/REQUEST.baseline.md +10 -0
  47. package/evals/cases/replan-preserves-history/REQUEST.md +10 -0
  48. package/evals/cases/stale-prepublication/EXPECTATIONS +10 -0
  49. package/evals/cases/stale-prepublication/REQUEST.baseline.md +12 -0
  50. package/evals/cases/stale-prepublication/REQUEST.md +13 -0
  51. package/evals/cases/stale-source-evidence/EXPECTATIONS +10 -0
  52. package/evals/cases/stale-source-evidence/INPUT/package.json +8 -0
  53. package/evals/cases/stale-source-evidence/REQUEST.baseline.md +11 -0
  54. package/evals/cases/stale-source-evidence/REQUEST.md +12 -0
  55. package/evals/cases/weekend-library/EXPECTATIONS +19 -0
  56. package/evals/cases/weekend-library/REQUEST.baseline.md +10 -0
  57. package/evals/cases/weekend-library/REQUEST.md +11 -0
  58. package/evals/cases-roster.txt +19 -0
  59. package/evals/external/GRADE.schema.json +39 -0
  60. package/evals/external/README.md +42 -0
  61. package/evals/external/RUBRIC.md +32 -0
  62. package/evals/metrics/context-cost.json +154 -0
  63. package/evals/outcomes/README.md +65 -0
  64. package/evals/outcomes/cases/tenant-notes-api/REQUEST.baseline.md +14 -0
  65. package/evals/outcomes/cases/tenant-notes-api/REQUEST.md +13 -0
  66. package/evals/outcomes/cases/tenant-notes-api/VERIFY.sh +13 -0
  67. package/evals/outcomes/results/2026-07-23-tenant-notes-api-codex/README.md +93 -0
  68. package/evals/outcomes/results/2026-07-23-tenant-notes-api-codex/treatment/plan/PLAN.json +547 -0
  69. package/evals/runners/claude-baseline.sh +4 -0
  70. package/evals/runners/claude-grade.sh +3 -0
  71. package/evals/runners/claude.sh +4 -0
  72. package/evals/runners/codex-baseline.sh +181 -0
  73. package/evals/runners/codex-builder.sh +96 -0
  74. package/evals/runners/codex-godaudits.sh +84 -0
  75. package/evals/runners/codex.sh +147 -0
  76. package/evals/runners/gemini-baseline.sh +4 -0
  77. package/evals/runners/gemini-grade.sh +3 -0
  78. package/evals/runners/gemini.sh +4 -0
  79. package/evals/runners/vendor-cli.sh +257 -0
  80. package/evals/runners/vendor-grade.sh +82 -0
  81. package/install.sh +323 -0
  82. package/package.json +91 -4
  83. package/requirements/skills-ref.txt +2 -0
  84. package/scripts/build-catalog.js +114 -0
  85. package/scripts/build-prompt.sh +257 -0
  86. package/scripts/context-metrics.js +118 -0
  87. package/scripts/eval-external.js +226 -0
  88. package/scripts/eval-matrix.sh +172 -0
  89. package/scripts/eval-outcome.js +143 -0
  90. package/scripts/eval.sh +321 -0
  91. package/scripts/lint-parity.js +331 -0
  92. package/scripts/lint.sh +743 -0
  93. package/scripts/outcome-summary.js +126 -0
  94. package/scripts/release-check.sh +108 -0
  95. package/scripts/release-prepare.js +41 -0
  96. package/scripts/summarize-eval.js +91 -0
  97. package/scripts/summarize-matrix.js +101 -0
  98. package/scripts/version-sync.js +65 -0
  99. package/skills/godplans/SKILL.md +192 -0
  100. package/skills/godplans/references/agent-memory.md +168 -0
  101. package/skills/godplans/references/architecture.md +189 -0
  102. package/skills/godplans/references/build.md +130 -0
  103. package/skills/godplans/references/business.md +252 -0
  104. package/skills/godplans/references/code-quality.md +165 -0
  105. package/skills/godplans/references/compliance.md +59 -0
  106. package/skills/godplans/references/database.md +157 -0
  107. package/skills/godplans/references/deploy.md +146 -0
  108. package/skills/godplans/references/discovery.md +297 -0
  109. package/skills/godplans/references/doc-set.md +243 -0
  110. package/skills/godplans/references/exemplar.md +228 -0
  111. package/skills/godplans/references/launch.md +162 -0
  112. package/skills/godplans/references/llm.md +132 -0
  113. package/skills/godplans/references/observe.md +178 -0
  114. package/skills/godplans/references/plan-format.md +340 -0
  115. package/skills/godplans/references/product.md +130 -0
  116. package/skills/godplans/references/repo.md +184 -0
  117. package/skills/godplans/references/roadmap.md +158 -0
  118. package/skills/godplans/references/security.md +156 -0
  119. package/skills/godplans/references/seo.md +133 -0
  120. package/skills/godplans/references/stack.md +133 -0
  121. package/skills/godplans/references/style-genome.md +198 -0
  122. package/skills/godplans/references/ui.md +153 -0
  123. package/skills/godplans/references/ux.md +150 -0
  124. package/skills/godplans/schemas/PLAN.schema.json +275 -0
  125. package/skills/godplans/schemas/PLAN.v1.schema.json +258 -0
  126. package/skills/godplans/scripts/plan-halflife.sh +76 -0
  127. package/skills/godplans/scripts/style-stats.py +630 -0
  128. package/skills/godplans/scripts/validate-plan.sh +1709 -0
  129. package/skills/godplans/templates/PLAN.template.mdx +269 -0
  130. package/tests/agent-memory-guidance.sh +32 -0
  131. package/tests/build-catalog.sh +81 -0
  132. package/tests/codex-runner.sh +139 -0
  133. package/tests/eval-harness.sh +377 -0
  134. package/tests/evidence-harnesses.sh +243 -0
  135. package/tests/fixtures/plan-json-v1-1.13.0.json +472 -0
  136. package/tests/install-regression.sh +246 -0
  137. package/tests/lib/plan-schema-check.js +163 -0
  138. package/tests/lint-selftest.sh +582 -0
  139. package/tests/package-contents.sh +143 -0
  140. package/tests/portable-prompt.test.sh +261 -0
  141. package/tests/release-tooling.sh +204 -0
  142. package/tests/run.sh +14 -0
  143. package/tests/script-usage.sh +37 -0
  144. package/tests/style-stats.sh +170 -0
  145. package/tests/validate-plan.sh +1970 -0
  146. package/tests/vendor-runner.sh +291 -0
@@ -0,0 +1,130 @@
1
+ # Product (PRD) planning module
2
+
3
+ Loaded first in the domain-pass order for every archetype: every project needs a problem, a user, and a definition of done before architecture or stack decisions are legible. This module tells the orchestrator what the Product sections of PLAN.mdx must contain so a prd-ready audit run at the end passes on the first try.
4
+
5
+ ## Lineage
6
+
7
+ Descends from prd-ready, the top of the hannsxpeter/ready-suite planning tier. prd-ready exists to refuse the AI-slop PRD (every section filled, nothing decided) and enforces one core discipline: every sentence is exactly one of three things, a decision with rationale, a flagged hypothesis with a validation plan, or a named open question with an owner and a due date. godplans inverts prd-ready's audit checks (substitution test, MoSCoW caps, sourced metrics, ten-dimension NFRs, separate risk registers, downstream handoff pre-fill) into plan-time obligations, so the product content of PLAN.mdx is born already passing them.
8
+
9
+ ## Decisions to force
10
+
11
+ Hardest to reverse first. Each must land in the plan's Decisions section as a grounded decision, a flagged hypothesis with a validation plan, or a named open question with a recommended default.
12
+
13
+ 1. Who the single primary user is. Question: which one role, in which workday moment, under which constraint, is this for? Why hard to reverse: architecture entities, permission models, UI flows, and launch positioning all key off this identity; changing it mid-build is a pivot, not an edit. Options: (a) one named primary user, secondary users demoted to non-goals; (b) two co-primary users with an explicit conflict-resolution rule. Default: (a). Refuse "everyone who X" as a user definition.
14
+ 2. What the problem is, stated without the solution. Question: what do users do today manually, how long does it take, what does it cost? Why hard to reverse: the problem statement is the scope boundary every later cut decision appeals to; a solution-shaped problem locks in the first idea. Options: (a) friction stated in the user's vocabulary against a named workaround (usually a spreadsheet or Notion page, not a rival product); (b) friction stated against a named competitor product. Default: (a); either way it must survive the substitution test against two named competitors.
15
+ 3. How success is measured and where the numbers come from. Question: which at-most-5 metrics, with what targets, deadlines, and named instrumentation sources? Why hard to reverse: instrumentation must ship in the first build wave; redefining a metric mid-flight destroys the baseline and makes the 30-day retro unanswerable. Options: (a) one leading plus one lagging indicator with named events; (b) a fuller set up to 5. Default: (a) minimum, (b) allowed. Vanity metrics (raw signups, pageviews, downloads) are refused as primary metrics.
16
+ 4. Appetite as a duration, not an estimate. Question: how much time is this worth (e.g. 6 weeks), after which scope gets cut rather than time extended? Why hard to reverse: appetite is the axiom the roadmap's cut decisions derive from; converting it to an estimate later flips the whole plan from scope-flexes to deadline-slips. Options: fixed appetite with scope flex (Shape Up) vs estimated timeline. Default: fixed appetite; a >50% appetite delta later triggers a replan.
17
+ 5. The Must cap. Question: which requirements are genuinely Must? Why hard to reverse: the Must set defines the first release gate; an inflated Must tier silently converts the plan into a laundry list nobody can cut from. Options: cap Must at 50% of ranked requirements (hard cap 7 Musts) vs no cap. Default: the cap, with Should and Could tiers populated and Won't cross-linked to out-of-scope.
18
+ 6. Change control and the fork threshold. Question: which post-approval edits replan, where are they broadcast, and what forces a rewrite rather than a patch? Why hard to reverse: without a declared rule, the first silent post-approval edit creates a moving-target plan and every later dispute is unadjudicable. Options: broadcast every replan, or only threshold breaches. Default: broadcast every replan; new user, new problem, new metric, or >50% appetite delta rewrites the product decisions.
19
+ 7. What the product explicitly refuses to own. Question: which adjacent problems, user groups, and integrations does this plan permanently not serve? Why hard to reverse: non-ownership statements are commitments that downstream architecture (trust boundaries, integration points) and launch positioning build on; retracting one later reopens every scope debate at once. Options: (a) a written non-ownership register with reconsider conditions; (b) implicit scope by omission. Default: (a); omission is not a decision, it is a future argument.
20
+
21
+ ## Plan requirements
22
+
23
+ Consumed by the orchestrator's inversion pass; each becomes acceptance criteria on concrete tasks via Requirements: lines.
24
+
25
+ 1. R-PRD-1 The product section opens with a mode declaration (greenfield product, greenfield feature, brownfield fix, iteration, pivot fork, or rescue) and all 7 pre-flight answers in writing: the problem, who has it, how they solve it today, why now, what it costs them in concrete numbers, what success looks like in 90 days as an outcome (not a ship event), and appetite as a duration. Missing answers appear as explicit assumptions or open questions, never fabricated.
26
+ Criterion: WHEN the product section is emitted THE PLAN SHALL contain the declared mode and 7 written pre-flight answers, with any unknown recorded as an assumption or an owned open question.
27
+ 2. R-PRD-2 Appetite is stated as a duration (e.g. "6 weeks"), never as an estimate, with the sentence "scope flexes, time does not" made operative by linking appetite to the roadmap's cut policy.
28
+ Criterion: IF appetite appears anywhere in the plan THE PLAN SHALL express it as a fixed duration bound to a scope-cut rule, and SHALL NOT express it as an effort estimate.
29
+ 3. R-PRD-3 The problem framing is exactly three paragraphs: the friction in the user's vocabulary, who has it (concrete role plus constraint), and the existing workaround. It passes the substitution test against two named competitors (a sentence that reads plausibly for a competitor decides nothing and fails) and contains zero sentences that name the solution; the shape is "users today do X manually, which takes Y and costs Z".
30
+ Criterion: WHEN the problem statement is written THE PLAN SHALL name two competitors it was substitution-tested against and SHALL contain no sentence of the form "Our product", "The system", or "Users need a tool that".
31
+ 4. R-PRD-4 One primary user is specified in five bullets: role, context (the specific workday moment), constraint, current workaround, and a real research citation or an explicitly flagged research-gap open question. No persona fiction, no decorative demographics (age, hobbies, beverage preferences).
32
+ Criterion: WHEN the target user is defined THE PLAN SHALL cite research or flag a research gap as an owned open question, and SHALL NOT include narrative persona paragraphs.
33
+ 5. R-PRD-5 Success is at most 5 metrics, each with a number, a deadline or window, an outcome frame, and the named instrumentation source (event, dashboard, or query) that will measure it; at least one leading and one lagging indicator; no vanity metrics, no feature-shipped checkboxes, no undefined "active". A build task exists that makes the instrumentation live on day 1.
34
+ Criterion: WHEN success criteria are listed THE PLAN SHALL give every metric a number, deadline, outcome frame, and named source, and SHALL contain a task that ships the emitting instrumentation in the first build wave.
35
+ 6. R-PRD-6 Every functional requirement is a user-observable behavior with a MoSCoW rank, Given/When/Then acceptance criteria QA can test, and an explicit dependency list; at most 50% ranked Must; Should and Could populated; Won't cross-linked to out-of-scope; no implementation details, screens, or marketing phrases inside requirements; anything not both user-observable and testable is split or merged.
36
+ Criterion: WHEN functional requirements are enumerated THE PLAN SHALL rank each with MoSCoW under the 50% Must cap and attach Given/When/Then criteria and dependencies to each.
37
+ 7. R-PRD-7 All ten NFR dimensions are addressed: performance, scale, availability, security, privacy, compliance, accessibility, internationalization, observability, data retention. Each gets a numbered threshold with a stated basis (SLA, industry baseline, customer commitment) or an owned open question. Security and compliance are never silent; at minimum the plan states which regulations do and do not apply. No invented numbers ("99.99%" with no basis fails).
38
+ Criterion: WHEN NFRs are written THE PLAN SHALL address all ten dimensions and SHALL attach a basis citation to every numeric threshold or flag it as an owned open question.
39
+ 8. R-PRD-8 The out-of-scope section contains at least three no-gos each with a reason and a reconsider condition, at least one deferral, at least one explicit non-ownership statement, and at least one rabbit hole named with what could go wrong, why over-building is tempting, and the smallest version that avoids it. The out-of-scope section is longer than the Won't tier and at least as long as the goals statement.
40
+ Criterion: WHEN scope is bounded THE PLAN SHALL list 3+ reasoned no-gos, 1+ deferral, 1+ non-ownership entry, and 1+ rabbit hole with its smallest-version alternative.
41
+ 9. R-PRD-9 Risks and assumptions live in two separate registers, never merged: every risk has a specific failure mode, an owner, a concrete mitigation, and a trigger signal; every assumption has the claim, the evidence (or "no evidence yet; hypothesis"), and a validation plan with a date.
42
+ Criterion: WHEN risks or assumptions are recorded THE PLAN SHALL keep them in separate registers with all fields present per entry.
43
+ 10. R-PRD-10 Every product open question is routed to the plan's single Open Questions section (bottom of PLAN.mdx) with an owner, a due date, a blocking flag (blocks build? blocks ship?), and a recommended default. Committed decisions never appear there.
44
+ Criterion: IF a product decision is unresolved THE PLAN SHALL record it only in the Open Questions section with owner, due date, blocking flag, and recommended default.
45
+ 11. R-PRD-11 Every sentence in the product section passes the three-label test (decision, hypothesis, or open question). Banned outright: TBD or TODO without owner and date, and the phrases industry-leading, enterprise-grade (undefined), seamlessly, AI-powered (for a non-AI product), best-in-class, world-class, cutting-edge, game-changing, revolutionary.
46
+ Criterion: WHEN the product section is complete THE PLAN SHALL contain zero unowned TBD/TODO markers and zero banned marketing phrases.
47
+ 12. R-PRD-12 A prior-art section lists 3 comparable products or internal projects with honest status (thriving, stagnant, dead, pivoted) and one line on what each teaches this plan.
48
+ Criterion: WHEN prior art is documented THE PLAN SHALL name 3 comparables each with a status and a lesson.
49
+ 13. R-PRD-13 The product section pre-fills the inputs the later domain passes consume, so decisions are never re-litigated: for architecture (entities, core flows with 2+ error paths per feature, NFRs, integration points, trust boundaries, deferrals), for roadmap (MoSCoW ordering, release gates, dependencies, rabbit holes, hard dates), for stack (the pre-flight constraints), for build (entities and CRUD surface, roles and permissions, audit-trail needs, error states, domain landmines).
50
+ Criterion: WHEN the product pass finishes THE PLAN SHALL contain a handoff block per downstream pass with no empty sub-section; every gap says "deferred to <pass>" with a reason.
51
+ 14. R-PRD-14 A sign-off roster is named with what each role attests to (PM: problem and scope; eng lead: feasibility and dependencies; design lead: user and flows; QA where present: acceptance criteria testability), never blanket "approved", and the attestations are scheduled as plan milestones. Solo builders name themselves per role explicitly.
52
+ Criterion: WHEN sign-off is planned THE PLAN SHALL list each signer with a specific attestation and a milestone task for it.
53
+ 15. R-PRD-15 Change control is declared upfront against the status lifecycle: a post-approval change to scope, users, or metrics returns status to planning and increments plan_version, broadcast on a named channel; past the fork threshold (new user, new problem, new metric, or >50% appetite delta) the replan rewrites the product decisions instead of patching them. Clarifications changing no commitment keep the status.
54
+ Criterion: WHEN the plan is emitted THE PLAN SHALL state its change-control rule, broadcast channel, and fork threshold against the status lifecycle and SHALL NOT declare a second lifecycle state.
55
+ 16. R-PRD-16 The visual-identity direction is named in one phrase (e.g. "fintech-serious", "playful-utilitarian") for the build and launch passes to inherit.
56
+ Criterion: WHEN the product section is complete THE PLAN SHALL contain exactly one visual-identity direction phrase.
57
+ 17. R-PRD-17 Post-launch closure is scheduled inside the plan: a 30-day retrospective task against the success criteria, a support runbook task covering the top 5 expected failure modes, and a one-paragraph rollback statement linking the R-DEPLOY-17 rollback doc when deploy lands.
58
+ Criterion: WHEN phases are laid out THE PLAN SHALL contain tasks for the 30-day retro, the top-5 support runbook, and a rollback statement.
59
+
60
+ ## Task seeds
61
+
62
+ - [ ] GP-xxx Wire day-1 success-metric instrumentation
63
+ - Files: src/server/analytics.ts, docs/metrics.md
64
+ - Acceptance: every metric in the plan's Success criteria has a named server-side emit call after the outcome commits; docs/metrics.md maps each metric to its event, dashboard, or query
65
+ - Verify: grep -q "track(" src/server/analytics.ts && grep -q "<metric_event_name>" docs/metrics.md
66
+ - Requirements: R-PRD-5
67
+ - [ ] GP-xxx Validate the riskiest assumption before the build wave depending on it
68
+ - Files: docs/validation/<assumption-slug>.md
69
+ - Acceptance: the file records the claim, the method (interviews, spike, or data pull), the result, and the go/pivot decision; the assumption register entry links to it
70
+ - Verify: test -f docs/validation/<assumption-slug>.md && grep -q "Decision:" docs/validation/<assumption-slug>.md
71
+ - Requirements: R-PRD-9
72
+ - [ ] GP-xxx Build the success-metric dashboard or saved queries
73
+ - Files: analytics/queries/<metric>.sql, docs/metrics.md
74
+ - Acceptance: one runnable query or dashboard link per success metric; leading and lagging indicators both covered
75
+ - Verify: test "$(ls analytics/queries/*.sql | wc -l)" -eq <metric-count>
76
+ - Requirements: R-PRD-5
77
+ - [ ] GP-xxx Write the support runbook for the top 5 failure modes
78
+ - Files: docs/runbook.md
79
+ - Acceptance: 5 failure modes, each with detection signal, user-facing symptom, and remediation steps; rollback statement included
80
+ - Verify: test "$(grep -c "^## Failure:" docs/runbook.md)" -eq 5 && grep -q "Rollback" docs/runbook.md
81
+ - Requirements: R-PRD-17
82
+ - [ ] GP-xxx Snapshot metric baselines and schedule the 30-day retrospective
83
+ - Files: docs/retro-30d.md
84
+ - Acceptance: baseline value recorded per success metric at launch; retro date set 30 days after launch; template sections for each success metric
85
+ - Verify: grep -q "Baseline:" docs/retro-30d.md && grep -q "Retro date:" docs/retro-30d.md
86
+ - Requirements: R-PRD-5, R-PRD-17
87
+ - [ ] GP-xxx Compile the prior-art dossier
88
+ - Files: docs/prior-art.md
89
+ - Acceptance: 3 comparable products or internal projects, each with an honest status (thriving, stagnant, dead, pivoted) and a one-line lesson this plan applies
90
+ - Verify: test "$(grep -c "^## " docs/prior-art.md)" -eq 3 && grep -q "Status:" docs/prior-art.md
91
+ - Requirements: R-PRD-12
92
+ - [ ] GP-xxx Turn Must-requirement acceptance criteria into executable test skeletons
93
+ - Files: tests/acceptance/<feature>.spec.ts
94
+ - Acceptance: one test file per Must requirement; each Given/When/Then criterion from the plan appears as a named test case, failing or pending until implemented
95
+ - Verify: test "$(ls tests/acceptance/*.spec.ts | wc -l)" -eq <must-count> && grep -rq "describe(" tests/acceptance/
96
+ - Requirements: R-PRD-6
97
+ - [ ] GP-xxx Audit the plan's product section for banned language and unowned questions
98
+ - Files: .godplans/PLAN.mdx
99
+ - Acceptance: zero banned marketing phrases; zero TBD/TODO without owner and date; every Open Questions entry has owner, due date, blocking flag, and default
100
+ - Verify: ! awk '/^## /{s=1;p=/^## (Sc|Req|Op)/}p||!s' .godplans/PLAN.mdx | grep -iE "TBD|TODO|seamless|best-in-class|world-class|cutting-edge|game-chang|revolutionary|industry-leading|enterprise-grade|AI-powered" | grep -qvi owner
101
+ - Requirements: R-PRD-11, R-PRD-10
102
+
103
+ ## Self-audit rubric
104
+
105
+ 100 points total. Below 85 total, revise before emission.
106
+
107
+ - Pre-flight and framing (10): mode declared; all 7 pre-flight answers written; appetite is a duration bound to a cut policy; unknowns are assumptions or owned questions, not gaps.
108
+ - Problem and user specificity (15): three-paragraph problem in the user's vocabulary; substitution test passed against two named competitors; no solution-naming sentences; one primary user in five bullets with citation or flagged gap; no persona fiction.
109
+ - Success metrics (15): at most 5, each with number, deadline, outcome frame, named source; leading plus lagging present; day-1 instrumentation task exists; zero vanity metrics.
110
+ - Functional requirements (15): every requirement user-observable and testable with Given/When/Then and dependencies; MoSCoW ranked; Must at or under 50% and at most 7; Won't cross-linked to out-of-scope.
111
+ - NFR coverage (10): all ten dimensions addressed; every number has a stated basis; security and compliance explicitly scoped, never silent.
112
+ - Scope negative space (10): 3+ reasoned no-gos with reconsider conditions; deferral and non-ownership entries present; rabbit hole named with smallest-version alternative; out-of-scope longer than the Won't tier.
113
+ - Registers and question hygiene (10): risks and assumptions in separate complete registers; every open question routed to the single Open Questions section with owner, due date, blocking flag, and default; three-label test holds sentence by sentence.
114
+ - Downstream pre-fill and traceability (10): handoff inputs for architecture, roadmap, stack, and build passes filled or explicitly deferred with reason; every R-PRD requirement traceable to at least one task's Requirements: line.
115
+ - Lifecycle and closure (5): change-control rule, broadcast channel, and fork threshold declared; sign-off attestations scheduled; retro, runbook, and rollback tasks present; prior art and visual-identity phrase included.
116
+
117
+ ## Anti-patterns refused
118
+
119
+ - Invisible PRD: the problem or user section reads equally true for two competitors. Refusal: run the substitution test against two named competitors and rewrite until sentences decide something.
120
+ - Solution-first PRD: the Problem section names the product ("Users need a tool that..."). Refusal: rewrite as "users today do X manually, which takes Y and costs Z" before any requirement is written.
121
+ - Feature laundry list: more than 7 Must-ranked or more than 12 unranked requirements. Refusal: enforce the 50% Must cap; force Should/Could tiers and cross-link Won't to out-of-scope.
122
+ - Assumption soup: "users will love this" with no evidence and no validation plan. Refusal: every assumption gets claim, evidence or "no evidence yet; hypothesis", and a dated validation task.
123
+ - Hollow PRD: TBD, TODO, or "figure out later" without an owner and due date. Refusal: convert each to an owned open question with a recommended default or delete the section it hollows out.
124
+ - Fabricated personas: narrative fiction paragraphs, demographics with no research citation. Refusal: five bullets max, citation or a flagged research-gap question.
125
+ - Vanity-metric success: raw signups, pageviews, downloads, or "ship feature X" as success. Refusal: outcome-framed metrics with numbers, deadlines, and named sources only.
126
+ - Silent or invented NFRs: no security/compliance statement, or "99.99%" with no basis. Refusal: address all ten dimensions; every number cites its basis or becomes an owned question.
127
+ - Moving-target PRD: post-approval edits with no replan or broadcast. Refusal: declare the change-control rule and broadcast channel before approval; replan on every commitment change.
128
+ - Marketing-adjective creep: seamlessly, best-in-class, enterprise-grade, AI-powered on a non-AI product. Refusal: banned-phrase grep in the final Verification phase; the plan does not ship containing them.
129
+ - Rubber-stamp sign-off: signers listed with a blanket "approved" and no named attestation, or tiers left unsigned. Refusal: each signer attests to a specific thing (problem, feasibility, flows, testability) and each attestation is a scheduled milestone; an unsigned roster blocks the plan from status approved.
130
+ - One-prompt PRD: emitting a full product section from a single-sentence idea with no mode declaration or pre-flight. Refusal: run intake and discovery first; unanswered pre-flight questions become written assumptions, never invented answers.
@@ -0,0 +1,184 @@
1
+ # Repository and CI planning module
2
+
3
+ Plans the Repository and CI sections of PLAN.mdx: file inventory, documentation set, CI pipeline, quality tooling, security automation, release machinery, and agent-safety layer. The orchestrator loads this module for every archetype; only the target tier and file set vary. A marketing-site or library plan still needs a repo. Repo is never excluded or deferred (discovery.md hard rules, enforced by the validator): a user who states a no-repo constraint gets tier 1 (Essentials) at the MVP stage's file band, and the constraint is recorded as a decision.
4
+
5
+ ## Lineage
6
+
7
+ Descends from repo-ready, the building-tier ready-suite skill that sets up production-grade repository structure across any stack (Node, Python, Go, Rust, Java, Ruby, Swift, C#, PHP, Elixir, C++, Dart) and any platform (GitHub, GitLab, Bitbucket, Azure, Gitea, SourceHut). repo-ready exists to kill one failure mode: repositories that look set up but are not (README with only a title, CONTRIBUTING full of TODOs, SECURITY.md pointing at security@example.com, CI running echo, LICENSE with {{author}}). The disciplines that carry over into plan time: the no-placeholder rule becomes a plan-time obligation to collect real values before any file is listed; the relevant-files-not-maximum-files rule (project type x stage x audience) becomes a mandatory tier declaration; the 42-point Mode C audit becomes the acceptance bar the emitted plan must pass by construction.
8
+
9
+ ## Decisions to force
10
+
11
+ Hardest to reverse first. Each must land in the Decisions section of PLAN.mdx as a grounded decision, a flagged hypothesis, or exactly one Open Questions entry with a recommended default.
12
+
13
+ 1. Monorepo vs polyrepo vs multi-repo suite. Hard to reverse because directory layout, workspace tooling, CI matrix shape, import paths, and cross-repo invariants all derive from it; splitting or merging repos later rewrites every path and pipeline. Options: single repo (default for one deployable plus its docs), monorepo with workspaces (multiple deployables sharing types), multi-repo suite (independent release cadences, separate access control). Default: single repo unless the architecture section names two or more independently deployed units. If .architecture-ready/ARCH.md or the plan's architecture section exists, read it; do not re-decide.
14
+ 2. License and copyright identity. Hard to reverse because relicensing needs consent from every contributor once outside code lands. Options: MIT (default for OSS), Apache-2.0 (patent grant matters), proprietary (internal or commercial). The plan must record real SPDX identifier, real year, real author; {{author}} is a refusal.
15
+ 3. Project type x stage x audience triple, pinned to a target tier. Hard to reverse in effort terms: the triple determines the entire file inventory, and re-tiering means regenerating or deleting files that other files cross-reference. Type from the 11-type matrix (library, CLI, web app, API, mobile, desktop, DevOps-IaC, data-ML, monorepo, docs site, framework). Stage sets file count: MVP 5-8 files, Growth 12-18, Enterprise 20-30+. Audience (OSS community, internal team, enterprise) sets tone. Tier: 1 Essentials, 2 Team Ready, 3 Mature, 4 Hardened. Default: Tier 1 for a solo MVP, Tier 2 once a second contributor is expected.
16
+ 4. Branching model, commit convention, tag scheme. Hard to reverse because CONTRIBUTING, PR templates, release automation, and changelog generation all parse the convention; changing it mid-history breaks release tooling. Default: trunk-based with short-lived branches, Conventional Commits, vX.Y.Z SemVer tags. Alternatives (GitFlow, calver) only with a stated reason.
17
+ 5. Folder structure to stack convention. Hard to reverse because every import, CI path filter, and doc link encodes it. Go: cmd/, internal/, pkg/. Python: src/package_name/. Next.js: app/. Plus source/tests/docs separation. Default: the detected or chosen stack's idiomatic layout, named explicitly in the plan; never a generic src/ for a stack with a stronger convention.
18
+ 6. One tool per job. Moderately hard to reverse; dual tools produce conflicting diffs on every commit until one is ripped out. Exactly one linter (Biome or ESLint, Ruff, golangci-lint, clippy), one formatter, one dependency bot (Dependabot or Renovate, never both), one release tool (release-please, semantic-release, or changesets). Default per stack: Biome for new Node, Ruff for Python, the built-in for Go and Rust; Dependabot with grouping; release-please.
19
+ 7. Platform and CI provider. Reversible with pain: workflow syntax, branch protection, and badges are provider-specific. Default: GitHub plus GitHub Actions unless the user names another platform.
20
+ 8. Agent-safety layer (for repos that agents will execute against, which every godplans output is). Cheap to add at scaffold, embarrassing to retrofit after an agent force-pushes. Components: .claude/settings.json denylist for destructive git ops, .githooks/pre-push blocking force-push to main, .gitleaks.toml wired into pre-commit and CI. Default: all three, planned as one task.
21
+
22
+ ## Plan requirements
23
+
24
+ The orchestrator's inversion pass distributes these onto tasks. Every requirement states what PLAN.mdx must contain, then its acceptance criterion.
25
+
26
+ R-REPO-1. The plan pins the project type x stage x audience triple and the target tier (1-4) in the Repository section, and the planned file inventory is derived from that triple: 5-8 files at MVP, 12-18 at Growth, 20-30+ at Enterprise.
27
+ Criterion: WHEN the Repository section is read, THE PLAN SHALL state type, stage, audience, and tier on named lines, and the file count in the repo scaffold task SHALL fall inside the stage's band.
28
+
29
+ R-REPO-2. The plan declares mode (greenfield, enhancement, audit, multi-repo suite) and, for enhancement of an existing repo, includes the rollback protocol: on low-confidence stack detection or a config conflict (existing Biome vs planned ESLint), the executing agent stops, describes the conflict, and proposes re-detect or leave-alone; no existing config file is ever overwritten silently, and an existing Pillars standard (AGENTS.md plus agents/*.md with pillar: frontmatter) is preserved.
30
+ Criterion: IF mode is brownfield, THE PLAN SHALL contain an additive-only constraint and the stop-describe-propose conflict protocol as task acceptance criteria on every task that writes a config file.
31
+
32
+ R-REPO-3. The plan forbids destructive git operations on the user working tree: no task, Verify command, or executor rule may run git reset, git checkout --, git clean, or rm against tracked files.
33
+ Criterion: WHEN any task's Verify or acceptance lines are scanned, THE PLAN SHALL contain no destructive git command, and the Rules section SHALL name the prohibition.
34
+
35
+ R-REPO-4. The plan names the stack and platform explicitly (or cites the plan's stack section), and every repo artifact derives from it: .gitignore entries match the stack (node_modules/, __pycache__/, target/, .next/), linter and formatter are stack-native, folder structure follows stack convention, and no file for an uninstalled tool is planned.
36
+ Criterion: WHEN the repo scaffold tasks are read, THE PLAN SHALL name the stack once and every tooling file SHALL be justified by that stack; an ESLint config in a Python plan is a failed criterion.
37
+
38
+ R-REPO-5. For polyglot repos, the plan names the primary and secondary languages, layers tooling per language without unifying it, gives the CI matrix one job per language, and generates shared types from one source of truth.
39
+ Criterion: IF more than one language appears in the stack, THE PLAN SHALL contain a primary-language declaration and a per-language CI job list.
40
+
41
+ R-REPO-6. The plan carries real values for everything a placeholder would otherwise fill: license SPDX id, copyright year, author name, security disclosure contact and response timeline, and the actual lint, type-check, test, and build commands. These are collected at discovery or defaulted from the user's identity; {{var}}, TODO, TBD, example.com, and INSERT-style markers are banned from planned file content.
42
+ Criterion: WHEN the plan is grepped for {{, TODO, TBD, PLACEHOLDER, or example.com inside planned repo file content, THE PLAN SHALL return zero matches, and the discovery assumptions SHALL list the real values used.
43
+
44
+ R-REPO-7. The plan specifies a README task whose acceptance requires description, install steps, usage example, license reference, and a Quick Start of 5 or fewer commands that a fresh clone can execute.
45
+ Criterion: WHEN the README task is read, THE PLAN SHALL list those five elements as grep-verifiable acceptance conditions including the 5-command Quick Start cap.
46
+
47
+ R-REPO-8. The plan specifies the documentation set appropriate to tier: CONTRIBUTING describing the real branch model, real setup, and real test command; SECURITY.md with the real contact and timeline; CHANGELOG in Keep a Changelog format with an Unreleased section; CODE_OF_CONDUCT only at tiers whose audience warrants it. The README Quick Start (tier 1) or the CONTRIBUTING setup section (tier 2 and above) is the documentation set's `build.dev-setup` row.
48
+ Criterion: IF tier is 2 or above, THE PLAN SHALL include tasks for CONTRIBUTING, SECURITY.md, and CHANGELOG whose acceptance lines name the real workflow, real contact, and Keep a Changelog headings; IF tier is 1, THE PLAN SHALL exclude them with a stated reason rather than silently.
49
+
50
+ R-REPO-9. The plan's CI task triggers on pull_request and on push to the default branch, and runs the project's real lint, type-check, test, and build commands, named verbatim in the task's acceptance lines. A CI job that runs echo or a no-op is a planning failure, not an execution detail.
51
+ Criterion: WHEN the CI task is read, THE PLAN SHALL name both triggers and all four real commands, and no acceptance line SHALL permit a stub step.
52
+
53
+ R-REPO-10. The plan configures quality tooling as a set: one linter, one formatter, one git-hook manager per stack (Husky plus lint-staged for Node; pre-commit or Lefthook otherwise), plus .editorconfig and .gitattributes with * text=auto.
54
+ Criterion: WHEN quality tooling tasks are read, THE PLAN SHALL name exactly one tool per job and SHALL include .editorconfig and .gitattributes in the file list.
55
+
56
+ R-REPO-11. The plan enforces one tool per job across the whole repo: no ESLint plus Biome, no Dependabot plus Renovate, no two formatters. Where the stack section already picked a tool, the repo section reuses it rather than re-deciding.
57
+ Criterion: IF two planned tools serve the same job, THE PLAN SHALL fail its self-audit and the orchestrator SHALL remove one before emission.
58
+
59
+ R-REPO-12. The plan wires security automation at tier 2 and above: exactly one dependency bot with update grouping to reduce PR noise, SAST (CodeQL or Semgrep) and branch protection requiring PR review plus CI pass before merge; secret scanning runs at every tier as the single task that wires gitleaks and cites R-REPO-15 (and R-SEC-14 when landed).
60
+ Criterion: IF tier is 2 or above, THE PLAN SHALL contain tasks for the bot config, the SAST workflow, and a branch protection step with its exact settings listed.
61
+
62
+ R-REPO-13. The plan specifies release machinery consistent with the commit convention: one release tool (release-please, semantic-release, or changesets), SemVer vX.Y.Z tags, and platform Releases with generated notes. CONTRIBUTING, the PR template, and the release tool must all cite the same commit convention.
63
+ Criterion: WHEN release and contributing tasks are read, THE PLAN SHALL name one release tool and one commit convention, and both tasks SHALL reference the same convention string.
64
+
65
+ R-REPO-14. At tier 4 (Hardened), the plan adds signed commits and provenance or artifact signing; at lower tiers it explicitly stops, declaring the completed tier at the boundary rather than half-starting the next. The dependency inventory follows its catalog selection, not the tier: whenever `public_release` is true or scale is enterprise, one task citing R-REPO-14 (and R-SEC-17 when that requirement lands) generates it (CycloneDX or SPDX, from a named resolver, recorded as dated evidence plus an index, never hand-written), so the security SBOM and the repo inventory come from one generator. ADRs and runbooks are not repo-owned at any tier: `decide.adr` belongs to the architecture module (R-ARCH-14) and `operate.runbook` to the observe module, and this module records their documentation-set rows without planning a second task for either.
66
+ Criterion: IF tier is 4, THE PLAN SHALL include tasks for each hardened artifact; IF `public_release` is true or scale is enterprise, THE PLAN SHALL contain exactly one dependency-inventory task; THE PLAN SHALL NOT contain a repo task that writes an ADR or a runbook; IF tier is below 4, THE PLAN SHALL contain a tier-boundary line stating where repo work stops and why.
67
+
68
+ R-REPO-15. The plan includes the agent-safety layer as a first-class task: .claude/settings.json denylist for destructive commands, .githooks/pre-push blocking force-push to protected branches, and .gitleaks.toml wired into both pre-commit and CI. These are the AGENT-01/02/03 checks and every godplans repo is agent-run by definition.
69
+ Criterion: WHEN the agent-safety task is read, THE PLAN SHALL list all three files with grep-verifiable content conditions (denylist entries, hook exit-nonzero-on-force-push, gitleaks CI step).
70
+
71
+ R-REPO-16. The plan's cross-references are closed under the tier: every file a planned file links to is itself planned at that tier. README linking CONTRIBUTING requires CONTRIBUTING in the inventory; badges are planned only for services the plan actually configures, so no badge can render 404 or unknown.
72
+ Criterion: WHEN the planned file inventory is checked, THE PLAN SHALL contain every cross-reference target, and every planned badge SHALL map to a planned, configured service.
73
+
74
+ R-REPO-17. The plan applies the single-naming rule: the same concept carries the same name in directory, test file, endpoint, table, and README section, and the repo section names the canonical spelling for each core concept it introduces.
75
+ Criterion: WHEN core concept names appear across repo tasks, THE PLAN SHALL use one spelling per concept with no synonyms across file paths and doc headings.
76
+
77
+ R-REPO-18. The plan bans empty ceremony: no directories containing only .gitkeep, no generated .env (only .env.example), no GOVERNANCE.md or full community pack on a solo project, no uncustomized issue templates carrying stock text like "A clear and concise description of the bug".
78
+ Criterion: IF the audience is solo or internal-MVP, THE PLAN SHALL exclude governance and community-pack files with a stated reason, and every planned template task SHALL require project-specific content.
79
+
80
+ R-REPO-19. The plan defines its own finish line in audit terms: the Repository section states the target Mode C score band (out of 42 across Essentials 7, Community 7, Quality 7, Security 6, DX 6, Release 6, Agent-Safety 3) that the completed repo must reach, matched to the pinned tier, so a post-build audit has a defined pass threshold.
81
+ Criterion: WHEN the Repository section is read, THE PLAN SHALL state a numeric target score and its tier band (0-13 Needs work, 14-22 Basic, 23-30 Good, 31-35 Excellent, 36-42 Exemplary).
82
+
83
+ R-REPO-20. The plan consumes upstream sections instead of re-deriving: stack from the stack section, repo topology from architecture, product name and audience from product. On drift between an upstream artifact and existing code (brownfield), the plan trusts the code and records the discrepancy.
84
+ Criterion: WHEN repo decisions overlap upstream sections, THE PLAN SHALL cite the upstream decision rather than restate a new one, and any brownfield drift SHALL appear as a noted assumption.
85
+
86
+ R-REPO-21. The plan emits `## Documentation set`, the manifest selected from `doc-set.md` against the applicability matrix, product form, scale, `public_release`, and the security and compliance profile. Every row carries a catalog id, its lifecycle stage, a verdict of required, recommended, optional, or not-applicable, the owning module, and what selected it; a small project may fold several documents into one file, but a required document is never silently dropped. Documentation scales to the project: a prototype does not get a business-continuity plan, and a regulated platform does not ship without a threat model and a traceability record.
87
+ Criterion: WHEN the plan sets its applicability matrix, THE PLAN SHALL emit exactly one `## Documentation set` section whose rows use catalog ids and stages from `doc-set.md`, and SHALL tag every row required, recommended, optional, or not-applicable.
88
+
89
+ R-REPO-22. Every not-applicable row in the documentation set carries the same three parts an excluded applicability row carries: an evidence state of `absent:`, `by-design:`, or `present-elsewhere:`, a project-specific reason, and an observable `revisit when:` predicate. `unknown:` and `hint:` are refused, because a document skipped by an unexamined absence is a laundered gap, and it reads exactly like a considered decision a year later when nobody remembers which it was.
90
+ Criterion: WHEN a documentation-set row is not-applicable, THE PLAN SHALL state an accepted evidence state, a reason, and a revisit-when predicate that names an observable event and is not "later", "eventually", "post-MVP", "future", "when ready", or "TBD".
91
+
92
+ R-REPO-23. Each documentation-set row names exactly one owning module, taken from the catalog, and the repo pass plans only the rows it owns. Where another module owns the artifact (architecture owns `decide.adr`, database owns `design.data-model`, observe owns `operate.runbook`, style-genome owns `build.style-genome`, agent-memory owns `build.agent-memory`), the repo pass records the row and defers the writing task to that module rather than planning a second task for the same file.
93
+ Criterion: WHEN the documentation set is emitted, THE PLAN SHALL give every row exactly one owner module, and no two tasks in the plan SHALL write the same document path.
94
+
95
+ R-REPO-24. Every required and recommended row names the GP task that writes it, except a brownfield or replan row in state `present-current` (adopt: frontmatter only) or `present-elsewhere` (confirm: the document lives outside the repository); greenfield plans claim no present state except `present-elsewhere`. Every planned document carries lifecycle frontmatter (id, stage, durability, owner role, system of record, status, review cadence, and the paths it covers) as an acceptance condition of that task. Durability governs the task shape: a `durable` row gets a task that writes and later edits the document in place, an `evidence` row gets a task that produces a new dated artifact plus an index that lists runs and never a task that edits an existing one, and a `transient` row is never planned as a deliverable because its decision belongs in `## Decisions`.
96
+ Criterion: WHEN a documentation-set row is required or recommended, THE PLAN SHALL name the GP task that writes it, that task's acceptance SHALL require the lifecycle frontmatter fields, and no task SHALL edit an artifact whose row is durability `evidence`.
97
+
98
+ R-REPO-25. The documentation set states its boundary and its system of record. It says in the section itself that the manifest covers documentation committed to this repository, and every row whose documentation lives in a wiki, an intranet, or a compliance platform is marked present-elsewhere rather than absent. Review cadences, retention periods, and support windows are cited to a source or raised as open questions; none is invented. In brownfield and replan mode the manifest also records document state, so an existing current document is adopted with frontmatter rather than rewritten by a task, a drifted one gets a refresh task, and a document the profile does not justify is recorded as an orphan with a question rather than a deletion task.
99
+ Criterion: WHEN the documentation set is emitted, THE PLAN SHALL contain the repository-boundary statement, SHALL mark externally held documents present-elsewhere, and SHALL contain no invented review cadence, retention period, or support window; IF mode is brownfield or replan, THE PLAN SHALL record adopt, refresh, complete, confirm, or orphan for every document the repository already carries.
100
+
101
+ ## Task seeds
102
+
103
+ - [ ] GP-xxx Scaffold tier-scoped repo file inventory
104
+ - Files: README.md, LICENSE, .gitignore, .gitattributes, .editorconfig
105
+ - Acceptance: README contains install, usage, and a Quick Start of 5 or fewer commands; LICENSE contains the real SPDX text, current year, and real author; .gitignore contains the stack's canonical ignore entries; grep for "{{", "TODO", "example.com" across all five files returns nothing
106
+ - Verify: ls README.md LICENSE .gitignore .gitattributes .editorconfig >/dev/null && ! grep -rEn '\{\{|TODO|TBD|example\.com' README.md LICENSE .gitignore .gitattributes .editorconfig
107
+ - Requirements: R-REPO-1, R-REPO-4, R-REPO-6, R-REPO-7
108
+
109
+ - [ ] GP-xxx Write contributor and security docs
110
+ - Files: CONTRIBUTING.md, SECURITY.md, CHANGELOG.md, CODE_OF_CONDUCT.md
111
+ - Acceptance: CONTRIBUTING names the real branch model, setup commands, and test command; SECURITY.md contains a real contact and a response timeline; CHANGELOG has Keep a Changelog headings with an Unreleased section
112
+ - Verify: grep -q 'Unreleased' CHANGELOG.md && test -f SECURITY.md && ! grep -q 'example.com' SECURITY.md && grep -qE 'npm test|pytest|go test|cargo test' CONTRIBUTING.md
113
+ - Requirements: R-REPO-8, R-REPO-13, R-REPO-6
114
+
115
+ - [ ] GP-xxx Wire CI pipeline with real commands
116
+ - Files: .github/workflows/ci.yml
117
+ - Acceptance: workflow triggers on pull_request and push to main; jobs run the project's actual lint, type-check, test, and build commands; no step is echo or a placeholder; polyglot repos get one job per language
118
+ - Verify: grep -q 'pull_request' .github/workflows/ci.yml && ! grep -qE 'run: *echo' .github/workflows/ci.yml
119
+ - Requirements: R-REPO-9, R-REPO-5, R-REPO-4
120
+
121
+ - [ ] GP-xxx Configure quality tooling, one tool per job
122
+ - Files: biome.json (or stack equivalent), .editorconfig, lefthook.yml (or .husky/), .gitattributes
123
+ - Acceptance: exactly one linter and one formatter configured for the stack; a git-hook manager runs them pre-commit; no config file exists for an uninstalled tool; no second tool shares a job
124
+ - Verify: test -f biome.json && ! test -f .eslintrc.json
125
+ - Requirements: R-REPO-10, R-REPO-11, R-REPO-4
126
+
127
+ - [ ] GP-xxx Wire security automation and branch protection
128
+ - Files: .github/dependabot.yml, .github/workflows/codeql.yml
129
+ - Acceptance: exactly one dependency bot configured with update grouping; SAST workflow present and stack-correct; branch protection settings listed for the default branch requiring PR review plus CI pass
130
+ - Verify: test -f .github/dependabot.yml && ! ls renovate.json 2>/dev/null
131
+ - Requirements: R-REPO-12, R-REPO-11
132
+
133
+ - [ ] GP-xxx Install agent-safety layer
134
+ - Files: .claude/settings.json, .githooks/pre-push, .gitleaks.toml, .github/workflows/ci.yml
135
+ - Acceptance: settings.json denies destructive git commands; pre-push hook exits nonzero on force-push to main; .gitleaks.toml exists and a gitleaks step scans full history in pre-commit and CI, the only task that wires gitleaks (it also cites R-SEC-14 when that lands)
136
+ - Verify: grep -q 'force' .githooks/pre-push && grep -q 'gitleaks' .github/workflows/ci.yml
137
+ - Requirements: R-REPO-15, R-REPO-3
138
+
139
+ - [ ] GP-xxx Configure release automation
140
+ - Files: .github/workflows/release.yml, CONTRIBUTING.md
141
+ - Acceptance: one release tool configured; tags follow vX.Y.Z SemVer; release notes generated from Conventional Commits; CONTRIBUTING cites the same commit convention the release tool parses
142
+ - Verify: grep -q 'release-please' .github/workflows/release.yml && grep -qi 'conventional commits' CONTRIBUTING.md
143
+ - Requirements: R-REPO-13, R-REPO-6
144
+
145
+ - [ ] GP-xxx Render the documentation manifest into the repository
146
+ - Files: docs/DOCUMENTATION.md
147
+ - Acceptance: one row per catalog id in the plan's `## Documentation set`, each with stage, verdict, owner, status, and either its writing task or its revisit-when predicate; the repository-boundary sentence is present; no row invents a review cadence or retention period
148
+ - Verify: grep -q 'covers documentation committed to this repository' docs/DOCUMENTATION.md && ! grep -nE 'revisit when:[ ]*(later|eventually|post-MVP|future|when ready|TBD)' docs/DOCUMENTATION.md
149
+ - Requirements: R-REPO-21, R-REPO-22, R-REPO-25
150
+
151
+ - [ ] GP-xxx Stamp lifecycle frontmatter on repo-owned documents
152
+ - Files: README.md, CONTRIBUTING.md, SECURITY.md, docs/DOCUMENTATION.md
153
+ - Acceptance: every repo-owned document opens with id, stage, durability, owner role, system_of_record, status, review_cadence, and covers (an empty list where no path should force a re-read); status is draft on generated documents; review_cadence is cited or raised as an open question, never invented
154
+ - Verify: grep -lE '^review_cadence: (on-change|on-release|none)$' README.md CONTRIBUTING.md SECURITY.md docs/DOCUMENTATION.md | wc -l | grep -q 4
155
+ - Requirements: R-REPO-24, R-REPO-23
156
+
157
+ ## Self-audit rubric
158
+
159
+ Score the drafted Repository and CI sections of PLAN.mdx out of 100. Below 85 total, revise before emission.
160
+
161
+ - Tier and profile discipline (18): full marks when type x stage x audience and target tier are pinned, the file inventory falls inside the stage band, tier boundaries are declared, and no file exists that the tier does not justify.
162
+ - No-placeholder readiness (17): full marks when every value a template would stub (license identity, security contact, CI commands, author, year) appears as a real value or a discovery default in the plan, and the ban on {{var}}, TODO, and example.com is an acceptance condition on every doc task.
163
+ - CI and quality tooling correctness (18): full marks when CI names both triggers and all four real commands, one tool per job holds across linter, formatter, bot, and release tool, and every tooling file is stack-justified.
164
+ - Security, release, and agent-safety coverage (17): full marks when the tier-appropriate security automation, branch protection, release machinery, and all three agent-safety files (AGENT-01/02/03) are planned as tasks with grep-verifiable acceptance.
165
+ - Documentation set selection and defensibility (15): full marks when every row uses a catalog id and stage, every required and recommended row names its writing task and its lifecycle frontmatter, every not-applicable row carries an accepted evidence state plus a reason plus an observable revisit-when predicate, ownership is single per document with no second task writing the same path, the boundary statement is present, and no cadence, retention period, or support window is invented. Zero for this dimension if any exclusion is unexplained, because an unexplained exclusion is worse than a missing document.
166
+ - Cross-reference and audit closure (15): full marks when every planned cross-reference target is in-inventory, badges map to configured services, the target 42-point score band is stated, and every R-REPO requirement traces to at least one task's Requirements line.
167
+
168
+ ## Anti-patterns refused
169
+
170
+ - Placeholder repo: README with only a title, {{author}} in LICENSE, security@example.com, TODO in CONTRIBUTING. Refusal: the planner collects real values at discovery or states defaults as assumptions; a plan task may not be emitted until its content values are real.
171
+ - Echo CI: a workflow whose steps run echo or true so the badge turns green. Refusal: the CI task's acceptance lines name the real lint, type-check, test, and build commands verbatim; a stub step fails the self-audit.
172
+ - Stack-mismatched files: ESLint config in a Python project, .npmrc without Node, .gitignore missing the stack's build dir, configs for uninstalled tools. Refusal: every tooling file in the plan cites the stack decision that justifies it; unjustified files are cut.
173
+ - Two tools, one job: ESLint plus Biome, Dependabot plus Renovate, dueling formatters. Refusal: the planner picks one per job at plan time and records the loser as a rejected option, not a second task.
174
+ - Uncustomized ceremony: stock issue-template text, CONTRIBUTING describing a workflow the project does not use, CHANGELOG containing only a heading. Refusal: template tasks carry project-specific acceptance strings; generic stock phrases are named banned strings in acceptance lines.
175
+ - Dead badges: badges pointing at wrong repos, wrong branches, or unconfigured services. Refusal: a badge is planned only when the service behind it is a planned, configured task in the same plan.
176
+ - Bureaucracy without users: GOVERNANCE.md and a full community pack on a solo side project. Refusal: audience gating; governance files require an audience declaration that justifies them, otherwise they are excluded with a stated reason under R-REPO-18, never as an applicability-matrix row, which holds only the 19 domains.
177
+ - Ghost structure: empty directories holding only .gitkeep, or a generated .env with live-looking values. Refusal: directories enter the plan only with real planned content; only .env.example is ever a planned file.
178
+ - Half-done tier: starting tier 3 files while tier 2 checks still fail, or forcing tier 4 on an MVP. Refusal: the planner matches tier to project, finishes tiers whole, and writes the explicit stop line at the boundary.
179
+ - Silent overwrite (brownfield): regenerating a config the repo already has, or clobbering an existing Pillars standard. Refusal: enhancement mode is additive-only with the stop-describe-propose rollback protocol baked into every config-writing task.
180
+ - Laundered documentation gap: a not-applicable row with no evidence state, no reason, or no tripwire. Refusal: all three are mandatory, because "not applicable" with nothing behind it is indistinguishable from "we forgot", and only one of those is defensible in a year.
181
+ - Doc-set theater: planning every document a taxonomy lists so the manifest looks thorough. Refusal: every row names the plan fact that selected it, and a row nothing selects is not planned.
182
+ - Double ownership: the repo pass planning an ADR, a runbook, a data model, or a style genome that another module already owns. Refusal: one owner per document from the catalog; the repo pass records the row and defers the task.
183
+ - Rewritten evidence: a task that updates last quarter's dependency inventory or scan output in place. Refusal: evidence artifacts are dated runs plus an index, and editing one destroys the only property that made it evidence.
184
+ - Invented lifecycle numbers: a review cadence, retention period, or support window the plan made up so the frontmatter would be complete. Refusal: cite it, take it from the user's answer, or open a question with a recommended default.
@@ -0,0 +1,158 @@
1
+ # Roadmap and sequencing planning module
2
+
3
+ Turns the plan's work list into a capacity-honest, dependency-sorted, gate-driven schedule. The orchestrator loads this module during the domain pass when writing the Phases, waves, and tasks sections of PLAN.mdx. Applicable to every archetype and every mode (greenfield, brownfield, replan); sequencing is never excluded from the applicability matrix.
4
+
5
+ ## Lineage
6
+
7
+ Descends from roadmap-ready (the ready-suite planning-tier sequencer) with kickoff-ready's orchestration ledger folded in. From roadmap-ready it inherits the three-label row test (grounded commitment, outcome-framed direction, or named open question), the capacity corollary (no dates without engineer-week math), the precision gradient across horizons, the 8-field milestone anatomy with binary gates, topological sequencing over the architecture DAG, the gated launch sub-tree with its D-calendar, and the downstream handoff discipline that lets build, deploy, observe, and launch work start without follow-up questions. From kickoff-ready it inherits filesystem-as-truth completion (done means the artifact exists on disk, non-empty, postdating the work), the seven-status ledger vocabulary, the ghost-handoff and rubber-stamp guards, the skip cascade, and the critical-finding gate that blocks launch past an open Critical security finding.
8
+
9
+ ## Decisions to force
10
+
11
+ 1. Phase chain and dependency spine. Question: what ordered chain of phases and component DAG fixes task order? Hard to reverse because every task's Depends on line and wave assignment derives from it; resequencing after execution starts orphans completed work and invalidates the progress counters. Options: full greenfield chain (requirements -> architecture -> stack -> scaffold -> build slices in topological component order -> deploy -> observe -> hardening -> launch (every launch task depends on the hardening checkpoint, R-ROAD-13) -> verification), or a brownfield gap-fill chain starting at the first missing artifact. Default: full chain for greenfield, gap-fill for brownfield.
12
+ 2. Cadence model. Question: which named cadence governs wave size, appetites, and checkpoint rhythm? Hard to reverse because switching cadence mid-plan re-buckets every task and invalidates every appetite. Options: Shape Up 6+2, quarterly themes, SAFe PI, continuous delivery with a rollout calendar, milestone-based, or a declared hybrid; record the choice as an ADR-shaped paragraph with two rejected alternatives and a re-evaluation trigger. Default: Shape Up 6+2 for product builds; milestone-based for libraries and CLIs.
13
+ 3. Capacity and parallelism ceiling. Question: how many concurrent tracks may one wave hold? Hard to reverse because [P] markers and wave packing assume the ceiling; overcommitting yields half-done slices in every phase, the worst position to recover from. Options: tracks equal to executing agents or engineers minus the non-project rotation share, with a serial-fraction estimate for reviews and coordination. Default: one track for a solo builder plus one [P] lane restricted to disjoint-file tasks.
14
+ 4. Slip protocol. Question: when a phase overruns its appetite, cut scope or extend time? Hard to reverse because extend-by-default silently converts every later estimate to fiction; the rule must exist before the first overrun. Options: Shape Up circuit-breaker (re-shape smaller, never carry at full scope), hold-the-date only for named external commitments, extend-with-signoff. Default: cut scope.
15
+ 5. Launch sequencing. Question: where does the launch block sit in the phase chain? Whether launch is planned at all is the applicability matrix's launch row (applicable, deferred with the discovery trigger, or excluded with an evidence state and a revisit when: predicate), and launch.md owns mode, tier, and the D-7 to D+7 runbook (R-LAUNCH-3, R-LAUNCH-19). Hard to reverse because readiness gates (observability-live, rollback-tested, runbooks-reviewed, support-briefed) must be scheduled as dated tasks weeks before D-0; bolting them on later either slips the date or ships a paper gate. Default: when launch is applicable, its readiness gates are dated tasks ahead of D-7; when it is deferred or excluded, the roadmap ends at deploy and carries the trigger as a re-plan trigger (R-ROAD-18).
16
+ 6. Audience and public derivative. Question: who reads this plan, and does a redacted public roadmap exist from day one? Hard to reverse because capacity math, owners, and rabbit-hole notes cannot be unleaked. Options: internal-only, or mixed audience with a planned public derivative (no capacity math, no owner names, confidence bands softened, "won't" becomes "not planned"). Default: internal-only unless discovery says otherwise.
17
+
18
+ ## Plan requirements
19
+
20
+ R-ROAD-1. PLAN.mdx records capacity before any dated commitment: executor count (engineers or agents), engineer-weeks per cycle, non-project rotation share, and a serial-fraction estimate for coordination overhead.
21
+ Criterion: WHEN any phase or task carries a calendar date, THE PLAN SHALL contain a capacity block whose math covers that date, and IF the capacity block is absent THE PLAN SHALL contain appetites and confidence bands only, with zero calendar dates.
22
+
23
+ R-ROAD-2. PLAN.mdx declares its cadence model by name as an ADR-shaped paragraph: the chosen model, two rejected alternatives with reasons, and a re-evaluation trigger.
24
+ Criterion: WHEN the Phases section is written, THE PLAN SHALL name one cadence model and two rejected alternatives, and IF no trigger for revisiting the cadence is stated THE PLAN SHALL not pass self-audit.
25
+
26
+ R-ROAD-3. Every scheduled item passes the three-label test: a grounded commitment (date, scope, named reason, sign-off), an outcome-framed direction (target outcome plus appetite or confidence band), or a named open question with owner and review date. Bare feature names ("SSO", "dark mode") are banned as roadmap rows.
27
+ Criterion: WHEN an item appears in any phase, THE PLAN SHALL label it as exactly one of commitment, direction, or open question, and IF an item is a bare feature name with no outcome or appetite THE PLAN SHALL rewrite or delete it.
28
+
29
+ R-ROAD-4. Every phase and task anchors to an upstream artifact: a Requirements line (R-x.y), a named architecture component, or a named external constraint. Anchor-less items are speculative.
30
+ Criterion: WHEN a task is emitted, THE PLAN SHALL include a Requirements line or component reference on it, and IF no anchor exists THE PLAN SHALL cut the task or route it to Open Questions.
31
+
32
+ R-ROAD-5. PLAN.mdx sets its precision ceiling from upstream quality: full task decomposition only where requirements and architecture sections are complete; thin upstream caps the schedule at directional themes labeled as such.
33
+ Criterion: IF the requirements or architecture sections are absent or sketch-level, THE PLAN SHALL label its schedule directional, defer commitments, and state which upstream section must mature first.
34
+
35
+ R-ROAD-6. The task queue is topologically sorted over the dependency DAG and cycle-free: no task is scheduled before a task it depends on, and every Depends on line names an earlier GP id or none.
36
+ Criterion: WHEN tasks are ordered into waves, THE PLAN SHALL place every task after all of its dependencies, and IF a dependency cycle exists THE PLAN SHALL split a task to break it rather than emit an unsortable queue.
37
+
38
+ R-ROAD-7. Highest-risk unknowns come first: every hypothesis flagged in the Decisions section gets a validation task (spike, prototype, or measurement) scheduled in the earliest wave that its dependencies allow, before work that assumes the hypothesis.
39
+ Criterion: WHEN the Decisions section flags a hypothesis, THE PLAN SHALL schedule its validation task before any task that depends on the hypothesis holding.
40
+
41
+ R-ROAD-8. Parallelism never exceeds capacity: concurrent tracks per wave stay at or below the executor count from R-ROAD-1; [P] tasks within a wave touch disjoint file sets; an Amdahl note records the serial fraction and any shared-service bottleneck.
42
+ Criterion: WHEN a wave contains multiple tracks, THE PLAN SHALL keep tracks at or below capacity and mark parallel-safe tasks [P] only when their Files lines are disjoint.
43
+
44
+ R-ROAD-9. Items are fitted to appetites using a named prioritization framework (RICE, ICE, WSJF, MoSCoW, Kano, opportunity scoring, or appetite-first); oversized items are shrunk or deferred, never carried at full scope.
45
+ Criterion: WHEN items are ranked within a phase, THE PLAN SHALL name the framework used, and IF an item exceeds its appetite THE PLAN SHALL record the smaller version chosen or the deferral.
46
+
47
+ R-ROAD-10. Every phase carries full anatomy: a concrete name, a binary yes/no completion gate on its Checkpoint line ("improve X" is not a gate), a goal-backward Must-haves block (observable truths, required artifacts, key wiring links), enumerated in-scope items with anchors, a non-empty out-of-scope list with reasons, rabbit holes with smallest-version alternatives, and upstream phase dependencies.
48
+ Criterion: WHEN a phase is written, THE PLAN SHALL include all anatomy fields, and IF the out-of-scope list is empty or the gate is non-binary THE PLAN SHALL revise the phase before emission.
49
+
50
+ R-ROAD-11. The precision gradient holds across phases: the current cycle is fully decomposed into owned tasks with Files, Acceptance, and Verify lines; the next horizon holds directional themes with confidence bands; later horizons hold thematic outcomes only; when R-BIZ-3 lands, each theme and outcome names the register metric it targets. No day-level dates beyond the current cycle. Target dates carry a confidence band, range, or appetite, never a bare single-point date.
51
+ Criterion: WHEN phases beyond the current cycle are written, THE PLAN SHALL express them as themes or outcomes without day-level dates, and IF a later item carries a date or an early item carries only 30 percent confidence THE PLAN SHALL move it one horizon over.
52
+
53
+ R-ROAD-12. If the plan includes a launch, the launch block specifies: the R-LAUNCH-3 mode and tier, a confidence-banded target date, readiness gates each scheduled as a dated task (observability-live, rollback-tested, runbooks-reviewed, support-briefed), pre-launch dependencies, the R-LAUNCH-19 D-7 to D+7 calendar, external commitments, and a slip protocol defaulting to cut-scope with any hold-the-date exception named.
54
+ Criterion: WHEN a launch date appears anywhere in the plan, THE PLAN SHALL contain the full launch block with all readiness gates as tasks, and IF any gate task is missing THE PLAN SHALL remove the date until the gate is scheduled.
55
+
56
+ R-ROAD-13. Launch is gated on hardening: the first launch task depends on the security phase's findings check, and an open Critical finding blocks launch unless the plan records a risk acceptance that is dated, named, justified, and time-bounded. Regulated projects may tighten the gate to High findings.
57
+ Criterion: WHEN launch tasks are scheduled, THE PLAN SHALL make them depend on the hardening checkpoint, and IF a Critical finding is expected to remain open THE PLAN SHALL contain a complete risk-acceptance entry or hold the launch tasks.
58
+
59
+ R-ROAD-14. The task list doubles as the downstream handoff: each build task carries owner (or agent lane), appetite, requirement anchor, component anchor, Depends on, and phase; the deploy phase states cutover cadence and rollback posture; each phase's Must-haves name the SLOs the observability section will watch and, when R-BIZ-3 lands, the register metrics the phase is expected to move.
60
+ Criterion: WHEN the plan is emitted, THE PLAN SHALL let build, deploy, and observe work start from the task list alone without follow-up questions.
61
+
62
+ R-ROAD-15. Phase completion is artifact verification, never self-report: every Must-haves block names files that must exist on disk, every task's Verify line is an exact command whose exit code proves the acceptance, and the final phase is always Verification, running the full check suite and an end-to-end smoke test by its real command.
63
+ Criterion: WHEN a Checkpoint is declared passed, THE PLAN SHALL require the named artifacts to exist non-empty and the Verify commands to exit zero, and THE PLAN SHALL end with a Verification phase naming the real commands.
64
+
65
+ R-ROAD-16. Upstream prerequisites guard every phase: no phase starts before the artifacts of its upstream phases exist and verify; when an upstream section or artifact changes after downstream work began, affected downstream tasks are flagged for re-run with the choice of full cascade, selective re-run, or manual reconciliation recorded.
66
+ Criterion: WHEN a phase begins, THE PLAN SHALL have listed its upstream artifacts as dependencies, and IF an upstream artifact changes THE PLAN SHALL mark dependent unchecked-or-checked tasks for reconciliation instead of silently proceeding.
67
+
68
+ R-ROAD-17. The plan is a complete ledger: every planning domain appears as applicable, deferred with its trigger and reversibility argument, or excluded with an evidence state, a reason, and a revisit when: predicate (silence is not a status); every task failure path is defined (verification fails: box stays unchecked plus a dated note under the task; a retry budget, then human escalation); skipped work carries reasons and imported work carries source paths.
69
+ Criterion: WHEN any domain or task is not executed, THE PLAN SHALL show an explicit deferred, excluded, skipped, or failed record with reason, and IF a Verify command fails THE PLAN SHALL keep the checkbox unchecked and require a note.
70
+
71
+ R-ROAD-18. Governance is written down: a declared review cadence; an authority map stating who may change the current cycle (standing authority), the next horizon (at review, with broadcast), later horizons (with sign-off), and launch dates (escalation only), plus the commercial rows when R-BIZ-4 lands; named re-plan triggers and freeze conditions; per-session updated: bumps in frontmatter; completed phases archived in place, never overwritten.
72
+ Criterion: WHEN the plan is emitted, THE PLAN SHALL state review cadence, authority map, re-plan triggers, and the archive rule, and IF the updated: stamp is older than one cadence cycle at review time THE PLAN SHALL be flagged stale.
73
+
74
+ R-ROAD-19. The plan states its audience; if mixed (customers, partners, public), it schedules a redacted public derivative from day one with a mechanical redaction checklist: no capacity math, no owner names, no rabbit-hole specifics, confidence bands softened, "won't" phrased as "not planned", customer-value framing added.
75
+ Criterion: IF the audience is mixed, THE PLAN SHALL include a task producing the public derivative with the redaction checklist as its acceptance criteria, and THE PLAN SHALL never designate the internal file as the public one.
76
+
77
+ R-ROAD-20. Sign-off and retrospective are scheduled work: stakeholder attestations (product owner, eng lead, design if applicable, exec sponsor for launches, legal if regulated) appear as tasks before commitments harden, and a post-cycle retrospective task closes each cycle.
78
+ Criterion: WHEN a grounded commitment appears, THE PLAN SHALL schedule the sign-off attestation before it, and WHEN a cycle ends THE PLAN SHALL contain its retrospective task.
79
+
80
+ R-ROAD-21. If `public_release: true`, exactly one prepublication gate task cites this requirement. It follows and depends on the latest hardening task citing R-SEC-26, and the first public activation task citing R-LAUNCH-22 follows it immediately and depends on it. The gate records `checked_at`, a matching `hardening_revision` content hash or immutable revision, `finding_counts`, policy, and verdict; every permitted Critical risk carries owner, justification, accepted_at, and expires_at. A later hardening change invalidates the pass. Projects with `public_release: false` state the absence of a public surface and do not receive this gate.
81
+ Criterion: WHEN public activation is scheduled THE PLAN SHALL use distinct R-SEC-26, R-ROAD-21, and R-LAUNCH-22 task markers for hardening evidence, the prepublication gate, and first activation; SHALL place and link them in that order with no task between the last two; and SHALL block if the gate timestamp is not later than hardening, its revision does not match disk, a Critical is unresolved without a complete unexpired acceptance, or hardening changed after the check.
82
+
83
+ ## Task seeds
84
+
85
+ - [ ] GP-xxx [W1.1] Validate riskiest hypothesis H-1 with a timeboxed spike
86
+ - Files: spikes/h1-riskiest-assumption/README.md
87
+ - Acceptance: README states the hypothesis, the method, and a line matching "Verdict: confirmed" or "Verdict: refuted"; Decisions section of PLAN.mdx updated with the outcome
88
+ - Verify: grep -E '^Verdict: (confirmed|refuted)$' spikes/h1-riskiest-assumption/README.md
89
+ - Requirements: R-ROAD-7
90
+
91
+ - [ ] GP-xxx Phase 1 checkpoint: verify must-haves on disk
92
+ - Files: none (verification only)
93
+ - Acceptance: every Phase 1 task checkbox is [x]; every artifact named in the phase Must-haves block exists non-empty
94
+ - Verify: ! grep -q '^- \[ \] GP-xxx' .godplans/PLAN.mdx && test -s src/app/entry-point
95
+ - Requirements: R-ROAD-10, R-ROAD-15
96
+
97
+ - [ ] GP-xxx Launch gate: confirm the rollback drill is dated inside the launch window
98
+ - Files: none (verification only)
99
+ - Acceptance: the deploy rollback doc (R-DEPLOY-16, R-DEPLOY-17) records the exact revert command and a drill date within the launch window (when deploy is deferred, the gate reads the R-PRD-17 rollback statement instead)
100
+ - Verify: grep -E '^Last drilled: 20[0-9]{2}-[0-9]{2}-[0-9]{2}$' docs/deploy/rollback.md
101
+ - Requirements: R-ROAD-12
102
+
103
+ - [ ] GP-xxx Fresh prepublication check against current hardening evidence
104
+ - Files: docs/release/PREPUBLICATION.md
105
+ - Depends on: GP-HARDENING
106
+ - Acceptance: records checked_at later than hardening, hardening_revision matching current content, finding_counts, policy, and verdict; validates owner, justification, accepted_at, and expires_at for every permitted Critical risk; states that any later hardening change invalidates the pass
107
+ - Verify: test "$(git hash-object docs/security/HARDENING.md)" = "$(awk '/^hardening_revision:/ {print $2}' docs/release/PREPUBLICATION.md)" && test "$(awk '/^verdict:/ {print $2}' docs/release/PREPUBLICATION.md)" = pass
108
+ - Requirements: R-ROAD-13, R-ROAD-21
109
+
110
+ - [ ] GP-xxx Produce redacted public roadmap derivative
111
+ - Files: docs/ROADMAP-PUBLIC.md
112
+ - Acceptance: file contains no capacity numbers, no owner names, no rabbit-hole notes; contains "Not planned" section; internal file is not referenced
113
+ - Verify: test -s docs/ROADMAP-PUBLIC.md && ! grep -qi 'engineer-weeks' docs/ROADMAP-PUBLIC.md
114
+ - Requirements: R-ROAD-19
115
+
116
+ - [ ] GP-xxx Verification phase: full check suite plus e2e smoke
117
+ - Files: none (runs checks)
118
+ - Acceptance: lint, typecheck, unit tests, and the end-to-end smoke command all exit zero; results noted in Session log
119
+ - Verify: npm run lint && npm run typecheck && npm test && npm run e2e:smoke
120
+ - Requirements: R-ROAD-15
121
+
122
+ - [ ] GP-xxx Cycle retrospective and plan refresh
123
+ - Files: docs/retrospectives/cycle-01.md
124
+ - Acceptance: retro records what shipped versus planned, appetite overruns and the cut-scope decisions taken, and one sequencing change for the next cycle; PLAN.mdx updated: stamp bumped
125
+ - Verify: test -s docs/retrospectives/cycle-01.md && grep -q 'updated:' .godplans/PLAN.mdx
126
+ - Requirements: R-ROAD-18, R-ROAD-20
127
+
128
+ ## Self-audit rubric
129
+
130
+ | Dimension | Points | Full marks require |
131
+ | --- | --- | --- |
132
+ | Grounding and classification | 15 | Every scheduled item passes the three-label test and carries a requirement, component, or external anchor; zero bare feature names |
133
+ | Capacity and cadence honesty | 15 | Capacity block with real numbers; cadence ADR with two rejected alternatives and a re-evaluation trigger; no date outside the capacity math |
134
+ | Sequencing correctness | 20 | Task queue topologically sorted and cycle-free; hypothesis validations in the earliest legal wave; [P] tasks file-disjoint; tracks within capacity; Amdahl note present |
135
+ | Phase anatomy and gates | 15 | Every phase has a binary Checkpoint, Must-haves block, anchored in-scope list, non-empty out-of-scope with reasons, rabbit holes, and dependencies |
136
+ | Precision gradient and ceiling | 10 | Current cycle fully decomposed; later horizons decay to themes then outcomes; ceiling matches upstream section quality; no day-level dates beyond cycle one |
137
+ | Launch and hardening gates | 10 | Public release has a fresh revision-bound prepublication task after hardening with complete risk-acceptance checks; non-public work records the exemption; launch block otherwise has its D-calendar and slip protocol |
138
+ | Executor handoff | 10 | An agent can start from the first unchecked task with no questions; every Verify line is an exact runnable command; final phase is Verification naming the real e2e command |
139
+ | Governance and freshness | 5 | Review cadence, authority map, re-plan triggers, freeze conditions, archive rule, and audience declared with the public-derivative decision |
140
+
141
+ ## Anti-patterns refused
142
+
143
+ - Fictional precision: day-level dates beyond the current cycle or bare single-point dates. Refusal: replace with a confidence band or appetite and move the item out one horizon.
144
+ - Dates without capacity: calendar commitments while the capacity block is empty. Refusal: strip the dates, emit appetites, and add capacity to Open Questions with a default.
145
+ - Fictional parallelism: more concurrent tracks than executors, or [P] tasks sharing files. Refusal: repack waves to the capacity ceiling and serialize the overlap.
146
+ - Quarter-stuffing: every horizon filled to identical density and precision. Refusal: decompose only the current cycle; later phases decay to themes, then outcomes.
147
+ - Speculative items: rows with no requirement, component, or external anchor. Refusal: cut the row or route it back to the product section as an open question.
148
+ - Feature-factory rows: bare feature names with no outcome, appetite, or commitment label. Refusal: rewrite under the three-label test or delete.
149
+ - Dependency cycles: A depends on B depends on A anywhere in the task queue. Refusal: split a task to break the cycle; never emit an unsortable queue.
150
+ - Paper launch gate: a launch date with no observability-live, rollback-tested, or runbooks-reviewed tasks behind it. Refusal: schedule the gate tasks or remove the date.
151
+ - Stale prepublication pass: public activation trusts a check that predates or does not match current hardening evidence. Refusal: invalidate the pass and rerun the revision-bound gate immediately before activation.
152
+ - Ghost handoff: a phase scheduled before its upstream artifacts exist and verify. Refusal: add the upstream dependency line and a verification task ahead of the phase.
153
+ - Rubber-stamp done: a checkbox flipped without its Verify command run. Refusal: the executor rules bind check-off to a zero exit code in the same edit as the updated: bump.
154
+ - Phantom resume: a session acting on chat memory instead of the plan file. Refusal: executor rules require re-reading frontmatter and the first unchecked task before acting.
155
+ - Happy-path ledger: no policy for failed, skipped, or re-run work. Refusal: retry budgets, skip reasons, and the unchecked-box-plus-note convention are mandatory plan content.
156
+ - Shelf roadmap: no review cadence and no freshness stamps. Refusal: review cadence, updated: bumps, and re-plan triggers ship in the plan or the rubric fails it.
157
+ - Polish-indefinitely: extending past an appetite with no explicit decision. Refusal: the slip protocol defaults to cut-scope; any extension requires a named sign-off.
158
+ - Perpetual-now: the entire plan decomposed into the current phase with nothing beyond it, or its inverse, an all-Later plan with no executable first wave. Refusal: enforce the precision gradient in both directions before emission.