engine7 7.1.39 → 7.1.41
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/dist/cli.mjs +438 -255
- package/dist/engine-startup.mjs +3862 -3486
- package/dist/main.mjs +4982 -4606
- package/package.json +1 -1
- package/templates/config.template.json +2 -1
- package/templates/skills/superpowers/brainstorming/SKILL.md +151 -0
- package/templates/skills/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/templates/skills/superpowers/brainstorming/scripts/helper.js +167 -0
- package/templates/skills/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/templates/skills/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/templates/skills/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/templates/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/templates/skills/superpowers/brainstorming/visual-companion.md +298 -0
- package/templates/skills/superpowers/dispatching-parallel-agents/SKILL.md +167 -0
- package/templates/skills/superpowers/executing-plans/SKILL.md +64 -0
- package/templates/skills/superpowers/finishing-a-development-branch/SKILL.md +201 -0
- package/templates/skills/superpowers/receiving-code-review/SKILL.md +205 -0
- package/templates/skills/superpowers/requesting-code-review/SKILL.md +95 -0
- package/templates/skills/superpowers/requesting-code-review/code-reviewer.md +172 -0
- package/templates/skills/superpowers/subagent-driven-development/SKILL.md +503 -0
- package/templates/skills/superpowers/subagent-driven-development/implementer-prompt.md +142 -0
- package/templates/skills/superpowers/subagent-driven-development/re-review-prompt.md +106 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/review-package +46 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/sdd-workspace +40 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/task-brief +41 -0
- package/templates/skills/superpowers/subagent-driven-development/task-reviewer-prompt.md +185 -0
- package/templates/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/templates/skills/superpowers/systematic-debugging/SKILL.md +283 -0
- package/templates/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/templates/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/templates/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/templates/skills/superpowers/systematic-debugging/find-polluter.sh +72 -0
- package/templates/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/templates/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/templates/skills/superpowers/test-driven-development/SKILL.md +320 -0
- package/templates/skills/superpowers/test-driven-development/writing-good-tests.md +198 -0
- package/templates/skills/superpowers/using-git-worktrees/SKILL.md +167 -0
- package/templates/skills/superpowers/using-superpowers/SKILL.md +62 -0
- package/templates/skills/superpowers/using-superpowers/references/antigravity-tools.md +23 -0
- package/templates/skills/superpowers/using-superpowers/references/codex-tools.md +39 -0
- package/templates/skills/superpowers/using-superpowers/references/gemini-tools.md +63 -0
- package/templates/skills/superpowers/using-superpowers/references/pi-tools.md +16 -0
- package/templates/skills/superpowers/verification-before-completion/SKILL.md +120 -0
- package/templates/skills/superpowers/writing-plans/SKILL.md +168 -0
- package/templates/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/templates/skills/superpowers/writing-skills/SKILL.md +679 -0
- package/templates/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/templates/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/templates/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/templates/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/templates/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/templates/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
|
@@ -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 |
|
|
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, close reviewer subagents when their review returns. Keep each implementer subagent open until its task's review passes — the fix loop resumes the implementer — then close it. If your harness cannot send another message to a spawned agent, dispatch each fix round as a fresh implementer carrying the brief, the report file, and the findings.
|
|
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,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,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,168 @@
|
|
|
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
|
+
## Self-Review
|
|
139
|
+
|
|
140
|
+
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.
|
|
141
|
+
|
|
142
|
+
**1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
|
|
143
|
+
|
|
144
|
+
**2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
|
|
145
|
+
|
|
146
|
+
**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.
|
|
147
|
+
|
|
148
|
+
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.
|
|
149
|
+
|
|
150
|
+
## Execution Handoff
|
|
151
|
+
|
|
152
|
+
After saving the plan, offer execution choice:
|
|
153
|
+
|
|
154
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
|
|
155
|
+
|
|
156
|
+
**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
|
|
157
|
+
|
|
158
|
+
**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
|
|
159
|
+
|
|
160
|
+
**Which approach?"**
|
|
161
|
+
|
|
162
|
+
**If Subagent-Driven chosen:**
|
|
163
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
|
|
164
|
+
- Fresh subagent per task + two-stage review
|
|
165
|
+
|
|
166
|
+
**If Inline Execution chosen:**
|
|
167
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
|
|
168
|
+
- 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
|