bigpowers 1.0.0 → 1.1.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 (89) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/CLAUDE.md +10 -8
  3. package/CONVENTIONS.md +8 -3
  4. package/GEMINI.md +9 -8
  5. package/README.md +57 -21
  6. package/RELEASE.md +10 -0
  7. package/SKILL-INDEX.md +98 -88
  8. package/assess-impact/SKILL.md +1 -0
  9. package/audit-code/SKILL.md +18 -0
  10. package/change-request/SKILL.md +1 -0
  11. package/commit-message/SKILL.md +1 -0
  12. package/compose-workflow/REFERENCE.md +13 -0
  13. package/compose-workflow/SKILL.md +23 -0
  14. package/countable-story-format.md +1 -1
  15. package/craft-skill/REFERENCE.md +1 -1
  16. package/craft-skill/SKILL.md +6 -1
  17. package/deepen-architecture/SKILL.md +15 -2
  18. package/define-language/SKILL.md +1 -0
  19. package/define-success/SKILL.md +1 -0
  20. package/delegate-task/SKILL.md +7 -2
  21. package/design-interface/SKILL.md +1 -0
  22. package/develop-tdd/SKILL.md +10 -9
  23. package/diagnose-root/SKILL.md +22 -0
  24. package/dispatch-agents/SKILL.md +13 -3
  25. package/edit-document/SKILL.md +1 -0
  26. package/elaborate-spec/SKILL.md +1 -0
  27. package/enforce-first/SKILL.md +1 -0
  28. package/evolve-skill/REFERENCE.md +12 -0
  29. package/evolve-skill/SKILL.md +24 -0
  30. package/execute-plan/SKILL.md +12 -4
  31. package/grill-me/SKILL.md +1 -0
  32. package/grill-with-docs/REFERENCE.md +5 -0
  33. package/grill-with-docs/SKILL.md +28 -0
  34. package/guard-git/REFERENCE.md +36 -6
  35. package/guard-git/SKILL.md +5 -2
  36. package/guard-git/scripts/lib/git-guardrails-core.sh +0 -1
  37. package/hook-commits/SKILL.md +1 -0
  38. package/hooks/pre-tool-use.sh +43 -46
  39. package/inspect-quality/SKILL.md +9 -6
  40. package/investigate-bug/SKILL.md +18 -5
  41. package/kickoff-branch/SKILL.md +13 -5
  42. package/map-codebase/SKILL.md +1 -0
  43. package/migrate-spec/SKILL.md +1 -0
  44. package/model-domain/SKILL.md +10 -0
  45. package/orchestrate-project/REFERENCE.md +13 -7
  46. package/orchestrate-project/SKILL.md +7 -5
  47. package/organize-workspace/SKILL.md +1 -0
  48. package/package.json +3 -2
  49. package/plan-refactor/SKILL.md +1 -0
  50. package/plan-release/SKILL.md +1 -0
  51. package/plan-work/SKILL.md +8 -3
  52. package/profiles/node-service.md +28 -0
  53. package/profiles/solo-git.md +39 -0
  54. package/profiles/swift.md +27 -0
  55. package/profiles/typescript-vue.md +28 -0
  56. package/release-branch/SKILL.md +51 -11
  57. package/request-review/SKILL.md +2 -1
  58. package/research-first/REFERENCE.md +29 -0
  59. package/research-first/SKILL.md +31 -0
  60. package/reset-baseline/SKILL.md +21 -0
  61. package/respond-review/SKILL.md +1 -0
  62. package/run-evals/REFERENCE.md +27 -0
  63. package/run-evals/SKILL.md +27 -0
  64. package/scope-work/SKILL.md +22 -0
  65. package/scripts/add-model-frontmatter.sh +82 -0
  66. package/scripts/build-skill-index.sh +28 -0
  67. package/scripts/install.sh +5 -1
  68. package/scripts/land-branch.sh +166 -0
  69. package/scripts/sync-skills.sh +5 -0
  70. package/search-skills/SKILL.md +20 -0
  71. package/seed-conventions/SKILL.md +3 -0
  72. package/session-state/SKILL.md +25 -3
  73. package/setup-environment/SKILL.md +22 -0
  74. package/simulate-agents/SKILL.md +24 -0
  75. package/slice-tasks/SKILL.md +22 -0
  76. package/spike-prototype/SKILL.md +1 -0
  77. package/stocktake-skills/REFERENCE.md +8 -0
  78. package/stocktake-skills/SKILL.md +28 -0
  79. package/survey-context/SKILL.md +12 -11
  80. package/terse-mode/SKILL.md +1 -0
  81. package/trace-requirement/SKILL.md +1 -0
  82. package/using-bigpowers/SKILL.md +30 -4
  83. package/validate-fix/SKILL.md +9 -5
  84. package/verify-work/REFERENCE.md +23 -0
  85. package/verify-work/SKILL.md +39 -0
  86. package/visual-dashboard/SKILL.md +51 -1
  87. package/wire-observability/SKILL.md +1 -0
  88. package/write-document/REFERENCE.md +166 -0
  89. package/write-document/SKILL.md +12 -1
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: release-branch
3
+ model: haiku
3
4
  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".
4
5
  ---
5
6
 
@@ -7,7 +8,18 @@ description: Make the merge/PR/keep/discard decision for a feature branch, verif
7
8
 
8
9
  > **HARD GATE** — Do NOT merge or release if tests fail or if coverage gates are not met. If the branch is red, return to `develop-tdd` to fix regressions or add missing tests before proceeding.
9
10
 
10
- Finalize a completed feature branch: verify coverage gates, open a PR, and clean up the worktree.
11
+ Finalize a completed feature branch: verify coverage gates, integrate onto `main`, and clean up the worktree.
12
+
13
+ ## Integrate mode
14
+
15
+ Choose mode from project profile or explicit user request:
16
+
17
+ | Mode | When | Ship path |
18
+ |------|------|-----------|
19
+ | **solo-local** | `profiles/solo-git.md` or `specs/WORKFLOW-solo-git.md` active | `bash scripts/land-branch.sh <branch> "<conventional message>"` — no PR |
20
+ | **team-pr** | Default, or collaboration / remote CI required | `gh pr create` → `gh pr merge --squash` (§6–7) |
21
+
22
+ If unsure and working alone, prefer **solo-local**.
11
23
 
12
24
  ## Process
13
25
 
@@ -49,22 +61,37 @@ Confirm:
49
61
  - [ ] No secrets, credentials, or personal data in the diff
50
62
  - [ ] CONVENTIONS.md compliance across all changes
51
63
 
52
- ### 5. Decision
64
+ ### 4. Decision
53
65
 
54
66
  Present the user with the options:
55
67
 
56
68
  | Option | When to choose |
57
69
  |--------|---------------|
58
- | **Open PR for Release** | Feature is complete, tests pass, ready to trigger automated release |
70
+ | **Release (solo-local)** | Feature complete; solo profile active land via script |
71
+ | **Open PR for Release** | Feature complete; team-pr mode or remote CI gate needed |
59
72
  | **Keep branch** | More work needed; preserve for later |
60
73
  | **Discard** | Approach was wrong; start over |
61
74
 
62
- ### 6. Create PR (Triggers Automated Release)
75
+ ### 5. Solo-local integrate
76
+
77
+ From the **primary** repository root (not the feature worktree):
78
+
79
+ 1. Run `commit-message` to produce the squash commit subject.
80
+ 2. Land:
81
+
82
+ ```bash
83
+ bash scripts/land-branch.sh <task-slug> "feat(scope): description"
84
+ ```
85
+
86
+ The script will: update `main`, squash-merge, commit, push, remove worktree, delete branch, and leave you on `main`.
87
+
88
+ Skip duplicate cleanup in §8 if the script succeeded.
89
+
90
+ ### 6. Create PR (team-pr only)
63
91
 
64
92
  The PR title is the **single source of truth** for the version bump. It MUST follow Conventional Commits.
65
93
 
66
94
  ```bash
67
- # Verify PR Title first
68
95
  PR_TITLE="<type>(<scope>): <description>"
69
96
  echo "$PR_TITLE" | grep -vE "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+$" && echo "❌ ERROR: PR Title must follow Conventional Commits"
70
97
 
@@ -87,25 +114,25 @@ EOF
87
114
  )"
88
115
  ```
89
116
 
90
- ### 7. Merge (Automated)
117
+ ### 7. Merge (team-pr only)
91
118
 
92
- Wait for CI to pass. Merge using **Squash and Merge** to ensure the PR title becomes the commit message on `main`.
119
+ Wait for CI to pass. Merge using **Squash and Merge** so the PR title becomes the commit message on `main`.
93
120
 
94
121
  ```bash
95
122
  gh pr merge --squash --delete-branch
96
123
  ```
97
124
 
98
- `semantic-release` will now automatically:
125
+ `semantic-release` will automatically:
99
126
  1. Detect the commit on `main`.
100
127
  2. Determine the SemVer bump from the commit type.
101
128
  3. Tag the repo (e.g., `v2.1.0`).
102
129
  4. Generate release notes.
103
130
 
104
- ### 8. Clean up worktree (if using git worktree)
131
+ ### 8. Clean up worktree (if not done by land-branch.sh)
105
132
 
106
133
  ```bash
107
134
  # From the main repo root
108
- git worktree prune # clear stale metadata
135
+ git worktree prune
109
136
  git worktree remove ../<branch-name> 2>/dev/null || true
110
137
  git branch -d <branch-name>
111
138
  ```
@@ -113,4 +140,17 @@ git branch -d <branch-name>
113
140
  - If `git worktree remove` fails due to uncommitted changes, ask the user: "There are uncommitted changes in the worktree. Force remove? (y/n)". If yes: `git worktree remove -f ../<branch-name>`.
114
141
  - If the directory `../<branch-name>` is already missing, `git worktree remove` might fail; the `|| true` ensures the process continues to branch deletion.
115
142
 
116
- Report: "Branch released. PR: <URL>. Worktree cleaned up."
143
+ ### 9. Return to main (primary worktree)
144
+
145
+ ```bash
146
+ cd <primary-repo-root>
147
+ git checkout main # or master
148
+ git status
149
+ pwd
150
+ ```
151
+
152
+ Confirm:
153
+ - [ ] Current branch is `main` (or project default)
154
+ - [ ] cwd is the primary repository root, not `../<task-slug>`
155
+
156
+ Report: "Branch released. Integrate mode: <solo-local|team-pr>. cwd: $(pwd) on $(git branch --show-current)."
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: request-review
3
+ model: opus
3
4
  description: Dispatch a fresh reviewer agent with a clean context to critique the code after audit-code passes. The reviewer has no shared state with the coding agent and gives a genuine second opinion. Use after audit-code passes, before committing, or when user wants an independent code review.
4
5
  ---
5
6
 
@@ -21,7 +22,7 @@ Write a self-contained brief for the reviewer agent. Include:
21
22
 
22
23
  - What was built (feature description, not implementation)
23
24
  - Which files changed (the diff context)
24
- - What `specs/` artifacts are relevant (PLAN.md, DIAGNOSIS.md, SCOPE.md)
25
+ - What `specs/` artifacts are relevant (PLAN.md, bugs/BUG-*.md, SCOPE.md)
25
26
  - What CONVENTIONS.md requires
26
27
  - What the verify command is
27
28
  - What you're most uncertain about (where you want fresh eyes)
@@ -0,0 +1,29 @@
1
+ # Research First — Reference
2
+
3
+ ## Search commands
4
+
5
+ ```bash
6
+ # Repo prior art
7
+ rg -l "<keyword>" --glob '!node_modules' .
8
+ find . -maxdepth 3 -name "SKILL.md" | xargs grep -l "<intent>"
9
+
10
+ # Installed packages (if package.json exists)
11
+ cat package.json | jq '.dependencies,.devDependencies' 2>/dev/null
12
+ ```
13
+
14
+ ## Registry checklist
15
+
16
+ - [ ] npm / PyPI / crates.io (if applicable)
17
+ - [ ] Existing bigpowers skill (`bash scripts/build-skill-index.sh && rg "<intent>" specs/SKILL-SEARCH-INDEX.md`)
18
+ - [ ] Project `docs/` and `specs/adr/`
19
+ - [ ] Official library documentation (quote one API detail)
20
+
21
+ ## Prior Art template
22
+
23
+ ```markdown
24
+ ## Prior Art
25
+
26
+ | Candidate | Source | Verdict | Notes |
27
+ |-----------|--------|---------|-------|
28
+ | ... | ... | adopt/extend/compose/build | ... |
29
+ ```
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: research-first
3
+ description: Look-before-build — search registries, repo, existing skills, and web for prior art before implementing. Appends Prior Art to the spec. Use after survey-context and before elaborate-spec, when adding dependencies, or when the task may already be solved.
4
+ model: sonnet
5
+ ---
6
+
7
+ # Research First
8
+
9
+ > **HARD GATE** — Do NOT implement until prior art is searched. Minimum outcome: adopt, extend, compose, or build — with evidence.
10
+
11
+ ## Process
12
+
13
+ 1. Read `specs/SCOPE.md`, `specs/RELEASE-PLAN.md`, and the current task statement.
14
+ 2. Search in order: this repo → bigpowers skills (`search-skills`) → package registries → web docs.
15
+ 3. For each candidate: note name, URL/path, fit (adopt | extend | compose | build).
16
+ 4. Append `## Prior Art` to the active spec (SCOPE.md or story in RELEASE-PLAN.md).
17
+
18
+ ## Outcome matrix
19
+
20
+ | Verdict | Action |
21
+ |---------|--------|
22
+ | **adopt** | Use as-is; link in plan; no new code |
23
+ | **extend** | Wrap or configure existing solution |
24
+ | **compose** | Chain existing skills/modules |
25
+ | **build** | New implementation — justify why others failed |
26
+
27
+ ## Verify
28
+
29
+ → verify: `grep -c "Prior Art" specs/SCOPE.md specs/RELEASE-PLAN.md 2>/dev/null | awk '{s+=$1} END {if(s>0) print "OK"; else print "MISSING"}'`
30
+
31
+ See [REFERENCE.md](REFERENCE.md) for search commands and registry checklist.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: reset-baseline
3
+ description: Restore the project to a known clean state between agent runs or experiments. Use between benchmark runs, after a failed spike, or when user wants a clean working tree.
4
+ model: haiku
5
+ ---
6
+
7
+ # Reset Baseline
8
+
9
+ > **HARD GATE** — Confirm with user before any destructive git operation. Never `reset --hard` without explicit approval.
10
+
11
+ ## Process
12
+
13
+ 1. `git status` — list uncommitted and untracked files.
14
+ 2. Ask: stash, discard, or keep each category.
15
+ 3. Safe defaults: `git stash push -u -m "reset-baseline"` for WIP; never force-push.
16
+ 4. Re-run `setup-environment` after reset.
17
+ 5. Run test baseline from `kickoff-branch` verify command.
18
+
19
+ ## Verify
20
+
21
+ → verify: `git status --short | wc -l | awk '{if($1==0) print "OK"; else print "DIRTY:" $1}'
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: respond-review
3
+ model: sonnet
3
4
  description: Act on a reviewer agent's feedback systematically — categorize findings, apply fixes, verify tests still pass. Use after request-review returns a report, or when user wants to work through code review findings.
4
5
  ---
5
6
 
@@ -0,0 +1,27 @@
1
+ # Run Evals — Reference
2
+
3
+ ## EVALS template
4
+
5
+ ```markdown
6
+ # EVALS: <feature>
7
+
8
+ ## Capability
9
+ | ID | Eval | Grader | verify / rubric |
10
+ |----|------|--------|-----------------|
11
+ | C1 | ... | code | `verify: npm test -- <file>` |
12
+ | C2 | ... | model | Rubric: [ ] criterion A [ ] criterion B |
13
+
14
+ ## Regression
15
+ | ID | Eval | Grader | verify / rubric |
16
+ |----|------|--------|-----------------|
17
+ | R1 | Full suite passes | code | `verify: npm test` |
18
+
19
+ ## Results
20
+ | Run | C1 | C2 | R1 | pass@k |
21
+ |-----|----|----|-----|--------|
22
+ | 1 | PASS | PASS | PASS | 3/3 |
23
+ ```
24
+
25
+ ## pass@k
26
+
27
+ Run capability evals k times (default k=3). Ship when all k pass or document known flake in STATE.md.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: run-evals
3
+ description: Eval-Driven Development — define capability and regression evals before building; code graders use verify commands, model graders use explicit rubrics; log pass@k. Use before develop-tdd on new features, or when measuring agent capability over runs.
4
+ model: sonnet
5
+ ---
6
+
7
+ # Run Evals
8
+
9
+ > **HARD GATE** — Define evals before implementation. Code graders = runnable `verify:` commands; model graders = explicit rubric with pass/fail criteria.
10
+
11
+ ## Process
12
+
13
+ 1. Name the capability under test (one sentence).
14
+ 2. Write `specs/EVALS-<feature>.md` with:
15
+ - **Capability evals** (does it do the job?)
16
+ - **Regression evals** (did we break anything?)
17
+ 3. Assign grader type per eval: `code` (shell verify) or `model` (rubric).
18
+ 4. Run evals; log results table with pass@k (e.g. 3/3 runs).
19
+ 5. Block BUILD phase until capability evals pass at agreed k.
20
+
21
+ ## Artefact
22
+
23
+ `specs/EVALS-<feature>.md` — see [REFERENCE.md](REFERENCE.md) for template.
24
+
25
+ ## Verify
26
+
27
+ → verify: `ls specs/EVALS-*.md 2>/dev/null | head -1 | grep -q EVALS && echo OK || echo MISSING`
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: scope-work
3
+ description: Define what is in and out of scope for the current effort and save as specs/SCOPE.md. Use when user wants a PRD, scope definition, or before plan-release on a new initiative.
4
+ model: sonnet
5
+ ---
6
+
7
+ # Scope Work
8
+
9
+ Turn the current conversation into a bounded PRD at `specs/SCOPE.md`.
10
+
11
+ ## Process
12
+
13
+ 1. Read existing `specs/` artifacts (CONTEXT.md, RELEASE-PLAN.md if any).
14
+ 2. Interview (if needed): goal, users, in-scope, out-of-scope, constraints, success metrics.
15
+ 3. Write `specs/SCOPE.md` with: Vision, In Scope, Out of Scope, Constraints, Success Criteria.
16
+ 4. Run `research-first` if external dependencies are proposed.
17
+
18
+ > **HARD GATE** — Every "in scope" item must map to a future story ID or explicit "deferred" with reason.
19
+
20
+ ## Verify
21
+
22
+ → verify: `test -f specs/SCOPE.md && grep -c "Out of Scope" specs/SCOPE.md | awk '{if($1>0) print "OK"; else print "MISSING"}'`
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env bash
2
+ # add-model-frontmatter.sh — one-time helper; idempotent model: injection
3
+ set -euo pipefail
4
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+
6
+ declare -A MODELS=(
7
+ [using-bigpowers]=sonnet
8
+ [orchestrate-project]=sonnet
9
+ [survey-context]=haiku
10
+ [research-first]=sonnet
11
+ [elaborate-spec]=opus
12
+ [map-codebase]=sonnet
13
+ [model-domain]=sonnet
14
+ [define-language]=sonnet
15
+ [grill-me]=sonnet
16
+ [grill-with-docs]=opus
17
+ [deepen-architecture]=sonnet
18
+ [design-interface]=opus
19
+ [assess-impact]=sonnet
20
+ [change-request]=sonnet
21
+ [scope-work]=sonnet
22
+ [slice-tasks]=sonnet
23
+ [define-success]=sonnet
24
+ [plan-work]=opus
25
+ [plan-refactor]=sonnet
26
+ [plan-release]=sonnet
27
+ [spike-prototype]=sonnet
28
+ [kickoff-branch]=haiku
29
+ [guard-git]=haiku
30
+ [hook-commits]=haiku
31
+ [seed-conventions]=sonnet
32
+ [develop-tdd]=sonnet
33
+ [enforce-first]=haiku
34
+ [delegate-task]=sonnet
35
+ [dispatch-agents]=sonnet
36
+ [execute-plan]=haiku
37
+ [wire-observability]=sonnet
38
+ [verify-work]=haiku
39
+ [run-evals]=sonnet
40
+ [investigate-bug]=sonnet
41
+ [diagnose-root]=sonnet
42
+ [validate-fix]=haiku
43
+ [audit-code]=haiku
44
+ [request-review]=opus
45
+ [respond-review]=sonnet
46
+ [trace-requirement]=haiku
47
+ [commit-message]=haiku
48
+ [release-branch]=haiku
49
+ [inspect-quality]=sonnet
50
+ [organize-workspace]=haiku
51
+ [stocktake-skills]=sonnet
52
+ [evolve-skill]=opus
53
+ [terse-mode]=haiku
54
+ [craft-skill]=sonnet
55
+ [edit-document]=sonnet
56
+ [session-state]=haiku
57
+ [migrate-spec]=sonnet
58
+ [visual-dashboard]=sonnet
59
+ [write-document]=sonnet
60
+ [setup-environment]=haiku
61
+ [reset-baseline]=haiku
62
+ [search-skills]=haiku
63
+ [compose-workflow]=sonnet
64
+ [simulate-agents]=sonnet
65
+ )
66
+
67
+ for skill_dir in "$REPO_ROOT"/*/; do
68
+ skill_md="$skill_dir/SKILL.md"
69
+ [[ -f "$skill_md" ]] || continue
70
+ name=$(basename "$skill_dir")
71
+ model="${MODELS[$name]:-sonnet}"
72
+ if grep -q '^model:' "$skill_md" 2>/dev/null; then
73
+ continue
74
+ fi
75
+ # Insert model: after name: line in frontmatter
76
+ awk -v m="$model" '
77
+ /^---$/ { fm++; print; next }
78
+ fm==1 && /^name:/ { print; print "model: " m; next }
79
+ { print }
80
+ ' "$skill_md" > "$skill_md.tmp" && mv "$skill_md.tmp" "$skill_md"
81
+ echo "model: $model → $name"
82
+ done
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env bash
2
+ # build-skill-index.sh — lexical index for search-skills (zero embedding deps)
3
+ set -euo pipefail
4
+
5
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
+ OUT="$REPO_ROOT/specs/SKILL-SEARCH-INDEX.md"
7
+ mkdir -p "$(dirname "$OUT")"
8
+
9
+ {
10
+ echo "# Skill Search Index (auto-generated)"
11
+ echo ""
12
+ echo "Regenerate: \`bash scripts/build-skill-index.sh\`"
13
+ echo ""
14
+ echo "| name | model | description |"
15
+ echo "|------|-------|-------------|"
16
+ for skill_dir in "$REPO_ROOT"/*/; do
17
+ skill_md="$skill_dir/SKILL.md"
18
+ [[ -f "$skill_md" ]] || continue
19
+ name=$(awk '/^---/{f++} f==1 && /^name:/{print; exit}' "$skill_md" | sed 's/^name:[[:space:]]*//')
20
+ model=$(awk '/^---/{f++} f==1 && /^model:/{print; exit}' "$skill_md" | sed 's/^model:[[:space:]]*//')
21
+ desc=$(awk '/^---/{f++} f==1 && /^description:/{p=1} p && !/^---/{print}' "$skill_md" \
22
+ | sed 's/^description:[[:space:]]*//' | tr -d '\n' | sed 's/|/\\|/g' | cut -c1-200)
23
+ [[ -z "$name" ]] && continue
24
+ echo "| $name | ${model:-sonnet} | $desc |"
25
+ done
26
+ } > "$OUT"
27
+
28
+ echo "build-skill-index: wrote $OUT"
@@ -236,5 +236,9 @@ else
236
236
  print_opencode_instructions
237
237
  echo ""
238
238
  echo "bigpowers installed. Future updates:"
239
- echo " git pull && ./scripts/sync-skills.sh"
239
+ if [[ -d "$REPO_ROOT/.git" ]]; then
240
+ echo " git pull && ./scripts/sync-skills.sh"
241
+ else
242
+ echo " npm update -g bigpowers && bigpowers"
243
+ fi
240
244
  fi
@@ -0,0 +1,166 @@
1
+ #!/usr/bin/env bash
2
+ # land-branch.sh — Solo-local integrate: squash-merge feature branch onto main and push.
3
+ # Requires GIT_BIGPOWERS_LAND=1 for hook exceptions on commit/push to protected branches.
4
+ # Usage: bash scripts/land-branch.sh <feature-branch> "<conventional commit message>"
5
+ # Run from the primary repository root (not a linked worktree).
6
+ set -euo pipefail
7
+
8
+ CONVENTIONAL_REGEX='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+'
9
+
10
+ usage() {
11
+ echo "Usage: $0 <feature-branch> \"<conventional commit message>\" [--skip-verify]" >&2
12
+ echo " Run from primary repo root after release-branch gates (solo-local mode)." >&2
13
+ exit 1
14
+ }
15
+
16
+ deny() {
17
+ echo "ERROR: $1" >&2
18
+ exit 1
19
+ }
20
+
21
+ SKIP_VERIFY=false
22
+ ARGS=()
23
+ for arg in "$@"; do
24
+ if [ "$arg" = "--skip-verify" ]; then
25
+ SKIP_VERIFY=true
26
+ else
27
+ ARGS+=("$arg")
28
+ fi
29
+ done
30
+
31
+ FEATURE_BRANCH="${ARGS[0]:-}"
32
+ COMMIT_MSG="${ARGS[1]:-}"
33
+
34
+ [ -n "$FEATURE_BRANCH" ] && [ -n "$COMMIT_MSG" ] || usage
35
+
36
+ if [[ ! "$COMMIT_MSG" =~ $CONVENTIONAL_REGEX ]]; then
37
+ deny "Commit message must follow Conventional Commits: <type>(<scope>): <subject>"
38
+ fi
39
+
40
+ if [ ${#COMMIT_MSG} -gt 72 ]; then
41
+ deny "Commit subject line must be 72 characters or less"
42
+ fi
43
+
44
+ # Primary worktree only (.git is a directory, not a gitdir pointer file)
45
+ if [ -f .git ]; then
46
+ deny "Run from the primary repository root, not a linked worktree (cd to main repo first)"
47
+ fi
48
+
49
+ detect_default_branch() {
50
+ local remote_head
51
+ remote_head=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || true)
52
+ if [ -n "$remote_head" ]; then
53
+ echo "$remote_head"
54
+ return
55
+ fi
56
+ if git show-ref --verify --quiet refs/heads/main; then
57
+ echo "main"
58
+ elif git show-ref --verify --quiet refs/heads/master; then
59
+ echo "master"
60
+ else
61
+ deny "Could not detect default branch (main/master)"
62
+ fi
63
+ }
64
+
65
+ DEFAULT_BRANCH=$(detect_default_branch)
66
+ REPO_ROOT=$(pwd)
67
+
68
+ echo "==> Land branch: $FEATURE_BRANCH -> $DEFAULT_BRANCH"
69
+ echo " Repo root: $REPO_ROOT"
70
+
71
+ if ! git show-ref --verify --quiet "refs/heads/$FEATURE_BRANCH"; then
72
+ deny "Feature branch '$FEATURE_BRANCH' does not exist"
73
+ fi
74
+
75
+ for protected in main master; do
76
+ if [ "$FEATURE_BRANCH" = "$protected" ]; then
77
+ deny "Cannot land protected branch '$FEATURE_BRANCH'"
78
+ fi
79
+ done
80
+
81
+ run_verify_suite() {
82
+ echo "==> Running pre-land verification..."
83
+ if [ -f package.json ] && command -v jq >/dev/null 2>&1; then
84
+ if jq -e '.scripts.compliance' package.json >/dev/null 2>&1; then
85
+ npm run compliance
86
+ return
87
+ fi
88
+ if jq -e '.scripts.test' package.json >/dev/null 2>&1; then
89
+ local test_script
90
+ test_script=$(jq -r '.scripts.test' package.json)
91
+ if [ "$test_script" != "echo \"Error: no test specified\" && exit 1" ] && [ "$test_script" != "false" ]; then
92
+ npm test
93
+ return
94
+ fi
95
+ fi
96
+ if jq -e '.scripts.lint' package.json >/dev/null 2>&1; then
97
+ npm run lint
98
+ fi
99
+ fi
100
+ if [ -f scripts/sync-skills.sh ]; then
101
+ bash scripts/sync-skills.sh
102
+ fi
103
+ }
104
+
105
+ if [ "$SKIP_VERIFY" = false ]; then
106
+ run_verify_suite
107
+ else
108
+ echo "==> Skipping verification (--skip-verify)"
109
+ fi
110
+
111
+ echo "==> Updating $DEFAULT_BRANCH"
112
+ git checkout "$DEFAULT_BRANCH"
113
+ if ! git diff-index --quiet HEAD -- 2>/dev/null; then
114
+ deny "Working tree on $DEFAULT_BRANCH is not clean. Stash or commit first."
115
+ fi
116
+
117
+ if git remote get-url origin >/dev/null 2>&1; then
118
+ git pull --ff-only origin "$DEFAULT_BRANCH" || deny "git pull --ff-only failed; resolve before landing"
119
+ fi
120
+
121
+ if ! git merge-base --is-ancestor "$DEFAULT_BRANCH" "$FEATURE_BRANCH" 2>/dev/null; then
122
+ deny "Feature branch '$FEATURE_BRANCH' is not based on current $DEFAULT_BRANCH (rebase or recreate branch)"
123
+ fi
124
+
125
+ export GIT_BIGPOWERS_LAND=1
126
+
127
+ echo "==> Squash merge $FEATURE_BRANCH"
128
+ git merge --squash "$FEATURE_BRANCH"
129
+ if git diff-index --quiet HEAD -- 2>/dev/null; then
130
+ deny "Squash merge produced no changes (already merged?)"
131
+ fi
132
+
133
+ git commit -m "$COMMIT_MSG"
134
+ LAND_SHA=$(git rev-parse --short HEAD)
135
+ echo "==> Land commit: $LAND_SHA"
136
+
137
+ if git remote get-url origin >/dev/null 2>&1; then
138
+ echo "==> Pushing $DEFAULT_BRANCH to origin"
139
+ git push origin "$DEFAULT_BRANCH"
140
+ fi
141
+
142
+ # Worktree cleanup
143
+ WORKTREE_PATH="../$FEATURE_BRANCH"
144
+ if git worktree list --porcelain 2>/dev/null | grep -q "^worktree $WORKTREE_PATH$"; then
145
+ echo "==> Removing worktree $WORKTREE_PATH"
146
+ git worktree remove "$WORKTREE_PATH" 2>/dev/null || git worktree remove -f "$WORKTREE_PATH"
147
+ fi
148
+ git worktree prune 2>/dev/null || true
149
+
150
+ if git show-ref --verify --quiet "refs/heads/$FEATURE_BRANCH"; then
151
+ git branch -d "$FEATURE_BRANCH" 2>/dev/null || {
152
+ echo "WARN: Could not delete branch $FEATURE_BRANCH (not fully merged? use -D manually if intended)"
153
+ }
154
+ fi
155
+
156
+ git checkout "$DEFAULT_BRANCH"
157
+
158
+ echo ""
159
+ echo "Land complete."
160
+ echo " Branch: $FEATURE_BRANCH (removed)"
161
+ echo " Commit: $LAND_SHA on $DEFAULT_BRANCH"
162
+ echo " Message: $COMMIT_MSG"
163
+ echo " cwd: $(pwd)"
164
+ echo " current: $(git branch --show-current)"
165
+ echo ""
166
+ echo "semantic-release will pick up the push to $DEFAULT_BRANCH when configured."
@@ -102,6 +102,11 @@ jq -n --arg name "bigpowers" \
102
102
  echo "}"
103
103
  } > "$REPO_ROOT/opencode.json"
104
104
 
105
+ # Regenerate lexical skill index for search-skills
106
+ if [[ -x "$REPO_ROOT/scripts/build-skill-index.sh" ]]; then
107
+ bash "$REPO_ROOT/scripts/build-skill-index.sh" || true
108
+ fi
109
+
105
110
  echo "sync-skills: $skill_count skills synced"
106
111
  echo " → .cursor/rules/ ($skill_count .mdc files)"
107
112
  echo " → .gemini/extensions/bigpowers/skills/ (Agent Skills)"
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: search-skills
3
+ description: Find the right bigpowers skill from natural-language intent using a local lexical index over SKILL.md frontmatter. Use when unsure which skill to invoke, or at start of research-first.
4
+ model: haiku
5
+ ---
6
+
7
+ # Search Skills
8
+
9
+ Lexical search only — no embedding service (ADR: zero external dependency).
10
+
11
+ ## Process
12
+
13
+ 1. Run `bash scripts/build-skill-index.sh` if `specs/SKILL-SEARCH-INDEX.md` is stale.
14
+ 2. Search index: `rg -i "<keywords>" specs/SKILL-SEARCH-INDEX.md`
15
+ 3. Read top 3 matches' `description` and "Use when" triggers.
16
+ 4. Recommend one skill with rationale; invoke via orchestrator or direct call.
17
+
18
+ ## Verify
19
+
20
+ → verify: `test -f specs/SKILL-SEARCH-INDEX.md && echo OK || (bash scripts/build-skill-index.sh && test -f specs/SKILL-SEARCH-INDEX.md && echo OK)`
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: seed-conventions
3
+ model: sonnet
3
4
  description: Generate CLAUDE.md and CONVENTIONS.md for a brand-new project through a brief interview, and create the specs/ directory. 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.
4
5
  ---
5
6
 
@@ -23,6 +24,8 @@ Ask the user these questions (one at a time, wait for each answer):
23
24
 
24
25
  2. **Stack** — "What language, framework, and runtime? (e.g. TypeScript / Next.js / Node 22)"
25
26
 
27
+ 2b. **Stack profile (optional)** — Offer: `swift`, `typescript-vue`, `node-service`, or none. If chosen, merge the matching fragment from `profiles/<name>.md` into generated `CONVENTIONS.md` (commands, architecture, never-do).
28
+
26
29
  3. **Commands** — "What commands do you use for: run, test, build, lint? I'll document them so agents know how to verify their work."
27
30
 
28
31
  4. **Architecture** — "Describe the key modules and their relationships in 1–2 sentences. What are the main moving parts?"