bigpowers 2.65.1 → 2.67.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 (48) hide show
  1. package/.fix_regex.sh +16 -0
  2. package/.hermes-verify-sed-fix.py +53 -0
  3. package/.pi/package.json +2 -2
  4. package/.pi/prompts/build-epic.md +8 -0
  5. package/.pi/prompts/gate-trace.md +2 -1
  6. package/.pi/prompts/kickoff-branch.md +19 -0
  7. package/.pi/prompts/maintain-wiki.md +63 -0
  8. package/.pi/prompts/plan-tests.md +1 -1
  9. package/.pi/prompts/release-branch.md +17 -13
  10. package/.pi/prompts/verify-work.md +9 -5
  11. package/.pi/skills/build-epic/SKILL.md +8 -0
  12. package/.pi/skills/gate-trace/SKILL.md +2 -1
  13. package/.pi/skills/kickoff-branch/SKILL.md +19 -0
  14. package/.pi/skills/maintain-wiki/SKILL.md +65 -0
  15. package/.pi/skills/plan-tests/SKILL.md +1 -1
  16. package/.pi/skills/release-branch/SKILL.md +17 -13
  17. package/.pi/skills/verify-work/SKILL.md +9 -5
  18. package/CHANGELOG.md +20 -0
  19. package/README.md +1 -1
  20. package/SKILL-INDEX.md +1 -1
  21. package/_test_e28s01.sh +2 -0
  22. package/hermes-verify-sed-fix.py +30 -0
  23. package/package.json +1 -1
  24. package/scripts/build-skill-graph.sh +151 -183
  25. package/scripts/check-spec-drift.sh +121 -0
  26. package/scripts/check-spec-version-gap.sh +143 -0
  27. package/scripts/decompose-conventions.sh +147 -0
  28. package/scripts/generate-agent-guide.sh +89 -0
  29. package/scripts/hermes-verify-e39s02.sh +28 -0
  30. package/scripts/migrate-version.sh +721 -0
  31. package/scripts/okf-post-sync.sh +163 -0
  32. package/scripts/run-golden-suite.sh +235 -27
  33. package/scripts/validate-okf.sh +18 -0
  34. package/skills/build-epic/SKILL.md +8 -0
  35. package/skills/gate-trace/SKILL.md +2 -1
  36. package/skills/kickoff-branch/SKILL.md +19 -0
  37. package/skills/maintain-wiki/SKILL.md +66 -0
  38. package/skills/plan-tests/SKILL.md +1 -1
  39. package/skills/release-branch/SKILL.md +17 -13
  40. package/skills/verify-work/SKILL.md +9 -5
  41. package/skills-lock.json +11 -6
  42. package/tests/fixtures/v1.x-project/CLAUDE.md +4 -0
  43. package/tests/fixtures/v1.x-project/CONVENTIONS.md +4 -0
  44. package/tests/fixtures/v2.0.0-project/CLAUDE.md +4 -0
  45. package/tests/fixtures/v2.0.0-project/CONVENTIONS.md +3 -0
  46. package/tests/fixtures/v2.20-project/CLAUDE.md +4 -0
  47. package/tests/fixtures/v2.20-project/CONVENTIONS.md +4 -0
  48. package/tests/run-golden-migrate-version.sh +155 -0
@@ -13,7 +13,6 @@ description: Make the merge/PR/keep/discard decision for a feature branch, verif
13
13
  Finalize a completed feature branch: verify coverage gates, integrate onto `main`, and clean up the worktree.
14
14
 
15
15
  ## Additional modes
16
-
17
16
  - `--hotfix`: Cherry-pick to main + tag. Skip PR in solo.
18
17
  - `--squash-state`: Squash `chore(state):` commits before merge.
19
18
 
@@ -76,9 +75,7 @@ bash scripts/land-branch.sh <task-slug> "feat(scope): description"
76
75
 
77
76
  ### 6. Create PR (team-pr only)
78
77
 
79
- See [REFERENCE.md](REFERENCE.md) for the full PR body template and gh commands.
80
-
81
- ### 7. Merge (team-pr only)
78
+ Create the pull request, then merge via `gh`:
82
79
 
83
80
  ```bash
84
81
  gh pr merge --squash --delete-branch
@@ -94,22 +91,32 @@ gh pr merge --squash --delete-branch
94
91
  mv specs/epics/eNN-slug specs/epics/archive/
95
92
  ```
96
93
 
97
- ### 7b. CI verification (solo-local and team-pr)
94
+ ### 7b. CI verification & agent lock release (e39s02)
98
95
 
99
96
  > **HARD GATE** — Do NOT declare success until CI completes. A push that fails CI is a regression, not a release.
100
97
 
101
- After push (solo-local step 5 or team-pr step 7), run the CI polling script:
98
+ After push, run CI polling:
102
99
 
103
100
  ```bash
104
101
  bash scripts/wait-for-ci.sh --timeout 600 --interval 30
105
102
  ```
106
103
 
107
- The script auto-discovers workflow runs for the pushed commit and polls until completion.
108
- See [REFERENCE.md](REFERENCE.md) for exit code semantics and git-only fallback.
104
+ Then release the story lock:
105
+
106
+ ```bash
107
+ LOCK="specs/agent-locks.yaml"; STORY="<story-id>"
108
+ [ -f "$LOCK" ] && python3 -c "
109
+ import yaml
110
+ d=yaml.safe_load(open('$LOCK'))
111
+ if d:d['locks']=[l for l in d['locks'] if l.get('story_id')!='$STORY']
112
+ yaml.dump(d,open('$LOCK','w'),default_flow_style=False)
113
+ print(f'LOCK RELEASED: $STORY')
114
+ "||echo "No lock for $STORY — idempotent"
115
+ ```
109
116
 
110
117
  - [ ] CI workflow passes after push (wait-for-ci.sh exit 0)
111
118
  - [ ] `release.ci_verified: true` documented in state.yaml
112
- - On failure: `handoff.next_skill = fix-bug` with the CI failure URL
119
+ - On failure: `handoff.next_skill = fix-bug` with CI failure URL
113
120
 
114
121
  ### 8. Clean up worktree
115
122
 
@@ -130,16 +137,13 @@ bash scripts/record-cycle-time.sh append \
130
137
  --file specs/metrics/cycle-times.yaml
131
138
  ```
132
139
 
133
- This replaces the previous hand-arithmetic approach (story_end minus story_start).
134
- See [REFERENCE.md](REFERENCE.md) for the git-hours model and field definitions.
135
-
136
140
  ### 9. Return to main
137
141
 
138
142
  ```bash
139
143
  git checkout main && git status && pwd
140
144
  ```
141
145
 
142
- Report: "Branch released. Integrate mode: <solo-local|team-pr>. cwd: $(pwd) on $(git branch --show-current)."
146
+ Report: "Branch released."
143
147
 
144
148
  ## Verify
145
149
 
@@ -109,6 +109,13 @@ phases:
109
109
  closed: true
110
110
  ```
111
111
 
112
+ ### 5b. OKF wiki LINT (e39s08)
113
+
114
+ ```bash
115
+ for p in specs/skills-wiki/skills/*.md; do s="skills/$(basename "$p" .md)/SKILL.md"; [ -f "$s" ]&&[ "$p" -ot "$s" ]&&echo "STALE: $p"; done
116
+ for p in specs/conventions-wiki/*.md; do [ "$(basename "$p")" = "index.md" ]&&continue; grep -q "$(basename "$p" .md)" CONVENTIONS.md||echo "ORPHAN: $p"; done
117
+ ```
118
+
112
119
  > **HARD GATE** — Verification evidence MUST be persisted before marking the story done. No evidence = not verified.
113
120
 
114
121
  ## --cli mode
@@ -132,15 +139,12 @@ BINARY=$(grep '^BIN\s*=' Makefile 2>/dev/null | awk '{print $3}')
132
139
  3. Happy-path: run documented example command from README.md → assert non-empty output
133
140
  4. Edge case: `$BINARY --invalid-flag` → assert exit code ≠ 0 and error message printed
134
141
 
135
- No "stop server" or "clear caches" steps are executed in `--cli` mode. Steps 3–6 of the default process (mechanical gates, UAT, gaps loop) still run unchanged.
142
+ No "stop server" / "clear caches" in `--cli` mode. Steps 3–6 still run unchanged.
136
143
 
137
144
  ## Verify
138
145
 
139
146
  → verify: `find specs/verifications -maxdepth 1 -name '*-verify.yaml' 2>/dev/null | head -1 | grep -q . && echo "Evidence persisted" || echo "No evidence yet"`
140
147
 
141
- See [REFERENCE.md](REFERENCE.md) for cold-start and gaps template.
142
-
143
148
  ## Handoff
144
-
145
- Gate: READY -> next: audit-code
149
+ READY -> next: audit-code
146
150
  Writes: state.yaml handoff.next_skill = audit-code
package/skills-lock.json CHANGED
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "build-epic": {
25
25
  "description": "Eight-step epic build cycle — reads state.yaml, execution-status.yaml, and one epic capsule; updates status via bp-yaml-set or direct edit. Resume mode runs one step per invocation. Use instead of ad-hoc execute-plan for release work.",
26
- "sha256": "96fd5e0cc63a9962",
26
+ "sha256": "230ac9d30cae1a63",
27
27
  "path": "skills/build-epicSKILL.md"
28
28
  },
29
29
  "change-request": {
@@ -128,7 +128,7 @@
128
128
  },
129
129
  "gate-trace": {
130
130
  "description": "\"Deterministic traceability quality gate — reads coverage matrix + blind-spot data, applies decision rules with oracle confidence downgrade, emits PASS/CONCERNS/FAIL/WAIVED verdict. Use before release-branch to gate merges on traceability.\"# story: e38s06",
131
- "sha256": "7326525dc3d5d51f",
131
+ "sha256": "81deb2549867386b",
132
132
  "path": "skills/gate-traceSKILL.md"
133
133
  },
134
134
  "grill-me": {
@@ -163,9 +163,14 @@
163
163
  },
164
164
  "kickoff-branch": {
165
165
  "description": "Create a git worktree and feature branch, then verify a clean test baseline before any code is written. Use when starting a new feature or task, when user wants to work in isolation from main, or mentions \"start a branch\" or \"new worktree\".",
166
- "sha256": "2857dac9f23bd7be",
166
+ "sha256": "928d87bae8cc4ddf",
167
167
  "path": "skills/kickoff-branchSKILL.md"
168
168
  },
169
+ "maintain-wiki": {
170
+ "description": "\"Agent-maintained OKF wiki — INGEST source docs, LINT for issues, QUERY across concept pages. Run as part of build-epic Step 8 and verify-work Phase 3.\"# story: e39s07",
171
+ "sha256": "c54c6170db6fe3f9",
172
+ "path": "skills/maintain-wikiSKILL.md"
173
+ },
169
174
  "map-codebase": {
170
175
  "description": "\"Derives the tech-stack doc from scratch by scanning the codebase — analyzes stack, architecture, and gray areas (error handling, API shapes) and persists findings into specs/tech-architecture/tech-stack.md. Run when the tech doc doesn't exist yet; use survey-context to consume it once it does.\"",
171
176
  "sha256": "cfd8a71a3cdb63af",
@@ -203,7 +208,7 @@
203
208
  },
204
209
  "plan-tests": {
205
210
  "description": "\"Design a risk-scaled test architecture for an epic before implementation begins. Produces prioritized scenarios, test level distribution, and fixture plans based on TEA and bigpowers principles.\"",
206
- "sha256": "3f43a105b860105a",
211
+ "sha256": "ed22b3feb985eabb",
207
212
  "path": "skills/plan-testsSKILL.md"
208
213
  },
209
214
  "plan-work": {
@@ -223,7 +228,7 @@
223
228
  },
224
229
  "release-branch": {
225
230
  "description": "Make the merge/PR/keep/discard decision for a feature branch, verify coverage gates, create the PR with gh, and clean up the worktree. Use when a feature is done and ready to ship, or when user says \"release\", \"merge\", or \"open a PR\".",
226
- "sha256": "354267f0f4b593b5",
231
+ "sha256": "73a9aebff3fb4dc0",
227
232
  "path": "skills/release-branchSKILL.md"
228
233
  },
229
234
  "request-review": {
@@ -348,7 +353,7 @@
348
353
  },
349
354
  "verify-work": {
350
355
  "description": "Multi-phase UAT gate — cold-start smoke, build, typecheck, lint, tests, step-by-step manual verification, gaps-closure loop. Use after execute-plan or develop-tdd, before audit-code.",
351
- "sha256": "030622528b2bf5ed",
356
+ "sha256": "300e5a7c7695e33f",
352
357
  "path": "skills/verify-workSKILL.md"
353
358
  },
354
359
  "visual-dashboard": {
@@ -0,0 +1,4 @@
1
+ # CLAUDE.md — v1.x Project
2
+ ## Commands
3
+ - npm test
4
+ - npm start
@@ -0,0 +1,4 @@
1
+ # CONVENTIONS.md — v1.x
2
+ ## Naming
3
+ - kebab-case for files
4
+ - camelCase for functions
@@ -0,0 +1,4 @@
1
+ # CLAUDE.md — v2.0.0
2
+ ## Commands
3
+ - npm test
4
+ - npm start
@@ -0,0 +1,3 @@
1
+ # CONVENTIONS.md — v2.0.0
2
+ ## Naming
3
+ - kebab-case
@@ -0,0 +1,4 @@
1
+ # CLAUDE.md — v2.20
2
+ ## Commands
3
+ - npm test
4
+ - npm run lint
@@ -0,0 +1,4 @@
1
+ # CONVENTIONS.md — v2.20
2
+ ## Naming
3
+ - kebab-case
4
+ - YAML cockpit
@@ -0,0 +1,155 @@
1
+ #!/usr/bin/env bash
2
+ # story: e44s06
3
+ # G-06: migrate-version golden tests — detection + stamp + YAML validity
4
+ set -euo pipefail
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
8
+ FIXTURES="$SCRIPT_DIR/fixtures"
9
+ CHECK_GAP="$REPO_ROOT/scripts/check-spec-version-gap.sh"
10
+ VALIDATE_YAML="$REPO_ROOT/scripts/validate-specs-yaml.sh"
11
+
12
+ GREEN='\033[0;32m'; RED='\033[0;31m'; CYAN='\033[0;36m'; NC='\033[0m'
13
+ PASS=0; FAIL=0
14
+
15
+ pass() { echo -e " ${GREEN}PASS${NC} $1"; PASS=$((PASS+1)); }
16
+ fail() { echo -e " ${RED}FAIL${NC} $1"; FAIL=$((FAIL+1)); }
17
+
18
+ echo -e "${CYAN}═══ G-06: migrate-version Golden Tests ═══${NC}"
19
+
20
+ # ── Test 1: v1.x detection ──────────────────────────────────────────────
21
+ echo ""
22
+ echo -e "${CYAN}── G-06: v1.x detection ──${NC}"
23
+ tmp1="$(mktemp -d)"
24
+ cp -r "$FIXTURES/v1.x-project/"* "$tmp1/"
25
+ cd "$tmp1"
26
+ git init --quiet && git config user.email "test@b.dev" && git config user.name "T" && git add -A && git commit -m "i" --quiet
27
+
28
+ bash "$CHECK_GAP" --skip-block --json 2>&1 || true
29
+ echo ""
30
+
31
+ # Verify STATE.md exists, state.yaml does not
32
+ if [ -f "$tmp1/specs/STATE.md" ] && [ ! -f "$tmp1/specs/state.yaml" ]; then
33
+ pass "v1.x: Markdown-era detected (STATE.md present, state.yaml absent)"
34
+ else
35
+ fail "v1.x: expected Markdown-era signal"
36
+ fi
37
+ rm -rf "$tmp1"
38
+
39
+ # ── Test 2: v2.0.0 detection ────────────────────────────────────────────
40
+ echo ""
41
+ echo -e "${CYAN}── G-06: v2.0.0 detection ──${NC}"
42
+ tmp2="$(mktemp -d)"
43
+ cp -r "$FIXTURES/v2.0.0-project/"* "$tmp2/"
44
+ cd "$tmp2"
45
+ git init --quiet && git config user.email "test@b.dev" && git config user.name "T" && git add -A && git commit -m "i" --quiet
46
+
47
+ bash "$CHECK_GAP" --skip-block --json 2>&1 || true
48
+ echo ""
49
+
50
+ # Verify state.yaml exists but no bigpowers_version stamp
51
+ if [ -f "$tmp2/specs/state.yaml" ]; then
52
+ stamped="$(python3 -c "import yaml; d=yaml.safe_load(open('$tmp2/specs/state.yaml')); print(d.get('bigpowers_version','MISSING'))" 2>/dev/null)" || stamped="ERR"
53
+ if [ "$stamped" = "MISSING" ]; then
54
+ pass "v2.0.0: YAML cockpit without bigpowers_version stamp"
55
+ else
56
+ fail "v2.0.0: expected no stamp, got '$stamped'"
57
+ fi
58
+ else
59
+ fail "v2.0.0: state.yaml missing"
60
+ fi
61
+ rm -rf "$tmp2"
62
+
63
+ # ── Test 3: v2.20 detection ─────────────────────────────────────────────
64
+ echo ""
65
+ echo -e "${CYAN}── G-06: v2.20 detection ──${NC}"
66
+ tmp3="$(mktemp -d)"
67
+ cp -r "$FIXTURES/v2.20-project/"* "$tmp3/"
68
+ cd "$tmp3"
69
+ git init --quiet && git config user.email "test@b.dev" && git config user.name "T" && git add -A && git commit -m "i" --quiet
70
+
71
+ bash "$CHECK_GAP" --skip-block --json 2>&1 || true
72
+ echo ""
73
+
74
+ if [ -f "$tmp3/specs/state.yaml" ]; then
75
+ has_capsule="$(python3 -c "import yaml; d=yaml.safe_load(open('$tmp3/specs/state.yaml')); print('yes' if d.get('epic_cycle') else 'no')" 2>/dev/null)" || has_capsule="ERR"
76
+ stamped="$(python3 -c "import yaml; d=yaml.safe_load(open('$tmp3/specs/state.yaml')); print(d.get('bigpowers_version','MISSING'))" 2>/dev/null)" || stamped="ERR"
77
+ if [ "$has_capsule" = "yes" ] && [ "$stamped" = "MISSING" ]; then
78
+ pass "v2.20: capsule era with epic_cycle, no stamp"
79
+ elif [ "$has_capsule" != "yes" ]; then
80
+ fail "v2.20: expected epic_cycle, got '$has_capsule'"
81
+ else
82
+ fail "v2.20: expected no stamp, got '$stamped'"
83
+ fi
84
+ else
85
+ fail "v2.20: state.yaml missing"
86
+ fi
87
+ rm -rf "$tmp3"
88
+
89
+ # ── Test 4: stamp-only migration (v2.20, no migrations needed) ──────────
90
+ echo ""
91
+ echo -e "${CYAN}── G-06: stamp-only migration ──${NC}"
92
+ tmp4="$(mktemp -d)"
93
+ cp -r "$FIXTURES/v2.20-project/"* "$tmp4/"
94
+ cd "$tmp4"
95
+ git init --quiet && git config user.email "test@b.dev" && git config user.name "T" && git add -A && git commit -m "i" --quiet
96
+
97
+ bash "$REPO_ROOT/scripts/migrate-version.sh" --project "$tmp4" --force --no-commit 2>&1 | tail -3 || true
98
+
99
+ if [ -f "$tmp4/specs/state.yaml" ]; then
100
+ stamped="$(python3 -c "import yaml; d=yaml.safe_load(open('$tmp4/specs/state.yaml')); print(d.get('bigpowers_version','MISSING'))" 2>/dev/null)" || stamped="ERR"
101
+ installed="$(node -e "console.log(require('$REPO_ROOT/package.json').version)" 2>/dev/null)"
102
+ if [ "$stamped" = "$installed" ]; then
103
+ pass "v2.20: stamp-only migration produced bigpowers_version=$stamped"
104
+ else
105
+ fail "v2.20: stamp check — expected $installed, got $stamped"
106
+ fi
107
+ else
108
+ fail "v2.20: state.yaml missing after migration"
109
+ fi
110
+
111
+ # Validate YAML
112
+ if bash "$VALIDATE_YAML" "$tmp4/specs" 2>&1 | grep -qv 'PARSE ERROR'; then
113
+ pass "v2.20: validate-specs-yaml"
114
+ else
115
+ fail "v2.20: validate-specs-yaml had parse errors"
116
+ fi
117
+ rm -rf "$tmp4"
118
+
119
+ # ── Test 5: v2.0.0 migration roundtrip ──────────────────────────────────
120
+ echo ""
121
+ echo -e "${CYAN}── G-06: v2.0.0 migration roundtrip ──${NC}"
122
+ tmp5="$(mktemp -d)"
123
+ cp -r "$FIXTURES/v2.0.0-project/"* "$tmp5/"
124
+ cd "$tmp5"
125
+ git init --quiet && git config user.email "test@b.dev" && git config user.name "T" && git add -A && git commit -m "i" --quiet
126
+
127
+ bash "$REPO_ROOT/scripts/migrate-version.sh" --project "$tmp5" --force --no-commit 2>&1 | tail -5 || true
128
+
129
+ if [ -f "$tmp5/specs/state.yaml" ]; then
130
+ installed="$(node -e "console.log(require('$REPO_ROOT/package.json').version)" 2>/dev/null)"
131
+ stamped="$(python3 -c "import yaml; d=yaml.safe_load(open('$tmp5/specs/state.yaml')); print(d.get('bigpowers_version','MISSING'))" 2>/dev/null)" || stamped="ERR"
132
+ if [ "$stamped" = "$installed" ]; then
133
+ pass "v2.0.0: stamp = $stamped after migration"
134
+ else
135
+ fail "v2.0.0: stamp check — expected $installed, got $stamped"
136
+ fi
137
+ else
138
+ fail "v2.0.0: state.yaml missing after migration"
139
+ fi
140
+
141
+ if python3 -c "import yaml; yaml.safe_load(open('$tmp5/specs/state.yaml')); print('OK')" 2>/dev/null | grep -q OK; then
142
+ pass "v2.0.0: state.yaml is valid YAML after migration"
143
+ else
144
+ fail "v2.0.0: state.yaml parse error after migration"
145
+ fi
146
+ rm -rf "$tmp5"
147
+
148
+ echo ""
149
+ echo -e "${CYAN}────────────────────────────────────${NC}"
150
+ echo -e "G-06 Results: ${GREEN}${PASS} passed${NC}, ${RED}${FAIL} failed${NC}"
151
+ if [ $FAIL -gt 0 ]; then
152
+ exit 1
153
+ fi
154
+ echo -e "${GREEN}G-06: OK${NC}"
155
+ exit 0