bigpowers 2.49.0 → 2.51.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 (94) hide show
  1. package/.pi/package.json +1 -1
  2. package/.pi/prompts/evolve-skill.md +7 -6
  3. package/.pi/prompts/plan-release.md +0 -1
  4. package/.pi/prompts/release-branch.md +74 -56
  5. package/.pi/prompts/session-state.md +2 -0
  6. package/.pi/prompts/survey-context.md +1 -1
  7. package/.pi/skills/evolve-skill/SKILL.md +7 -6
  8. package/.pi/skills/plan-release/SKILL.md +0 -1
  9. package/.pi/skills/release-branch/SKILL.md +74 -56
  10. package/.pi/skills/session-state/SKILL.md +2 -0
  11. package/.pi/skills/survey-context/SKILL.md +1 -1
  12. package/CHANGELOG.md +23 -0
  13. package/CLAUDE.md +20 -0
  14. package/CONVENTIONS.md +11 -0
  15. package/package.json +1 -1
  16. package/scripts/audit-compliance.sh +1 -4
  17. package/scripts/record-cycle-time.sh +340 -0
  18. package/scripts/run-golden-suite.sh +59 -1
  19. package/scripts/validate-okf.sh +198 -0
  20. package/scripts/wait-for-ci.sh +130 -0
  21. package/skills/align-grid/SKILL.md +1 -0
  22. package/skills/assess-impact/SKILL.md +1 -0
  23. package/skills/audit-code/SKILL.md +1 -0
  24. package/skills/audit-plan/SKILL.md +1 -0
  25. package/skills/build-epic/SKILL.md +1 -0
  26. package/skills/change-request/SKILL.md +1 -0
  27. package/skills/commit-message/SKILL.md +1 -0
  28. package/skills/compose-workflow/SKILL.md +1 -0
  29. package/skills/craft-skill/SKILL.md +1 -0
  30. package/skills/deepen-architecture/SKILL.md +1 -0
  31. package/skills/define-language/SKILL.md +1 -0
  32. package/skills/define-success/SKILL.md +1 -0
  33. package/skills/delegate-task/SKILL.md +1 -0
  34. package/skills/deploy/SKILL.md +1 -0
  35. package/skills/design-interface/SKILL.md +1 -0
  36. package/skills/develop-tdd/SKILL.md +1 -0
  37. package/skills/diagnose-root/SKILL.md +1 -0
  38. package/skills/dispatch-agents/SKILL.md +1 -0
  39. package/skills/edit-document/SKILL.md +1 -0
  40. package/skills/elaborate-spec/SKILL.md +1 -0
  41. package/skills/enforce-first/SKILL.md +1 -0
  42. package/skills/evolve-skill/SKILL.md +8 -6
  43. package/skills/execute-plan/SKILL.md +1 -0
  44. package/skills/extract-design/SKILL.md +1 -0
  45. package/skills/fix-bug/SKILL.md +1 -0
  46. package/skills/grill-me/SKILL.md +1 -0
  47. package/skills/grill-with-docs/SKILL.md +1 -0
  48. package/skills/guard-git/SKILL.md +1 -0
  49. package/skills/hook-commits/SKILL.md +1 -0
  50. package/skills/inspect-quality/SKILL.md +1 -0
  51. package/skills/investigate-bug/SKILL.md +1 -0
  52. package/skills/kickoff-branch/SKILL.md +1 -0
  53. package/skills/map-codebase/SKILL.md +1 -0
  54. package/skills/migrate-spec/SKILL.md +1 -0
  55. package/skills/model-domain/SKILL.md +1 -0
  56. package/skills/orchestrate-project/SKILL.md +1 -0
  57. package/skills/organize-workspace/SKILL.md +1 -0
  58. package/skills/plan-refactor/SKILL.md +1 -0
  59. package/skills/plan-release/SKILL.md +1 -1
  60. package/skills/plan-work/SKILL.md +1 -0
  61. package/skills/publish-package/SKILL.md +1 -0
  62. package/skills/quick-fix/SKILL.md +1 -0
  63. package/skills/release-branch/REFERENCE.md +57 -54
  64. package/skills/release-branch/SKILL.md +20 -4
  65. package/skills/request-review/SKILL.md +1 -0
  66. package/skills/research-first/SKILL.md +1 -0
  67. package/skills/reset-baseline/SKILL.md +1 -0
  68. package/skills/respond-review/SKILL.md +1 -0
  69. package/skills/run-benchmark/SKILL.md +1 -0
  70. package/skills/run-evals/SKILL.md +1 -0
  71. package/skills/run-planning/SKILL.md +1 -0
  72. package/skills/scope-work/SKILL.md +1 -0
  73. package/skills/search-skills/SKILL.md +1 -0
  74. package/skills/security-review/SKILL.md +1 -0
  75. package/skills/seed-conventions/SKILL.md +1 -0
  76. package/skills/session-state/SKILL.md +3 -0
  77. package/skills/setup-environment/SKILL.md +1 -0
  78. package/skills/simulate-agents/SKILL.md +1 -0
  79. package/skills/slice-tasks/SKILL.md +1 -0
  80. package/skills/smoke-test/SKILL.md +1 -0
  81. package/skills/spike-prototype/SKILL.md +1 -0
  82. package/skills/stocktake-skills/SKILL.md +1 -0
  83. package/skills/survey-context/SKILL.md +2 -1
  84. package/skills/terse-mode/SKILL.md +1 -0
  85. package/skills/trace-requirement/SKILL.md +1 -0
  86. package/skills/using-bigpowers/SKILL.md +1 -0
  87. package/skills/validate-contracts/SKILL.md +1 -0
  88. package/skills/validate-fix/SKILL.md +1 -0
  89. package/skills/verify-work/SKILL.md +1 -0
  90. package/skills/visual-dashboard/SKILL.md +1 -0
  91. package/skills/wire-ci/SKILL.md +1 -0
  92. package/skills/wire-observability/SKILL.md +1 -0
  93. package/skills/write-document/SKILL.md +1 -0
  94. package/skills-lock.json +72 -72
package/.pi/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.49.0",
3
+ "version": "2.51.0",
4
4
  "description": "72 skills — 72 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -9,19 +9,20 @@ description: Benchmark-gated skill evolution — consume bigpowers-benchmark rep
9
9
 
10
10
  ## Loop
11
11
 
12
- 1. **Establish baseline** — Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
12
+ 1. **Regression gate** — Run `bash scripts/run-golden-suite.sh` to catch mechanical regressions (compliance, sync pipeline, size budget) before spending time on benchmark evals. If golden suite fails, fix regressions first — they are pre-requisites for any capability improvement.
13
+ 2. **Establish baseline** — Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
13
14
 
14
- 2. **Identify gap** — Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
15
+ 3. **Identify gap** — Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
15
16
 
16
- 3. **`plan-work`** — Write a minimal change proposal targeting the failing scenarios. Include verify commands.
17
+ 4. **`plan-work`** — Write a minimal change proposal targeting the failing scenarios. Include verify commands.
17
18
 
18
- 4. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
19
+ 5. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
19
20
 
20
- 5. **Re-run benchmark** — `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
21
+ 6. **Re-run benchmark** — `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
21
22
  - **IMPROVED or STABLE** → advance to step 6.
22
23
  - **REGRESSION** (`new pass_at_k < baseline`) → revert the change and loop back to step 3.
23
24
 
24
- 6. **Record decision** — Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
25
+ 7. **Record decision** — Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
25
26
 
26
27
  ## Verify
27
28
 
@@ -2,7 +2,6 @@
2
2
  description: "RELEASE-INDEX BUILDER — Sequence elaborated epics into specs/release-plan.yaml with WSJF ordering and BCP baselines. NOT a planning-spine substitute: it does not scope work (scope-work) or write story tasks (plan-work). Use after elaborate-spec when the user wants a versioned release index of epics."
3
3
  ---
4
4
 
5
-
6
5
  # Plan Release
7
6
 
8
7
  > **HARD GATE** — Do NOT run this skill unless `elaborate-spec` has produced a clear spec or the user has already defined the feature in detail. If the problem is still fuzzy, run `elaborate-spec` first.
@@ -99,11 +99,16 @@ mv specs/epics/eNN-slug specs/epics/archive/
99
99
 
100
100
  > **HARD GATE** — Do NOT declare success until CI completes. A push that fails CI is a regression, not a release.
101
101
 
102
- After push (solo-local step 5 or team-pr step 7), verify the CI workflow completes successfully:
102
+ After push (solo-local step 5 or team-pr step 7), run the CI polling script:
103
103
 
104
- See [REFERENCE.md](REFERENCE.md)
104
+ ```bash
105
+ bash scripts/wait-for-ci.sh --timeout 600 --interval 30
106
+ ```
107
+
108
+ The script auto-discovers workflow runs for the pushed commit and polls until completion.
109
+ See [REFERENCE.md](REFERENCE.md) for exit code semantics and git-only fallback.
105
110
 
106
- - [ ] CI workflow passes after push
111
+ - [ ] CI workflow passes after push (wait-for-ci.sh exit 0)
107
112
  - [ ] `release.ci_verified: true` documented in state.yaml
108
113
  - On failure: `handoff.next_skill = fix-bug` with the CI failure URL
109
114
 
@@ -117,7 +122,17 @@ git branch -d <branch-name>
117
122
 
118
123
  ### 8a. Cycle-time recording
119
124
 
120
- After landing, record delivery metrics. See [REFERENCE.md](REFERENCE.md) for fields and example row.
125
+ After landing, record delivery metrics with the git-derived, additive script:
126
+
127
+ ```bash
128
+ bash scripts/record-cycle-time.sh append \
129
+ --story <story_id> --bcps <bcps> \
130
+ --range "$(git merge-base main HEAD)..HEAD" \
131
+ --file specs/metrics/cycle-times.yaml
132
+ ```
133
+
134
+ This replaces the previous hand-arithmetic approach (story_end minus story_start).
135
+ See [REFERENCE.md](REFERENCE.md) for the git-hours model and field definitions.
121
136
 
122
137
  ### 9. Return to main
123
138
 
@@ -175,22 +190,65 @@ If `git worktree remove` fails due to uncommitted changes, ask: "There are uncom
175
190
 
176
191
  ## Cycle-time recording
177
192
 
178
- After landing the branch, record delivery metrics for this story:
193
+ After landing the branch, record delivery metrics using the git-derived,
194
+ additive script (replaces hand-arithmetic):
195
+
196
+ ```bash
197
+ bash scripts/record-cycle-time.sh append \
198
+ --story <story_id> --bcps <bcps> \
199
+ --range "$(git merge-base main HEAD)..HEAD" \
200
+ --file specs/metrics/cycle-times.yaml
201
+ ```
202
+
203
+ This appends a row to the cycle-times ledger with two separated metrics:
204
+
205
+ - **effort_hours** — ADDITIVE. Idle-stripped estimated effort from git commit
206
+ history (git-hours model: 120-min session threshold, 120-min first-commit pad).
207
+ Sums exactly to whole-repo effort. NO hand-arithmetic, NO wall-clock includes.
208
+ - **lead_time_minutes** — calendar latency from first commit to merge.
209
+ Median-aggregated across stories; NEVER summed.
210
+
211
+ The script also runs an additivity self-check: Σ(story effort) == whole-repo effort
212
+ within rounding tolerance.
213
+
214
+ ### Why not story_start minus story_end?
179
215
 
180
- 1. Write `metrics.story_end` (ISO 8601) to `specs/state.yaml`
181
- 2. Compute `cycle_minutes`: `story_end` minus `story_start` in minutes
182
- 3. Compute `bcp_per_hour`: `epic_cycle.story_bcps / (cycle_minutes / 60)`
183
- 4. Append a row to `specs/metrics/cycle-times.yaml`:
216
+ The previous hand-arithmetic approach (survey-context writes `story_start`,
217
+ release-branch writes `story_end`, agent hand-computes `cycle_minutes`) was
218
+ retired because:
184
219
 
185
- ```yaml
186
- - id: e01s01
187
- bcps: 3
188
- start: "2026-06-10T09:45:00Z"
189
- end: "2026-06-10T11:15:00Z"
190
- cycle_minutes: 90
191
- bcp_per_hour: 2.0
220
+ 1. It was **agent-self-reported** — trivially fabricated or mis-subtracted.
221
+ 2. Wall-clock included **overnight/weekend/UAT gaps** — calendar latency,
222
+ not coding effort.
223
+ 3. The `bcp_per_hour` metric was **computationally meaningless** (velocity
224
+ derived from a latency measurement).
225
+
226
+ The new approach derives effort from commit history (objective, reproducible)
227
+ and lead time from first commit → merge (honest calendar latency). See
228
+ `docs/references/bcp.md` for BCP sizing context and
229
+ `scripts/record-cycle-time.sh` for the full algorithm.
230
+
231
+ ---
232
+
233
+ ## CI verification
234
+
235
+ The CI polling logic has been extracted to `scripts/wait-for-ci.sh`.
236
+ See the script's `--help` for usage. Step 7b of the main SKILL.md invokes it directly:
237
+
238
+ ```bash
239
+ bash scripts/wait-for-ci.sh --timeout 600 --interval 30
192
240
  ```
193
241
 
242
+ **Exit codes:**
243
+ - **0** — all workflows green. Set `release.ci_verified: true` in state.yaml.
244
+ - **1** — at least one workflow failed. Prints failure URLs. Set `handoff.next_skill = fix-bug`.
245
+ - **2** — timeout. CI did not complete. Retry or investigate.
246
+ - **0 with warning** — `gh` CLI not available, git-only fallback confirmed push landed but CI status unverified.
247
+
248
+ The script handles: auto-discovery of all workflows for the current
249
+ branch/commit, polling until completion, success/failure/timeout exit codes,
250
+ and git-only fallback when `gh` CLI is unavailable.
251
+
194
252
  ---
195
253
 
196
254
  ## Solo-local fallback detail
@@ -231,43 +289,3 @@ git push origin "$DEFAULT_BRANCH"
231
289
  # Clean up local feature branch
232
290
  git branch -d "$FEATURE_BRANCH"
233
291
  ```
234
-
235
- ---
236
-
237
- ## Reference block 2
238
-
239
- ```bash
240
- echo "==> Polling CI for main branch..."
241
- TIMEOUT=600 # 10 minutes
242
- INTERVAL=30 # poll every 30 seconds
243
- ELAPSED=0
244
-
245
- while [ $ELAPSED -lt $TIMEOUT ]; do
246
- CI_JSON=$(gh run list --limit 1 --branch main --workflow CI --json status,conclusion,headSha,databaseId 2>/dev/null)
247
- CI_STATUS=$(echo "$CI_JSON" | jq -r '.[0].status // "unknown"')
248
- CI_CONCLUSION=$(echo "$CI_JSON" | jq -r '.[0].conclusion // ""')
249
- CI_SHA=$(echo "$CI_JSON" | jq -r '.[0].headSha // ""')
250
- CI_ID=$(echo "$CI_JSON" | jq -r '.[0].databaseId // ""')
251
-
252
- if [ "$CI_STATUS" = "completed" ] && [ "$CI_CONCLUSION" = "success" ]; then
253
- echo "OK: CI passed for $(git rev-parse --short HEAD)"
254
- bp-yaml-set.sh specs/state.yaml release.ci_verified true 2>/dev/null || \
255
- echo " (bp-yaml-set not available — manually set release.ci_verified: true in state.yaml)"
256
- break
257
- fi
258
-
259
- if [ "$CI_STATUS" = "completed" ] && [ "$CI_CONCLUSION" = "failure" ]; then
260
- echo "FAIL: CI failed for $(git rev-parse --short HEAD)"
261
- echo " Run URL: https://github.com/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/$CI_ID"
262
- echo " Handoff to fix-bug with the failure URL above."
263
- return 1
264
- fi
265
-
266
- sleep $INTERVAL
267
- ELAPSED=$((ELAPSED + INTERVAL))
268
- echo " Waiting... (${ELAPSED}s / ${TIMEOUT}s)"
269
- done
270
-
271
- echo "FAIL: CI did not complete within ${TIMEOUT}s timeout"
272
- return 1
273
- ```
@@ -9,6 +9,8 @@ description: Track implementation decisions and progress in specs/state.yaml to
9
9
 
10
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
11
 
12
+ Session-state implements the **isolate** strategy from the context-engineering framework (docs/references/context-engineering.md): each agent gets exactly the context it needs — no more — by recording decisions so the next agent can cold-start without replaying history. The four strategies (write, select, compress, isolate) work together: session-state handles isolation, terse-mode handles compression, survey-context handles selection, and CONVENTIONS.md ensures token-efficient writing.
13
+
12
14
  ## Goal
13
15
 
14
16
  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`.
@@ -113,7 +113,7 @@ Report blockers first, before recommendations.
113
113
 
114
114
  ### 8. Record story start timestamp
115
115
 
116
- At story start, write `metrics.story_start` with the current ISO 8601 timestamp to `specs/state.yaml` for cycle-time tracking.
116
+ At story start, write `metrics.story_start` with the current ISO 8601 timestamp to `specs/state.yaml` as an **informational progress marker only** — not a measurement input. Cycle-time metrics are now derived from git commit history via `scripts/record-cycle-time.sh` (see `skills/release-branch/REFERENCE.md` §Cycle-time recording).
117
117
 
118
118
  ## Utility outputs
119
119
 
@@ -11,19 +11,20 @@ model: opus
11
11
 
12
12
  ## Loop
13
13
 
14
- 1. **Establish baseline** — Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
14
+ 1. **Regression gate** — Run `bash scripts/run-golden-suite.sh` to catch mechanical regressions (compliance, sync pipeline, size budget) before spending time on benchmark evals. If golden suite fails, fix regressions first — they are pre-requisites for any capability improvement.
15
+ 2. **Establish baseline** — Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
15
16
 
16
- 2. **Identify gap** — Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
17
+ 3. **Identify gap** — Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
17
18
 
18
- 3. **`plan-work`** — Write a minimal change proposal targeting the failing scenarios. Include verify commands.
19
+ 4. **`plan-work`** — Write a minimal change proposal targeting the failing scenarios. Include verify commands.
19
20
 
20
- 4. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
21
+ 5. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
21
22
 
22
- 5. **Re-run benchmark** — `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
23
+ 6. **Re-run benchmark** — `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
23
24
  - **IMPROVED or STABLE** → advance to step 6.
24
25
  - **REGRESSION** (`new pass_at_k < baseline`) → revert the change and loop back to step 3.
25
26
 
26
- 6. **Record decision** — Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
27
+ 7. **Record decision** — Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
27
28
 
28
29
  ## Verify
29
30
 
@@ -4,7 +4,6 @@ description: "\"RELEASE-INDEX BUILDER — Sequence elaborated epics into specs/r
4
4
  model: sonnet
5
5
  ---
6
6
 
7
-
8
7
  # Plan Release
9
8
 
10
9
  > **HARD GATE** — Do NOT run this skill unless `elaborate-spec` has produced a clear spec or the user has already defined the feature in detail. If the problem is still fuzzy, run `elaborate-spec` first.
@@ -101,11 +101,16 @@ mv specs/epics/eNN-slug specs/epics/archive/
101
101
 
102
102
  > **HARD GATE** — Do NOT declare success until CI completes. A push that fails CI is a regression, not a release.
103
103
 
104
- After push (solo-local step 5 or team-pr step 7), verify the CI workflow completes successfully:
104
+ After push (solo-local step 5 or team-pr step 7), run the CI polling script:
105
105
 
106
- See [REFERENCE.md](REFERENCE.md)
106
+ ```bash
107
+ bash scripts/wait-for-ci.sh --timeout 600 --interval 30
108
+ ```
109
+
110
+ The script auto-discovers workflow runs for the pushed commit and polls until completion.
111
+ See [REFERENCE.md](REFERENCE.md) for exit code semantics and git-only fallback.
107
112
 
108
- - [ ] CI workflow passes after push
113
+ - [ ] CI workflow passes after push (wait-for-ci.sh exit 0)
109
114
  - [ ] `release.ci_verified: true` documented in state.yaml
110
115
  - On failure: `handoff.next_skill = fix-bug` with the CI failure URL
111
116
 
@@ -119,7 +124,17 @@ git branch -d <branch-name>
119
124
 
120
125
  ### 8a. Cycle-time recording
121
126
 
122
- After landing, record delivery metrics. See [REFERENCE.md](REFERENCE.md) for fields and example row.
127
+ After landing, record delivery metrics with the git-derived, additive script:
128
+
129
+ ```bash
130
+ bash scripts/record-cycle-time.sh append \
131
+ --story <story_id> --bcps <bcps> \
132
+ --range "$(git merge-base main HEAD)..HEAD" \
133
+ --file specs/metrics/cycle-times.yaml
134
+ ```
135
+
136
+ This replaces the previous hand-arithmetic approach (story_end minus story_start).
137
+ See [REFERENCE.md](REFERENCE.md) for the git-hours model and field definitions.
123
138
 
124
139
  ### 9. Return to main
125
140
 
@@ -177,22 +192,65 @@ If `git worktree remove` fails due to uncommitted changes, ask: "There are uncom
177
192
 
178
193
  ## Cycle-time recording
179
194
 
180
- After landing the branch, record delivery metrics for this story:
195
+ After landing the branch, record delivery metrics using the git-derived,
196
+ additive script (replaces hand-arithmetic):
197
+
198
+ ```bash
199
+ bash scripts/record-cycle-time.sh append \
200
+ --story <story_id> --bcps <bcps> \
201
+ --range "$(git merge-base main HEAD)..HEAD" \
202
+ --file specs/metrics/cycle-times.yaml
203
+ ```
204
+
205
+ This appends a row to the cycle-times ledger with two separated metrics:
206
+
207
+ - **effort_hours** — ADDITIVE. Idle-stripped estimated effort from git commit
208
+ history (git-hours model: 120-min session threshold, 120-min first-commit pad).
209
+ Sums exactly to whole-repo effort. NO hand-arithmetic, NO wall-clock includes.
210
+ - **lead_time_minutes** — calendar latency from first commit to merge.
211
+ Median-aggregated across stories; NEVER summed.
212
+
213
+ The script also runs an additivity self-check: Σ(story effort) == whole-repo effort
214
+ within rounding tolerance.
215
+
216
+ ### Why not story_start minus story_end?
181
217
 
182
- 1. Write `metrics.story_end` (ISO 8601) to `specs/state.yaml`
183
- 2. Compute `cycle_minutes`: `story_end` minus `story_start` in minutes
184
- 3. Compute `bcp_per_hour`: `epic_cycle.story_bcps / (cycle_minutes / 60)`
185
- 4. Append a row to `specs/metrics/cycle-times.yaml`:
218
+ The previous hand-arithmetic approach (survey-context writes `story_start`,
219
+ release-branch writes `story_end`, agent hand-computes `cycle_minutes`) was
220
+ retired because:
186
221
 
187
- ```yaml
188
- - id: e01s01
189
- bcps: 3
190
- start: "2026-06-10T09:45:00Z"
191
- end: "2026-06-10T11:15:00Z"
192
- cycle_minutes: 90
193
- bcp_per_hour: 2.0
222
+ 1. It was **agent-self-reported** — trivially fabricated or mis-subtracted.
223
+ 2. Wall-clock included **overnight/weekend/UAT gaps** — calendar latency,
224
+ not coding effort.
225
+ 3. The `bcp_per_hour` metric was **computationally meaningless** (velocity
226
+ derived from a latency measurement).
227
+
228
+ The new approach derives effort from commit history (objective, reproducible)
229
+ and lead time from first commit → merge (honest calendar latency). See
230
+ `docs/references/bcp.md` for BCP sizing context and
231
+ `scripts/record-cycle-time.sh` for the full algorithm.
232
+
233
+ ---
234
+
235
+ ## CI verification
236
+
237
+ The CI polling logic has been extracted to `scripts/wait-for-ci.sh`.
238
+ See the script's `--help` for usage. Step 7b of the main SKILL.md invokes it directly:
239
+
240
+ ```bash
241
+ bash scripts/wait-for-ci.sh --timeout 600 --interval 30
194
242
  ```
195
243
 
244
+ **Exit codes:**
245
+ - **0** — all workflows green. Set `release.ci_verified: true` in state.yaml.
246
+ - **1** — at least one workflow failed. Prints failure URLs. Set `handoff.next_skill = fix-bug`.
247
+ - **2** — timeout. CI did not complete. Retry or investigate.
248
+ - **0 with warning** — `gh` CLI not available, git-only fallback confirmed push landed but CI status unverified.
249
+
250
+ The script handles: auto-discovery of all workflows for the current
251
+ branch/commit, polling until completion, success/failure/timeout exit codes,
252
+ and git-only fallback when `gh` CLI is unavailable.
253
+
196
254
  ---
197
255
 
198
256
  ## Solo-local fallback detail
@@ -233,43 +291,3 @@ git push origin "$DEFAULT_BRANCH"
233
291
  # Clean up local feature branch
234
292
  git branch -d "$FEATURE_BRANCH"
235
293
  ```
236
-
237
- ---
238
-
239
- ## Reference block 2
240
-
241
- ```bash
242
- echo "==> Polling CI for main branch..."
243
- TIMEOUT=600 # 10 minutes
244
- INTERVAL=30 # poll every 30 seconds
245
- ELAPSED=0
246
-
247
- while [ $ELAPSED -lt $TIMEOUT ]; do
248
- CI_JSON=$(gh run list --limit 1 --branch main --workflow CI --json status,conclusion,headSha,databaseId 2>/dev/null)
249
- CI_STATUS=$(echo "$CI_JSON" | jq -r '.[0].status // "unknown"')
250
- CI_CONCLUSION=$(echo "$CI_JSON" | jq -r '.[0].conclusion // ""')
251
- CI_SHA=$(echo "$CI_JSON" | jq -r '.[0].headSha // ""')
252
- CI_ID=$(echo "$CI_JSON" | jq -r '.[0].databaseId // ""')
253
-
254
- if [ "$CI_STATUS" = "completed" ] && [ "$CI_CONCLUSION" = "success" ]; then
255
- echo "OK: CI passed for $(git rev-parse --short HEAD)"
256
- bp-yaml-set.sh specs/state.yaml release.ci_verified true 2>/dev/null || \
257
- echo " (bp-yaml-set not available — manually set release.ci_verified: true in state.yaml)"
258
- break
259
- fi
260
-
261
- if [ "$CI_STATUS" = "completed" ] && [ "$CI_CONCLUSION" = "failure" ]; then
262
- echo "FAIL: CI failed for $(git rev-parse --short HEAD)"
263
- echo " Run URL: https://github.com/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/$CI_ID"
264
- echo " Handoff to fix-bug with the failure URL above."
265
- return 1
266
- fi
267
-
268
- sleep $INTERVAL
269
- ELAPSED=$((ELAPSED + INTERVAL))
270
- echo " Waiting... (${ELAPSED}s / ${TIMEOUT}s)"
271
- done
272
-
273
- echo "FAIL: CI did not complete within ${TIMEOUT}s timeout"
274
- return 1
275
- ```
@@ -11,6 +11,8 @@ model: haiku
11
11
 
12
12
  Track the current state of implementation, including decisions made, pending tasks, and open questions, to ensure continuity across session boundaries and prevent "context rot."
13
13
 
14
+ Session-state implements the **isolate** strategy from the context-engineering framework (docs/references/context-engineering.md): each agent gets exactly the context it needs — no more — by recording decisions so the next agent can cold-start without replaying history. The four strategies (write, select, compress, isolate) work together: session-state handles isolation, terse-mode handles compression, survey-context handles selection, and CONVENTIONS.md ensures token-efficient writing.
15
+
14
16
  ## Goal
15
17
 
16
18
  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`.
@@ -115,7 +115,7 @@ Report blockers first, before recommendations.
115
115
 
116
116
  ### 8. Record story start timestamp
117
117
 
118
- At story start, write `metrics.story_start` with the current ISO 8601 timestamp to `specs/state.yaml` for cycle-time tracking.
118
+ At story start, write `metrics.story_start` with the current ISO 8601 timestamp to `specs/state.yaml` as an **informational progress marker only** — not a measurement input. Cycle-time metrics are now derived from git commit history via `scripts/record-cycle-time.sh` (see `skills/release-branch/REFERENCE.md` §Cycle-time recording).
119
119
 
120
120
  ## Utility outputs
121
121
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ # [2.51.0](https://github.com/danielvm-git/bigpowers/compare/v2.50.0...v2.51.0) (2026-07-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **compliance:** exit 0 when score meets threshold regardless of known failures ([ab165a6](https://github.com/danielvm-git/bigpowers/commit/ab165a6ee4e0c7caf0c6e6e237fe8fa07e94c306))
7
+ * **e34:** regenerate artifacts and trim plan-release SKILL.md to 150 lines ([6112dcb](https://github.com/danielvm-git/bigpowers/commit/6112dcbade1e0ac8189af94f382ca005edd85663))
8
+ * **release-branch:** poll CI before declaring success ([484c394](https://github.com/danielvm-git/bigpowers/commit/484c3949c48482f8e5ed6dc11890ef48c2f1929a))
9
+ * **release-branch:** trim SKILL.md to 149 lines under 150-line cap ([1cd3cea](https://github.com/danielvm-git/bigpowers/commit/1cd3ceac6991d806730f7a22bece5cddf9a024ee))
10
+
11
+
12
+ ### Features
13
+
14
+ * **e34:** context engineering layer — reference doc, effort frontmatter, vocabulary ([8ae8faa](https://github.com/danielvm-git/bigpowers/commit/8ae8faabe4d484dbc8cefb994858593362e92ede))
15
+ * **e40:** metrics integrity — git-derived effort, OKF provenance gate ([c590397](https://github.com/danielvm-git/bigpowers/commit/c5903973e06d81a4c67252556558c015469e4beb))
16
+
17
+ # [2.50.0](https://github.com/danielvm-git/bigpowers/compare/v2.49.0...v2.50.0) (2026-07-03)
18
+
19
+
20
+ ### Features
21
+
22
+ * **e31:** size budget, pre-merge mandate, evolve-skill integration ([#46](https://github.com/danielvm-git/bigpowers/issues/46)) ([fa1dd52](https://github.com/danielvm-git/bigpowers/commit/fa1dd52276d0b6476b892f6fd6eed77eac7c5d41))
23
+
1
24
  # [2.49.0](https://github.com/danielvm-git/bigpowers/compare/v2.48.0...v2.49.0) (2026-07-03)
2
25
 
3
26
 
package/CLAUDE.md CHANGED
@@ -20,6 +20,17 @@ Stack: Markdown / Bash (documentation-based; skills integrate with Claude Code,
20
20
  | Typecheck | N/A (Markdown / Bash project) |
21
21
  | CI platform | GitHub Actions (`.github/workflows/publish.yml`, `sync-skills.yml`) |
22
22
  | Compliance | `npm run compliance` |
23
+ | Golden Suite | `bash scripts/run-golden-suite.sh` |
24
+
25
+ ### Pre-Merge Checklist
26
+
27
+ Before opening a PR or landing a branch, run:
28
+
29
+ ```bash
30
+ npm run compliance && bash scripts/run-golden-suite.sh
31
+ ```
32
+
33
+ If any gate fails, fix before merging. Run `--baseline` after any intentional increase in skill count or structure.
23
34
 
24
35
  ## Architecture
25
36
 
@@ -41,6 +52,15 @@ Collection of verb-noun skills under `skills/`, each with a SKILL.md source file
41
52
 
42
53
  ## Token Management
43
54
 
55
+ Context engineering (write/select/compress/isolate — see `docs/references/context-engineering.md`):
56
+
57
+ - **Write (token-efficient content):** Short functions (4-20 lines), unique symbol names, headless tests. Don't restate code in comments.
58
+ - **Select (include only what's relevant):** Use `bts_map` for ranked file lists, `survey-context` for phase bootstrap. Don't read files you don't need.
59
+ - **Compress (reduce without losing structure):** Use `bts_compress` or pipe through `sqz compress`. Use `rtk` for build/test/git output (60-99% savings). Prefer `terse-mode` when context is heavy.
60
+ - **Isolate (partition work):** Use `kickoff-branch` for isolated worktrees, `dispatch-agents` for parallel tasks with disjoint scopes, `session-state` for cold-start handoff.
61
+
62
+ **Effort classification:** Skills carry an `effort:` frontmatter field (`light` | `standard` | `heavy`). Prefer `light` skills for bootstrap/status checks; reserve `heavy` for epic builds and multi-phase planning.
63
+
44
64
  - **Auto-Terse**: When a session exceeds 20 turns or the context window feels "heavy" (latency increasing), you MUST switch to `terse-mode` to save tokens.
45
65
  - **Context Compaction**: Every 10 turns, summarize the current session state and implementation decisions into a short, high-density note.
46
66
  - **Minimal Output**: Prefer text-only output for simple status; use `web_fetch` or `run_shell_command` only for evidence.
package/CONVENTIONS.md CHANGED
@@ -28,6 +28,17 @@ All changes to this repository MUST follow the [Conventional Commits 1.0.0](http
28
28
  - Never call GitHub REST API directly (curl, fetch, etc.)
29
29
  - Never create GitHub issues from automated workflows — produce local .md files in specs/ instead
30
30
 
31
+ ### Pre-Merge Golden Gate
32
+
33
+ Before merging any branch, run the deterministic golden suite:
34
+
35
+ ```bash
36
+ bash scripts/run-golden-suite.sh
37
+ ```
38
+
39
+ This runs compliance → G-04 self-test. If any gate fails, the merge is blocked.
40
+ Pin a fresh baseline with `--baseline` after major structure changes.
41
+
31
42
  ## Agent Workflow Mandates
32
43
 
33
44
  **AGENTS MUST NEVER BYPASS THE BIGPOWERS WORKFLOW.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.49.0",
3
+ "version": "2.51.0",
4
4
  "description": "72 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -258,11 +258,8 @@ fi
258
258
  echo " SCORE: ${SCORE}% (threshold 94%)"
259
259
  if [[ $SCORE -ge 94 ]]; then
260
260
  echo " GATE: PASS"
261
+ exit 0
261
262
  else
262
263
  echo " GATE: FAIL (below 94%)"
263
- fi
264
- echo "============================================================"
265
-
266
- if [[ $TOTAL_GLOBAL_FAIL -gt 0 ]]; then
267
264
  exit 1
268
265
  fi