@flyin-ai/alloy 0.1.0 → 0.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +28 -90
  2. package/commands/alloy/apply.md +274 -119
  3. package/commands/alloy/archive.md +116 -60
  4. package/commands/alloy/discard.md +57 -15
  5. package/commands/alloy/finish.md +92 -70
  6. package/commands/alloy/fix.md +282 -53
  7. package/commands/alloy/plan.md +125 -63
  8. package/commands/alloy/references/interaction-style.md +82 -0
  9. package/commands/alloy/references/main-branch-detection.md +32 -0
  10. package/commands/alloy/references/phase-routing.md +21 -0
  11. package/commands/alloy/references/skill-precheck.md +46 -0
  12. package/commands/alloy/start.md +167 -64
  13. package/commands/alloy/status.md +1 -1
  14. package/dist/cli/commands/doctor.d.ts +1 -0
  15. package/dist/cli/commands/doctor.js +28 -6
  16. package/dist/cli/commands/doctor.js.map +1 -1
  17. package/dist/cli/commands/init.js +40 -37
  18. package/dist/cli/commands/init.js.map +1 -1
  19. package/dist/cli/commands/internal/config.d.ts +1 -0
  20. package/dist/cli/commands/internal/config.js +45 -0
  21. package/dist/cli/commands/internal/config.js.map +1 -0
  22. package/dist/cli/commands/internal/guard.js +2 -41
  23. package/dist/cli/commands/internal/guard.js.map +1 -1
  24. package/dist/cli/commands/internal/record.js +10 -47
  25. package/dist/cli/commands/internal/record.js.map +1 -1
  26. package/dist/cli/commands/internal/skill-usage.d.ts +1 -0
  27. package/dist/cli/commands/internal/skill-usage.js +78 -0
  28. package/dist/cli/commands/internal/skill-usage.js.map +1 -0
  29. package/dist/cli/commands/internal/state.js +105 -6
  30. package/dist/cli/commands/internal/state.js.map +1 -1
  31. package/dist/cli/commands/status.d.ts +1 -0
  32. package/dist/cli/commands/status.js +50 -11
  33. package/dist/cli/commands/status.js.map +1 -1
  34. package/dist/cli/commands/update.js +20 -17
  35. package/dist/cli/commands/update.js.map +1 -1
  36. package/dist/cli/index.js +73 -31
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/cli/utils/hash.d.ts +3 -0
  39. package/dist/cli/utils/hash.js +42 -0
  40. package/dist/cli/utils/hash.js.map +1 -0
  41. package/dist/cli/utils/state.d.ts +4 -2
  42. package/dist/cli/utils/state.js +34 -2
  43. package/dist/cli/utils/state.js.map +1 -1
  44. package/dist/core/artifacts.d.ts +3 -0
  45. package/dist/core/artifacts.js +45 -0
  46. package/dist/core/artifacts.js.map +1 -0
  47. package/dist/core/detect-installations.d.ts +19 -0
  48. package/dist/core/detect-installations.js +65 -0
  49. package/dist/core/detect-installations.js.map +1 -0
  50. package/dist/core/openspec.d.ts +2 -1
  51. package/dist/core/openspec.js +30 -12
  52. package/dist/core/openspec.js.map +1 -1
  53. package/dist/core/skills.js +16 -0
  54. package/dist/core/skills.js.map +1 -1
  55. package/dist/core/superpowers.d.ts +8 -1
  56. package/dist/core/superpowers.js +60 -13
  57. package/dist/core/superpowers.js.map +1 -1
  58. package/dist/core/types.d.ts +20 -0
  59. package/dist/utils/format.d.ts +31 -0
  60. package/dist/utils/format.js +101 -0
  61. package/dist/utils/format.js.map +1 -0
  62. package/dist/utils/output.d.ts +16 -0
  63. package/dist/utils/output.js +38 -0
  64. package/dist/utils/output.js.map +1 -0
  65. package/dist/utils/prompt.d.ts +0 -1
  66. package/dist/utils/prompt.js +11 -83
  67. package/dist/utils/prompt.js.map +1 -1
  68. package/openspec/schemas/alloy/instructions/retrospective.md +17 -35
  69. package/openspec/schemas/alloy/templates/design.md +2 -0
  70. package/openspec/schemas/alloy/templates/draft.md +2 -0
  71. package/openspec/schemas/alloy/templates/plans.md +2 -0
  72. package/openspec/schemas/alloy/templates/proposal.md +2 -0
  73. package/openspec/schemas/alloy/templates/retrospective.md +39 -19
  74. package/openspec/schemas/alloy/templates/specs.md +2 -0
  75. package/openspec/schemas/alloy/templates/tasks.md +2 -0
  76. package/package.json +10 -3
  77. package/vendor/superpowers/skills/brainstorming/SKILL.md +164 -0
  78. package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
  79. package/vendor/superpowers/skills/brainstorming/scripts/helper.js +88 -0
  80. package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +354 -0
  81. package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
  82. package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
  83. package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  84. package/vendor/superpowers/skills/brainstorming/visual-companion.md +287 -0
  85. package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
  86. package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
  87. package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +251 -0
  88. package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
  89. package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
  90. package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +168 -0
  91. package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +279 -0
  92. package/vendor/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
  93. package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
  94. package/vendor/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  95. package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  96. package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
  97. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  98. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  99. package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  100. package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
  101. package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  102. package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
  103. package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  104. package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  105. package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  106. package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
  107. package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
  108. package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +215 -0
  109. package/vendor/superpowers/skills/using-superpowers/SKILL.md +117 -0
  110. package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +59 -0
  111. package/vendor/superpowers/skills/using-superpowers/references/copilot-tools.md +42 -0
  112. package/vendor/superpowers/skills/using-superpowers/references/gemini-tools.md +51 -0
  113. package/vendor/superpowers/skills/verification-before-completion/SKILL.md +139 -0
  114. package/vendor/superpowers/skills/writing-plans/SKILL.md +152 -0
  115. package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  116. package/vendor/superpowers/skills/writing-skills/SKILL.md +655 -0
  117. package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  118. package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  119. package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  120. package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  121. package/vendor/superpowers/skills/writing-skills/render-graphs.js +168 -0
  122. package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
@@ -0,0 +1,215 @@
1
+ ---
2
+ name: using-git-worktrees
3
+ description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
4
+ ---
5
+
6
+ # Using Git Worktrees
7
+
8
+ ## Overview
9
+
10
+ Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.
11
+
12
+ **Core principle:** Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.
13
+
14
+ **Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
15
+
16
+ ## Step 0: Detect Existing Isolation
17
+
18
+ **Before creating anything, check if you are already in an isolated workspace.**
19
+
20
+ ```bash
21
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
22
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
23
+ BRANCH=$(git branch --show-current)
24
+ ```
25
+
26
+ **Submodule guard:** `GIT_DIR != GIT_COMMON` is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule:
27
+
28
+ ```bash
29
+ # If this returns a path, you're in a submodule, not a worktree — treat as normal repo
30
+ git rev-parse --show-superproject-working-tree 2>/dev/null
31
+ ```
32
+
33
+ **If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 3 (Project Setup). Do NOT create another worktree.
34
+
35
+ Report with branch state:
36
+ - On a branch: "Already in isolated workspace at `<path>` on branch `<name>`."
37
+ - Detached HEAD: "Already in isolated workspace at `<path>` (detached HEAD, externally managed). Branch creation needed at finish time."
38
+
39
+ **If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout.
40
+
41
+ Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:
42
+
43
+ > "Would you like me to set up an isolated worktree? It protects your current branch from changes."
44
+
45
+ Honor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 3.
46
+
47
+ ## Step 1: Create Isolated Workspace
48
+
49
+ **You have two mechanisms. Try them in this order.**
50
+
51
+ ### 1a. Native Worktree Tools (preferred)
52
+
53
+ The user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to Step 3.
54
+
55
+ Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
56
+
57
+ Only proceed to Step 1b if you have no native worktree tool available.
58
+
59
+ ### 1b. Git Worktree Fallback
60
+
61
+ **Only use this if Step 1a does not apply** — you have no native worktree tool available. Create a worktree manually using git.
62
+
63
+ #### Directory Selection
64
+
65
+ Follow this priority order. Explicit user preference always beats observed filesystem state.
66
+
67
+ 1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.
68
+
69
+ 2. **Check for an existing project-local worktree directory:**
70
+ ```bash
71
+ ls -d .worktrees 2>/dev/null # Preferred (hidden)
72
+ ls -d worktrees 2>/dev/null # Alternative
73
+ ```
74
+ If found, use it. If both exist, `.worktrees` wins.
75
+
76
+ 3. **Check for an existing global directory:**
77
+ ```bash
78
+ project=$(basename "$(git rev-parse --show-toplevel)")
79
+ ls -d ~/.config/superpowers/worktrees/$project 2>/dev/null
80
+ ```
81
+ If found, use it (backward compatibility with legacy global path).
82
+
83
+ 4. **If there is no other guidance available**, default to `.worktrees/` at the project root.
84
+
85
+ #### Safety Verification (project-local directories only)
86
+
87
+ **MUST verify directory is ignored before creating worktree:**
88
+
89
+ ```bash
90
+ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
91
+ ```
92
+
93
+ **If NOT ignored:** Add to .gitignore, commit the change, then proceed.
94
+
95
+ **Why critical:** Prevents accidentally committing worktree contents to repository.
96
+
97
+ Global directories (`~/.config/superpowers/worktrees/`) need no verification.
98
+
99
+ #### Create the Worktree
100
+
101
+ ```bash
102
+ project=$(basename "$(git rev-parse --show-toplevel)")
103
+
104
+ # Determine path based on chosen location
105
+ # For project-local: path="$LOCATION/$BRANCH_NAME"
106
+ # For global: path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
107
+
108
+ git worktree add "$path" -b "$BRANCH_NAME"
109
+ cd "$path"
110
+ ```
111
+
112
+ **Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.
113
+
114
+ ## Step 3: Project Setup
115
+
116
+ Auto-detect and run appropriate setup:
117
+
118
+ ```bash
119
+ # Node.js
120
+ if [ -f package.json ]; then npm install; fi
121
+
122
+ # Rust
123
+ if [ -f Cargo.toml ]; then cargo build; fi
124
+
125
+ # Python
126
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
127
+ if [ -f pyproject.toml ]; then poetry install; fi
128
+
129
+ # Go
130
+ if [ -f go.mod ]; then go mod download; fi
131
+ ```
132
+
133
+ ## Step 4: Verify Clean Baseline
134
+
135
+ Run tests to ensure workspace starts clean:
136
+
137
+ ```bash
138
+ # Use project-appropriate command
139
+ npm test / cargo test / pytest / go test ./...
140
+ ```
141
+
142
+ **If tests fail:** Report failures, ask whether to proceed or investigate.
143
+
144
+ **If tests pass:** Report ready.
145
+
146
+ ### Report
147
+
148
+ ```
149
+ Worktree ready at <full-path>
150
+ Tests passing (<N> tests, 0 failures)
151
+ Ready to implement <feature-name>
152
+ ```
153
+
154
+ ## Quick Reference
155
+
156
+ | Situation | Action |
157
+ |-----------|--------|
158
+ | Already in linked worktree | Skip creation (Step 0) |
159
+ | In a submodule | Treat as normal repo (Step 0 guard) |
160
+ | Native worktree tool available | Use it (Step 1a) |
161
+ | No native tool | Git worktree fallback (Step 1b) |
162
+ | `.worktrees/` exists | Use it (verify ignored) |
163
+ | `worktrees/` exists | Use it (verify ignored) |
164
+ | Both exist | Use `.worktrees/` |
165
+ | Neither exists | Check instruction file, then default `.worktrees/` |
166
+ | Global path exists | Use it (backward compat) |
167
+ | Directory not ignored | Add to .gitignore + commit |
168
+ | Permission error on create | Sandbox fallback, work in place |
169
+ | Tests fail during baseline | Report failures + ask |
170
+ | No package.json/Cargo.toml | Skip dependency install |
171
+
172
+ ## Common Mistakes
173
+
174
+ ### Fighting the harness
175
+
176
+ - **Problem:** Using `git worktree add` when the platform already provides isolation
177
+ - **Fix:** Step 0 detects existing isolation. Step 1a defers to native tools.
178
+
179
+ ### Skipping detection
180
+
181
+ - **Problem:** Creating a nested worktree inside an existing one
182
+ - **Fix:** Always run Step 0 before creating anything
183
+
184
+ ### Skipping ignore verification
185
+
186
+ - **Problem:** Worktree contents get tracked, pollute git status
187
+ - **Fix:** Always use `git check-ignore` before creating project-local worktree
188
+
189
+ ### Assuming directory location
190
+
191
+ - **Problem:** Creates inconsistency, violates project conventions
192
+ - **Fix:** Follow priority: existing > global legacy > instruction file > default
193
+
194
+ ### Proceeding with failing tests
195
+
196
+ - **Problem:** Can't distinguish new bugs from pre-existing issues
197
+ - **Fix:** Report failures, get explicit permission to proceed
198
+
199
+ ## Red Flags
200
+
201
+ **Never:**
202
+ - Create a worktree when Step 0 detects existing isolation
203
+ - Use `git worktree add` when you have a native worktree tool (e.g., `EnterWorktree`). This is the #1 mistake — if you have it, use it.
204
+ - Skip Step 1a by jumping straight to Step 1b's git commands
205
+ - Create worktree without verifying it's ignored (project-local)
206
+ - Skip baseline test verification
207
+ - Proceed with failing tests without asking
208
+
209
+ **Always:**
210
+ - Run Step 0 detection first
211
+ - Prefer native tools over git fallback
212
+ - Follow directory priority: existing > global legacy > instruction file > default
213
+ - Verify directory is ignored for project-local
214
+ - Auto-detect and run project setup
215
+ - Verify clean test baseline
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: using-superpowers
3
+ description: Use when starting any conversation - establishes how to find and use skills, requiring Skill tool 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, skip 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. This is not optional. You cannot rationalize your way out of this.
16
+ </EXTREMELY-IMPORTANT>
17
+
18
+ ## Instruction Priority
19
+
20
+ Superpowers skills override default system prompt behavior, but **user instructions always take precedence**:
21
+
22
+ 1. **User's explicit instructions** (CLAUDE.md, GEMINI.md, AGENTS.md, direct requests) — highest priority
23
+ 2. **Superpowers skills** — override default system behavior where they conflict
24
+ 3. **Default system prompt** — lowest priority
25
+
26
+ If CLAUDE.md, GEMINI.md, or AGENTS.md says "don't use TDD" and a skill says "always use TDD," follow the user's instructions. The user is in control.
27
+
28
+ ## How to Access Skills
29
+
30
+ **In Claude Code:** Use the `Skill` tool. When you invoke a skill, its content is loaded and presented to you—follow it directly. Never use the Read tool on skill files.
31
+
32
+ **In Copilot CLI:** Use the `skill` tool. Skills are auto-discovered from installed plugins. The `skill` tool works the same as Claude Code's `Skill` tool.
33
+
34
+ **In Gemini CLI:** Skills activate via the `activate_skill` tool. Gemini loads skill metadata at session start and activates the full content on demand.
35
+
36
+ **In other environments:** Check your platform's documentation for how skills are loaded.
37
+
38
+ ## Platform Adaptation
39
+
40
+ Skills use Claude Code tool names. Non-CC platforms: see `references/copilot-tools.md` (Copilot CLI), `references/codex-tools.md` (Codex) for tool equivalents. Gemini CLI users get the tool mapping loaded automatically via GEMINI.md.
41
+
42
+ # Using Skills
43
+
44
+ ## The Rule
45
+
46
+ **Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
47
+
48
+ ```dot
49
+ digraph skill_flow {
50
+ "User message received" [shape=doublecircle];
51
+ "About to EnterPlanMode?" [shape=doublecircle];
52
+ "Already brainstormed?" [shape=diamond];
53
+ "Invoke brainstorming skill" [shape=box];
54
+ "Might any skill apply?" [shape=diamond];
55
+ "Invoke Skill tool" [shape=box];
56
+ "Announce: 'Using [skill] to [purpose]'" [shape=box];
57
+ "Has checklist?" [shape=diamond];
58
+ "Create TodoWrite todo per item" [shape=box];
59
+ "Follow skill exactly" [shape=box];
60
+ "Respond (including clarifications)" [shape=doublecircle];
61
+
62
+ "About to EnterPlanMode?" -> "Already brainstormed?";
63
+ "Already brainstormed?" -> "Invoke brainstorming skill" [label="no"];
64
+ "Already brainstormed?" -> "Might any skill apply?" [label="yes"];
65
+ "Invoke brainstorming skill" -> "Might any skill apply?";
66
+
67
+ "User message received" -> "Might any skill apply?";
68
+ "Might any skill apply?" -> "Invoke Skill tool" [label="yes, even 1%"];
69
+ "Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
70
+ "Invoke Skill tool" -> "Announce: 'Using [skill] to [purpose]'";
71
+ "Announce: 'Using [skill] to [purpose]'" -> "Has checklist?";
72
+ "Has checklist?" -> "Create TodoWrite todo per item" [label="yes"];
73
+ "Has checklist?" -> "Follow skill exactly" [label="no"];
74
+ "Create TodoWrite todo per item" -> "Follow skill exactly";
75
+ }
76
+ ```
77
+
78
+ ## Red Flags
79
+
80
+ These thoughts mean STOP—you're rationalizing:
81
+
82
+ | Thought | Reality |
83
+ |---------|---------|
84
+ | "This is just a simple question" | Questions are tasks. Check for skills. |
85
+ | "I need more context first" | Skill check comes BEFORE clarifying questions. |
86
+ | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
87
+ | "I can check git/files quickly" | Files lack conversation context. Check for skills. |
88
+ | "Let me gather information first" | Skills tell you HOW to gather information. |
89
+ | "This doesn't need a formal skill" | If a skill exists, use it. |
90
+ | "I remember this skill" | Skills evolve. Read current version. |
91
+ | "This doesn't count as a task" | Action = task. Check for skills. |
92
+ | "The skill is overkill" | Simple things become complex. Use it. |
93
+ | "I'll just do this one thing first" | Check BEFORE doing anything. |
94
+ | "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
95
+ | "I know what that means" | Knowing the concept ≠ using the skill. Invoke it. |
96
+
97
+ ## Skill Priority
98
+
99
+ When multiple skills could apply, use this order:
100
+
101
+ 1. **Process skills first** (brainstorming, debugging) - these determine HOW to approach the task
102
+ 2. **Implementation skills second** (frontend-design, mcp-builder) - these guide execution
103
+
104
+ "Let's build X" → brainstorming first, then implementation skills.
105
+ "Fix this bug" → debugging first, then domain-specific skills.
106
+
107
+ ## Skill Types
108
+
109
+ **Rigid** (TDD, debugging): Follow exactly. Don't adapt away discipline.
110
+
111
+ **Flexible** (patterns): Adapt principles to context.
112
+
113
+ The skill itself tells you which.
114
+
115
+ ## User Instructions
116
+
117
+ Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.
@@ -0,0 +1,59 @@
1
+ # Codex Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Codex equivalent |
6
+ |-----------------|------------------|
7
+ | `Task` tool (dispatch subagent) | `spawn_agent` (see [Subagent dispatch requires multi-agent support](#subagent-dispatch-requires-multi-agent-support)) |
8
+ | Multiple `Task` calls (parallel) | Multiple `spawn_agent` calls |
9
+ | Task returns result | `wait_agent` |
10
+ | Task completes automatically | `close_agent` to free slot |
11
+ | `TodoWrite` (task tracking) | `update_plan` |
12
+ | `Skill` tool (invoke a skill) | Skills load natively — just follow the instructions |
13
+ | `Read`, `Write`, `Edit` (files) | Use your native file tools |
14
+ | `Bash` (run commands) | Use your native shell tools |
15
+
16
+ ## Subagent dispatch requires multi-agent support
17
+
18
+ Add to your Codex config (`~/.codex/config.toml`):
19
+
20
+ ```toml
21
+ [features]
22
+ multi_agent = true
23
+ ```
24
+
25
+ This enables `spawn_agent`, `wait_agent`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`.
26
+
27
+ Legacy note: Codex builds before `rust-v0.115.0` exposed spawned-agent
28
+ waiting as `wait`. Current Codex uses `wait_agent` for spawned agents. The
29
+ `wait` name now belongs to code-mode `exec/wait`, which resumes a yielded exec
30
+ cell by `cell_id`; it is not the spawned-agent result tool.
31
+
32
+ ## Environment Detection
33
+
34
+ Skills that create worktrees or finish branches should detect their
35
+ environment with read-only git commands before proceeding:
36
+
37
+ ```bash
38
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
39
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
40
+ BRANCH=$(git branch --show-current)
41
+ ```
42
+
43
+ - `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
44
+ - `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
45
+
46
+ See `using-git-worktrees` Step 0 and `finishing-a-development-branch`
47
+ Step 1 for how each skill uses these signals.
48
+
49
+ ## Codex App Finishing
50
+
51
+ When the sandbox blocks branch/push operations (detached HEAD in an
52
+ externally managed worktree), the agent commits all work and informs
53
+ the user to use the App's native controls:
54
+
55
+ - **"Create branch"** — names the branch, then commit/push/PR via App UI
56
+ - **"Hand off to local"** — transfers work to the user's local checkout
57
+
58
+ The agent can still run tests, stage files, and output suggested branch
59
+ names, commit messages, and PR descriptions for the user to copy.
@@ -0,0 +1,42 @@
1
+ # Copilot CLI Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Copilot CLI equivalent |
6
+ |-----------------|----------------------|
7
+ | `Read` (file reading) | `view` |
8
+ | `Write` (file creation) | `create` |
9
+ | `Edit` (file editing) | `edit` |
10
+ | `Bash` (run commands) | `bash` |
11
+ | `Grep` (search file content) | `grep` |
12
+ | `Glob` (search files by name) | `glob` |
13
+ | `Skill` tool (invoke a skill) | `skill` |
14
+ | `WebFetch` | `web_fetch` |
15
+ | `Task` tool (dispatch subagent) | `task` with `agent_type: "general-purpose"` or `"explore"` |
16
+ | Multiple `Task` calls (parallel) | Multiple `task` calls |
17
+ | Task status/output | `read_agent`, `list_agents` |
18
+ | `TodoWrite` (task tracking) | `sql` with built-in `todos` table |
19
+ | `WebSearch` | No equivalent — use `web_fetch` with a search engine URL |
20
+ | `EnterPlanMode` / `ExitPlanMode` | No equivalent — stay in the main session |
21
+
22
+ ## Async shell sessions
23
+
24
+ Copilot CLI supports persistent async shell sessions, which have no direct Claude Code equivalent:
25
+
26
+ | Tool | Purpose |
27
+ |------|---------|
28
+ | `bash` with `async: true` | Start a long-running command in the background |
29
+ | `write_bash` | Send input to a running async session |
30
+ | `read_bash` | Read output from an async session |
31
+ | `stop_bash` | Terminate an async session |
32
+ | `list_bash` | List all active shell sessions |
33
+
34
+ ## Additional Copilot CLI tools
35
+
36
+ | Tool | Purpose |
37
+ |------|---------|
38
+ | `store_memory` | Persist facts about the codebase for future sessions |
39
+ | `report_intent` | Update the UI status line with current intent |
40
+ | `sql` | Query the session's SQLite database (todos, metadata) |
41
+ | `fetch_copilot_cli_documentation` | Look up Copilot CLI documentation |
42
+ | GitHub MCP tools (`github-mcp-server-*`) | Native GitHub API access (issues, PRs, code search) |
@@ -0,0 +1,51 @@
1
+ # Gemini CLI Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Gemini CLI equivalent |
6
+ |-----------------|----------------------|
7
+ | `Read` (file reading) | `read_file` |
8
+ | `Write` (file creation) | `write_file` |
9
+ | `Edit` (file editing) | `replace` |
10
+ | `Bash` (run commands) | `run_shell_command` |
11
+ | `Grep` (search file content) | `grep_search` |
12
+ | `Glob` (search files by name) | `glob` |
13
+ | `TodoWrite` (task tracking) | `write_todos` |
14
+ | `Skill` tool (invoke a skill) | `activate_skill` |
15
+ | `WebSearch` | `google_web_search` |
16
+ | `WebFetch` | `web_fetch` |
17
+ | `Task` tool (dispatch subagent) | `@agent-name` (see [Subagent support](#subagent-support)) |
18
+
19
+ ## Subagent support
20
+
21
+ Gemini CLI supports subagents natively via the `@` syntax. Use the built-in `@generalist` agent to dispatch any task — it has access to all tools and follows the prompt you provide.
22
+
23
+ When a skill says to dispatch a named agent type, use `@generalist` with the full prompt from the skill's prompt template:
24
+
25
+ | Skill instruction | Gemini CLI equivalent |
26
+ |-------------------|----------------------|
27
+ | `Task tool (superpowers:implementer)` | `@generalist` with the filled `implementer-prompt.md` template |
28
+ | `Task tool (superpowers:spec-reviewer)` | `@generalist` with the filled `spec-reviewer-prompt.md` template |
29
+ | `Task tool (superpowers:code-reviewer)` | `@code-reviewer` (bundled agent) or `@generalist` with the filled review prompt |
30
+ | `Task tool (superpowers:code-quality-reviewer)` | `@generalist` with the filled `code-quality-reviewer-prompt.md` template |
31
+ | `Task tool (general-purpose)` with inline prompt | `@generalist` with your inline prompt |
32
+
33
+ ### Prompt filling
34
+
35
+ Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders and pass the complete prompt as the message to `@generalist`. The prompt template itself contains the agent's role, review criteria, and expected output format — `@generalist` will follow it.
36
+
37
+ ### Parallel dispatch
38
+
39
+ Gemini CLI supports parallel subagent dispatch. When a skill asks you to dispatch multiple independent subagent tasks in parallel, request all of those `@generalist` or named subagent tasks together in the same prompt. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
40
+
41
+ ## Additional Gemini CLI tools
42
+
43
+ These tools are available in Gemini CLI but have no Claude Code equivalent:
44
+
45
+ | Tool | Purpose |
46
+ |------|---------|
47
+ | `list_directory` | List files and subdirectories |
48
+ | `save_memory` | Persist facts to GEMINI.md across sessions |
49
+ | `ask_user` | Request structured input from the user |
50
+ | `tracker_create_task` | Rich task management (create, update, list, visualize) |
51
+ | `enter_plan_mode` / `exit_plan_mode` | Switch to read-only research mode before making changes |
@@ -0,0 +1,139 @@
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
+ Claiming work is complete without verification is dishonesty, not efficiency.
11
+
12
+ **Core principle:** Evidence before claims, always.
13
+
14
+ **Violating the letter of this rule is violating the spirit of this rule.**
15
+
16
+ ## The Iron Law
17
+
18
+ ```
19
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
20
+ ```
21
+
22
+ If you haven't run the verification command in this message, you cannot claim it passes.
23
+
24
+ ## The Gate Function
25
+
26
+ ```
27
+ BEFORE claiming any status or expressing satisfaction:
28
+
29
+ 1. IDENTIFY: What command proves this claim?
30
+ 2. RUN: Execute the FULL command (fresh, complete)
31
+ 3. READ: Full output, check exit code, count failures
32
+ 4. VERIFY: Does output confirm the claim?
33
+ - If NO: State actual status with evidence
34
+ - If YES: State claim WITH evidence
35
+ 5. ONLY THEN: Make the claim
36
+
37
+ Skip any step = lying, not verifying
38
+ ```
39
+
40
+ ## Common Failures
41
+
42
+ | Claim | Requires | Not Sufficient |
43
+ |-------|----------|----------------|
44
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
+ | Regression test works | Red-green cycle verified | Test passes once |
49
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
50
+ | Requirements met | Line-by-line checklist | Tests passing |
51
+
52
+ ## Red Flags - STOP
53
+
54
+ - Using "should", "probably", "seems to"
55
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
56
+ - About to commit/push/PR without verification
57
+ - Trusting agent success reports
58
+ - Relying on partial verification
59
+ - Thinking "just this once"
60
+ - Tired and wanting work over
61
+ - **ANY wording implying success without having run verification**
62
+
63
+ ## Rationalization Prevention
64
+
65
+ | Excuse | Reality |
66
+ |--------|---------|
67
+ | "Should work now" | RUN the verification |
68
+ | "I'm confident" | Confidence ≠ evidence |
69
+ | "Just this once" | No exceptions |
70
+ | "Linter passed" | Linter ≠ compiler |
71
+ | "Agent said success" | Verify independently |
72
+ | "I'm tired" | Exhaustion ≠ excuse |
73
+ | "Partial check is enough" | Partial proves nothing |
74
+ | "Different words so rule doesn't apply" | Spirit over letter |
75
+
76
+ ## Key Patterns
77
+
78
+ **Tests:**
79
+ ```
80
+ ✅ [Run test command] [See: 34/34 pass] "All tests pass"
81
+ ❌ "Should pass now" / "Looks correct"
82
+ ```
83
+
84
+ **Regression tests (TDD Red-Green):**
85
+ ```
86
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
87
+ ❌ "I've written a regression test" (without red-green verification)
88
+ ```
89
+
90
+ **Build:**
91
+ ```
92
+ ✅ [Run build] [See: exit 0] "Build passes"
93
+ ❌ "Linter passed" (linter doesn't check compilation)
94
+ ```
95
+
96
+ **Requirements:**
97
+ ```
98
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
99
+ ❌ "Tests pass, phase complete"
100
+ ```
101
+
102
+ **Agent delegation:**
103
+ ```
104
+ ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
105
+ ❌ Trust agent report
106
+ ```
107
+
108
+ ## Why This Matters
109
+
110
+ From 24 failure memories:
111
+ - your human partner said "I don't believe you" - trust broken
112
+ - Undefined functions shipped - would crash
113
+ - Missing requirements shipped - incomplete features
114
+ - Time wasted on false completion → redirect → rework
115
+ - Violates: "Honesty is a core value. If you lie, you'll be replaced."
116
+
117
+ ## When To Apply
118
+
119
+ **ALWAYS before:**
120
+ - ANY variation of success/completion claims
121
+ - ANY expression of satisfaction
122
+ - ANY positive statement about work state
123
+ - Committing, PR creation, task completion
124
+ - Moving to next task
125
+ - Delegating to agents
126
+
127
+ **Rule applies to:**
128
+ - Exact phrases
129
+ - Paraphrases and synonyms
130
+ - Implications of success
131
+ - ANY communication suggesting completion/correctness
132
+
133
+ ## The Bottom Line
134
+
135
+ **No shortcuts for verification.**
136
+
137
+ Run the command. Read the output. THEN claim the result.
138
+
139
+ This is non-negotiable.