bigpowers 2.73.9 → 2.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/.continue/rules/context7-mcp.md +0 -0
  2. package/.continue/rules/diagnose-stall.md +0 -0
  3. package/.kilocode/rules/context7-mcp.md +0 -0
  4. package/.kilocode/rules/diagnose-stall.md +0 -0
  5. package/.pi/package.json +2 -2
  6. package/.pi/prompts/audit-code.md +17 -13
  7. package/.pi/prompts/build-epic.md +5 -0
  8. package/.pi/prompts/change-request.md +4 -1
  9. package/.pi/prompts/compose-workflow.md +17 -0
  10. package/.pi/prompts/context7-mcp.md +54 -0
  11. package/.pi/prompts/craft-skill.md +28 -0
  12. package/.pi/prompts/deepen-architecture.md +20 -0
  13. package/.pi/prompts/delegate-task.md +14 -0
  14. package/.pi/prompts/deploy.md +8 -0
  15. package/.pi/prompts/develop-tdd.md +15 -4
  16. package/.pi/prompts/diagnose-stall.md +53 -0
  17. package/.pi/prompts/dispatch-agents.md +53 -19
  18. package/.pi/prompts/evolve-skill.md +7 -0
  19. package/.pi/prompts/gate-trace.md +9 -1
  20. package/.pi/prompts/guard-git.md +14 -0
  21. package/.pi/prompts/kickoff-branch.md +4 -0
  22. package/.pi/prompts/migrate-spec.md +18 -0
  23. package/.pi/prompts/plan-work.md +62 -2
  24. package/.pi/prompts/publish-package.md +11 -0
  25. package/.pi/prompts/release-branch.md +46 -43
  26. package/.pi/prompts/request-review.md +57 -17
  27. package/.pi/prompts/research-first.md +3 -0
  28. package/.pi/prompts/run-benchmark.md +3 -3
  29. package/.pi/prompts/run-evals.md +26 -6
  30. package/.pi/prompts/run-planning.md +1 -0
  31. package/.pi/prompts/scope-work.md +3 -0
  32. package/.pi/prompts/search-skills.md +3 -0
  33. package/.pi/prompts/security-review.md +66 -12
  34. package/.pi/prompts/seed-conventions.md +68 -0
  35. package/.pi/prompts/session-state.md +5 -10
  36. package/.pi/prompts/slice-tasks.md +3 -0
  37. package/.pi/prompts/smoke-test.md +11 -0
  38. package/.pi/prompts/stocktake-skills.md +6 -1
  39. package/.pi/prompts/validate-contracts.md +12 -0
  40. package/.pi/prompts/validate-fix.md +2 -0
  41. package/.pi/prompts/verify-work.md +42 -20
  42. package/.pi/prompts/wire-ci.md +11 -0
  43. package/.pi/prompts/write-document.md +10 -0
  44. package/.pi/skills/audit-code/SKILL.md +17 -13
  45. package/.pi/skills/build-epic/SKILL.md +5 -0
  46. package/.pi/skills/change-request/SKILL.md +4 -1
  47. package/.pi/skills/compose-workflow/SKILL.md +17 -0
  48. package/.pi/skills/context7-mcp/SKILL.md +56 -0
  49. package/.pi/skills/craft-skill/SKILL.md +28 -0
  50. package/.pi/skills/deepen-architecture/SKILL.md +20 -0
  51. package/.pi/skills/delegate-task/SKILL.md +14 -0
  52. package/.pi/skills/deploy/SKILL.md +8 -0
  53. package/.pi/skills/develop-tdd/SKILL.md +15 -4
  54. package/.pi/skills/diagnose-stall/SKILL.md +55 -0
  55. package/.pi/skills/dispatch-agents/SKILL.md +53 -19
  56. package/.pi/skills/evolve-skill/SKILL.md +7 -0
  57. package/.pi/skills/gate-trace/SKILL.md +9 -1
  58. package/.pi/skills/guard-git/SKILL.md +14 -0
  59. package/.pi/skills/kickoff-branch/SKILL.md +4 -0
  60. package/.pi/skills/migrate-spec/SKILL.md +18 -0
  61. package/.pi/skills/plan-work/SKILL.md +62 -2
  62. package/.pi/skills/publish-package/SKILL.md +11 -0
  63. package/.pi/skills/release-branch/SKILL.md +46 -43
  64. package/.pi/skills/request-review/SKILL.md +57 -17
  65. package/.pi/skills/research-first/SKILL.md +3 -0
  66. package/.pi/skills/run-benchmark/SKILL.md +3 -3
  67. package/.pi/skills/run-evals/SKILL.md +26 -6
  68. package/.pi/skills/run-planning/SKILL.md +1 -0
  69. package/.pi/skills/scope-work/SKILL.md +3 -0
  70. package/.pi/skills/search-skills/SKILL.md +3 -0
  71. package/.pi/skills/security-review/SKILL.md +66 -12
  72. package/.pi/skills/seed-conventions/SKILL.md +68 -0
  73. package/.pi/skills/session-state/SKILL.md +5 -10
  74. package/.pi/skills/slice-tasks/SKILL.md +3 -0
  75. package/.pi/skills/smoke-test/SKILL.md +11 -0
  76. package/.pi/skills/stocktake-skills/SKILL.md +6 -1
  77. package/.pi/skills/validate-contracts/SKILL.md +12 -0
  78. package/.pi/skills/validate-fix/SKILL.md +2 -0
  79. package/.pi/skills/verify-work/SKILL.md +42 -20
  80. package/.pi/skills/wire-ci/SKILL.md +11 -0
  81. package/.pi/skills/write-document/SKILL.md +10 -0
  82. package/CHANGELOG.md +15 -0
  83. package/CLAUDE.md +59 -1
  84. package/CONVENTIONS.md +81 -0
  85. package/README.md +1 -1
  86. package/SKILL-INDEX.md +1 -1
  87. package/package.json +1 -1
  88. package/scripts/bp-churn-rank.sh +49 -0
  89. package/scripts/bp-read-agents.sh +1 -0
  90. package/scripts/check-import-boundaries.sh +64 -0
  91. package/scripts/compile-rule-matrix.sh +114 -0
  92. package/scripts/hooks/rtk-rewrite.sh +11 -0
  93. package/scripts/hooks/token-mgmt-pre-tool-use.sh +53 -0
  94. package/scripts/install.sh +6 -0
  95. package/scripts/lib/completeness-critic.sh +62 -0
  96. package/scripts/lib/doc-fetch-cache.sh +71 -0
  97. package/scripts/lib/golden-suite-gates.sh +3 -1
  98. package/scripts/lib/parallel-review-worktrees.sh +34 -0
  99. package/scripts/lib/plan-consistency-check.sh +88 -0
  100. package/scripts/lib/run-benchmark.py +210 -0
  101. package/scripts/lib/sync-context-engineering-ref.sh +19 -0
  102. package/scripts/references-manifest.yaml +19 -0
  103. package/scripts/run-benchmark.sh +6 -0
  104. package/scripts/run-skill-verify.sh +1 -0
  105. package/scripts/sync-references.sh +25 -0
  106. package/scripts/sync-skills.sh +12 -1
  107. package/scripts/validate-skill-catalog.sh +147 -0
  108. package/scripts/validate-skill-description.sh +70 -0
  109. package/skills/audit-code/SKILL.md +19 -13
  110. package/skills/build-epic/SKILL.md +6 -1
  111. package/skills/change-request/SKILL.md +4 -1
  112. package/skills/compose-workflow/SKILL.md +17 -0
  113. package/skills/context7-mcp/SKILL.md +57 -0
  114. package/skills/craft-skill/SKILL.md +29 -0
  115. package/skills/deepen-architecture/SKILL.md +22 -0
  116. package/skills/delegate-task/SKILL.md +14 -0
  117. package/skills/deploy/SKILL.md +9 -0
  118. package/skills/develop-tdd/SKILL.md +18 -4
  119. package/skills/diagnose-stall/SKILL.md +56 -0
  120. package/skills/dispatch-agents/SKILL.md +53 -19
  121. package/skills/elaborate-spec/SKILL.md +1 -0
  122. package/skills/evolve-skill/SKILL.md +7 -0
  123. package/skills/gate-trace/SKILL.md +11 -1
  124. package/skills/guard-git/REFERENCE.md +14 -0
  125. package/skills/kickoff-branch/SKILL.md +4 -1
  126. package/skills/migrate-spec/REFERENCE.md +12 -0
  127. package/skills/migrate-spec/SKILL.md +6 -0
  128. package/skills/plan-work/REFERENCE.md +29 -2
  129. package/skills/plan-work/SKILL.md +38 -0
  130. package/skills/publish-package/REFERENCE.md +11 -0
  131. package/skills/release-branch/REFERENCE.md +14 -0
  132. package/skills/release-branch/SKILL.md +33 -44
  133. package/skills/request-review/SKILL.md +59 -17
  134. package/skills/research-first/SKILL.md +3 -0
  135. package/skills/run-benchmark/SKILL.md +5 -4
  136. package/skills/run-evals/REFERENCE.md +14 -4
  137. package/skills/run-evals/SKILL.md +13 -2
  138. package/skills/run-planning/SKILL.md +1 -0
  139. package/skills/scope-work/SKILL.md +3 -0
  140. package/skills/search-skills/SKILL.md +3 -0
  141. package/skills/security-review/REFERENCE-false-positives.md +9 -8
  142. package/skills/security-review/REFERENCE-vuln-categories.md +4 -0
  143. package/skills/security-review/SKILL.md +53 -4
  144. package/skills/security-review/fixtures/CWE-79-xss-negative.js +6 -0
  145. package/skills/security-review/fixtures/CWE-79-xss-positive.js +6 -0
  146. package/skills/security-review/fixtures/CWE-89-sqli-negative.py +8 -0
  147. package/skills/security-review/fixtures/CWE-89-sqli-positive.py +9 -0
  148. package/skills/seed-conventions/REFERENCE.md +40 -0
  149. package/skills/seed-conventions/SKILL.md +28 -1
  150. package/skills/session-state/SKILL.md +5 -10
  151. package/skills/slice-tasks/SKILL.md +3 -0
  152. package/skills/smoke-test/REFERENCE.md +11 -0
  153. package/skills/stocktake-skills/SKILL.md +8 -1
  154. package/skills/validate-contracts/REFERENCE.md +12 -0
  155. package/skills/validate-fix/SKILL.md +3 -0
  156. package/skills/verify-work/REFERENCE.md +17 -0
  157. package/skills/verify-work/SKILL.md +25 -22
  158. package/skills/wire-ci/REFERENCE.md +11 -0
  159. package/skills/write-document/REFERENCE.md +10 -0
  160. package/skills-lock.json +41 -31
@@ -5,6 +5,13 @@ effort: standard
5
5
  description: Dispatch multiple subagents in parallel on independent tasks. No waiting between them — all run concurrently. Use when tasks are truly decoupled and speed matters. Distinct from delegate-task (concurrent here, no inter-task review gate).
6
6
  ---
7
7
 
8
+ # story: e09s04
9
+ # story: e45s38
10
+ <!-- story: e45s11 -->
11
+
12
+
13
+ # story: e45s30
14
+
8
15
  # Dispatch Agents
9
16
  > **HARD GATE** — **HARD GATE** — Agent work must be parallelizable and have explicit synchronization points. Do NOT dispatch work that has hidden dependencies between agents.
10
17
 
@@ -36,30 +43,57 @@ Before dispatching, verify each task pair is truly independent:
36
43
 
37
44
  If any two tasks conflict, sequence them with `delegate-task` or `execute-plan` instead.
38
45
 
39
- ### 2. Write task briefs
46
+ ## Subagent depth tiers (e45s30)
40
47
 
41
- Before writing briefs, read `specs/state.yaml` if it exists — each agent gets only the decisions relevant to its task, nothing else.
48
+ Map `effort:` frontmatter and story `risk:` to prompt depth — do not send `minimal_decisive` agents a `full_maturity` brief.
42
49
 
43
- For each task, use this minimal template (each agent starts cold — brief size directly controls token cost and hallucination risk):
50
+ | Tier | When | Brief shape | Token budget |
51
+ |------|------|-------------|----------------|
52
+ | `full_maturity` | `effort: heavy`, `risk: P0`, security-sensitive diffs | Full `task_brief` + CONVENTIONS excerpts + threat model if present | Full envelope |
53
+ | `standard` | `effort: standard`, `risk: P1`–`P2` | Standard `task_brief` fields below | Default |
54
+ | `minimal_decisive` | `effort: light`, `risk: P3`, read-only exploration | `goal` + `verify` + `in_scope` only | ≤15 lines |
44
55
 
45
- ```
46
- Goal: [one sentence — what success looks like]
47
- In scope: [explicit file or module list]
48
- Out of bounds: [what NOT to touch]
49
- Verify: [runnable command]
50
- Prior decisions: [relevant entries from specs/state.yaml — omit section if none apply]
56
+ Record `depth: <tier>` in the Agent tool description when dispatching.
57
+
58
+ ### 2. Write typed task briefs (Orca message protocol)
59
+
60
+ Before writing briefs, read `specs/state.yaml` if it exists — each agent gets only the decisions relevant to its task, nothing else.
61
+
62
+ Every inter-agent message uses a **typed envelope** — no freeform prose between waves:
63
+
64
+ | `type` | When | Required fields |
65
+ |--------|------|-----------------|
66
+ | `task_brief` | Dispatch | `task_id`, `goal`, `in_scope`, `out_of_bounds`, `verify`, `prior_decisions` |
67
+ | `checkpoint` | Mid-wave progress | `task_id`, `status` (`running`\|`blocked`), `comment` (one line) |
68
+ | `result` | Agent return | `task_id`, `exit` (`pass`\|`fail`), `summary`, `verify_output` |
69
+ | `circuit_open` | 3 consecutive failures | `task_id`, `failures` (3), `escalate_to` (`user`) |
70
+
71
+ Example `task_brief` (each agent starts cold — brief size directly controls token cost and hallucination risk):
72
+
73
+ ```yaml
74
+ type: task_brief
75
+ task_id: agent-1
76
+ goal: [one sentence — what success looks like]
77
+ in_scope: [explicit file or module list]
78
+ out_of_bounds: [what NOT to touch]
79
+ verify: [runnable command]
80
+ prior_decisions: [relevant entries from specs/state.yaml — omit if none]
51
81
  ```
52
82
 
83
+ Emit **`checkpoint`** comments when an agent is slow or blocked — one line, no stack traces. Parent reads checkpoints before spawning follow-ups.
84
+
53
85
  Do not include the full conversation, full file contents, or decisions unrelated to this agent's task.
54
86
 
55
- ### 3. Iterative retrieval (max 3 cycles)
87
+ ### 3. Circuit breaker + iterative retrieval (max 3 cycles)
88
+
89
+ Track **consecutive failures per `task_id`**. On the **3rd consecutive `result.exit: fail`** for the same task, emit `type: circuit_open` and **stop dispatching** that task — escalate to user with the three failure summaries. Reset counter on any `pass`.
56
90
 
57
91
  After each wave completes:
58
- 1. **Dispatch** — run parallel agents with briefs.
59
- 2. **Evaluate** — read outputs; list gaps vs goal.
92
+ 1. **Dispatch** — run parallel agents with typed `task_brief` envelopes.
93
+ 2. **Evaluate** — read `result` messages; list gaps vs goal; honor open circuits.
60
94
  3. **Refine** — tighten briefs or spawn follow-up agents (max **3 cycles** total).
61
95
 
62
- Stop when gaps empty or cycle 3 reached — escalate to user.
96
+ Stop when gaps empty, circuit opens, or cycle 3 reached — escalate to user. If agents go silent without returning, invoke `diagnose-stall` before spawning another wave.
63
97
 
64
98
  ### 4. Dispatch in parallel
65
99
 
@@ -73,14 +107,14 @@ Agent 3: brief for task C
73
107
 
74
108
  ### 5. Collect and review results
75
109
 
76
- When all agents return:
77
- - Review each result independently
78
- - Run all verify commands
79
- - Check diffs for scope violations or CONVENTIONS.md breaches
110
+ When all agents return: review each result, run verify commands, check diffs for scope violations.
80
111
 
81
112
  ### 6. Integrate
82
113
 
83
- Merge accepted results. If any agent's result conflicts with another, resolve manually and note the conflict.
114
+ Merge accepted results. Resolve conflicts manually; note in summary.
115
+
116
+ Report: which tasks succeeded, which need revision, overall verify status.
84
117
 
85
- Report a summary: which tasks succeeded, which need revision, and overall verify status.
118
+ ## Verify
119
+ → verify: `grep -q 'circuit_open' skills/dispatch-agents/SKILL.md && grep -q 'task_brief' skills/dispatch-agents/SKILL.md && echo OK || echo FAIL`
86
120
 
@@ -3,6 +3,7 @@ name: elaborate-spec
3
3
  model: opus
4
4
  effort: standard
5
5
  description: Refine a rough idea into a clear, detailed specification through dialogue. Does not produce code. Use when user has a vague idea, wants to think through a feature before planning, or needs to turn "I want X" into a concrete spec.
6
+ # story: e24s01
6
7
  ---
7
8
 
8
9
  # Elaborate Spec
@@ -4,6 +4,10 @@ description: Benchmark-gated skill evolution — consume bigpowers-benchmark rep
4
4
  model: opus
5
5
  effort: standard
6
6
  ---
7
+ # story: e23s03
8
+
9
+ # story: e09s01
10
+ # story: e09s05
7
11
 
8
12
  # Evolve Skill
9
13
 
@@ -31,3 +35,6 @@ effort: standard
31
35
  → verify: `grep -c 'run-benchmark\|pass_at_k\|BASELINE-' skills/evolve-skill/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
32
36
 
33
37
  See [REFERENCE.md](REFERENCE.md) for ADR template.
38
+
39
+
40
+ <!-- story: e31s07 -->
@@ -1,7 +1,9 @@
1
+ # story: e45s05
1
2
  ---
2
3
  name: gate-trace
3
4
  description: "Deterministic traceability quality gate — reads coverage matrix + blind-spot data, applies decision rules with oracle confidence downgrade, emits PASS/CONCERNS/FAIL/WAIVED verdict. Use before release-branch to gate merges on traceability."
4
5
  # story: e38s06
6
+ # story: e45s32
5
7
  model: haiku
6
8
  effort: light
7
9
  ---
@@ -39,7 +41,15 @@ TEA-inspired: if trace links rely on heuristics rather than explicit tags, confi
39
41
  5. Apply oracle confidence downgrade based on the heuristic link ratio from the matrix's `oracle_stats`.
40
42
  6. **Drift check (e39s03):** If `specs/drift-report.json` exists and has suspect links, mark verdict as CONCERNS with note: "Drift detected — some implementing files are newer than their specs. Run scripts/check-spec-drift.sh for details."
41
43
  7. Output verdict + rationale to stdout.
42
- 7. Update `specs/execution-status.yaml` with gate-trace result.
44
+ 8. **Adversarial refute check (e45s32):** Before emitting PASS, attempt to **refute** the verdict — list at least one concrete traceability gap that would block merge if it were real. If the gap is real, downgrade the verdict. Rubber-stamping is prohibited; every PASS must survive one refutation attempt.
45
+ 9. **Completeness critic (e45s05)** — Run adversarial gap-finding:
46
+
47
+ ```bash
48
+ bash scripts/lib/completeness-critic.sh
49
+ ```
50
+
51
+ Classify output as **BLOCKER / WARNING / FILLED**. **BLOCKER overrides any PASS verdict → FAIL.** Append critic summary to rationale.
52
+ 10. Update `specs/execution-status.yaml` with gate-trace result.
43
53
 
44
54
  ## Verdict Semantics
45
55
 
@@ -1,5 +1,19 @@
1
1
  # Git guardrails — reference
2
2
 
3
+ ## Navigation
4
+
5
+ | Lines | Section |
6
+ |-------|---------|
7
+ | 1 | Title |
8
+ | 3–14 | Navigation |
9
+ | 16–24 | Secret patterns |
10
+ | 26–44 | Copy layout |
11
+ | 46–72 | Claude Code |
12
+ | 74–92 | Cursor and Cursor CLI |
13
+ | 94–120 | Gemini CLI |
14
+ | 122–135 | Google Antigravity |
15
+ | 137–178 | Verify (local tests) |
16
+
3
17
  ## Secret patterns (audit + pre-commit)
4
18
 
5
19
  Agents must not commit files containing:
@@ -1,4 +1,3 @@
1
- # story: e51s03
2
1
  ---
3
2
  name: kickoff-branch
4
3
  model: haiku
@@ -6,6 +5,10 @@ effort: standard
6
5
  description: Create a git worktree and feature branch, then verify a clean test baseline before any code is written. Use when starting a new feature or task, when user wants to work in isolation from main, or mentions "start a branch" or "new worktree".
7
6
  ---
8
7
 
8
+ # story: e51s03
9
+ # story: e20s03
10
+
11
+
9
12
  # Kickoff Branch
10
13
 
11
14
  > **HARD GATE** — Direct work on `main` or `master` is PROHIBITED. Every task MUST start with this skill to create a feature branch or worktree.
@@ -1,5 +1,17 @@
1
1
  # Migrate Spec — Reference
2
2
 
3
+ ## Navigation
4
+
5
+ | Lines | Section |
6
+ |-------|---------|
7
+ | 1 | Title |
8
+ | 3–22 | Navigation |
9
+ | 24–62 | spec-kit → bigpowers Mapping |
10
+ | 64–130 | BMAD → bigpowers Mapping |
11
+ | 132–154 | Learnings to Adopt |
12
+ | 156–350 | Output Formats + state.yaml template |
13
+ | 352–620 | Reference blocks 1–2 + extended mappings |
14
+
3
15
  # migrate-spec Reference — spec-kit, BMAD, Learnings
4
16
 
5
17
  Transformation rules for spec-kit and BMAD projects, plus learnings to adopt and output formats.
@@ -4,6 +4,12 @@ model: sonnet
4
4
  effort: standard
5
5
  description: Detect GSD, spec-kit, or BMAD spec artifacts and transform them into bigpowers YAML layout (state.yaml, release-plan.yaml, epics/, requirements/, plans/, ADRs). Use when migrating foreign spec docs.
6
6
  ---
7
+ # story: e25s01
8
+ # story: e25s02
9
+ # story: e25s03
10
+ # story: e25s04
11
+ # story: e25s05
12
+ # story: e25s06
7
13
 
8
14
  # Migrate Spec
9
15
 
@@ -1,5 +1,16 @@
1
1
  # Plan Work — Reference
2
2
 
3
+ ## Navigation
4
+
5
+ | Lines | Section |
6
+ |-------|---------|
7
+ | 1 | Title |
8
+ | 3–14 | Navigation |
9
+ | 16–38 | Output file formats |
10
+ | 40–71 | Plan template |
11
+ | 73–91 | Verify step format rules |
12
+ | 93–131 | Sub-operations (risk, define-success, zoom-out, slopcheck, delta tags) |
13
+
3
14
  ## Output file formats
4
15
 
5
16
  ### Story spec: `specs/epics/<capsule>/eNNsYY-<slug>.md`
@@ -11,14 +22,14 @@ Populated countable-story-format with all 20 sections. Minimum maturity: 3 (Coun
11
22
  ```yaml
12
23
  story_id: e01s01
13
24
  title: Login
14
- status: todo
25
+ status: failing
15
26
  bcps: 3
16
27
  tasks:
17
28
  - id: 1
18
29
  description: "Add login form component tests"
19
30
  verify: "npm test -- login-form.test.tsx"
20
31
  risk: P1
21
- status: todo
32
+ status: failing # flip to passing only after verify exits 0 (e45s06)
22
33
  ```
23
34
 
24
35
  Update `specs/epics/<capsule>/epic.yaml` manifest to list the story and its BCPs. Run `bash scripts/sync-status-from-epics.sh` after structural changes.
@@ -89,6 +100,22 @@ Every task and story MUST be assigned a `risk:` level (P0, P1, P2, P3). When `sp
89
100
 
90
101
  `verify-work` scales its UAT depth based on this field.
91
102
 
103
+ ### Requirement delta tags (e45s29)
104
+
105
+ When modifying existing behavior in story spec § Requirements:
106
+
107
+ ```markdown
108
+ #### MODIFIED: User can reset password via email link
109
+ **Before:** Password reset required admin approval.
110
+ **After:** Self-service reset via signed email link (expires 1h).
111
+
112
+ #### REMOVED: Legacy OAuth1 login
113
+ **Before:** OAuth1 provider supported for enterprise SSO.
114
+ **After:** (removed) — provider deprecated; OAuth2 only.
115
+ ```
116
+
117
+ Tags: `ADDED`, `MODIFIED`, `REMOVED`, `RENAMED`. `MODIFIED`/`REMOVED`/`RENAMED` without before/after → plan-work gate FAIL.
118
+
92
119
  ### Define Success
93
120
 
94
121
  Before planning, convert task statements into observable "step → verify: <cmd>" pairs:
@@ -1,3 +1,8 @@
1
+ # story: e45s04
2
+ # story: e45s06
3
+ # story: e45s09
4
+ # story: e45s33
5
+ # story: e45s35
1
6
  ---
2
7
  name: plan-work
3
8
  model: opus
@@ -5,6 +10,8 @@ effort: standard
5
10
  description: "PLANNING SPINE STEP 3 of 3 — Plan the work: write detailed implementation tasks into the active epic capsule (specs/epics/eNN-slug/). Produces countable-story-format .md specs and runnable -tasks.yaml files. Use after slice-tasks (step 2). Not a substitute for scope-work (step 1) or slice-tasks (step 2)."
6
11
  ---
7
12
 
13
+ # story: e45s29
14
+
8
15
  # Plan Work
9
16
 
10
17
  > **Spine position:** Step 3 — scope-work → slice-tasks → plan-work.
@@ -46,14 +53,45 @@ If this plan touches an existing module, run `assess-impact` first to understand
46
53
 
47
54
  3. **Write capsule story spec + tasks** — Output two files inside the active epic capsule. See [REFERENCE.md](REFERENCE.md) for file formats and the plan-template. Each task MUST include a `risk:` field (`P0` | `P1` | `P2` | `P3`) based on BCP + story type heuristics (see REFERENCE.md). If a test plan artifact (`specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`) exists, read it and inherit its P0/P1 risk classifications and scenario IDs (`SC-eNNsYY-P0-NN`). Each task optionally includes a `security:` field (`none` / `low` / `medium` / `high`) sourced from the epic's `specs/security/epics/<id>/THREAT_MODEL.md`. Tasks with `security: medium` or `security: high` MUST include "no new security findings in affected paths" in their verify steps.
48
55
 
56
+ **Requirement delta tags (e45s29):** When a story modifies existing behavior, the story spec § Requirements MUST use OpenSpec-style delta tags with mandatory before/after content:
57
+
58
+ | Tag | When | Required content |
59
+ |-----|------|------------------|
60
+ | `ADDED` | New requirement | Full requirement text |
61
+ | `MODIFIED` | Changed behavior | **Before:** prior behavior · **After:** new behavior |
62
+ | `REMOVED` | Retired requirement | **Before:** what existed · **After:** (removed) + rationale |
63
+ | `RENAMED` | ID or title change only | **Before:** old ID/title · **After:** new ID/title |
64
+
65
+ Net-new stories (greenfield) use `ADDED` only. `MODIFIED`/`REMOVED`/`RENAMED` without before/after blocks fail the plan-work gate.
66
+
49
67
  4. **Verify step format** — Every step MUST follow: `N. <What to do> → verify: <runnable command>`. See [REFERENCE.md](REFERENCE.md) for good/bad examples.
50
68
 
69
+ 4a. **Cross-artifact consistency pass (HARD GATE — e45s04)** — Before handoff, run:
70
+
71
+ ```bash
72
+ bash scripts/lib/plan-consistency-check.sh specs/epics/<capsule>/
73
+ ```
74
+
75
+ Print CRITICAL / HIGH / MED findings. **CRITICAL or HIGH blocks code generation** — fix capsule artifacts first. MED requires explicit user acknowledgment.
76
+
77
+ 4b. **tasks.yaml failing ledger (e45s06)** — Every new task entry starts with `status: failing`. Only flip to `status: passing` after its `verify:` command exits 0 during `develop-tdd` or `verify-work`. Never pre-mark passing at plan time.
78
+
51
79
  5. **Review with user** — Confirm step order, granularity, and that verify commands are runnable in this project.
52
80
 
81
+ ## Lifecycle Gates (e45s09)
82
+
83
+ | Gate | When | Pass condition |
84
+ |------|------|----------------|
85
+ | **Pre-Implementation** | Before `kickoff-branch` / first RED commit | Root-cause stated for bugs; `assess-impact` done for module changes; plan-consistency-check PASS |
86
+ | **Validation** | Story marked done | All tasks `status: passing`; verify evidence in `specs/verifications/` |
87
+ | **Reopen-don't-refile** | Regression on shipped story | Reopen existing story/bug — do not create duplicate capsule entries |
88
+
53
89
  After writing capsule tasks, suggest `kickoff-branch` (if not already on a feature branch) then `build-epic`, `execute-plan`, or `develop-tdd`.
54
90
 
55
91
  ## Verify
56
92
 
93
+ → verify: `test -f scripts/lib/plan-consistency-check.sh && bash scripts/lib/plan-consistency-check.sh specs/epics/e45-quality-core/ 2>&1 | head -5`
94
+
57
95
 
58
96
 
59
97
  ## Handoff
@@ -1,5 +1,16 @@
1
1
  # Publish Package — Reference
2
2
 
3
+ ## Navigation
4
+
5
+ | Lines | Section |
6
+ |-------|---------|
7
+ | 1 | Title |
8
+ | 3–18 | Navigation |
9
+ | 20–28 | Options |
10
+ | 30–60 | Examples |
11
+ | 62–72 | Integration with release-branch |
12
+ | 74–252 | Reference blocks 1–8 |
13
+
3
14
  ## Options
4
15
 
5
16
  | Flag | Description |
@@ -1,5 +1,19 @@
1
1
  # Release Branch — Reference
2
2
 
3
+ ## Navigation
4
+
5
+ | Lines | Section |
6
+ |-------|---------|
7
+ | 1–3 | Title |
8
+ | 5–16 | Navigation |
9
+ | 18–41 | PR body template |
10
+ | 43–54 | Worktree cleanup |
11
+ | 56–96 | Cycle-time recording |
12
+ | 98–119 | CI verification |
13
+ | 121–126 | Solo-local fallback |
14
+ | 128–134 | Handoff |
15
+ | 136–155 | Reference block 1 (manual squash) |
16
+
3
17
  # Release Branch — Reference
4
18
 
5
19
  ## PR body template (team-pr mode)
@@ -1,11 +1,18 @@
1
- <!-- story: e38s07 -->
2
1
  ---
3
2
  name: release-branch
3
+ # story: e14s01 e15s03
4
4
  model: haiku
5
5
  effort: standard
6
6
  description: Make the merge/PR/keep/discard decision for a feature branch, verify coverage gates, create the PR with gh, and clean up the worktree. Use when a feature is done and ready to ship, or when user says "release", "merge", or "open a PR".
7
7
  ---
8
8
 
9
+ <!-- story: e38s07 -->
10
+ <!-- story: e45s15 -->
11
+ <!-- story: e45s32 -->
12
+ <!-- story: e45s39 -->
13
+ <!-- story: e20s02 -->
14
+
15
+
9
16
  # Release Branch
10
17
 
11
18
  > **HARD GATE** — Do NOT merge or release if tests fail or if coverage gates are not met. If the branch is red, return to `develop-tdd` to fix regressions or add missing tests before proceeding.
@@ -55,6 +62,8 @@ If REVIEW.md is missing or stale → run `security-review` inline. Findings bloc
55
62
 
56
63
  Run `gate-trace` before merge. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml` (`traceability_override: CONCERNS accepted, reason: <explanation>`). WAIVED if no matrix available.
57
64
 
65
+ > **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
66
+
58
67
  ### 3. Diff review
59
68
 
60
69
  - [ ] All commits intentional, no secrets, CONVENTIONS.md compliance
@@ -75,9 +84,26 @@ bash scripts/land-branch.sh <task-slug> "feat(scope): description"
75
84
 
76
85
  ### 6. Create PR (team-pr only)
77
86
 
78
- Create the pull request, then merge via `gh`:
87
+ Create the pull request with a **literal provenance marker** in the body so agent-generated PRs are identifiable and do not rot silently:
88
+
89
+ ```markdown
90
+ <!-- bigpowers-provenance: agent-generated -->
91
+ ```
92
+
93
+ Place the marker on its own line immediately after the `## Summary` heading. Then merge via `gh`:
79
94
 
80
95
  ```bash
96
+ gh pr create --title "..." --body "$(cat <<'EOF'
97
+ ## Summary
98
+ <!-- bigpowers-provenance: agent-generated -->
99
+
100
+ - ...
101
+
102
+ ## Test plan
103
+ - [ ] ...
104
+
105
+ EOF
106
+ )"
81
107
  gh pr merge --squash --delete-branch
82
108
  ```
83
109
 
@@ -93,55 +119,18 @@ mv specs/epics/eNN-slug specs/epics/archive/
93
119
 
94
120
  ### 7b. CI verification & agent lock release (e39s02)
95
121
 
96
- > **HARD GATE** — Do NOT declare success until CI completes. A push that fails CI is a regression, not a release.
97
-
98
- After push, run CI polling:
122
+ > **HARD GATE** — Do NOT declare success until CI completes. **Three-independent-facts** (e45s15): commit landed, workflow green, registry visible — see [REFERENCE.md](REFERENCE.md#three-independent-facts-release).
99
123
 
100
124
  ```bash
101
125
  bash scripts/wait-for-ci.sh --timeout 600 --interval 30
102
126
  ```
103
127
 
104
- Then release the story lock:
128
+ - [ ] CI passes; `release.ci_verified: true` in state.yaml
129
+ - On failure: `handoff.next_skill = fix-bug`
105
130
 
106
- ```bash
107
- LOCK="specs/agent-locks.yaml"; STORY="<story-id>"
108
- [ -f "$LOCK" ] && python3 -c "
109
- import yaml
110
- d=yaml.safe_load(open('$LOCK'))
111
- if d:d['locks']=[l for l in d['locks'] if l.get('story_id')!='$STORY']
112
- yaml.dump(d,open('$LOCK','w'),default_flow_style=False)
113
- print(f'LOCK RELEASED: $STORY')
114
- "||echo "No lock for $STORY — idempotent"
115
- ```
131
+ ### 8. Clean up & return
116
132
 
117
- - [ ] CI workflow passes after push (wait-for-ci.sh exit 0)
118
- - [ ] `release.ci_verified: true` documented in state.yaml
119
- - On failure: `handoff.next_skill = fix-bug` with CI failure URL
120
-
121
- ### 8. Clean up worktree
122
-
123
- ```bash
124
- git worktree prune
125
- git worktree remove ../<branch-name> 2>/dev/null || true
126
- git branch -d <branch-name>
127
- ```
128
-
129
- ### 8a. Cycle-time recording
130
-
131
- After landing, record delivery metrics with the git-derived, additive script:
132
-
133
- ```bash
134
- bash scripts/record-cycle-time.sh append \
135
- --story <story_id> --bcps <bcps> \
136
- --range "$(git merge-base main HEAD)..HEAD" \
137
- --file specs/metrics/cycle-times.yaml
138
- ```
139
-
140
- ### 9. Return to main
141
-
142
- ```bash
143
- git checkout main && git status && pwd
144
- ```
133
+ Worktree prune, branch delete, `git checkout main`. Cycle-time: see [REFERENCE.md](REFERENCE.md#cycle-time).
145
134
 
146
135
  Report: "Branch released."
147
136
 
@@ -1,3 +1,6 @@
1
+ # story: e45s07
2
+ <!-- story: e45s07 -->
3
+ <!-- story: e45s17 -->
1
4
  ---
2
5
  name: request-review
3
6
  model: opus
@@ -5,21 +8,44 @@ effort: standard
5
8
  description: Dispatch a fresh reviewer agent with a clean context to critique the code after audit-code passes. The reviewer has no shared state with the coding agent and gives a genuine second opinion. Use after audit-code passes, before committing, or when user wants an independent code review.
6
9
  ---
7
10
 
11
+ # story: e45s28
12
+
8
13
  # Request Review
9
14
 
10
- Dispatch a fresh reviewer agent with a clean context. The reviewer has no shared state — it can give a genuine second opinion because it hasn't been involved in writing the code.
15
+ Dispatch fresh reviewer agents with clean contexts. Reviewers have no shared state — they find what the coding agent missed.
16
+
17
+ **Distinct from `audit-code`:** `audit-code` is self-review (internal). This skill dispatches external agents.
18
+
19
+ **Solo developer note:** Reviewer agents replace the human reviewer.
20
+
21
+ **Run `audit-code` first.** Don't waste reviewer attention on hygiene issues you could have caught yourself.
22
+
23
+ ## Santa Method — Dual-Blind AND Gate (e45s07)
24
+
25
+ Use **two independent reviewers** (Reviewer A and Reviewer B) with **no shared context** between them or the coding agent.
11
26
 
12
- **Distinct from `audit-code`:** `audit-code` is the coding agent checking its own work (internal). This skill dispatches an external agent whose job is to find what the coding agent missed.
27
+ | Parameter | Value |
28
+ |-----------|-------|
29
+ | Reviewers | 2 (mandatory) |
30
+ | `MAX_REVIEW_ITERATIONS` | **5** (hard cap — e45s28; iteration 6 forbidden) |
31
+ | Pass rule | **AND-gate** — both reviewers must pass independently |
32
+ | Blindness | Neither reviewer sees the other's report until both complete |
13
33
 
14
- **Solo developer note:** This replaces the human reviewer. The reviewer agent IS the reviewer.
34
+ **Iteration loop (max `MAX_REVIEW_ITERATIONS`):**
15
35
 
16
- **Run `audit-code` first.** This skill assumes `audit-code` has already passed. Don't waste a reviewer's attention on hygiene issues you could have caught yourself.
36
+ 1. Dispatch Reviewer A and Reviewer B in parallel with identical briefs but separate contexts.
37
+ 2. Collect both reports. Each categorizes findings: must-fix / should-fix / consider.
38
+ 3. **AND-gate:** If **either** reviewer has must-fix findings → FAIL round. Run `respond-review`, fix, re-dispatch both reviewers.
39
+ 4. If both pass (zero must-fix, score ≥ 94% each) → review complete.
40
+ 5. After **5** iterations without dual pass → **stop**; report "Review cap exhausted (5/5). Human decision required." Do not merge.
41
+
42
+ > **HARD GATE** — Single-reviewer pass is insufficient. Partial agreement does not satisfy the AND-gate.
17
43
 
18
44
  ## Process
19
45
 
20
46
  ### 1. Prepare the review brief
21
47
 
22
- Write a self-contained brief for the reviewer agent. Include:
48
+ Write a self-contained brief for each reviewer. Include:
23
49
 
24
50
  - What was built (feature description, not implementation)
25
51
  - Which files changed (the diff context)
@@ -29,12 +55,25 @@ Write a self-contained brief for the reviewer agent. Include:
29
55
  - What you're most uncertain about (where you want fresh eyes)
30
56
  - **Security focus** — If the epic has a `specs/security/epics/<id>/THREAT_MODEL.md`, include the relevant vulnerability categories as reviewer focal points. Also include the false-positive exclusion rules so the reviewer avoids known-safe patterns. Tag the review as `security-sensitive: true` if THREAT_MODEL risk is HIGH+.
31
57
 
32
- ### 2. Dispatch the reviewer agent
58
+ ### 2. Fan-out parallel reviewers (e45s17)
59
+
60
+ Beyond the mandatory dual-blind pair (e45s07), optionally dispatch **N dimension-specific subagents in one message** — one check per agent for broader coverage (OpenAI Codex `code-review-*` pattern):
61
+
62
+ | Agent | Focus |
63
+ |-------|-------|
64
+ | R-correctness | Logic, edge cases, verify command result |
65
+ | R-conventions | CONVENTIONS.md, test quality (F.I.R.S.T) |
66
+ | R-security | Injection, auth, secrets (when `security-sensitive`) |
67
+ | R-design | Simpler alternatives, API shape |
33
68
 
34
- Use the Agent tool with a completely fresh context. The agent prompt must be self-contained — no references to "our conversation" or "what we discussed."
69
+ Santa Method still applies: each agent is blind; AND-gate uses Reviewer A + B scores. Fan-out agents feed findings into `respond-review` but do not replace the dual-blind pair.
70
+
71
+ ### 2b. Dispatch both reviewer agents (parallel)
72
+
73
+ Use the Agent tool twice with completely fresh contexts. Each prompt must be self-contained — no references to "our conversation" or "what we discussed."
35
74
 
36
75
  ```
37
- You are a code reviewer. Review the following code changes.
76
+ You are code reviewer [A|B]. Review the following code changes independently.
38
77
 
39
78
  Context: [feature description]
40
79
  CONVENTIONS.md rules: [paste relevant sections]
@@ -56,19 +95,22 @@ For each finding, categorize as: must-fix / should-fix / consider.
56
95
  Run the verify command and report the result.
57
96
  ```
58
97
 
59
- ### 3. Collect the report
98
+ ### 3. Collect both reports
60
99
 
61
- When the reviewer returns:
62
- - Read every finding before acting on any
63
- - Note the verify command result
64
- - Compute the quality score: `100 × (total_items − must_fix − should_fix) / total_items`
65
- - Report the score to the user
100
+ When reviewers return:
101
+ - Read every finding from **both** reports before acting on any
102
+ - Note each verify command result
103
+ - Compute quality score per reviewer: `100 × (total_items − must_fix − should_fix) / total_items`
104
+ - **AND-gate check:** both scores ≥ 94% and zero must-fix from **both**?
66
105
 
67
- > **HARD GATE** — If score < 94%, do NOT merge. Run `respond-review` to resolve must-fix and should-fix findings first. The 94% threshold also applies to the compliance SCORE computed by `npm run compliance` (scripts/audit-compliance.sh): SCORE = passing Gherkin scenarios / total × 100.
106
+ > **HARD GATE** — If either score < 94% or either has must-fix → FAIL round. Run `respond-review` first. The 94% threshold also applies to `npm run compliance` (scripts/audit-compliance.sh).
68
107
 
69
108
  ### 4. Hand off to respond-review
70
109
 
71
- Pass the reviewer's report to `respond-review` to categorize findings and apply fixes.
110
+ Pass combined findings to `respond-review` to categorize and apply fixes. Increment iteration counter. Re-dispatch both reviewers until AND-gate passes or iteration 3 exhausted.
111
+
112
+ Report to user: "Review round [N/3]. Reviewer A: [score], Reviewer B: [score]. AND-gate: [PASS|FAIL]."
72
113
 
73
- Report to user: "Review complete. [N] findings: [X] must-fix, [Y] should-fix, [Z] consider. Running respond-review."
114
+ ## Verify
74
115
 
116
+ → verify: `grep -q 'AND-gate' skills/request-review/SKILL.md && grep -q 'max 3' skills/request-review/SKILL.md && echo OK`
@@ -5,6 +5,9 @@ model: sonnet
5
5
  effort: standard
6
6
  ---
7
7
 
8
+ # story: e03s01
9
+ # story: e21s02
10
+
8
11
  # Research First
9
12
 
10
13
  > **HARD GATE** — Do NOT implement until prior art is searched. Minimum outcome: adopt, extend, compose, or build — with evidence.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: run-benchmark
3
- # story: e48s01
3
+ # story: e45s01
4
4
  model: haiku
5
5
  effort: standard
6
6
  description: Run skill quality benchmarks from specs/benchmarks/ definitions — N-run with/without-skill delta grading, train/validation split, pass@k + benchmark.json reports. Use before and after evolve-skill to prove quality changes are improvements, not regressions.
7
+ # story: e23s02
7
8
  ---
8
9
 
9
10
  # Run Benchmark
@@ -30,9 +31,9 @@ Benchmark definitions partition scenarios into two sets:
30
31
  ## Usage
31
32
 
32
33
  ```bash
33
- run-benchmark <skill-name> # benchmark single skill
34
- run-benchmark --all # benchmark all with definitions
35
- run-benchmark <skill-name> --baseline # pin results as baseline
34
+ bash scripts/run-benchmark.sh <skill-name> # benchmark single skill
35
+ bash scripts/run-benchmark.sh --all # benchmark all with definitions
36
+ bash scripts/run-benchmark.sh <skill-name> --baseline # pin results as baseline
36
37
  ```
37
38
 
38
39
  ## Process