bigpowers 2.61.4 → 2.63.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.
package/.pi/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.61.4",
3
+ "version": "2.63.0",
4
4
  "description": "74 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -68,7 +68,7 @@ Run this self-review before asking anyone else to look at the code. The goal is
68
68
  - [ ] Every new function has at least one test
69
69
  - [ ] Every bug fix has a regression test
70
70
  - [ ] Tests verify behavior through public interfaces (not implementation details)
71
- - [ ] Tests are F.I.R.S.T compliant (use `enforce-first` if unsure)
71
+ - [ ] Tests are F.I.R.S.T compliant (per CONVENTIONS.md §Tests; use `enforce-first` if unsure)
72
72
 
73
73
  ### SOLID and Heuristics
74
74
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Validating, Timely) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or "test quality".
2
+ description: Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or "test quality".
3
3
  ---
4
4
 
5
5
 
@@ -7,7 +7,7 @@ description: Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeata
7
7
  > **HARD GATE** — **HARD GATE** — Before shipping, ALL enforcement checks must pass: lint, typecheck, tests, coverage gates. Do NOT disable or skip checks to get to green.
8
8
 
9
9
 
10
- Apply the F.I.R.S.T rubric (Uncle Bob, Clean Code Chapter 9) to evaluate and improve tests.
10
+ Apply the F.I.R.S.T rubric per CONVENTIONS.md §Tests to evaluate and improve tests.
11
11
 
12
12
  This skill is typically invoked internally by `develop-tdd` during the test-writing phase. It can also be run standalone on an existing test suite.
13
13
 
@@ -18,58 +18,15 @@ This skill is typically invoked internally by `develop-tdd` during the test-writ
18
18
 
19
19
  ## The F.I.R.S.T Rubric
20
20
 
21
- ### F — Fast
21
+ The canonical F.I.R.S.T definition lives in CONVENTIONS.md §Tests. This skill operationalizes each criterion:
22
22
 
23
- Tests must run quickly. Slow tests don't get run. They don't get trusted.
23
+ - **F (Fast):** No real I/O; suite target < 30s
24
+ - **I (Independent):** No shared state; any order, same result
25
+ - **R (Repeatable):** No machine deps; passes identically on CI and locally
26
+ - **S (Self-Validating):** Assertions, not console.log; descriptive failures
27
+ - **T (Timely):** Written with code; regression tests for every fix
24
28
 
25
- - [ ] No real network calls (use fakes/stubs for external I/O)
26
- - [ ] No real database (use in-memory or transaction-rollback strategies)
27
- - [ ] No `sleep` or arbitrary timeouts in test code
28
- - [ ] The full suite runs in under 30 seconds (target; adjust to project size)
29
-
30
- **Fix:** Replace slow I/O with named fake classes. Never inline anonymous stubs.
31
-
32
- ### I — Independent
33
-
34
- Tests must not depend on each other. Running in any order must produce the same result.
35
-
36
- - [ ] No shared mutable state between tests
37
- - [ ] Each test sets up its own data and tears it down
38
- - [ ] No test assumes another test ran first
39
- - [ ] Tests can be run individually (e.g. `npm test -- mytest.test.ts`) and pass
40
-
41
- **Fix:** Move setup into `beforeEach`. Use factory functions to build test data.
42
-
43
- ### R — Repeatable
44
-
45
- Tests must pass consistently in any environment.
46
-
47
- - [ ] No dependency on machine-specific paths, ports, or environment variables (unless explicitly injected)
48
- - [ ] No dependency on current time without mocking the clock
49
- - [ ] No flakiness — a test that sometimes fails is worse than no test
50
- - [ ] Tests pass on CI the same way they pass locally
51
-
52
- **Fix:** Inject time, randomness, and environment as parameters. Pin seeds for anything random.
53
-
54
- ### S — Self-Validating
55
-
56
- Tests must report pass or fail automatically. No human inspection required.
57
-
58
- - [ ] Tests use assertions (`expect`, `assert`, etc.) — not just `console.log`
59
- - [ ] Failure messages are descriptive enough to diagnose without reading the test body
60
- - [ ] No tests that "pass" by default when the feature is broken
61
-
62
- **Fix:** Add assertion messages. Use matchers that describe the expected behavior.
63
-
64
- ### T — Timely
65
-
66
- Tests must be written at the right time — before or immediately with the code they test.
67
-
68
- - [ ] Tests are written in the same commit as the code (or the commit before, if TDD)
69
- - [ ] No "I'll add tests later" patterns
70
- - [ ] Bug fixes include a regression test that would have caught the bug
71
-
72
- **Fix:** Run `develop-tdd` — it enforces the timely principle by design.
29
+ For the full rubric with checklists and fix patterns, see CONVENTIONS.md §Tests.
73
30
 
74
31
  ## Applying the rubric
75
32
 
@@ -28,6 +28,8 @@ Ask the user these questions (one at a time, wait for each answer):
28
28
  5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
29
29
  6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
30
30
  7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
31
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
32
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
31
33
 
32
34
  ## Generate files
33
35
 
@@ -130,3 +132,34 @@ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-speci
130
132
  ## Stack profile fragments
131
133
 
132
134
  If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.
135
+
136
+ ## Local tool wiring (optional interview step 8)
137
+
138
+ Offered after the standard interview. Covers the two tools that global install (`scripts/install.sh`) structurally cannot reach because they read project-root config, not global paths.
139
+
140
+ ### Cursor — project-local `.cursor/rules` symlink
141
+
142
+ ```bash
143
+ # From the project root:
144
+ ln -sfn <bigpowers-install-path>/.cursor/rules .cursor/rules
145
+ ```
146
+
147
+ Cursor reads `.cursor/rules/` from the project root. This symlink gives every project access to bigpowers skills as Cursor rules without duplicating the files. Run once per project.
148
+
149
+ ### OpenCode — project-local `opencode.json` + `AGENTS.md`
150
+
151
+ `opencode.json` (project root):
152
+ ```json
153
+ {
154
+ "$schema": "https://opencode.ai/config.json",
155
+ "instructions": [".cursor/rules/*.mdc", "AGENTS.md"]
156
+ }
157
+ ```
158
+
159
+ OpenCode reads `opencode.json` from the project root, NOT from a global path. The `instructions` array points to the local `.cursor/rules` symlink (from the Cursor step above) and the project's `AGENTS.md`. Both must exist in the project for OpenCode to see bigpowers skills.
160
+
161
+ `AGENTS.md` is already generated by the standard interview (step 2 of Generate Files). When local tool wiring is opted in, ensure `AGENTS.md` includes the standard agent-config template header `# [Project Name] — OpenCode`.
162
+
163
+ ### When to offer
164
+
165
+ Only offer local tool wiring when the user's project will be opened in Cursor or OpenCode. These tools are project-root scoped by design — no global installer can solve them. Global install (`install.sh`) already handles Claude Code, Gemini CLI, and pi globally. Do not offer for tools that read global config.
@@ -70,7 +70,7 @@ Run this self-review before asking anyone else to look at the code. The goal is
70
70
  - [ ] Every new function has at least one test
71
71
  - [ ] Every bug fix has a regression test
72
72
  - [ ] Tests verify behavior through public interfaces (not implementation details)
73
- - [ ] Tests are F.I.R.S.T compliant (use `enforce-first` if unsure)
73
+ - [ ] Tests are F.I.R.S.T compliant (per CONVENTIONS.md §Tests; use `enforce-first` if unsure)
74
74
 
75
75
  ### SOLID and Heuristics
76
76
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: enforce-first
3
- description: "Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Validating, Timely) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\"."
3
+ description: "Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\"."
4
4
  model: haiku
5
5
  ---
6
6
 
@@ -9,7 +9,7 @@ model: haiku
9
9
  > **HARD GATE** — **HARD GATE** — Before shipping, ALL enforcement checks must pass: lint, typecheck, tests, coverage gates. Do NOT disable or skip checks to get to green.
10
10
 
11
11
 
12
- Apply the F.I.R.S.T rubric (Uncle Bob, Clean Code Chapter 9) to evaluate and improve tests.
12
+ Apply the F.I.R.S.T rubric per CONVENTIONS.md §Tests to evaluate and improve tests.
13
13
 
14
14
  This skill is typically invoked internally by `develop-tdd` during the test-writing phase. It can also be run standalone on an existing test suite.
15
15
 
@@ -20,58 +20,15 @@ This skill is typically invoked internally by `develop-tdd` during the test-writ
20
20
 
21
21
  ## The F.I.R.S.T Rubric
22
22
 
23
- ### F — Fast
23
+ The canonical F.I.R.S.T definition lives in CONVENTIONS.md §Tests. This skill operationalizes each criterion:
24
24
 
25
- Tests must run quickly. Slow tests don't get run. They don't get trusted.
25
+ - **F (Fast):** No real I/O; suite target < 30s
26
+ - **I (Independent):** No shared state; any order, same result
27
+ - **R (Repeatable):** No machine deps; passes identically on CI and locally
28
+ - **S (Self-Validating):** Assertions, not console.log; descriptive failures
29
+ - **T (Timely):** Written with code; regression tests for every fix
26
30
 
27
- - [ ] No real network calls (use fakes/stubs for external I/O)
28
- - [ ] No real database (use in-memory or transaction-rollback strategies)
29
- - [ ] No `sleep` or arbitrary timeouts in test code
30
- - [ ] The full suite runs in under 30 seconds (target; adjust to project size)
31
-
32
- **Fix:** Replace slow I/O with named fake classes. Never inline anonymous stubs.
33
-
34
- ### I — Independent
35
-
36
- Tests must not depend on each other. Running in any order must produce the same result.
37
-
38
- - [ ] No shared mutable state between tests
39
- - [ ] Each test sets up its own data and tears it down
40
- - [ ] No test assumes another test ran first
41
- - [ ] Tests can be run individually (e.g. `npm test -- mytest.test.ts`) and pass
42
-
43
- **Fix:** Move setup into `beforeEach`. Use factory functions to build test data.
44
-
45
- ### R — Repeatable
46
-
47
- Tests must pass consistently in any environment.
48
-
49
- - [ ] No dependency on machine-specific paths, ports, or environment variables (unless explicitly injected)
50
- - [ ] No dependency on current time without mocking the clock
51
- - [ ] No flakiness — a test that sometimes fails is worse than no test
52
- - [ ] Tests pass on CI the same way they pass locally
53
-
54
- **Fix:** Inject time, randomness, and environment as parameters. Pin seeds for anything random.
55
-
56
- ### S — Self-Validating
57
-
58
- Tests must report pass or fail automatically. No human inspection required.
59
-
60
- - [ ] Tests use assertions (`expect`, `assert`, etc.) — not just `console.log`
61
- - [ ] Failure messages are descriptive enough to diagnose without reading the test body
62
- - [ ] No tests that "pass" by default when the feature is broken
63
-
64
- **Fix:** Add assertion messages. Use matchers that describe the expected behavior.
65
-
66
- ### T — Timely
67
-
68
- Tests must be written at the right time — before or immediately with the code they test.
69
-
70
- - [ ] Tests are written in the same commit as the code (or the commit before, if TDD)
71
- - [ ] No "I'll add tests later" patterns
72
- - [ ] Bug fixes include a regression test that would have caught the bug
73
-
74
- **Fix:** Run `develop-tdd` — it enforces the timely principle by design.
31
+ For the full rubric with checklists and fix patterns, see CONVENTIONS.md §Tests.
75
32
 
76
33
  ## Applying the rubric
77
34
 
@@ -30,6 +30,8 @@ Ask the user these questions (one at a time, wait for each answer):
30
30
  5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
31
31
  6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
32
32
  7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
33
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
34
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
33
35
 
34
36
  ## Generate files
35
37
 
@@ -132,3 +134,34 @@ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-speci
132
134
  ## Stack profile fragments
133
135
 
134
136
  If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.
137
+
138
+ ## Local tool wiring (optional interview step 8)
139
+
140
+ Offered after the standard interview. Covers the two tools that global install (`scripts/install.sh`) structurally cannot reach because they read project-root config, not global paths.
141
+
142
+ ### Cursor — project-local `.cursor/rules` symlink
143
+
144
+ ```bash
145
+ # From the project root:
146
+ ln -sfn <bigpowers-install-path>/.cursor/rules .cursor/rules
147
+ ```
148
+
149
+ Cursor reads `.cursor/rules/` from the project root. This symlink gives every project access to bigpowers skills as Cursor rules without duplicating the files. Run once per project.
150
+
151
+ ### OpenCode — project-local `opencode.json` + `AGENTS.md`
152
+
153
+ `opencode.json` (project root):
154
+ ```json
155
+ {
156
+ "$schema": "https://opencode.ai/config.json",
157
+ "instructions": [".cursor/rules/*.mdc", "AGENTS.md"]
158
+ }
159
+ ```
160
+
161
+ OpenCode reads `opencode.json` from the project root, NOT from a global path. The `instructions` array points to the local `.cursor/rules` symlink (from the Cursor step above) and the project's `AGENTS.md`. Both must exist in the project for OpenCode to see bigpowers skills.
162
+
163
+ `AGENTS.md` is already generated by the standard interview (step 2 of Generate Files). When local tool wiring is opted in, ensure `AGENTS.md` includes the standard agent-config template header `# [Project Name] — OpenCode`.
164
+
165
+ ### When to offer
166
+
167
+ Only offer local tool wiring when the user's project will be opened in Cursor or OpenCode. These tools are project-root scoped by design — no global installer can solve them. Global install (`install.sh`) already handles Claude Code, Gemini CLI, and pi globally. Do not offer for tools that read global config.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.63.0](https://github.com/danielvm-git/bigpowers/compare/v2.62.0...v2.63.0) (2026-07-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * **e47:** cross-tool skill distribution — pi install, seed wiring, docs, verify harness ([27c68b4](https://github.com/danielvm-git/bigpowers/commit/27c68b49b698e994b783abc85c3750637061664e))
7
+
8
+ # [2.62.0](https://github.com/danielvm-git/bigpowers/compare/v2.61.4...v2.62.0) (2026-07-05)
9
+
10
+
11
+ ### Features
12
+
13
+ * **install:** add pi global install support, remove broken OpenCode step ([d91c86e](https://github.com/danielvm-git/bigpowers/commit/d91c86e46fd85d8fe6a7013484f4dd5ce6bc201f))
14
+
1
15
  ## [2.61.4](https://github.com/danielvm-git/bigpowers/compare/v2.61.3...v2.61.4) (2026-07-04)
2
16
 
3
17
 
package/SKILL-INDEX.md CHANGED
@@ -70,7 +70,7 @@
70
70
  | 42 | Build | `wire-observability` | Add structured JSON logging, observability commands, and idempotent setup script | ✅ Active |
71
71
  | 43 | Verify | `audit-code` | Self-review checklist for the coding agent to run before dispatching a reviewer. | ✅ Active |
72
72
  | 44 | Verify | `diagnose-root` | Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify. Use | ✅ Active |
73
- | 45 | Verify | `enforce-first` | Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Val | ✅ Active |
73
+ | 45 | Verify | `enforce-first` | Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test s | ✅ Active |
74
74
  | 46 | Verify | `fix-bug` | Bug fix orchestrator — active_flow fix_bug; reads specs/bugs/BUG-*.md; chains | ✅ Active |
75
75
  | 47 | Verify | `inspect-quality` | Interactive QA session where user reports bugs or issues conversationally, and t | ✅ Active |
76
76
  | 48 | Verify | `investigate-bug` | Investigate a bug or issue by exploring the codebase to find root cause, then wr | ✅ Active |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.61.4",
3
+ "version": "2.63.0",
4
4
  "description": "73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,8 +4,8 @@
4
4
  # Supported tools:
5
5
  # Claude Code → ~/.claude/skills/<name>/ (one symlink per skill)
6
6
  # Gemini CLI → ~/.gemini/extensions/bigpowers/ (one dir symlink)
7
+ # pi → ~/.pi/agent/skills/<name>/ (one symlink per skill)
7
8
  # Cursor → ~/.cursor/rules/ (one dir symlink; per-project note printed)
8
- # OpenCode → instructions printed (no standard global path)
9
9
  #
10
10
  # Usage:
11
11
  # ./scripts/install.sh # install
@@ -195,28 +195,33 @@ uninstall_cursor() {
195
195
  unlink_if_managed "$CURSOR_RULES_DST" "$REPO_ROOT/"
196
196
  }
197
197
 
198
- # ── OpenCode ──────────────────────────────────────────────────────────────────
199
-
200
- install_opencode() {
201
- local opencode_config="$REPO_ROOT/opencode.json"
202
- if [[ ! -f "$opencode_config" ]]; then
203
- echo "Creating opencode.json..."
204
- {
205
- echo "{"
206
- echo " \"\$schema\": \"https://opencode.ai/config.json\","
207
- echo " \"instructions\": [\".cursor/rules/*.mdc\"]"
208
- echo "}"
209
- } > "$opencode_config"
210
- else
211
- echo "opencode.json already exists, skipping."
212
- fi
198
+ # ── pi ────────────────────────────────────────────────────────────────────────
199
+
200
+ PI_CONFIG_DIR="$HOME/.pi"
201
+ PI_SKILLS_DIR="$PI_CONFIG_DIR/agent/skills"
202
+
203
+ install_pi() {
204
+ echo ""
205
+ echo "pi → $PI_SKILLS_DIR/"
206
+ local count=0
207
+ for skill_dir in "$SKILLS_ROOT"/*/; do
208
+ [[ -f "$skill_dir/SKILL.md" ]] || continue
209
+ local name; name="$(basename "$skill_dir")"
210
+ link "$skill_dir" "$PI_SKILLS_DIR/$name"
211
+ count=$((count + 1))
212
+ done
213
+ echo " $count skills installed"
213
214
  }
214
215
 
215
- print_opencode_instructions() {
216
+ uninstall_pi() {
216
217
  echo ""
217
- echo "OpenCode — integration active:"
218
- echo " - opencode.json created (points to .cursor/rules/*.mdc)"
219
- echo " - Add AGENTS.md for project-specific rules if needed"
218
+ echo "pi → removing management from $PI_CONFIG_DIR/"
219
+ if [[ -d "$PI_SKILLS_DIR" ]]; then
220
+ for dst in "$PI_SKILLS_DIR"/*/; do
221
+ [[ -L "${dst%/}" ]] || continue
222
+ unlink_if_managed "${dst%/}" "$REPO_ROOT/"
223
+ done
224
+ fi
220
225
  }
221
226
 
222
227
  # ── main ──────────────────────────────────────────────────────────────────────
@@ -228,15 +233,15 @@ $UNINSTALL && echo "(uninstall mode)"
228
233
  if $UNINSTALL; then
229
234
  uninstall_claude
230
235
  uninstall_gemini
236
+ uninstall_pi
231
237
  uninstall_cursor
232
238
  echo ""
233
239
  echo "bigpowers uninstalled."
234
240
  else
235
241
  install_claude
236
242
  install_gemini
243
+ install_pi
237
244
  install_cursor
238
- install_opencode
239
- print_opencode_instructions
240
245
  echo ""
241
246
  echo "bigpowers installed. Future updates:"
242
247
  if [[ -d "$REPO_ROOT/.git" ]]; then
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env bash
2
+ # story: e28s01
3
+ # scripts/lib/skill-common.sh — Shared bash library for skill pipeline scripts
4
+ # Provides: resolve_repo_root, parse_frontmatter, iterate_skills
5
+ # Safe to source under set -euo pipefail; double-source is a no-op.
6
+
7
+ # Double-source guard
8
+ if [[ -n "${_SKILL_COMMON_SOURCED:-}" ]]; then
9
+ return 0
10
+ fi
11
+ _SKILL_COMMON_SOURCED=1
12
+
13
+ # ── resolve_repo_root ───────────────────────────────────────────────
14
+ # Resolves REPO_ROOT to the repository root (two levels up from this
15
+ # library at scripts/lib/skill-common.sh). Also sets SKILLS_ROOT:
16
+ # skills/ subdirectory when it exists, repo root fallback.
17
+ resolve_repo_root() {
18
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
19
+ SKILLS_ROOT="$REPO_ROOT"
20
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
21
+ }
22
+
23
+ # Resolve at source time so callers don't need to
24
+ resolve_repo_root
25
+
26
+ # ── parse_frontmatter ───────────────────────────────────────────────
27
+ # Usage: parse_frontmatter <SKILL.md>
28
+ # Extracts YAML frontmatter into globals: _PF_NAME, _PF_MODEL, _PF_DESCRIPTION
29
+ # Returns 0 on success, non-zero if file missing or no name in frontmatter.
30
+ parse_frontmatter() {
31
+ local file="$1"
32
+ _PF_NAME=""
33
+ _PF_MODEL=""
34
+ _PF_DESCRIPTION=""
35
+
36
+ if [[ ! -f "$file" ]]; then
37
+ echo "parse_frontmatter: file not found: $file" >&2
38
+ return 1
39
+ fi
40
+
41
+ # Verify YAML frontmatter exists (at least one --- delimiter)
42
+ if ! grep -q '^---$' "$file"; then
43
+ echo "parse_frontmatter: no YAML frontmatter in $file" >&2
44
+ return 1
45
+ fi
46
+
47
+ # Extract name (single-line, first match in frontmatter)
48
+ _PF_NAME=$(awk '/^---/{f++} f==1 && /^name:/{print; exit}' "$file" | sed 's/^name:[[:space:]]*//')
49
+
50
+ # Extract model (single-line, first match in frontmatter)
51
+ _PF_MODEL=$(awk '/^---/{f++} f==1 && /^model:/{print; exit}' "$file" | sed 's/^model:[[:space:]]*//')
52
+
53
+ # Extract description (potentially multiline, from "description:" to next YAML key or closing ---)
54
+ _PF_DESCRIPTION=$(awk '/^---/{f++; next} f==1 && /^description:/{p=1; sub(/^description:[[:space:]]*/,""); print; next} f==1 && p && /^[a-z]+:/{exit} f==1 && p{print}' "$file" \
55
+ | tr -d '\n' \
56
+ | sed -E 's/[[:space:]]+/ /g')
57
+
58
+ [[ -z "$_PF_NAME" ]] && return 1
59
+ return 0
60
+ }
61
+
62
+ # ── iterate_skills ──────────────────────────────────────────────────
63
+ # Usage: iterate_skills
64
+ # Outputs one absolute path per skill directory under SKILLS_ROOT that
65
+ # contains a SKILL.md file, in stable sorted order (no trailing slash).
66
+ iterate_skills() {
67
+ local dir
68
+ for dir in "$SKILLS_ROOT"/*/; do
69
+ [[ -d "$dir" ]] || continue
70
+ [[ -f "$dir/SKILL.md" ]] || continue
71
+ echo "${dir%/}"
72
+ done
73
+ }
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env bash
2
+ # story: e47s04
3
+ # verify-install.sh — manual assertion harness for install + seed wiring
4
+ set -euo pipefail
5
+
6
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
7
+ PASS=0
8
+ FAIL=0
9
+ TMPDIR=""
10
+
11
+ cleanup() { [[ -n "$TMPDIR" && -d "$TMPDIR" ]] && rm -rf "$TMPDIR"; }
12
+ trap cleanup EXIT
13
+
14
+ pass() { echo " PASS $1"; PASS=$((PASS + 1)); }
15
+ fail() { echo " FAIL $1"; FAIL=$((FAIL + 1)); }
16
+
17
+ echo "=== install.sh --dry-run ==="
18
+ DRY_OUT="$("$REPO_ROOT/scripts/install.sh" --dry-run 2>&1)"
19
+
20
+ echo "$DRY_OUT" | grep -q 'pi →' && pass "install --dry-run includes pi" || fail "install --dry-run missing pi"
21
+ DRY_UNINSTALL="$("$REPO_ROOT/scripts/install.sh" --dry-run --uninstall 2>&1)"
22
+ echo "$DRY_UNINSTALL" | grep -q 'pi →' && pass "uninstall --dry-run includes pi" || fail "uninstall --dry-run missing pi"
23
+ echo "$DRY_OUT" | grep -qi 'opencode' && fail "install references opencode" || pass "install has no opencode reference"
24
+ echo "$DRY_OUT" | grep -q 'Claude Code →' && pass "install includes Claude Code" || fail "install missing Claude Code"
25
+ echo "$DRY_OUT" | grep -q 'Gemini CLI →' && pass "install includes Gemini CLI" || fail "install missing Gemini CLI"
26
+ echo "$DRY_OUT" | grep -q 'Cursor →' && pass "install includes Cursor" || fail "install missing Cursor"
27
+
28
+ for tool in "Claude Code" "pi"; do
29
+ # Find the skills count in the tool's section (between this tool header and next section)
30
+ section=$(echo "$DRY_OUT" | sed -n "/${tool} →/,/^$/p")
31
+ count=$(echo "$section" | grep -o '[0-9]\+ skills installed' | grep -o '[0-9]\+' || echo "0")
32
+ [[ "$count" -gt 0 ]] && pass "${tool}: $count skills" || fail "${tool}: 0 skills"
33
+ done
34
+
35
+ echo ""
36
+ echo "=== seed-conventions local wiring ==="
37
+ grep -qi 'local tool wiring' "$REPO_ROOT/skills/seed-conventions/SKILL.md" && pass "SKILL.md: local tool wiring" || fail "SKILL.md: missing local tool wiring"
38
+ grep -qi 'opencode.json' "$REPO_ROOT/skills/seed-conventions/REFERENCE.md" && pass "REFERENCE.md: opencode.json" || fail "REFERENCE.md: missing opencode.json"
39
+ grep -qi 'cursor/rules' "$REPO_ROOT/skills/seed-conventions/REFERENCE.md" && pass "REFERENCE.md: Cursor symlink" || fail "REFERENCE.md: missing Cursor symlink"
40
+
41
+ OPENCODE_JSON=$(sed -n '/```json/,/```/p' "$REPO_ROOT/skills/seed-conventions/REFERENCE.md" | grep -v '```' || true)
42
+ if [[ -n "$OPENCODE_JSON" ]]; then
43
+ TMPDIR=$(mktemp -d)
44
+ echo "$OPENCODE_JSON" > "$TMPDIR/test-opencode.json"
45
+ jq empty "$TMPDIR/test-opencode.json" 2>/dev/null && pass "opencode.json valid JSON" || fail "opencode.json NOT valid JSON"
46
+ else
47
+ fail "opencode.json template not found"
48
+ fi
49
+
50
+ echo ""
51
+ echo "=== install.sh source ==="
52
+ grep -q 'install_pi()' "$REPO_ROOT/scripts/install.sh" && pass "source: install_pi()" || fail "source: missing install_pi()"
53
+ grep -q 'uninstall_pi()' "$REPO_ROOT/scripts/install.sh" && pass "source: uninstall_pi()" || fail "source: missing uninstall_pi()"
54
+ grep -q 'PI_SKILLS_DIR="$PI_CONFIG_DIR/agent/skills"' "$REPO_ROOT/scripts/install.sh" && pass "source: targets ~/.pi/agent/skills/" || fail "source: wrong pi target"
55
+ ! grep -q 'install_opencode\|print_opencode_instructions' "$REPO_ROOT/scripts/install.sh" && pass "source: no opencode functions" || fail "source: opencode functions remain"
56
+
57
+ echo ""
58
+ echo "──────────────────────────────────────────"
59
+ echo "verify-install: $PASS passed, $FAIL failed"
60
+ [[ "$FAIL" -gt 0 ]] && { echo "Overall: fail"; exit 1; } || echo "Overall: pass"
@@ -70,7 +70,7 @@ Run this self-review before asking anyone else to look at the code. The goal is
70
70
  - [ ] Every new function has at least one test
71
71
  - [ ] Every bug fix has a regression test
72
72
  - [ ] Tests verify behavior through public interfaces (not implementation details)
73
- - [ ] Tests are F.I.R.S.T compliant (use `enforce-first` if unsure)
73
+ - [ ] Tests are F.I.R.S.T compliant (per CONVENTIONS.md §Tests; use `enforce-first` if unsure)
74
74
 
75
75
  ### SOLID and Heuristics
76
76
 
@@ -2,14 +2,14 @@
2
2
  name: enforce-first
3
3
  model: haiku
4
4
  effort: standard
5
- description: Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Validating, Timely) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or "test quality".
5
+ description: Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or "test quality".
6
6
  ---
7
7
 
8
8
  # Enforce FIRST
9
9
  > **HARD GATE** — **HARD GATE** — Before shipping, ALL enforcement checks must pass: lint, typecheck, tests, coverage gates. Do NOT disable or skip checks to get to green.
10
10
 
11
11
 
12
- Apply the F.I.R.S.T rubric (Uncle Bob, Clean Code Chapter 9) to evaluate and improve tests.
12
+ Apply the F.I.R.S.T rubric per CONVENTIONS.md §Tests to evaluate and improve tests.
13
13
 
14
14
  This skill is typically invoked internally by `develop-tdd` during the test-writing phase. It can also be run standalone on an existing test suite.
15
15
 
@@ -20,58 +20,15 @@ This skill is typically invoked internally by `develop-tdd` during the test-writ
20
20
 
21
21
  ## The F.I.R.S.T Rubric
22
22
 
23
- ### F — Fast
23
+ The canonical F.I.R.S.T definition lives in CONVENTIONS.md §Tests. This skill operationalizes each criterion:
24
24
 
25
- Tests must run quickly. Slow tests don't get run. They don't get trusted.
25
+ - **F (Fast):** No real I/O; suite target < 30s
26
+ - **I (Independent):** No shared state; any order, same result
27
+ - **R (Repeatable):** No machine deps; passes identically on CI and locally
28
+ - **S (Self-Validating):** Assertions, not console.log; descriptive failures
29
+ - **T (Timely):** Written with code; regression tests for every fix
26
30
 
27
- - [ ] No real network calls (use fakes/stubs for external I/O)
28
- - [ ] No real database (use in-memory or transaction-rollback strategies)
29
- - [ ] No `sleep` or arbitrary timeouts in test code
30
- - [ ] The full suite runs in under 30 seconds (target; adjust to project size)
31
-
32
- **Fix:** Replace slow I/O with named fake classes. Never inline anonymous stubs.
33
-
34
- ### I — Independent
35
-
36
- Tests must not depend on each other. Running in any order must produce the same result.
37
-
38
- - [ ] No shared mutable state between tests
39
- - [ ] Each test sets up its own data and tears it down
40
- - [ ] No test assumes another test ran first
41
- - [ ] Tests can be run individually (e.g. `npm test -- mytest.test.ts`) and pass
42
-
43
- **Fix:** Move setup into `beforeEach`. Use factory functions to build test data.
44
-
45
- ### R — Repeatable
46
-
47
- Tests must pass consistently in any environment.
48
-
49
- - [ ] No dependency on machine-specific paths, ports, or environment variables (unless explicitly injected)
50
- - [ ] No dependency on current time without mocking the clock
51
- - [ ] No flakiness — a test that sometimes fails is worse than no test
52
- - [ ] Tests pass on CI the same way they pass locally
53
-
54
- **Fix:** Inject time, randomness, and environment as parameters. Pin seeds for anything random.
55
-
56
- ### S — Self-Validating
57
-
58
- Tests must report pass or fail automatically. No human inspection required.
59
-
60
- - [ ] Tests use assertions (`expect`, `assert`, etc.) — not just `console.log`
61
- - [ ] Failure messages are descriptive enough to diagnose without reading the test body
62
- - [ ] No tests that "pass" by default when the feature is broken
63
-
64
- **Fix:** Add assertion messages. Use matchers that describe the expected behavior.
65
-
66
- ### T — Timely
67
-
68
- Tests must be written at the right time — before or immediately with the code they test.
69
-
70
- - [ ] Tests are written in the same commit as the code (or the commit before, if TDD)
71
- - [ ] No "I'll add tests later" patterns
72
- - [ ] Bug fixes include a regression test that would have caught the bug
73
-
74
- **Fix:** Run `develop-tdd` — it enforces the timely principle by design.
31
+ For the full rubric with checklists and fix patterns, see CONVENTIONS.md §Tests.
75
32
 
76
33
  ## Applying the rubric
77
34
 
@@ -61,3 +61,34 @@ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-speci
61
61
  ## Stack profile fragments
62
62
 
63
63
  If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.
64
+
65
+ ## Local tool wiring (optional interview step 8)
66
+
67
+ Offered after the standard interview. Covers the two tools that global install (`scripts/install.sh`) structurally cannot reach because they read project-root config, not global paths.
68
+
69
+ ### Cursor — project-local `.cursor/rules` symlink
70
+
71
+ ```bash
72
+ # From the project root:
73
+ ln -sfn <bigpowers-install-path>/.cursor/rules .cursor/rules
74
+ ```
75
+
76
+ Cursor reads `.cursor/rules/` from the project root. This symlink gives every project access to bigpowers skills as Cursor rules without duplicating the files. Run once per project.
77
+
78
+ ### OpenCode — project-local `opencode.json` + `AGENTS.md`
79
+
80
+ `opencode.json` (project root):
81
+ ```json
82
+ {
83
+ "$schema": "https://opencode.ai/config.json",
84
+ "instructions": [".cursor/rules/*.mdc", "AGENTS.md"]
85
+ }
86
+ ```
87
+
88
+ OpenCode reads `opencode.json` from the project root, NOT from a global path. The `instructions` array points to the local `.cursor/rules` symlink (from the Cursor step above) and the project's `AGENTS.md`. Both must exist in the project for OpenCode to see bigpowers skills.
89
+
90
+ `AGENTS.md` is already generated by the standard interview (step 2 of Generate Files). When local tool wiring is opted in, ensure `AGENTS.md` includes the standard agent-config template header `# [Project Name] — OpenCode`.
91
+
92
+ ### When to offer
93
+
94
+ Only offer local tool wiring when the user's project will be opened in Cursor or OpenCode. These tools are project-root scoped by design — no global installer can solve them. Global install (`install.sh`) already handles Claude Code, Gemini CLI, and pi globally. Do not offer for tools that read global config.
@@ -30,6 +30,8 @@ Ask the user these questions (one at a time, wait for each answer):
30
30
  5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
31
31
  6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
32
32
  7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
33
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
34
+ 8. **Local tool wiring (optional)** — "Wire bigpowers skills for project-local tools that global install can't reach? (Cursor + OpenCode only)" If yes, generate the local wiring artifacts described in [REFERENCE.md](REFERENCE.md) §Local tool wiring. If no, skip — the standard seed output is unchanged.
33
35
 
34
36
  ## Generate files
35
37
 
package/skills-lock.json CHANGED
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "audit-code": {
15
15
  "description": "Self-review checklist for the coding agent to run before dispatching a reviewer. Checks CONVENTIONS.md compliance, Boy Scout Rule, test coverage, types, and SOLID. Produces a pass/fail checklist. Use before request-review, before committing, or when user asks for a code quality check.",
16
- "sha256": "d9f3ed654fdfe3dd",
16
+ "sha256": "9a4afa72a83882d6",
17
17
  "path": "skills/audit-code/SKILL.md"
18
18
  },
19
19
  "audit-plan": {
@@ -102,8 +102,8 @@
102
102
  "path": "skills/elaborate-spec/SKILL.md"
103
103
  },
104
104
  "enforce-first": {
105
- "description": "Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Validating, Timely) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\".",
106
- "sha256": "f2948df50c0add34",
105
+ "description": "Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\".",
106
+ "sha256": "20f717d0496ca20f",
107
107
  "path": "skills/enforce-first/SKILL.md"
108
108
  },
109
109
  "evolve-skill": {
@@ -278,7 +278,7 @@
278
278
  },
279
279
  "seed-conventions": {
280
280
  "description": "Generate CLAUDE.md and CONVENTIONS.md for a brand-new project through a brief interview, and create the specs/ directory with evolved bigpowers structure (product/, tech-architecture/, verifications/, epics/archive/). Entry point for greenfield projects. Use when starting a new project from scratch, when user asks to set up AI agent conventions, or when there is no CLAUDE.md yet.",
281
- "sha256": "8a0ca3ccd93f42a7",
281
+ "sha256": "eb4cbca25d54fa81",
282
282
  "path": "skills/seed-conventions/SKILL.md"
283
283
  },
284
284
  "session-state": {