bigpowers 2.92.0 → 2.93.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gemini/extensions/bigpowers/gemini-extension.json +1 -1
- package/.pi/package.json +1 -1
- package/AGENTS.md +98 -0
- package/CHANGELOG.md +14 -0
- package/CONVENTIONS.md +47 -427
- package/bin/bigpowers.js +9 -6
- package/bin/setup.js +11 -5
- package/package.json +1 -1
- package/scripts/lib/__pycache__/atomic_write.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/link_utils.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_okf.cpython-310.pyc +0 -0
- package/scripts/lib/cli-version.js +29 -0
- package/scripts/lib/golden-suite-gates.sh +4 -0
- package/scripts/test-bigpowers-cli-version.sh +104 -0
- package/CLAUDE.md +0 -400
- package/GEMINI.md +0 -75
package/CONVENTIONS.md
CHANGED
|
@@ -12,475 +12,95 @@
|
|
|
12
12
|
# story: e29s03
|
|
13
13
|
# story: e54s03
|
|
14
14
|
# story: e55s03
|
|
15
|
+
# story: e84s01
|
|
15
16
|
|
|
16
17
|
# Conventions
|
|
17
18
|
|
|
18
|
-
[`constitution.md`](constitution.md)
|
|
19
|
-
this project's doctrine (this file, CLAUDE.md, docs/PRINCIPLES.md,
|
|
20
|
-
docs/references/*.md) into bigspec's B0-B10 + Capstone blocks, with citations
|
|
21
|
-
back to the fuller text below. It's a starting point for a reader, not a
|
|
22
|
-
replacement — this file remains fully authoritative for its own content today.
|
|
19
|
+
[`constitution.md`](constitution.md) synthesizes this project's doctrine (this file, CLAUDE.md, docs/PRINCIPLES.md, docs/references/*.md) into B0-B10 + Capstone blocks. This file remains fully authoritative.
|
|
23
20
|
|
|
24
21
|
## Conventional Commits & Semantic Versioning
|
|
25
22
|
|
|
26
|
-
All changes
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`<type>(<scope>): <description>` (Space after colon is MANDATORY)
|
|
30
|
-
|
|
31
|
-
### Types & Version Bumps
|
|
32
|
-
- `feat`: Minor (x.Y.z) - New feature
|
|
33
|
-
- `fix`: Patch (x.y.Z) - Bug fix
|
|
34
|
-
- `perf`: Patch (x.y.Z) - Performance improvement
|
|
35
|
-
- `docs`, `chore`, `style`, `refactor`, `test`: No bump (unless breaking)
|
|
36
|
-
- `BREAKING CHANGE:` (or `!` after type): Major (X.y.z)
|
|
23
|
+
All changes MUST follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Versioning 2.0.0](https://semver.org/).
|
|
24
|
+
- Format: `<type>(<scope>): <description>` (space after colon mandatory).
|
|
25
|
+
- Types: `feat` (minor), `fix`/`perf` (patch), `docs`/`chore`/`style`/`refactor`/`test` (no bump). `BREAKING CHANGE:` or `!` triggers major.
|
|
37
26
|
|
|
38
27
|
## GitHub & Git Operations
|
|
39
28
|
|
|
40
29
|
- No direct work on `main` or `master`. Every task MUST start with a feature branch or worktree via `kickoff-branch`.
|
|
41
|
-
- **Integrate
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- Use `gh run view` / `gh run watch` for CI status
|
|
46
|
-
- Verify auth with `gh auth status` before operations
|
|
47
|
-
- **Git Attribution:** NEVER include `Co-authored-by`, `Co-Authored-By`, or any other footer that attributes code to an AI agent (e.g., Claude, Gemini). All commits must appear as if they were authored solely by the human user.
|
|
48
|
-
- **State Commit Policy:** To minimize git history noise, intermediate `chore(state):` commits (e.g., tracking build-epic step transitions) should either be squashed locally using the `--squash-state` flag on `release-branch` before merging, or kept out-of-band using local cycle-state files.
|
|
49
|
-
- Never call GitHub REST API directly (curl, fetch, etc.)
|
|
50
|
-
- Never create GitHub issues from automated workflows — produce local .md files in specs/ instead
|
|
51
|
-
- **Post-land branch cleanup:** `land-branch.sh` squash-merges the feature branch, so `git branch -d <branch>` afterward always fails ("not fully merged" — expected, since a squash doesn't create an ancestor relationship). `git branch -D <branch>` is the correct next step, but `guard-git`'s hook blocks agents from running `-D` directly. Leave the orphaned local branch for the human to delete, or fix `land-branch.sh` to delete its own branch under the `GIT_BIGPOWERS_LAND=1` exemption it already sets — don't spend a turn fighting the hook.
|
|
52
|
-
|
|
53
|
-
### Pre-Merge Verification Gates
|
|
54
|
-
|
|
55
|
-
Before merging any branch, run the deterministic verification gates:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
bash scripts/run-verification-gates.sh
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
This runs compliance → G-04 self-test. If any gate fails, the merge is blocked.
|
|
62
|
-
Pin a fresh baseline with `--baseline` after major structure changes.
|
|
30
|
+
- **Integrate:** Use `gh pr create` + `gh pr merge --squash` via `release-branch`. Solo profile: `bash scripts/land-branch.sh <branch> "<msg>"` after release gates.
|
|
31
|
+
- Never push directly to `main`/`master` except via `land-branch.sh` (`GIT_BIGPOWERS_LAND=1`). Use `gh` over git/curl/fetch.
|
|
32
|
+
- **Git Attribution:** NEVER include `Co-authored-by`, `Co-Authored-By`, or any AI attribution footer in git commits. All commits must appear solely authored by the human user.
|
|
33
|
+
- **Pre-Merge Verification Gates:** Run `bash scripts/run-verification-gates.sh` (compliance → G-04 self-test) before any merge.
|
|
63
34
|
|
|
64
35
|
## Agent Workflow Mandates
|
|
65
36
|
|
|
66
37
|
**AGENTS MUST NEVER BYPASS THE BIGPOWERS WORKFLOW.**
|
|
67
|
-
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- Use `develop-tdd` or `execute-plan` to implement the plan.
|
|
73
|
-
- Use `investigate-bug` for bug reports before writing a fix.
|
|
74
|
-
- **Verification Mandate:** Every story implementation MUST end with a step-by-step manual verification script provided to the user. You must wait for the user to confirm behavioral correctness (UAT) before declaring the story done or moving to the next.
|
|
75
|
-
- **Verification:** You MUST verify every change with tests. Code generation without a corresponding plan in `specs/` is strictly forbidden.
|
|
76
|
-
- **Traceability Mandate:** Every story MUST have at least one `story: eNNsNN` tag in its implementing code or test file. `trace-stories.sh --strict` runs in CI to enforce this. Untagged stories fail the CI traceability gate.
|
|
77
|
-
- **Scenario ID Format (e46s04+):** When a `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the epic, critical-path scenarios use the format `SC-eNNsYY-P{0|1|2|3}-NN` (e.g. `SC-e46s04-P0-01`). These IDs are referenced inside test files as `// scenario: SC-eNNsYY-P0-NN` comments alongside the existing `// story: eNNsNN` tag. SC gaps detected via check-blind-spots.sh; no separate SC tracing script required. gate-trace treats a P0 story with zero `SC-*-P0-*` references in test files as a CONCERNS finding (waivable via `state.yaml`). P2/P3 epics may set `test_plan: waived` in `state.yaml` to skip the `plan-tests` skill.
|
|
78
|
-
- **Stream Continuity:** When writing large files or long documents, you MUST output continuously in chunks of ~200 lines. Do not pause between sections. Continue immediately until complete. If you need time to process, emit a placeholder comment or heading rather than going silent to prevent stream idle timeouts.
|
|
79
|
-
|
|
80
|
-
## Always Green / Shift Left
|
|
81
|
-
|
|
82
|
-
Solo developers own the whole codebase. **Always Green** means Preflight and CI are green before any forward work — not "green enough for this task."
|
|
83
|
-
|
|
84
|
-
**Shift Left (1-10-100):** Defects cost roughly 1× to fix in development, 10× in integration, 100× in production (IBM Systems Sciences Institute; CloudQA benchmarks). Fixing a red gate now is cheaper than shipping and debugging later.
|
|
85
|
-
|
|
86
|
-
**Preflight** — the project's full local verification stack (chained from test, lint, typecheck, and build commands recorded in `CLAUDE.md`). Preflight MUST pass before kickoff, develop, or verify phases advance.
|
|
87
|
-
|
|
88
|
-
**CI green** — when a PR exists or remote CI applies, `gh pr checks` (or equivalent) MUST show passing before merge or land.
|
|
89
|
-
|
|
90
|
-
**Existing projects:** Projects seeded before e51 do not receive these sections automatically. Re-run `seed-conventions` and merge the Always Green blocks, or copy § Always Green and § Discovered Defects from bigpowers `CONVENTIONS.md` manually.
|
|
91
|
-
|
|
92
|
-
## Discovered Defects
|
|
93
|
-
|
|
94
|
-
Any **reproducible gate failure** encountered during unrelated work is a discovered defect — not optional background noise.
|
|
38
|
+
- **No Direct Coding:** Never write code directly for directives like "build feature X". Route feature work through bigpowers skills (`survey-context`, `plan-work`, `develop-tdd`, `verify-work`).
|
|
39
|
+
- **Verification Mandate:** Every story must include runnable `verify:` commands. Verify every change with tests. Provide step-by-step UAT to user.
|
|
40
|
+
- **Traceability Mandate:** Every story MUST have ≥1 `story: eNNsNN` tag in implementing code or tests (`bash scripts/trace-stories.sh --strict`).
|
|
41
|
+
- **Scenario ID Format (e46s04+):** Critical-path scenarios use format `SC-eNNsYY-P{0|1|2|3}-NN` in `eNN-TEST_PLAN_LATEST.md` and tests.
|
|
42
|
+
- **Stream Continuity:** Output continuously in chunks of ~200 lines. Never pause or go silent.
|
|
95
43
|
|
|
96
|
-
|
|
44
|
+
## Always Green & Discovered Defects
|
|
97
45
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
3. **Log** — only when reproduction is blocked after good-faith attempt; write a BUG spec and stop forward work on the original task until triaged.
|
|
101
|
-
|
|
102
|
-
Discovered fixes ship in the **same PR** as the original work but in **separate commits** (Conventional Commits). Never narrate a failure and continue.
|
|
103
|
-
|
|
104
|
-
**Hard block:** Red Preflight or red CI blocks kickoff-branch, develop-tdd, and verify-work forward progress until fix-or-log produces green.
|
|
46
|
+
- **Always Green (Shift Left):** Preflight (`npm run compliance && bash scripts/run-verification-gates.sh`) and CI (`gh pr checks`) must be green before forward work.
|
|
47
|
+
- **Discovered Defects (fix-or-log):** Any reproducible gate failure requires `quick-fix` or `fix-bug` (separate commit). Banned dismissive phrases: "pre-existing", "unrelated to this session", "not introduced by my changes", "out of scope".
|
|
105
48
|
|
|
106
49
|
## Risk Tiers (Effective Rule Matrix)
|
|
107
50
|
|
|
108
|
-
Human-readable source of truth for verification depth.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
bash scripts/compile-rule-matrix.sh # → specs/rule-matrix.json
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Diff `specs/rule-matrix.json` across git tags to audit rule drift. Schema version in JSON `matrix_version` field.
|
|
51
|
+
Human-readable source of truth for verification depth. Compile: `bash scripts/compile-rule-matrix.sh` (→ `specs/rule-matrix.json`).
|
|
115
52
|
|
|
116
53
|
### P0 — Critical (never violate)
|
|
117
|
-
|
|
118
54
|
- **[always-green]**: Preflight and CI must be green before forward work. (`verify-work`, `kickoff-branch`, `develop-tdd`)
|
|
119
55
|
- **[no-direct-coding]**: Route feature work through bigpowers skills — no ad-hoc implementation without a plan in `specs/`. (`plan-work`, `orchestrate-project`)
|
|
120
56
|
- **[traceability]**: Every story has ≥1 `story: eNNsNN` tag in implementing code or tests. (`trace-stories.sh --strict`)
|
|
121
57
|
- **[no-generated-edits]**: Never edit `.cursor/rules/`, `.gemini/`, or `website/src/content/docs/` directly. (`sync-skills.sh`)
|
|
122
58
|
|
|
123
59
|
### P1 — High (fix before merge)
|
|
124
|
-
|
|
125
60
|
- **[conventional-commits]**: All commits follow Conventional Commits; semantic-release owns version bumps. (`commit-message`, `release-branch`)
|
|
126
61
|
- **[verify-per-story]**: Every story/task has runnable `verify:` commands; `verify-work` confirms before done. (`plan-work`, `verify-work`)
|
|
127
62
|
- **[test-on-change]**: New functions and bug fixes include tests; regressions get regression tests. (`develop-tdd`, `validate-fix`)
|
|
128
63
|
- **[branch-protection]**: No direct work on `main`/`master`; feature branches via `kickoff-branch`. (`guard-git`)
|
|
129
64
|
|
|
130
65
|
### P2 — Medium (address in same epic or next)
|
|
131
|
-
|
|
132
66
|
- **[plan-tests-waiver]**: P2/P3-dominant epics may set `test_plan: waived` in `state.yaml`. (`plan-tests`)
|
|
133
67
|
- **[file-size-cap]**: Source files under 300 lines unless listed in § File-Size Exceptions. (`audit-code`)
|
|
134
68
|
- **[handoff-signaling]**: Critical-path skills write `handoff.next_skill` to `state.yaml`. (`session-state`)
|
|
135
69
|
- **[delta-requirements]**: Behavior changes require `ADDED`/`MODIFIED`/`REMOVED`/`RENAMED` tags in requirement specs. (`plan-work`, `change-request`)
|
|
136
70
|
|
|
137
71
|
### P3 — Low (best effort)
|
|
138
|
-
|
|
139
72
|
- **[boy-scout]**: Leave touched files at least as clean as found. (`audit-code`)
|
|
140
73
|
- **[terse-when-heavy]**: Switch to `terse-mode` when context exceeds ~20 turns. (`terse-mode`)
|
|
141
74
|
- **[skill-naming]**: Verb-noun kebab-case under `skills/`; documented exceptions only. (`craft-skill`)
|
|
142
75
|
|
|
143
|
-
### Banned dismissive phrases
|
|
144
|
-
|
|
145
|
-
Agents MUST NOT use these phrases (or close paraphrases) to ignore reproducible failures:
|
|
146
|
-
|
|
147
|
-
| Banned phrase | Required behavior instead |
|
|
148
|
-
|---------------|---------------------------|
|
|
149
|
-
| Pre-existing / pre-existing issues | Run fix-or-log; if truly unrelated, prove with a passing repro after revert |
|
|
150
|
-
| unrelated to this session | Same — session boundaries do not waive green gates |
|
|
151
|
-
| not introduced by my changes | Bisect or fix anyway; solo-default owns the whole tree |
|
|
152
|
-
| out of scope (ignoring a red gate) | Invoke quick-fix or fix-bug; scope-minimization never overrides Always Green |
|
|
153
|
-
|
|
154
76
|
## specs/ — All Planning Output Goes Here
|
|
155
77
|
|
|
156
|
-
Every skill
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
Missing timestamps are a gate violation — do not advance past `release-branch` without them.
|
|
186
|
-
|
|
187
|
-
### next_skill signaling mandate (v2.0.0)
|
|
188
|
-
|
|
189
|
-
Every critical-path skill (survey-context, plan-tests, plan-work, kickoff-branch, develop-tdd, verify-work, audit-code, commit-message, release-branch) MUST write `handoff.next_skill` to `specs/state.yaml` as its last action. Agents MUST read `state.yaml` and follow `handoff.next_skill` before asking "what comes next?".
|
|
190
|
-
|
|
191
|
-
`plan-tests` is an optional planning-spine step: after `slice-tasks`, before `plan-work`, for epics whose stories carry `risk: P0|P1`. It is skipped (set `test_plan: waived` in `state.yaml`) for P2/P3-dominant epics.
|
|
192
|
-
|
|
193
|
-
### Intent vs delivery vs execution
|
|
194
|
-
|
|
195
|
-
| Question | File | Format |
|
|
196
|
-
|----------|------|--------|
|
|
197
|
-
| What should the product do? | `specs/product/SCOPE_LATEST.yaml` | YAML |
|
|
198
|
-
| North star / initiative | `specs/product/VISION_LATEST.yaml` | YAML |
|
|
199
|
-
| Glossary | `specs/product/GLOSSARY_LATEST.yaml` | YAML |
|
|
200
|
-
| What ships in this release, in what order? | `specs/release-plan.yaml` | YAML |
|
|
201
|
-
| How to implement an epic/story? | `specs/epics/eNN-*.yaml` or `specs/epics/eNN-*/stories/` | YAML + MD |
|
|
202
|
-
| Where are we in the session? | `specs/state.yaml` | YAML |
|
|
203
|
-
|
|
204
|
-
Epic IDs: `e01`, `e30`. Story IDs: `e01s01`. One FR in SCOPE may span multiple epics or releases.
|
|
205
|
-
|
|
206
|
-
### Frozen release (ex-baseline)
|
|
207
|
-
|
|
208
|
-
When planning closes, copy to `specs/product/snapshots/release-<version>/` (`release-plan.yaml`, `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml`). No separate `baselines/` folder.
|
|
209
|
-
|
|
210
|
-
### Semantic-release — the real version is never hand-tracked
|
|
211
|
-
|
|
212
|
-
> **The authority is `gh release view` / git tags.** semantic-release decides the version
|
|
213
|
-
> at merge from Conventional Commits. Never hand-maintain a `target_version` to "predict" it —
|
|
214
|
-
> that field drifts from reality every release. The specs only *mirror* the real tag for reference.
|
|
215
|
-
|
|
216
|
-
1. **Planning intent (codename only)** — `specs/release-plan.yaml` → `release.version`, `release.bump_hint`.
|
|
217
|
-
Treat `version` as a non-authoritative label; if you write a number, mark it "mirror, not the authority".
|
|
218
|
-
2. **Published version (authority)** — repo root `package.json`, git tag `vX.Y.Z`, `CHANGELOG.md` (CI semantic-release; not hand-edited in specs). Read with `gh release view`.
|
|
219
|
-
3. **Dashboard mirror** — `specs/state.yaml` → `release.last_tag`, `release.last_publish` (copied from `gh release view`; `target_version` is `null` — not tracked manually).
|
|
220
|
-
|
|
221
|
-
### Guardrails and other artifacts
|
|
222
|
-
|
|
223
|
-
| Document | Path |
|
|
224
|
-
|----------|------|
|
|
225
|
-
| Stack / architecture | `specs/tech-architecture/TECH_STACK_LATEST.md` |
|
|
226
|
-
| Security / test / design plans | `specs/tech-architecture/*_PLAN_LATEST.md` |
|
|
227
|
-
| Epic test plan (P0/P1 epics) | `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` — produced by `plan-tests` skill (e46s04); one per epic. |
|
|
228
|
-
| Domain context + ADRs | `specs/tech-architecture/TECH_STACK_LATEST.md` or legacy `specs/CONTEXT.md` + `specs/adr/` |
|
|
229
|
-
| Bug investigation | `specs/bugs/BUG-*.md` + `specs/bugs/registry.yaml` (generated) |
|
|
230
|
-
| Refactor / impact | `specs/tech-architecture/REFACTOR_LATEST.md`, `specs/tech-architecture/IMPACT_LATEST.md` |
|
|
231
|
-
| Legacy markdown | `specs/archive/` after `bash scripts/convert-legado.sh` |
|
|
232
|
-
|
|
233
|
-
Validate YAML layout: `bash scripts/validate-specs-yaml.sh`. Patch runtime keys: `bash scripts/bp-yaml-set.sh specs/state.yaml git.branch feat/foo`.
|
|
234
|
-
|
|
235
|
-
### Documentation Responsibilities (e45s36)
|
|
236
|
-
|
|
237
|
-
Each specs/ artifact owns specific facts. Update the owning file when the fact changes — do not duplicate across files.
|
|
238
|
-
|
|
239
|
-
| File / directory | Owns | Update when |
|
|
240
|
-
|------------------|------|-------------|
|
|
241
|
-
| `specs/state.yaml` | Active session, handoff, story timing, workflow mode | Every skill handoff; branch switch; story start/end |
|
|
242
|
-
| `specs/release-plan.yaml` | Epic ordering, WSJF, BCP baselines, release codename | New epic scoped; WSJF re-prioritized; BCP re-estimated |
|
|
243
|
-
| `specs/execution-status.yaml` | Story/epic done/todo status (sole SoT) | Story completes; gate-trace runs; manual status change |
|
|
244
|
-
| `specs/product/SCOPE_LATEST.yaml` | In/out of scope, initiative boundaries | scope-work; change-request Add mode |
|
|
245
|
-
| `specs/product/VISION_LATEST.yaml` | North star, strategic intent | Major product pivot; scope-work |
|
|
246
|
-
| `specs/product/GLOSSARY_LATEST.yaml` | Canonical domain terms | define-language; model-domain term crystallizes |
|
|
247
|
-
| `specs/epics/eNN-*/epic.yaml` | Epic manifest, story list, BCPs | slice-tasks; plan-work adds stories |
|
|
248
|
-
| `specs/epics/eNN-*/eNNsYY-*.md` | Story requirements (countable-story-format) | plan-work; section approval state changes |
|
|
249
|
-
| `specs/epics/eNN-*/eNNsYY-tasks.yaml` | Runnable implementation tasks + verify | plan-work; develop-tdd task completion |
|
|
250
|
-
| `specs/tech-architecture/tech-stack.md` | Stack, modules, gray areas | map-codebase; deepen-architecture; model-domain |
|
|
251
|
-
| `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` | P0/P1 test scenarios per epic | plan-tests |
|
|
252
|
-
| `specs/adr/ADR-*.md` | Architectural decisions | model-domain; deepen-architecture ADR offer accepted |
|
|
253
|
-
| `specs/bugs/BUG-*.md` | Bug RCA + fix plan | investigate-bug |
|
|
254
|
-
| `specs/bugs/registry.yaml` | Bug index (generated) | inspect-quality; sync-bugs-registry.sh |
|
|
255
|
-
| `specs/verifications/*` | Verify evidence, audit reports, eval reports | verify-work; audit-code; run-evals |
|
|
256
|
-
| `specs/security/REVIEW.md` | Latest security scan findings | security-review |
|
|
257
|
-
| `specs/metrics/cycle-times.yaml` | Delivery velocity ledger | release-branch lands story |
|
|
258
|
-
|
|
259
|
-
### Generated artifact targets
|
|
260
|
-
|
|
261
|
-
Skill content is edited in `skills/*/SKILL.md` and auto-propagated to these targets by `bash scripts/sync-skills.sh`:
|
|
262
|
-
- `.cursor/rules/` — Cursor IDE rules
|
|
263
|
-
- `.gemini/extensions/bigpowers/` — Gemini CLI extensions
|
|
264
|
-
- `.pi/skills/` + `.pi/prompts/` — pi agent
|
|
265
|
-
- `website/src/content/docs/` — Docs website (Astro Starlight, deployed to GitHub Pages)
|
|
266
|
-
|
|
267
|
-
**Never edit any of these targets directly.** Edit the SKILL.md sources and run rebuild scripts (`bash scripts/sync-skills.sh`, `npm run site:build`).
|
|
268
|
-
|
|
269
|
-
### Packaging boundary — dev-repo tooling vs. end-user CLI
|
|
270
|
-
|
|
271
|
-
bigpowers ships itself as an npm package (`bin/setup.js`) while also being a
|
|
272
|
-
self-hosting monorepo that dogfoods its own skills. `.npmignore` excludes
|
|
273
|
-
`specs/`, `docs/`, and `.git` from the published tarball — a real end-user
|
|
274
|
-
install has none of them.
|
|
275
|
-
|
|
276
|
-
**Any script invoked from `bin/*.js` (the end-user CLI surface) must not
|
|
277
|
-
assume dev-only files exist.** `scripts/sync-skills.sh` conflates two
|
|
278
|
-
concerns — skill distribution (render into `.cursor/rules/` etc., relevant
|
|
279
|
-
to every user) and dev-repo maintenance (`sync_post_run`: regenerate
|
|
280
|
-
`skills-lock.json`, `SKILL-INDEX.md`, `docs/references/model-profiles.md`,
|
|
281
|
-
`specs/epics-wiki/`, `specs/adr-wiki/` — relevant only to bigpowers
|
|
282
|
-
contributors). `bin/setup.js` calls it with `--distribute-only`, which skips
|
|
283
|
-
`sync_post_run` entirely; the no-flag form remains the contributor
|
|
284
|
-
dev-workflow. Before wiring any dev-maintenance script into an installer
|
|
285
|
-
path, verify with `command npm pack --pack-destination <dir>` + extract
|
|
286
|
-
what a real install actually contains, rather than assuming `specs/`/`docs/`
|
|
287
|
-
are present (see `BUG-2026-07-24-installer-runs-dev-maintenance-pipeline`).
|
|
288
|
-
|
|
289
|
-
### Legacy paths (migrate away)
|
|
290
|
-
|
|
291
|
-
| Old | New |
|
|
292
|
-
|-----|-----|
|
|
293
|
-
| `specs/STATE.md` | `specs/state.yaml` |
|
|
294
|
-
| `specs/RELEASE-PLAN.md` | `specs/release-plan.yaml` + `specs/epics/` |
|
|
295
|
-
| `specs/SCOPE.md` | `specs/product/SCOPE_LATEST.yaml` |
|
|
296
|
-
|
|
297
|
-
## Code Style
|
|
298
|
-
|
|
299
|
-
- Functions: 4–20 lines. Split if longer.
|
|
300
|
-
- Files: under 300 lines. Split by responsibility to ensure content fits within a single agent context window.
|
|
301
|
-
- One thing per function, one responsibility per module (SRP).
|
|
302
|
-
- Names: specific and unique. Avoid `data`, `handler`, `Manager`, `Service`. Prefer names whose grep returns < 5 hits in this codebase.
|
|
303
|
-
- Types: explicit. No `any`, no untyped public functions.
|
|
304
|
-
- No code duplication. Extract shared logic into a function/module.
|
|
305
|
-
- Early returns over nested ifs. Max 2 levels of indentation.
|
|
306
|
-
- Conditionals: expressed as positives (G29). Avoid negative flags or `unless` logic where possible.
|
|
307
|
-
- The Stepdown Rule (G34): functions should descend exactly one level of abstraction.
|
|
308
|
-
- Names describe side-effects (N7): if a function sends email, writes to disk, or mutates state, the name must say so (`sendWelcomeEmail`, not `processUser`).
|
|
309
|
-
- No magic strings or numbers (G25): every bare string literal or numeric literal used in logic must be extracted to a named constant.
|
|
310
|
-
- Boolean logic in named functions (G28): complex boolean expressions must be extracted into a named predicate function, not inlined.
|
|
311
|
-
- Prefer exceptions over error codes: throw/raise an exception rather than returning a numeric or boolean error sentinel.
|
|
312
|
-
- Remove dead code (G9/F4): unused functions, unreachable branches, and stale imports must be deleted — not commented out.
|
|
313
|
-
- Boy Scout Rule: leave every file you touch at least as clean as you found it. Fix the first broken window you see.
|
|
314
|
-
- **Law of Demeter:** A method should call only its immediate collaborators — not `a.getB().getC().doX()`. Chain violations need explicit justification in code review.
|
|
315
|
-
- **Verification mandate:** Every story must include runnable `verify:` commands (in epic shards or story files). No story is done until `verify-work` confirms it (or user explicitly waives with documented reason in `specs/state.yaml` handoff).
|
|
316
|
-
- Exception messages must include the offending value, expected shape, and an actionable remediation hint for the agent.
|
|
317
|
-
- SOLID beyond SRP: favor interfaces over concrete types (DIP) when injecting dependencies.
|
|
318
|
-
- **`grep -E` portability:** never use `\d` or `\D` in a `grep -E` pattern — they are PCRE-only escapes, not GNU grep extensions (unlike `\s`/`\S`/`\w`/`\W`, which GNU grep does support). Real GNU grep on Linux CI treats `\d` as a literal `d`, silently matching nothing; this only "works" on macOS if the local `grep` happens to be a permissive BSD/GNU-compatible variant. Use `[0-9]` instead. This exact defect broke the traceability gate codebase-wide (`scripts/lib/trace-stories.py`, `scripts/lib/trace-matrix.py`) while passing every local check.
|
|
319
|
-
|
|
320
|
-
## Comments
|
|
321
|
-
|
|
322
|
-
- Keep your own comments. Never strip them on refactor — they carry intent and provenance.
|
|
323
|
-
- Write WHY, not WHAT.
|
|
324
|
-
- Complex or non-obvious logic must include "Provenance" links (e.g., Jira issue, GitHub commit SHA, or ADR filename).
|
|
325
|
-
- Docstrings on public functions: intent + one usage example.
|
|
326
|
-
- Reference issue numbers / commit SHAs when a line exists because of a specific bug.
|
|
327
|
-
- No obvious comments that restate the code.
|
|
328
|
-
- No commented-out code (C5): dead code must be deleted, not commented out. Use git history to recover it.
|
|
329
|
-
|
|
330
|
-
## Tests (F.I.R.S.T — Uncle Bob Ch 9)
|
|
331
|
-
|
|
332
|
-
- Tests run headless with a single command (recorded in CLAUDE.md).
|
|
333
|
-
- Every new function gets a test. Every bug fix gets a regression test.
|
|
334
|
-
- Mocks for external I/O are named fake classes, not inline stubs.
|
|
335
|
-
- Tests are **F**ast, **I**ndependent, **R**epeatable, **S**elf-Validating, **T**imely.
|
|
336
|
-
- Never skip or @ignore a test without an explicit ambiguity note explaining what is unresolved (T4); silently ignored tests are prohibited.
|
|
337
|
-
- Test boundary conditions (T5): every suite must cover exact edge values — empty input, maximum, minimum, and off-by-one.
|
|
338
|
-
- Test through public interfaces only (T8): assert on observable outcomes (return values, API responses, UI state). Never assert on internal state or private methods.
|
|
339
|
-
- Every change must be verifiable with a single runnable command before it is marked done.
|
|
340
|
-
|
|
341
|
-
## Dependencies
|
|
342
|
-
|
|
343
|
-
- Inject dependencies through constructor/parameter, not global/import.
|
|
344
|
-
- Wrap third-party libs behind a thin project-owned interface.
|
|
345
|
-
|
|
346
|
-
## Structure
|
|
347
|
-
|
|
348
|
-
- Follow the framework convention (Rails, Django, Next.js, etc.).
|
|
349
|
-
- Predictable paths: controller/model/view, src/lib/test.
|
|
350
|
-
- Prefer small focused modules over god files.
|
|
351
|
-
|
|
352
|
-
## Formatting
|
|
353
|
-
|
|
354
|
-
- Use the language default formatter (cargo fmt, gofmt, prettier, black, rubocop -A).
|
|
355
|
-
- Configured in pre-commit and on-save. No style debates beyond that.
|
|
356
|
-
|
|
357
|
-
## Logging
|
|
358
|
-
|
|
359
|
-
- Structured JSON for debugging / observability.
|
|
360
|
-
- Plain text only for user-facing CLI output.
|
|
361
|
-
|
|
362
|
-
## Defensive Code
|
|
363
|
-
|
|
364
|
-
- Retry with backoff (for API/network calls in skill implementations)
|
|
365
|
-
- Timeout (for long-running operations)
|
|
366
|
-
- Graceful degradation (when external services/dependencies fail)
|
|
367
|
-
|
|
368
|
-
The agent implements defensive code only for categories explicitly listed here.
|
|
369
|
-
|
|
370
|
-
## Skill Naming — Conventions and Exceptions
|
|
371
|
-
|
|
372
|
-
All skill directories under `skills/` use a two-word `verb-noun` kebab-case pair (ADR-0001). Grep for any skill
|
|
373
|
-
name must return < 5 results across the repo.
|
|
374
|
-
|
|
375
|
-
**Documented exceptions** (adjective-noun retained for clarity; renaming would reduce usability):
|
|
376
|
-
|
|
377
|
-
| Skill | Convention deviation | Rationale |
|
|
378
|
-
|-------|----------------------|-----------|
|
|
379
|
-
| `terse-mode` | adjective-noun | `enable-terse` implies a toggle; `terse-mode` names a mode state |
|
|
380
|
-
| `visual-dashboard` | adjective-noun | `view-dashboard` implies read-only; `show-dashboard` collides with `show` verbs |
|
|
381
|
-
| `deploy` | single verb | Well-known DevOps single-word concept; renames like `deploy-app` or `deploy-service` are redundant since deploy always targets an application |
|
|
382
|
-
| `grill-with-docs` | three-word verb-prep-noun | Variant of `grill-me`; the `-with-docs` suffix is the distinguishing feature — collapsing it would hide the doc-grounded contract |
|
|
383
|
-
| `generate-allure-report` | three-word verb-noun-noun | `generate-report` is ambiguous across report types; `allure` names the specific output format consumers integrate with |
|
|
384
|
-
| `simple-english` | adjective-noun | Names the recognizable STE brand users search for (`simplify-english` / `write-plain` hide intent and break searchability for users coming from the upstream skill) |
|
|
385
|
-
|
|
386
|
-
Any new exception requires an entry in this table before the skill is published.
|
|
387
|
-
|
|
388
|
-
## Tombstone Aliases (e53s02)
|
|
389
|
-
|
|
390
|
-
Every skill rename or merge ships a tombstone alias for one release, so consumers
|
|
391
|
-
referencing the old name don't break immediately.
|
|
392
|
-
|
|
393
|
-
**Mechanism:**
|
|
394
|
-
|
|
395
|
-
1. Run `bash scripts/tombstone-skill.sh <old-name> <new-name-or-merge-target>` when
|
|
396
|
-
renaming or merging a skill. It replaces `skills/<old-name>/SKILL.md` with a stub
|
|
397
|
-
pointing at the new name/location, preserves the old skill's `# story: eNNsNN` tags
|
|
398
|
-
for traceability, and registers the mapping in `specs/tombstones.yaml` (old name,
|
|
399
|
-
new name/target, creation timestamp, and the `created_at_version` at creation time).
|
|
400
|
-
2. Run `bash scripts/validate-tombstones.sh` to confirm every registered tombstone's
|
|
401
|
-
stub still resolves, and to flag any tombstone whose `created_at_version` is in a
|
|
402
|
-
different minor/major release train (major.minor) than the current version — that
|
|
403
|
-
stub has served its one-release transition window and should be removed. Patch-only
|
|
404
|
-
bumps within the same minor version don't count as a new release: this repo ships
|
|
405
|
-
via semantic-release on every merge to main, so comparing full semver strings would
|
|
406
|
-
expire a tombstone within minutes of creation instead of giving consumers a real
|
|
407
|
-
migration window.
|
|
408
|
-
3. **Required alongside the first real use of `tombstone-skill.sh`:** update
|
|
409
|
-
`docs/references/model-profiles.md`'s skill-count annotations. A tombstone stub is
|
|
410
|
-
still a `skills/*/SKILL.md` file — it increments the live skill count the same as
|
|
411
|
-
any other skill, and the count doc must reflect that.
|
|
412
|
-
|
|
413
|
-
**Rejected names:** both the old and new name must be a bare kebab-case skill name
|
|
414
|
-
(`^[a-z][a-z0-9-]*$`) — `tombstone-skill.sh` refuses anything else before touching the
|
|
415
|
-
filesystem (path segments, absolute paths, etc.).
|
|
416
|
-
|
|
417
|
-
This story (e53s02) builds the mechanism only; it creates no real tombstone stub
|
|
418
|
-
itself, so the live skill count doesn't move yet. The first real use is expected in
|
|
419
|
-
e56 (skill reclassification/merges).
|
|
420
|
-
|
|
421
|
-
## Catalog Freeze (e54-e59 migration)
|
|
422
|
-
|
|
423
|
-
The 80-skill catalog is frozen as of `specs/tech-architecture/CATALOG-BASELINE-<date>.yaml`
|
|
424
|
-
(e54s01) so e56's reclassification work (80 skills → ~28 procedures) has a stable
|
|
425
|
-
starting point instead of a moving target. `bash scripts/check-catalog-drift.sh`
|
|
426
|
-
(e54s02) diffs the live catalog against that baseline on every Preflight run and
|
|
427
|
-
prints `WARNING:` lines for drift — it is advisory only (always exits 0) and never
|
|
428
|
-
blocks Preflight or CI.
|
|
429
|
-
|
|
430
|
-
**Frozen (triggers a drift warning):**
|
|
431
|
-
- Adding a new `skills/<name>/SKILL.md` directory
|
|
432
|
-
- Structural changes to an existing skill's `phase`, `effort`, or `model` frontmatter
|
|
433
|
-
fields
|
|
434
|
-
|
|
435
|
-
**Not frozen (no warning; proceed as normal):**
|
|
436
|
-
- Bug fixes within an existing skill's existing shape
|
|
437
|
-
- `description:` edits
|
|
438
|
-
- Any other content fix that doesn't touch `phase`/`effort`/`model`
|
|
439
|
-
|
|
440
|
-
**Exit criterion:** the freeze ends when e56 (reclassify-catalog) merges. e56's
|
|
441
|
-
completion is the unfreeze event itself — there is no calendar date, and no other
|
|
442
|
-
story or action lifts the freeze early.
|
|
443
|
-
|
|
444
|
-
**Exception marker:** a change that is genuinely unrelated to the migration (e.g. an
|
|
445
|
-
urgent fix that happens to touch a frozen field) can suppress its own drift warning
|
|
446
|
-
by adding a comment containing the literal string `freeze-exception` to the affected
|
|
447
|
-
`SKILL.md`, for example:
|
|
448
|
-
|
|
449
|
-
```
|
|
450
|
-
<!-- freeze-exception: urgent security fix, unrelated to the e54-e59 migration -->
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
`scripts/check-catalog-drift.sh` checks for this exact substring — it must remain
|
|
454
|
-
byte-identical between this document and the script, or the exception path silently
|
|
455
|
-
stops working. Use it sparingly: it should be a marker for something a human decided
|
|
456
|
-
was safe to change during the freeze, not a way to permanently silence the gate for a
|
|
457
|
-
skill that should just wait until e56.
|
|
458
|
-
|
|
459
|
-
## File-Size Exceptions
|
|
460
|
-
|
|
461
|
-
The 300-line file cap exists to ensure files fit in a single agent context
|
|
462
|
-
window. The following files are documented exceptions:
|
|
463
|
-
|
|
464
|
-
| File | Lines | Rationale | Review date |
|
|
465
|
-
|------|-------|-----------|-------------|
|
|
466
|
-
| `scripts/audit-compliance.sh` | 300 | Gherkin harness with embedded judge logic and waiver subsystem; splitting the judge loop from the reporting layer would require fragile state-passing. At the 300-line cap; monitor. | 2026-10-01 |
|
|
467
|
-
|
|
468
|
-
**Note:** `scripts/trace-stories.sh` was refactored from a 613-line monolith into a
|
|
469
|
-
69-line orchestrator delegating to `scripts/lib/trace-stories.py`. `scripts/lib/trace-matrix.py`
|
|
470
|
-
was split into `simple_yaml.py` + `trace_renderer.py` (252 lines); see
|
|
471
|
-
BUG-2026-07-06-gate-trace-matrix-oversized. Prior exception rows for trace-matrix.py
|
|
472
|
-
and trace-stories.py are removed — both are now under the 300-line cap.
|
|
473
|
-
|
|
474
|
-
Any new exception requires an entry in this table with rationale and a review date.
|
|
475
|
-
|
|
476
|
-
## docs/references SSOT Sync (e45s10)
|
|
477
|
-
|
|
478
|
-
Agent-guidance files under `docs/references/` are **distilled from upstream sources**, not hand-edited ad hoc. Canonical inputs live in `CLAUDE.md`, `docs/PRINCIPLES.md`, and `skills/*/SKILL.md`.
|
|
479
|
-
|
|
480
|
-
| Action | Command |
|
|
481
|
-
|--------|---------|
|
|
482
|
-
| Regenerate locally | `bash scripts/sync-references.sh` |
|
|
483
|
-
| Manifest | `scripts/references-manifest.yaml` |
|
|
484
|
-
| Scheduled CI | `.github/workflows/sync-references.yml` (weekly) |
|
|
485
|
-
|
|
486
|
-
After changing SKILL.md `model:` frontmatter or token-management prose in CLAUDE.md, run `sync-references.sh` to refresh reference docs and `.sync-stamp`.
|
|
78
|
+
Every skill writes written output to `specs/` at root. See [specs/README.md](specs/README.md) for full schema.
|
|
79
|
+
- **YAML cockpit:** `specs/state.yaml` (session & handoff), `specs/release-plan.yaml` (WSJF index), `specs/execution-status.yaml` (story done/todo SoT), `specs/metrics/cycle-times.yaml` (velocity ledger).
|
|
80
|
+
- **BCP accounting mandate:** BCP = Business Complexity Points (story size baseline via 6-step method before build; see [docs/references/bcp.md](docs/references/bcp.md)). Timestamps: `metrics.story_start` and `metrics.story_end` mandatory.
|
|
81
|
+
- **Generated targets:** Never edit `.cursor/rules/`, `.gemini/extensions/bigpowers/`, `.pi/`, or `website/src/content/docs/` directly — run `bash scripts/sync-skills.sh`.
|
|
82
|
+
|
|
83
|
+
## Code Style & Clean Architecture
|
|
84
|
+
|
|
85
|
+
- **Size limits:** Functions: 4–20 lines (split if longer). Source files: under 300 lines (SRP; fits single context window).
|
|
86
|
+
- **Quality heuristics:** One responsibility per function/module (SRP). Stepdown Rule (G34). Demeter's Law.
|
|
87
|
+
- **Names:** specific and unique (<5 hits in repo). Avoid `data`, `handler`, `Manager`, `Service`. Names describe side-effects (N7).
|
|
88
|
+
- **Types:** explicit typing mandatory — no `any`, no untyped public APIs. No magic numbers/strings (G25).
|
|
89
|
+
- **Errors & remediation:** Throw typed exceptions with offending value, expected shape, and actionable remediation hint.
|
|
90
|
+
- **Boy Scout Rule:** Leave every file touched at least as clean as found. Remove dead code (G9/F4; no commented-out code C5).
|
|
91
|
+
- **Portability:** `grep -E portability`: never use `\d` or `\D` (PCRE-only; breaks on GNU grep in Linux CI). Use `[0-9]`.
|
|
92
|
+
- **Comments:** Write WHY, not WHAT. Never strip comments on refactor. Complex logic must include provenance links (issue, SHA, ADR).
|
|
93
|
+
## Tests (F.I.R.S.T)
|
|
94
|
+
- Fast, Independent, Repeatable, Self-Validating, Timely. Headless single-command runs.
|
|
95
|
+
- Boundary conditions (T5): test exact edges (empty, min, max, off-by-one).
|
|
96
|
+
- Public interfaces only (T8): test observable behavior, never private state.
|
|
97
|
+
- No ignored tests without explicit ambiguity note (T4).
|
|
98
|
+
|
|
99
|
+
## Detailed References
|
|
100
|
+
|
|
101
|
+
- Skill Naming & Exceptions: [docs/references/skill-naming.md](docs/references/skill-naming.md)
|
|
102
|
+
- Tombstone Aliases: [docs/references/tombstones.md](docs/references/tombstones.md)
|
|
103
|
+
- Catalog Freeze: [docs/references/catalog-freeze.md](docs/references/catalog-freeze.md)
|
|
104
|
+
- File-Size Exceptions: [docs/references/file-size-exceptions.md](docs/references/file-size-exceptions.md)
|
|
105
|
+
- Reference SSOT Sync: [docs/references/ssot-sync.md](docs/references/ssot-sync.md)
|
|
106
|
+
- Toolchain (bts, sqz, RTK): [docs/references/agent-tooling.md](docs/references/agent-tooling.md)
|
package/bin/bigpowers.js
CHANGED
|
@@ -10,7 +10,9 @@ const path = require('path');
|
|
|
10
10
|
|
|
11
11
|
const ROOT = path.dirname(path.dirname(__filename));
|
|
12
12
|
const SKILLS_MARKER = path.join(os.homedir(), '.claude', 'skills', 'survey-context');
|
|
13
|
-
|
|
13
|
+
// Version strings come from disk, not from a require cache captured at startup:
|
|
14
|
+
// `update` reinstalls this package mid-process (BUG-2026-11-03-cli-update-stale-version).
|
|
15
|
+
const { readPackageVersion } = require(path.join(ROOT, 'scripts', 'lib', 'cli-version'));
|
|
14
16
|
|
|
15
17
|
function isInstalled() {
|
|
16
18
|
try {
|
|
@@ -95,10 +97,11 @@ if (cmd === 'status') {
|
|
|
95
97
|
const count = fs.readdirSync(path.join(os.homedir(), '.claude', 'skills'))
|
|
96
98
|
.filter(d => fs.lstatSync(path.join(os.homedir(), '.claude', 'skills', d)).isSymbolicLink())
|
|
97
99
|
.length;
|
|
98
|
-
|
|
100
|
+
const version = readPackageVersion(ROOT);
|
|
101
|
+
console.log(`bigpowers v${version} — ${count} skills installed`);
|
|
99
102
|
const latest = latestPublishedVersion();
|
|
100
|
-
if (latest && latest !==
|
|
101
|
-
console.log(`\n⬆️ A newer release is available: v${latest} (you have v${
|
|
103
|
+
if (latest && latest !== version) {
|
|
104
|
+
console.log(`\n⬆️ A newer release is available: v${latest} (you have v${version}).`);
|
|
102
105
|
console.log(' Upgrade: npm install -g bigpowers@latest && bigpowers update');
|
|
103
106
|
}
|
|
104
107
|
} else {
|
|
@@ -123,10 +126,10 @@ Commands:
|
|
|
123
126
|
|
|
124
127
|
// Default: check state and guide
|
|
125
128
|
if (isInstalled()) {
|
|
126
|
-
console.log(`bigpowers v${
|
|
129
|
+
console.log(`bigpowers v${readPackageVersion(ROOT)} — already installed.`);
|
|
127
130
|
console.log('Commands: bigpowers {setup|update|status|help}');
|
|
128
131
|
} else {
|
|
129
|
-
console.log(`🚀 bigpowers v${
|
|
132
|
+
console.log(`🚀 bigpowers v${readPackageVersion(ROOT)} — skills not yet installed.`);
|
|
130
133
|
console.log(' Run: bigpowers setup');
|
|
131
134
|
process.exit(1);
|
|
132
135
|
}
|
package/bin/setup.js
CHANGED
|
@@ -16,9 +16,9 @@ const { execSync, spawn } = require('child_process');
|
|
|
16
16
|
const fs = require('fs');
|
|
17
17
|
const path = require('path');
|
|
18
18
|
const { installGlobal, installLocal, uninstallTool, detectExistingInstall } = require('../scripts/lib/install-helpers');
|
|
19
|
+
const { readPackageVersion } = require('../scripts/lib/cli-version');
|
|
19
20
|
|
|
20
21
|
const ROOT = path.resolve(path.dirname(__filename), '..');
|
|
21
|
-
const pkg = require(path.join(ROOT, 'package.json'));
|
|
22
22
|
|
|
23
23
|
// ── ANSI helpers ─────────────────────────────────────────────────────────────
|
|
24
24
|
const c = {
|
|
@@ -30,7 +30,11 @@ const c = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// ── ASCII banner ─────────────────────────────────────────────────────────────
|
|
33
|
-
|
|
33
|
+
// The version is a parameter, read fresh from disk at render time: `update`
|
|
34
|
+
// reinstalls this package mid-process, so a value captured at startup is the one
|
|
35
|
+
// that was just replaced (BUG-2026-11-03-cli-update-stale-version).
|
|
36
|
+
function banner(version) {
|
|
37
|
+
return `
|
|
34
38
|
${c.cyan('╔════════════════════════════════════════════════════════════════════════════╗')}
|
|
35
39
|
${c.cyan('║')} ${c.cyan('║')}
|
|
36
40
|
${c.cyan('║')} ${c.bold(c.cyan('██████╗ ██╗ ██████╗ ██████╗ ██████╗ █ █ ███████╗██████╗ ███████╗'))} ${c.cyan('║')}
|
|
@@ -41,9 +45,10 @@ ${c.cyan('║')} ${c.bold(c.cyan('██████╔╝██║╚██
|
|
|
41
45
|
${c.cyan('║')} ${c.bold(c.cyan('╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝'))} ${c.cyan('║')}
|
|
42
46
|
${c.cyan('║')} ${c.cyan('║')}
|
|
43
47
|
${c.cyan('║')} ${c.dim('Spec-Driven & Test-First Skills for Solo Developers')} ${c.cyan('║')}
|
|
44
|
-
${c.cyan('║')} ${c.dim(`v${
|
|
48
|
+
${c.cyan('║')} ${c.dim(`v${version}`)} ${c.cyan('║')}
|
|
45
49
|
${c.cyan('╚════════════════════════════════════════════════════════════════════════════╝')}
|
|
46
50
|
`;
|
|
51
|
+
}
|
|
47
52
|
|
|
48
53
|
// ── Tool definitions ─────────────────────────────────────────────────────────
|
|
49
54
|
const TOOLS = [
|
|
@@ -164,8 +169,9 @@ async function handleUninstall() {
|
|
|
164
169
|
async function main() {
|
|
165
170
|
const { intro, outro, select, multiselect, spinner, confirm, isCancel } = await clack();
|
|
166
171
|
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
const version = readPackageVersion(ROOT); // after a self-update this is the NEW version
|
|
173
|
+
console.log(banner(version));
|
|
174
|
+
intro(c.bold(`bigpowers v${version}`));
|
|
169
175
|
|
|
170
176
|
// ── Step 0: Detect existing install ────────────────────────────────────
|
|
171
177
|
const hasExisting = detectExistingInstall();
|
package/package.json
CHANGED