@jspg-ai/coding-bb 0.0.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 (183) hide show
  1. package/README.md +41 -0
  2. package/cbb/dev-standards/rules/cbb-ai-behavior.md +104 -0
  3. package/cbb/dev-standards/rules/cbb-coding-rule.md +50 -0
  4. package/cbb/dev-standards/rules/cbb-priority.md +56 -0
  5. package/cbb/dev-standards/skills/architecture-specs/SKILL.md +129 -0
  6. package/cbb/dev-standards/skills/coding-specs/SKILL.md +376 -0
  7. package/cbb/dev-standards/skills/coding-specs/references/concurrency.md +53 -0
  8. package/cbb/dev-standards/skills/coding-specs/references/config-center.md +16 -0
  9. package/cbb/dev-standards/skills/coding-specs/references/distributed.md +42 -0
  10. package/cbb/dev-standards/skills/coding-specs/references/es-coding.md +60 -0
  11. package/cbb/dev-standards/skills/coding-specs/references/scheduled-task.md +25 -0
  12. package/cbb/dev-standards/skills/coding-specs/references/security.md +11 -0
  13. package/cbb/dev-standards/skills/coding-specs/references/unit-testing.md +43 -0
  14. package/cbb/dev-standards/skills/es-design-specs/SKILL.md +104 -0
  15. package/cbb/dev-standards/skills/mysql-design-specs/SKILL.md +89 -0
  16. package/cbb/lib/install/claude-code.js +20 -0
  17. package/cbb/lib/install/cleanup.js +64 -0
  18. package/cbb/lib/install/init.js +1875 -0
  19. package/cbb/lib/install/qoder.js +20 -0
  20. package/cbb/lib/install/workspaces.js +232 -0
  21. package/cbb/lib/openspec/index.js +554 -0
  22. package/cbb/lib/superpowers/index.js +265 -0
  23. package/cbb/lib/utils/check-update.js +147 -0
  24. package/cbb/lib/utils/checkbox.js +383 -0
  25. package/cbb/lib/utils/gitignore.js +69 -0
  26. package/cbb/lib/utils/output.js +64 -0
  27. package/cbb/lib/utils/settings.js +119 -0
  28. package/cbb/lib/utils/version.js +135 -0
  29. package/cbb/lib/wiki/api-client.js +358 -0
  30. package/cbb/lib/wiki/cli.js +427 -0
  31. package/cbb/lib/wiki/convert.js +464 -0
  32. package/cbb/lib/wiki/index.js +218 -0
  33. package/cbb/lib/wiki/mermaid-guard.js +103 -0
  34. package/cbb/lib/wiki/split.js +131 -0
  35. package/cbb/tools/cbb-decompile-jar/SKILL.md +220 -0
  36. package/cbb/tools/cbb-decompile-jar/scripts/decompile.py +863 -0
  37. package/cbb/tools/cbb-design-to-wiki/SKILL.md +180 -0
  38. package/cbb/tools/cbb-mvn-guide/SKILL.md +281 -0
  39. package/cbb/tools/cbb-mvn-guide/scripts/mvn_jdk_manager.py +378 -0
  40. package/cbb/tools/cbb-mvn-guide/scripts/mvn_pom_jdk_reader.py +197 -0
  41. package/cbb/tools/cbb-plantuml-authoring/SKILL.md +448 -0
  42. package/cbb/tools/cbb-plantuml-authoring/references/drawing-templates.md +479 -0
  43. package/cbb/tools/cbb-wiki-ops/SKILL.md +134 -0
  44. package/cbb/tools/cbb-wiki-ops/scripts/check-auth.js +44 -0
  45. package/cbb/worktrees/_shared/scripts/find-target-worktree.js +96 -0
  46. package/cbb/worktrees/_shared/scripts/find-workspace-root.js +67 -0
  47. package/cbb/worktrees/_shared/scripts/push-core.js +136 -0
  48. package/cbb/worktrees/_shared/scripts/silence-popup.js +23 -0
  49. package/cbb/worktrees/commands/close.md +64 -0
  50. package/cbb/worktrees/commands/extend.md +65 -0
  51. package/cbb/worktrees/commands/init.md +55 -0
  52. package/cbb/worktrees/commands/push.md +42 -0
  53. package/cbb/worktrees/skills/openspec-close-worktree/SKILL.md +449 -0
  54. package/cbb/worktrees/skills/openspec-close-worktree/scripts/check-env.js +76 -0
  55. package/cbb/worktrees/skills/openspec-close-worktree/scripts/check-unarchived.js +48 -0
  56. package/cbb/worktrees/skills/openspec-close-worktree/scripts/delete-branches.js +136 -0
  57. package/cbb/worktrees/skills/openspec-close-worktree/scripts/discover-apps.js +76 -0
  58. package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-target-worktree.js +96 -0
  59. package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-workspace-root.js +67 -0
  60. package/cbb/worktrees/skills/openspec-close-worktree/scripts/remove-worktrees.js +124 -0
  61. package/cbb/worktrees/skills/openspec-close-worktree/scripts/safety-check.js +174 -0
  62. package/cbb/worktrees/skills/openspec-close-worktree/scripts/silence-popup.js +23 -0
  63. package/cbb/worktrees/skills/openspec-extend-worktree/SKILL.md +390 -0
  64. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-env.js +95 -0
  65. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-repos.js +98 -0
  66. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/create-branches-and-worktrees.js +135 -0
  67. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/find-target-worktree.js +96 -0
  68. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/find-workspace-root.js +67 -0
  69. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/install-ai.js +150 -0
  70. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/list-available-apps.js +88 -0
  71. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/push-core.js +136 -0
  72. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/silence-popup.js +23 -0
  73. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/sync-repos.js +93 -0
  74. package/cbb/worktrees/skills/openspec-init-worktree/SKILL.md +539 -0
  75. package/cbb/worktrees/skills/openspec-init-worktree/scripts/auto-open.js +136 -0
  76. package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-env-deep.js +87 -0
  77. package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-env.js +90 -0
  78. package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-repos.js +171 -0
  79. package/cbb/worktrees/skills/openspec-init-worktree/scripts/create-branches.js +103 -0
  80. package/cbb/worktrees/skills/openspec-init-worktree/scripts/create-worktrees.js +154 -0
  81. package/cbb/worktrees/skills/openspec-init-worktree/scripts/find-workspace-root.js +67 -0
  82. package/cbb/worktrees/skills/openspec-init-worktree/scripts/generate-app-options.js +93 -0
  83. package/cbb/worktrees/skills/openspec-init-worktree/scripts/install-ai.js +177 -0
  84. package/cbb/worktrees/skills/openspec-init-worktree/scripts/parse-config.js +67 -0
  85. package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-branches.js +101 -0
  86. package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-core.js +136 -0
  87. package/cbb/worktrees/skills/openspec-init-worktree/scripts/silence-popup.js +23 -0
  88. package/cbb/worktrees/skills/openspec-init-worktree/scripts/sync-repos.js +95 -0
  89. package/cbb/worktrees/skills/openspec-init-worktree/scripts/update-gitignore.js +134 -0
  90. package/cbb/worktrees/skills/openspec-push-worktrees/SKILL.md +307 -0
  91. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/commit-worktrees.js +269 -0
  92. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/find-target-worktree.js +96 -0
  93. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/find-workspace-root.js +67 -0
  94. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/push-core.js +136 -0
  95. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/push-worktrees.js +159 -0
  96. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/silence-popup.js +23 -0
  97. package/config/cbb.yaml +6 -0
  98. package/config/config.sample.json +16 -0
  99. package/config/openspec/config.yaml +28 -0
  100. package/config/openspec/schemas/spec-driven/schema.yaml +247 -0
  101. package/config/openspec/schemas/spec-driven/templates/design.md +475 -0
  102. package/config/openspec/schemas/spec-driven/templates/proposal.md +58 -0
  103. package/config/openspec/schemas/spec-driven/templates/spec.md +8 -0
  104. package/config/openspec/schemas/spec-driven/templates/tasks.md +9 -0
  105. package/config/workspaces.json +15 -0
  106. package/openspec/.version +6 -0
  107. package/openspec/commands/apply.md +182 -0
  108. package/openspec/commands/archive.md +223 -0
  109. package/openspec/commands/bulk-archive.md +334 -0
  110. package/openspec/commands/continue.md +112 -0
  111. package/openspec/commands/explore.md +206 -0
  112. package/openspec/commands/ff.md +111 -0
  113. package/openspec/commands/new.md +70 -0
  114. package/openspec/commands/onboard.md +555 -0
  115. package/openspec/commands/propose.md +157 -0
  116. package/openspec/commands/sync.md +256 -0
  117. package/openspec/commands/update.md +85 -0
  118. package/openspec/commands/verify.md +169 -0
  119. package/openspec/skills/openspec-apply-change/SKILL.md +187 -0
  120. package/openspec/skills/openspec-archive-change/SKILL.md +181 -0
  121. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +338 -0
  122. package/openspec/skills/openspec-continue-change/SKILL.md +117 -0
  123. package/openspec/skills/openspec-explore/SKILL.md +342 -0
  124. package/openspec/skills/openspec-ff-change/SKILL.md +116 -0
  125. package/openspec/skills/openspec-new-change/SKILL.md +76 -0
  126. package/openspec/skills/openspec-onboard/SKILL.md +560 -0
  127. package/openspec/skills/openspec-propose/SKILL.md +162 -0
  128. package/openspec/skills/openspec-sync-specs/SKILL.md +261 -0
  129. package/openspec/skills/openspec-update-change/SKILL.md +90 -0
  130. package/openspec/skills/openspec-verify-change/SKILL.md +174 -0
  131. package/package.json +46 -0
  132. package/superpowers/.version +6 -0
  133. package/superpowers/skills/brainstorming/SKILL.md +250 -0
  134. package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -0
  135. package/superpowers/skills/brainstorming/scripts/helper.js +167 -0
  136. package/superpowers/skills/brainstorming/scripts/server.cjs +723 -0
  137. package/superpowers/skills/brainstorming/scripts/start-server.sh +209 -0
  138. package/superpowers/skills/brainstorming/scripts/stop-server.sh +120 -0
  139. package/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  140. package/superpowers/skills/brainstorming/visual-companion.md +299 -0
  141. package/superpowers/skills/dispatching-parallel-agents/SKILL.md +167 -0
  142. package/superpowers/skills/executing-plans/SKILL.md +64 -0
  143. package/superpowers/skills/finishing-a-development-branch/SKILL.md +225 -0
  144. package/superpowers/skills/receiving-code-review/SKILL.md +205 -0
  145. package/superpowers/skills/requesting-code-review/SKILL.md +95 -0
  146. package/superpowers/skills/requesting-code-review/code-reviewer.md +181 -0
  147. package/superpowers/skills/subagent-driven-development/SKILL.md +568 -0
  148. package/superpowers/skills/subagent-driven-development/implementer-prompt.md +154 -0
  149. package/superpowers/skills/subagent-driven-development/re-review-prompt.md +115 -0
  150. package/superpowers/skills/subagent-driven-development/scripts/review-package +46 -0
  151. package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +40 -0
  152. package/superpowers/skills/subagent-driven-development/scripts/task-brief +41 -0
  153. package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
  154. package/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  155. package/superpowers/skills/systematic-debugging/SKILL.md +283 -0
  156. package/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  157. package/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  158. package/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  159. package/superpowers/skills/systematic-debugging/find-polluter.sh +72 -0
  160. package/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  161. package/superpowers/skills/systematic-debugging/test-academic.md +14 -0
  162. package/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  163. package/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  164. package/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  165. package/superpowers/skills/test-driven-development/SKILL.md +320 -0
  166. package/superpowers/skills/test-driven-development/writing-good-tests.md +198 -0
  167. package/superpowers/skills/using-git-worktrees/SKILL.md +167 -0
  168. package/superpowers/skills/using-superpowers/SKILL.md +63 -0
  169. package/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -0
  170. package/superpowers/skills/using-superpowers/references/codex-tools.md +108 -0
  171. package/superpowers/skills/using-superpowers/references/gemini-tools.md +63 -0
  172. package/superpowers/skills/using-superpowers/references/hermes-tools.md +56 -0
  173. package/superpowers/skills/using-superpowers/references/pi-tools.md +16 -0
  174. package/superpowers/skills/verification-before-completion/SKILL.md +120 -0
  175. package/superpowers/skills/writing-plans/SKILL.md +171 -0
  176. package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  177. package/superpowers/skills/writing-skills/SKILL.md +679 -0
  178. package/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  179. package/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  180. package/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  181. package/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  182. package/superpowers/skills/writing-skills/render-graphs.js +169 -0
  183. package/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: using-superpowers
3
+ description: Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
4
+ ---
5
+
6
+ <SUBAGENT-STOP>
7
+ If you were dispatched as a subagent to execute a specific task, ignore this skill.
8
+ </SUBAGENT-STOP>
9
+
10
+ <EXTREMELY-IMPORTANT>
11
+ If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
12
+
13
+ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
14
+
15
+ This is not negotiable. You cannot rationalize your way out of this.
16
+ </EXTREMELY-IMPORTANT>
17
+
18
+ ## The Rule
19
+
20
+ **Invoke relevant or requested skills BEFORE any response or action** — including clarifying questions, exploring the codebase, or checking files. If it turns out wrong for the situation, you don't have to use it.
21
+
22
+ **Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first.
23
+
24
+ Then announce "Using [skill] to [purpose]" and follow the skill exactly. If it has a checklist, create a todo per item.
25
+
26
+ ## Skill Priority
27
+
28
+ When multiple skills apply, process skills come first — they set the approach, then implementation skills (frontend-design, etc.) carry it out. Brainstorming and systematic-debugging are Superpowers' most common process skills, but the rule holds for any of them.
29
+
30
+ - "Let's build X" → superpowers:brainstorming first, then implementation skills.
31
+ - "Fix this bug" → superpowers:systematic-debugging first, then domain skills.
32
+
33
+ ## Red Flags
34
+
35
+ These thoughts mean STOP—you're rationalizing:
36
+
37
+ | Thought | Reality |
38
+ |---------|---------|
39
+ | "This is just a simple question" | Questions are tasks. Check for skills. |
40
+ | "I need more context first" | Skill check comes BEFORE clarifying questions. |
41
+ | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
42
+ | "I can check git/files quickly" | Files lack conversation context. Check for skills. |
43
+ | "Let me gather information first" | Skills tell you HOW to gather information. |
44
+ | "This doesn't need a formal skill" | If a skill exists, use it. |
45
+ | "I remember this skill" | Skills evolve. Read current version. |
46
+ | "This doesn't count as a task" | Action = task. Check for skills. |
47
+ | "The skill is overkill" | Simple things become complex. Use it. |
48
+ | "I'll just do this one thing first" | Check BEFORE doing anything. |
49
+ | "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
50
+ | "I know what that means" | Knowing the concept ≠ using the skill. Invoke it. |
51
+
52
+ ## Platform Adaptation
53
+
54
+ If your harness appears here, read its reference file for special instructions:
55
+
56
+ - Codex: `references/codex-tools.md`
57
+ - Pi: `references/pi-tools.md`
58
+ - Antigravity: `references/antigravity-tools.md`
59
+ - Hermes Agent: `references/hermes-tools.md`
60
+
61
+ ## User Instructions
62
+
63
+ User instructions (CLAUDE.md, AGENTS.md, GEMINI.md, etc, direct requests) take precedence over skills, which in turn override default behavior. Only skip skill workflows or instructions when your human partner has explicitly told you to.
@@ -0,0 +1,23 @@
1
+ # Antigravity CLI (`agy`) Tool Mapping
2
+
3
+ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On the Antigravity CLI (`agy`) these resolve to the tools below.
4
+
5
+ | Action skills request | Antigravity CLI equivalent |
6
+ |----------------------|----------------------|
7
+ | Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_subagent` with a built-in `TypeName` — `self` for full-capability work, `research` for read-only |
8
+ | Task tracking ("create a todo", "mark complete") | a **task artifact** — `write_to_file` with `IsArtifact: true` and `ArtifactType: "task"` (see [Task tracking](#task-tracking)). **Not** `manage_task`, which manages background processes. |
9
+
10
+ ## Task tracking
11
+
12
+ Antigravity has **no todo tool** (`manage_task` manages background
13
+ processes — `list`/`kill`/`status`/`send_input` — it is *not* a checklist). When a
14
+ skill says to create a todo list or track tasks, maintain a **task artifact**: a
15
+ markdown checklist saved with `write_to_file` (`IsArtifact: true`,
16
+ `ArtifactMetadata.ArtifactType: "task"`), edited with `replace_file_content` /
17
+ `multi_replace_file_content` as you go.
18
+
19
+ At the start of any multi-step task, create the task artifact listing every step of
20
+ your plan. As you complete each step, edit the artifact to mark it done (`- [x]`).
21
+ If the plan changes, update the checklist. Keep it current — it is your source of
22
+ truth for what remains; once the conversation gets long, re-read it before starting
23
+ each step.
@@ -0,0 +1,108 @@
1
+ ## Subagent dispatch requires multi-agent support
2
+
3
+ Add to your Codex config (`~/.codex/config.toml`):
4
+
5
+ ```toml
6
+ [features]
7
+ multi_agent = true
8
+ ```
9
+
10
+ This enables the multi-agent tools that skills like
11
+ `dispatching-parallel-agents` and `subagent-driven-development` use.
12
+ Which tools you get depends on the multi-agent version your model
13
+ preset selects (current presets run V2; older ones run V1). Trust your
14
+ actual tool list over any table — including this one — when they
15
+ disagree.
16
+
17
+ - **Spawning:** give children a clean context with
18
+ `spawn_agent {fork_turns: "none"}`; the default `"all"` copies your
19
+ entire transcript into the child. On Codex 0.145+, role files under
20
+ `~/.codex/agents/` attach to isolated forks via `agent_type`.
21
+ Full-history forks accept `model` and `reasoning_effort` overrides
22
+ (only `agent_type` is refused there) — isolated forks are the SDD
23
+ default for context hygiene, not because overrides require them.
24
+ - **Fix rounds:** resume the implementer with `followup_task` — it
25
+ delivers your message, triggers a turn, and transparently reloads a
26
+ child the harness evicted. Never dispatch a fresh implementer on the
27
+ theory that a spawned agent cannot be messaged again; on V2 it
28
+ always can.
29
+ - **Lifecycle:** V2 has no `close_agent`. Finished children are
30
+ evicted automatically when slots are needed; leaving them unclosed
31
+ costs nothing. Only V1 sessions have `close_agent` — there, close
32
+ reviewers when their review returns, and close each implementer
33
+ after its task's review passes.
34
+ - **Model names:** never copy a model name from a skill, table, or old
35
+ session into `spawn_agent` without checking it against your current
36
+ spawn allowlist — V2 accepts only V2-capable presets and hard-errors
37
+ on the rest.
38
+
39
+ ## Waiting on children
40
+
41
+ `wait_agent` is an event subscription, not a poll: a long wait wakes
42
+ the moment a child produces mailbox activity, with the same latency as
43
+ a short one. Short-timeout polling buys nothing and costs a tool call —
44
+ and a context rebill — per poll. In measured sessions, roughly
45
+ two-thirds of all wait calls were short polls that timed out.
46
+
47
+ - While you still have local work, do not wait at all. A completed
48
+ child's final answer is pushed into your mailbox and arrives with
49
+ your next turn.
50
+ - When you are genuinely idle with children outstanding, wait in
51
+ bounded stretches: `wait_agent` with `timeout_ms` 300000-600000
52
+ (5-10 minutes). After each stretch — wake or timeout — post one
53
+ status line, run `list_agents`, and chase any child that finished
54
+ without reporting. Never stack polls shorter than five minutes; the
55
+ event subscription wakes a bounded stretch just as fast as a short
56
+ one.
57
+ - Completion mail cannot wake an idle controller (it is delivered
58
+ without triggering a turn); covering that idle window is
59
+ `wait_agent`'s only job. A stretch that times out with no activity
60
+ is your cue to reconcile, not to shorten the next stretch.
61
+
62
+ ## Model routing on spawns
63
+
64
+ Every `spawn_agent` you issue — including when you are yourself a
65
+ spawned child running a fan-out — sets `model` AND `reasoning_effort`
66
+ explicitly, per the Model Selection rules of the skill you are
67
+ executing. Setting `model` alone is a trap: the child's effort
68
+ silently resets to that model's default, not to yours.
69
+
70
+ Ask your human partner to add a machine-level backstop to
71
+ `~/.codex/config.toml` so any spawn that slips through still routes to
72
+ a deliberate tier instead of silently inheriting the session's most
73
+ expensive model:
74
+
75
+ ```toml
76
+ [agents]
77
+ default_subagent_model = "<a mid-tier model from your spawn allowlist>"
78
+ default_subagent_reasoning_effort = "medium"
79
+ ```
80
+
81
+ ## Environment Detection
82
+
83
+ Skills that create worktrees or finish branches should detect their
84
+ environment with read-only git commands before proceeding:
85
+
86
+ ```bash
87
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
88
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
89
+ BRANCH=$(git branch --show-current)
90
+ ```
91
+
92
+ - `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
93
+ - `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
94
+
95
+ See `using-git-worktrees` Step 0 and `finishing-a-development-branch`
96
+ Step 1 for how each skill uses these signals.
97
+
98
+ ## Codex App Finishing
99
+
100
+ When the sandbox blocks branch/push operations (detached HEAD in an
101
+ externally managed worktree), the agent commits all work and informs
102
+ the user to use the App's native controls:
103
+
104
+ - **"Create branch"** — names the branch, then commit/push/PR via App UI
105
+ - **"Hand off to local"** — transfers work to the user's local checkout
106
+
107
+ The agent can still run tests, stage files, and output suggested branch
108
+ names, commit messages, and PR descriptions for the user to copy.
@@ -0,0 +1,63 @@
1
+ # Gemini CLI Tool Mapping
2
+
3
+ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Gemini CLI these resolve to the tools below.
4
+
5
+ | Action skills request | Gemini CLI equivalent |
6
+ |----------------------|----------------------|
7
+ | Read a file | `read_file` |
8
+ | Read multiple files at once | `read_many_files` |
9
+ | Create a new file | `write_file` |
10
+ | Edit a file | `replace` |
11
+ | Run a shell command | `run_shell_command` |
12
+ | Search file contents | `grep_search` |
13
+ | Find files by name | `glob` |
14
+ | List files and subdirectories | `list_directory` |
15
+ | Fetch a URL | `web_fetch` |
16
+ | Search the web | `google_web_search` |
17
+ | Invoke a skill | `activate_skill` |
18
+ | Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_agent` with `agent_name: "generalist"` (invocable via `@generalist` chat syntax — see [Subagent support](#subagent-support)) |
19
+ | Multiple parallel dispatches | Multiple `invoke_agent` calls in the same response |
20
+ | Task tracking ("create a todo", "mark complete") | `write_todos` (statuses: pending, in_progress, completed, cancelled, blocked) |
21
+
22
+ ## Instructions file
23
+
24
+ When a skill mentions "your instructions file", on Gemini CLI this is **`GEMINI.md`**. Gemini CLI loads `GEMINI.md` hierarchically: global at `~/.gemini/GEMINI.md`, project-level files in workspace directories and their ancestors, and sub-directory `GEMINI.md` files when a tool accesses files in those directories.
25
+
26
+ ## Personal skills directory
27
+
28
+ User-level skills live at **`~/.gemini/skills/`**, with **`~/.agents/skills/`** as a cross-runtime alias (shared with Codex and Copilot CLI). When both directories exist at the same scope, `.agents/skills/` takes precedence. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
29
+
30
+ ## Subagent support
31
+
32
+ Gemini CLI dispatches subagents through the `invoke_agent` tool, which takes `agent_name` and `prompt` parameters. The same dispatch is also surfaced as a chat-syntax shortcut: typing `@generalist <prompt>` is equivalent to calling `invoke_agent` with `agent_name: "generalist"`. Built-in agent names include `generalist`, `cli_help`, `codebase_investigator`, and (with browser tooling enabled) `browser_agent`.
33
+
34
+ Skills dispatch with `Subagent (general-purpose):` and either reference a prompt-template file (e.g., `superpowers:subagent-driven-development`'s `./implementer-prompt.md`) or supply an inline prompt. On Gemini CLI:
35
+
36
+ | Skill dispatch form | Gemini CLI equivalent |
37
+ |---------------------|----------------------|
38
+ | References a `*-prompt.md` template (implementer, task-reviewer, code-reviewer, etc.) | Fill the template, then `invoke_agent` with `agent_name: "generalist"` and the filled prompt |
39
+ | References `superpowers:requesting-code-review`'s `./code-reviewer.md` | `invoke_agent` with `agent_name: "generalist"` and the filled review template |
40
+ | Inline prompt (no template referenced) | `invoke_agent` with `agent_name: "generalist"` and your inline prompt |
41
+
42
+ ### Prompt filling
43
+
44
+ Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders before passing the complete prompt to `invoke_agent`. The prompt template itself contains the agent's role, review criteria, and expected output format — the subagent will follow it.
45
+
46
+ ### Parallel dispatch
47
+
48
+ Gemini CLI supports parallel subagent dispatch. Issue multiple `invoke_agent` calls in the same response (or multiple `@generalist` invocations in one prompt) to run independent subagent work in parallel. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
49
+
50
+ ## Additional Gemini CLI tools
51
+
52
+ These tools are unique to Gemini CLI:
53
+
54
+ | Tool | Purpose |
55
+ |------|---------|
56
+ | `save_memory` (legacy) | Persist facts across sessions when `experimental.memoryV2 = false` |
57
+ | `get_internal_docs` | Look up Gemini CLI's bundled documentation |
58
+ | `ask_user` | Pose structured questions to the user (text / single-select / multi-select) |
59
+ | `enter_plan_mode` / `exit_plan_mode` | Switch into and out of read-only plan mode |
60
+ | `update_topic` | Update the current conversation's topic / strategic-intent metadata |
61
+ | `complete_task` | Signal that a Gemini subagent has completed and return its result to the parent agent |
62
+ | `tracker_create_task`, `tracker_update_task`, `tracker_get_task`, `tracker_list_tasks`, `tracker_add_dependency`, `tracker_visualize` | Rich task tracker with dependency and visualization support |
63
+ | `read_mcp_resource`, `list_mcp_resources` | MCP resource access |
@@ -0,0 +1,56 @@
1
+ # Hermes Agent Tool Mapping
2
+
3
+ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Hermes Agent these resolve to the tools below.
4
+
5
+ ## Tools
6
+
7
+ | Action skills request | Hermes tool |
8
+ |---|---|
9
+ | Read a file | `read_file` |
10
+ | Create a new file | `write_file` |
11
+ | Edit a file (targeted patch) | `patch` |
12
+ | Run a shell command | `terminal` |
13
+ | Search file contents | `search_files` |
14
+ | Find files by name | `terminal` with `find` |
15
+ | Fetch a URL / read a webpage | `web_extract(urls=[...])` |
16
+ | Search the web | `web_search(query=...)` |
17
+ | Dispatch a subagent | `delegate_task(goal=..., context=..., toolsets=[...], role="leaf")` |
18
+ | Task tracking | `todo` tool |
19
+ | Invoke a skill | `skill_view("skill-name")` |
20
+
21
+ ## Instructions file
22
+
23
+ When a skill mentions "your instructions file," on Hermes Agent this is **`AGENTS.md`** in the project directory, or **`SOUL.md`** globally at `~/.hermes/SOUL.md`.
24
+
25
+ ## Invoking a skill
26
+
27
+ Hermes Agent has a `skills` toolset with `skill_view` and `skills_list` tools.
28
+ To invoke a superpowers skill, use:
29
+
30
+ ```
31
+ skill_view("brainstorming")
32
+ skill_view("test-driven-development")
33
+ ```
34
+
35
+ If `skill_view` cannot find a superpowers skill (it may not appear in the catalog
36
+ until the plugin fully registers it), fall back to reading the SKILL.md directly:
37
+
38
+ ```
39
+ read_file(path="~/.hermes/plugins/superpowers/skills/<skill-name>/SKILL.md")
40
+ ```
41
+
42
+ This fallback is the same mechanism used by other harnesses without native skill loading.
43
+
44
+ ## Subagent dispatch
45
+
46
+ Use `delegate_task` to spawn isolated subagents for parallel or sequential workstreams:
47
+
48
+ ```
49
+ delegate_task(goal="...", context="...", toolsets=[...], role="leaf")
50
+ ```
51
+
52
+ If `delegate_task` is unavailable, do the work inline rather than inventing tool calls.
53
+
54
+ ## Task tracking
55
+
56
+ Use the `todo` tool for task tracking within a session. For multi-agent task boards, use `hermes kanban` CLI if available. Treat older `TodoWrite` references as the task-tracking action.
@@ -0,0 +1,16 @@
1
+ # Pi Tool Mapping
2
+
3
+ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Pi these resolve to the tools below.
4
+
5
+ | Action skills request | Pi equivalent |
6
+ | --- | --- |
7
+ | Dispatch a subagent (`Subagent (general-purpose):` template) | Use an installed subagent tool such as `subagent` from `pi-subagents` if available |
8
+ | Task tracking ("create a todo", "mark complete") | Use an installed todo/task tool if available, otherwise track tasks in the plan or `TODO.md` |
9
+
10
+ ## Subagents
11
+
12
+ Pi core does not ship a standard subagent tool. The `pi-subagents` package is a strong optional companion and provides a `subagent` tool with single-agent, chain, parallel, async, forked-context, and resume/status workflows. If no subagent tool is available, do not fabricate `Task` calls; execute sequentially in the current session or explain that the optional subagent capability is not installed.
13
+
14
+ ## Task lists
15
+
16
+ Pi core does not ship a standard task-list tool. If a todo/task extension is installed, use its documented tool. Otherwise use Superpowers plan files, checklists in Markdown, or a repo-local `TODO.md` for task tracking. Older Superpowers docs may refer to `TodoWrite`; treat that as the task-tracking action above.
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: verification-before-completion
3
+ description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
4
+ ---
5
+
6
+ # Verification Before Completion
7
+
8
+ ## Overview
9
+
10
+ **Core principle:** Evidence before claims, always.
11
+
12
+ **Violating the letter of this rule is violating the spirit of this rule.**
13
+
14
+ ## The Iron Law
15
+
16
+ ```
17
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
18
+ ```
19
+
20
+ If you haven't run the verification command in this message, you cannot claim it passes.
21
+
22
+ ## The Gate Function
23
+
24
+ ```
25
+ BEFORE claiming any status or expressing satisfaction:
26
+
27
+ 1. IDENTIFY: What command proves this claim?
28
+ 2. RUN: Execute the FULL command (fresh, complete)
29
+ 3. READ: Full output, check exit code, count failures
30
+ 4. VERIFY: Does output confirm the claim?
31
+ - If NO: State actual status with evidence
32
+ - If YES: State claim WITH evidence
33
+ 5. ONLY THEN: Make the claim
34
+
35
+ Skip any step = lying, not verifying
36
+ ```
37
+
38
+ ## Common Failures
39
+
40
+ | Claim | Requires | Not Sufficient |
41
+ |-------|----------|----------------|
42
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
43
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
44
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
45
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
46
+ | Regression test works | Red-green cycle verified | Test passes once |
47
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
48
+ | Requirements met | Line-by-line checklist | Tests passing |
49
+
50
+ ## Red Flags - STOP
51
+
52
+ - Using "should", "probably", "seems to"
53
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
54
+ - About to commit/push/PR without verification
55
+ - Trusting agent success reports
56
+ - Relying on partial verification
57
+ - Thinking "just this once"
58
+ - Tired and wanting work over
59
+ - **ANY wording implying success without having run verification**
60
+
61
+ ## Rationalization Prevention
62
+
63
+ | Excuse | Reality |
64
+ |--------|---------|
65
+ | "Should work now" | RUN the verification |
66
+ | "I'm confident" | Confidence ≠ evidence |
67
+ | "Just this once" | No exceptions |
68
+ | "Linter passed" | Linter ≠ compiler |
69
+ | "Agent said success" | Verify independently |
70
+ | "I'm tired" | Exhaustion ≠ excuse |
71
+ | "Partial check is enough" | Partial proves nothing |
72
+ | "Different words so rule doesn't apply" | Spirit over letter |
73
+
74
+ ## Key Patterns
75
+
76
+ **Tests:**
77
+ ```
78
+ ✅ [Run test command] [See: 34/34 pass] "All tests pass"
79
+ ❌ "Should pass now" / "Looks correct"
80
+ ```
81
+
82
+ **Regression tests (TDD Red-Green):**
83
+ ```
84
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
85
+ ❌ "I've written a regression test" (without red-green verification)
86
+ ```
87
+
88
+ **Build:**
89
+ ```
90
+ ✅ [Run build] [See: exit 0] "Build passes"
91
+ ❌ "Linter passed" (linter doesn't check compilation)
92
+ ```
93
+
94
+ **Requirements:**
95
+ ```
96
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
97
+ ❌ "Tests pass, phase complete"
98
+ ```
99
+
100
+ **Agent delegation:**
101
+ ```
102
+ ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
103
+ ❌ Trust agent report
104
+ ```
105
+
106
+ ## When To Apply
107
+
108
+ **ALWAYS before:**
109
+ - ANY variation of success/completion claims
110
+ - ANY expression of satisfaction
111
+ - ANY positive statement about work state
112
+ - Committing, PR creation, task completion
113
+ - Moving to next task
114
+ - Delegating to agents
115
+
116
+ **Rule applies to:**
117
+ - Exact phrases
118
+ - Paraphrases and synonyms
119
+ - Implications of success
120
+ - ANY communication suggesting completion/correctness
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: writing-plans
3
+ description: Use when you have a spec or requirements for a multi-step task, before touching code
4
+ ---
5
+
6
+ # Writing Plans
7
+
8
+ ## Overview
9
+
10
+ Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
11
+
12
+ Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
13
+
14
+ **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15
+
16
+ **Context:** If working in an isolated worktree, it should have been created via the `superpowers:using-git-worktrees` skill at execution time.
17
+
18
+ **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
19
+ - (User preferences for plan location override this default)
20
+
21
+ ## Scope Check
22
+
23
+ If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
24
+
25
+ ## File Structure
26
+
27
+ Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
28
+
29
+ - Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
30
+ - You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
31
+ - Files that change together should live together. Split by responsibility, not by technical layer.
32
+ - In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
33
+
34
+ This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
35
+
36
+ ## Task Right-Sizing
37
+
38
+ A task is the smallest unit that carries its own test cycle and is worth a
39
+ fresh reviewer's gate. When drawing task boundaries: fold setup,
40
+ configuration, scaffolding, and documentation steps into the task whose
41
+ deliverable needs them; split only where a reviewer could meaningfully
42
+ reject one task while approving its neighbor. Each task ends with an
43
+ independently testable deliverable.
44
+
45
+ ## Bite-Sized Task Granularity
46
+
47
+ **Each step is one action (2-5 minutes):**
48
+ - "Write the failing test" - step
49
+ - "Run it to make sure it fails" - step
50
+ - "Implement the minimal code to make the test pass" - step
51
+ - "Run the tests and make sure they pass" - step
52
+ - "Commit" - step
53
+
54
+ ## Plan Document Header
55
+
56
+ **Every plan MUST start with this header:**
57
+
58
+ ```markdown
59
+ # [Feature Name] Implementation Plan
60
+
61
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
62
+
63
+ **Goal:** [One sentence describing what this builds]
64
+
65
+ **Architecture:** [2-3 sentences about approach]
66
+
67
+ **Tech Stack:** [Key technologies/libraries]
68
+
69
+ **Spec:** [path to the spec/design doc this plan implements — the plan
70
+ argues from the spec, so the spec travels with it; executors read both]
71
+
72
+ ## Global Constraints
73
+
74
+ [The spec's project-wide requirements — version floors, dependency limits,
75
+ naming and copy rules, platform requirements — one line each, with exact
76
+ values copied verbatim from the spec. Every task's requirements implicitly
77
+ include this section.]
78
+
79
+ ---
80
+ ```
81
+
82
+ ## Task Structure
83
+
84
+ ````markdown
85
+ ### Task N: [Component Name]
86
+
87
+ **Files:**
88
+ - Create: `exact/path/to/file.py`
89
+ - Modify: `exact/path/to/existing.py:123-145`
90
+ - Test: `tests/exact/path/to/test.py`
91
+
92
+ **Interfaces:**
93
+ - Consumes: [what this task uses from earlier tasks — exact signatures]
94
+ - Produces: [what later tasks rely on — exact function names, parameter
95
+ and return types. A task's implementer sees only their own task; this
96
+ block is how they learn the names and types neighboring tasks use.]
97
+
98
+ - [ ] **Step 1: Write the failing test**
99
+
100
+ ```python
101
+ def test_specific_behavior():
102
+ result = function(input)
103
+ assert result == expected
104
+ ```
105
+
106
+ - [ ] **Step 2: Run test to verify it fails**
107
+
108
+ Run: `pytest tests/path/test.py::test_name -v`
109
+ Expected: FAIL with "function not defined"
110
+
111
+ - [ ] **Step 3: Write minimal implementation**
112
+
113
+ ```python
114
+ def function(input):
115
+ return expected
116
+ ```
117
+
118
+ - [ ] **Step 4: Run test to verify it passes**
119
+
120
+ Run: `pytest tests/path/test.py::test_name -v`
121
+ Expected: PASS
122
+
123
+ - [ ] **Step 5: Commit**
124
+
125
+ ```bash
126
+ git add tests/path/test.py src/path/file.py
127
+ git commit -m "feat: add specific feature"
128
+ ```
129
+ ````
130
+
131
+ ## No Placeholders
132
+
133
+ Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
134
+ - "TBD", "TODO", "implement later", "fill in details"
135
+ - "Add appropriate error handling" / "add validation" / "handle edge cases"
136
+ - "Write tests for the above" (without actual test code)
137
+ - "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
138
+ - Steps that describe what to do without showing how (code blocks required for code steps)
139
+ - References to types, functions, or methods not defined in any task
140
+
141
+ ## Self-Review
142
+
143
+ After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
144
+
145
+ **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
146
+
147
+ **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
148
+
149
+ **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
150
+
151
+ If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
152
+
153
+ ## Execution Handoff
154
+
155
+ After saving the plan, offer execution choice:
156
+
157
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
158
+
159
+ **1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
160
+
161
+ **2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
162
+
163
+ **Which approach?"**
164
+
165
+ **If Subagent-Driven chosen:**
166
+ - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
167
+ - Fresh subagent per task + two-stage review
168
+
169
+ **If Inline Execution chosen:**
170
+ - **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
171
+ - Batch execution with checkpoints for review
@@ -0,0 +1,49 @@
1
+ # Plan Document Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a plan document reviewer subagent.
4
+
5
+ **Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
6
+
7
+ **Dispatch after:** The complete plan is written.
8
+
9
+ ```
10
+ Subagent (general-purpose):
11
+ description: "Review plan document"
12
+ prompt: |
13
+ You are a plan document reviewer. Verify this plan is complete and ready for implementation.
14
+
15
+ **Plan to review:** [PLAN_FILE_PATH]
16
+ **Spec for reference:** [SPEC_FILE_PATH]
17
+
18
+ ## What to Check
19
+
20
+ | Category | What to Look For |
21
+ |----------|------------------|
22
+ | Completeness | TODOs, placeholders, incomplete tasks, missing steps |
23
+ | Spec Alignment | Plan covers spec requirements, no major scope creep |
24
+ | Task Decomposition | Tasks have clear boundaries, steps are actionable |
25
+ | Buildability | Could an engineer follow this plan without getting stuck? |
26
+
27
+ ## Calibration
28
+
29
+ **Only flag issues that would cause real problems during implementation.**
30
+ An implementer building the wrong thing or getting stuck is an issue.
31
+ Minor wording, stylistic preferences, and "nice to have" suggestions are not.
32
+
33
+ Approve unless there are serious gaps — missing requirements from the spec,
34
+ contradictory steps, placeholder content, or tasks so vague they can't be acted on.
35
+
36
+ ## Output Format
37
+
38
+ ## Plan Review
39
+
40
+ **Status:** Approved | Issues Found
41
+
42
+ **Issues (if any):**
43
+ - [Task X, Step Y]: [specific issue] - [why it matters for implementation]
44
+
45
+ **Recommendations (advisory, do not block approval):**
46
+ - [suggestions for improvement]
47
+ ```
48
+
49
+ **Reviewer returns:** Status, Issues (if any), Recommendations