shapeup-sdlc 3.18.2 → 4.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.
Files changed (141) hide show
  1. package/.claude/settings.local.example.json +2 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/AGENTS.md +115 -56
  4. package/README.md +101 -143
  5. package/SECURITY.md +16 -25
  6. package/agents/orient.md +14 -0
  7. package/agents/qa-edge-hunter.md +13 -0
  8. package/agents/spec-evaluator.md +14 -0
  9. package/agents/task-executor.md +14 -0
  10. package/bin/init.mjs +13 -16
  11. package/bin/lib/grant.mjs +8 -19
  12. package/commands/build.md +9 -14
  13. package/commands/eval.md +3 -3
  14. package/commands/hammer.md +9 -5
  15. package/commands/retro.md +12 -11
  16. package/commands/scopes.md +1 -12
  17. package/commands/ship.md +45 -88
  18. package/commands/wire.md +1 -8
  19. package/hooks/dispatch-receipt.mjs +94 -8
  20. package/hooks/hooks.json +0 -41
  21. package/hooks/lib/decision.mjs +6 -9
  22. package/hooks/lib/tier.mjs +50 -0
  23. package/hooks/sandbox-guard.mjs +140 -64
  24. package/kernel/gate.mjs +203 -22
  25. package/kernel/harness.mjs +20 -67
  26. package/kernel/init/run.mjs +175 -523
  27. package/kernel/lib/contract.mjs +9 -93
  28. package/kernel/lib/floor.mjs +64 -0
  29. package/kernel/lib/paths.mjs +39 -112
  30. package/kernel/order.mjs +157 -0
  31. package/kernel/probe/digest.mjs +2 -38
  32. package/kernel/schemas/domain.schema.json +146 -1125
  33. package/kernel/schemas/work-order.schema.json +8 -4
  34. package/kernel/schemas/work-result.schema.json +1 -1
  35. package/kernel/verify/envelope.mjs +2 -2
  36. package/kernel/verify/skills.mjs +27 -8
  37. package/kernel/verify/t0.mjs +2 -2
  38. package/package.json +4 -2
  39. package/skills/building/SKILL.md +144 -0
  40. package/skills/building/resources/gates.md +76 -0
  41. package/skills/building/resources/guidance.md +23 -0
  42. package/skills/{translator/references/preservation-rules.md → building/resources/intake-preservation.md} +1 -1
  43. package/skills/building/resources/intake.md +157 -0
  44. package/skills/building/resources/orders.md +69 -0
  45. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/doc-schemas.md +1 -1
  46. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/task-generation.md +13 -13
  47. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/test-surface.md +6 -7
  48. package/skills/building/resources/plan-scopes.md +95 -0
  49. package/skills/building/resources/plan-spec.md +102 -0
  50. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/_index.tmpl.md +1 -1
  51. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/assess-report.tmpl.md +10 -11
  52. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/run-state.tmpl.md +4 -4
  53. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/scope-summary.tmpl.md +2 -2
  54. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/synthesis.tmpl.md +4 -4
  55. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/usecase.tmpl.md +2 -2
  56. package/skills/building/resources/plan-wire.md +82 -0
  57. package/skills/building/resources/plan.md +98 -0
  58. package/skills/building/resources/retro-research.md +60 -0
  59. package/skills/building/resources/retro-scan.md +49 -0
  60. package/skills/building/resources/retro.md +225 -0
  61. package/skills/building/resources/rounds.md +78 -0
  62. package/skills/building/resources/stop.md +127 -0
  63. package/skills/orient/SKILL.md +37 -37
  64. package/skills/qa-edge-hunter/SKILL.md +29 -14
  65. package/skills/shapeup/SKILL.md +5 -5
  66. package/skills/shapeup/resources/breadboarding.md +1 -1
  67. package/skills/shapeup/resources/context-compaction.md +5 -5
  68. package/skills/shapeup/resources/shaping.md +1 -1
  69. package/skills/spec-evaluator/SKILL.md +17 -21
  70. package/skills/spec-evaluator/references/dimension-contract.md +1 -1
  71. package/skills/spec-evaluator/references/dimensions/completeness.md +3 -3
  72. package/skills/spec-evaluator/references/dimensions/spec-conformance.md +1 -1
  73. package/skills/spec-evaluator/references/dimensions/test-surface-conformance.md +5 -5
  74. package/skills/task-executor/SKILL.md +11 -15
  75. package/commands/hill.md +0 -10
  76. package/hooks/gate-intake.mjs +0 -109
  77. package/hooks/gate-zerowork.mjs +0 -349
  78. package/hooks/tier-guard.mjs +0 -162
  79. package/kernel/compile.mjs +0 -1419
  80. package/kernel/init/fit.mjs +0 -199
  81. package/kernel/init/run-args.mjs +0 -206
  82. package/kernel/lib/breadboard.mjs +0 -165
  83. package/kernel/probe/attempts.mjs +0 -161
  84. package/kernel/probe/concurrency.mjs +0 -535
  85. package/kernel/probe/eval.mjs +0 -405
  86. package/kernel/probe/hunt.mjs +0 -104
  87. package/kernel/probe/leg.mjs +0 -229
  88. package/kernel/probe/owner.mjs +0 -142
  89. package/kernel/probe/requirements.mjs +0 -328
  90. package/kernel/probe/resume.mjs +0 -1110
  91. package/kernel/probe/rounds.mjs +0 -115
  92. package/kernel/probe/staged.mjs +0 -83
  93. package/kernel/probe/stats.mjs +0 -477
  94. package/kernel/probe/t0.mjs +0 -115
  95. package/kernel/reduce/board.mjs +0 -350
  96. package/kernel/reduce/graph.mjs +0 -482
  97. package/kernel/reduce/hill.mjs +0 -322
  98. package/kernel/reduce/ingest.mjs +0 -767
  99. package/kernel/reduce/leftovers.mjs +0 -159
  100. package/kernel/reduce/ship.mjs +0 -529
  101. package/kernel/reduce/snapshot.mjs +0 -291
  102. package/kernel/reduce/verdict.mjs +0 -172
  103. package/kernel/report/export.mjs +0 -384
  104. package/kernel/report/facts.mjs +0 -234
  105. package/kernel/verify/budget.mjs +0 -153
  106. package/kernel/verify/build.mjs +0 -428
  107. package/kernel/verify/dispatch.mjs +0 -114
  108. package/kernel/verify/spec.mjs +0 -975
  109. package/kernel/verify/trace.mjs +0 -604
  110. package/skills/ba-pitch-analyzer/SKILL.md +0 -204
  111. package/skills/coach/SKILL.md +0 -397
  112. package/skills/hill-chart/SKILL.md +0 -154
  113. package/skills/hill-chart/assets/dashboard.template.html +0 -1432
  114. package/skills/scope-architect/SKILL.md +0 -174
  115. package/skills/scope-hammer/SKILL.md +0 -231
  116. package/skills/solution-architect/SKILL.md +0 -158
  117. package/skills/tech-lead/SKILL.md +0 -151
  118. package/skills/tech-lead/references/gates.md +0 -605
  119. package/skills/tech-lead/references/protocol.md +0 -889
  120. package/skills/tech-lead/references/tiny-lane.md +0 -53
  121. package/skills/tech-lead/workflows/shapeup-run.js +0 -2187
  122. package/skills/translator/SKILL.md +0 -258
  123. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/contract-patterns.md +0 -0
  124. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/ddd-patterns.md +0 -0
  125. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/integration-analysis.md +0 -0
  126. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/ux-behavior-patterns.md +0 -0
  127. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/api-feasibility.tmpl.md +0 -0
  128. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/be-service.contract.tmpl.md +0 -0
  129. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/offline-storage.contract.tmpl.md +0 -0
  130. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/third-party-api.contract.tmpl.md +0 -0
  131. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/context-map.tmpl.md +0 -0
  132. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/event-choreography.tmpl.md +0 -0
  133. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/migration-plan.tmpl.md +0 -0
  134. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/team-handoff.tmpl.md +0 -0
  135. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/domain-model.tmpl.md +0 -0
  136. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/feedback.tmpl.md +0 -0
  137. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/integration.tmpl.md +0 -0
  138. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task-board.tmpl.md +0 -0
  139. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task-spike.tmpl.md +0 -0
  140. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task.tmpl.md +0 -0
  141. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/ux-behavior.tmpl.md +0 -0
@@ -1,258 +0,0 @@
1
- ---
2
- name: translator
3
- description: "Use this skill whenever intake for the harness (pitch, PRD, requirement, transcript, or any spec input) is in a non-English language and must be normalized to English BEFORE planning/building. The single language gate for the planner→generator→judge harness. Triggers on: \"translate this pitch\", \"normalize to English\", \"this requirement is in Vietnamese\", \"prepare intake for the harness\", \"make the spec English\", \"check if this is English\", and Vietnamese \"dịch sang tiếng Anh\", \"chuẩn hoá tiếng Anh\", \"dịch pitch\", \"chuyển yêu cầu sang tiếng Anh\". Produces faithful English copies (original never overwritten) plus a glossary and verification report. tech-lead auto-invokes it at GATE L0 when intake is non-English; also runs standalone."
4
- ---
5
-
6
- # Translator (harness language gate)
7
-
8
- The one job upstream of the whole harness: **make the input English, faithfully, once.**
9
- The harness is English-only end to end — the planner, generator, and judge all assume
10
- English and HARD-FAIL on anything else. This skill is the single component that guarantees
11
- that assumption holds. It is **not** a translator that rewrites; it normalizes language
12
- while preserving every requirement, number, boundary, and structural element 1:1.
13
-
14
- ```
15
- PO writes intake (any language) → TRANSLATOR → <name>.en.md (English) → ba-pitch-analyzer → …
16
- (this skill) + glossary.md + report
17
- ```
18
-
19
- **Scope is deliberately narrow (simplicity first):**
20
- - ✅ Translate **input** docs (pitch / PRD / requirement / transcript) into English copies.
21
- - ✅ Emit a persisted **glossary** so domain terms map consistently across docs and runs.
22
- - ✅ **Verify** the output is English and structurally identical to the source.
23
- - 🚫 Does NOT plan, build, or judge — that is the harness's job.
24
- - 🚫 Does NOT translate harness **output** back to the PO's language (input-normalization only).
25
- - 🚫 Does NOT summarize, add, drop, or "improve" content — faithful 1:1 only.
26
-
27
- > **What is preserved verbatim vs translated, glossary protocol, verification scan**
28
- > → `references/preservation-rules.md` — read it before translating any file.
29
-
30
- ---
31
-
32
- ## Workflow Overview
33
-
34
- ```
35
- INPUT: doc(s) in any language
36
- │
37
- ⏸ GATE T0 │ Detect & Scope ──────► per-file source-language detection; list files to
38
- │ translate; already-English files → skipped (idempotent)
39
- │
40
- ▶ Phase 1 │ Glossary ────────────► extract domain terms + proper nouns + do-not-translate
41
- │ tokens; map source→English; reuse existing glossary.md
42
- ⏸ GATE T1 │ Glossary Review ──────► PO confirms term mappings; ambiguous terms resolved here
43
- │ (never guessed). lite/auto: auto-proceed on unambiguous.
44
- │
45
- ▶ Phase 2 │ Translate ───────────► WRITE <name>.en.md (original untouched): prose → English,
46
- │ glossary applied; frontmatter keys, wikilinks, code, URLs,
47
- │ numbers preserved
48
- │
49
- ▶ Phase 3 │ Verify ──────────────► residual-non-English scan + structural diff (heading /
50
- │ link / code-block / list-item counts must match source)
51
- ⏸ GATE T2 │ Output Sign-off ──────► confirm clean scan + matching structure, then emit
52
- │ glossary.md + translation-report.md (the .en.md is already
53
- │ written in Phase 2)
54
- ✅ Done └─► English intake ready for the harness
55
- ```
56
-
57
- ---
58
-
59
- ## GATE T0 — Detect & Scope
60
-
61
- **Purpose:** Decide what needs translating before spending tokens, and stay idempotent.
62
-
63
- ```
64
- T0.1 For each input file/path, detect source language (sample headings + body prose,
65
- ignore code blocks / identifiers / URLs).
66
- T0.2 Classify:
67
- already-English → SKIP (no .en.md written; report it as pass-through)
68
- non-English → queue for translation
69
- mixed → queue; flag the English spans to keep verbatim
70
- T0.3 In --check mode: print the classification table and STOP. Write nothing.
71
- (This is the mode tech-lead calls at GATE L0 to decide whether to run a full pass.)
72
- ```
73
-
74
- **GATE T0 Output:**
75
- ```
76
- ⏸ GATE T0 — Detect & Scope
77
- Files : [N] (translate: [k] · already-English: [N-k])
78
- Source lang : [vi | mixed | …]
79
- Glossary : [reuse docs/glossary.md | build new]
80
- Mode : [full | --check (detect only)]
81
- ```
82
- Under `--check`: stop here. Otherwise proceed to Phase 1 (auto) or wait for confirm (interactive).
83
-
84
- ---
85
-
86
- ## Phase 1 — Glossary
87
-
88
- **Goal:** One consistent English term per source term, across every doc and every run.
89
- Inconsistent vocabulary is the failure that poisons downstream DDD extraction (the planner
90
- treats two spellings as two concepts). Read `references/preservation-rules.md#Glossary` first.
91
-
92
- ```
93
- 1. Reuse: if a glossary.md exists (or --glossary <path> given), load it as the base map.
94
- 2. Extract from the source: domain nouns, actor names, status/enum values, screen names,
95
- feature jargon. Propose source→English for each new term.
96
- 3. Mark do-not-translate tokens: proper nouns, brand/product names, code identifiers, API
97
- names, env vars, file paths — these pass through verbatim (see preservation-rules).
98
- 4. Flag ambiguous terms (one source word → multiple valid English terms) for GATE T1.
99
- ```
100
-
101
- **Output:** draft `glossary.md` (source term · English · note/do-not-translate flag).
102
-
103
- ---
104
-
105
- ## GATE T1 — Glossary Review
106
-
107
- **Purpose:** Lock vocabulary with the PO before it propagates into every translated doc.
108
-
109
- ```
110
- Print the new/changed term rows + any ambiguous terms.
111
- Ask (max 2): confirm the English term for each ambiguous entry; any term to force
112
- verbatim (do-not-translate)?
113
- ```
114
- Never guess an ambiguous domain term — a wrong canonical term cascades into the spec.
115
- `--auto` / `--lite`: auto-proceed when no term is ambiguous; if any is, still pause (a
116
- wrong term is more expensive than a pause).
117
-
118
- ---
119
-
120
- ## Phase 2 — Translate
121
-
122
- **Goal:** Faithful English copy. Read `references/preservation-rules.md` first.
123
-
124
- ```
125
- For each queued file, write <name>.en.md (sibling of the source; original untouched):
126
- - Translate prose values only. Apply the glossary to every domain term.
127
- - PRESERVE verbatim: YAML frontmatter KEYS, [[wikilink]] targets, `code`/```fenced```,
128
- URLs, file paths, numbers, units, appetite/boundary values, do-not-translate tokens.
129
- - Keep document structure 1:1: same headings, same table rows, same list items, same
130
- order. No merging, no reordering, no summarizing.
131
- - Mixed-language source: leave already-English spans as they are.
132
- ```
133
- Faithfulness rule: the `.en.md` must carry exactly the requirements of the source — nothing
134
- added, nothing dropped, no editorializing. Translation ≠ rewriting.
135
-
136
- ---
137
-
138
- ## Phase 3 — Verify
139
-
140
- **Goal:** Prove the output is English and structurally identical before sign-off.
141
-
142
- ```
143
- 3.1 Residual-non-English scan: scan every .en.md for source-language characters/words
144
- outside code blocks / do-not-translate tokens. Any hit → list file:line, do NOT pass.
145
- 3.2 Structural diff vs source: heading count, table-row count, list-item count, wikilink
146
- count, code-block count must match. Mismatch → a requirement was dropped/added → fail.
147
- 3.3 Glossary coverage: every extracted term resolved (no "⏳ TBD" left in glossary.md).
148
- ```
149
- A failing scan blocks GATE T2 — emit the residual list and fix before signing off.
150
-
151
- ---
152
-
153
- ## GATE T2 — Output Sign-off
154
-
155
- ```
156
- ⏸ GATE T2 — Output Sign-off
157
- Translated : [k] files → <name>.en.md
158
- Glossary : glossary.md ([t] terms, [a] resolved-ambiguous)
159
- Residual scan: ✅ clean | 🔴 [n] non-English spans → [file:line …]
160
- Structure : ✅ matches source | 🔴 [diff]
161
- ```
162
- On clean → `✅ Intake English-ready: [files]. Point the harness at the .en.md copies.`
163
- Under `--auto`/`--unattended`: auto-sign-off only if the residual scan is clean; a dirty
164
- scan always stops (never ship half-translated intake to the harness).
165
-
166
- ---
167
-
168
- ## Output files
169
-
170
- | File | Purpose | Notes |
171
- |------|---------|-------|
172
- | `<name>.en.md` | The English copy the harness consumes | One per translated source; **original is never overwritten** |
173
- | `glossary.md` | source→English term map | Persisted + reused; the shared vocabulary for this feature |
174
- | `translation-report.md` | detect table, glossary diff, verification result | Audit trail; what was skipped/flagged |
175
-
176
- **Destinations (two-root workspace).** `<name>.en.md` is written as a sibling
177
- of its source (or under `--out <dir>` when given) — when the source already lives under the SHARED root
178
- `shapeup/<slug>/shaping/`, the copy lands there too. `glossary.md` is durable
179
- shared vocabulary → write it to `shapeup/<slug>/shaping/glossary.md`.
180
- `translation-report.md` is run-trace (audit) → write it to the LOCAL root
181
- `.shapeup/<slug>/translation-report.md`. When run standalone on loose intake files
182
- (no slug yet), all three default to siblings of the source.
183
-
184
- ---
185
-
186
- ## Envelope contract — the domain layer
187
-
188
- Orchestrated, this skill is dispatched like every worker: a **WorkOrder** in (`--order <path>`,
189
- operation `translate`), a **WorkResult** out. The standalone arguments below map 1:1 onto the
190
- payload fields registered for this worker in the central domain registry
191
- (`kernel/schemas/domain.schema.json`, `x-payload-by-worker`):
192
-
193
- | Payload field | Standalone form | Meaning |
194
- |---|---|---|
195
- | `payload.intake[]` | positional path(s) | Source docs to normalize to English — originals never overwritten |
196
- | `payload.glossary` | `--glossary` | An existing `glossary.md` to reuse as the base term map |
197
-
198
- The WorkResult may carry only `files_touched`, `artifacts`, `assumptions`, `deviations`
199
- (`x-result-by-worker`): the `.en.md` copies, glossary, and verification report return as
200
- `artifacts`; ambiguous-term resolutions made without a PO land in `assumptions`.
201
-
202
- ---
203
-
204
- ## Invocation
205
-
206
- ```bash
207
- # Translate one intake file → docs/pitch.en.md (+ glossary.md, translation-report.md)
208
- /translator docs/pitch.md
209
-
210
- # Translate a folder of intake docs (already-English files are skipped)
211
- /translator docs/intake/
212
-
213
- # Reuse / extend an existing glossary for consistent vocabulary across runs
214
- /translator --glossary docs/glossary.md docs/pitch.md
215
-
216
- # Detect-only: is this English? print the table and stop (what tech-lead L0 calls)
217
- /translator --check docs/pitch.md
218
-
219
- # Headless: skip gates; still HARD-STOPS on a dirty residual scan
220
- /translator --auto docs/pitch.md
221
- ```
222
-
223
- ### Flags
224
- | Flag | Effect |
225
- |------|--------|
226
- | `--check` | Detect source language and report; write nothing, stop at GATE T0 |
227
- | `--glossary <path>` | Load an existing glossary as the base map (consistency across docs/runs) |
228
- | `--auto` | Skip T0/T1 confirmation gates; still pauses on ambiguous terms + dirty scan |
229
- | `--unattended` | Auto-sign-off all gates; stop only on a dirty residual scan or hard error |
230
- | `--out <dir>` | Write `.en.md` copies into a target dir instead of beside the source |
231
-
232
- ---
233
-
234
- ## Hard Rules (never override without explicit user instruction)
235
-
236
- | Rule | Rationale |
237
- |------|-----------|
238
- | Never overwrite the source; always write a `.en.md` copy | The PO still needs to read their original |
239
- | Never summarize, add, or drop content — faithful 1:1 | The harness builds exactly what the spec says; drift here is silent scope change |
240
- | Preserve frontmatter keys, wikilink targets, code, URLs, numbers verbatim | Structure is load-bearing for downstream parsing; translating it breaks the spec tree |
241
- | One source term → one English term, via the glossary | Two spellings read as two concepts to the planner's DDD pass |
242
- | Ambiguous term → ask at GATE T1, never guess | A wrong canonical term cascades into every doc and every build round |
243
- | Already-English input → no-op (idempotent) | Re-runs and `--check` must be safe and cheap |
244
- | Dirty residual scan blocks sign-off, even under `--auto` | Half-translated intake makes the harness HARD-FAIL mid-run — worse than stopping here |
245
- | Input-normalization only — never translate harness output back | This is the upstream gate; output language is a separate, out-of-scope concern |
246
-
247
- ---
248
-
249
- ## Relationship to the harness
250
-
251
- ```
252
- TRANSLATOR (this skill) → ba-pitch-analyzer (PLAN) → task-executor (BUILD) → spec-evaluator (JUDGE)
253
- language gate English-only specs English-only code English-only verdict
254
- ```
255
- - The harness is **English-only end to end**; the downstream skills HARD-FAIL on non-English.
256
- - `tech-lead` does **not** translate — at GATE L0 it runs `/translator --check`, and if intake
257
- is non-English it runs a full `/translator` pass first, then orchestrates against the `.en.md`
258
- copies. Orchestration and language normalization are separate single-purpose concerns.