bigpowers 2.87.4 → 2.87.6

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 (259) hide show
  1. package/.cursor/rules/align-grid.mdc +109 -0
  2. package/.cursor/rules/assess-impact.mdc +90 -0
  3. package/.cursor/rules/audit-code.mdc +183 -0
  4. package/.cursor/rules/audit-plan.mdc +88 -0
  5. package/.cursor/rules/build-epic.mdc +104 -0
  6. package/.cursor/rules/change-request.mdc +120 -0
  7. package/.cursor/rules/commit-message.mdc +139 -0
  8. package/.cursor/rules/compose-workflow.mdc +81 -0
  9. package/.cursor/rules/context7-mcp.mdc +54 -0
  10. package/.cursor/rules/craft-skill.mdc +195 -0
  11. package/.cursor/rules/deepen-architecture.mdc +259 -0
  12. package/.cursor/rules/define-language.mdc +79 -0
  13. package/.cursor/rules/define-success.mdc +11 -0
  14. package/.cursor/rules/delegate-task.mdc +90 -0
  15. package/.cursor/rules/deploy.mdc +197 -0
  16. package/.cursor/rules/design-interface.mdc +96 -0
  17. package/.cursor/rules/develop-tdd.mdc +415 -0
  18. package/.cursor/rules/diagnose-root.mdc +23 -0
  19. package/.cursor/rules/diagnose-stall.mdc +53 -0
  20. package/.cursor/rules/dispatch-agents.mdc +117 -0
  21. package/.cursor/rules/edit-document.mdc +22 -0
  22. package/.cursor/rules/elaborate-spec.mdc +100 -0
  23. package/.cursor/rules/enforce-first.mdc +44 -0
  24. package/.cursor/rules/evolve-skill.mdc +54 -0
  25. package/.cursor/rules/execute-plan.mdc +60 -0
  26. package/.cursor/rules/extract-design.mdc +131 -0
  27. package/.cursor/rules/find-way.mdc +190 -0
  28. package/.cursor/rules/fix-bug.mdc +66 -0
  29. package/.cursor/rules/gate-trace.mdc +91 -0
  30. package/.cursor/rules/generate-allure-report.mdc +284 -0
  31. package/.cursor/rules/grill-me.mdc +107 -0
  32. package/.cursor/rules/grill-with-docs.mdc +52 -0
  33. package/.cursor/rules/guard-git.mdc +230 -0
  34. package/.cursor/rules/harden-vps.mdc +290 -0
  35. package/.cursor/rules/hook-commits.mdc +93 -0
  36. package/.cursor/rules/inspect-quality.mdc +105 -0
  37. package/.cursor/rules/investigate-bug.mdc +126 -0
  38. package/.cursor/rules/kickoff-branch.mdc +142 -0
  39. package/.cursor/rules/maintain-wiki.mdc +63 -0
  40. package/.cursor/rules/map-codebase.mdc +70 -0
  41. package/.cursor/rules/migrate-spec.mdc +907 -0
  42. package/.cursor/rules/model-domain.mdc +231 -0
  43. package/.cursor/rules/orchestrate-project.mdc +173 -0
  44. package/.cursor/rules/organize-workspace.mdc +163 -0
  45. package/.cursor/rules/plan-refactor.mdc +86 -0
  46. package/.cursor/rules/plan-release.mdc +144 -0
  47. package/.cursor/rules/plan-tests.mdc +74 -0
  48. package/.cursor/rules/plan-work.mdc +271 -0
  49. package/.cursor/rules/publish-package.mdc +337 -0
  50. package/.cursor/rules/quick-fix.mdc +113 -0
  51. package/.cursor/rules/release-branch.mdc +301 -0
  52. package/.cursor/rules/request-review.mdc +112 -0
  53. package/.cursor/rules/research-first.mdc +86 -0
  54. package/.cursor/rules/reset-baseline.mdc +20 -0
  55. package/.cursor/rules/respond-review.mdc +70 -0
  56. package/.cursor/rules/run-benchmark.mdc +84 -0
  57. package/.cursor/rules/run-evals.mdc +79 -0
  58. package/.cursor/rules/run-planning.mdc +100 -0
  59. package/.cursor/rules/scope-work.mdc +62 -0
  60. package/.cursor/rules/search-skills.mdc +72 -0
  61. package/.cursor/rules/security-review.mdc +383 -0
  62. package/.cursor/rules/seed-conventions.mdc +311 -0
  63. package/.cursor/rules/session-state.mdc +145 -0
  64. package/.cursor/rules/setup-environment.mdc +38 -0
  65. package/.cursor/rules/simple-english.mdc +345 -0
  66. package/.cursor/rules/simulate-agents.mdc +25 -0
  67. package/.cursor/rules/slice-tasks.mdc +67 -0
  68. package/.cursor/rules/smoke-test.mdc +260 -0
  69. package/.cursor/rules/spike-prototype.mdc +94 -0
  70. package/.cursor/rules/stocktake-skills.mdc +73 -0
  71. package/.cursor/rules/survey-context.mdc +134 -0
  72. package/.cursor/rules/terse-mode.mdc +41 -0
  73. package/.cursor/rules/trace-requirement.mdc +68 -0
  74. package/.cursor/rules/using-bigpowers.mdc +110 -0
  75. package/.cursor/rules/validate-contracts.mdc +285 -0
  76. package/.cursor/rules/validate-fix.mdc +146 -0
  77. package/.cursor/rules/verify-work.mdc +190 -0
  78. package/.cursor/rules/visual-dashboard.mdc +49 -0
  79. package/.cursor/rules/wire-ci.mdc +380 -0
  80. package/.cursor/rules/wire-observability.mdc +96 -0
  81. package/.cursor/rules/write-document.mdc +280 -0
  82. package/.gemini/extensions/bigpowers/commands/prompts/align-grid.md +109 -0
  83. package/.gemini/extensions/bigpowers/commands/prompts/assess-impact.md +90 -0
  84. package/.gemini/extensions/bigpowers/commands/prompts/audit-code.md +183 -0
  85. package/.gemini/extensions/bigpowers/commands/prompts/audit-plan.md +88 -0
  86. package/.gemini/extensions/bigpowers/commands/prompts/build-epic.md +104 -0
  87. package/.gemini/extensions/bigpowers/commands/prompts/change-request.md +120 -0
  88. package/.gemini/extensions/bigpowers/commands/prompts/commit-message.md +139 -0
  89. package/.gemini/extensions/bigpowers/commands/prompts/compose-workflow.md +81 -0
  90. package/.gemini/extensions/bigpowers/commands/prompts/context7-mcp.md +54 -0
  91. package/.gemini/extensions/bigpowers/commands/prompts/craft-skill.md +195 -0
  92. package/.gemini/extensions/bigpowers/commands/prompts/deepen-architecture.md +259 -0
  93. package/.gemini/extensions/bigpowers/commands/prompts/define-language.md +79 -0
  94. package/.gemini/extensions/bigpowers/commands/prompts/define-success.md +11 -0
  95. package/.gemini/extensions/bigpowers/commands/prompts/delegate-task.md +90 -0
  96. package/.gemini/extensions/bigpowers/commands/prompts/deploy.md +197 -0
  97. package/.gemini/extensions/bigpowers/commands/prompts/design-interface.md +96 -0
  98. package/.gemini/extensions/bigpowers/commands/prompts/develop-tdd.md +415 -0
  99. package/.gemini/extensions/bigpowers/commands/prompts/diagnose-root.md +23 -0
  100. package/.gemini/extensions/bigpowers/commands/prompts/diagnose-stall.md +53 -0
  101. package/.gemini/extensions/bigpowers/commands/prompts/dispatch-agents.md +117 -0
  102. package/.gemini/extensions/bigpowers/commands/prompts/edit-document.md +22 -0
  103. package/.gemini/extensions/bigpowers/commands/prompts/elaborate-spec.md +100 -0
  104. package/.gemini/extensions/bigpowers/commands/prompts/enforce-first.md +44 -0
  105. package/.gemini/extensions/bigpowers/commands/prompts/evolve-skill.md +54 -0
  106. package/.gemini/extensions/bigpowers/commands/prompts/execute-plan.md +60 -0
  107. package/.gemini/extensions/bigpowers/commands/prompts/extract-design.md +131 -0
  108. package/.gemini/extensions/bigpowers/commands/prompts/find-way.md +190 -0
  109. package/.gemini/extensions/bigpowers/commands/prompts/fix-bug.md +66 -0
  110. package/.gemini/extensions/bigpowers/commands/prompts/gate-trace.md +91 -0
  111. package/.gemini/extensions/bigpowers/commands/prompts/generate-allure-report.md +284 -0
  112. package/.gemini/extensions/bigpowers/commands/prompts/grill-me.md +107 -0
  113. package/.gemini/extensions/bigpowers/commands/prompts/grill-with-docs.md +52 -0
  114. package/.gemini/extensions/bigpowers/commands/prompts/guard-git.md +230 -0
  115. package/.gemini/extensions/bigpowers/commands/prompts/harden-vps.md +290 -0
  116. package/.gemini/extensions/bigpowers/commands/prompts/hook-commits.md +93 -0
  117. package/.gemini/extensions/bigpowers/commands/prompts/inspect-quality.md +105 -0
  118. package/.gemini/extensions/bigpowers/commands/prompts/investigate-bug.md +126 -0
  119. package/.gemini/extensions/bigpowers/commands/prompts/kickoff-branch.md +142 -0
  120. package/.gemini/extensions/bigpowers/commands/prompts/maintain-wiki.md +63 -0
  121. package/.gemini/extensions/bigpowers/commands/prompts/map-codebase.md +70 -0
  122. package/.gemini/extensions/bigpowers/commands/prompts/migrate-spec.md +907 -0
  123. package/.gemini/extensions/bigpowers/commands/prompts/model-domain.md +231 -0
  124. package/.gemini/extensions/bigpowers/commands/prompts/orchestrate-project.md +173 -0
  125. package/.gemini/extensions/bigpowers/commands/prompts/organize-workspace.md +163 -0
  126. package/.gemini/extensions/bigpowers/commands/prompts/plan-refactor.md +86 -0
  127. package/.gemini/extensions/bigpowers/commands/prompts/plan-release.md +144 -0
  128. package/.gemini/extensions/bigpowers/commands/prompts/plan-tests.md +74 -0
  129. package/.gemini/extensions/bigpowers/commands/prompts/plan-work.md +271 -0
  130. package/.gemini/extensions/bigpowers/commands/prompts/publish-package.md +337 -0
  131. package/.gemini/extensions/bigpowers/commands/prompts/quick-fix.md +113 -0
  132. package/.gemini/extensions/bigpowers/commands/prompts/release-branch.md +301 -0
  133. package/.gemini/extensions/bigpowers/commands/prompts/request-review.md +112 -0
  134. package/.gemini/extensions/bigpowers/commands/prompts/research-first.md +86 -0
  135. package/.gemini/extensions/bigpowers/commands/prompts/reset-baseline.md +20 -0
  136. package/.gemini/extensions/bigpowers/commands/prompts/respond-review.md +70 -0
  137. package/.gemini/extensions/bigpowers/commands/prompts/run-benchmark.md +84 -0
  138. package/.gemini/extensions/bigpowers/commands/prompts/run-evals.md +79 -0
  139. package/.gemini/extensions/bigpowers/commands/prompts/run-planning.md +100 -0
  140. package/.gemini/extensions/bigpowers/commands/prompts/scope-work.md +62 -0
  141. package/.gemini/extensions/bigpowers/commands/prompts/search-skills.md +72 -0
  142. package/.gemini/extensions/bigpowers/commands/prompts/security-review.md +383 -0
  143. package/.gemini/extensions/bigpowers/commands/prompts/seed-conventions.md +311 -0
  144. package/.gemini/extensions/bigpowers/commands/prompts/session-state.md +145 -0
  145. package/.gemini/extensions/bigpowers/commands/prompts/setup-environment.md +38 -0
  146. package/.gemini/extensions/bigpowers/commands/prompts/simple-english.md +345 -0
  147. package/.gemini/extensions/bigpowers/commands/prompts/simulate-agents.md +25 -0
  148. package/.gemini/extensions/bigpowers/commands/prompts/slice-tasks.md +67 -0
  149. package/.gemini/extensions/bigpowers/commands/prompts/smoke-test.md +260 -0
  150. package/.gemini/extensions/bigpowers/commands/prompts/spike-prototype.md +94 -0
  151. package/.gemini/extensions/bigpowers/commands/prompts/stocktake-skills.md +73 -0
  152. package/.gemini/extensions/bigpowers/commands/prompts/survey-context.md +134 -0
  153. package/.gemini/extensions/bigpowers/commands/prompts/terse-mode.md +41 -0
  154. package/.gemini/extensions/bigpowers/commands/prompts/trace-requirement.md +68 -0
  155. package/.gemini/extensions/bigpowers/commands/prompts/using-bigpowers.md +110 -0
  156. package/.gemini/extensions/bigpowers/commands/prompts/validate-contracts.md +285 -0
  157. package/.gemini/extensions/bigpowers/commands/prompts/validate-fix.md +146 -0
  158. package/.gemini/extensions/bigpowers/commands/prompts/verify-work.md +190 -0
  159. package/.gemini/extensions/bigpowers/commands/prompts/visual-dashboard.md +49 -0
  160. package/.gemini/extensions/bigpowers/commands/prompts/wire-ci.md +380 -0
  161. package/.gemini/extensions/bigpowers/commands/prompts/wire-observability.md +96 -0
  162. package/.gemini/extensions/bigpowers/commands/prompts/write-document.md +280 -0
  163. package/.gemini/extensions/bigpowers/gemini-extension.json +16 -0
  164. package/.gemini/extensions/bigpowers/hooks/HOOKS.md +43 -0
  165. package/.gemini/extensions/bigpowers/hooks/before-tool-git-guard.sh +26 -0
  166. package/.gemini/extensions/bigpowers/hooks/before-tool-rtk.sh +14 -0
  167. package/.gemini/extensions/bigpowers/hooks/before-tool-token-mgmt.sh +19 -0
  168. package/.gemini/extensions/bigpowers/hooks/hooks-manifest.json +36 -0
  169. package/.gemini/extensions/bigpowers/hooks/run-hook.cmd +29 -0
  170. package/.gemini/extensions/bigpowers/hooks/session-start +48 -0
  171. package/.gemini/extensions/bigpowers/hooks/settings.json.example +41 -0
  172. package/.gemini/extensions/bigpowers/skills/align-grid/SKILL.md +111 -0
  173. package/.gemini/extensions/bigpowers/skills/assess-impact/SKILL.md +92 -0
  174. package/.gemini/extensions/bigpowers/skills/audit-code/SKILL.md +185 -0
  175. package/.gemini/extensions/bigpowers/skills/audit-plan/SKILL.md +90 -0
  176. package/.gemini/extensions/bigpowers/skills/build-epic/SKILL.md +106 -0
  177. package/.gemini/extensions/bigpowers/skills/change-request/SKILL.md +122 -0
  178. package/.gemini/extensions/bigpowers/skills/commit-message/SKILL.md +141 -0
  179. package/.gemini/extensions/bigpowers/skills/compose-workflow/SKILL.md +83 -0
  180. package/.gemini/extensions/bigpowers/skills/context7-mcp/SKILL.md +56 -0
  181. package/.gemini/extensions/bigpowers/skills/craft-skill/SKILL.md +197 -0
  182. package/.gemini/extensions/bigpowers/skills/deepen-architecture/SKILL.md +261 -0
  183. package/.gemini/extensions/bigpowers/skills/define-language/SKILL.md +81 -0
  184. package/.gemini/extensions/bigpowers/skills/define-success/SKILL.md +13 -0
  185. package/.gemini/extensions/bigpowers/skills/delegate-task/SKILL.md +92 -0
  186. package/.gemini/extensions/bigpowers/skills/deploy/SKILL.md +199 -0
  187. package/.gemini/extensions/bigpowers/skills/design-interface/SKILL.md +98 -0
  188. package/.gemini/extensions/bigpowers/skills/develop-tdd/SKILL.md +417 -0
  189. package/.gemini/extensions/bigpowers/skills/diagnose-root/SKILL.md +25 -0
  190. package/.gemini/extensions/bigpowers/skills/diagnose-stall/SKILL.md +55 -0
  191. package/.gemini/extensions/bigpowers/skills/dispatch-agents/SKILL.md +119 -0
  192. package/.gemini/extensions/bigpowers/skills/edit-document/SKILL.md +24 -0
  193. package/.gemini/extensions/bigpowers/skills/elaborate-spec/SKILL.md +102 -0
  194. package/.gemini/extensions/bigpowers/skills/enforce-first/SKILL.md +46 -0
  195. package/.gemini/extensions/bigpowers/skills/evolve-skill/SKILL.md +56 -0
  196. package/.gemini/extensions/bigpowers/skills/execute-plan/SKILL.md +62 -0
  197. package/.gemini/extensions/bigpowers/skills/extract-design/SKILL.md +133 -0
  198. package/.gemini/extensions/bigpowers/skills/find-way/SKILL.md +192 -0
  199. package/.gemini/extensions/bigpowers/skills/fix-bug/SKILL.md +68 -0
  200. package/.gemini/extensions/bigpowers/skills/gate-trace/SKILL.md +93 -0
  201. package/.gemini/extensions/bigpowers/skills/generate-allure-report/SKILL.md +286 -0
  202. package/.gemini/extensions/bigpowers/skills/grill-me/SKILL.md +109 -0
  203. package/.gemini/extensions/bigpowers/skills/grill-with-docs/SKILL.md +54 -0
  204. package/.gemini/extensions/bigpowers/skills/guard-git/SKILL.md +232 -0
  205. package/.gemini/extensions/bigpowers/skills/harden-vps/SKILL.md +292 -0
  206. package/.gemini/extensions/bigpowers/skills/hook-commits/SKILL.md +95 -0
  207. package/.gemini/extensions/bigpowers/skills/inspect-quality/SKILL.md +107 -0
  208. package/.gemini/extensions/bigpowers/skills/investigate-bug/SKILL.md +128 -0
  209. package/.gemini/extensions/bigpowers/skills/kickoff-branch/SKILL.md +144 -0
  210. package/.gemini/extensions/bigpowers/skills/maintain-wiki/SKILL.md +65 -0
  211. package/.gemini/extensions/bigpowers/skills/map-codebase/SKILL.md +72 -0
  212. package/.gemini/extensions/bigpowers/skills/migrate-spec/SKILL.md +909 -0
  213. package/.gemini/extensions/bigpowers/skills/model-domain/SKILL.md +233 -0
  214. package/.gemini/extensions/bigpowers/skills/orchestrate-project/SKILL.md +175 -0
  215. package/.gemini/extensions/bigpowers/skills/organize-workspace/SKILL.md +165 -0
  216. package/.gemini/extensions/bigpowers/skills/plan-refactor/SKILL.md +88 -0
  217. package/.gemini/extensions/bigpowers/skills/plan-release/SKILL.md +146 -0
  218. package/.gemini/extensions/bigpowers/skills/plan-tests/SKILL.md +76 -0
  219. package/.gemini/extensions/bigpowers/skills/plan-work/SKILL.md +273 -0
  220. package/.gemini/extensions/bigpowers/skills/publish-package/SKILL.md +339 -0
  221. package/.gemini/extensions/bigpowers/skills/quick-fix/SKILL.md +115 -0
  222. package/.gemini/extensions/bigpowers/skills/release-branch/SKILL.md +303 -0
  223. package/.gemini/extensions/bigpowers/skills/request-review/SKILL.md +114 -0
  224. package/.gemini/extensions/bigpowers/skills/research-first/SKILL.md +88 -0
  225. package/.gemini/extensions/bigpowers/skills/reset-baseline/SKILL.md +22 -0
  226. package/.gemini/extensions/bigpowers/skills/respond-review/SKILL.md +72 -0
  227. package/.gemini/extensions/bigpowers/skills/run-benchmark/SKILL.md +86 -0
  228. package/.gemini/extensions/bigpowers/skills/run-evals/SKILL.md +81 -0
  229. package/.gemini/extensions/bigpowers/skills/run-planning/SKILL.md +102 -0
  230. package/.gemini/extensions/bigpowers/skills/scope-work/SKILL.md +64 -0
  231. package/.gemini/extensions/bigpowers/skills/search-skills/SKILL.md +74 -0
  232. package/.gemini/extensions/bigpowers/skills/security-review/SKILL.md +385 -0
  233. package/.gemini/extensions/bigpowers/skills/seed-conventions/SKILL.md +313 -0
  234. package/.gemini/extensions/bigpowers/skills/session-state/SKILL.md +147 -0
  235. package/.gemini/extensions/bigpowers/skills/setup-environment/SKILL.md +40 -0
  236. package/.gemini/extensions/bigpowers/skills/simple-english/SKILL.md +347 -0
  237. package/.gemini/extensions/bigpowers/skills/simulate-agents/SKILL.md +27 -0
  238. package/.gemini/extensions/bigpowers/skills/slice-tasks/SKILL.md +69 -0
  239. package/.gemini/extensions/bigpowers/skills/smoke-test/SKILL.md +262 -0
  240. package/.gemini/extensions/bigpowers/skills/spike-prototype/SKILL.md +96 -0
  241. package/.gemini/extensions/bigpowers/skills/stocktake-skills/SKILL.md +75 -0
  242. package/.gemini/extensions/bigpowers/skills/survey-context/SKILL.md +136 -0
  243. package/.gemini/extensions/bigpowers/skills/terse-mode/SKILL.md +43 -0
  244. package/.gemini/extensions/bigpowers/skills/trace-requirement/SKILL.md +70 -0
  245. package/.gemini/extensions/bigpowers/skills/using-bigpowers/SKILL.md +112 -0
  246. package/.gemini/extensions/bigpowers/skills/validate-contracts/SKILL.md +287 -0
  247. package/.gemini/extensions/bigpowers/skills/validate-fix/SKILL.md +148 -0
  248. package/.gemini/extensions/bigpowers/skills/verify-work/SKILL.md +192 -0
  249. package/.gemini/extensions/bigpowers/skills/visual-dashboard/SKILL.md +51 -0
  250. package/.gemini/extensions/bigpowers/skills/wire-ci/SKILL.md +382 -0
  251. package/.gemini/extensions/bigpowers/skills/wire-observability/SKILL.md +98 -0
  252. package/.gemini/extensions/bigpowers/skills/write-document/SKILL.md +282 -0
  253. package/.pi/package.json +1 -1
  254. package/CHANGELOG.md +14 -0
  255. package/package.json +1 -1
  256. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  257. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  258. package/scripts/lib/install-helpers.js +33 -17
  259. package/scripts/test-install-helpers.js +31 -0
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: wire-observability
3
+ model: sonnet
4
+ description: "Add structured JSON logging, observability commands, and idempotent setup scripts to a project. Use when a project needs production-readiness instrumentation, when user wants structured logging, or as a production-readiness gate at any phase of development."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Wire Observability
9
+ > **HARD GATE** — **HARD GATE** — Observability is not optional. Before shipping, verify: structured logging is in place, key metrics are instrumented, error cases emit signals. 'We'll add metrics later' becomes 'never.'
10
+
11
+
12
+ Add structured logging, observability commands, and idempotent setup scripts. Can be invoked at any phase — recommended at the end of the first working slice, before the first deploy.
13
+
14
+ ## What this sets up
15
+
16
+ 1. **Structured JSON logging** — machine-readable logs for debugging and observability
17
+ 2. **Observability commands** — how to check the system's health documented in CLAUDE.md
18
+ 3. **Idempotent setup scripts** — scripts that can be run repeatedly without side effects
19
+
20
+ ## Process
21
+
22
+ ### 1. Assess current state
23
+
24
+ Check what's already in place:
25
+ - Is there a logging library? (pino, winston, structlog, zap, slog, etc.)
26
+ - Is logging JSON or plain text?
27
+ - Is there a health check endpoint or command?
28
+ - Are there setup scripts? Are they idempotent?
29
+
30
+ ### 2. Add structured JSON logging
31
+
32
+ **For user-facing CLI output:** plain text is fine.
33
+ **For everything else:** structured JSON.
34
+
35
+ Structured log entry format:
36
+ ```json
37
+ {
38
+ "level": "info",
39
+ "timestamp": "2025-01-15T10:23:45.123Z",
40
+ "message": "User created",
41
+ "userId": "usr_abc123",
42
+ "requestId": "req_xyz789"
43
+ }
44
+ ```
45
+
46
+ Guidelines:
47
+ - Include `level`, `timestamp`, `message` in every entry
48
+ - Add context fields relevant to the operation (userId, requestId, traceId)
49
+ - Log at boundaries: HTTP requests in/out, DB queries, external API calls, background job start/end
50
+ - Log errors with stack traces: `logger.error({ err, context }, "Operation failed")`
51
+ - **Never log secrets, passwords, tokens, or PII**
52
+
53
+ ### 3. Document observability commands in CLAUDE.md
54
+
55
+ Add an "Observability" section to the project's CLAUDE.md:
56
+
57
+ ```markdown
58
+ ## Observability
59
+
60
+ | What | Command |
61
+ |------|---------|
62
+ | View logs | `<log tail command>` |
63
+ | Health check | `<health check command>` |
64
+ | Check DB connection | `<db ping command>` |
65
+ | View metrics | `<metrics command>` |
66
+ ```
67
+
68
+ ### 4. Write idempotent setup scripts
69
+
70
+ An idempotent script can be run multiple times and always produces the same result (no errors on re-run).
71
+
72
+ Pattern: check if the thing already exists before creating it.
73
+
74
+ ```bash
75
+ #!/usr/bin/env bash
76
+ set -euo pipefail
77
+
78
+ # Idempotent: only create if not exists
79
+ if ! psql -c "SELECT 1 FROM pg_database WHERE datname = 'myapp'" | grep -q 1; then
80
+ createdb myapp
81
+ echo "Database created"
82
+ else
83
+ echo "Database already exists, skipping"
84
+ fi
85
+ ```
86
+
87
+ Place setup scripts in `scripts/setup.sh` (or language-appropriate equivalent). Document the command in CLAUDE.md under Commands.
88
+
89
+ ### 5. Verify
90
+
91
+ - [ ] Run the app and confirm JSON logs appear in the correct format
92
+ - [ ] Run `scripts/setup.sh` twice — second run should produce no errors
93
+ - [ ] Health check command returns success
94
+ - [ ] No sensitive data in log output
95
+
96
+ ## BCP Plus Integration
97
+
98
+ This skill maps to **BCP Plus dimension 11 (Quality Attributes)** — specifically performance, reliability, and availability instrumentation. Structured logging, health checks, and idempotent setup scripts are observable manifestations of quality-attribute requirements. The NFR Gate rule applies: standard-expectation items (e.g., "the app should log errors") score 0 with a one-line rationale; only above-standard quality requirements (e.g., p99 latency tracking, SLO-based alerting) contribute to the dimension 11 count. See `docs/references/bcp-plus.md` for the full 13-dimension framework and NFR Gate pattern.
@@ -0,0 +1,282 @@
1
+ ---
2
+ name: write-document
3
+ model: sonnet
4
+ description: "Write, organize, and sync high-integrity technical documents using the BMAD methodology. Ensures every document is Bold, Minimal, Actionable, and Durable. Use when creating architectural docs, technical guides, or organizing the specs/ directory."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Write Document (BMAD)
9
+
10
+ Create high-signal technical documentation that serves as an expert collaborator for both humans and AI. This skill enforces the BMAD principles to prevent context rot and ensure architectural durability.
11
+
12
+ **Distinct from `edit-document`:** Use this skill to create a document that does not yet exist. Use `edit-document` when a document already exists and needs restructuring, clarity, or prose improvements.
13
+
14
+ > **HARD GATE** — Every document must have a clear "Reason for Existence." If a document doesn't provide actionable leverage for a caller or test, do not create it.
15
+
16
+ ## The BMAD Principles
17
+
18
+ | Principle | Execution |
19
+ | :--- | :--- |
20
+ | **B**old | Make strong assertions. Define clear boundaries and "Never" rules. No "it might" or "usually." |
21
+ | **M**inimal | High-density, low-filler. **Circuit Breaker**: If the file exceeds 300 lines or the session exceeds 20 turns, you MUST run `terse-mode` and compact state before saving. |
22
+ | **A**ctionable | Link every doc to a verifiable outcome. **Architectural Docs**: Verify via Gherkin features (`specs/verifications/features/`) or grep-based structure checks (`grep -c "pattern" file`) that prove the design's *constraints* are present. |
23
+ | **D**urable | Design for the long-term. **Scalability**: Use "Nested Indexing"—root files link to module-level `GEMINI.md` indexes; do not list individual sub-files in the root. |
24
+
25
+ ## Process
26
+
27
+ ### 1. Identify the Artifact Type & Scope
28
+
29
+ Choose the correct BMAD-BigPowers artifact:
30
+ - **Decision Record (ADR)**: For "Why" decisions (saved to `specs/adr/`).
31
+ - **Context Map**: For system-wide architectural mapping (`specs/tech-architecture/tech-stack.md`).
32
+ - **Technical Guide**: For "How-to" with verification (saved to `<module>/REFERENCE.md`).
33
+ - **Behavioral Feature**: Gherkin-style compliance specs (saved to `specs/verifications/features/`).
34
+ - **Project README**: Project-facing documentation (saved to `README.md` at project root).
35
+
36
+ **Cross-Cutting Concerns**: If a doc affects multiple modules, place the authoritative source in the lowest common ancestor directory and use "Delegates" (one-line pointers) in sub-directories to maintain the Single Source of Truth without violating the Stepdown Rule.
37
+
38
+ ### 2. Draft with Semantic Velocity
39
+
40
+ > **STREAM CONTINUITY** — When writing file content, output in continuous chunks of ~200 lines. Do not pause. Continue immediately until complete. If you need time, emit a placeholder comment rather than going silent.
41
+
42
+ Write the document focusing on "Expert Collaboration":
43
+ - **Instructions over Descriptions**: Tell the reader (human or AI) exactly how to interact with the system.
44
+ - **Provenance Links**: Link to ADRs, Issues, or Commits to preserve intent.
45
+ - **The Stepdown Rule**: Information should descend exactly one level of abstraction. If a root doc needs to explain a leaf-level detail, it must point to a sub-index first.
46
+
47
+ ### Quick README (Project READMEs only)
48
+
49
+ 1. Ask: "Project name? One-sentence description?"
50
+ 2. Generate `README.md` at project root using the template in [REFERENCE.md](REFERENCE.md) — no TOC, no second interview round.
51
+ 3. Fill gaps from `CLAUDE.md` / `AGENTS.md` commands if available (prefer `AGENTS.md`); use `TODO` markers otherwise.
52
+ 4. Output and suggest `edit-document` for polish.
53
+
54
+ → verify: `test -f README.md && [ "$(grep -c '^## ' README.md)" -ge 7 ]`
55
+
56
+ ### 3. Apply the 94% Quality Gate
57
+
58
+ Before finalizing, audit the document against these red flags:
59
+ - [ ] **Filler Language**: Are there pleasantries or "I hope this helps"? (Delete them).
60
+ - [ ] **Ambiguity**: Are there "usually," "often," or "it depends" without specific conditions?
61
+ - [ ] **Dead Ends**: Does the document end without a "Next Step" or "Verification" command?
62
+ - [ ] **Shallow Content**: Does it restate the code without explaining the *intent* or *contracts*?
63
+
64
+ ### 4. Sync and Organize
65
+
66
+ - **Big Powers Hierarchy**: Place the document in the correct tier (Global -> Project -> Sub-directory). Project READMEs are an exception — they go to project root (`README.md`), not `specs/`.
67
+ - **Nested Indexing**: If adding a module-level doc, ensure the module's `GEMINI.md` is updated. If the module's index is new, add it to the root `GEMINI.md`.
68
+ - **Sync**: Run `scripts/sync-skills.sh` if the document is a `SKILL.md` or affects generated artifacts.
69
+
70
+ ## Rules
71
+
72
+ - **Minimalism is a requirement**: If a document can be a 5-line table, do not make it a 5-line essay.
73
+ - **Verifiable outcomes**: Every technical document must include at least one `verify:` command. For architecture, this can be a `grep` or `run_shell_command` that validates the existence of required files or patterns.
74
+ - **No speculative docs**: Do not write documentation for features that do not exist yet unless explicitly doing `elaborate-spec`.
75
+
76
+
77
+ Suggest next skill: `audit-code` or `sync-skills.sh`.
78
+
79
+ ---
80
+
81
+ # Project README Template
82
+
83
+ Combined from dbader/readme-template and jehna/readme-best-practices. No TOC.
84
+
85
+ ## Navigation
86
+
87
+ | Lines | Section |
88
+ |-------|---------|
89
+ | 1 | Title |
90
+ | 5–40 | Navigation |
91
+ | 41–42 | Sections |
92
+ | 43–54 | 1. Title + Badges |
93
+ | 55–60 | 2. Tagline |
94
+ | 61–64 | 3. Description |
95
+ | 65–67 | 4. Prerequisites |
96
+ | 68–75 | Prerequisites |
97
+ | 76–78 | 5. Installation |
98
+ | 79–89 | Installation |
99
+ | 90–92 | 6. Usage |
100
+ | 93–102 | Usage |
101
+ | 103–105 | 7. Features |
102
+ | 106–113 | Features |
103
+ | 114–116 | 8. Configuration |
104
+ | 117–125 | Configuration |
105
+ | 126–128 | 9. Development Setup |
106
+ | 129–139 | Development |
107
+ | 140–142 | 10. Running Tests |
108
+ | 143–152 | Tests |
109
+ | 153–155 | 11. Contributing |
110
+ | 156–164 | Contributing |
111
+ | 165–167 | 12. Changelog |
112
+ | 168–172 | Changelog |
113
+ | 173–175 | 13. Links |
114
+ | 176–181 | Links |
115
+ | 182–184 | 14. License |
116
+ | 185–191 | License |
117
+ | 192–194 | 15. Credits (optional) |
118
+ | 195–199 | Credits |
119
+ | 200–202 | Verify |
120
+
121
+ ## Sections
122
+
123
+ ### 1. Title + Badges
124
+
125
+ ```markdown
126
+ # Project Name
127
+
128
+ ![License](https://img.shields.io/badge/License-MIT-yellow.svg)
129
+ ![npm version](https://img.shields.io/npm/v/your-package.svg)
130
+
131
+ ```
132
+
133
+ Fill badges from CLAUDE.md stack info if available. Default to license + version badges.
134
+
135
+ ### 2. Tagline
136
+
137
+ ```markdown
138
+ > One-line description of what this project does and why it matters.
139
+ ```
140
+
141
+ ### 3. Description
142
+
143
+ 2-3 paragraphs: what problem it solves, who it's for, and what makes it different.
144
+
145
+ ### 4. Prerequisites
146
+
147
+ ```markdown
148
+ ## Prerequisites
149
+
150
+ - **Runtime**: Node.js v18+ (from CLAUDE.md)
151
+ - **Package manager**: npm (or pnpm/yarn)
152
+ ```
153
+
154
+ Auto-fill from CLAUDE.md commands section when possible.
155
+
156
+ ### 5. Installation
157
+
158
+ ```markdown
159
+ ## Installation
160
+
161
+ ```bash
162
+ npm install -g your-package
163
+ # or
164
+ npx your-package
165
+ ```
166
+ ```
167
+
168
+ Prefer npx one-shot if applicable; list global install as alternative.
169
+
170
+ ### 6. Usage
171
+
172
+ ```markdown
173
+ ## Usage
174
+
175
+ ```bash
176
+ your-command --help
177
+ your-command do-something
178
+ ```
179
+ ```
180
+
181
+ Include the most common 1-2 commands. Link to full docs if they exist.
182
+
183
+ ### 7. Features
184
+
185
+ ```markdown
186
+ ## Features
187
+
188
+ - Feature 1: short description
189
+ - Feature 2: short description
190
+ ```
191
+
192
+ 3-6 bullet points of what the project does. Derived from the project's purpose.
193
+
194
+ ### 8. Configuration
195
+
196
+ ```markdown
197
+ ## Configuration
198
+
199
+ | Variable | Default | Description |
200
+ |----------|---------|-------------|
201
+ | `VAR_NAME` | `value` | What it controls |
202
+ ```
203
+
204
+ Use `TODO` markers if unknown.
205
+
206
+ ### 9. Development Setup
207
+
208
+ ```markdown
209
+ ## Development
210
+
211
+ ```bash
212
+ git clone <repo-url>
213
+ cd project
214
+ npm install
215
+ ```
216
+ ```
217
+
218
+ Auto-fill from CLAUDE.md `Run` and `Build` commands.
219
+
220
+ ### 10. Running Tests
221
+
222
+ ```markdown
223
+ ## Tests
224
+
225
+ ```bash
226
+ npm test
227
+ npm run lint
228
+ ```
229
+ ```
230
+
231
+ Auto-fill from CLAUDE.md `Test` and `Lint` commands.
232
+
233
+ ### 11. Contributing
234
+
235
+ ```markdown
236
+ ## Contributing
237
+
238
+ 1. Fork the repo.
239
+ 2. Create a feature branch (`git checkout -b feature/my-thing`).
240
+ 3. Commit changes (`git commit -am 'Add my thing'`).
241
+ 4. Push (`git push origin feature/my-thing`).
242
+ 5. Open a Pull Request.
243
+ ```
244
+
245
+ ### 12. Changelog
246
+
247
+ ```markdown
248
+ ## Changelog
249
+
250
+ See [CHANGELOG.md](../../CHANGELOG.md) or [Releases](https://github.com/user/repo/releases).
251
+ ```
252
+
253
+ ### 13. Links
254
+
255
+ ```markdown
256
+ ## Links
257
+
258
+ - Repository: https://github.com/user/repo
259
+ - Issue tracker: https://github.com/user/repo/issues
260
+ ```
261
+
262
+ ### 14. License
263
+
264
+ ```markdown
265
+ ## License
266
+
267
+ MIT — see [LICENSE](../../LICENSE) for details.
268
+ ```
269
+
270
+ Detect from CLAUDE.md or project LICENSE file.
271
+
272
+ ### 15. Credits (optional)
273
+
274
+ ```markdown
275
+ ## Credits
276
+
277
+ Built with [bigpowers](https://www.npmjs.com/package/bigpowers).
278
+ ```
279
+
280
+ ## Verify
281
+
282
+ After generation, run: `grep -c "^## " README.md` — expect ≥ 7 section headings.
package/.pi/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.87.4",
3
+ "version": "2.87.6",
4
4
  "description": "81 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"
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [2.87.6](https://github.com/danielvm-git/bigpowers/compare/v2.87.5...v2.87.6) (2026-09-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **install:** refuse to replace non-managed files or dirs during setup ([#114](https://github.com/danielvm-git/bigpowers/issues/114)) ([f866adc](https://github.com/danielvm-git/bigpowers/commit/f866adca03901fc3a2797e968f866176cf604891)), closes [#112](https://github.com/danielvm-git/bigpowers/issues/112)
7
+
8
+ ## [2.87.5](https://github.com/danielvm-git/bigpowers/compare/v2.87.4...v2.87.5) (2026-08-07)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **packaging:** ship .gemini/.cursor in npm tarball — Gemini install works on global installs (BUG-2026-08-07) ([#111](https://github.com/danielvm-git/bigpowers/issues/111)) ([ae174aa](https://github.com/danielvm-git/bigpowers/commit/ae174aae75c0bc0aae4cf95570eb53cdd12670cb))
14
+
1
15
  ## [2.87.4](https://github.com/danielvm-git/bigpowers/compare/v2.87.3...v2.87.4) (2026-08-07)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.87.4",
3
+ "version": "2.87.6",
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": {
@@ -19,6 +19,31 @@
19
19
  const fs = require('fs');
20
20
  const path = require('path');
21
21
 
22
+ // Package root — every link the installer creates points back into this
23
+ // directory, which is how "managed" is detected (see assertReplaceable).
24
+ const REPO_ROOT = path.resolve(__dirname, '..', '..');
25
+
26
+ // Refuse to replace a destination that is not already a bigpowers-managed
27
+ // symlink. Prevents setup from silently destroying a user's own file or
28
+ // directory (e.g. an existing ~/.claude/hooks/rtk-rewrite.sh installed by
29
+ // RTK itself, or a user-authored skills dir with a colliding name). (#112)
30
+ function assertReplaceable(dst) {
31
+ let st;
32
+ try {
33
+ st = fs.lstatSync(dst);
34
+ } catch {
35
+ return; // nothing there — safe to create
36
+ }
37
+ if (st.isSymbolicLink()) {
38
+ const target = fs.readlinkSync(dst);
39
+ if (target.startsWith(REPO_ROOT)) return; // managed by bigpowers — safe to re-link
40
+ }
41
+ throw new Error(
42
+ `Refusing to replace ${dst}: it exists and is not a bigpowers-managed symlink. ` +
43
+ `Back it up or remove it manually, then re-run setup.`
44
+ );
45
+ }
46
+
22
47
  function linkSkills(skillsDir, targetDir) {
23
48
  for (const entry of fs.readdirSync(skillsDir, { withFileTypes: true })) {
24
49
  if (!entry.isDirectory()) continue;
@@ -27,11 +52,8 @@ function linkSkills(skillsDir, targetDir) {
27
52
  const src = path.join(skillsDir, entry.name);
28
53
  const dst = path.join(targetDir, entry.name);
29
54
 
30
- // Remove existing symlink or directory
31
- try {
32
- fs.rmSync(dst, { force: true, recursive: true });
33
- } catch {}
34
-
55
+ assertReplaceable(dst);
56
+ fs.rmSync(dst, { force: true });
35
57
  fs.symlinkSync(src, dst);
36
58
  }
37
59
  }
@@ -42,18 +64,14 @@ function linkDir(src, dst) {
42
64
  `Link source missing: ${src} (run bash scripts/sync-skills.sh first)`
43
65
  );
44
66
  }
45
- // Remove existing symlink or directory
46
- try {
47
- fs.rmSync(dst, { force: true, recursive: true });
48
- } catch {}
67
+ assertReplaceable(dst);
68
+ fs.rmSync(dst, { force: true });
49
69
  fs.symlinkSync(src, dst);
50
70
  }
51
71
 
52
72
  function linkFile(src, dst) {
53
- // Remove existing symlink or file
54
- try {
55
- fs.rmSync(dst, { force: true });
56
- } catch {}
73
+ assertReplaceable(dst);
74
+ fs.rmSync(dst, { force: true });
57
75
  fs.symlinkSync(src, dst);
58
76
  }
59
77
 
@@ -82,10 +100,8 @@ function linkHook(src, dst) {
82
100
  `Hook source missing: ${src} (expected under repo skills/ or scripts/hooks/; fix path or restore file)`
83
101
  );
84
102
  }
85
- // Remove existing symlink or file
86
- try {
87
- fs.rmSync(dst, { force: true });
88
- } catch {}
103
+ assertReplaceable(dst);
104
+ fs.rmSync(dst, { force: true });
89
105
  fs.symlinkSync(src, dst);
90
106
  try { fs.chmodSync(src, 0o755); } catch {}
91
107
  }
@@ -213,6 +213,37 @@ try {
213
213
  'install surface must not reference bare guard-git/ path'
214
214
  );
215
215
 
216
+ // story: BUG-2026-08-07-gemini-hooks-missing-npm-package
217
+ // The npm tarball must ship every path the installer hard-links from the
218
+ // package root. .npmignore edits that strip installer-referenced paths are
219
+ // regressions (Gemini hooks "Hook source missing" on global npm installs).
220
+ {
221
+ const npmignore = fs
222
+ .readFileSync(path.join(ROOT, '.npmignore'), 'utf8')
223
+ .split(/\r?\n/)
224
+ .map((l) => l.trim())
225
+ .filter(Boolean);
226
+ const critical = [
227
+ '.gemini/extensions/bigpowers/hooks/session-start',
228
+ '.gemini/extensions/bigpowers/hooks/run-hook.cmd',
229
+ '.gemini/extensions/bigpowers/hooks/before-tool-git-guard.sh',
230
+ '.cursor/rules',
231
+ '.pi/skills',
232
+ 'skills/audit-code/SKILL.md',
233
+ ];
234
+ const isIgnored = (p) =>
235
+ npmignore.some((pat) => {
236
+ const pp = pat.replace(/\/+$/, '');
237
+ return p === pp || p.startsWith(pp + '/') || p.split('/').includes(pp);
238
+ });
239
+ for (const p of critical) {
240
+ assert.ok(
241
+ !isIgnored(p),
242
+ `.npmignore must not exclude installer-referenced path: ${p} (BUG-2026-08-07)`
243
+ );
244
+ }
245
+ }
246
+
216
247
  console.log('test-install-helpers: ALL PASS');
217
248
  } finally {
218
249
  rmSync(tmpHome, { recursive: true, force: true });