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,56 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Run Evals
7
+
8
+ > **HARD GATE** — Define evals before implementation. Code graders = runnable `verify:` commands; model graders = explicit rubric with pass/fail criteria.
9
+
10
+ ## Process
11
+
12
+ 1. Name the capability under test (one sentence).
13
+ 2. Write `specs/EVALS-<feature>.md` with:
14
+ - **Capability evals** (does it do the job?)
15
+ - **Regression evals** (did we break anything?)
16
+ 3. Assign grader type per eval: `code` (shell verify) or `model` (rubric).
17
+ 4. Run evals; log results table with pass@k (e.g. 3/3 runs).
18
+ 5. Block BUILD phase until capability evals pass at agreed k.
19
+
20
+ ## Artefact
21
+
22
+ `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.
23
+
24
+ ## Verify
25
+
26
+ → verify: `find specs/verifications -name "*-eval-report.md" | wc -l | awk '{if($1>0) print "OK: "$1" eval reports"; else print "MISSING"}'`
27
+
28
+ ---
29
+
30
+ # Run Evals — Reference
31
+
32
+ ## EVALS template
33
+
34
+ ```markdown
35
+ # EVALS: <feature>
36
+
37
+ ## Capability
38
+ | ID | Eval | Grader | verify / rubric |
39
+ |----|------|--------|-----------------|
40
+ | C1 | ... | code | `verify: npm test -- <file>` |
41
+ | C2 | ... | model | Rubric: [ ] criterion A [ ] criterion B |
42
+
43
+ ## Regression
44
+ | ID | Eval | Grader | verify / rubric |
45
+ |----|------|--------|-----------------|
46
+ | R1 | Full suite passes | code | `verify: npm test` |
47
+
48
+ ## Results
49
+ | Run | C1 | C2 | R1 | pass@k |
50
+ |-----|----|----|-----|--------|
51
+ | 1 | PASS | PASS | PASS | 3/3 |
52
+ ```
53
+
54
+ ## pass@k
55
+
56
+ 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,26 @@
1
+ ---
2
+ 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."
3
+ ---
4
+
5
+
6
+ # Run Planning
7
+ > **HARD GATE** — Before running planning skills, confirm the epic capsule exists and the active story is clear. Planning without a target is noise.
8
+
9
+ > **Role:** DISCOVER-PHASE ADVANCER — orchestrates the discover-phase sequence; hands off to the scope-work → slice-tasks → plan-work spine for implementation planning.
10
+
11
+ Updates `specs/planning-status.yaml` as discover-phase skills complete.
12
+
13
+ ## Workflows (default keys)
14
+
15
+ - `survey-context` → `scope-work` → `research-first` → `elaborate-spec` (optional) → `plan-release` → `slice-tasks`
16
+
17
+ ## Process
18
+
19
+ 1. Read `specs/planning-status.yaml` and `specs/state.yaml`.
20
+ 2. Find first workflow with `status: pending` or `optional` not yet run.
21
+ 3. Invoke the matching skill; on success set `status: done` for that workflow key.
22
+ 4. Set `state.yaml` `active_flow: planning` while in this chain.
23
+
24
+ ## Verify
25
+
26
+ → 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,23 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Scope Work
7
+
8
+ > **Spine position:** Step 1 — scope-work → slice-tasks → plan-work.
9
+
10
+ Turn the current conversation into a bounded PRD at `specs/product/SCOPE_LATEST.yaml`.
11
+
12
+ ## Process
13
+
14
+ 1. Read existing `specs/` artifacts (`release-plan.yaml`, `plans/TECH_STACK_LATEST.md`, `requirements/VISION_LATEST.yaml` if any).
15
+ 2. Interview (if needed): goal, users, in-scope, out-of-scope, constraints, success metrics.
16
+ 3. Write `specs/product/SCOPE_LATEST.yaml` with: `core_value`, `summary`, `in_scope[]`, `out_of_scope[]`, `constraints`, `success_criteria`, `references`.
17
+ 4. Run `research-first` if external dependencies are proposed.
18
+
19
+ > **HARD GATE** — Every `in_scope` item must map to a future epic/story ID or explicit deferred note in `out_of_scope`.
20
+
21
+ ## Verify
22
+
23
+ → 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,21 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Search Skills
7
+ > **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.
8
+
9
+
10
+ Lexical search only — no embedding service (ADR: zero external dependency).
11
+
12
+ ## Process
13
+
14
+ 1. Run `bash scripts/build-skill-index.sh` if `specs/SKILL-SEARCH-INDEX.md` is stale.
15
+ 2. Search index: `rg -i "<keywords>" specs/SKILL-SEARCH-INDEX.md`
16
+ 3. Read top 3 matches' `description` and "Use when" triggers.
17
+ 4. Recommend one skill with rationale; invoke via orchestrator or direct call.
18
+
19
+ ## Verify
20
+
21
+ → 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,132 @@
1
+ ---
2
+ 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.
3
+ ---
4
+
5
+
6
+ # Seed Conventions
7
+ > **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?'
8
+
9
+ Bootstrap a new project with the AI agent conventions it needs. Run this once at the start of a greenfield project.
10
+
11
+ ## What this creates
12
+
13
+ - `CLAUDE.md` — Claude Code session config (project-specific)
14
+ - `CONVENTIONS.md` — shared rules for all AI agents
15
+ - `specs/` — the specs directory where all planning output will live
16
+ - `AGENTS.md` — for OpenCode and other agents (optional)
17
+ - `GEMINI.md` — for Gemini CLI (optional)
18
+
19
+ ## Interview
20
+
21
+ Ask the user these questions (one at a time, wait for each answer):
22
+
23
+ 1. **Project name and one-sentence description** — "What is this project? One sentence."
24
+ 2. **Stack** — "What language, framework, and runtime? (e.g. TypeScript / Next.js / Node 22)"
25
+ 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`.
26
+ 3. **Commands** — "What commands do you use for: run, test, build, lint?"
27
+ 4. **Architecture** — "Key modules and relationships in 1–2 sentences."
28
+ 5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
29
+ 6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
30
+ 7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
31
+
32
+ ## Generate files
33
+
34
+ After the interview, generate each file using the templates in [REFERENCE.md](REFERENCE.md):
35
+ - `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` — from the agent-config template
36
+ - `opencode.json` — from the opencode template
37
+ - `CONVENTIONS.md` — bigpowers standard template + project defensive code categories
38
+
39
+ ### `specs/` directory
40
+
41
+ ```bash
42
+ mkdir -p specs/product specs/product/snapshots specs/epics/archive
43
+ mkdir -p specs/tech-architecture specs/adr specs/verifications specs/bugs
44
+ touch specs/product/SCOPE_LATEST.yaml specs/product/VISION_LATEST.yaml specs/product/GLOSSARY_LATEST.yaml
45
+ touch specs/release-plan.yaml specs/execution-status.yaml specs/planning-status.yaml specs/state.yaml
46
+ touch specs/tech-architecture/tech-stack.md specs/tech-architecture/security.md
47
+ touch specs/tech-architecture/test.md specs/tech-architecture/design.md
48
+ touch specs/tech-architecture/REFACTOR_LATEST.md specs/tech-architecture/IMPACT_LATEST.md
49
+ touch specs/bugs/registry.yaml
50
+ echo "# Specs\n\nAll planning documents for this project." > specs/README.md
51
+ ```
52
+
53
+ **Note:** `specs/state.yaml.lock` is NOT pre-created — acquired/released dynamically.
54
+
55
+ `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.
56
+
57
+ ## Verify
58
+
59
+ - [ ] CLAUDE.md exists and is populated
60
+ - [ ] CONVENTIONS.md exists and includes specs/ output convention
61
+ - [ ] specs/product/ exists with SCOPE_LATEST.yaml, VISION_LATEST.yaml, GLOSSARY_LATEST.yaml
62
+ - [ ] specs/tech-architecture/ exists with tech-stack.md, security.md, test.md, design.md
63
+ - [ ] specs/verifications/ exists
64
+ - [ ] specs/epics/archive/ exists
65
+ - [ ] specs/bugs/registry.yaml exists
66
+ - [ ] Confirm with user: "Does CLAUDE.md accurately describe your project?"
67
+
68
+ ---
69
+
70
+ # Seed Conventions — Reference Templates
71
+
72
+ ## Agent config template (CLAUDE.md / GEMINI.md / AGENTS.md)
73
+
74
+ All three files use the same structure — only the header differs:
75
+ - `CLAUDE.md` → `# [Project Name] — Claude Code`
76
+ - `GEMINI.md` → `# [Project Name] — Gemini CLI`
77
+ - `AGENTS.md` → `# [Project Name] — OpenCode`
78
+
79
+ ```markdown
80
+ # [Project Name] — [Agent]
81
+
82
+ Read CONVENTIONS.md before any GitHub or git operation.
83
+
84
+ ## Project
85
+ [One sentence description]
86
+ Stack: [language, framework, runtime]
87
+
88
+ ## Commands
89
+ | Action | Command |
90
+ |--------|---------|
91
+ | Run | `[cmd]` |
92
+ | Test | `[cmd]` |
93
+ | Build | `[cmd]` |
94
+ | Lint | `[cmd]` |
95
+
96
+ ## Architecture
97
+ [1–2 sentences. Key modules and their relationships.]
98
+
99
+ ## Conventions
100
+ - [convention 1]
101
+ - [convention 2]
102
+
103
+ ## Never
104
+ - [hard stop 1]
105
+ - [hard stop 2]
106
+
107
+ ## Agent Rules
108
+ - **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".
109
+ - Read specs/ before writing code.
110
+ - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
111
+ - Write the minimum code that solves the stated problem. Nothing extra.
112
+ - Never refactor, rename, or reorganize code outside the task scope.
113
+ - Run tests after every change. Show evidence before declaring done.
114
+ - One clarifying question beats a wrong assumption baked into 200 lines.
115
+ ```
116
+
117
+ ## opencode.json template
118
+
119
+ ```json
120
+ {
121
+ "$schema": "https://opencode.ai/config.json",
122
+ "instructions": [".cursor/rules/*.mdc"]
123
+ }
124
+ ```
125
+
126
+ ## CONVENTIONS.md
127
+
128
+ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-specific defensive code categories from the interview answers.
129
+
130
+ ## Stack profile fragments
131
+
132
+ 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,146 @@
1
+ ---
2
+ 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.
3
+ ---
4
+
5
+
6
+ # Session State
7
+ > **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.
8
+
9
+
10
+ Track the current state of implementation, including decisions made, pending tasks, and open questions, to ensure continuity across session boundaries and prevent "context rot."
11
+
12
+ ## Goal
13
+
14
+ 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`.
15
+
16
+ Legacy markdown (`specs/archive/STATE.md`, `RELEASE-PLAN.md`) is **not** SoT when YAML exists — use `specs/state.yaml` only.
17
+
18
+ ## Handoff block (cold start)
19
+
20
+ When ending a session or before a context-heavy spawn, update `handoff` in `state.yaml`:
21
+
22
+ ```yaml
23
+ handoff:
24
+ last_step_completed: "e02s01 verify-work passed"
25
+ open_decisions:
26
+ - "Use folder mode for e07 (>5 stories)"
27
+ required_reading:
28
+ - CONVENTIONS.md
29
+ - specs/epics/e02-verification/epic.yaml
30
+ next_skill: develop-tdd
31
+ ```
32
+
33
+ ## Strategic compaction
34
+
35
+ | Trigger | Action |
36
+ |---------|--------|
37
+ | Phase transition (Plan → Build → Verify) | Compact handoff; archive verbose decisions to ADR |
38
+ | Context > 70% estimated | Run terse-mode for status only; move detail to specs/ |
39
+ | Before `dispatch-agents` wave | `state.yaml` only channel between spawns |
40
+
41
+ ## Workflow
42
+
43
+ ### 1. Initialize (Session Start)
44
+
45
+ If `specs/state.yaml` does not exist, or if starting a new major phase:
46
+
47
+ - [ ] Read `specs/release-plan.yaml` and `specs/product/SCOPE_LATEST.yaml`.
48
+ - [ ] Get git metadata: `git branch --show-current` and `git rev-parse --short HEAD`.
49
+ - [ ] Create `specs/state.yaml` with active flow, git, handoff, and epic cycle if in build.
50
+
51
+ ### 2. Load (Context Refresh)
52
+
53
+ When starting a new session or after a significant context flush:
54
+
55
+ - [ ] Read `specs/state.yaml` to understand where the previous agent left off.
56
+ - [ ] Read `specs/execution-status.yaml` for story progress (do not infer from release-plan).
57
+ - [ ] Verify git matches `state.yaml` `git.branch` / `git.hash`.
58
+
59
+ ### 3. Update (Decision Point/Milestone)
60
+
61
+ Whenever a significant decision is made or a milestone is reached:
62
+
63
+ - [ ] Patch via `bash scripts/bp-yaml-set.sh specs/state.yaml git.hash <hash>` (or edit directly).
64
+ - [ ] Update `handoff.open_decisions` with rationale.
65
+ - [ ] Update `epic_cycle` when advancing `ship-epic` steps.
66
+ - [ ] Record open questions under `handoff.open_decisions` or an ADR.
67
+
68
+ → verify: `bash scripts/validate-specs-yaml.sh`
69
+
70
+ ## State Write-Lock Protocol
71
+
72
+ > **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.
73
+
74
+ ### Acquire
75
+
76
+ 1. Check if `specs/state.yaml.lock` exists.
77
+ 2. If it exists, read the agent ID and timestamp inside.
78
+ 3. If the lock is stale (>60s old), remove it and proceed.
79
+ 4. If the lock is fresh (<60s), wait 2s and retry (max 15 attempts = 30s).
80
+ 5. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to `specs/state.yaml.lock`.
81
+
82
+ ### Release
83
+
84
+ 1. After the write to `state.yaml` or `execution-status.yaml` completes:
85
+ 2. `rm specs/state.yaml.lock`
86
+
87
+ ### Lock format (`specs/state.yaml.lock`)
88
+
89
+ ```yaml
90
+ agent_id: session-state
91
+ acquired_at: "2026-06-11T14:30:00Z"
92
+ ```
93
+
94
+
95
+
96
+ ## Operations
97
+
98
+ ### show-state (absorbed)
99
+
100
+ Print the current session state: `cat specs/state.yaml`, then display `active_flow` and `handoff.next_skill` for quick reference.
101
+
102
+ ### reset-state (absorbed)
103
+
104
+ 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.
105
+
106
+ ### compact-state (absorbed)
107
+
108
+ Archive verbose decisions before a context transition. Move all entries from `handoff.open_decisions` to their appropriate location:
109
+
110
+ - **System-wide decisions** → `specs/adr/NNNN-slug.md` (global Architectural Decision Records)
111
+ - **Epic-scoped decisions** → `specs/epics/<active_epic_id>-<slug>/adr/NNNN-slug.md` (epic-local ADRs, archived with epic)
112
+
113
+ After archiving, reset `handoff.open_decisions` to an empty list.
114
+
115
+ ## File Format: specs/state.yaml
116
+
117
+ ```yaml
118
+ active_flow: build_epic # planning | build_epic | fix_bug
119
+ active_epic_id: e02
120
+ active_story_id: e02s01 # required when epic mode: folder
121
+ active_bug_id: null # BUG-2026-06-01T143022 when fix_bug
122
+ release:
123
+ target_version: "3.0.0"
124
+ last_tag: null
125
+ last_publish: null
126
+ epic_cycle:
127
+ current_step: develop-tdd
128
+ next_skill: develop-tdd
129
+ completed_steps: [kickoff-branch]
130
+ bug_cycle:
131
+ current_step: null
132
+ completed_steps: []
133
+ git:
134
+ branch: feat/e02-verify
135
+ hash: abc1234
136
+ handoff:
137
+ last_step_completed: null
138
+ open_decisions: []
139
+ next_skill: survey-context
140
+ ```
141
+
142
+ ## Anti-Patterns
143
+
144
+ - **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
145
+ - **Stale State**: Forgetting to update `state.yaml` after a major refactor or decision.
146
+ - **Status in release-plan**: Story/epic status lives only in `execution-status.yaml`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Setup Environment
7
+ > **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.
8
+
9
+
10
+ Idempotent prep so BUILD phase commands succeed on first run.
11
+
12
+ ## Checklist
13
+
14
+ 1. Read `CLAUDE.md` / `CONVENTIONS.md` for required runtimes and commands.
15
+ 2. Verify runtime versions (`node -v`, `swift --version`, etc.).
16
+ 3. Install dependencies (`npm ci`, `bundle install`, etc.) — prefer lockfile installs.
17
+ 4. Copy `.env.example` → `.env` if documented; never commit secrets.
18
+ 5. Run smoke: lint + one fast test or `--version` on key tools.
19
+ 6. Record versions in `specs/state.yaml` under Environment.
20
+
21
+ ## Verify
22
+
23
+ → verify: commands from CLAUDE.md Test/Lint rows exit 0
@@ -0,0 +1,25 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Simulate Agents
7
+ > **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.
8
+
9
+
10
+ Two roles, **isolated contexts** (no shared state with BUILD agent):
11
+
12
+ 1. **Mock User** — follows Verification Script; reports UX gaps in plain language.
13
+ 2. **Auditor** — checks CONVENTIONS.md, security checklist, test coverage; structured pass/fail.
14
+
15
+ ## Process
16
+
17
+ 1. Read story Verification Script + changed files diff.
18
+ 2. Spawn Mock User: step through UAT script; log failures.
19
+ 3. Spawn Auditor: run `audit-code` checklist cold.
20
+ 4. Write `specs/SIMULATION-<feature>.md` with both reports.
21
+ 5. Failed items → `respond-review` or `plan-work` gaps — do not skip human review.
22
+
23
+ ## Verify
24
+
25
+ → verify: `test -f specs/SIMULATION-*.md && grep -c "Mock User\|Auditor" specs/SIMULATION-*.md | awk '{if($1>=2) print "OK"}'`
@@ -0,0 +1,23 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Slice Tasks
7
+
8
+ > **Spine position:** Step 2 — scope-work → slice-tasks → plan-work.
9
+
10
+ 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`.
11
+
12
+ ## Process
13
+
14
+ 1. Read `specs/product/SCOPE_LATEST.yaml` and/or `specs/release-plan.yaml`.
15
+ 2. Cut **tracer-bullet slices** (thin end-to-end paths first, then depth).
16
+ 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).
17
+ 4. Order by WSJF in `release-plan.yaml` epic list.
18
+
19
+ > **HARD GATE** — No horizontal-only slices ("add all models") without a vertical path that proves integration.
20
+
21
+ ## Verify
22
+
23
+ → verify: `find specs/epics -name "*-tasks.yaml" | wc -l | awk '{if($1>0) print "OK: "$1" task files"; else print "MISSING"}'`
@@ -0,0 +1,94 @@
1
+ ---
2
+ 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".
3
+ ---
4
+
5
+
6
+ # Spike Prototype
7
+ > **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.
8
+
9
+
10
+ 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`.
11
+
12
+ **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.
13
+
14
+ ## When to spike
15
+
16
+ - The technology is unfamiliar (new library, API, infrastructure)
17
+ - The approach is uncertain (multiple solutions exist; none has been tried)
18
+ - Estimates are impossible without seeing how the thing actually behaves
19
+ - A key assumption needs to be validated before committing to a design
20
+
21
+ ## Process
22
+
23
+ ### 1. Define the question
24
+
25
+ Before writing a single line, state the question the spike must answer:
26
+
27
+ > "Can we [specific thing] using [specific approach] within [constraint]?"
28
+
29
+ Examples:
30
+ - "Can we stream large files from S3 to the client without buffering in memory?"
31
+ - "Does the Stripe webhook SDK handle signature verification correctly in our edge runtime?"
32
+ - "Can we achieve < 100ms p99 response time for the search endpoint with a naive Postgres full-text search?"
33
+
34
+ A spike with no question is just unplanned coding. Refuse to start if the question isn't clear.
35
+
36
+ ### 2. Set a timebox
37
+
38
+ 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.
39
+
40
+ ### 3. Experiment
41
+
42
+ Write the simplest code that could answer the question. Ignore:
43
+ - Error handling
44
+ - Test coverage
45
+ - Code quality
46
+ - Production concerns
47
+
48
+ Focus entirely on answering the question.
49
+
50
+ ### 4. Write specs/archive/spikes/SPIKE-<name>.md
51
+
52
+ Save the learning to `specs/archive/spikes/SPIKE-<name>.md`. Create the `specs/` directory if it doesn't exist.
53
+
54
+ <spike-template>
55
+
56
+ # Spike: [name]
57
+
58
+ ## Question
59
+
60
+ [The specific question this spike was answering]
61
+
62
+ ## Result
63
+
64
+ [Answered / Partially answered / Not answered]
65
+
66
+ ## Findings
67
+
68
+ [What you learned — concrete observations, not opinions]
69
+
70
+ ## Evidence
71
+
72
+ [Code snippet, benchmark result, API response, or screenshot that proves the finding]
73
+
74
+ ## Implications for the plan
75
+
76
+ [How this changes the approach, the design, or the estimate]
77
+
78
+ ## What was NOT explored
79
+
80
+ [Known gaps — things the spike didn't validate]
81
+
82
+ ## Recommendation
83
+
84
+ [Should we proceed with this approach? If yes, what does plan-work need to account for?]
85
+
86
+ </spike-template>
87
+
88
+ ### 5. Delete the spike code
89
+
90
+ After writing the findings, delete or discard the spike code. It is not meant to ship.
91
+
92
+ ### 6. Feed back into plan-work
93
+
94
+ The spike findings are the input to `plan-work`. Call `plan-work` next, informed by `specs/archive/spikes/SPIKE-<name>.md`.
@@ -0,0 +1,40 @@
1
+ ---
2
+ 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
3
+ ---
4
+
5
+
6
+ # Stocktake Skills
7
+ > **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`.
8
+
9
+
10
+ Audit SKILL.md catalog for drift, stale triggers, missing HARD GATEs, and INDEX mismatches.
11
+
12
+ ## Modes
13
+
14
+ | Mode | Scope |
15
+ |------|-------|
16
+ | **Quick Scan** | Skills changed since last tag or in current diff |
17
+ | **Full** | All 58 skills per SKILL-INDEX.md |
18
+
19
+ ## Process
20
+
21
+ 1. Run mode; for each skill check: exists, verb-noun, &lt;300 lines total, HARD GATE present, INDEX row matches.
22
+ 2. Write `specs/STOCKTAKE-<date>.md` with findings table (skill, issue, severity).
23
+ 3. Critical findings → `plan-work` story; cosmetic → `evolve-skill` candidate.
24
+
25
+ ## Verify
26
+
27
+ → verify: `test -f specs/STOCKTAKE-*.md && echo OK || echo MISSING`
28
+
29
+ See [REFERENCE.md](REFERENCE.md) for checklist.
30
+
31
+ ---
32
+
33
+ # Stocktake checklist
34
+
35
+ - [ ] SKILL.md exists at repo root `&lt;name&gt;/SKILL.md`
36
+ - [ ] Listed in SKILL-INDEX.md with correct phase
37
+ - [ ] `description` includes "Use when..."
38
+ - [ ] At least one HARD GATE callout
39
+ - [ ] specs/ output documented if applicable
40
+ - [ ] No edit to `.cursor/rules/` or `.gemini/` (generated only)