@hxp-tools/godplans 0.0.0-stage → 2.0.0
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 +1176 -0
- package/LICENSE +21 -0
- package/PROMPT.md +4006 -0
- package/README.md +201 -2
- package/assets/README.md +11 -0
- package/assets/hero.svg +44 -0
- package/assets/plan-loop.svg +62 -0
- package/assets/quest-map.svg +80 -0
- package/bin/godplans.js +93 -0
- package/docs/ARCHITECTURE.md +136 -0
- package/docs/RELEASING.md +107 -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 +92 -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 +140 -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
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Exemplar module: the quality bar, worked
|
|
2
|
+
|
|
3
|
+
Loaded before the Phase 5b prose-integrity pass and again before Phase 6 scoring. Six plan elements are shown as the version that fails and the version that ships. The difference is always the same difference: the bad version survives substitution into any other project; the good version could only belong to this one.
|
|
4
|
+
|
|
5
|
+
The prose-integrity gate in section 6 adapts ideas from [cursor/pstack unslop](https://github.com/cursor/plugins/blob/main/pstack/skills/unslop/SKILL.md) (MIT, Lauren Tan): preserve meaning while removing model-like filler, then check the result again. The wording and project-specific gate below are original to godplans; no source text or catalog is copied.
|
|
6
|
+
|
|
7
|
+
## 1. A decision entry
|
|
8
|
+
|
|
9
|
+
**Never produce this:**
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
### Database choice
|
|
13
|
+
|
|
14
|
+
We will use PostgreSQL because it is a robust, battle-tested relational
|
|
15
|
+
database with a rich ecosystem and strong community support. It scales
|
|
16
|
+
well and supports our needs.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Every clause substitutes cleanly ("We will use MySQL because it is a robust, battle-tested..."). Nothing was decided; a vibe was transcribed. It also carries no falsifier: nothing in it could ever be wrong, so nothing in it could ever be a bet.
|
|
20
|
+
|
|
21
|
+
**This is the bar:**
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
### D1: Postgres 16 via Neon, one schema per tenant deferred
|
|
25
|
+
|
|
26
|
+
Decision: single Postgres database, shared tables with `workspace_id` on
|
|
27
|
+
every tenant-owned row, enforced by row-level security policies.
|
|
28
|
+
Rejected: schema-per-tenant (migration fan-out at 200+ workspaces kills
|
|
29
|
+
the weekend deploy budget), SQLite (two-region read replicas are a
|
|
30
|
+
stated requirement, R-1.4).
|
|
31
|
+
Hard-to-reverse because: every query, index, and the RLS policy set
|
|
32
|
+
assume the tenancy column; reversing at scale is a full data migration.
|
|
33
|
+
Falsifier:
|
|
34
|
+
- Signal: p95 read latency on the largest workspace and active workspace count
|
|
35
|
+
- Failure boundary: p95 exceeds 250 ms for seven days, or active workspaces exceed 5,000 before Phase 5
|
|
36
|
+
- Replan action: return to planning and evaluate the rejected schema-per-tenant migration
|
|
37
|
+
|
|
38
|
+
### Assumptions ledger
|
|
39
|
+
- A1: Neon cold-start connect latency stays under 500 ms on the free tier during the beta (assumed; no latency budget was stated)
|
|
40
|
+
- Blast radius: wrong costs +1 task and +0 phases; a warm instance replaces the free tier before Phase 3
|
|
41
|
+
- Validated by: GP-105
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 2. A task
|
|
45
|
+
|
|
46
|
+
**Never produce this:**
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
- [ ] GP-301 Implement authentication
|
|
50
|
+
- Acceptance: authentication works correctly and securely
|
|
51
|
+
- Verify: test the login flow
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
No files, no dependency, unfalsifiable acceptance, a verify step that names nothing. An executor holding only this task must invent the plan it was supposed to receive.
|
|
55
|
+
|
|
56
|
+
**This is the bar:**
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
- [ ] GP-301 [W3.1] Wire session middleware into the API router
|
|
60
|
+
- Files: src/api/middleware/session.ts, src/api/router.ts
|
|
61
|
+
- Depends on: GP-202
|
|
62
|
+
- Reuses: cookie config from src/config/cookies.ts; do not redefine
|
|
63
|
+
- Acceptance: unauthenticated request to /api/boards returns 401 with
|
|
64
|
+
body `{"error":"unauthorized"}`; authenticated request passes through;
|
|
65
|
+
session cookie is httpOnly, secure, sameSite=lax
|
|
66
|
+
- Verify: `npm test -- session.test.ts && curl -sf -o /dev/null -w "%{http_code}" localhost:3000/api/boards | grep -q 401`
|
|
67
|
+
- Requirements: R-2.3, R-SEC-4, R-SEC-9
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 3. An open question
|
|
71
|
+
|
|
72
|
+
**Never produce this:**
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
- Should we support teams? TBD
|
|
76
|
+
- What about billing? To be decided later
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
No options, no default, no owner of the consequence. "Later" is where plans go to rot.
|
|
80
|
+
|
|
81
|
+
**This is the bar:**
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
### Q2: Can a board be shared outside its workspace?
|
|
85
|
+
- Owner: product lead; the answer is theirs to give and the plan must not invent it
|
|
86
|
+
- Blocks: nothing, because (b) is additive; it would block build from Phase 4 if the default were structural
|
|
87
|
+
- Decide by: 2026-08-14, the Phase 4 wave boundary
|
|
88
|
+
- Why it matters: a yes turns the permission model from workspace-scoped
|
|
89
|
+
RLS into per-object ACLs, which changes GP-201 and every query in Phase 4.
|
|
90
|
+
- Options:
|
|
91
|
+
(a) No; boards live and die inside one workspace.
|
|
92
|
+
(b) Read-only public links with unguessable tokens.
|
|
93
|
+
(c) Full cross-workspace membership.
|
|
94
|
+
(d) No sharing primitive at all; export a read-only snapshot, which
|
|
95
|
+
moves the question out of the permission model entirely.
|
|
96
|
+
- Recommended default: (b). It satisfies the stated sharing story (R-1.6)
|
|
97
|
+
without per-object ACLs; the token table is additive, not structural, so
|
|
98
|
+
building it before the answer lands wastes nothing if the answer is (a).
|
|
99
|
+
- Outside the framing: (a) through (c) only vary how much sharing the
|
|
100
|
+
permission model allows. (d) was generated and rejected; it wins only if
|
|
101
|
+
sharing stays read-only permanently, which R-1.6 does not promise.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The four fields R-PRD-10 demands (owner, decide-by, blocking flag, recommended
|
|
105
|
+
default) are what make the difference. The bad version cannot be scheduled, cannot
|
|
106
|
+
be chased, and cannot be executed past. This one can be all three.
|
|
107
|
+
|
|
108
|
+
An unknown whose answer the plan **cannot** proceed past does not belong here at
|
|
109
|
+
all: it is a hypothesis in `## Decisions` whose R-ROAD-7 validation task is
|
|
110
|
+
scheduled before every task that assumes it, so the ordering is a real
|
|
111
|
+
`Depends on` edge rather than a note at the bottom of the document.
|
|
112
|
+
|
|
113
|
+
## 4. A requirement with acceptance criteria
|
|
114
|
+
|
|
115
|
+
**Never produce this:**
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
R-3: The app should be fast and responsive, with good performance
|
|
119
|
+
across devices.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**This is the bar:**
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
R-3.1: WHEN a board with up to 500 cards loads on a mid-tier device
|
|
126
|
+
THE SYSTEM SHALL render first meaningful content within 1.5s (LCP)
|
|
127
|
+
and respond to drag input within 100ms.
|
|
128
|
+
R-3.2: IF the network is offline WHEN a card is edited THE SYSTEM
|
|
129
|
+
SHALL queue the mutation locally and reconcile on reconnect without
|
|
130
|
+
data loss.
|
|
131
|
+
Traceability: enforced by GP-412 (virtualized card list, LCP budget in
|
|
132
|
+
CI via Lighthouse assert) and GP-508 (mutation queue with idempotency
|
|
133
|
+
keys).
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 5. A defended absence
|
|
137
|
+
|
|
138
|
+
An absence is the hardest thing in a plan to score, because a bad one and a good one read the same at a glance. The difference is whether anything could ever prove it wrong.
|
|
139
|
+
|
|
140
|
+
**Never produce this:**
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
| llm | excluded | not needed |
|
|
144
|
+
| serve.support-policy | serve | not-applicable | launch | no paying users |
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Both are true today, unfalsifiable forever, and indistinguishable from nobody having looked. "Not needed" also survives the substitution test against every project ever planned.
|
|
148
|
+
|
|
149
|
+
**This is the bar:**
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
| llm | excluded | by-design: splitting an expense is arithmetic over the ledger table, and the receipt parser is a regex over merchant strings; revisit when: any task adds a model SDK dependency, an inference endpoint, or a prompt template |
|
|
153
|
+
|
|
154
|
+
| serve.support-policy | serve | not-applicable | launch | absent: intake named no paying user and no billing surface exists in the data model; revisit when: the plan adds a billing route, a paid tier, or an external support address |
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Three parts, each doing work the other two cannot. The **evidence state** says whether anybody looked: `by-design` means the plan settles it, `absent` means something checked and the reason names what checked. `unknown` is refused outright, because "we did not look" and "we decided this does not apply" read identically and have opposite consequences a year later. The **reason** is specific enough to become false. The **`revisit when` predicate** is what makes the row a decision with an expiry rather than a silence, and an executor that trips it returns the plan to `planning`.
|
|
158
|
+
|
|
159
|
+
## 6. Prose integrity
|
|
160
|
+
|
|
161
|
+
Structural validity does not rescue empty prose. The Phase 5b pass rewrites language after requirements and traceability are fixed, but before the independent critic scores the result. It may make a sentence clearer or shorter. It may not change a commitment, uncertainty label, source, task edge, or verification condition.
|
|
162
|
+
|
|
163
|
+
**Never produce this:**
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
Industry reports suggest webhook reliability is increasingly crucial,
|
|
167
|
+
highlighting the need for a robust retry strategy that ensures seamless
|
|
168
|
+
delivery across a wide range of failure scenarios.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The attribution names no report. "Crucial", "robust", and "seamless" hide the actual behavior. The range has no endpoints, and the trailing clauses never say who retries what.
|
|
172
|
+
|
|
173
|
+
**This is the bar:**
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
User constraint: the relay accepts at most 50 GitHub events per minute.
|
|
177
|
+
Decision: the delivery worker makes three attempts to the one configured
|
|
178
|
+
internal endpoint, waiting 1 second and then 5 seconds between retries.
|
|
179
|
+
After the third failure, it stores the event in `failed_deliveries` and
|
|
180
|
+
increments `webhook_delivery_failures_total`.
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The source, actor, limit, retry schedule, terminal state, and observable signal are explicit. A reader can disagree with the decision and an executor can prove it.
|
|
184
|
+
|
|
185
|
+
**Never produce this:**
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
The relay, platform, and service will be thoughtfully designed in order to
|
|
189
|
+
facilitate reliable processing, with events being validated and efficiently
|
|
190
|
+
handled.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Three nouns refer to one component. The actor disappears into passive voice. The adverbs and indirect verbs replace behavior.
|
|
194
|
+
|
|
195
|
+
**This is the bar:**
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
The relay verifies `X-Hub-Signature-256` before enqueueing an event. The
|
|
199
|
+
worker posts the stored body to the configured endpoint and records the
|
|
200
|
+
response code on every attempt.
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Prose-integrity gate
|
|
204
|
+
|
|
205
|
+
Apply these checks to plan prose, never to literal code, commands, paths, identifiers, protocol fields, quotations needed as evidence, or wording imposed by an external contract.
|
|
206
|
+
|
|
207
|
+
1. A factual attribution names its source. If the source is missing, classify the statement as a hypothesis with a validation task or delete it.
|
|
208
|
+
2. A quality claim names its mechanism, observable behavior, threshold, file, or command. A feeling about the system does not count as a requirement.
|
|
209
|
+
3. A causal claim states the cause and result. A trailing `-ing` phrase does not stand in for either one.
|
|
210
|
+
4. The sentence uses the plain verb unless a domain term is more exact. Filler, promotional adjectives, empty intensifiers, and generic conclusions are cut.
|
|
211
|
+
5. Lists, contrasts, pairs, and ranges express a real relationship. Do not force symmetry for rhythm. Preserve field counts and ordered sets required by the plan grammar.
|
|
212
|
+
6. One domain concept keeps one canonical noun. Repeat it instead of cycling through near-synonyms.
|
|
213
|
+
7. A planned action names the actor. Passive voice is allowed only when the actor is unknown or does not affect execution.
|
|
214
|
+
8. A dense sentence is split when a reader must backtrack to find the operative claim. Keep tightly coupled conditions together.
|
|
215
|
+
9. Hedging matches uncertainty already recorded by the plan. Do not weaken a decision or make a hypothesis sound decided.
|
|
216
|
+
10. The paragraph adds a decision, source, consequence, or check. If it only restates its heading, neighboring table, prompt, or task field, delete it.
|
|
217
|
+
|
|
218
|
+
The gate fails when any unquoted sentence could move unchanged into an unrelated plan because it contains no project fact, decision, uncertainty, consequence, or verification condition. Attach the deduction to the domain containing the sentence. Repeated failures across domains block emission even if each domain would otherwise clear 85.
|
|
219
|
+
|
|
220
|
+
## The pattern under all six
|
|
221
|
+
|
|
222
|
+
1. Name the thing (real files, real numbers, real commands), never the category of the thing.
|
|
223
|
+
2. Show the rejected alternatives; a decision without a loser is a description.
|
|
224
|
+
3. Make failure detectable: every claim carries the check that would catch its violation, and every hard-to-reverse bet carries the falsifier that would kill it.
|
|
225
|
+
4. Flag what is guessed, and attach the task that turns the guess into knowledge.
|
|
226
|
+
5. Defend every absence: what state licensed it, and what would reverse it.
|
|
227
|
+
|
|
228
|
+
Score any plan fragment against these five. A fragment that names nothing, rejects nothing, checks nothing, and flags nothing scores zero, no matter how professional it reads. A hard-to-reverse decision with no falsifier has decided nothing either: a bet you cannot lose is not a bet, it is a posture. And an exclusion with no tripwire has not decided anything either; it has only stopped the conversation.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Launch planning module
|
|
2
|
+
|
|
3
|
+
Plans the launch surface of PLAN.mdx: positioning, landing page, SEO and OG cards, waitlist funnel, channel posts, telemetry, and the D-7 to D+7 runbook. The orchestrator loads this module for any archetype with a public audience (saas-dashboard, marketing-site, mobile-app, library, api-service with public signup); internal tools and private services exclude it with a stated reason in the applicability matrix.
|
|
4
|
+
|
|
5
|
+
## Lineage
|
|
6
|
+
|
|
7
|
+
Descends from launch-ready, the shipping-tier ready-suite skill that puts a deployed app in front of real users without shipping AI-slop. What carries over: the substitution test as a sentence-by-sentence discipline, the banned-word audit, the five-channel OG preview rule, per-channel etiquette encoded as venue-specific have-nots, the paper-waitlist and silent-launch gates, and the runbook-as-calendar mechanic. launch-ready audits a launch after the surfaces exist; this module forces every one of its pass/fail gates into plan requirements so the surfaces are built correct the first time.
|
|
8
|
+
|
|
9
|
+
## Decisions to force
|
|
10
|
+
|
|
11
|
+
1. The four positioning sentences.
|
|
12
|
+
- Question: who is it for, what does it replace, what does it do differently, what is the differentiator test?
|
|
13
|
+
- Why hard to reverse: every downstream surface (hero, feature grid, OG card, meta description, every channel post, the first email line) derives from these sentences. Rewriting positioning after surfaces ship means rewriting all of them, and LinkedIn caches the OG card for 7 days.
|
|
14
|
+
- Options: write and substitution-test all four against >=2 named competitors now (default), or launch on generic copy and rebrand later (refused: that is Mode B rescue work by construction).
|
|
15
|
+
2. Launch mode and target tier.
|
|
16
|
+
- Question: which of the five modes (A pre-launch, B fix-AI-slop-landing, C re-launch, D rescue-no-traction, E quiet-B2B) and which target tier (1 Positioned, 2 Landed, 3 Captured, 4 Launched)?
|
|
17
|
+
- Why hard to reverse: mode determines which sections and tasks exist at all. Discovering mid-execution that the project is Mode E wastes every broad-channel task already planned.
|
|
18
|
+
- Options: Mode A tier 4 for greenfield public products (default); Mode E tier 3 for B2B without a broad-channel audience; Modes B, C, D only in replan with a prior launch on record.
|
|
19
|
+
3. Sending domain and email authentication.
|
|
20
|
+
- Question: which domain sends waitlist email, and when do SPF, DKIM, and DMARC get configured?
|
|
21
|
+
- Why hard to reverse: DNS propagation and domain reputation take days, and a launch-day drop from an unauthenticated domain lands in spam with no retry.
|
|
22
|
+
- Options: authenticate the product domain in the first phase (default), use a transactional subdomain such as mail.example.com (also fine), or configure at launch week (refused: no lead time).
|
|
23
|
+
4. Brand identity tokens.
|
|
24
|
+
- Question: does the landing page inherit brand tokens from the build section, or does the plan define a minimum viable identity (one brand color, two grays, one or two typefaces, a real icon library)?
|
|
25
|
+
- Why hard to reverse: the OG card bakes the brand color into a cached image, and a landing page on library defaults reads as template output on every channel at once.
|
|
26
|
+
- Options: inherit from the build section's visual identity (default when it exists); otherwise define the minimum viable identity in this section before any surface task.
|
|
27
|
+
5. Launch date and channel calendar.
|
|
28
|
+
- Question: which day, and which channels at which hour?
|
|
29
|
+
- Why hard to reverse: Product Hunt requires a confirmed hunter more than 48 hours out, amplification asks go out more than 48 hours in advance, and PH posts land at 12:01 AM PT Tuesday through Thursday. Moving the date invalidates every commitment already made.
|
|
30
|
+
- Options: a Tuesday or Wednesday at least 7 days after the final build task, with the runbook counting D-7 backward from it (default); a soft launch date for Mode E that skips PH and HN entirely.
|
|
31
|
+
6. UTM taxonomy.
|
|
32
|
+
- Question: what are the campaign, source, medium, and content values for every link that will ever be shared?
|
|
33
|
+
- Why hard to reverse: a link shared without UTM params is permanently unattributable; traffic that already arrived cannot be retro-tagged.
|
|
34
|
+
- Options: one campaign slug per launch, source per venue, medium fixed (social, email, referral), content per asset, recorded in a utm-registry file (default); ad-hoc tagging per post (refused: guarantees collisions and a blind D+1 waterfall).
|
|
35
|
+
7. Status page hosting.
|
|
36
|
+
- Question: where does the status page live?
|
|
37
|
+
- Why hard to reverse: a status page on the same infra as the app is discovered to be useless exactly once, during the first outage, which for many products is launch day.
|
|
38
|
+
- Options: out-of-band hosted status page cross-referenced with the observability section (default); same-infra page (refused).
|
|
39
|
+
|
|
40
|
+
## Plan requirements
|
|
41
|
+
|
|
42
|
+
1. R-LAUNCH-1: PLAN.mdx contains the four positioning sentences (who it is for, what it replaces, what it does differently, the differentiator test; the first names the R-BIZ-2 segment when business is applicable), each annotated with the >=2 named competitors it was substitution-tested against. Criterion: WHEN the launch section is present THE PLAN SHALL state four positioning sentences each naming at least two competitors whose substitution into the sentence makes it false.
|
|
43
|
+
2. R-LAUNCH-2: PLAN.mdx defines tone of voice as three adjectives plus three anti-adjectives, and mandates founder voice (first person, named founder, one founder-story line) on the hero with no company-we voice. Criterion: WHEN landing copy tasks are planned THE PLAN SHALL include the six tone words and a founder-voice acceptance condition on the hero task.
|
|
44
|
+
3. R-LAUNCH-3: PLAN.mdx declares the launch mode (A through E) and target tier (1 through 4), and Mode C or D plans name the dominant failure cause from the prior launch before any remediation task. Criterion: IF the mode is C or D THE PLAN SHALL name the dominant prior-launch failure cause; WHEN any mode is set THE PLAN SHALL scope channel tasks to that mode.
|
|
45
|
+
4. R-LAUNCH-4: PLAN.mdx specifies the five-section landing anatomy in order (hero, social proof, feature grid, pricing if applicable and rendered from the R-BIZ-7 plan catalog, CTA), a single above-the-fold primary CTA, and a hero that fits the 1366x768 fold. Criterion: WHEN the landing page task is planned THE PLAN SHALL enumerate the five sections in order and set exactly one above-the-fold CTA as an acceptance condition.
|
|
46
|
+
5. R-LAUNCH-5: PLAN.mdx constrains the feature grid to 3-6 tiles, each a product-specific capability traced to a shipped or planned build task, with no category-label tiles (Fast, Secure, Scalable) and no feature the build section does not deliver. Criterion: WHEN the feature grid is planned THE PLAN SHALL map every tile to a named GP-task or existing feature; IF a tile has no source THE PLAN SHALL delete the tile, not the traceability.
|
|
47
|
+
6. R-LAUNCH-6: PLAN.mdx bakes the banned-word audit into copy acceptance: no instance of seamless, powerful, revolutionary, effortless, intelligent, cutting-edge, game-changing, unlock, supercharge, streamline, empower, elevate, robust, best-in-class, leading, enterprise-grade, or world-class above the fold, each replaced with the concrete claim it hides. Criterion: WHEN copy tasks are planned THE PLAN SHALL include a grep-verifiable banned-word check as an acceptance condition on every copy surface.
|
|
48
|
+
7. R-LAUNCH-7: PLAN.mdx enforces copy voice rules: active voice, second person, named subjects, concrete over abstract, and no AI self-reference in the hero unless the product is an AI product and the AI is the differentiator. Criterion: IF the product is not an AI product THE PLAN SHALL forbid AI self-reference in hero acceptance conditions.
|
|
49
|
+
8. R-LAUNCH-8: PLAN.mdx resolves brand tokens: either it references the build section's visual identity or it defines the minimum viable identity (one brand color, two grays, one or two typefaces, a real icon library), so no launch surface ships on library defaults. Criterion: WHEN the landing or OG tasks are planned THE PLAN SHALL name the brand color hex and typefaces they consume.
|
|
50
|
+
9. R-LAUNCH-9: PLAN.mdx plans the 12-item launch-day SEO checklist as verifiable acceptance conditions: exactly one h1, title under 60 characters, meta description under 160, canonical URL, robots.txt, sitemap.xml, complete OG tags, complete Twitter tags, schema.org JSON-LD, HTTPS, Core Web Vitals green, and a grep for leftover template noindex on every route the R-SEO-1 matrix marks indexable (the R-SEO-5 environment guard and routes noindexed by design are not leftovers). Criterion: WHEN the SEO task is planned THE PLAN SHALL list all 12 items with a command-checkable condition each, including the noindex grep.
|
|
51
|
+
10. R-LAUNCH-10: PLAN.mdx specifies the OG card to spec: exactly 1200x630, under 300KB, legible at 600x315 half size, brand color plus product name plus a 6-10 word value prop, nothing critical in the outer 40px. Criterion: WHEN the OG card task is planned THE PLAN SHALL state all five spec conditions as acceptance criteria with an image-dimension verify command.
|
|
52
|
+
11. R-LAUNCH-11: PLAN.mdx schedules the five-channel OG preview (X, LinkedIn via Post Inspector, Slack, iMessage, Discord) with screenshots before D-1 and before any link ships, because LinkedIn caches the card for 7 days. Criterion: WHEN the runbook is planned THE PLAN SHALL place the five-channel preview task at or before D-1 and gate all link-sharing tasks on it.
|
|
53
|
+
12. R-LAUNCH-12: PLAN.mdx plans the waitlist as double opt-in: a two-field-max capture form, an inline thank-you state naming the confirmation email, only confirmed addresses on the list, and a welcome email within 5 minutes of confirmation. Criterion: WHEN the waitlist task is planned THE PLAN SHALL require double opt-in and the 5-minute welcome as acceptance conditions.
|
|
54
|
+
13. R-LAUNCH-13: PLAN.mdx plans the full email sequence: 2-4 pre-launch emails each with a stated purpose, a scheduled launch-day drop, and D+1, D+3, D+7 post-launch emails. Criterion: WHEN the funnel is planned THE PLAN SHALL enumerate every email with its purpose and send trigger; IF an email has no purpose THE PLAN SHALL cut it.
|
|
55
|
+
14. R-LAUNCH-14: PLAN.mdx schedules SPF, DKIM, and DMARC on the sending domain in an early phase (lead time), plus a working list-level unsubscribe and a GDPR consent checkbox if EU or UK users are in scope. Criterion: WHEN email tasks exist THE PLAN SHALL place domain authentication before any send task in wave order and include a DNS verify command.
|
|
56
|
+
15. R-LAUNCH-15: PLAN.mdx contains a per-channel post plan with all seven fields (venue, timing with timezone, title per etiquette, body per native format, hunter or submitter, amplification plan, response plan) and encodes venue etiquette: PH at 12:01 AM PT Tuesday through Thursday with a hunter confirmed more than 48 hours out, Show HN 7-10am ET weekday with no launch or all-caps in the title, Reddit only into subs with real prior comment history at a 9:1 participation ratio, LinkedIn in founder voice not press-release voice. Criterion: WHEN a channel is in scope THE PLAN SHALL state all seven fields and that venue's etiquette rules as acceptance conditions.
|
|
57
|
+
16. R-LAUNCH-16: PLAN.mdx defines the UTM taxonomy (source, medium, campaign, content) applied to every shared link and a utm-registry file preventing value collisions. Criterion: WHEN any link-bearing asset is planned THE PLAN SHALL require UTM params on it and register the values; IF a shared link has no UTM params THE PLAN SHALL treat it as a blocking defect, not a nice-to-have.
|
|
58
|
+
17. R-LAUNCH-17: PLAN.mdx instruments the five-event conversion waterfall (visit, CTA click, form submit, confirmation, activation), each named in the R-BIZ-20 event catalog when that requirement lands, with analytics live and the waterfall tested in staging before launch day. Criterion: WHEN telemetry is planned THE PLAN SHALL name the five events and include a staging test task that fires and verifies each one.
|
|
59
|
+
18. R-LAUNCH-18: PLAN.mdx plans the amplification list of >=5 named humans with specific asks sent more than 48 hours in advance, and blocks the founder's calendar as primary responder for the 8-hour window after each post. Criterion: WHEN channel posts are planned THE PLAN SHALL list the amplifiers by name or named role and set the founder as first responder in the response plan.
|
|
60
|
+
19. R-LAUNCH-19: PLAN.mdx contains the D-7 to D+7 runbook as a timezone-aware calendar with an owner and a pass criterion per item, a launch-day hour-by-hour schedule, and a retrospective task with targets set before launch so results are measured against a baseline. Criterion: WHEN the runbook is planned THE PLAN SHALL give every row a date, owner, and pass criterion, and the retrospective SHALL reference pre-set numeric targets.
|
|
61
|
+
20. R-LAUNCH-20: PLAN.mdx couples launch to its siblings: the status page is hosted out-of-band from the app infra, no launch date lands atop an in-progress schema migration from the deploy section, and any at-risk SLO from the observability section gets an SLO-watch row in the runbook. Criterion: IF the deploy section schedules a migration THE PLAN SHALL sequence the launch after its contract phase completes; WHEN a status page is planned THE PLAN SHALL host it off the app's infrastructure.
|
|
62
|
+
21. R-LAUNCH-21: PLAN.mdx ends the launch phase with the cold proof test: a stranger on an unfamiliar device describes the product in under 15 seconds, clicks the CTA into a working waitlist, receives confirmation within 5 minutes, sees a correct OG preview from any of the five channels, and appears in analytics under the right UTM source. Criterion: WHEN the launch phase is planned THE PLAN SHALL include the cold proof test as its checkpoint with all five observations as must-haves.
|
|
63
|
+
22. R-LAUNCH-22: For a public release, exactly one task cites this requirement to mark the first public activation action. It immediately follows and depends on the prepublication gate task citing R-ROAD-21, which in turn follows and depends on the latest hardening evidence task citing R-SEC-26. The gate records checked_at, hardening_revision, finding_counts, policy, verdict, and validates owner, justification, accepted_at, and expires_at for permitted Critical risks. Any hardening change invalidates it. Criterion: WHEN a link, package, store artifact, service, model, or infrastructure surface will become public THE PLAN SHALL cite R-LAUNCH-22 only on the first activation task and place the R-ROAD-21 gate immediately before it; IF no public surface exists THE PLAN SHALL record `public_release: false` and omit both tasks.
|
|
64
|
+
|
|
65
|
+
Banned-word replacement table for R-LAUNCH-6. Each slop word is replaced with the concrete claim it hides, not deleted:
|
|
66
|
+
|
|
67
|
+
| Banned word | Replace with |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| seamless | the actual step count ("in one step", "no config file") |
|
|
70
|
+
| powerful | the specific capability ("queries 10M rows", "runs offline") |
|
|
71
|
+
| robust | the threshold survived ("handles 500 rps", "retries for 24h") |
|
|
72
|
+
| effortless, streamline | the time saved, with a number |
|
|
73
|
+
| intelligent, cutting-edge | what the feature actually does, named |
|
|
74
|
+
| revolutionary, game-changing | the before/after difference, stated plainly |
|
|
75
|
+
| unlock, supercharge, empower, elevate | the verb for what the user actually does |
|
|
76
|
+
| best-in-class, leading, enterprise-grade, world-class | the evidence (benchmark, customer count, cert) or nothing |
|
|
77
|
+
|
|
78
|
+
## Task seeds
|
|
79
|
+
|
|
80
|
+
Replace each `<...>` placeholder with the plan's real domain or URL; one left in makes its Verify a shell syntax error.
|
|
81
|
+
|
|
82
|
+
- [ ] GP-xxx Write positioning document with substitution-tested sentences
|
|
83
|
+
- Files: docs/launch/POSITIONING.md
|
|
84
|
+
- Acceptance: four sentences present; each lists >=2 named competitors that fail substitution; three adjectives and three anti-adjectives; founder named
|
|
85
|
+
- Verify: grep -cE '^(Who|Replaces|Differently|Differentiator):' docs/launch/POSITIONING.md | grep -qx 4
|
|
86
|
+
- Requirements: R-LAUNCH-1, R-LAUNCH-2, R-LAUNCH-3
|
|
87
|
+
- [ ] GP-xxx Build five-section landing page with single above-the-fold CTA
|
|
88
|
+
- Files: site/index.html, site/styles.css
|
|
89
|
+
- Acceptance: sections hero, social-proof, features, pricing, cta in order; exactly one h1; feature grid has 3-6 tiles each naming a shipped capability; any pricing section is generated from the R-BIZ-7 catalog with no hand-typed price
|
|
90
|
+
- Verify: grep -c '<h1' site/index.html | grep -qx 1 && grep -oc 'data-section=' site/index.html | grep -qx 5
|
|
91
|
+
- Requirements: R-LAUNCH-4, R-LAUNCH-5, R-LAUNCH-8
|
|
92
|
+
- [ ] GP-xxx Run banned-word and voice audit on all launch copy
|
|
93
|
+
- Files: site/index.html, docs/launch/emails/
|
|
94
|
+
- Acceptance: zero banned-word hits above the fold; no AI self-reference in hero; second person and active voice on hero
|
|
95
|
+
- Verify: test -f site/index.html && ! grep -riE 'seamless|powerful|revolutionary|effortless|\bintelligent\b|cutting-edge|game-changing|\bunlock\b|supercharge|streamline|empower|elevate|robust|best-in-class|\bleading\b|world-class|enterprise-grade' site/index.html
|
|
96
|
+
- Requirements: R-LAUNCH-6, R-LAUNCH-7
|
|
97
|
+
- [ ] GP-xxx Ship launch-day SEO head and OG card to spec
|
|
98
|
+
- Files: site/index.html, site/public/og.png, site/public/robots.txt, site/public/sitemap.xml
|
|
99
|
+
- Acceptance: title <60 chars; meta description <160; canonical, OG, Twitter, JSON-LD tags present; no noindex on the indexable landing page (only the R-SEO-5 environment guard and routes noindexed by design emit it); og.png is 1200x630 and under 300KB
|
|
100
|
+
- Verify: grep -q 'rel="canonical"' site/index.html && ! grep -qi noindex site/index.html && identify -format '%wx%h' site/public/og.png | grep -qx 1200x630
|
|
101
|
+
- Requirements: R-LAUNCH-9, R-LAUNCH-10
|
|
102
|
+
- [ ] GP-xxx Wire double opt-in waitlist and email sequence
|
|
103
|
+
- Files: site/waitlist.html, api/subscribe.ts, docs/launch/emails/sequence.md
|
|
104
|
+
- Acceptance: form has <=2 fields; confirmation email sent before list entry; welcome within 5 min; sequence.md enumerates pre-launch, launch-day, and D+1/D+3/D+7 emails each with a purpose line
|
|
105
|
+
- Verify: grep -c '^## Email' docs/launch/emails/sequence.md | grep -qE '^[6-9]$' && grep -q 'double opt-in' api/subscribe.ts
|
|
106
|
+
- Requirements: R-LAUNCH-12, R-LAUNCH-13
|
|
107
|
+
- [ ] GP-xxx Authenticate sending domain
|
|
108
|
+
- Files: docs/launch/dns-email-auth.md
|
|
109
|
+
- Acceptance: SPF, DKIM, DMARC records documented with values; unsubscribe mechanism named; GDPR consent noted if applicable
|
|
110
|
+
- Verify: dig +short TXT _dmarc.<domain> | grep -q 'v=DMARC1'
|
|
111
|
+
- Requirements: R-LAUNCH-14
|
|
112
|
+
- [ ] GP-xxx Write per-channel post plans and UTM registry
|
|
113
|
+
- Files: docs/launch/channels.md, docs/launch/utm-registry.md
|
|
114
|
+
- Acceptance: each in-scope channel has all seven fields; PH/HN/Reddit/LinkedIn etiquette rules stated per channel; every planned link carries registered UTM values
|
|
115
|
+
- Verify: grep -c '^| utm_' docs/launch/utm-registry.md | grep -qE '[1-9]' && grep -q 'hunter' docs/launch/channels.md
|
|
116
|
+
- Requirements: R-LAUNCH-15, R-LAUNCH-16, R-LAUNCH-18
|
|
117
|
+
- [ ] GP-xxx Build D-7 to D+7 runbook with telemetry checkpoint
|
|
118
|
+
- Files: docs/launch/RUNBOOK.md
|
|
119
|
+
- Acceptance: every row has date, timezone, owner, pass criterion; five-event waterfall staging test row before D-1; five-channel OG preview row at or before D-1; retrospective row with pre-set targets; cold proof test as final checkpoint
|
|
120
|
+
- Verify: grep -c 'pass:' docs/launch/RUNBOOK.md | grep -qE '^[1-9][0-9]*$' && grep -q 'cold proof' docs/launch/RUNBOOK.md
|
|
121
|
+
- Requirements: R-LAUNCH-11, R-LAUNCH-17, R-LAUNCH-19, R-LAUNCH-20, R-LAUNCH-21
|
|
122
|
+
- [ ] GP-xxx Run fresh prepublication gate before public activation
|
|
123
|
+
- Files: docs/release/PREPUBLICATION.md
|
|
124
|
+
- Depends on: GP-HARDENING
|
|
125
|
+
- Acceptance: records checked_at later than current hardening evidence, matching hardening_revision, finding_counts, policy, and verdict; validates owner, justification, accepted_at, and expires_at for permitted Critical risks; any later hardening change invalidates the pass
|
|
126
|
+
- Verify: test -f docs/security/HARDENING.md && test "$(git hash-object docs/security/HARDENING.md)" = "$(awk '/^hardening_revision:/ {print $2}' docs/release/PREPUBLICATION.md)" && grep -q '^verdict: pass$' docs/release/PREPUBLICATION.md
|
|
127
|
+
- Requirements: R-ROAD-21
|
|
128
|
+
|
|
129
|
+
- [ ] GP-xxx Perform the first public activation
|
|
130
|
+
- Files: deployment or publication target for the selected product form
|
|
131
|
+
- Depends on: GP-PREPUBLICATION
|
|
132
|
+
- Acceptance: the selected link, package, store artifact, service, model, or infrastructure surface becomes public only after the immediately preceding prepublication gate passes; a package, store artifact, or model replaces the Verify probe with its registry or store availability query
|
|
133
|
+
- Verify: curl -fsS -o /dev/null <public-url>
|
|
134
|
+
- Requirements: R-LAUNCH-22
|
|
135
|
+
|
|
136
|
+
## Self-audit rubric
|
|
137
|
+
|
|
138
|
+
- Positioning discipline (20): four sentences present, each substitution-tested against >=2 named competitors with the failing swaps recorded; tone words and founder voice specified; mode and tier declared and scoping the section.
|
|
139
|
+
- Landing page and copy (20): five sections in order with a single above-the-fold CTA; feature grid 3-6 tiles all traced to shipped or planned features; banned-word audit and voice rules wired into task acceptance as grep-verifiable conditions; brand tokens named, not defaulted.
|
|
140
|
+
- SEO and OG cards (15): all 12 SEO checklist items present as command-checkable acceptance conditions including the noindex grep; OG card spec complete with dimension and size verify; five-channel preview scheduled before D-1 and gating link-sharing tasks.
|
|
141
|
+
- Waitlist and email funnel (15): double opt-in with 5-minute welcome; every sequence email enumerated with a purpose; SPF/DKIM/DMARC scheduled early in wave order with a DNS verify command; unsubscribe and consent handled.
|
|
142
|
+
- Channels and etiquette (10): every in-scope channel has all seven post-plan fields; venue etiquette (PH timing and hunter, Show HN title rules, Reddit 9:1, LinkedIn founder voice) encoded as acceptance conditions, not advice.
|
|
143
|
+
- Telemetry and attribution (10): UTM taxonomy defined with a registry; five-event waterfall named and staging-tested before launch; amplification list named with founder as primary responder.
|
|
144
|
+
- Runbook and sibling coupling (10): D-7 to D+7 calendar with owners and pass criteria; public activation follows a fresh matching hardening revision and complete risk checks; status page is out-of-band; no launch sits atop a migration; cold proof closes the phase.
|
|
145
|
+
|
|
146
|
+
Total: 100. Below 85, revise the launch section before emission.
|
|
147
|
+
|
|
148
|
+
## Anti-patterns refused
|
|
149
|
+
|
|
150
|
+
- AI-slop landing: banned words above the fold, gradient hero, stock illustrations of abstract people pointing at charts. The planner writes the banned-word grep into copy acceptance and maps each slop word to its concrete replacement.
|
|
151
|
+
- Hero fatigue: a hero sentence that stays plausible when a competitor's name swaps in. The planner runs the substitution test at plan time and rewrites until the swap makes the sentence false.
|
|
152
|
+
- Spec-sheet positioning: feature tiles that are category labels (Fast, Secure, Scalable) or a grid over 6 tiles. The planner caps the grid at 6 and requires every tile to name a product-specific capability.
|
|
153
|
+
- Vapor landing: the page promises features the build section does not deliver. The planner traces every tile to a GP-task or shipped feature and deletes untraceable tiles.
|
|
154
|
+
- Paper waitlist: a capture form with no double opt-in, no welcome email, no sequence. The planner refuses to plan a form without the full funnel behind it.
|
|
155
|
+
- Unrendered OG card: wrong dimensions, over 300KB, illegible at half size, or never previewed. The planner schedules the five-channel preview before D-1 because LinkedIn's 7-day cache makes a wrong card wrong for the whole window.
|
|
156
|
+
- Silent launch: a shared link without UTM params, so signups cannot be attributed. The planner treats a UTM-less link as a blocking defect and registers all values upfront.
|
|
157
|
+
- Attribution blind: analytics installed but no conversion-waterfall events. The planner names the five events and requires a staging test that fires each one.
|
|
158
|
+
- Channel etiquette violation: a Show HN title containing launch or all-caps, a PH post on Friday through Sunday or without a confirmed hunter, a Reddit post into a sub with zero comment history, a LinkedIn post in press-release voice. The planner encodes each venue's have-nots as acceptance conditions on the post task.
|
|
159
|
+
- Silent fade: no D+1 through D+7 follow-up and no retrospective, so the launch teaches nothing. The planner puts the follow-up emails and the retrospective with pre-set targets on the runbook calendar before launch day.
|
|
160
|
+
- Same-infra status page: a status page that goes down with the app. The planner hosts it out-of-band and cross-references the observability section.
|
|
161
|
+
- Launch atop a migration: a launch date landing mid expand/contract. The planner reads the deploy section's schedule and sequences the launch after the contract phase completes.
|
|
162
|
+
- Stale release authorization: a prepared launch trusts a prepublication pass older than hardening. The planner invalidates the pass on any hardening change and schedules the fresh revision-bound check immediately before public activation.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# LLM integration planning module
|
|
2
|
+
|
|
3
|
+
Plans every section of PLAN.mdx that touches a language model: prompts, model config, SDK mechanics, reliability, security boundaries, agents, RAG, structured output, cost, latency, evals, and observability. The orchestrator loads this module whenever the project makes any model or embeddings call (chat assistant, extraction pipeline, RAG QA, tool-using agent, batch enrichment); it is excluded, with a stated reason in the applicability matrix, only when the project has no LLM integration at all.
|
|
4
|
+
|
|
5
|
+
## Lineage
|
|
6
|
+
|
|
7
|
+
Descends from llmauditor, the read-only end-to-end audit of LLM integrations that scores twelve dimensions (LLMSEC through AGENT), hunts paper controls, and calibrates every finding to the lethal trifecta of private data plus untrusted content plus external action. The discipline that carries over: verify against the shipped request payload, not the prompt's wording ("respond only with JSON" is not structured output, "only access this user's records" is not authorization); score each defect once by its owning dimension; treat all model output and retrieved content as untrusted; and fix at the boundary and the sink, never by editing the prompt to ask nicely. This module inverts every audit check into a plan-time obligation so llmauditor, run at the end, finds the controls already wired.
|
|
8
|
+
|
|
9
|
+
## Decisions to force
|
|
10
|
+
|
|
11
|
+
1. Usage paradigm and exposure profile. Which of single-shot, chat assistant, extraction pipeline, RAG QA, tool-using agent, multi-agent, or batch is this, and is it internet-facing with sensitive data or an internal summarizer? Hard to reverse because every other decision (isolation architecture, eval design, cost model, which conditional dimensions apply) keys off it, and audit calibration depends on it. Options: declare one primary paradigm per feature. Default: the narrowest paradigm that satisfies the requirement; a local summarizer is not planned to an internet-facing-agent bar.
|
|
12
|
+
2. Trust-boundary architecture for injection. When untrusted content (RAG docs, tool results, web, email, files) meets a model that can act, is isolation structural (dual-LLM or quarantined-LLM pattern, capability enforcement) or prompt-level? Hard to reverse because retrofitting a quarantined-LLM split into a monolithic agent rewrites the orchestration core. Options: single model with sink validation only (low-impact), dual-LLM quarantine, capability enforcement. Default: sink validation everywhere; structural isolation mandatory for any lethal-trifecta path.
|
|
13
|
+
3. Provider and data governance posture. Which provider, under what data terms (ZDR or modified abuse monitoring, store settings, region and residency, executed DPA or BAA), with what PII minimization before send? Hard to reverse because it is contractual and legal, and conversation logs already retained cannot be un-retained. Default: minimize and redact the provider payload itself (not just logs), set retention TTLs, and execute the DPA before the first production call; ZDR for regulated data.
|
|
14
|
+
4. Embedding model and dimension (RAG only). One pinned model and dimension shared by ingestion and query, version stored with the index. Hard to reverse because changing it forces a full corpus re-embed and any mismatch makes retrieval silently near-random. Default: one constant read by both paths, index metric matching the embedding's training metric, a reindex migration path planned from day one.
|
|
15
|
+
5. Agent autonomy and credential model (agents only). Which tools are destructive, what gets human approval, and whether credentials are per-tool least-privilege scoped to the caller or one broad ambient key. Hard to reverse because a confused-deputy credential woven through the tool layer is a rewrite to unwind. Default: HITL approval default-on with dry-run for send, delete, transfer, deploy, shell, and file-write; per-tool credentials scoped to the caller's identity; sandbox, egress allowlist, path jail.
|
|
16
|
+
6. Structured output mechanism. Native structured outputs or tool calling versus prose parsing. Hard to reverse because every downstream consumer binds to the extraction shape. Default: native structured outputs with strict schemas (additionalProperties false, all fields required); tool calling where the provider lacks strict mode; prose parsing refused.
|
|
17
|
+
7. Prompt assembly ownership. One central versioned prompt registry versus literals scattered across call sites. Hard to reverse only by grep-and-pray migration once drift sets in. Default: a single registry module with version ids; call sites import, never inline.
|
|
18
|
+
8. Model pinning and change policy. Pinned dated snapshots in one config constant versus floating aliases, and whether model bumps are eval-gated. Cheap to change technically, expensive behaviorally: an unpinned alias means silent behavior changes in production with no diff to review. Default: pinned snapshots, per-environment selection (cheap models in test and dev), every bump a reviewed change blocked on the eval baseline.
|
|
19
|
+
|
|
20
|
+
## Plan requirements
|
|
21
|
+
|
|
22
|
+
The inversion pass distributes these onto tasks via Requirements: lines. De-duplication follows llmauditor's ownership map: each obligation lives in exactly one requirement (injection boundary in R-LLM-1 with construction hygiene in R-LLM-2, schema-validate-before-use in R-LLM-14, loop control in R-LLM-22, cache spend in R-LLM-15, swallowed errors in R-LLM-13, eval gate in R-LLM-17), so a task never satisfies the same check twice under two names. R-LLM-20 and R-LLM-21 apply only when the plan includes retrieval, and R-LLM-22 only when it includes an agent loop; otherwise the module disposition drops them (`dropped-by archetype`) with the reason.
|
|
23
|
+
|
|
24
|
+
1. R-LLM-1: PLAN.mdx declares the usage paradigm and exposure profile per LLM feature, and contains a trust-boundary map naming every untrusted content source, every privileged channel, every output sink, and any lethal-trifecta path with its planned mitigation. Criterion: WHEN the plan includes any model call, THE PLAN SHALL contain a trust-boundary map in which each lethal-trifecta path (private data + untrusted content + external action) names a structural mitigation, not a prompt instruction.
|
|
25
|
+
2. R-LLM-2: The plan specifies a central versioned prompt registry with strict role separation: durable instructions in the system or developer role, untrusted values only in the user role, delimited and labeled as data, with delimiters documented as hygiene and never as the security boundary. Criterion: WHEN a task builds a prompt, THE PLAN SHALL route it through the registry and SHALL NOT place user or retrieved content in the system role.
|
|
26
|
+
3. R-LLM-3: The plan states a context assembly policy: long documents near the top, instructions next, question at the end; a token budget with windowing or summarization for history and chunks; and a byte-stable cache-friendly prefix with volatile values (timestamps, request ids) moved to the end and deterministic serialization. Criterion: IF a feature assembles multi-part context, THE PLAN SHALL state its token budget and ordering, and SHALL place no volatile value before the cache breakpoint.
|
|
27
|
+
4. R-LLM-4: The plan treats all model output as untrusted at every sink: parameterized SQL, argv arrays instead of shell strings, context-aware HTML encoding, URL allowlists on any model-emitted URL fetch, no eval or exec, and markdown-image auto-fetch egress controlled. Criterion: WHEN model output reaches a code, SQL, HTML, shell, or URL sink, THE PLAN SHALL name the validation or encoding applied at that sink.
|
|
28
|
+
5. R-LLM-5: The plan keeps secrets and access-control rules out of the system prompt and places every security decision in deterministic code; the system prompt is assumed public. Criterion: IF an authorization or filtering rule exists, THE PLAN SHALL implement it in code with the prompt at most restating it.
|
|
29
|
+
6. R-LLM-6: The plan sets data governance deliberately: PII minimization or redaction applied to the provider payload before send, provider data controls chosen (ZDR, store settings, region, DPA or BAA), retention TTLs on conversation logs and traces, and no cross-user or cross-session memory sharing. Criterion: WHEN regulated or personal data can reach a provider, THE PLAN SHALL name the minimization step on the request path and the executed data agreement.
|
|
30
|
+
7. R-LLM-7: The plan pins model ids as dated snapshots in one config constant (never floating aliases or -latest), selects models per environment, schedules a deprecation review against provider pages, and makes every model bump a reviewed eval-gated change. Criterion: WHEN the plan names a model, THE PLAN SHALL use a pinned dated snapshot held in a single config location.
|
|
31
|
+
8. R-LLM-8: The plan specifies sampling and limits per task: temperature near 0 for extraction, classification, structured output, and tool arguments; the correct output-cap parameter for the surface, sized to expected output; and a reasoning-budget policy per path rather than statically maxed or disabled. Criterion: IF a task is deterministic-extraction shaped, THE PLAN SHALL pin its temperature and output cap explicitly.
|
|
32
|
+
9. R-LLM-9: Any routing or fallback design in the plan has a quality-reflecting escalation trigger that can actually fire and shape-compatible, reachable fallback models. Criterion: IF the plan includes routing or cascade, THE PLAN SHALL state the trigger condition and demonstrate each fallback is reachable and request-shape compatible.
|
|
33
|
+
10. R-LLM-10: The plan branches on stop_reason, finish_reason, and refusal on every call, handling truncation, tool_use, pause_turn, and content_filter distinctly; parsing never proceeds on an unchecked stop reason. Criterion: WHEN a task consumes a model response, THE PLAN SHALL gate parsing on the stop reason with a named branch per outcome.
|
|
34
|
+
11. R-LLM-11: The plan uses native SDK mechanics: structured outputs or tool calling instead of prose parsing, prompt caching wired mechanically (cache marker placement on a stable front-loaded prefix), Batch API for bulk offline work, the SDK client constructed once at module scope with the async client in async paths, and one embedding model and dimension shared by query and document paths. Criterion: IF bulk offline generation exists, THE PLAN SHALL route it through the Batch API rather than looping the sync endpoint.
|
|
35
|
+
12. R-LLM-12: The plan sets reliability mechanics: a timeout on every model call plus an overall deadline on multi-step operations; exponential backoff with jitter; a retry predicate covering RateLimitError, 429, 529, and 503 that honors Retry-After and never retries non-retryable 4xx; and stable idempotency keys on every side-effecting retried operation. Criterion: WHEN a model call can be retried, THE PLAN SHALL state the retry predicate, the backoff shape, and the idempotency key source.
|
|
36
|
+
13. R-LLM-13: The plan forbids swallowed errors (no except-pass, no return-empty-string on failure), bounds fan-out concurrency, and includes a circuit breaker plus a fallback model or explicit graceful-degradation branch, with a recovery policy for truncation and refusal stops. Criterion: IF a model call fails, THE PLAN SHALL show the failure surfacing as a log, metric, or re-raise, never as a silent empty answer.
|
|
37
|
+
14. R-LLM-14: The plan schema-validates every parsed model response before downstream use (Pydantic, Zod, or jsonschema) with strict schemas (additionalProperties false, all fields required, real types, strict mode meeting its constraints); parse-failure retries feed the validation error back to the model; tool arguments are re-validated against the tool's own schema after confirming the expected tool was called; and no security or correctness decision rests solely on a model-returned boolean. Criterion: WHEN parsed model output crosses into application code, THE PLAN SHALL name the schema and the validation call site.
|
|
38
|
+
15. R-LLM-15: The plan maps model tier to task value (no flagship on trivial high-volume paths), enforces per-user or per-tenant token and dollar quotas before the call (model-call quotas a plan sells are R-BIZ-10 quotas), sets loop budgets (max steps, cumulative tokens, wall clock) distinct from per-call caps, and captures the usage block for per-request, per-user, per-feature, and per-model cost attribution, with response and embedding caches keyed by content hash including every output-changing parameter. Criterion: WHEN a feature has unbounded call volume, THE PLAN SHALL name the pre-call quota check and the cost attribution sink.
|
|
39
|
+
16. R-LLM-16: The plan streams end-to-end on user-facing paths (verified unbuffered through server and proxy), parallelizes independent calls, batches embeddings as arrays, keeps sync clients out of async handlers, moves non-inline generation off the critical path, and puts lightweight models on latency-sensitive paths such as routing, classification, autocomplete, and guardrails. Criterion: IF a path is user-facing and latency-sensitive, THE PLAN SHALL state whether it streams and which model tier serves it.
|
|
40
|
+
17. R-LLM-17: The plan defines a golden eval dataset per quality-critical feature including negative, adversarial, and refusal cases; a scoring script appropriate to the output (not exact-match on open-ended generation); and a CI gate with a committed baseline and regression threshold that blocks prompt, few-shot, and model-id changes, using mocks or cassettes so CI never hits a live model and pinning temperature to 0 for asserted tests. Criterion: WHEN a prompt or model change lands, THE PLAN SHALL require a passing eval run diffed against the committed baseline.
|
|
41
|
+
18. R-LLM-18: Where the plan uses LLM-as-judge or evaluates agents, the judge has a rubric, randomized pairwise order, and a different model family from the system under test; agent evals assert on trajectory (tools called, order, termination), not just final text; RAG features get a separate retrieval eval (recall@k, precision@k, MRR, or nDCG on labeled query-doc pairs) plus a grounding check. Criterion: IF the plan includes a judge, THE PLAN SHALL name its rubric, ordering randomization, and model family.
|
|
42
|
+
19. R-LLM-19: The plan wires observability: a tracing wrapper on every call capturing prompt, response, model, latency, outcome, and usage; a shared trace or conversation id threaded through all agent and RAG child steps; redaction on the logging path with retention TTLs; p95 and p99 latency plus typed error metrics (429 versus timeout distinguishable) with alerts on cost, error rate, and latency; and a user-feedback signal joinable to traces. Criterion: WHEN any model call executes, THE PLAN SHALL show it passing through the tracing wrapper with the usage block recorded.
|
|
43
|
+
20. R-LLM-20: For RAG, the plan pins one embedding model and dimension across ingestion and query with the version stored in the index, matches the index metric to the embedding, defines a reindex and re-embed path triggered by edits, deletes, and model bumps, uses structure-aware chunking with overlap under the embedding token limit, and carries source, page, and chunk-id provenance into the prompt for verifiable citations. Criterion: IF the plan includes a vector store, THE PLAN SHALL name the single embedding constant both paths read and the reindex trigger.
|
|
44
|
+
21. R-LLM-21: The plan tunes retrieval: hybrid dense plus BM25 with rank fusion where the corpus contains exact identifiers or codes, reranker output actually used for ordering, top-k with a relevance threshold and an explicit empty-result branch, ANN parameters sized to the corpus, asymmetric query-versus-passage prefixes where the model requires them, and per-tenant ACL filters applied at query time as defense in depth. Criterion: WHEN retrieval feeds generation, THE PLAN SHALL define the empty-result branch and the query-time ACL filter.
|
|
45
|
+
22. R-LLM-22: For agents, the plan gives every tool a rich schema (meaningful description, per-field descriptions, enums, required arrays), hard loop bounds (max iterations, cumulative tokens, wall clock) plus a no-progress detector, tool errors returned as structured results that never crash the loop, tool output truncated before re-entering context, destructive tools gated behind default-on HITL approval with a dry-run mode, MCP servers pinned with integrity re-verification, structured multi-agent handoffs with scoped credentials, bounded provenance-tagged tenant-scoped memory, and a goal or verification termination predicate rather than termination by absence of a tool call. Criterion: IF the plan includes an agent loop, THE PLAN SHALL state its iteration, token, and wall-clock bounds and its termination predicate, and SHALL NOT present a per-call output cap as the loop bound.
|
|
46
|
+
23. R-LLM-23: The plan eliminates paper controls by construction and prefers one central mechanism over scattered leaves: one prompt assembly, one validated output layer, one pinned model config, one eval gate, every guardrail on the blocking request path, every tracer attached, every cache marker before volatile content; and it maintains a strengths-to-preserve inventory that later changes must not regress. Criterion: WHEN a control is planned, THE PLAN SHALL name the task that wires it into the request path, so no control exists only as an unreferenced module.
|
|
47
|
+
|
|
48
|
+
## Task seeds
|
|
49
|
+
|
|
50
|
+
- [ ] GP-xxx Create pinned model configuration module
|
|
51
|
+
- Files: src/llm/models.ts, src/llm/config.ts
|
|
52
|
+
- Depends on: none
|
|
53
|
+
- Acceptance: exactly one file exports model ids; every id is a dated snapshot (no -latest, no bare alias); per-environment selection maps test and dev to a cheap tier; a comment names the deprecation review cadence
|
|
54
|
+
- Verify: ! grep -n latest src/llm/models.ts && grep -qE '20[0-9]{2}' src/llm/models.ts
|
|
55
|
+
- Requirements: R-LLM-7, R-LLM-8
|
|
56
|
+
- [ ] GP-xxx Build versioned prompt registry with role separation
|
|
57
|
+
- Files: src/llm/prompts/registry.ts, src/llm/prompts/versions/
|
|
58
|
+
- Depends on: GP-xxx pinned model configuration
|
|
59
|
+
- Acceptance: all prompt templates live in the registry with a version id; system-role templates contain no user or retrieved-content interpolation slot; untrusted values are injected only into user-role slots labeled as data; volatile values serialize after the cache breakpoint
|
|
60
|
+
- Verify: test -f src/llm/prompts/registry.ts && test -z "$(grep -rlE --include='*.ts' "role: ['\"]system" src | grep -v '^src/llm/prompts/')"
|
|
61
|
+
- Requirements: R-LLM-2, R-LLM-3
|
|
62
|
+
- [ ] GP-xxx Implement validated output layer
|
|
63
|
+
- Files: src/llm/output/schemas.ts, src/llm/output/parse.ts
|
|
64
|
+
- Depends on: none
|
|
65
|
+
- Acceptance: every response parse gates on stop_reason first with named branches for truncation, refusal, and content_filter; every schema sets additionalProperties false and marks all fields required; parse-failure retry feeds the validation error back into the retry prompt
|
|
66
|
+
- Verify: grep -q 'additionalProperties: false' src/llm/output/schemas.ts && grep -q stop_reason src/llm/output/parse.ts
|
|
67
|
+
- Requirements: R-LLM-10, R-LLM-14
|
|
68
|
+
- [ ] GP-xxx Wrap all model calls in a reliability and tracing client
|
|
69
|
+
- Files: src/llm/client.ts, src/llm/tracing.ts
|
|
70
|
+
- Depends on: GP-xxx pinned model configuration
|
|
71
|
+
- Acceptance: a single module-scope client with per-call timeout and operation deadline; retry predicate names RateLimitError and 429/529/503 and honors Retry-After; every call records prompt, response, model, latency, outcome, and the usage block under a shared trace id; redaction runs on the logging path
|
|
72
|
+
- Verify: grep -qi retry-after src/llm/client.ts && grep -q usage src/llm/tracing.ts
|
|
73
|
+
- Requirements: R-LLM-12, R-LLM-13, R-LLM-15, R-LLM-19
|
|
74
|
+
- [ ] GP-xxx Enforce trust boundaries at every model-output sink
|
|
75
|
+
- Files: src/llm/boundaries.ts, src/llm/sinks/
|
|
76
|
+
- Depends on: none
|
|
77
|
+
- Acceptance: SQL built from model output is parameterized; shell dispatch uses argv arrays; model-emitted URLs pass an allowlist before fetch; no eval or exec on model output anywhere in src
|
|
78
|
+
- Verify: ! grep -rnE --include='*.ts' --exclude='*.test.ts' '(^|[^A-Za-z0-9_.])eval\(|new Function\(' src
|
|
79
|
+
- Requirements: R-LLM-1, R-LLM-4, R-LLM-5
|
|
80
|
+
- [ ] GP-xxx Stand up eval harness with CI regression gate
|
|
81
|
+
- Files: evals/golden/, evals/run.ts, .github/workflows/evals.yml, evals/baseline.json
|
|
82
|
+
- Depends on: GP-xxx validated output layer
|
|
83
|
+
- Acceptance: golden dataset includes negative, adversarial, and refusal cases; CI invokes the eval script on changes to prompts, few-shots, or model ids; a committed baseline with a regression threshold blocks merge; tests use cassettes with temperature 0, never a live provider
|
|
84
|
+
- Verify: grep -q evals/run .github/workflows/evals.yml && test -f evals/baseline.json
|
|
85
|
+
- Requirements: R-LLM-17, R-LLM-18
|
|
86
|
+
- [ ] GP-xxx Pin embedding pipeline and query-time ACL filter (RAG projects)
|
|
87
|
+
- Files: src/rag/embeddings.ts, src/rag/query.ts, src/rag/reindex.ts
|
|
88
|
+
- Depends on: GP-xxx pinned model configuration
|
|
89
|
+
- Acceptance: one exported embedding model and dimension constant imported by both ingestion and query; the query builder passes a tenant ACL filter parameter on every search; a reindex script exists and is referenced by a deploy hook or cron entry
|
|
90
|
+
- Verify: test "$(grep -rn EMBEDDING_MODEL src/rag | grep -c import)" -ge 2 && grep -q filter src/rag/query.ts
|
|
91
|
+
- Requirements: R-LLM-20, R-LLM-21
|
|
92
|
+
- [ ] GP-xxx Bound the agent loop and gate destructive tools (agent projects)
|
|
93
|
+
- Files: src/agent/loop.ts, src/agent/tools/, src/agent/approval.ts
|
|
94
|
+
- Depends on: GP-xxx reliability and tracing client
|
|
95
|
+
- Acceptance: the loop enforces max iterations, cumulative token budget, and wall-clock deadline as separate checks; destructive tools call the approval gate default-on with a dry-run mode; tool errors return structured results with an error flag; termination requires the goal predicate, not merely no tool call
|
|
96
|
+
- Verify: grep -q maxIterations src/agent/loop.ts && grep -q approval src/agent/tools/*.ts
|
|
97
|
+
- Requirements: R-LLM-22
|
|
98
|
+
|
|
99
|
+
## Self-audit rubric
|
|
100
|
+
|
|
101
|
+
Weights mirror llmauditor so the plan is scored the way it will be audited. RAG and AGENT are conditional: when either does not apply, drop it and re-normalize the remainder proportionally.
|
|
102
|
+
|
|
103
|
+
- Security, trust boundaries, and data governance (17): full marks require a trust-boundary map with every lethal-trifecta path structurally mitigated, all sinks validated, no secrets or authz in prompts, PII minimized on the provider payload, and provider data controls plus retention TTLs stated. (R-LLM-1, 4, 5, 6)
|
|
104
|
+
- Prompt construction and context (12): full marks require the central versioned registry, strict role separation, ordering policy, token budget, and cache-stable prefix. (R-LLM-2, 3)
|
|
105
|
+
- Model selection and configuration (10): full marks require pinned dated snapshots in one constant, per-environment selection, per-task sampling and output caps, and eval-gated bumps with a deprecation review. (R-LLM-7, 8, 9)
|
|
106
|
+
- Provider API and SDK usage (10): full marks require stop-reason branching everywhere, native structured output or tool calling, mechanical prompt caching, Batch API for bulk work, and correct client lifecycle. (R-LLM-10, 11)
|
|
107
|
+
- Reliability (10): full marks require timeouts plus deadlines, correct retry predicates with jitter and Retry-After, idempotency keys, bounded fan-out, a breaker, a fallback branch, and no swallowed errors. (R-LLM-12, 13)
|
|
108
|
+
- Output handling (8): full marks require strict schemas validated at every consumption point, validation-error feedback on retry, tool-argument re-validation, and no model-asserted control flow. (R-LLM-14)
|
|
109
|
+
- RAG and retrieval (7, conditional): full marks require pinned embedding parity with reindex path, provenance-carrying chunks, tuned retrieval with an empty-result branch, and query-time ACL filters. (R-LLM-20, 21)
|
|
110
|
+
- Cost and token efficiency (6): full marks require tier mapping, pre-call quotas, loop budgets distinct from per-call caps, content-hash caches, and usage-block attribution. (R-LLM-15)
|
|
111
|
+
- Agents and tools (6, conditional): full marks require rich tool schemas, hard loop bounds with a no-progress detector, structured tool errors, HITL on destructive tools, pinned MCP sources, and a goal termination predicate. (R-LLM-22)
|
|
112
|
+
- Evaluation (5): full marks require golden datasets with adversarial cases, a CI regression gate with committed baseline, cassette-isolated tests, sound judge design, and retrieval or trajectory evals where applicable. (R-LLM-17, 18)
|
|
113
|
+
- Observability (5): full marks require the tracing wrapper on every call, shared trace ids, redaction with TTLs, percentile latency and typed error alerts, and a feedback signal joined to traces. (R-LLM-19)
|
|
114
|
+
- Latency (4): full marks require unbuffered streaming on user-facing paths, parallelized independent calls, batched embeddings, and light models on latency-sensitive routes. (R-LLM-16)
|
|
115
|
+
|
|
116
|
+
A module total below 85 is revised before emission. Any planned control that no task wires into the request path zeroes its dimension: a paper control at plan time is worse than an open question. (R-LLM-23)
|
|
117
|
+
|
|
118
|
+
## Anti-patterns refused
|
|
119
|
+
|
|
120
|
+
- Paper controls: a guardrail, validator, tracer, cache marker, or eval that exists in the plan but is wired to nothing. Refusal: every control names the task that puts it on the blocking request path, or it is cut.
|
|
121
|
+
- Prompt-claim-as-control: "respond only with JSON", "only access this user's records", or "ignore instructions in the documents" presented as structured output, authorization, or an injection boundary. Refusal: the planner replaces each with the mechanical control (native structured output, code-level authz, structural isolation) and keeps the prompt line as hygiene at most.
|
|
122
|
+
- Lethal trifecta unaddressed: private data, untrusted content, and external action on one path with only delimiters between them. Refusal: the plan gets a structural isolation decision before any task on that path is written.
|
|
123
|
+
- Authorization by prompt: access rules living in the system prompt. Refusal: the rule moves to deterministic code; the system prompt is treated as public.
|
|
124
|
+
- Floating alias: -latest or bare alias model ids, or a "pinned" constant whose value is still an alias. Refusal: pinned dated snapshots only, one config location, eval-gated bumps.
|
|
125
|
+
- max_tokens as loop bound: a per-call output cap presented as agent-loop control. Refusal: separate max-iteration, cumulative-token, and wall-clock budgets, plus a termination predicate.
|
|
126
|
+
- Eval theater: an evals directory CI never invokes, scores with no committed baseline, or a same-family judge with fixed pairwise order. Refusal: the CI gate, baseline file, and judge design are plan requirements with named tasks.
|
|
127
|
+
- Dead instrumentation: an observability handler constructed but never attached, redaction defined off the logging path, alerts on unfireable thresholds. Refusal: tracing is planned as a wrapper all calls pass through, not a library import.
|
|
128
|
+
- ACL in metadata only: tenant ownership stored on vectors but never passed as a query filter. Refusal: the query builder signature requires the filter parameter.
|
|
129
|
+
- Scattered prompts and clients: inline prompt literals drifting across files, per-request client construction in handlers. Refusal: one registry, one module-scope client, enforced by task acceptance greps.
|
|
130
|
+
- Swallowed failure: except-pass or return-empty turning a model error into a silent wrong answer. Refusal: every failure branch logs, emits a metric, or re-raises; the plan shows which.
|
|
131
|
+
- Fear-calibrated overbuild: tiered routing, dual-LLM isolation, or agent sandboxing demanded for a local single-user summarizer. Refusal: controls scale to the declared exposure profile from R-LLM-1; absence of routing under homogeneous load is not a defect.
|
|
132
|
+
- Exploit inclusion: writing a working jailbreak or injection payload into the plan as a test case. Refusal: adversarial eval cases describe the attack class and expected refusal, never a working payload.
|