kilo-superpowers-compose 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +49 -0
- package/README.md +150 -0
- package/agents/compose-dev.md +51 -0
- package/agents/compose-review.md +76 -0
- package/agents/compose.md +107 -0
- package/bin/cli.js +69 -0
- package/bin/install.js +11 -0
- package/bin/lib.js +484 -0
- package/bin/uninstall.js +11 -0
- package/bin/update.js +11 -0
- package/commands/superpowers.md +38 -0
- package/package.json +45 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +291 -0
- package/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/SKILL.md +103 -0
- package/skills/requesting-code-review/code-reviewer.md +172 -0
- package/skills/subagent-driven-development/SKILL.md +418 -0
- package/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/skills/subagent-driven-development/scripts/review-package +44 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/skills/subagent-driven-development/scripts/task-brief +40 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/using-git-worktrees/SKILL.md +202 -0
- package/skills/using-superpowers/SKILL.md +62 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/codex-tools.md +39 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-skills/SKILL.md +689 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +168 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
|
@@ -0,0 +1,202 @@
|
|
|
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 2 (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 2.
|
|
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 2.
|
|
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. **If there is no other guidance available**, default to `.worktrees/` at the project root.
|
|
77
|
+
|
|
78
|
+
#### Safety Verification (project-local directories only)
|
|
79
|
+
|
|
80
|
+
**MUST verify directory is ignored before creating worktree:**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**If NOT ignored:** Add to .gitignore, commit the change, then proceed.
|
|
87
|
+
|
|
88
|
+
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
|
89
|
+
|
|
90
|
+
#### Create the Worktree
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Determine path based on chosen location
|
|
94
|
+
path="$LOCATION/$BRANCH_NAME"
|
|
95
|
+
|
|
96
|
+
git worktree add "$path" -b "$BRANCH_NAME"
|
|
97
|
+
cd "$path"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**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.
|
|
101
|
+
|
|
102
|
+
## Step 2: Project Setup
|
|
103
|
+
|
|
104
|
+
Auto-detect and run appropriate setup:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Node.js
|
|
108
|
+
if [ -f package.json ]; then npm install; fi
|
|
109
|
+
|
|
110
|
+
# Rust
|
|
111
|
+
if [ -f Cargo.toml ]; then cargo build; fi
|
|
112
|
+
|
|
113
|
+
# Python
|
|
114
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
115
|
+
if [ -f pyproject.toml ]; then poetry install; fi
|
|
116
|
+
|
|
117
|
+
# Go
|
|
118
|
+
if [ -f go.mod ]; then go mod download; fi
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Step 3: Verify Clean Baseline
|
|
122
|
+
|
|
123
|
+
Run tests to ensure workspace starts clean:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Use project-appropriate command
|
|
127
|
+
npm test / cargo test / pytest / go test ./...
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**If tests fail:** Report failures, ask whether to proceed or investigate.
|
|
131
|
+
|
|
132
|
+
**If tests pass:** Report ready.
|
|
133
|
+
|
|
134
|
+
### Report
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Worktree ready at <full-path>
|
|
138
|
+
Tests passing (<N> tests, 0 failures)
|
|
139
|
+
Ready to implement <feature-name>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Quick Reference
|
|
143
|
+
|
|
144
|
+
| Situation | Action |
|
|
145
|
+
|-----------|--------|
|
|
146
|
+
| Already in linked worktree | Skip creation (Step 0) |
|
|
147
|
+
| In a submodule | Treat as normal repo (Step 0 guard) |
|
|
148
|
+
| Native worktree tool available | Use it (Step 1a) |
|
|
149
|
+
| No native tool | Git worktree fallback (Step 1b) |
|
|
150
|
+
| `.worktrees/` exists | Use it (verify ignored) |
|
|
151
|
+
| `worktrees/` exists | Use it (verify ignored) |
|
|
152
|
+
| Both exist | Use `.worktrees/` |
|
|
153
|
+
| Neither exists | Check instruction file, then default `.worktrees/` |
|
|
154
|
+
| Directory not ignored | Add to .gitignore + commit |
|
|
155
|
+
| Permission error on create | Sandbox fallback, work in place |
|
|
156
|
+
| Tests fail during baseline | Report failures + ask |
|
|
157
|
+
| No package.json/Cargo.toml | Skip dependency install |
|
|
158
|
+
|
|
159
|
+
## Common Mistakes
|
|
160
|
+
|
|
161
|
+
### Fighting the harness
|
|
162
|
+
|
|
163
|
+
- **Problem:** Using `git worktree add` when the platform already provides isolation
|
|
164
|
+
- **Fix:** Step 0 detects existing isolation. Step 1a defers to native tools.
|
|
165
|
+
|
|
166
|
+
### Skipping detection
|
|
167
|
+
|
|
168
|
+
- **Problem:** Creating a nested worktree inside an existing one
|
|
169
|
+
- **Fix:** Always run Step 0 before creating anything
|
|
170
|
+
|
|
171
|
+
### Skipping ignore verification
|
|
172
|
+
|
|
173
|
+
- **Problem:** Worktree contents get tracked, pollute git status
|
|
174
|
+
- **Fix:** Always use `git check-ignore` before creating project-local worktree
|
|
175
|
+
|
|
176
|
+
### Assuming directory location
|
|
177
|
+
|
|
178
|
+
- **Problem:** Creates inconsistency, violates project conventions
|
|
179
|
+
- **Fix:** Follow priority: explicit instructions > existing project-local directory > default
|
|
180
|
+
|
|
181
|
+
### Proceeding with failing tests
|
|
182
|
+
|
|
183
|
+
- **Problem:** Can't distinguish new bugs from pre-existing issues
|
|
184
|
+
- **Fix:** Report failures, get explicit permission to proceed
|
|
185
|
+
|
|
186
|
+
## Red Flags
|
|
187
|
+
|
|
188
|
+
**Never:**
|
|
189
|
+
- Create a worktree when Step 0 detects existing isolation
|
|
190
|
+
- 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.
|
|
191
|
+
- Skip Step 1a by jumping straight to Step 1b's git commands
|
|
192
|
+
- Create worktree without verifying it's ignored (project-local)
|
|
193
|
+
- Skip baseline test verification
|
|
194
|
+
- Proceed with failing tests without asking
|
|
195
|
+
|
|
196
|
+
**Always:**
|
|
197
|
+
- Run Step 0 detection first
|
|
198
|
+
- Prefer native tools over git fallback
|
|
199
|
+
- Follow directory priority: explicit instructions > existing project-local directory > default
|
|
200
|
+
- Verify directory is ignored for project-local
|
|
201
|
+
- Auto-detect and run project setup
|
|
202
|
+
- Verify clean test baseline
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
|
|
60
|
+
## User Instructions
|
|
61
|
+
|
|
62
|
+
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 (see [Subagent support](#subagent-support)) |
|
|
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,39 @@
|
|
|
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 `spawn_agent`, `wait_agent`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`. When using subagent-driven-development, you should always close implementer and reviewer subagents when they have finished all their work.
|
|
11
|
+
|
|
12
|
+
## Environment Detection
|
|
13
|
+
|
|
14
|
+
Skills that create worktrees or finish branches should detect their
|
|
15
|
+
environment with read-only git commands before proceeding:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
19
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
20
|
+
BRANCH=$(git branch --show-current)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
|
|
24
|
+
- `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
|
|
25
|
+
|
|
26
|
+
See `using-git-worktrees` Step 0 and `finishing-a-development-branch`
|
|
27
|
+
Step 1 for how each skill uses these signals.
|
|
28
|
+
|
|
29
|
+
## Codex App Finishing
|
|
30
|
+
|
|
31
|
+
When the sandbox blocks branch/push operations (detached HEAD in an
|
|
32
|
+
externally managed worktree), the agent commits all work and informs
|
|
33
|
+
the user to use the App's native controls:
|
|
34
|
+
|
|
35
|
+
- **"Create branch"** — names the branch, then commit/push/PR via App UI
|
|
36
|
+
- **"Hand off to local"** — transfers work to the user's local checkout
|
|
37
|
+
|
|
38
|
+
The agent can still run tests, stage files, and output suggested branch
|
|
39
|
+
names, commit messages, and PR descriptions for the user to copy.
|
|
@@ -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,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.
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
## Global Constraints
|
|
70
|
+
|
|
71
|
+
[The spec's project-wide requirements — version floors, dependency limits,
|
|
72
|
+
naming and copy rules, platform requirements — one line each, with exact
|
|
73
|
+
values copied verbatim from the spec. Every task's requirements implicitly
|
|
74
|
+
include this section.]
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Task Structure
|
|
80
|
+
|
|
81
|
+
````markdown
|
|
82
|
+
### Task N: [Component Name]
|
|
83
|
+
|
|
84
|
+
**Files:**
|
|
85
|
+
- Create: `exact/path/to/file.py`
|
|
86
|
+
- Modify: `exact/path/to/existing.py:123-145`
|
|
87
|
+
- Test: `tests/exact/path/to/test.py`
|
|
88
|
+
|
|
89
|
+
**Interfaces:**
|
|
90
|
+
- Consumes: [what this task uses from earlier tasks — exact signatures]
|
|
91
|
+
- Produces: [what later tasks rely on — exact function names, parameter
|
|
92
|
+
and return types. A task's implementer sees only their own task; this
|
|
93
|
+
block is how they learn the names and types neighboring tasks use.]
|
|
94
|
+
|
|
95
|
+
- [ ] **Step 1: Write the failing test**
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
def test_specific_behavior():
|
|
99
|
+
result = function(input)
|
|
100
|
+
assert result == expected
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- [ ] **Step 2: Run test to verify it fails**
|
|
104
|
+
|
|
105
|
+
Run: `pytest tests/path/test.py::test_name -v`
|
|
106
|
+
Expected: FAIL with "function not defined"
|
|
107
|
+
|
|
108
|
+
- [ ] **Step 3: Write minimal implementation**
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
def function(input):
|
|
112
|
+
return expected
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- [ ] **Step 4: Run test to verify it passes**
|
|
116
|
+
|
|
117
|
+
Run: `pytest tests/path/test.py::test_name -v`
|
|
118
|
+
Expected: PASS
|
|
119
|
+
|
|
120
|
+
- [ ] **Step 5: Commit**
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git add tests/path/test.py src/path/file.py
|
|
124
|
+
git commit -m "feat: add specific feature"
|
|
125
|
+
```
|
|
126
|
+
````
|
|
127
|
+
|
|
128
|
+
## No Placeholders
|
|
129
|
+
|
|
130
|
+
Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
|
|
131
|
+
- "TBD", "TODO", "implement later", "fill in details"
|
|
132
|
+
- "Add appropriate error handling" / "add validation" / "handle edge cases"
|
|
133
|
+
- "Write tests for the above" (without actual test code)
|
|
134
|
+
- "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
|
|
135
|
+
- Steps that describe what to do without showing how (code blocks required for code steps)
|
|
136
|
+
- References to types, functions, or methods not defined in any task
|
|
137
|
+
|
|
138
|
+
## Remember
|
|
139
|
+
- Exact file paths always
|
|
140
|
+
- Complete code in every step — if a step changes code, show the code
|
|
141
|
+
- Exact commands with expected output
|
|
142
|
+
- DRY, YAGNI, TDD, frequent commits
|
|
143
|
+
|
|
144
|
+
## Self-Review
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
**1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
|
|
149
|
+
|
|
150
|
+
**2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
|
|
151
|
+
|
|
152
|
+
**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.
|
|
153
|
+
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
## Execution Handoff
|
|
157
|
+
|
|
158
|
+
After saving the plan, offer execution choice:
|
|
159
|
+
|
|
160
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
|
|
161
|
+
|
|
162
|
+
**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
|
|
163
|
+
|
|
164
|
+
**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
|
|
165
|
+
|
|
166
|
+
**Which approach?"**
|
|
167
|
+
|
|
168
|
+
**If Subagent-Driven chosen:**
|
|
169
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
|
|
170
|
+
- Fresh subagent per task + two-stage review
|
|
171
|
+
|
|
172
|
+
**If Inline Execution chosen:**
|
|
173
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
|
|
174
|
+
- Batch execution with checkpoints for review
|