bigpowers 2.1.3 → 2.3.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 (164) hide show
  1. package/.pi/package.json +16 -0
  2. package/.pi/prompts/assess-impact.md +76 -0
  3. package/.pi/prompts/audit-code.md +156 -0
  4. package/.pi/prompts/build-epic.md +44 -0
  5. package/.pi/prompts/change-request.md +105 -0
  6. package/.pi/prompts/commit-message.md +135 -0
  7. package/.pi/prompts/compose-workflow.md +40 -0
  8. package/.pi/prompts/craft-skill.md +150 -0
  9. package/.pi/prompts/deepen-architecture.md +235 -0
  10. package/.pi/prompts/define-language.md +79 -0
  11. package/.pi/prompts/define-success.md +62 -0
  12. package/.pi/prompts/delegate-task.md +76 -0
  13. package/.pi/prompts/design-interface.md +96 -0
  14. package/.pi/prompts/develop-tdd.md +375 -0
  15. package/.pi/prompts/diagnose-root.md +23 -0
  16. package/.pi/prompts/dispatch-agents.md +83 -0
  17. package/.pi/prompts/edit-document.md +22 -0
  18. package/.pi/prompts/elaborate-spec.md +81 -0
  19. package/.pi/prompts/enforce-first.md +77 -0
  20. package/.pi/prompts/evolve-skill.md +38 -0
  21. package/.pi/prompts/execute-plan.md +54 -0
  22. package/.pi/prompts/fix-bug.md +36 -0
  23. package/.pi/prompts/grill-me.md +95 -0
  24. package/.pi/prompts/grill-with-docs.md +37 -0
  25. package/.pi/prompts/guard-git.md +212 -0
  26. package/.pi/prompts/hook-commits.md +93 -0
  27. package/.pi/prompts/inspect-quality.md +105 -0
  28. package/.pi/prompts/investigate-bug.md +117 -0
  29. package/.pi/prompts/kickoff-branch.md +99 -0
  30. package/.pi/prompts/map-codebase.md +70 -0
  31. package/.pi/prompts/migrate-spec.md +482 -0
  32. package/.pi/prompts/model-domain.md +227 -0
  33. package/.pi/prompts/orchestrate-project.md +161 -0
  34. package/.pi/prompts/organize-workspace.md +159 -0
  35. package/.pi/prompts/plan-refactor.md +77 -0
  36. package/.pi/prompts/plan-release.md +145 -0
  37. package/.pi/prompts/plan-work.md +161 -0
  38. package/.pi/prompts/release-branch.md +158 -0
  39. package/.pi/prompts/request-review.md +70 -0
  40. package/.pi/prompts/research-first.md +62 -0
  41. package/.pi/prompts/reset-baseline.md +20 -0
  42. package/.pi/prompts/respond-review.md +70 -0
  43. package/.pi/prompts/run-evals.md +56 -0
  44. package/.pi/prompts/run-planning.md +26 -0
  45. package/.pi/prompts/scope-work.md +23 -0
  46. package/.pi/prompts/search-skills.md +21 -0
  47. package/.pi/prompts/seed-conventions.md +132 -0
  48. package/.pi/prompts/session-state.md +146 -0
  49. package/.pi/prompts/setup-environment.md +23 -0
  50. package/.pi/prompts/simulate-agents.md +25 -0
  51. package/.pi/prompts/slice-tasks.md +23 -0
  52. package/.pi/prompts/spike-prototype.md +94 -0
  53. package/.pi/prompts/stocktake-skills.md +40 -0
  54. package/.pi/prompts/survey-context.md +129 -0
  55. package/.pi/prompts/terse-mode.md +37 -0
  56. package/.pi/prompts/trace-requirement.md +68 -0
  57. package/.pi/prompts/using-bigpowers.md +105 -0
  58. package/.pi/prompts/validate-fix.md +98 -0
  59. package/.pi/prompts/verify-work.md +125 -0
  60. package/.pi/prompts/visual-dashboard.md +51 -0
  61. package/.pi/prompts/wire-observability.md +92 -0
  62. package/.pi/prompts/write-document.md +244 -0
  63. package/.pi/skills/assess-impact/SKILL.md +77 -0
  64. package/.pi/skills/audit-code/SKILL.md +157 -0
  65. package/.pi/skills/build-epic/SKILL.md +45 -0
  66. package/.pi/skills/change-request/SKILL.md +106 -0
  67. package/.pi/skills/commit-message/SKILL.md +136 -0
  68. package/.pi/skills/compose-workflow/SKILL.md +41 -0
  69. package/.pi/skills/craft-skill/SKILL.md +151 -0
  70. package/.pi/skills/deepen-architecture/SKILL.md +236 -0
  71. package/.pi/skills/define-language/SKILL.md +80 -0
  72. package/.pi/skills/define-success/SKILL.md +63 -0
  73. package/.pi/skills/delegate-task/SKILL.md +77 -0
  74. package/.pi/skills/design-interface/SKILL.md +97 -0
  75. package/.pi/skills/develop-tdd/SKILL.md +376 -0
  76. package/.pi/skills/diagnose-root/SKILL.md +24 -0
  77. package/.pi/skills/dispatch-agents/SKILL.md +84 -0
  78. package/.pi/skills/edit-document/SKILL.md +23 -0
  79. package/.pi/skills/elaborate-spec/SKILL.md +82 -0
  80. package/.pi/skills/enforce-first/SKILL.md +78 -0
  81. package/.pi/skills/evolve-skill/SKILL.md +39 -0
  82. package/.pi/skills/execute-plan/SKILL.md +55 -0
  83. package/.pi/skills/fix-bug/SKILL.md +37 -0
  84. package/.pi/skills/grill-me/SKILL.md +96 -0
  85. package/.pi/skills/grill-with-docs/SKILL.md +38 -0
  86. package/.pi/skills/guard-git/SKILL.md +213 -0
  87. package/.pi/skills/hook-commits/SKILL.md +94 -0
  88. package/.pi/skills/inspect-quality/SKILL.md +106 -0
  89. package/.pi/skills/investigate-bug/SKILL.md +118 -0
  90. package/.pi/skills/kickoff-branch/SKILL.md +100 -0
  91. package/.pi/skills/map-codebase/SKILL.md +71 -0
  92. package/.pi/skills/migrate-spec/SKILL.md +483 -0
  93. package/.pi/skills/model-domain/SKILL.md +228 -0
  94. package/.pi/skills/orchestrate-project/SKILL.md +162 -0
  95. package/.pi/skills/organize-workspace/SKILL.md +160 -0
  96. package/.pi/skills/plan-refactor/SKILL.md +78 -0
  97. package/.pi/skills/plan-release/SKILL.md +146 -0
  98. package/.pi/skills/plan-work/SKILL.md +162 -0
  99. package/.pi/skills/release-branch/SKILL.md +159 -0
  100. package/.pi/skills/request-review/SKILL.md +71 -0
  101. package/.pi/skills/research-first/SKILL.md +63 -0
  102. package/.pi/skills/reset-baseline/SKILL.md +21 -0
  103. package/.pi/skills/respond-review/SKILL.md +71 -0
  104. package/.pi/skills/run-evals/SKILL.md +57 -0
  105. package/.pi/skills/run-planning/SKILL.md +27 -0
  106. package/.pi/skills/scope-work/SKILL.md +24 -0
  107. package/.pi/skills/search-skills/SKILL.md +22 -0
  108. package/.pi/skills/seed-conventions/SKILL.md +133 -0
  109. package/.pi/skills/session-state/SKILL.md +147 -0
  110. package/.pi/skills/setup-environment/SKILL.md +24 -0
  111. package/.pi/skills/simulate-agents/SKILL.md +26 -0
  112. package/.pi/skills/slice-tasks/SKILL.md +24 -0
  113. package/.pi/skills/spike-prototype/SKILL.md +95 -0
  114. package/.pi/skills/stocktake-skills/SKILL.md +41 -0
  115. package/.pi/skills/survey-context/SKILL.md +130 -0
  116. package/.pi/skills/terse-mode/SKILL.md +38 -0
  117. package/.pi/skills/trace-requirement/SKILL.md +69 -0
  118. package/.pi/skills/using-bigpowers/SKILL.md +106 -0
  119. package/.pi/skills/validate-fix/SKILL.md +99 -0
  120. package/.pi/skills/verify-work/SKILL.md +126 -0
  121. package/.pi/skills/visual-dashboard/SKILL.md +52 -0
  122. package/.pi/skills/wire-observability/SKILL.md +93 -0
  123. package/.pi/skills/write-document/SKILL.md +245 -0
  124. package/CHANGELOG.md +14 -0
  125. package/CLAUDE.md +1 -1
  126. package/CONVENTIONS.md +16 -10
  127. package/README.md +30 -4
  128. package/build-epic/SKILL.md +1 -1
  129. package/deepen-architecture/SKILL.md +2 -0
  130. package/define-language/SKILL.md +2 -0
  131. package/develop-tdd/REFERENCE.md +61 -0
  132. package/develop-tdd/SKILL.md +19 -119
  133. package/diagnose-root/SKILL.md +2 -0
  134. package/edit-document/SKILL.md +2 -0
  135. package/fix-bug/SKILL.md +3 -1
  136. package/grill-me/SKILL.md +3 -1
  137. package/grill-with-docs/SKILL.md +3 -1
  138. package/investigate-bug/SKILL.md +5 -11
  139. package/map-codebase/SKILL.md +3 -1
  140. package/migrate-spec/REFERENCE-GSD.md +4 -4
  141. package/migrate-spec/REFERENCE.md +33 -6
  142. package/migrate-spec/SKILL.md +1 -14
  143. package/model-domain/SKILL.md +2 -0
  144. package/orchestrate-project/REFERENCE.md +1 -1
  145. package/package.json +3 -2
  146. package/plan-release/SKILL.md +1 -1
  147. package/plan-work/REFERENCE.md +104 -0
  148. package/plan-work/SKILL.md +17 -151
  149. package/release-branch/REFERENCE.md +55 -0
  150. package/release-branch/SKILL.md +19 -117
  151. package/request-review/SKILL.md +1 -1
  152. package/run-planning/SKILL.md +3 -2
  153. package/scope-work/SKILL.md +3 -1
  154. package/scripts/audit-compliance.sh +15 -3
  155. package/scripts/check-skill-size.sh +79 -0
  156. package/scripts/generate-reference-tables.sh +64 -0
  157. package/scripts/project-survey.sh +2 -2
  158. package/scripts/sync-skills.sh +51 -3
  159. package/scripts/validate-doctrine.sh +143 -0
  160. package/seed-conventions/REFERENCE.md +63 -0
  161. package/seed-conventions/SKILL.md +23 -177
  162. package/slice-tasks/SKILL.md +3 -1
  163. package/survey-context/SKILL.md +3 -1
  164. package/write-document/SKILL.md +4 -2
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: run-evals
3
+ description: "Eval-Driven Development — define capability and regression evals before building; code graders use verify commands, model graders use explicit rubrics; log pass@k. Use before develop-tdd on new features, or when measuring agent capability over runs.model: sonnet"
4
+ ---
5
+
6
+
7
+ # Run Evals
8
+
9
+ > **HARD GATE** — Define evals before implementation. Code graders = runnable `verify:` commands; model graders = explicit rubric with pass/fail criteria.
10
+
11
+ ## Process
12
+
13
+ 1. Name the capability under test (one sentence).
14
+ 2. Write `specs/EVALS-<feature>.md` with:
15
+ - **Capability evals** (does it do the job?)
16
+ - **Regression evals** (did we break anything?)
17
+ 3. Assign grader type per eval: `code` (shell verify) or `model` (rubric).
18
+ 4. Run evals; log results table with pass@k (e.g. 3/3 runs).
19
+ 5. Block BUILD phase until capability evals pass at agreed k.
20
+
21
+ ## Artefact
22
+
23
+ `specs/verifications/eNNsYY-eval-report.md` — see [REFERENCE.md](REFERENCE.md) for template. Eval reports are stored alongside verification evidence in `specs/verifications/`, keyed by story ID for traceability.
24
+
25
+ ## Verify
26
+
27
+ → verify: `find specs/verifications -name "*-eval-report.md" | wc -l | awk '{if($1>0) print "OK: "$1" eval reports"; else print "MISSING"}'`
28
+
29
+ ---
30
+
31
+ # Run Evals — Reference
32
+
33
+ ## EVALS template
34
+
35
+ ```markdown
36
+ # EVALS: <feature>
37
+
38
+ ## Capability
39
+ | ID | Eval | Grader | verify / rubric |
40
+ |----|------|--------|-----------------|
41
+ | C1 | ... | code | `verify: npm test -- <file>` |
42
+ | C2 | ... | model | Rubric: [ ] criterion A [ ] criterion B |
43
+
44
+ ## Regression
45
+ | ID | Eval | Grader | verify / rubric |
46
+ |----|------|--------|-----------------|
47
+ | R1 | Full suite passes | code | `verify: npm test` |
48
+
49
+ ## Results
50
+ | Run | C1 | C2 | R1 | pass@k |
51
+ |-----|----|----|-----|--------|
52
+ | 1 | PASS | PASS | PASS | 3/3 |
53
+ ```
54
+
55
+ ## pass@k
56
+
57
+ Run capability evals k times (default k=3). Ship when all k pass or document known flake in `specs/state.yaml` `handoff.open_decisions`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: run-planning
3
+ description: ""DISCOVER-PHASE ADVANCER — Drive the discover-phase checklist (specs/planning-status.yaml) through survey-context → scope-work → research-first → elaborate-spec → plan-release → slice-tasks. NOT a duplicate of plan-work or the planning spine; it orchestrates the pre-coding discover phase only.""
4
+ ---
5
+
6
+
7
+ # Run Planning
8
+ > **HARD GATE** — Before running planning skills, confirm the epic capsule exists and the active story is clear. Planning without a target is noise.
9
+
10
+ > **Role:** DISCOVER-PHASE ADVANCER — orchestrates the discover-phase sequence; hands off to the scope-work → slice-tasks → plan-work spine for implementation planning.
11
+
12
+ Updates `specs/planning-status.yaml` as discover-phase skills complete.
13
+
14
+ ## Workflows (default keys)
15
+
16
+ - `survey-context` → `scope-work` → `research-first` → `elaborate-spec` (optional) → `plan-release` → `slice-tasks`
17
+
18
+ ## Process
19
+
20
+ 1. Read `specs/planning-status.yaml` and `specs/state.yaml`.
21
+ 2. Find first workflow with `status: pending` or `optional` not yet run.
22
+ 3. Invoke the matching skill; on success set `status: done` for that workflow key.
23
+ 4. Set `state.yaml` `active_flow: planning` while in this chain.
24
+
25
+ ## Verify
26
+
27
+ → verify: `test -f specs/planning-status.yaml && grep -c 'status: done' specs/planning-status.yaml | awk '{if($1>=3) print "OK"; else print "INCOMPLETE"}'`
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: scope-work
3
+ description: ""PLANNING SPINE STEP 1 of 3 — Scope the work: define what is in and out of scope and save as specs/product/SCOPE_LATEST.yaml. Use before slice-tasks or plan-release on any new initiative. Not a substitute for slice-tasks (step 2) or plan-work (step 3)."model: sonnet"
4
+ ---
5
+
6
+
7
+ # Scope Work
8
+
9
+ > **Spine position:** Step 1 — scope-work → slice-tasks → plan-work.
10
+
11
+ Turn the current conversation into a bounded PRD at `specs/product/SCOPE_LATEST.yaml`.
12
+
13
+ ## Process
14
+
15
+ 1. Read existing `specs/` artifacts (`release-plan.yaml`, `plans/TECH_STACK_LATEST.md`, `requirements/VISION_LATEST.yaml` if any).
16
+ 2. Interview (if needed): goal, users, in-scope, out-of-scope, constraints, success metrics.
17
+ 3. Write `specs/product/SCOPE_LATEST.yaml` with: `core_value`, `summary`, `in_scope[]`, `out_of_scope[]`, `constraints`, `success_criteria`, `references`.
18
+ 4. Run `research-first` if external dependencies are proposed.
19
+
20
+ > **HARD GATE** — Every `in_scope` item must map to a future epic/story ID or explicit deferred note in `out_of_scope`.
21
+
22
+ ## Verify
23
+
24
+ → verify: `test -f specs/product/SCOPE_LATEST.yaml && grep -c 'out_of_scope' specs/product/SCOPE_LATEST.yaml | awk '{if($1>0) print "OK"; else print "MISSING"}'`
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: search-skills
3
+ description: "Find the right bigpowers skill from natural-language intent using a local lexical index over SKILL.md frontmatter. Use when unsure which skill to invoke, or at start of research-first.model: haiku"
4
+ ---
5
+
6
+
7
+ # Search Skills
8
+ > **HARD GATE** — **HARD GATE** — Search results must be ranked by relevance. Do NOT return all matches without prioritization. Use skill metadata (phase, purpose, frequency) to rank.
9
+
10
+
11
+ Lexical search only — no embedding service (ADR: zero external dependency).
12
+
13
+ ## Process
14
+
15
+ 1. Run `bash scripts/build-skill-index.sh` if `specs/SKILL-SEARCH-INDEX.md` is stale.
16
+ 2. Search index: `rg -i "<keywords>" specs/SKILL-SEARCH-INDEX.md`
17
+ 3. Read top 3 matches' `description` and "Use when" triggers.
18
+ 4. Recommend one skill with rationale; invoke via orchestrator or direct call.
19
+
20
+ ## Verify
21
+
22
+ → verify: `test -f specs/SKILL-SEARCH-INDEX.md && echo OK || (bash scripts/build-skill-index.sh && test -f specs/SKILL-SEARCH-INDEX.md && echo OK)`
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: seed-conventions
3
+ description: "Generate CLAUDE.md and CONVENTIONS.md for a brand-new project through a brief interview, and create the specs/ directory with evolved bigpowers structure (product/, tech-architecture/, verifications/, epics/archive/). Entry point for greenfield projects. Use when starting a new project from scratch, when user asks to set up AI agent conventions, or when there is no CLAUDE.md yet."
4
+ ---
5
+
6
+
7
+ # Seed Conventions
8
+ > **HARD GATE** — Before any new code lands, confirm the project conventions are understood. Ask: 'What does a good commit message look like in this project?'
9
+
10
+ Bootstrap a new project with the AI agent conventions it needs. Run this once at the start of a greenfield project.
11
+
12
+ ## What this creates
13
+
14
+ - `CLAUDE.md` — Claude Code session config (project-specific)
15
+ - `CONVENTIONS.md` — shared rules for all AI agents
16
+ - `specs/` — the specs directory where all planning output will live
17
+ - `AGENTS.md` — for OpenCode and other agents (optional)
18
+ - `GEMINI.md` — for Gemini CLI (optional)
19
+
20
+ ## Interview
21
+
22
+ Ask the user these questions (one at a time, wait for each answer):
23
+
24
+ 1. **Project name and one-sentence description** — "What is this project? One sentence."
25
+ 2. **Stack** — "What language, framework, and runtime? (e.g. TypeScript / Next.js / Node 22)"
26
+ 2b. **Stack profile (optional)** — Offer: `swift`, `typescript-vue`, `node-service`, or none. If chosen, merge the matching fragment from `profiles/<name>.md` into generated `CONVENTIONS.md`.
27
+ 3. **Commands** — "What commands do you use for: run, test, build, lint?"
28
+ 4. **Architecture** — "Key modules and relationships in 1–2 sentences."
29
+ 5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
30
+ 6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
31
+ 7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
32
+
33
+ ## Generate files
34
+
35
+ After the interview, generate each file using the templates in [REFERENCE.md](REFERENCE.md):
36
+ - `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` — from the agent-config template
37
+ - `opencode.json` — from the opencode template
38
+ - `CONVENTIONS.md` — bigpowers standard template + project defensive code categories
39
+
40
+ ### `specs/` directory
41
+
42
+ ```bash
43
+ mkdir -p specs/product specs/product/snapshots specs/epics/archive
44
+ mkdir -p specs/tech-architecture specs/adr specs/verifications specs/bugs
45
+ touch specs/product/SCOPE_LATEST.yaml specs/product/VISION_LATEST.yaml specs/product/GLOSSARY_LATEST.yaml
46
+ touch specs/release-plan.yaml specs/execution-status.yaml specs/planning-status.yaml specs/state.yaml
47
+ touch specs/tech-architecture/tech-stack.md specs/tech-architecture/security.md
48
+ touch specs/tech-architecture/test.md specs/tech-architecture/design.md
49
+ touch specs/tech-architecture/REFACTOR_LATEST.md specs/tech-architecture/IMPACT_LATEST.md
50
+ touch specs/bugs/registry.yaml
51
+ echo "# Specs\n\nAll planning documents for this project." > specs/README.md
52
+ ```
53
+
54
+ **Note:** `specs/state.yaml.lock` is NOT pre-created — acquired/released dynamically.
55
+
56
+ `specs/state.yaml` carries a top-level `workflow_mode` key (`team-pr` | `solo-git`, default `team-pr`). This is the **canonical integrate-mode signal** for all skills — set it once here and skills such as `release-branch` read it from this file instead of sniffing profile files.
57
+
58
+ ## Verify
59
+
60
+ - [ ] CLAUDE.md exists and is populated
61
+ - [ ] CONVENTIONS.md exists and includes specs/ output convention
62
+ - [ ] specs/product/ exists with SCOPE_LATEST.yaml, VISION_LATEST.yaml, GLOSSARY_LATEST.yaml
63
+ - [ ] specs/tech-architecture/ exists with tech-stack.md, security.md, test.md, design.md
64
+ - [ ] specs/verifications/ exists
65
+ - [ ] specs/epics/archive/ exists
66
+ - [ ] specs/bugs/registry.yaml exists
67
+ - [ ] Confirm with user: "Does CLAUDE.md accurately describe your project?"
68
+
69
+ ---
70
+
71
+ # Seed Conventions — Reference Templates
72
+
73
+ ## Agent config template (CLAUDE.md / GEMINI.md / AGENTS.md)
74
+
75
+ All three files use the same structure — only the header differs:
76
+ - `CLAUDE.md` → `# [Project Name] — Claude Code`
77
+ - `GEMINI.md` → `# [Project Name] — Gemini CLI`
78
+ - `AGENTS.md` → `# [Project Name] — OpenCode`
79
+
80
+ ```markdown
81
+ # [Project Name] — [Agent]
82
+
83
+ Read CONVENTIONS.md before any GitHub or git operation.
84
+
85
+ ## Project
86
+ [One sentence description]
87
+ Stack: [language, framework, runtime]
88
+
89
+ ## Commands
90
+ | Action | Command |
91
+ |--------|---------|
92
+ | Run | `[cmd]` |
93
+ | Test | `[cmd]` |
94
+ | Build | `[cmd]` |
95
+ | Lint | `[cmd]` |
96
+
97
+ ## Architecture
98
+ [1–2 sentences. Key modules and their relationships.]
99
+
100
+ ## Conventions
101
+ - [convention 1]
102
+ - [convention 2]
103
+
104
+ ## Never
105
+ - [hard stop 1]
106
+ - [hard stop 2]
107
+
108
+ ## Agent Rules
109
+ - **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
110
+ - Read specs/ before writing code.
111
+ - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
112
+ - Write the minimum code that solves the stated problem. Nothing extra.
113
+ - Never refactor, rename, or reorganize code outside the task scope.
114
+ - Run tests after every change. Show evidence before declaring done.
115
+ - One clarifying question beats a wrong assumption baked into 200 lines.
116
+ ```
117
+
118
+ ## opencode.json template
119
+
120
+ ```json
121
+ {
122
+ "$schema": "https://opencode.ai/config.json",
123
+ "instructions": [".cursor/rules/*.mdc"]
124
+ }
125
+ ```
126
+
127
+ ## CONVENTIONS.md
128
+
129
+ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-specific defensive code categories from the interview answers.
130
+
131
+ ## Stack profile fragments
132
+
133
+ If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: session-state
3
+ description: "Track implementation decisions and progress in specs/state.yaml to prevent context rot. Use at the start of a session to load context, and whenever a significant decision is made or a milestone is reached."
4
+ ---
5
+
6
+
7
+ # Session State
8
+ > **HARD GATE** — **HARD GATE** — Session state must be synchronized with git state. If state.yaml conflicts with the working tree, halt and ask for clarification. Do NOT assume state is correct.
9
+
10
+
11
+ Track the current state of implementation, including decisions made, pending tasks, and open questions, to ensure continuity across session boundaries and prevent "context rot."
12
+
13
+ ## Goal
14
+
15
+ Maintain a single source of truth for the *current* session in `specs/state.yaml`. This complements long-term docs in `specs/tech-architecture/` and delivery detail in `specs/epics/` + `specs/release-plan.yaml`.
16
+
17
+ Legacy markdown (`specs/archive/STATE.md`, `RELEASE-PLAN.md`) is **not** SoT when YAML exists — use `specs/state.yaml` only.
18
+
19
+ ## Handoff block (cold start)
20
+
21
+ When ending a session or before a context-heavy spawn, update `handoff` in `state.yaml`:
22
+
23
+ ```yaml
24
+ handoff:
25
+ last_step_completed: "e02s01 verify-work passed"
26
+ open_decisions:
27
+ - "Use folder mode for e07 (>5 stories)"
28
+ required_reading:
29
+ - CONVENTIONS.md
30
+ - specs/epics/e02-verification/epic.yaml
31
+ next_skill: develop-tdd
32
+ ```
33
+
34
+ ## Strategic compaction
35
+
36
+ | Trigger | Action |
37
+ |---------|--------|
38
+ | Phase transition (Plan → Build → Verify) | Compact handoff; archive verbose decisions to ADR |
39
+ | Context > 70% estimated | Run terse-mode for status only; move detail to specs/ |
40
+ | Before `dispatch-agents` wave | `state.yaml` only channel between spawns |
41
+
42
+ ## Workflow
43
+
44
+ ### 1. Initialize (Session Start)
45
+
46
+ If `specs/state.yaml` does not exist, or if starting a new major phase:
47
+
48
+ - [ ] Read `specs/release-plan.yaml` and `specs/product/SCOPE_LATEST.yaml`.
49
+ - [ ] Get git metadata: `git branch --show-current` and `git rev-parse --short HEAD`.
50
+ - [ ] Create `specs/state.yaml` with active flow, git, handoff, and epic cycle if in build.
51
+
52
+ ### 2. Load (Context Refresh)
53
+
54
+ When starting a new session or after a significant context flush:
55
+
56
+ - [ ] Read `specs/state.yaml` to understand where the previous agent left off.
57
+ - [ ] Read `specs/execution-status.yaml` for story progress (do not infer from release-plan).
58
+ - [ ] Verify git matches `state.yaml` `git.branch` / `git.hash`.
59
+
60
+ ### 3. Update (Decision Point/Milestone)
61
+
62
+ Whenever a significant decision is made or a milestone is reached:
63
+
64
+ - [ ] Patch via `bash scripts/bp-yaml-set.sh specs/state.yaml git.hash <hash>` (or edit directly).
65
+ - [ ] Update `handoff.open_decisions` with rationale.
66
+ - [ ] Update `epic_cycle` when advancing `ship-epic` steps.
67
+ - [ ] Record open questions under `handoff.open_decisions` or an ADR.
68
+
69
+ → verify: `bash scripts/validate-specs-yaml.sh`
70
+
71
+ ## State Write-Lock Protocol
72
+
73
+ > **HARD GATE** — Before any write to `specs/state.yaml` or `specs/execution-status.yaml`, acquire `specs/state.yaml.lock`. Release it immediately after the write. A stale lock (>60s) may be force-released.
74
+
75
+ ### Acquire
76
+
77
+ 1. Check if `specs/state.yaml.lock` exists.
78
+ 2. If it exists, read the agent ID and timestamp inside.
79
+ 3. If the lock is stale (>60s old), remove it and proceed.
80
+ 4. If the lock is fresh (<60s), wait 2s and retry (max 15 attempts = 30s).
81
+ 5. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to `specs/state.yaml.lock`.
82
+
83
+ ### Release
84
+
85
+ 1. After the write to `state.yaml` or `execution-status.yaml` completes:
86
+ 2. `rm specs/state.yaml.lock`
87
+
88
+ ### Lock format (`specs/state.yaml.lock`)
89
+
90
+ ```yaml
91
+ agent_id: session-state
92
+ acquired_at: "2026-06-11T14:30:00Z"
93
+ ```
94
+
95
+
96
+
97
+ ## Operations
98
+
99
+ ### show-state (absorbed)
100
+
101
+ Print the current session state: `cat specs/state.yaml`, then display `active_flow` and `handoff.next_skill` for quick reference.
102
+
103
+ ### reset-state (absorbed)
104
+
105
+ Clear ephemeral session state. Set `active_epic_id`, `active_story_id`, and `epic_cycle.current_step` to `null` in `specs/state.yaml`. Use when ending a phase or starting a new project context.
106
+
107
+ ### compact-state (absorbed)
108
+
109
+ Archive verbose decisions before a context transition. Move all entries from `handoff.open_decisions` to their appropriate location:
110
+
111
+ - **System-wide decisions** → `specs/adr/NNNN-slug.md` (global Architectural Decision Records)
112
+ - **Epic-scoped decisions** → `specs/epics/<active_epic_id>-<slug>/adr/NNNN-slug.md` (epic-local ADRs, archived with epic)
113
+
114
+ After archiving, reset `handoff.open_decisions` to an empty list.
115
+
116
+ ## File Format: specs/state.yaml
117
+
118
+ ```yaml
119
+ active_flow: build_epic # planning | build_epic | fix_bug
120
+ active_epic_id: e02
121
+ active_story_id: e02s01 # required when epic mode: folder
122
+ active_bug_id: null # BUG-2026-06-01T143022 when fix_bug
123
+ release:
124
+ target_version: "3.0.0"
125
+ last_tag: null
126
+ last_publish: null
127
+ epic_cycle:
128
+ current_step: develop-tdd
129
+ next_skill: develop-tdd
130
+ completed_steps: [kickoff-branch]
131
+ bug_cycle:
132
+ current_step: null
133
+ completed_steps: []
134
+ git:
135
+ branch: feat/e02-verify
136
+ hash: abc1234
137
+ handoff:
138
+ last_step_completed: null
139
+ open_decisions: []
140
+ next_skill: survey-context
141
+ ```
142
+
143
+ ## Anti-Patterns
144
+
145
+ - **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
146
+ - **Stale State**: Forgetting to update `state.yaml` after a major refactor or decision.
147
+ - **Status in release-plan**: Story/epic status lives only in `execution-status.yaml`.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: setup-environment
3
+ description: "Pre-install dependencies and configure tools before development work begins. Use at session start on a fresh clone, before kickoff-branch, or when user says setup environment or install deps.model: haiku"
4
+ ---
5
+
6
+
7
+ # Setup Environment
8
+ > **HARD GATE** — **HARD GATE** — Environment setup must be idempotent and reproducible. If setup fails, provide clear error messages and remediation steps. Do NOT assume prior state.
9
+
10
+
11
+ Idempotent prep so BUILD phase commands succeed on first run.
12
+
13
+ ## Checklist
14
+
15
+ 1. Read `CLAUDE.md` / `CONVENTIONS.md` for required runtimes and commands.
16
+ 2. Verify runtime versions (`node -v`, `swift --version`, etc.).
17
+ 3. Install dependencies (`npm ci`, `bundle install`, etc.) — prefer lockfile installs.
18
+ 4. Copy `.env.example` → `.env` if documented; never commit secrets.
19
+ 5. Run smoke: lint + one fast test or `--version` on key tools.
20
+ 6. Record versions in `specs/state.yaml` under Environment.
21
+
22
+ ## Verify
23
+
24
+ → verify: commands from CLAUDE.md Test/Lint rows exit 0
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: simulate-agents
3
+ description: "Run Mock User and Auditor agents against a feature in fresh contexts before human review. Use after verify-work, before request-review, when user wants pre-review simulation.model: sonnet"
4
+ ---
5
+
6
+
7
+ # Simulate Agents
8
+ > **HARD GATE** — **HARD GATE** — Simulations are hypothetical. Do NOT use sim results to make production decisions without validation on real agents. Sims help discover gaps, not replace testing.
9
+
10
+
11
+ Two roles, **isolated contexts** (no shared state with BUILD agent):
12
+
13
+ 1. **Mock User** — follows Verification Script; reports UX gaps in plain language.
14
+ 2. **Auditor** — checks CONVENTIONS.md, security checklist, test coverage; structured pass/fail.
15
+
16
+ ## Process
17
+
18
+ 1. Read story Verification Script + changed files diff.
19
+ 2. Spawn Mock User: step through UAT script; log failures.
20
+ 3. Spawn Auditor: run `audit-code` checklist cold.
21
+ 4. Write `specs/SIMULATION-<feature>.md` with both reports.
22
+ 5. Failed items → `respond-review` or `plan-work` gaps — do not skip human review.
23
+
24
+ ## Verify
25
+
26
+ → verify: `test -f specs/SIMULATION-*.md && grep -c "Mock User\|Auditor" specs/SIMULATION-*.md | awk '{if($1>=2) print "OK"}'`
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: slice-tasks
3
+ description: ""PLANNING SPINE STEP 2 of 3 — Slice the work: break a scoped PRD into vertical-slice stories in specs/epics/. Use after scope-work (step 1), before plan-work (step 3). Not a substitute for scope-work or plan-work."model: sonnet"
4
+ ---
5
+
6
+
7
+ # Slice Tasks
8
+
9
+ > **Spine position:** Step 2 — scope-work → slice-tasks → plan-work.
10
+
11
+ Produce **epic capsule story tasks** in `specs/epics/eNN-slug/` — vertical slices, each independently deliverable and testable. Output: decoupled `eNNsYY-tasks.yaml` files with runnable verify commands. Legacy `specs/epics/ (see slice-tasks)` is deprecated; use capsule dirs + `execution-status.yaml`.
12
+
13
+ ## Process
14
+
15
+ 1. Read `specs/product/SCOPE_LATEST.yaml` and/or `specs/release-plan.yaml`.
16
+ 2. Cut **tracer-bullet slices** (thin end-to-end paths first, then depth).
17
+ 3. Each story: writes `eNNsYY-tasks.yaml` with `story_id`, `title`, `status`, `bcps`, `tasks[]` (each with `id`, `description`, `verify`, `status`). Story spec `.md` files are written by `plan-work` and follow [countable-story-format.md](file:///Users/danielvm/Developer/bigpowers/countable-story-format.md).
18
+ 4. Order by WSJF in `release-plan.yaml` epic list.
19
+
20
+ > **HARD GATE** — No horizontal-only slices ("add all models") without a vertical path that proves integration.
21
+
22
+ ## Verify
23
+
24
+ → verify: `find specs/epics -name "*-tasks.yaml" | wc -l | awk '{if($1>0) print "OK: "$1" task files"; else print "MISSING"}'`
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: spike-prototype
3
+ description: "Throw-away prototype for unknown problem spaces. Output is learning notes in specs/archive/spikes/SPIKE-<name>.md, not production code. Use when the domain or technology is unexplored, when estimates are impossible without experimentation, or when user says "spike", "prototype", or "proof of concept"."
4
+ ---
5
+
6
+
7
+ # Spike Prototype
8
+ > **HARD GATE** — **HARD GATE** — Spikes are time-boxed experiments, not shipping code. Results must be throwaway or clearly isolated. Do NOT merge a spike without a plan to integrate it or replace it with a proper implementation.
9
+
10
+
11
+ A spike is a time-boxed experiment to answer a specific question. The code is thrown away. The learning is kept in `specs/archive/spikes/SPIKE-<name>.md`.
12
+
13
+ **The spike produces learning, not code to ship.** If you find yourself cleaning up spike code for production, stop — run `plan-work` and `develop-tdd` instead with the insights you gained.
14
+
15
+ ## When to spike
16
+
17
+ - The technology is unfamiliar (new library, API, infrastructure)
18
+ - The approach is uncertain (multiple solutions exist; none has been tried)
19
+ - Estimates are impossible without seeing how the thing actually behaves
20
+ - A key assumption needs to be validated before committing to a design
21
+
22
+ ## Process
23
+
24
+ ### 1. Define the question
25
+
26
+ Before writing a single line, state the question the spike must answer:
27
+
28
+ > "Can we [specific thing] using [specific approach] within [constraint]?"
29
+
30
+ Examples:
31
+ - "Can we stream large files from S3 to the client without buffering in memory?"
32
+ - "Does the Stripe webhook SDK handle signature verification correctly in our edge runtime?"
33
+ - "Can we achieve < 100ms p99 response time for the search endpoint with a naive Postgres full-text search?"
34
+
35
+ A spike with no question is just unplanned coding. Refuse to start if the question isn't clear.
36
+
37
+ ### 2. Set a timebox
38
+
39
+ Agree on a timebox with the user: 30 minutes, 1 hour, 2 hours. When time is up, stop — even if the question isn't fully answered. Partial learning is still learning.
40
+
41
+ ### 3. Experiment
42
+
43
+ Write the simplest code that could answer the question. Ignore:
44
+ - Error handling
45
+ - Test coverage
46
+ - Code quality
47
+ - Production concerns
48
+
49
+ Focus entirely on answering the question.
50
+
51
+ ### 4. Write specs/archive/spikes/SPIKE-<name>.md
52
+
53
+ Save the learning to `specs/archive/spikes/SPIKE-<name>.md`. Create the `specs/` directory if it doesn't exist.
54
+
55
+ <spike-template>
56
+
57
+ # Spike: [name]
58
+
59
+ ## Question
60
+
61
+ [The specific question this spike was answering]
62
+
63
+ ## Result
64
+
65
+ [Answered / Partially answered / Not answered]
66
+
67
+ ## Findings
68
+
69
+ [What you learned — concrete observations, not opinions]
70
+
71
+ ## Evidence
72
+
73
+ [Code snippet, benchmark result, API response, or screenshot that proves the finding]
74
+
75
+ ## Implications for the plan
76
+
77
+ [How this changes the approach, the design, or the estimate]
78
+
79
+ ## What was NOT explored
80
+
81
+ [Known gaps — things the spike didn't validate]
82
+
83
+ ## Recommendation
84
+
85
+ [Should we proceed with this approach? If yes, what does plan-work need to account for?]
86
+
87
+ </spike-template>
88
+
89
+ ### 5. Delete the spike code
90
+
91
+ After writing the findings, delete or discard the spike code. It is not meant to ship.
92
+
93
+ ### 6. Feed back into plan-work
94
+
95
+ The spike findings are the input to `plan-work`. Call `plan-work` next, informed by `specs/archive/spikes/SPIKE-<name>.md`.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: stocktake-skills
3
+ description: "Sequential subagent batch audit of the bigpowers skill catalog — Quick Scan (changed only) or Full (all skills). Use during sustain phase, before a major release, or when catalog drift is suspected.model: sonnet"
4
+ ---
5
+
6
+
7
+ # Stocktake Skills
8
+ > **HARD GATE** — **HARD GATE** — Skill inventory must be current. Missing HARD GATEs, stale descriptions, or broken verify commands are defects, not cosmetic. Fix them in `evolve-skill`.
9
+
10
+
11
+ Audit SKILL.md catalog for drift, stale triggers, missing HARD GATEs, and INDEX mismatches.
12
+
13
+ ## Modes
14
+
15
+ | Mode | Scope |
16
+ |------|-------|
17
+ | **Quick Scan** | Skills changed since last tag or in current diff |
18
+ | **Full** | All 58 skills per SKILL-INDEX.md |
19
+
20
+ ## Process
21
+
22
+ 1. Run mode; for each skill check: exists, verb-noun, &lt;300 lines total, HARD GATE present, INDEX row matches.
23
+ 2. Write `specs/STOCKTAKE-<date>.md` with findings table (skill, issue, severity).
24
+ 3. Critical findings → `plan-work` story; cosmetic → `evolve-skill` candidate.
25
+
26
+ ## Verify
27
+
28
+ → verify: `test -f specs/STOCKTAKE-*.md && echo OK || echo MISSING`
29
+
30
+ See [REFERENCE.md](REFERENCE.md) for checklist.
31
+
32
+ ---
33
+
34
+ # Stocktake checklist
35
+
36
+ - [ ] SKILL.md exists at repo root `&lt;name&gt;/SKILL.md`
37
+ - [ ] Listed in SKILL-INDEX.md with correct phase
38
+ - [ ] `description` includes "Use when..."
39
+ - [ ] At least one HARD GATE callout
40
+ - [ ] specs/ output documented if applicable
41
+ - [ ] No edit to `.cursor/rules/` or `.gemini/` (generated only)