@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.
- package/CHANGELOG.md +1202 -0
- package/LICENSE +21 -0
- package/PROMPT.md +4006 -0
- package/README.md +245 -2
- package/bin/godplans.js +93 -0
- package/docs/ARCHITECTURE.md +136 -0
- package/docs/RELEASING.md +107 -0
- package/docs/assets/badge-approved.svg +12 -0
- package/docs/assets/badge-done.svg +11 -0
- package/docs/assets/badge-graded.svg +12 -0
- package/docs/assets/badge-validated.svg +10 -0
- package/docs/assets/hero.svg +37 -0
- package/docs/assets/quest-map.svg +53 -0
- package/evals/README.md +295 -0
- package/evals/cases/brownfield-cli/EXPECTATIONS +15 -0
- package/evals/cases/brownfield-cli/INPUT/package.json +9 -0
- package/evals/cases/brownfield-cli/INPUT/src/cli.js +4 -0
- package/evals/cases/brownfield-cli/INPUT/src/format.js +3 -0
- package/evals/cases/brownfield-cli/INPUT/test/cli.test.js +7 -0
- package/evals/cases/brownfield-cli/REQUEST.baseline.md +10 -0
- package/evals/cases/brownfield-cli/REQUEST.md +10 -0
- package/evals/cases/compliance-refusal/EXPECTATIONS +4 -0
- package/evals/cases/compliance-refusal/REQUEST.baseline.md +9 -0
- package/evals/cases/compliance-refusal/REQUEST.md +8 -0
- package/evals/cases/greenfield-saas/EXPECTATIONS +21 -0
- package/evals/cases/greenfield-saas/REQUEST.baseline.md +11 -0
- package/evals/cases/greenfield-saas/REQUEST.md +11 -0
- package/evals/cases/nested-pillars/EXPECTATIONS +12 -0
- package/evals/cases/nested-pillars/REQUEST.baseline.md +10 -0
- package/evals/cases/nested-pillars/REQUEST.md +11 -0
- package/evals/cases/observability-evidence/EXPECTATIONS +10 -0
- package/evals/cases/observability-evidence/REQUEST.baseline.md +10 -0
- package/evals/cases/observability-evidence/REQUEST.md +11 -0
- package/evals/cases/product-business/EXPECTATIONS +18 -0
- package/evals/cases/product-business/REQUEST.baseline.md +13 -0
- package/evals/cases/product-business/REQUEST.md +14 -0
- package/evals/cases/product-form-routing/EXPECTATIONS +13 -0
- package/evals/cases/product-form-routing/REQUEST.baseline.md +11 -0
- package/evals/cases/product-form-routing/REQUEST.md +11 -0
- package/evals/cases/prose-integrity/EXPECTATIONS +19 -0
- package/evals/cases/prose-integrity/REQUEST.baseline.md +19 -0
- package/evals/cases/prose-integrity/REQUEST.md +20 -0
- package/evals/cases/replan-preserves-history/EXPECTATIONS +9 -0
- package/evals/cases/replan-preserves-history/INPUT/.godplans/PLAN.mdx +115 -0
- package/evals/cases/replan-preserves-history/INPUT/package.json +5 -0
- package/evals/cases/replan-preserves-history/REQUEST.baseline.md +10 -0
- package/evals/cases/replan-preserves-history/REQUEST.md +10 -0
- package/evals/cases/stale-prepublication/EXPECTATIONS +10 -0
- package/evals/cases/stale-prepublication/REQUEST.baseline.md +12 -0
- package/evals/cases/stale-prepublication/REQUEST.md +13 -0
- package/evals/cases/stale-source-evidence/EXPECTATIONS +10 -0
- package/evals/cases/stale-source-evidence/INPUT/package.json +8 -0
- package/evals/cases/stale-source-evidence/REQUEST.baseline.md +11 -0
- package/evals/cases/stale-source-evidence/REQUEST.md +12 -0
- package/evals/cases/weekend-library/EXPECTATIONS +19 -0
- package/evals/cases/weekend-library/REQUEST.baseline.md +10 -0
- package/evals/cases/weekend-library/REQUEST.md +11 -0
- package/evals/cases-roster.txt +19 -0
- package/evals/external/GRADE.schema.json +39 -0
- package/evals/external/README.md +42 -0
- package/evals/external/RUBRIC.md +32 -0
- package/evals/metrics/context-cost.json +154 -0
- package/evals/outcomes/README.md +65 -0
- package/evals/outcomes/cases/tenant-notes-api/REQUEST.baseline.md +14 -0
- package/evals/outcomes/cases/tenant-notes-api/REQUEST.md +13 -0
- package/evals/outcomes/cases/tenant-notes-api/VERIFY.sh +13 -0
- package/evals/outcomes/results/2026-07-23-tenant-notes-api-codex/README.md +93 -0
- package/evals/outcomes/results/2026-07-23-tenant-notes-api-codex/treatment/plan/PLAN.json +547 -0
- package/evals/runners/claude-baseline.sh +4 -0
- package/evals/runners/claude-grade.sh +3 -0
- package/evals/runners/claude.sh +4 -0
- package/evals/runners/codex-baseline.sh +181 -0
- package/evals/runners/codex-builder.sh +96 -0
- package/evals/runners/codex-godaudits.sh +84 -0
- package/evals/runners/codex.sh +147 -0
- package/evals/runners/gemini-baseline.sh +4 -0
- package/evals/runners/gemini-grade.sh +3 -0
- package/evals/runners/gemini.sh +4 -0
- package/evals/runners/vendor-cli.sh +257 -0
- package/evals/runners/vendor-grade.sh +82 -0
- package/install.sh +323 -0
- package/package.json +91 -4
- package/requirements/skills-ref.txt +2 -0
- package/scripts/build-catalog.js +114 -0
- package/scripts/build-prompt.sh +257 -0
- package/scripts/context-metrics.js +118 -0
- package/scripts/eval-external.js +226 -0
- package/scripts/eval-matrix.sh +172 -0
- package/scripts/eval-outcome.js +143 -0
- package/scripts/eval.sh +321 -0
- package/scripts/lint-parity.js +331 -0
- package/scripts/lint.sh +743 -0
- package/scripts/outcome-summary.js +126 -0
- package/scripts/release-check.sh +108 -0
- package/scripts/release-prepare.js +41 -0
- package/scripts/summarize-eval.js +91 -0
- package/scripts/summarize-matrix.js +101 -0
- package/scripts/version-sync.js +65 -0
- package/skills/godplans/SKILL.md +192 -0
- package/skills/godplans/references/agent-memory.md +168 -0
- package/skills/godplans/references/architecture.md +189 -0
- package/skills/godplans/references/build.md +130 -0
- package/skills/godplans/references/business.md +252 -0
- package/skills/godplans/references/code-quality.md +165 -0
- package/skills/godplans/references/compliance.md +59 -0
- package/skills/godplans/references/database.md +157 -0
- package/skills/godplans/references/deploy.md +146 -0
- package/skills/godplans/references/discovery.md +297 -0
- package/skills/godplans/references/doc-set.md +243 -0
- package/skills/godplans/references/exemplar.md +228 -0
- package/skills/godplans/references/launch.md +162 -0
- package/skills/godplans/references/llm.md +132 -0
- package/skills/godplans/references/observe.md +178 -0
- package/skills/godplans/references/plan-format.md +340 -0
- package/skills/godplans/references/product.md +130 -0
- package/skills/godplans/references/repo.md +184 -0
- package/skills/godplans/references/roadmap.md +158 -0
- package/skills/godplans/references/security.md +156 -0
- package/skills/godplans/references/seo.md +133 -0
- package/skills/godplans/references/stack.md +133 -0
- package/skills/godplans/references/style-genome.md +198 -0
- package/skills/godplans/references/ui.md +153 -0
- package/skills/godplans/references/ux.md +150 -0
- package/skills/godplans/schemas/PLAN.schema.json +275 -0
- package/skills/godplans/schemas/PLAN.v1.schema.json +258 -0
- package/skills/godplans/scripts/plan-halflife.sh +76 -0
- package/skills/godplans/scripts/style-stats.py +630 -0
- package/skills/godplans/scripts/validate-plan.sh +1709 -0
- package/skills/godplans/templates/PLAN.template.mdx +269 -0
- package/tests/agent-memory-guidance.sh +32 -0
- package/tests/build-catalog.sh +81 -0
- package/tests/codex-runner.sh +139 -0
- package/tests/eval-harness.sh +377 -0
- package/tests/evidence-harnesses.sh +243 -0
- package/tests/fixtures/plan-json-v1-1.13.0.json +472 -0
- package/tests/install-regression.sh +246 -0
- package/tests/lib/plan-schema-check.js +163 -0
- package/tests/lint-selftest.sh +582 -0
- package/tests/package-contents.sh +143 -0
- package/tests/portable-prompt.test.sh +261 -0
- package/tests/release-tooling.sh +204 -0
- package/tests/run.sh +14 -0
- package/tests/script-usage.sh +37 -0
- package/tests/style-stats.sh +170 -0
- package/tests/validate-plan.sh +1970 -0
- package/tests/vendor-runner.sh +291 -0
package/README.md
CHANGED
|
@@ -1,3 +1,246 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/hero.svg" alt="godplans. Plan everything before anything. Orient, ask, decide, invert, grade, then the plan gate." width="100%">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@hxp-tools/godplans)
|
|
6
|
+
[](https://github.com/hannsxpeter/godplans/actions/workflows/lint.yml)
|
|
7
|
+
[](CHANGELOG.md)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
godplans turns the start of a software project into a quest with rules. The
|
|
11
|
+
model does the planning. godplans adds what a model will not do on its own: ask
|
|
12
|
+
only the questions that are expensive to get wrong, force a decision in all
|
|
13
|
+
nineteen planning domains, turn the checks an auditor would run at the end into
|
|
14
|
+
acceptance criteria at the start, grade the draft with an independent critic,
|
|
15
|
+
and lock the result behind a validator and your sign-off. Nothing gets built
|
|
16
|
+
from a plan you have not approved.
|
|
17
|
+
|
|
18
|
+
It is one skill and one command. The output is one file,
|
|
19
|
+
`.godplans/PLAN.mdx`, that any coding agent executes checkbox by checkbox.
|
|
20
|
+
|
|
21
|
+
## Press start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @hxp-tools/godplans
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
That installs the skill for every coding tool it finds. Use `--project` to
|
|
28
|
+
install into the current project instead of your home directory,
|
|
29
|
+
`--tools claude,codex` to pick hosts, and `--uninstall` to remove exactly what
|
|
30
|
+
it installed.
|
|
31
|
+
|
|
32
|
+
Then, in any project folder, describe what you want to build:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
/godplans I want to build a shared expense tracker for roommates
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
In Codex the command is `$godplans`; in Windsurf it is `@godplans`.
|
|
39
|
+
|
|
40
|
+
Claude Code can also install it as a plugin (the command is namespaced, for
|
|
41
|
+
example `/godplans:godplans`):
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
/plugin marketplace add hannsxpeter/godplans
|
|
45
|
+
/plugin install godplans@godplans
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Pick one install method per host. `npx skills add hannsxpeter/godplans` and a
|
|
49
|
+
git clone with `sh install.sh` still work.
|
|
50
|
+
|
|
51
|
+
## The quest map
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/quest-map.svg" alt="Quest map: orient, ask, decide, invert, grade, then the plan gate as the final boss." width="100%">
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
| Stage | What happens |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| Orient | Greenfield, brownfield, or replan. In an existing repo it reads the stack, structure, and style first, and the plan cites real files. |
|
|
60
|
+
| Ask | One batch of three to five questions, only about decisions that are painful to reverse. Each ships with a recommended answer, so `defaults` is a complete reply. |
|
|
61
|
+
| Decide | Every one of the nineteen domains is planned now, deferred behind a named trigger, or excluded with a reason. |
|
|
62
|
+
| Invert | Checks an auditor would run after the build become acceptance criteria on specific tasks before it. |
|
|
63
|
+
| Grade | An independent critic scores every applicable domain. Anything under 85 out of 100 is revised and rescored. |
|
|
64
|
+
| Gate | The validator has to pass and you have to approve. Until then, agents refuse to build. |
|
|
65
|
+
|
|
66
|
+
Before any of it, the idea is screened against the
|
|
67
|
+
[Anthropic Usage Policy](https://www.anthropic.com/legal/aup). Prohibited
|
|
68
|
+
purposes are refused by name, and legitimate projects with risky parts get
|
|
69
|
+
mandatory guardrail tasks.
|
|
70
|
+
|
|
71
|
+
## Three ways in
|
|
72
|
+
|
|
73
|
+
| Mode | When | What you get |
|
|
74
|
+
| --- | --- | --- |
|
|
75
|
+
| Greenfield | A brand new idea | The full plan from one sentence |
|
|
76
|
+
| Brownfield | An existing codebase | A plan that extends what is there and cites real files |
|
|
77
|
+
| Replan | Reality moved | Completed work kept, new work under new IDs, dead tasks struck through with the reason |
|
|
78
|
+
|
|
79
|
+
There are no sub-commands. The mode comes from what is on disk.
|
|
80
|
+
|
|
81
|
+
## Achievements
|
|
82
|
+
|
|
83
|
+
An achievement is a state your plan reaches, earned in order. None of them can
|
|
84
|
+
be claimed by editing a checkbox.
|
|
85
|
+
|
|
86
|
+
<p align="center">
|
|
87
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/badge-graded.svg" alt="Achievement: Graded. Every applicable domain scored 85 or higher." width="240">
|
|
88
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/badge-validated.svg" alt="Achievement: Validated. The plan validator passed on this exact plan." width="240">
|
|
89
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/badge-approved.svg" alt="Achievement: Approved. You signed off on the plan, so agents may build." width="240">
|
|
90
|
+
<img src="https://raw.githubusercontent.com/hannsxpeter/godplans/main/docs/assets/badge-done.svg" alt="Achievement: Done. The final verification phase passed." width="240">
|
|
91
|
+
</p>
|
|
92
|
+
|
|
93
|
+
| Achievement | Earned by |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| Graded | The critic scores every applicable domain 85 or higher and prints the scorecard |
|
|
96
|
+
| Validated | `validate-plan.sh` passes on the plan as written |
|
|
97
|
+
| Approved | You set `status: approved` after reading the plan |
|
|
98
|
+
| Done | The mandatory final verification phase passes |
|
|
99
|
+
|
|
100
|
+
Validated and Done are backed by executed commands. Graded is the critic's
|
|
101
|
+
scorecard, and Approved is your decision; see [Limits](#limits).
|
|
102
|
+
|
|
103
|
+
## The final boss: the plan gate
|
|
104
|
+
|
|
105
|
+
The plan has a lifecycle, and the validator enforces it:
|
|
106
|
+
`planning -> approved -> executing -> done`.
|
|
107
|
+
|
|
108
|
+
| Status | What it allows |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| `planning` | Drafting and review. Agents refuse to build. |
|
|
111
|
+
| `approved` | You signed off. The first task moves it to `executing`. |
|
|
112
|
+
| `executing` | Agents clear tasks; each one proves itself with its own verify command. |
|
|
113
|
+
| `done` | Only a passing final verification phase sets it. Nothing marks itself complete. |
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# check a draft before you approve it
|
|
117
|
+
bash .godplans/validate-plan.sh --allow-planning .godplans/PLAN.mdx
|
|
118
|
+
|
|
119
|
+
# the execution gate, after approval
|
|
120
|
+
bash .godplans/validate-plan.sh .godplans/PLAN.mdx
|
|
121
|
+
|
|
122
|
+
# reprove a finished phase before the next one starts
|
|
123
|
+
bash .godplans/validate-plan.sh --drift-check 1 .godplans/PLAN.mdx
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The drift check reruns a sample of completed verify commands and the phase
|
|
127
|
+
checkpoint. Any failure sends the plan back to `planning`.
|
|
128
|
+
|
|
129
|
+
## Your save file
|
|
130
|
+
|
|
131
|
+
Everything lives in `.godplans/`, which you commit with your code:
|
|
132
|
+
|
|
133
|
+
- `PLAN.mdx`: the plan. Objective and non-goals, decisions with the
|
|
134
|
+
alternatives that were rejected, numbered requirements, architecture
|
|
135
|
+
diagrams, phases of checkbox tasks, and exactly one Open Questions section.
|
|
136
|
+
- `PLAN.json`: a typed sidecar generated from the MDX, for tools that should
|
|
137
|
+
not parse markdown.
|
|
138
|
+
- `validate-plan.sh`: a self-contained copy of the validator, so the agent
|
|
139
|
+
that builds the plan does not need godplans installed.
|
|
140
|
+
|
|
141
|
+
Every task names its files, dependencies, acceptance criteria, one verify
|
|
142
|
+
command, and the requirements it serves:
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
- [ ] GP-203 [W2.1] Add workspace scoping to the expenses table
|
|
146
|
+
- Files: db/migrations/003_expenses_workspace.sql, src/db/expenses.ts
|
|
147
|
+
- Depends on: GP-104
|
|
148
|
+
- Reuses: the workspace helper already in src/db/tenancy.ts
|
|
149
|
+
- Acceptance: every expenses query filters on workspace_id
|
|
150
|
+
- Verify: `npm run test:tenancy`
|
|
151
|
+
- Requirements: R-2.3, R-SEC-4
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Close the laptop mid-build, come back in three weeks, switch tools: work
|
|
155
|
+
resumes by reading the file, not the chat.
|
|
156
|
+
|
|
157
|
+
<details>
|
|
158
|
+
<summary>The nineteen domains</summary>
|
|
159
|
+
|
|
160
|
+
| Domain | Question it settles |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| Product | What to build and for whom? |
|
|
163
|
+
| Business | Who pays, for what, and how is success measured? |
|
|
164
|
+
| Architecture | How do the pieces fit under load? |
|
|
165
|
+
| Stack | On what technology? |
|
|
166
|
+
| Database | How is data modeled, indexed, and protected? |
|
|
167
|
+
| Security | How is it kept from being broken into or abused? |
|
|
168
|
+
| AI integration | Are model calls safe, costed, and evaluated? |
|
|
169
|
+
| UX | Do the real journeys work end to end? |
|
|
170
|
+
| UI | Is the interface accessible and finished? |
|
|
171
|
+
| Search visibility | Can search and answer engines find it? |
|
|
172
|
+
| Code quality | Is it readable, tested, and safe to change? |
|
|
173
|
+
| Style genome | Does new code match the neighborhood? |
|
|
174
|
+
| Agent memory | Do the instruction files coding agents read actually load? |
|
|
175
|
+
| Repository | Is the project set up for others? |
|
|
176
|
+
| Build | Is anything stubbed or faked? |
|
|
177
|
+
| Roadmap | Is the sequence coherent and honest? |
|
|
178
|
+
| Deploy | Can it ship and roll back? |
|
|
179
|
+
| Observe | Would you know when it breaks? |
|
|
180
|
+
| Launch | Is it ready for the public? |
|
|
181
|
+
|
|
182
|
+
A command-line tool excludes search visibility with a reason instead of
|
|
183
|
+
getting a hollow section about it.
|
|
184
|
+
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
## Works with your tools
|
|
188
|
+
|
|
189
|
+
| Tool | Invoke |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| Claude Code, Cursor, VS Code and Copilot, Factory | `/godplans` |
|
|
192
|
+
| Codex CLI | `$godplans` |
|
|
193
|
+
| Windsurf | `@godplans` |
|
|
194
|
+
| Gemini CLI, OpenCode, Amp, Cline, Zed | picked up from the shared skill paths |
|
|
195
|
+
| Any chat UI, Aider, T3 Chat | paste [PROMPT.md](PROMPT.md) |
|
|
196
|
+
|
|
197
|
+
## Limits
|
|
198
|
+
|
|
199
|
+
- Graded is an attestation: the critic's scorecard is printed in chat, and the
|
|
200
|
+
validator does not re-run it. Validated and Done are backed by executed
|
|
201
|
+
commands.
|
|
202
|
+
- "Audit-aware" means fewer preventable findings, not audit-clean. Planning
|
|
203
|
+
cannot prove runtime behavior and does not replace tests, a security review,
|
|
204
|
+
or an independent audit.
|
|
205
|
+
- godplans plans. It does not build. Any coding agent executes the plan.
|
|
206
|
+
- Planning this thoroughly costs tokens; see the numbers below.
|
|
207
|
+
|
|
208
|
+
## Honest status
|
|
209
|
+
|
|
210
|
+
One published head-to-head, on godplans 1.9.0 with gpt-5.6-sol on the Codex
|
|
211
|
+
CLI (2026-07-23). The same builder built the same multi-tenant notes API twice,
|
|
212
|
+
once from a godplans plan and once from the plain request. Both passed the same
|
|
213
|
+
functional tests. A blind auditor then scored both repositories:
|
|
214
|
+
|
|
215
|
+
| | Critical findings | High findings |
|
|
216
|
+
| --- | --- | --- |
|
|
217
|
+
| Built from a godplans plan | 0 | 1 |
|
|
218
|
+
| Built without one | 1 | 4 |
|
|
219
|
+
|
|
220
|
+
Planning used 11,236,025 cumulative tokens against 162,816 for the control.
|
|
221
|
+
That is one case on one model, and no later version has been re-measured. The
|
|
222
|
+
[method, limits, and raw artifacts](evals/outcomes/results/2026-07-23-tenant-notes-api-codex/README.md)
|
|
223
|
+
are published in full. If you run the harness, share the numbers, especially
|
|
224
|
+
the ones that make godplans look bad.
|
|
225
|
+
|
|
226
|
+
## The family
|
|
227
|
+
|
|
228
|
+
godplans is part of [`@hxp-tools`](https://www.npmjs.com/org/hxp-tools):
|
|
229
|
+
|
|
230
|
+
- [godpowers](https://github.com/hannsxpeter/godpowers): project memory on disk
|
|
231
|
+
and no "done" without evidence. Executes plans.
|
|
232
|
+
- [goddesign](https://github.com/hannsxpeter/goddesigns): draw one card, lock
|
|
233
|
+
it, clear the gate. Designs pages.
|
|
234
|
+
- [godaudits](https://github.com/hannsxpeter/godaudits): evidence-first audits
|
|
235
|
+
after the build. Plan requirement `R-SEC-3` pairs with audit check `A-SEC-3`.
|
|
236
|
+
|
|
237
|
+
## More
|
|
238
|
+
|
|
239
|
+
- [Architecture](docs/ARCHITECTURE.md)
|
|
240
|
+
- [Releasing](docs/RELEASING.md)
|
|
241
|
+
- [Maintaining](MAINTAINING.md)
|
|
242
|
+
- [Contributing](CONTRIBUTING.md)
|
|
243
|
+
- [Security](SECURITY.md)
|
|
244
|
+
- [Changelog](CHANGELOG.md)
|
|
245
|
+
|
|
246
|
+
MIT licensed.
|
package/bin/godplans.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// Installs the godplans skill into supported coding-agent skill directories.
|
|
5
|
+
// Thin Node wrapper around install.sh so `npx @hxp-tools/godplans` works.
|
|
6
|
+
|
|
7
|
+
const { spawnSync } = require('child_process');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
const INSTALLER = path.join(ROOT, 'install.sh');
|
|
13
|
+
const PKG = require('../package.json');
|
|
14
|
+
|
|
15
|
+
const COLORS = {
|
|
16
|
+
reset: '\x1b[0m',
|
|
17
|
+
bold: '\x1b[1m',
|
|
18
|
+
dim: '\x1b[2m',
|
|
19
|
+
cyan: '\x1b[36m',
|
|
20
|
+
green: '\x1b[32m',
|
|
21
|
+
red: '\x1b[31m',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function c(color, text) {
|
|
25
|
+
return COLORS[color] + text + COLORS.reset;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function usage() {
|
|
29
|
+
console.log(`
|
|
30
|
+
${c('bold', 'godplans')} ${c('dim', 'v' + PKG.version)}
|
|
31
|
+
Plan everything before anything.
|
|
32
|
+
|
|
33
|
+
${c('bold', 'Usage')}
|
|
34
|
+
npx @hxp-tools/godplans@latest
|
|
35
|
+
npx @hxp-tools/godplans@latest --project
|
|
36
|
+
npx @hxp-tools/godplans@latest --tools claude,codex
|
|
37
|
+
npx @hxp-tools/godplans@latest --uninstall
|
|
38
|
+
npx @hxp-tools/godplans@latest --help
|
|
39
|
+
|
|
40
|
+
${c('bold', 'After install')}
|
|
41
|
+
Restart your coding agent, then run:
|
|
42
|
+
/godplans I want to build ...
|
|
43
|
+
|
|
44
|
+
${c('bold', 'Requirements')}
|
|
45
|
+
A POSIX host with sh. Windows is not supported by the installer.
|
|
46
|
+
`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function main(argv) {
|
|
50
|
+
const args = argv.slice(2);
|
|
51
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
52
|
+
usage();
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
56
|
+
console.log(PKG.version);
|
|
57
|
+
return 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (process.platform === 'win32') {
|
|
61
|
+
console.error(c('red', 'godplans installer does not support Windows.'));
|
|
62
|
+
console.error('Clone the repository on a POSIX host and run sh install.sh --copy.');
|
|
63
|
+
return 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (!fs.existsSync(INSTALLER)) {
|
|
67
|
+
console.error(c('red', 'install.sh missing from package.'));
|
|
68
|
+
return 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
console.log(c('cyan', 'godplans') + ' ' + c('dim', 'v' + PKG.version));
|
|
72
|
+
console.log(c('dim', 'Installing the skill...'));
|
|
73
|
+
console.log('');
|
|
74
|
+
|
|
75
|
+
const result = spawnSync('sh', [INSTALLER].concat(args), {
|
|
76
|
+
cwd: ROOT,
|
|
77
|
+
stdio: 'inherit',
|
|
78
|
+
env: process.env,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
if (result.error) {
|
|
82
|
+
console.error(c('red', String(result.error.message || result.error)));
|
|
83
|
+
return 1;
|
|
84
|
+
}
|
|
85
|
+
if (result.status === 0) {
|
|
86
|
+
console.log('');
|
|
87
|
+
console.log(c('green', 'Next: restart your agent, then run /godplans with your idea.'));
|
|
88
|
+
console.log(c('dim', 'Docs: ' + (PKG.homepage || 'https://github.com/hannsxpeter/godplans')));
|
|
89
|
+
}
|
|
90
|
+
return result.status == null ? 1 : result.status;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
process.exitCode = main(process.argv);
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
How godplans is put together: which files are sources, which are generated from them, and which check fails when a generated file falls behind its source. For maintainer rituals (the version model, adding a domain module, the prompt budget, dated facts), see [MAINTAINING.md](../MAINTAINING.md). For the release checklist, see [RELEASING.md](RELEASING.md).
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
1. The shape of the product
|
|
8
|
+
2. The pieces
|
|
9
|
+
3. How a planning run uses them
|
|
10
|
+
4. The validator and its embedded catalogs
|
|
11
|
+
5. Two ways to ship the same skill
|
|
12
|
+
6. Derived artifacts and the checks that catch staleness
|
|
13
|
+
7. Evaluation layers
|
|
14
|
+
8. The platform contract
|
|
15
|
+
|
|
16
|
+
## 1. The shape of the product
|
|
17
|
+
|
|
18
|
+
godplans ships instructions, not an application. An agent reads an orchestrator and reference modules, fills a template, and runs a few scripts. One script carries most of the weight: the validator. It is copied beside every plan, and it must keep working after the plan leaves the skill behind, with no access to the installed skill, on stock macOS and Linux.
|
|
19
|
+
|
|
20
|
+
The rest of the repository does one of two jobs. Generators build derived views of the sources: the portable prompt, the context metrics, and the catalogs embedded in the validator. Checks confirm that those views, and the lists maintainers keep by hand, still agree with their sources.
|
|
21
|
+
|
|
22
|
+
## 2. The pieces
|
|
23
|
+
|
|
24
|
+
| Piece | Where | Loaded or run | What it does |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| Orchestrator | `skills/godplans/SKILL.md` | loaded when the skill activates | ground rules, the nine-phase method, the greenfield, brownfield, and replan modes, refusals, and the file map |
|
|
27
|
+
| Domain modules (19) | `skills/godplans/references/<domain>.md` | read at that domain's Phase 4 pass, and only when the applicability matrix marks the domain applicable | six sections each: Lineage, Decisions to force, Plan requirements (`R-<PREFIX>-N`), Task seeds, Self-audit rubric, Anti-patterns refused |
|
|
28
|
+
| Contract modules (5) | `references/plan-format.md`, `discovery.md`, `compliance.md`, `exemplar.md`, `doc-set.md` | read at the phase that names them | the PLAN.mdx contract, intake and the applicability matrix, the usage-policy gate, the quality bar and prose-integrity gate, and the documentation-set catalog; exempt from the six-section contract |
|
|
29
|
+
| PLAN template | `skills/godplans/templates/PLAN.template.mdx` | read in Phase 7 | the PLAN.mdx skeleton, including one applicability-matrix row per domain |
|
|
30
|
+
| Validator | `skills/godplans/scripts/validate-plan.sh` | copied to `.godplans/validate-plan.sh` in Phase 1, re-copied and run in Phase 7, then run by executors | the structural and execution gate; emits the PLAN.json sidecar |
|
|
31
|
+
| Plan half-life | `skills/godplans/scripts/plan-halflife.sh` | run in Phase 0 of a replan | writes `.godplans/PLAN.metrics.json`: cumulative task survival and per-domain supersession, measured with `GODPLANS_VALIDATOR`, else the plan's own `.godplans/validate-plan.sh`, else the copy beside the script |
|
|
32
|
+
| Style statistics | `skills/godplans/scripts/style-stats.py` | run during a brownfield Phase 0 fingerprint; copied in Phase 7 to `.godplans/style-stats.py` when a planned task runs it (the R-DNA-21 confirming run) | naming histograms, comment density, and function length for the style-genome pass; standard-library Python vendored by copy from hannsxpeter/codedna |
|
|
33
|
+
| Sidecar schema | `skills/godplans/schemas/PLAN.schema.json` | read by PLAN.json consumers and by the test suite | the published JSON Schema for the generated PLAN.json (`format: godplans/plan-json@2`); `PLAN.v1.schema.json` beside it covers the `@1` sidecars that 1.13.0 and earlier emitted |
|
|
34
|
+
| Portable core | `PROMPT.md` (generated, committed) | pasted or attached in tools with no Agent Skills support | SKILL.md plus the core modules, the template, the validator, and the half-life script in one file; it names the lazy modules to attach on demand |
|
|
35
|
+
| Full prompt | `PROMPT.full.md` (generated, gitignored) | a one-off build | every module inlined |
|
|
36
|
+
| Installer | `install.sh` | run by a user | links or copies the skill into six destinations |
|
|
37
|
+
| Projections | `.agents/skills/godplans`, `.claude/skills/godplans`, `plugins/godplans/skills` | symlinks | the first two point at `skills/godplans`, the plugin one at `skills` |
|
|
38
|
+
| Plugin metadata | `plugins/godplans/.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` | read by the Claude Code plugin system | `plugin.json` and the marketplace's godplans entry carry the SKILL.md description verbatim; the marketplace tagline (`metadata.description`) carries the package.json description |
|
|
39
|
+
|
|
40
|
+
### The nine phases
|
|
41
|
+
|
|
42
|
+
SKILL.md runs Phase 0 (Orient), 1 (Compliance gate), 2 (Intake and applicability), 3 (Discovery), 4 (Domain passes), 5 (Inversion pass), 5b (Prose integrity pass), 6 (Independent audit gate), and 7 (Emit and hand off), in that order. A phase that does not apply still gets a one-line disposition.
|
|
43
|
+
|
|
44
|
+
### Core and lazy modules
|
|
45
|
+
|
|
46
|
+
The split exists only for the portable prompt. A native install reads every module from disk at the phase that needs it.
|
|
47
|
+
|
|
48
|
+
- **Core, inlined in PROMPT.md in this order:** compliance, discovery, product, architecture, stack, database, security, exemplar, plan-format.
|
|
49
|
+
- **Lazy, attached only when needed:** doc-set (a contract the repo pass needs), plus fourteen domain modules: business, llm, ux, ui, seo, code-quality, style-genome, agent-memory, repo, build, roadmap, deploy, observe, launch.
|
|
50
|
+
|
|
51
|
+
The core holds the contracts every run needs and the five load-bearing domains that decide hard-to-reverse shape. A lazy module waits until the applicability matrix says it applies. Inlining every module would charge its full context cost before applicability is known (see the header of `scripts/build-prompt.sh`).
|
|
52
|
+
|
|
53
|
+
## 3. How a planning run uses them
|
|
54
|
+
|
|
55
|
+
1. **Phase 0** detects the mode. A replan measures the outgoing plan with `plan-halflife.sh` here, while `.godplans/validate-plan.sh` is still that plan's own validator. A brownfield run runs `style-stats.py` and close-reads the source. Every run binds the plan to disk evidence: the Git revision, an evidence inventory, and a SHA-256 input digest.
|
|
56
|
+
2. **Phase 1** screens the project against `compliance.md`. A hard stop writes nothing. Otherwise it creates `.godplans/` and copies the validator there byte for byte, before any plan text exists.
|
|
57
|
+
3. **Phases 2 and 3** read `discovery.md`. They fix the product form, the scored archetype, the overlays, an applicability matrix with one row per domain, and the scale, then ask one batch of three to five questions, each with a default.
|
|
58
|
+
4. **Phases 4 to 6** author each applicable domain from its module, give every requirement a disposition, run the prose-integrity gate from `exemplar.md`, and score the draft under critic posture against each module's rubric.
|
|
59
|
+
5. **Phase 7** assembles PLAN.mdx from `plan-format.md` and the template. It re-copies the validator, compares the copy with `cmp -s`, and runs it with `--allow-planning --emit-json`. Emission is complete only when PLAN.mdx, the executable companion, and PLAN.json all exist. When a planned task runs `.godplans/style-stats.py`, Phase 7 also copies `style-stats.py` there, outside that gate.
|
|
60
|
+
|
|
61
|
+
After approval, the plan, its companion, and any `.godplans/style-stats.py` copy are self-sufficient. An executor needs neither godplans nor this repository.
|
|
62
|
+
|
|
63
|
+
## 4. The validator and its embedded catalogs
|
|
64
|
+
|
|
65
|
+
`validate-plan.sh` is one Bash file that runs an embedded Perl program. Bash 3.2 and the Perl that ships with macOS are enough. It reads no skill file at run time, so everything it checks against lives inside it:
|
|
66
|
+
|
|
67
|
+
| Table | Kept by | Holds |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `%catalog_max` | `scripts/build-catalog.js` | the highest requirement number per prefix; with `BIZ => 26`, a task citing `R-BIZ-27` fails |
|
|
70
|
+
| `%doc_catalog` | `scripts/build-catalog.js` | every documentation-set id with its owner module and durability |
|
|
71
|
+
| `%known_domain` | hand | the domains the applicability matrix must list, each exactly once |
|
|
72
|
+
| `%module_prefix` | hand | each domain's requirement prefix; `%prefix_module` is derived from it with `reverse` |
|
|
73
|
+
| `%deferrable_domain` | hand | the domains that may defer: seo, launch, observe, ui, deploy |
|
|
74
|
+
| `%never_excludable` | hand | the domains that scale down and never leave the plan: security, code-quality, style-genome, repo, roadmap |
|
|
75
|
+
| `%overlay_domains` | hand | the seven overlays and the domains each one forbids excluding |
|
|
76
|
+
| `@archetypes`, `%allowed_archetype` | hand | the nine archetypes `discovery.md` scores; the frontmatter `archetype` may also be `unknown`. The `plan-format.md` frontmatter rules and the `PLAN.schema.json` enum repeat the list, and `tests/validate-plan.sh` ("archetype list matches discovery.md") fails when any of the four copies differs |
|
|
77
|
+
|
|
78
|
+
Modes:
|
|
79
|
+
|
|
80
|
+
- `--allow-planning` validates a draft or closed plan. Without it, the validator is also an execution gate and accepts only `approved` or `executing`.
|
|
81
|
+
- `--emit-json PATH` writes the PLAN.json sidecar as UTF-8. The sidecar is derived and never hand-edited, and its `plan_digest` lets a consumer detect that the plan changed after the sidecar was written.
|
|
82
|
+
- `--drift-check N` rechecks the digests of evidence marked `[recheck]`, then reruns up to three sampled Verify commands from completed phase N and that phase's Checkpoint verify, each through `sh -c`. Those commands come from PLAN.mdx, so drift mode runs whatever the plan says. Review a plan diff before running it.
|
|
83
|
+
|
|
84
|
+
A plan written before a domain existed fails with "applicability matrix is missing domain <name>". Replan mode treats that failure as a delta to add, not as an error in the plan.
|
|
85
|
+
|
|
86
|
+
`tests/validate-plan.sh` is the regression suite. It also checks every sidecar it emits against `PLAN.schema.json` with `tests/lib/plan-schema-check.js`, a dependency-free checker that refuses any schema keyword it does not implement. It walks the whole schema before reading any document, so a keyword under an optional property counts too, and it also checks `PLAN.v1.schema.json` against the retained 1.9.0 evaluation sidecar and a real 1.13.0 sidecar in `tests/fixtures/`. A schema change that relies on an unchecked keyword therefore fails the suite instead of passing unchecked.
|
|
87
|
+
|
|
88
|
+
## 5. Two ways to ship the same skill
|
|
89
|
+
|
|
90
|
+
**Native.** `install.sh` installs into six destinations: agents (`~/.agents/skills` or `<project>/.agents/skills`), claude, factory, cline, windsurf, and copilot-cloud. Tool names such as codex, cursor, gemini, kilo, and goose map onto the agents path. It symlinks by default. `--copy` copies instead and strips Python bytecode from the copy. A marker records each destination the installer created, so `--uninstall` removes only those, and an unowned destination is never replaced or removed without `--force`. `npx skills add hannsxpeter/godplans` and the Claude Code plugin (`plugins/godplans`, whose `skills` entry is the projection symlink) reach the same canonical directory.
|
|
91
|
+
|
|
92
|
+
**Portable.** `scripts/build-prompt.sh` writes PROMPT.md. It strips the SKILL.md frontmatter and the File map section, replaces the Phase 6d council block with a one-line note (a pasted prompt cannot delegate to three providers), rewrites repository paths that point at inlined content (for example, to "the inlined validator"), and rewrites the half-life command to `bash .godplans/plan-halflife.sh ...`. The header tells the reader to write the inlined validator to `.godplans/validate-plan.sh` and to save that script beside it. Neither the core nor the full prompt inlines `style-stats.py`, so both rewrite the SKILL.md and discovery.md sentences that run it to record the measured style baseline as not run, and the Phase 7 sentence that copies it to make the copy only when a native install is reachable. Project paths such as `.godplans/PLAN.mdx` stay literal, because the planning agent can reach them. `--full` writes the all-module prompt to PROMPT.full.md for one-off use.
|
|
93
|
+
|
|
94
|
+
`package.json` publishes as `@hxp-tools/godplans`. The repository uses `npm pack` in `tests/package-contents.sh` to prove the tarball. `npm test` runs that test against the working tree, where a packed file git ignores fails. The release gate runs it with `--tracked-only`, where a packed file git does not track fails.
|
|
95
|
+
|
|
96
|
+
## 6. Derived artifacts and the checks that catch staleness
|
|
97
|
+
|
|
98
|
+
| Source | Generator | Generated artifact | Check that catches staleness |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| Every `R-<PREFIX>-<N>` id that starts a line (after an optional list marker and `**`) inside the `## Plan requirements` section of each `references/*.md`, and the catalog rows in `references/doc-set.md` | `scripts/build-catalog.js` (`npm run catalog`); it refuses a gap in a prefix's numbering and a document owner missing from `%known_domain` | the `%catalog_max` and `%doc_catalog` blocks in `validate-plan.sh` | `npm run catalog:check`; `tests/validate-plan.sh` also recomputes the requirement catalog ("embedded requirement catalog is current") |
|
|
101
|
+
| SKILL.md, the nine core references, the PLAN template, `validate-plan.sh`, `plan-halflife.sh` | `scripts/build-prompt.sh` (`npm run build:prompt`) | `PROMPT.md` | lint `prompt-fresh` (rebuilds into a temporary path and compares with `cmp`); `tests/portable-prompt.test.sh` (marker order, routing to every lazy module including the doc-set contract, the sentence naming where to write the validator companion, no unresolved bare or backticked path to the template, validator, half-life script, a core module, or the plan-format reference, none to `style-stats.py`, deterministic output in any flag order, and both bounds of the byte budget) |
|
|
102
|
+
| The same sources plus every lazy module | `scripts/build-prompt.sh --full` | `PROMPT.full.md`, never committed | none for the file; `tests/portable-prompt.test.sh` builds one into a temporary directory and checks that every module is inlined and that the same paths are resolved, `style-stats.py` included; only the inlined style-genome module's vendoring note and R-DNA-21 may still name that script, as the skill's own |
|
|
103
|
+
| `PROMPT.md`, SKILL.md, every module named in `coreModules` and `lazyModules`, and a full prompt built into a temporary directory | `scripts/context-metrics.js` (`npm run metrics:context`) | `evals/metrics/context-cost.json` (bytes, estimated tokens, and SHA-256 per file) | `npm run metrics:check` and lint `context-metrics` |
|
|
104
|
+
| The `version` field in `package.json` | `scripts/version-sync.js` (`npm run version:sync`; `npm run release:prepare` runs it), which then rebuilds PROMPT.md and the context metrics | the SKILL.md frontmatter `metadata.version` and its `## Skill version:` line, `plugin.json`, `marketplace.json`, the README version badge, and the template's `godplans vX.Y.Z` line | `npm run version:check` (all six surfaces) and lint `version-parity` (SKILL.md, the top CHANGELOG heading, package.json, both manifests, and the template; it does not read the README badge) |
|
|
105
|
+
| The SKILL.md frontmatter description | copied by hand | the `description` in `plugin.json` and in the godplans entry of `marketplace.json` | lint `description-parity` (exact equality); lint `description-length` (one double-quoted line of 1 to 1024 characters) |
|
|
106
|
+
| The `description` in `package.json` | copied by hand | the GitHub About text and `metadata.description` in `.claude-plugin/marketplace.json` | `scripts/release-check.sh` (About text); lint `description-parity` (marketplace tagline, exact equality) |
|
|
107
|
+
| The executor-rules block in `references/plan-format.md` | copied by hand | the `## Rules for executing agents` block in `templates/PLAN.template.mdx` | `tests/validate-plan.sh` (line-for-line equality of the `>` lines) |
|
|
108
|
+
| The domain list: `references/*.md` minus the five contract modules | kept by hand in several files | the SKILL.md Phase 4 table; `%known_domain` and `%module_prefix`; the full and core `REFERENCE_ORDER`, the "all N domain modules" count, and the lazy-module sentence in `build-prompt.sh`; `coreModules` and `lazyModules` in `context-metrics.js`; `expected_refs` and `lazy_refs` in `tests/portable-prompt.test.sh`; the template's applicability matrix; discovery's worked matrix; the schema's applicability `minItems` and `maxItems` | lint `domain-parity`, which also requires one prefix per module, defined at the start of a line in that module's own `## Plan requirements` section |
|
|
109
|
+
| The canonical skill directory | symlinks | `.agents/skills/godplans`, `.claude/skills/godplans`, `plugins/godplans/skills` | lint `symlinks-valid` (each must be a symlink that resolves to its target, never a copy) |
|
|
110
|
+
| The case directories under `evals/cases/` | kept by hand | `evals/cases-roster.txt` | `scripts/eval-matrix.sh --check`, run by `tests/eval-harness.sh` in `npm test`, refuses any difference in either direction |
|
|
111
|
+
| A plan's PLAN.mdx | `validate-plan.sh --emit-json` | `.godplans/PLAN.json` in the planned project | `tests/validate-plan.sh` checks every sidecar it emits against `PLAN.schema.json`; consumers compare `plan_digest` |
|
|
112
|
+
|
|
113
|
+
**One command runs the generators in dependency order:** `npm run generate`, which is `npm run catalog && npm run build:prompt && npm run metrics:context`. The catalog runs first because it rewrites the validator, which the prompt inlines. The metrics run last because they hash PROMPT.md and build the full prompt. After editing SKILL.md, any reference module (the context metrics hash lazy modules too), the template, the validator, or `plan-halflife.sh`, run `npm run generate`, then `npm run check`. `npm run check` runs `version:check`, `catalog:check`, `metrics:check`, the full lint, and `npm test`, in that order.
|
|
114
|
+
|
|
115
|
+
**What `domain-parity` does not read.** The domain list also appears in discovery's deferral lists, the SKILL.md description and its file-map count, the base fixture in `tests/validate-plan.sh`, and the counts and lists in README, CONTRIBUTING, AGENTS.md, and this file. The validator rejects the base fixture when its matrix lacks a known domain. The rest are hand-kept, and MAINTAINING.md lists them in its add-a-domain checklist.
|
|
116
|
+
|
|
117
|
+
## 7. Evaluation layers
|
|
118
|
+
|
|
119
|
+
The lint proves the package is internally consistent. The evaluation layers ask whether an agent using godplans plans better. The included runners call model CLIs on the maintainer's authenticated account, so no model-backed layer runs in CI. CI runs only the offline parts: lint `eval-cases` (`scripts/eval.sh --check-cases`), `scripts/eval-matrix.sh --check`, and the harness regression tests (`tests/eval-harness.sh`, `tests/evidence-harnesses.sh`, `tests/codex-runner.sh`, `tests/vendor-runner.sh`).
|
|
120
|
+
|
|
121
|
+
| Layer | Entry point | What it measures |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| Behavioral cases | `scripts/eval.sh` with `GODPLANS_EVAL_RUNNER`; cases under `evals/cases/<case>/` (`REQUEST.md`, `REQUEST.baseline.md`, `EXPECTATIONS`, optional `INPUT/`) | whether one plan meets the case's deterministic expectations; the harness also requires the validator companion to be byte-identical and the sidecar digest to match |
|
|
124
|
+
| Control arm | `scripts/eval.sh --baseline` with `GODPLANS_EVAL_BASELINE_RUNNER` | the same agent, model, and effort with no skill, given the de-branded `REQUEST.baseline.md`, which the control runner reads beside the `REQUEST.md` path the harness passes; `--check-cases` rejects a baseline request that names the skill; the control is a measurement and never a gate |
|
|
125
|
+
| Release matrix | `scripts/eval-matrix.sh` | every case in `evals/cases-roster.txt`, both arms, across at least three model-family profiles (default codex, claude, gemini); `summarize-matrix.js` writes MATRIX.md and MATRIX.json |
|
|
126
|
+
| External blind grading | `scripts/eval-external.js` | plan pairs under blinded A and B labels (plan content is not redacted) graded by judges from outside the planning family against `evals/external/RUBRIC.md`, whose criteria cite no godplans requirement; grades follow `GRADE.schema.json` and are unblinded only after every grade exists |
|
|
127
|
+
| Build outcome | `scripts/eval-outcome.js`, case under `evals/outcomes/cases/tenant-notes-api/` | treatment and control plans built by the same fresh no-skill builder, verified by the case's `VERIFY.sh`, then audited blind by a static godaudits pass; `outcome-summary.js` writes SUMMARY.json |
|
|
128
|
+
| Context cost | `evals/metrics/context-cost.json` | the byte and estimated-token cost of the native entry, the portable core, the full prompt, and each module |
|
|
129
|
+
|
|
130
|
+
The published head-to-head build-outcome result measured godplans 1.9.0 on 2026-07-23 (`evals/outcomes/results/2026-07-23-tenant-notes-api-codex/`). No later version has been re-measured. The rules for publishing evidence are in `evals/README.md` and summarized in MAINTAINING.md.
|
|
131
|
+
|
|
132
|
+
## 8. The platform contract
|
|
133
|
+
|
|
134
|
+
Everything a user runs (the validator, the half-life script, `style-stats.py`, and the POSIX sh installer), and every maintainer shell script, must run on stock macOS (`/bin/bash` 3.2 and BSD awk, grep, sed, and find) and on Linux (bash 5 and GNU tools). The validator and the half-life script use only core Perl modules (`JSON::PP`, `Digest::SHA`, `Encode`, and `Time::Local`), which the Perl that ships with macOS includes, and `style-stats.py` uses only the Python standard library. Node.js is maintainer tooling only: the generators, the lint parity checks, and the evaluation coordinators. The shipped skill never runs it.
|
|
135
|
+
|
|
136
|
+
Lint `shell-syntax` parses each script in its declared shell and rejects bash 4 constructs that `bash -n` under bash 5 accepts. `python-syntax` parses with `ast.parse`, which writes no bytecode into the skill directory that `install.sh` copies. CI runs two jobs. The Ubuntu "release quality" job runs `npm run release:check`: `npm run check` plus the pinned official skills-ref validator, tag-to-release parity and GitHub About parity through `gh` (About drift warns on pull requests and fails on `main` and locally), and the package dry run. The "stock macOS tools" job puts `/bin/bash` and the BSD tools first on PATH and runs `tests/run.sh` and `scripts/lint.sh --all`.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Releasing godplans
|
|
2
|
+
|
|
3
|
+
Releases are cut from a clean `main` branch after the release pull request is
|
|
4
|
+
merged. The Git tag, GitHub release, and every version surface use the same
|
|
5
|
+
SemVer value.
|
|
6
|
+
|
|
7
|
+
## Release checklist
|
|
8
|
+
|
|
9
|
+
1. Run `npm run release:prepare -- <patch|minor|major|X.Y.Z>`. It bumps the
|
|
10
|
+
version in package.json, which is the single source of truth, then runs
|
|
11
|
+
`npm run version:sync` to write it into every other surface (SKILL.md
|
|
12
|
+
frontmatter and body, marketplace metadata, plugin metadata, the README
|
|
13
|
+
version badge, and the PLAN template) and to regenerate PROMPT.md and the
|
|
14
|
+
context metrics. When CHANGELOG.md has no heading for the new version yet,
|
|
15
|
+
it adds a top entry dated today (UTC) whose body is an `### Added` heading
|
|
16
|
+
over the stub line `- TODO: describe this release.`.
|
|
17
|
+
`scripts/version-sync.js` holds the authoritative surface list, so add new
|
|
18
|
+
surfaces there rather than to this checklist alone.
|
|
19
|
+
2. Replace the stub body with the real release notes and confirm the heading
|
|
20
|
+
date. `npm run release:check` fails while the top CHANGELOG section still
|
|
21
|
+
holds that exact stub line; a note that merely names TODO passes.
|
|
22
|
+
3. Run `npm run generate` (catalog, then prompt, then context metrics) after
|
|
23
|
+
every source is final, so the validator tables, PROMPT.md, and
|
|
24
|
+
`evals/metrics/context-cost.json` match what ships.
|
|
25
|
+
4. Install the pinned official validator in an isolated environment, then run
|
|
26
|
+
`npm run release:check` from a clean checkout. It looks for the validator in
|
|
27
|
+
`SKILLS_REF_BIN`, then `.venv-skills-ref/bin/skills-ref`, then `PATH`, and
|
|
28
|
+
fails when it finds none or the one it finds cannot execute. (Inside a plain
|
|
29
|
+
`npm run check`, the `official-validator` lint check only prints a visible
|
|
30
|
+
skip when no validator is installed or one it found on its own cannot
|
|
31
|
+
execute.) It includes `npm run check`, the CHANGELOG stub
|
|
32
|
+
guard, deterministic evaluation contracts, official validation of the
|
|
33
|
+
canonical `skills/godplans` package, immutable action pins, tag-to-release
|
|
34
|
+
parity, GitHub About parity (the repository description equals package.json
|
|
35
|
+
`description` and the topics include every `keywords` entry), and a
|
|
36
|
+
package-contents check against committed files only
|
|
37
|
+
(`tests/package-contents.sh --tracked-only`), so a file under a shipped
|
|
38
|
+
path that git does not track fails the release. When the release changes
|
|
39
|
+
package.json `description` or adds a `keywords` entry, run the
|
|
40
|
+
`gh repo edit` command the About check prints before you merge, and copy a
|
|
41
|
+
changed `description` into `metadata.description` in
|
|
42
|
+
`.claude-plugin/marketplace.json` (`description-parity`). Pull
|
|
43
|
+
request CI only warns on About drift, because the About text is live
|
|
44
|
+
repository state that no branch carries; a push to `main` and this local
|
|
45
|
+
gate fail on it.
|
|
46
|
+
5. Open a ready pull request and wait for both jobs in the `lint` workflow:
|
|
47
|
+
`release quality` (Ubuntu, the release gate) and `stock macOS tools`
|
|
48
|
+
(`/bin/bash` 3.2 and BSD tools).
|
|
49
|
+
6. Merge the pull request to `main` only when both jobs pass. Branch
|
|
50
|
+
protection on `main` requires both as status checks, administrators
|
|
51
|
+
included, so a red job blocks the merge.
|
|
52
|
+
7. Pull the merged `main`, create annotated tag `vX.Y.Z`, and push the tag.
|
|
53
|
+
8. Create the GitHub release from the matching CHANGELOG section.
|
|
54
|
+
9. Publish the npm package: `npm publish` (scoped public via
|
|
55
|
+
`publishConfig.access`). Confirm
|
|
56
|
+
`https://www.npmjs.com/package/@hxp-tools/godplans`.
|
|
57
|
+
10. Verify the release page, tag target, default branch version, npm version,
|
|
58
|
+
and a clean local worktree.
|
|
59
|
+
11. Check the repository topics for stale extra topics, the one kind of About
|
|
60
|
+
drift `npm run release:check` does not flag (step 4 enforces the
|
|
61
|
+
description and every `keywords` entry). Remove a topic that no longer
|
|
62
|
+
matches a keyword with `gh repo edit --remove-topic`; GitHub allows at
|
|
63
|
+
most 20 topics, so a stale topic has to go before a new keyword fits.
|
|
64
|
+
|
|
65
|
+
## Commands
|
|
66
|
+
|
|
67
|
+
Before the merge, on the release branch (steps 1 to 6):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm run release:prepare -- X.Y.Z # then replace the CHANGELOG stub body
|
|
71
|
+
npm run generate
|
|
72
|
+
python3 -m venv .venv-skills-ref
|
|
73
|
+
.venv-skills-ref/bin/pip install -r requirements/skills-ref.txt
|
|
74
|
+
SKILLS_REF_BIN="$PWD/.venv-skills-ref/bin/skills-ref" npm run release:check
|
|
75
|
+
# Commit, push the branch, and open a ready pull request. Merge it only after
|
|
76
|
+
# both lint jobs pass.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
After the merge, from the merged `main` (steps 7 to 10):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git switch main
|
|
83
|
+
git pull --ff-only origin main
|
|
84
|
+
version=X.Y.Z
|
|
85
|
+
release_notes=$(mktemp)
|
|
86
|
+
trap 'rm -f "$release_notes"' EXIT HUP INT TERM
|
|
87
|
+
awk -v version="$version" '
|
|
88
|
+
index($0, "## [" version "] - ") == 1 { capture = 1; next }
|
|
89
|
+
capture && /^## \[/ { exit }
|
|
90
|
+
capture { print }
|
|
91
|
+
' CHANGELOG.md > "$release_notes"
|
|
92
|
+
test -s "$release_notes"
|
|
93
|
+
git tag -a "v$version" -m "godplans v$version"
|
|
94
|
+
git push origin "v$version"
|
|
95
|
+
gh release create "v$version" --verify-tag --title "godplans v$version" --notes-file "$release_notes"
|
|
96
|
+
rm -f "$release_notes"
|
|
97
|
+
trap - EXIT HUP INT TERM
|
|
98
|
+
npm publish
|
|
99
|
+
npm view @hxp-tools/godplans version
|
|
100
|
+
gh repo view hannsxpeter/godplans --json description,repositoryTopics \
|
|
101
|
+
--jq '.description, ([.repositoryTopics[].name] | join(" "))'
|
|
102
|
+
node -p "const p = require('./package.json'); p.description + '\n' + p.keywords.join(' ')"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Run the release check again after the release is published so the new tag and
|
|
106
|
+
GitHub release enter the parity set. Do not reuse or move a published tag. A
|
|
107
|
+
failed release gets a new patch version.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 96" width="320" height="96" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">Achievement: Approved. You signed off, so agents may build.</title>
|
|
3
|
+
<rect width="320" height="96" fill="#101722"/>
|
|
4
|
+
<rect x="2" y="2" width="316" height="92" fill="#182233" stroke="#FF9F5A" stroke-width="4"/>
|
|
5
|
+
<rect x="14" y="14" width="68" height="68" fill="#FF9F5A"/>
|
|
6
|
+
<path d="M38 40V32C38 25 43 21 49 21C55 21 59 25 60 31" fill="none" stroke="#101722" stroke-width="6"/>
|
|
7
|
+
<rect x="28" y="40" width="40" height="32" fill="#101722"/>
|
|
8
|
+
<rect x="45" y="50" width="6" height="12" fill="#FF9F5A"/>
|
|
9
|
+
<text x="98" y="38" font-family="Newsreader, Georgia, 'Times New Roman', serif" font-weight="600" font-size="28" fill="#F2EBDD">Approved</text>
|
|
10
|
+
<text x="98" y="60" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">You signed off on the plan,</text>
|
|
11
|
+
<text x="98" y="78" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">so agents may build.</text>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 96" width="320" height="96" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">Achievement: Done. The final verification phase passed.</title>
|
|
3
|
+
<rect width="320" height="96" fill="#101722"/>
|
|
4
|
+
<rect x="2" y="2" width="316" height="92" fill="#182233" stroke="#FF6B57" stroke-width="4"/>
|
|
5
|
+
<rect x="14" y="14" width="68" height="68" fill="#FF6B57"/>
|
|
6
|
+
<path d="M34 72V26" stroke="#101722" stroke-width="7"/>
|
|
7
|
+
<path d="M34 26H68L58 38L68 50H34Z" fill="#101722"/>
|
|
8
|
+
<text x="98" y="38" font-family="Newsreader, Georgia, 'Times New Roman', serif" font-weight="600" font-size="28" fill="#F2EBDD">Done</text>
|
|
9
|
+
<text x="98" y="60" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">The final verification</text>
|
|
10
|
+
<text x="98" y="78" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">phase passed.</text>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 96" width="320" height="96" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">Achievement: Graded. Every applicable domain scored 85 or higher.</title>
|
|
3
|
+
<rect width="320" height="96" fill="#101722"/>
|
|
4
|
+
<rect x="2" y="2" width="316" height="92" fill="#182233" stroke="#6FB7FF" stroke-width="4"/>
|
|
5
|
+
<rect x="14" y="14" width="68" height="68" fill="#6FB7FF"/>
|
|
6
|
+
<rect x="26" y="50" width="10" height="20" fill="#101722"/>
|
|
7
|
+
<rect x="43" y="38" width="10" height="32" fill="#101722"/>
|
|
8
|
+
<rect x="60" y="26" width="10" height="44" fill="#101722"/>
|
|
9
|
+
<text x="98" y="38" font-family="Newsreader, Georgia, 'Times New Roman', serif" font-weight="600" font-size="28" fill="#F2EBDD">Graded</text>
|
|
10
|
+
<text x="98" y="60" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">Every applicable domain</text>
|
|
11
|
+
<text x="98" y="78" font-family="Archivo, 'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#9AA7BD">scored 85 or higher.</text>
|
|
12
|
+
</svg>
|