bigpowers 2.43.5 → 2.44.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.
Files changed (172) hide show
  1. package/.pi/package.json +1 -1
  2. package/.pi/prompts/using-bigpowers.md +1 -1
  3. package/.pi/skills/using-bigpowers/SKILL.md +1 -1
  4. package/CHANGELOG.md +14 -0
  5. package/CLAUDE.md +3 -3
  6. package/CONTRIBUTING.md +1 -1
  7. package/CONVENTIONS.md +2 -1
  8. package/README.md +204 -104
  9. package/SKILL-INDEX.md +1 -2
  10. package/package.json +1 -1
  11. package/scripts/add-model-frontmatter.sh +4 -1
  12. package/scripts/audit-catalog.sh +10 -7
  13. package/scripts/check-skill-size.sh +5 -2
  14. package/scripts/generate-reference-tables.sh +5 -2
  15. package/scripts/generate-skill-index.sh +7 -2
  16. package/scripts/install.sh +4 -1
  17. package/scripts/regenerate-lockfile.sh +4 -1
  18. package/scripts/run-skill-verify.sh +4 -1
  19. package/scripts/sync-skills.sh +28 -2
  20. package/scripts/validate-doctrine.sh +8 -3
  21. package/{using-bigpowers → skills/using-bigpowers}/SKILL.md +1 -1
  22. package/skills-lock.json +73 -73
  23. package/COMMIT-MESSAGE.md +0 -34
  24. package/RELEASE.md +0 -133
  25. /package/{align-grid → skills/align-grid}/SKILL.md +0 -0
  26. /package/{align-grid → skills/align-grid}/scripts/grid_tokens.py +0 -0
  27. /package/{align-grid → skills/align-grid}/scripts/verify_grid.js +0 -0
  28. /package/{assess-impact → skills/assess-impact}/SKILL.md +0 -0
  29. /package/{audit-code → skills/audit-code}/HEURISTICS.md +0 -0
  30. /package/{audit-code → skills/audit-code}/SKILL.md +0 -0
  31. /package/{audit-plan → skills/audit-plan}/SKILL.md +0 -0
  32. /package/{build-epic → skills/build-epic}/SKILL.md +0 -0
  33. /package/{change-request → skills/change-request}/REFERENCE.md +0 -0
  34. /package/{change-request → skills/change-request}/SKILL.md +0 -0
  35. /package/{commit-message → skills/commit-message}/REFERENCE.md +0 -0
  36. /package/{commit-message → skills/commit-message}/SKILL.md +0 -0
  37. /package/{compose-workflow → skills/compose-workflow}/REFERENCE.md +0 -0
  38. /package/{compose-workflow → skills/compose-workflow}/SKILL.md +0 -0
  39. /package/{craft-skill → skills/craft-skill}/REFERENCE.md +0 -0
  40. /package/{craft-skill → skills/craft-skill}/SKILL.md +0 -0
  41. /package/{deepen-architecture → skills/deepen-architecture}/DEEPENING.md +0 -0
  42. /package/{deepen-architecture → skills/deepen-architecture}/INTERFACE-DESIGN.md +0 -0
  43. /package/{deepen-architecture → skills/deepen-architecture}/LANGUAGE.md +0 -0
  44. /package/{deepen-architecture → skills/deepen-architecture}/SKILL.md +0 -0
  45. /package/{define-language → skills/define-language}/SKILL.md +0 -0
  46. /package/{define-success → skills/define-success}/SKILL.md +0 -0
  47. /package/{delegate-task → skills/delegate-task}/SKILL.md +0 -0
  48. /package/{deploy → skills/deploy}/REFERENCE.md +0 -0
  49. /package/{deploy → skills/deploy}/SKILL.md +0 -0
  50. /package/{design-interface → skills/design-interface}/SKILL.md +0 -0
  51. /package/{develop-tdd → skills/develop-tdd}/REFERENCE.md +0 -0
  52. /package/{develop-tdd → skills/develop-tdd}/SKILL.md +0 -0
  53. /package/{develop-tdd → skills/develop-tdd}/deep-modules.md +0 -0
  54. /package/{develop-tdd → skills/develop-tdd}/interface-design.md +0 -0
  55. /package/{develop-tdd → skills/develop-tdd}/mocking.md +0 -0
  56. /package/{develop-tdd → skills/develop-tdd}/refactoring.md +0 -0
  57. /package/{develop-tdd → skills/develop-tdd}/tests.md +0 -0
  58. /package/{diagnose-root → skills/diagnose-root}/SKILL.md +0 -0
  59. /package/{dispatch-agents → skills/dispatch-agents}/SKILL.md +0 -0
  60. /package/{edit-document → skills/edit-document}/SKILL.md +0 -0
  61. /package/{elaborate-spec → skills/elaborate-spec}/SKILL.md +0 -0
  62. /package/{enforce-first → skills/enforce-first}/SKILL.md +0 -0
  63. /package/{evolve-skill → skills/evolve-skill}/REFERENCE.md +0 -0
  64. /package/{evolve-skill → skills/evolve-skill}/SKILL.md +0 -0
  65. /package/{execute-plan → skills/execute-plan}/SKILL.md +0 -0
  66. /package/{extract-design → skills/extract-design}/REFERENCE.md +0 -0
  67. /package/{extract-design → skills/extract-design}/SKILL.md +0 -0
  68. /package/{extract-design → skills/extract-design}/extract-design.feature +0 -0
  69. /package/{extract-design → skills/extract-design}/scripts/classify-colors.js +0 -0
  70. /package/{extract-design → skills/extract-design}/scripts/classify-rounded.js +0 -0
  71. /package/{extract-design → skills/extract-design}/scripts/classify-spacing.js +0 -0
  72. /package/{extract-design → skills/extract-design}/scripts/classify-typography.js +0 -0
  73. /package/{extract-design → skills/extract-design}/scripts/collect-styles.js +0 -0
  74. /package/{extract-design → skills/extract-design}/scripts/detect-components.js +0 -0
  75. /package/{extract-design → skills/extract-design}/scripts/extract.js +0 -0
  76. /package/{extract-design → skills/extract-design}/scripts/generate-prose.js +0 -0
  77. /package/{extract-design → skills/extract-design}/scripts/lib/browser.js +0 -0
  78. /package/{extract-design → skills/extract-design}/scripts/lib/constants.js +0 -0
  79. /package/{extract-design → skills/extract-design}/scripts/lib/logging.js +0 -0
  80. /package/{extract-design → skills/extract-design}/scripts/lib/retry.js +0 -0
  81. /package/{extract-design → skills/extract-design}/scripts/lib/state.js +0 -0
  82. /package/{extract-design → skills/extract-design}/scripts/lib/validator.js +0 -0
  83. /package/{extract-design → skills/extract-design}/scripts/write-designd.js +0 -0
  84. /package/{extract-design → skills/extract-design}/tests/fixtures/glassmorphism-dark/expected-tokens.json +0 -0
  85. /package/{extract-design → skills/extract-design}/tests/fixtures/glassmorphism-dark/prototype.html +0 -0
  86. /package/{extract-design → skills/extract-design}/tests/fixtures/minimal-no-styles/expected-tokens.json +0 -0
  87. /package/{extract-design → skills/extract-design}/tests/fixtures/minimal-no-styles/prototype.html +0 -0
  88. /package/{extract-design → skills/extract-design}/tests/fixtures/swiss-grid/expected-tokens.json +0 -0
  89. /package/{extract-design → skills/extract-design}/tests/fixtures/swiss-grid/prototype.html +0 -0
  90. /package/{extract-design → skills/extract-design}/tests/test-extraction.js +0 -0
  91. /package/{fix-bug → skills/fix-bug}/SKILL.md +0 -0
  92. /package/{grill-me → skills/grill-me}/REFERENCE.md +0 -0
  93. /package/{grill-me → skills/grill-me}/SKILL.md +0 -0
  94. /package/{grill-with-docs → skills/grill-with-docs}/REFERENCE.md +0 -0
  95. /package/{grill-with-docs → skills/grill-with-docs}/SKILL.md +0 -0
  96. /package/{guard-git → skills/guard-git}/REFERENCE.md +0 -0
  97. /package/{guard-git → skills/guard-git}/SKILL.md +0 -0
  98. /package/{guard-git → skills/guard-git}/scripts/block-dangerous-git.sh +0 -0
  99. /package/{guard-git → skills/guard-git}/scripts/lib/git-guardrails-core.sh +0 -0
  100. /package/{hook-commits → skills/hook-commits}/SKILL.md +0 -0
  101. /package/{inspect-quality → skills/inspect-quality}/SKILL.md +0 -0
  102. /package/{investigate-bug → skills/investigate-bug}/SKILL.md +0 -0
  103. /package/{kickoff-branch → skills/kickoff-branch}/SKILL.md +0 -0
  104. /package/{map-codebase → skills/map-codebase}/SKILL.md +0 -0
  105. /package/{migrate-spec → skills/migrate-spec}/REFERENCE-GSD.md +0 -0
  106. /package/{migrate-spec → skills/migrate-spec}/REFERENCE.md +0 -0
  107. /package/{migrate-spec → skills/migrate-spec}/SKILL.md +0 -0
  108. /package/{migrate-spec → skills/migrate-spec}/templates/METHODOLOGY_LATEST.md +0 -0
  109. /package/{migrate-spec → skills/migrate-spec}/templates/REQUIREMENTS_TRACE.yaml +0 -0
  110. /package/{model-domain → skills/model-domain}/ADR-FORMAT.md +0 -0
  111. /package/{model-domain → skills/model-domain}/CONTEXT-FORMAT.md +0 -0
  112. /package/{model-domain → skills/model-domain}/SKILL.md +0 -0
  113. /package/{orchestrate-project → skills/orchestrate-project}/REFERENCE.md +0 -0
  114. /package/{orchestrate-project → skills/orchestrate-project}/SKILL.md +0 -0
  115. /package/{organize-workspace → skills/organize-workspace}/REFERENCE.md +0 -0
  116. /package/{organize-workspace → skills/organize-workspace}/SKILL.md +0 -0
  117. /package/{plan-refactor → skills/plan-refactor}/SKILL.md +0 -0
  118. /package/{plan-release → skills/plan-release}/SKILL.md +0 -0
  119. /package/{plan-work → skills/plan-work}/REFERENCE.md +0 -0
  120. /package/{plan-work → skills/plan-work}/SKILL.md +0 -0
  121. /package/{publish-package → skills/publish-package}/REFERENCE.md +0 -0
  122. /package/{publish-package → skills/publish-package}/SKILL.md +0 -0
  123. /package/{quick-fix → skills/quick-fix}/SKILL.md +0 -0
  124. /package/{release-branch → skills/release-branch}/REFERENCE.md +0 -0
  125. /package/{release-branch → skills/release-branch}/SKILL.md +0 -0
  126. /package/{request-review → skills/request-review}/SKILL.md +0 -0
  127. /package/{research-first → skills/research-first}/REFERENCE.md +0 -0
  128. /package/{research-first → skills/research-first}/SKILL.md +0 -0
  129. /package/{reset-baseline → skills/reset-baseline}/SKILL.md +0 -0
  130. /package/{respond-review → skills/respond-review}/SKILL.md +0 -0
  131. /package/{run-benchmark → skills/run-benchmark}/SKILL.md +0 -0
  132. /package/{run-evals → skills/run-evals}/REFERENCE.md +0 -0
  133. /package/{run-evals → skills/run-evals}/SKILL.md +0 -0
  134. /package/{run-planning → skills/run-planning}/SKILL.md +0 -0
  135. /package/{scope-work → skills/scope-work}/SKILL.md +0 -0
  136. /package/{search-skills → skills/search-skills}/SKILL.md +0 -0
  137. /package/{security-review → skills/security-review}/REFERENCE-confidence-rubric.md +0 -0
  138. /package/{security-review → skills/security-review}/REFERENCE-false-positives.md +0 -0
  139. /package/{security-review → skills/security-review}/REFERENCE-vuln-categories.md +0 -0
  140. /package/{security-review → skills/security-review}/SKILL.md +0 -0
  141. /package/{seed-conventions → skills/seed-conventions}/REFERENCE.md +0 -0
  142. /package/{seed-conventions → skills/seed-conventions}/SKILL.md +0 -0
  143. /package/{session-state → skills/session-state}/SKILL.md +0 -0
  144. /package/{setup-environment → skills/setup-environment}/SKILL.md +0 -0
  145. /package/{simulate-agents → skills/simulate-agents}/SKILL.md +0 -0
  146. /package/{slice-tasks → skills/slice-tasks}/SKILL.md +0 -0
  147. /package/{smoke-test → skills/smoke-test}/REFERENCE.md +0 -0
  148. /package/{smoke-test → skills/smoke-test}/SKILL.md +0 -0
  149. /package/{spike-prototype → skills/spike-prototype}/SKILL.md +0 -0
  150. /package/{stocktake-skills → skills/stocktake-skills}/REFERENCE.md +0 -0
  151. /package/{stocktake-skills → skills/stocktake-skills}/SKILL.md +0 -0
  152. /package/{survey-context → skills/survey-context}/SKILL.md +0 -0
  153. /package/{terse-mode → skills/terse-mode}/SKILL.md +0 -0
  154. /package/{trace-requirement → skills/trace-requirement}/SKILL.md +0 -0
  155. /package/{validate-contracts → skills/validate-contracts}/REFERENCE.md +0 -0
  156. /package/{validate-contracts → skills/validate-contracts}/SKILL.md +0 -0
  157. /package/{validate-fix → skills/validate-fix}/SKILL.md +0 -0
  158. /package/{verify-work → skills/verify-work}/REFERENCE.md +0 -0
  159. /package/{verify-work → skills/verify-work}/SKILL.md +0 -0
  160. /package/{visual-dashboard → skills/visual-dashboard}/SKILL.md +0 -0
  161. /package/{visual-dashboard → skills/visual-dashboard}/scripts/cockpit.html +0 -0
  162. /package/{visual-dashboard → skills/visual-dashboard}/scripts/frame-template.html +0 -0
  163. /package/{visual-dashboard → skills/visual-dashboard}/scripts/helper.js +0 -0
  164. /package/{visual-dashboard → skills/visual-dashboard}/scripts/read-specs-status.cjs +0 -0
  165. /package/{visual-dashboard → skills/visual-dashboard}/scripts/server.cjs +0 -0
  166. /package/{visual-dashboard → skills/visual-dashboard}/scripts/start-server.sh +0 -0
  167. /package/{visual-dashboard → skills/visual-dashboard}/scripts/stop-server.sh +0 -0
  168. /package/{wire-ci → skills/wire-ci}/REFERENCE.md +0 -0
  169. /package/{wire-ci → skills/wire-ci}/SKILL.md +0 -0
  170. /package/{wire-observability → skills/wire-observability}/SKILL.md +0 -0
  171. /package/{write-document → skills/write-document}/REFERENCE.md +0 -0
  172. /package/{write-document → skills/write-document}/SKILL.md +0 -0
@@ -6,6 +6,9 @@ set -euo pipefail
6
6
 
7
7
  REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
8
8
  cd "$REPO_ROOT"
9
+ # SKILLS_ROOT: use skills/ when it exists, fall back to repo root
10
+ SKILLS_ROOT="$REPO_ROOT"
11
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
9
12
 
10
13
  ERRORS=0
11
14
 
@@ -44,8 +47,8 @@ CRITICAL_PATH=(
44
47
  )
45
48
 
46
49
  # Check all */SKILL.md files
47
- for skill_file in */SKILL.md; do
48
- skill_name="${skill_file%/SKILL.md}"
50
+ for skill_file in "$SKILLS_ROOT"/*/SKILL.md; do
51
+ skill_name="$(basename "$(dirname "$skill_file")")"
49
52
  line_count=$(wc -l < "$skill_file")
50
53
 
51
54
  # Determine cap based on critical-path membership
@@ -7,6 +7,9 @@ set -euo pipefail
7
7
  REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
8
8
  TARGET="$REPO_ROOT/docs/references/model-profiles.md"
9
9
  mkdir -p "$(dirname "$TARGET")"
10
+ # SKILLS_ROOT: use skills/ when it exists, fall back to repo root
11
+ SKILLS_ROOT="$REPO_ROOT"
12
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
10
13
 
11
14
  cd "$REPO_ROOT"
12
15
 
@@ -17,7 +20,7 @@ while IFS= read -r line; do
17
20
  model_raw="${line##*model: }"
18
21
  model="${model_raw// /}"
19
22
  ROWS+=("$skill_dir $model")
20
- done < <(grep -r "^model:" */SKILL.md | sort)
23
+ done < <(grep -r "^model:" "$SKILLS_ROOT"/*/SKILL.md | sort)
21
24
 
22
25
  TOTAL=${#ROWS[@]}
23
26
 
@@ -35,7 +38,7 @@ for row in "${ROWS[@]}"; do
35
38
  done
36
39
  BLOCK+="
37
40
 
38
- Total: **$TOTAL** skills — verify with \`ls -d \*/SKILL.md | wc -l\`
41
+ Total: **$TOTAL** skills — verify with \`find . skills -maxdepth 2 -name SKILL.md 2>/dev/null | grep -v '.git\|.cursor\|.gemini\|.pi' | sort -u | wc -l\`
39
42
  <!-- AUTO-GENERATED-CATALOG: end -->"
40
43
 
41
44
  # --- 3. Splice block into target file ---
@@ -7,6 +7,9 @@ set -euo pipefail
7
7
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
8
  LOCKFILE="$REPO_ROOT/skills-lock.json"
9
9
  INDEX_FILE="$REPO_ROOT/SKILL-INDEX.md"
10
+ # SKILLS_ROOT: use skills/ when it exists, fall back to repo root
11
+ SKILLS_ROOT="$REPO_ROOT"
12
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
10
13
 
11
14
  if [[ ! -f "$LOCKFILE" ]]; then
12
15
  echo "generate-skill-index: ERROR — skills-lock.json not found. Run regenerate-lockfile.sh first." >&2
@@ -48,7 +51,9 @@ DESC_COL_WIDTH=56
48
51
  echo "> **DO NOT EDIT** — This file is auto-generated by \`scripts/generate-skill-index.sh\`."
49
52
  echo "> Edit \`SKILL.md\` source files or \`skills-lock.json\` instead. Run \`bash scripts/sync-skills.sh\` to regenerate."
50
53
  echo ""
51
- echo "**Generated:** $(date -u +%Y-%m-%dT%H:%M:%SZ)"
54
+ # No generation timestamp: output must be byte-identical for the same sources
55
+ # (CI drift gate runs git diff --exit-code). Git history records when this
56
+ # file changed; a wall-clock or commit-date stamp makes every run dirty.
52
57
  echo "**Skills:** $(jq '.skills | length' "$LOCKFILE")"
53
58
  echo ""
54
59
 
@@ -157,7 +162,7 @@ DESC_COL_WIDTH=56
157
162
  echo "1. Run \`bash scripts/sync-skills.sh\` to regenerate this file and all artifacts."
158
163
  echo "2. Or run \`bash scripts/generate-skill-index.sh\` to only regenerate this index."
159
164
  echo ""
160
- echo "→ verify: \`find . -maxdepth 2 -name \"SKILL.md\" | grep -v \".git\\|.cursor\\|.gemini\" | wc -l\`"
165
+ echo "→ verify: \`find . skills -maxdepth 2 -name \"SKILL.md\" 2>/dev/null | grep -v \".git\\|.cursor\\|.gemini\\|.pi\" | sort -u | wc -l\`"
161
166
  echo ""
162
167
 
163
168
  } > "$INDEX_FILE"
@@ -14,6 +14,9 @@
14
14
  set -euo pipefail
15
15
 
16
16
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
17
+ # SKILLS_ROOT: use skills/ subdirectory when it exists, fall back to repo root
18
+ SKILLS_ROOT="$REPO_ROOT"
19
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
17
20
 
18
21
  DRY_RUN=false
19
22
  UNINSTALL=false
@@ -66,7 +69,7 @@ install_claude() {
66
69
  echo ""
67
70
  echo "Claude Code → $CLAUDE_SKILLS_DIR/"
68
71
  local count=0
69
- for skill_dir in "$REPO_ROOT"/*/; do
72
+ for skill_dir in "$SKILLS_ROOT"/*/; do
70
73
  [[ -f "$skill_dir/SKILL.md" ]] || continue
71
74
  local name; name="$(basename "$skill_dir")"
72
75
  link "$skill_dir" "$CLAUDE_SKILLS_DIR/$name"
@@ -6,11 +6,14 @@ set -euo pipefail
6
6
 
7
7
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
8
  LOCKFILE="$REPO_ROOT/skills-lock.json"
9
+ # SKILLS_ROOT: use skills/ when it exists, fall back to repo root
10
+ SKILLS_ROOT="$REPO_ROOT"
11
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
9
12
 
10
13
  # Build JSON using jq from individual skill records
11
14
  # We pipe each skill as a JSON object, then jq -s merges them into an object keyed by name
12
15
  records=()
13
- for skill_dir in "$REPO_ROOT"/*/; do
16
+ for skill_dir in "$SKILLS_ROOT"/*/; do
14
17
  skill_md="$skill_dir/SKILL.md"
15
18
  [[ -f "$skill_md" ]] || continue
16
19
 
@@ -18,6 +18,9 @@ fi
18
18
 
19
19
  REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
20
20
  cd "$REPO_ROOT"
21
+ # SKILLS_ROOT: use skills/ when it exists, fall back to repo root
22
+ SKILLS_ROOT="$REPO_ROOT"
23
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
21
24
 
22
25
  PASS=0; FAIL=0; SKIP=0
23
26
  TARGET="${1:-}"
@@ -70,7 +73,7 @@ if [ -n "$TARGET" ]; then
70
73
  exit 1
71
74
  fi
72
75
  else
73
- for skill_md in */SKILL.md; do
76
+ for skill_md in "$SKILLS_ROOT"/*/SKILL.md; do
74
77
  run_skill "$skill_md"
75
78
  done
76
79
  fi
@@ -4,6 +4,10 @@
4
4
  set -euo pipefail
5
5
 
6
6
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
7
+ # SKILLS_ROOT: use skills/ subdirectory when it exists, fall back to repo root
8
+ # This allows e29s02 to git-mv skill dirs into skills/ without changing this script.
9
+ SKILLS_ROOT="$REPO_ROOT"
10
+ [[ -d "$REPO_ROOT/skills" ]] && SKILLS_ROOT="$REPO_ROOT/skills"
7
11
  CURSOR_RULES="$REPO_ROOT/.cursor/rules"
8
12
  GEMINI_EXT_DIR="$REPO_ROOT/.gemini/extensions/bigpowers"
9
13
  GEMINI_SKILLS="$GEMINI_EXT_DIR/skills"
@@ -27,7 +31,7 @@ rm -rf "${PI_PROMPTS:?}"/*
27
31
 
28
32
  skill_count=0
29
33
 
30
- for skill_dir in "$REPO_ROOT"/*/; do
34
+ for skill_dir in "$SKILLS_ROOT"/*/; do
31
35
  skill_md="$skill_dir/SKILL.md"
32
36
  [[ -f "$skill_md" ]] || continue
33
37
 
@@ -163,7 +167,7 @@ if [[ -n "$OPN_TARGET" ]] && [[ -d "$OPN_TARGET" ]]; then
163
167
  OPN_SKILLS="$OPN_TARGET/skills"
164
168
  mkdir -p "$OPN_SKILLS"
165
169
  opencode_count=0
166
- for skill_dir in "$REPO_ROOT"/*/; do
170
+ for skill_dir in "$SKILLS_ROOT"/*/; do
167
171
  skill_md="$skill_dir/SKILL.md"
168
172
  [[ -f "$skill_md" ]] || continue
169
173
  skill_name=$(basename "$skill_dir")
@@ -189,6 +193,28 @@ if [[ -x "$REPO_ROOT/scripts/build-skill-index.sh" ]]; then
189
193
  bash "$REPO_ROOT/scripts/build-skill-index.sh" || true
190
194
  fi
191
195
 
196
+ # Prune orphan cursor rules — .mdc files whose skill directory no longer exists.
197
+ # Allowlist: hand-maintained rules that intentionally have no SKILL.md source.
198
+ CURSOR_KEEP="context7.mdc"
199
+ for mdc in "$CURSOR_RULES"/*.mdc; do
200
+ [[ -e "$mdc" ]] || continue
201
+ mdc_base=$(basename "$mdc")
202
+ case " $CURSOR_KEEP " in *" $mdc_base "*) continue ;; esac
203
+ if [[ ! -f "$SKILLS_ROOT/${mdc_base%.mdc}/SKILL.md" ]]; then
204
+ rm "$mdc"
205
+ echo " → pruned orphan cursor rule: $mdc_base"
206
+ fi
207
+ done
208
+
209
+ # Stamp the README skill-count badge from the live count — never hardcode it by hand.
210
+ # Portable (BSD/GNU): write to temp file instead of sed -i.
211
+ readme="$REPO_ROOT/README.md"
212
+ if [[ -f "$readme" ]] && grep -q 'badge/skills-' "$readme"; then
213
+ readme_tmp=$(mktemp)
214
+ sed -E "s|(badge/skills-)[0-9]+(-brightgreen)|\1${skill_count}\2|" "$readme" > "$readme_tmp"
215
+ mv "$readme_tmp" "$readme"
216
+ fi
217
+
192
218
  echo "sync-skills: $skill_count skills synced"
193
219
  echo " → .cursor/rules/ ($skill_count .mdc files)"
194
220
  echo " → .gemini/extensions/bigpowers/skills/ (Agent Skills)"
@@ -24,7 +24,7 @@ pass() {
24
24
  echo "--- [Epic 1] dead skill names in docs/references/model-profiles.md ---"
25
25
  DEAD=()
26
26
  while IFS= read -r name; do
27
- if [[ ! -d "$name" ]]; then
27
+ if [[ ! -d "$name" && ! -d "skills/$name" ]]; then
28
28
  DEAD+=("$name")
29
29
  fi
30
30
  done < <(grep -oE '`[a-z][a-z-]+`' docs/references/model-profiles.md \
@@ -60,7 +60,11 @@ fi
60
60
 
61
61
  # ── Epic 1: Skill count consistency ───────────────────────────────────────────
62
62
  echo "--- [Epic 1] skill count consistency ---"
63
- LIVE_COUNT=$(ls -d */SKILL.md 2>/dev/null | wc -l | tr -d ' ')
63
+ LIVE_COUNT=$(ls -d skills/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
64
+ # Fallback: count root-level skill dirs if skills/ doesn't exist (pre-e29 layout)
65
+ if [[ "$LIVE_COUNT" -eq 0 ]]; then
66
+ LIVE_COUNT=$(ls -d */SKILL.md 2>/dev/null | wc -l | tr -d ' ')
67
+ fi
64
68
  STALE_COUNT_HITS=$(grep -rE "expect [0-9]+" docs/ 2>/dev/null \
65
69
  | grep -v "expect $LIVE_COUNT" | wc -l | tr -d ' ') || true
66
70
  if [[ "$STALE_COUNT_HITS" -eq 0 ]]; then
@@ -120,7 +124,8 @@ echo "--- [Epic 5] critical-path handoff targets ---"
120
124
  CRITICAL_HANDOFF=(survey-context plan-work develop-tdd verify-work audit-code release-branch kickoff-branch commit-message)
121
125
  MISSING_HANDOFF=()
122
126
  for s in "${CRITICAL_HANDOFF[@]}"; do
123
- if [[ -f "$s/SKILL.md" ]] && ! grep -qiE "handoff|next_skill|next:" "$s/SKILL.md"; then
127
+ if [[ ! -f "$s/SKILL.md" && ! -f "skills/$s/SKILL.md" ]]; then continue; fi
128
+ if ! grep -qiE "handoff|next_skill|next:" "${s}/SKILL.md" "skills/${s}/SKILL.md" 2>/dev/null; then
124
129
  MISSING_HANDOFF+=("$s")
125
130
  fi
126
131
  done
@@ -99,7 +99,7 @@ Start the HTTP dashboard with `visual-dashboard` → `GET /api/status?projectDir
99
99
  - **Integrate:** team default is `gh pr` (team-pr); solo profile uses `land-branch.sh`. Never create GitHub issues from skills — use local Markdown files instead.
100
100
  - **One skill, one thing.** If you're unsure which skill to call, call `survey-context` — it reads your current state and recommends the next step.
101
101
  - **verify: every step.** Every epic task must have `verify: <runnable command>`. Evidence over claims.
102
- - **70 skills.** See `SKILL-INDEX.md`; find skills with `search-skills`.
102
+ - **The full catalog is auto-generated.** See `SKILL-INDEX.md`; find skills with `search-skills`.
103
103
 
104
104
  ## After this
105
105