shapeup-sdlc 1.6.2 → 1.7.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 (85) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/AGENTS.md +36 -103
  3. package/README.md +60 -67
  4. package/SECURITY.md +31 -16
  5. package/bin/init.mjs +24 -69
  6. package/commands/build.md +19 -0
  7. package/commands/eval.md +5 -4
  8. package/commands/scopes.md +5 -4
  9. package/commands/shape.md +1 -1
  10. package/commands/ship.md +37 -4
  11. package/hooks/anti-rationalization.mjs +7 -13
  12. package/hooks/compact-snapshot.mjs +5 -5
  13. package/hooks/gate-deadline.mjs +12 -16
  14. package/hooks/gate-intake.mjs +13 -14
  15. package/hooks/gate-l2.mjs +3 -3
  16. package/hooks/gate-zerowork.mjs +97 -16
  17. package/hooks/lib/decision.mjs +21 -13
  18. package/hooks/safety-spine.mjs +1 -1
  19. package/hooks/sandbox-guard.mjs +83 -47
  20. package/hooks/session-rehydrate.mjs +8 -9
  21. package/hooks/slop-cleaner.mjs +1 -1
  22. package/oracles/_shared.mjs +1 -1
  23. package/oracles/http-oracle.mjs +1 -1
  24. package/oracles/index.mjs +1 -1
  25. package/oracles/process-oracle.mjs +1 -1
  26. package/oracles/snapshot-oracle.mjs +1 -1
  27. package/oracles/test-oracle.mjs +1 -1
  28. package/package.json +3 -7
  29. package/skills/ba-pitch-analyzer/SKILL.md +20 -15
  30. package/skills/ba-pitch-analyzer/references/doc-schemas.md +1 -1
  31. package/skills/ba-pitch-analyzer/references/task-generation.md +6 -6
  32. package/skills/ba-pitch-analyzer/references/test-surface.md +1 -1
  33. package/skills/ba-pitch-analyzer/scripts/board-derive.mjs +5 -5
  34. package/skills/ba-pitch-analyzer/scripts/spec-lint.mjs +2 -2
  35. package/skills/coach/SKILL.md +3 -3
  36. package/skills/orient/SKILL.md +2 -1
  37. package/skills/qa-edge-hunter/SKILL.md +9 -39
  38. package/skills/scope-architect/SKILL.md +17 -12
  39. package/skills/scope-hammer/SKILL.md +5 -5
  40. package/skills/shapeup/SKILL.md +3 -3
  41. package/skills/shapeup/resources/context-compaction.md +4 -3
  42. package/skills/solution-architect/SKILL.md +18 -11
  43. package/skills/spec-evaluator/SKILL.md +12 -5
  44. package/skills/spec-evaluator/references/dimensions/_registry.md +2 -2
  45. package/skills/spec-evaluator/references/dimensions/completeness.md +1 -1
  46. package/skills/spec-evaluator/references/dimensions/integration.md +98 -67
  47. package/skills/spec-evaluator/references/dimensions/spec-conformance.md +4 -4
  48. package/skills/spec-evaluator/references/dimensions/test-surface-conformance.md +1 -1
  49. package/skills/spec-evaluator/references/probing.md +42 -23
  50. package/skills/spec-evaluator/references/report-schema.md +2 -2
  51. package/skills/spec-evaluator/scripts/verdict-ledger.mjs +1 -1
  52. package/skills/task-executor/SKILL.md +25 -12
  53. package/skills/tech-lead/SKILL.md +115 -438
  54. package/skills/tech-lead/references/delegation.md +38 -31
  55. package/skills/tech-lead/references/gates.md +75 -33
  56. package/skills/tech-lead/references/hard-rules.md +34 -0
  57. package/skills/tech-lead/references/invocation.md +2 -2
  58. package/skills/tech-lead/references/ledger-schema.md +17 -18
  59. package/skills/tech-lead/references/round-protocol.md +77 -27
  60. package/skills/tech-lead/references/state-model.md +1 -1
  61. package/skills/tech-lead/schemas/domain.schema.json +320 -148
  62. package/skills/tech-lead/schemas/gate-answers.schema.json +2 -2
  63. package/skills/tech-lead/schemas/work-result.schema.json +55 -17
  64. package/skills/tech-lead/scripts/aegis-digest.mjs +1 -1
  65. package/skills/tech-lead/scripts/budget-check.mjs +7 -13
  66. package/skills/tech-lead/scripts/compile-order.mjs +69 -22
  67. package/skills/tech-lead/scripts/fit-check.mjs +10 -10
  68. package/skills/tech-lead/scripts/gate-answers.mjs +11 -12
  69. package/skills/tech-lead/scripts/hill-derive.mjs +133 -0
  70. package/skills/tech-lead/scripts/ingest-result.mjs +7 -19
  71. package/skills/tech-lead/scripts/init-run.mjs +60 -18
  72. package/skills/tech-lead/scripts/lib/argv.mjs +1 -1
  73. package/skills/tech-lead/scripts/lib/contract-md.mjs +10 -10
  74. package/skills/tech-lead/scripts/lib/is-main.mjs +11 -12
  75. package/skills/tech-lead/scripts/lib/paths.mjs +15 -13
  76. package/skills/tech-lead/scripts/resume-state.mjs +387 -0
  77. package/skills/tech-lead/scripts/run-snapshot.mjs +1 -6
  78. package/skills/tech-lead/scripts/run-workflow.mjs +381 -0
  79. package/skills/tech-lead/scripts/ship-report.mjs +33 -2
  80. package/skills/tech-lead/scripts/stats.mjs +9 -10
  81. package/skills/tech-lead/scripts/t0-verify.mjs +4 -4
  82. package/skills/tech-lead/scripts/trace-lint.mjs +2 -2
  83. package/skills/tech-lead/workflows/shapeup-run.js +911 -0
  84. package/skills/translator/SKILL.md +2 -2
  85. package/skills/advisor-protocol/SKILL.md +0 -171
@@ -173,8 +173,8 @@ scan always stops (never ship half-translated intake to the harness).
173
173
  | `glossary.md` | source→English term map | Persisted + reused; the shared vocabulary for this feature |
174
174
  | `translation-report.md` | detect table, glossary diff, verification result | Audit trail; what was skipped/flagged |
175
175
 
176
- **Destinations (two-root workspace).** `<name>.en.md` is always written as a sibling
177
- of its source — when the source already lives under the SHARED root
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
178
  `shapeup/<slug>/shaping/`, the copy lands there too. `glossary.md` is durable
179
179
  shared vocabulary → write it to `shapeup/<slug>/shaping/glossary.md`.
180
180
  `translation-report.md` is run-trace (audit) → write it to the LOCAL root
@@ -1,171 +0,0 @@
1
- ---
2
- name: advisor-protocol
3
- description: "Use this skill whenever a harness worker (task-executor, scope-architect) hits a decision it cannot make alone during Build Vertically — a design decision, a spec ambiguity, or a request to write outside its scope's substrate — and needs it adjudicated under a budget instead of guessed or asked ad hoc. Trigger on: \"escalate this decision\", \"ESCALATE\", \"adjudicate this ambiguity\", \"ask the advisor\", \"substrate expansion request\", \"resolve this design decision within budget\", \"how many escalations does this scope have left\". Also triggers when tech-lead needs to answer a worker's structured ESCALATE return during a build round."
4
- ---
5
-
6
- # Advisor Protocol (ESCALATE grammar + budgets)
7
-
8
- The mechanism behind Shape Up's "advisor, not micromanager" posture (design spec v1.1 DD-1,
9
- DD-8). A worker mid-attempt hits something it genuinely cannot decide alone — not "what should
10
- I name this variable" (that's Principle A, resolved silently or at the worker's own gate), but
11
- a decision whose wrong guess is expensive: a design trade-off the spec left open, a spec
12
- ambiguity that changes behavior, or a file the worker needs to touch outside its scope's
13
- `allowed_file_substrate`. Instead of guessing or opening an unbounded chat with the PO, the
14
- worker emits one structured `ESCALATE` return and this skill adjudicates it.
15
-
16
- **Why this exists as its own skill, not inline PO chat.** Zero-memory handoff (design spec
17
- §3.6) means every attempt gets a *fresh* context — no chat history. An answer given once must
18
- survive every future reset for that scope. This skill is what turns a transient Q&A into a
19
- persisted decision: it writes the answer to the round-ledger (committed, Tier A) the moment
20
- it's made, and every future brief for that scope reads it back. Escalation memory lives in
21
- files, not in chat (DD-8).
22
-
23
- ---
24
-
25
- ## The ESCALATE grammar
26
-
27
- A worker never asks a free-form question mid-attempt. It returns a structured block and stops
28
- work on the blocked AC/file until an answer comes back:
29
-
30
- ```yaml
31
- ESCALATE:
32
- scope_id: cart-creation
33
- round: 2
34
- attempt: 3
35
- kind: design-decision | spec-ambiguity | substrate-expansion
36
- question: "Contract leaves cart-total rounding unspecified — round half-up or banker's rounding?"
37
- options: ["round half-up (matches existing order-total code)", "banker's rounding (matches contract's other money fields)"]
38
- default_if_silent: "round half-up" # optional — see --unattended below
39
- ```
40
-
41
- Three kinds, three different resolution paths (below). `default_if_silent` is optional — a
42
- worker proposes it when it has a reasonable, low-risk fallback; the advisor is never forced to
43
- accept it.
44
-
45
- ---
46
-
47
- ## Budget
48
-
49
- **≤3 ESCALATEs per scope per round** (design spec §3.3). Counted per `scope_id` + `round`, reset
50
- each new round. The budget exists so a struggling scope surfaces as *stuck* (routed to the
51
- hill's stuck-split rule, ≥3 rounds at the same position → forced scope-architect split order) rather than
52
- draining PO attention one question at a time.
53
-
54
- ```
55
- 1st–3rd ESCALATE this scope/round → adjudicate normally (below).
56
- 4th+ → do NOT ask again. Apply the most conservative resolution
57
- (narrowest scope, no substrate expansion, closest precedent)
58
- and flag it as a GATE-H hammer proposal: "scope exceeded its
59
- escalation budget — question N unresolved, applied [X]".
60
- The worker's attempt continues with that resolution.
61
- ```
62
-
63
- Exceeding budget is never a hard stop — Build Vertically must keep moving; it's a signal that
64
- this scope needs GATE H's attention, not a excuse to freeze the round.
65
-
66
- ---
67
-
68
- ## Adjudication (in order — cheapest resolution wins)
69
-
70
- ```
71
- 1. Precedent check (free, no PO time):
72
- Search this run's round-ledger.md "Decisions" section (this scope AND sibling scopes) and
73
- shapeup/knowledge-base/*.md for an already-answered question that is the same or a
74
- clear superset of this one. Found → reuse verbatim, log "resolved by precedent: [ref]",
75
- do NOT count against budget (a repeat question is a zero-memory artifact, not a new decision).
76
-
77
- 2. kind: substrate-expansion:
78
- Never silently approved. Present the requested path(s) + why the worker says it needs them.
79
- PO/TL approves → dispatch a scope-architect remap order to add the path to the scope contract's
80
- `shared_substrate` (never hand-edit the contract — `ba` is its sole writer, F.5). PO/TL
81
- declines → worker re-plans within its existing substrate; log the decline as a decision too
82
- (prevents re-asking).
83
-
84
- 3. kind: design-decision | spec-ambiguity, interactive/--auto:
85
- Print the ESCALATE block verbatim + budget remaining for this scope/round. Ask (max 1):
86
- pick an option / provide a different answer / defer to default_if_silent if offered.
87
- Never answer on the PO's behalf — a wrong silent guess here is exactly what zero-memory
88
- handoff makes expensive to unwind later.
89
-
90
- 4. --unattended (no PO available):
91
- default_if_silent present → apply it, log "auto-resolved (default, unattended)".
92
- No default offered → apply the most conservative option (narrowest scope / least
93
- irreversible) and flag it as a GATE-H hammer proposal for PO review before ship — the
94
- run must not block, but an unattended guess is never allowed to hide from the PO forever.
95
- ```
96
-
97
- ---
98
-
99
- ## Persistence — the decision must survive a reset
100
-
101
- The instant an ESCALATE is answered (any path above), append one row to the run's committed
102
- `round-ledger.md` "Decisions" section — never batch it for later, never keep it only in the
103
- current session (a crash before the next promotion point would lose it):
104
-
105
- ```
106
- | Round | Scope | Kind | Question | Answer | Resolved by |
107
- |-------|-------|------|----------|--------|-------------|
108
- | 2 | cart-creation | design-decision | cart-total rounding | round half-up | PO (interactive) |
109
- ```
110
-
111
- Every subsequent isolated brief for that scope (task-executor's zero-memory handoff, design
112
- spec §3.6) includes the full decisions table for its `scope_id` — this is how an answer given
113
- once in round 2 is still known in round 5's fresh-context attempt without replaying any chat
114
- history.
115
-
116
- ---
117
-
118
- ## Envelope contract — the domain layer
119
-
120
- Orchestrated, this skill is dispatched like every worker: a **WorkOrder** in (`--order <path>`,
121
- operation `adjudicate`), a **WorkResult** out. The standalone flags below map 1:1 onto the
122
- payload fields registered for this worker in the central domain registry
123
- (`skills/tech-lead/schemas/domain.schema.json`, `x-payload-by-worker`):
124
-
125
- | Payload field | Standalone flag | Meaning |
126
- |---|---|---|
127
- | `payload.ledger` | `--ledger` | The run's committed `round-ledger.md` — every answer persists here |
128
- | `payload.escalate` | `--escalate` | The worker's ESCALATE block to adjudicate (the `EscalateBlock` grammar above) |
129
- | `payload.scope_id` | `--scope` | The scope the budget is counted against |
130
- | `payload.round` | `--round` | The round the budget/decision is counted against |
131
-
132
- The WorkResult may carry only `files_touched`, `artifacts`, `assumptions`, `deviations`
133
- (`x-result-by-worker`): the adjudicated Decision itself persists to the committed round-ledger,
134
- never to the envelope, so it survives every zero-memory reset.
135
-
136
- ---
137
-
138
- ## Invocation
139
-
140
- ```bash
141
- # Adjudicate one ESCALATE return from a worker (typical: tech-lead calls this mid-round)
142
- /advisor-protocol --ledger shapeup/checkout-vnpay/round-ledger.md --escalate '<ESCALATE yaml>'
143
-
144
- # Check remaining budget for a scope this round (worker or tech-lead, before emitting ESCALATE)
145
- /advisor-protocol --budget --scope cart-creation --round 2 --ledger shapeup/checkout-vnpay/round-ledger.md
146
-
147
- # Headless run — no PO available; apply defaults / conservative fallback, flag the rest for GATE H
148
- /advisor-protocol --unattended --ledger ... --escalate '<ESCALATE yaml>'
149
- ```
150
-
151
- ### Flags
152
- | Flag | Effect |
153
- |------|--------|
154
- | `--ledger <path>` | The run's committed `round-ledger.md` (decisions persist here) |
155
- | `--escalate <yaml\|path>` | The worker's ESCALATE block to adjudicate |
156
- | `--budget --scope <id> --round <N>` | Report remaining ESCALATE budget for a scope this round, no adjudication |
157
- | `--unattended` | No PO available — apply defaults/conservative fallback per rule 4 above |
158
-
159
- ---
160
-
161
- ## Hard Rules (never override without explicit user instruction)
162
-
163
- | Rule | Rationale |
164
- |------|-----------|
165
- | A worker never guesses a design decision or spec ambiguity silently | The whole point of ESCALATE — wrong silent guesses are the expensive failure mode zero-memory handoff amplifies |
166
- | Substrate-expansion is never auto-approved | PA3 (cross-scope contamination) exists precisely because agents self-justify "just this once" writes |
167
- | Budget is ≤3/scope/round; exceeding it never blocks the round | Signals a stuck scope to GATE L2's stuck-split rule instead of freezing Build Vertically |
168
- | Every answer is persisted to the committed round-ledger the instant it's given | Zero-memory handoff means the *only* place a decision survives is a file, not a session |
169
- | Precedent reuse never counts against budget | A repeat question is a zero-memory artifact, not a new decision — don't penalize the worker for context loss |
170
- | An unattended conservative resolution is always flagged for GATE H | An automated guess must stay visible to the PO before ship, never silently absorbed |
171
- | This skill never designs, builds, or judges | Advisor, not a fifth worker — it adjudicates, it does not decide scope or verify code |