@drunkcoding/agents-and-skills 0.0.7 → 0.0.9
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/.claude-plugin/marketplace.json +18 -2
- package/README.md +1 -0
- package/package.json +1 -1
- package/plugins/html-effectiveness/.claude-plugin/plugin.json +4 -1
- package/plugins/html-effectiveness/commands/html-report.md +13 -0
- package/plugins/team-superpower/.claude-plugin/plugin.json +30 -0
- package/plugins/team-superpower/README.md +150 -0
- package/plugins/team-superpower/agents/designer.md +31 -0
- package/plugins/team-superpower/agents/implementer.md +46 -0
- package/plugins/team-superpower/agents/planner.md +42 -0
- package/plugins/team-superpower/agents/reviewer.md +47 -0
- package/plugins/team-superpower/assets/ESCALATION.md +47 -0
- package/plugins/team-superpower/assets/SESSION_README.md +98 -0
- package/plugins/team-superpower/commands/team-cleanup.md +70 -0
- package/plugins/team-superpower/commands/team-feature-resume.md +111 -0
- package/plugins/team-superpower/commands/team-feature.md +190 -0
- package/plugins/team-superpower/hooks/hooks.json +28 -0
- package/plugins/team-superpower/hooks/task-completed.sh +88 -0
- package/plugins/team-superpower/hooks/task-created.sh +43 -0
- package/plugins/team-superpower/hooks/teammate-idle.sh +45 -0
- package/plugins/team-superpower/scripts/team-state.sh +244 -0
- package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "tech-graph",
|
|
13
13
|
"source": "./plugins/tech-graph",
|
|
14
14
|
"description": "6-step wizard for technical diagrams (SVG/PNG) via fireworks-tech-graph",
|
|
15
|
-
"version": "0.0.
|
|
15
|
+
"version": "0.0.9",
|
|
16
16
|
"category": "diagram",
|
|
17
17
|
"keywords": [
|
|
18
18
|
"diagram",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"name": "html-effectiveness",
|
|
27
27
|
"source": "./plugins/html-effectiveness",
|
|
28
28
|
"description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
|
|
29
|
-
"version": "0.0.
|
|
29
|
+
"version": "0.0.9",
|
|
30
30
|
"category": "reports",
|
|
31
31
|
"keywords": [
|
|
32
32
|
"html",
|
|
@@ -36,6 +36,22 @@
|
|
|
36
36
|
"slide-deck",
|
|
37
37
|
"decision-matrix"
|
|
38
38
|
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "team-superpower",
|
|
42
|
+
"source": "./plugins/team-superpower",
|
|
43
|
+
"description": "Coordination layer that runs the obra/superpowers skill chain across a Claude Code agent team — one /team-feature command takes an idea through brainstorming, plan, TDD implementation, review, and finish with at most 4 owner touchpoints.",
|
|
44
|
+
"version": "0.0.9",
|
|
45
|
+
"category": "workflow",
|
|
46
|
+
"keywords": [
|
|
47
|
+
"agent-teams",
|
|
48
|
+
"superpowers",
|
|
49
|
+
"tdd",
|
|
50
|
+
"orchestration",
|
|
51
|
+
"workflow",
|
|
52
|
+
"brainstorming",
|
|
53
|
+
"code-review"
|
|
54
|
+
]
|
|
39
55
|
}
|
|
40
56
|
]
|
|
41
57
|
}
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Published on npm as [`@drunkcoding/agents-and-skills`](https://www.npmjs.com/pac
|
|
|
10
10
|
|--------|-------------|
|
|
11
11
|
| [`tech-graph`](plugins/tech-graph) | 6-step wizard for technical diagrams (SVG + PNG). |
|
|
12
12
|
| [`html-effectiveness`](plugins/html-effectiveness) | Conversational agent that generates self-contained interactive HTML reports from 20 templates. |
|
|
13
|
+
| [`team-superpower`](plugins/team-superpower) | Agent-team conductor that runs the obra/superpowers skill chain end-to-end with at most 4 owner touchpoints. |
|
|
13
14
|
|
|
14
15
|
## Install
|
|
15
16
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-effectiveness",
|
|
3
3
|
"displayName": "HTML Effectiveness Reports",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|
|
@@ -19,5 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"agents": [
|
|
21
21
|
"agents/report-builder.md"
|
|
22
|
+
],
|
|
23
|
+
"commands": [
|
|
24
|
+
"commands/html-report.md"
|
|
22
25
|
]
|
|
23
26
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Conversational wizard that renders dense info as a self-contained interactive HTML report (status, incident, PR writeup, slide deck, decision matrix, ...).
|
|
3
|
+
argument-hint: [optional one-line intent or path to existing .data.json]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Dispatch the `report-builder` subagent using the Agent tool. Pass `$ARGUMENTS` (which may be empty) as the initial intent seed in the subagent prompt.
|
|
7
|
+
|
|
8
|
+
Subagent dispatch prompt template:
|
|
9
|
+
|
|
10
|
+
> Run the html-effectiveness report wizard. Initial intent seed: `$ARGUMENTS`.
|
|
11
|
+
> If the seed looks like a path to an existing `*.data.json` sidecar, enter the regen flow: load it, ask which slots to change, re-render. Otherwise classify the intent against `plugins/html-effectiveness/templates/manifest.json`, confirm the template pick with the user, fill slots (cap 6 questions), preview the data JSON, then render via `plugins/html-effectiveness/scripts/render.js`. Respect `html-effectiveness.reportDir` from repo `CLAUDE.md` (fallback `docs/reports/`).
|
|
12
|
+
|
|
13
|
+
Do not render or write files in the main thread — the subagent owns the full wizard and the render call.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-superpower",
|
|
3
|
+
"displayName": "Team Superpower",
|
|
4
|
+
"version": "0.0.9",
|
|
5
|
+
"description": "Coordination layer that runs the obra/superpowers skill chain across a Claude Code agent team — one /team-feature command takes an idea through brainstorming, plan, TDD implementation, review, and finish with at most 4 owner touchpoints.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Steven Hoang"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"agent-teams",
|
|
11
|
+
"superpowers",
|
|
12
|
+
"tdd",
|
|
13
|
+
"orchestration",
|
|
14
|
+
"workflow",
|
|
15
|
+
"brainstorming",
|
|
16
|
+
"code-review"
|
|
17
|
+
],
|
|
18
|
+
"agents": [
|
|
19
|
+
"agents/designer.md",
|
|
20
|
+
"agents/planner.md",
|
|
21
|
+
"agents/implementer.md",
|
|
22
|
+
"agents/reviewer.md"
|
|
23
|
+
],
|
|
24
|
+
"commands": [
|
|
25
|
+
"commands/team-feature.md",
|
|
26
|
+
"commands/team-feature-resume.md",
|
|
27
|
+
"commands/team-cleanup.md"
|
|
28
|
+
],
|
|
29
|
+
"hooks": "hooks/hooks.json"
|
|
30
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# team-superpower
|
|
2
|
+
|
|
3
|
+
Coordination layer that runs the [obra/superpowers](https://github.com/obra/superpowers) skill chain across a Claude Code **agent team**. One `/team-feature` command takes an idea through brainstorming → worktree → plan → TDD implementation → review → finish, with at most **4 owner touchpoints**.
|
|
4
|
+
|
|
5
|
+
This plugin is *not* a fork of Superpowers. It consumes Superpowers skills as-installed and only adds the orchestration: who runs which skill, when, and how teammates talk without bothering the owner.
|
|
6
|
+
|
|
7
|
+
## What you get
|
|
8
|
+
|
|
9
|
+
- Three slash commands: `/team-feature`, `/team-feature-resume`, `/team-cleanup`.
|
|
10
|
+
- Four agent roles, each with a tightly-scoped system prompt mapping it to specific Superpowers skills:
|
|
11
|
+
- `designer` — runs `brainstorming`.
|
|
12
|
+
- `planner` — runs `using-git-worktrees`, then `writing-plans`.
|
|
13
|
+
- `implementer` — runs `subagent-driven-development` + `test-driven-development` per task.
|
|
14
|
+
- `reviewer` — runs `requesting-code-review`, then `finishing-a-development-branch`.
|
|
15
|
+
- Three guardrail hooks (registered automatically via `hooks/hooks.json`):
|
|
16
|
+
- `TeammateIdle` — refuses idle while peer mail is unanswered.
|
|
17
|
+
- `TaskCreated` — enforces `impl:`/`review:`/`meta:`/`block:` task title prefixes.
|
|
18
|
+
- `TaskCompleted` — gates `impl:` completions on `plan_approved_at` and validates escalation entries.
|
|
19
|
+
- `scripts/team-state.sh` — the inspection + cleanup helper. Called by the slash commands; also runnable directly.
|
|
20
|
+
- Robustness primitives baked into the workflow:
|
|
21
|
+
- **Preflight scan** in `/team-feature` and `/team-feature-resume` — detects orphaned team config, stale task lists, and in-flight runs before doing anything destructive.
|
|
22
|
+
- **Heartbeat file** at `docs/superpowers/sessions/<slug>.heartbeat` — touched at every phase boundary; cleanup refuses to wipe state while the heartbeat is fresh.
|
|
23
|
+
- **Atomic checkpoint writes** (tmp + rename) — half-written checkpoints can't corrupt recovery.
|
|
24
|
+
- **Automatic cleanup after `FINISH_DONE`** — the lead verifies all phases complete, all commits in place, teammates idle, then runs the canonical "clean up the team" primitive followed by a verification scan. No manual `rm -rf` required.
|
|
25
|
+
- **`/team-cleanup [slug]`** for the case where a previous lead crashed and the canonical cleanup path is no longer available.
|
|
26
|
+
- Templates seeded into your project on first use: `docs/superpowers/ESCALATION.md` (escalation template + 2 worked examples) and `docs/superpowers/README.md` (onboarding + troubleshooting).
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
- Claude Code `2.1.32` or later.
|
|
31
|
+
- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in your environment (the slash command will halt if absent).
|
|
32
|
+
- The Superpowers plugin installed: `/plugin install superpowers@claude-plugins-official`.
|
|
33
|
+
- `jq` on `$PATH` (the hooks degrade to log-only when missing, but you want them enforcing).
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
/plugin marketplace add baoduy/agents-and-skills
|
|
39
|
+
/plugin install team-superpower@drunkcoding
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then make sure the agent-teams env flag is set in `~/.claude/settings.json`:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" },
|
|
47
|
+
"teammateMode": "in-process"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Use
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
/team-feature add a /healthcheck endpoint that returns 200 OK
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You will be interrupted at most four times:
|
|
58
|
+
|
|
59
|
+
1. Brainstorming clarifying questions (batched per phase).
|
|
60
|
+
2. Design sign-off.
|
|
61
|
+
3. Plan approval.
|
|
62
|
+
4. Finish-branch decision (merge / PR / keep / discard).
|
|
63
|
+
|
|
64
|
+
Anything else that reaches you uses the escalation template in `docs/superpowers/ESCALATION.md`. If a teammate pings you without using the template, that's a bug — file it.
|
|
65
|
+
|
|
66
|
+
## Resume after `/resume` drops the team
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
/team-feature-resume YYYY-MM-DD-<slug>.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The lead reads the committed checkpoint in `docs/superpowers/sessions/`, scans `~/.claude/teams/superpower-<slug>/` for orphaned platform state, runs cleanup if the heartbeat indicates the previous lead is dead, then respawns the right teammates and continues from the next unchecked phase. Completed phases are not redone.
|
|
73
|
+
|
|
74
|
+
## Clean up after a crashed lead
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
/team-cleanup <slug>
|
|
78
|
+
/team-cleanup --all
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Use this when a previous lead died (terminal closed, `/resume` lost the team, OS killed the process) and left `~/.claude/teams/superpower-<slug>/` behind. Project-side artefacts under `docs/superpowers/{specs,plans,reviews}` are preserved; only platform-side state is removed.
|
|
82
|
+
|
|
83
|
+
The slash command dry-runs first, prints what would be removed, and asks for confirmation. The heartbeat file at `docs/superpowers/sessions/<slug>.heartbeat` is checked — if it was touched in the last 10 minutes, cleanup refuses unless the owner explicitly confirms with `--ignore-heartbeat` that the previous lead is dead.
|
|
84
|
+
|
|
85
|
+
The helper script is also runnable directly:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bash plugins/team-superpower/scripts/team-state.sh scan # list all teams
|
|
89
|
+
bash plugins/team-superpower/scripts/team-state.sh scan <slug> # inspect one
|
|
90
|
+
bash plugins/team-superpower/scripts/team-state.sh cleanup <slug> # dry-run
|
|
91
|
+
bash plugins/team-superpower/scripts/team-state.sh cleanup <slug> --force # apply
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Automatic cleanup after the feature ships
|
|
95
|
+
|
|
96
|
+
`/team-feature` runs cleanup automatically the instant the reviewer reports `FINISH_DONE` (merge / PR / keep / discard). Before wiping anything, the lead verifies:
|
|
97
|
+
|
|
98
|
+
- every phase from brainstorming through finish is complete in the checkpoint
|
|
99
|
+
- the shared task list has zero in-progress tasks
|
|
100
|
+
- the expected commits exist on the worktree (design, plan, TDD pairs of test + code, review report, and any merge / PR-prep commit per the finish decision)
|
|
101
|
+
- all teammates are idle and shut down
|
|
102
|
+
|
|
103
|
+
Only then does it invoke the canonical "clean up the team" primitive, verify with a scan that `~/.claude/teams/superpower-<slug>/` is gone, and append a `## Closing` block to the checkpoint. If any step fails, the lead halts and instructs the owner to run `/team-cleanup <slug>` manually. **No `rm -rf` runs on a half-finished feature.**
|
|
104
|
+
|
|
105
|
+
## Layout
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
plugins/team-superpower/
|
|
109
|
+
├── .claude-plugin/plugin.json
|
|
110
|
+
├── README.md
|
|
111
|
+
├── agents/
|
|
112
|
+
│ ├── designer.md
|
|
113
|
+
│ ├── planner.md
|
|
114
|
+
│ ├── implementer.md
|
|
115
|
+
│ └── reviewer.md
|
|
116
|
+
├── commands/
|
|
117
|
+
│ ├── team-feature.md
|
|
118
|
+
│ ├── team-feature-resume.md
|
|
119
|
+
│ └── team-cleanup.md
|
|
120
|
+
├── hooks/
|
|
121
|
+
│ ├── hooks.json
|
|
122
|
+
│ ├── teammate-idle.sh
|
|
123
|
+
│ ├── task-created.sh
|
|
124
|
+
│ └── task-completed.sh
|
|
125
|
+
├── scripts/
|
|
126
|
+
│ └── team-state.sh → inspection + cleanup helper, called by the slash commands
|
|
127
|
+
└── assets/
|
|
128
|
+
├── ESCALATION.md → seeded to docs/superpowers/ESCALATION.md on first run
|
|
129
|
+
└── SESSION_README.md → seeded to docs/superpowers/README.md on first run
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Design
|
|
133
|
+
|
|
134
|
+
See the project's `docs/superpowers/README.md` after first run for the operating manual. The short version:
|
|
135
|
+
|
|
136
|
+
- The **lead** is a conductor. It never runs a Superpowers skill itself.
|
|
137
|
+
- Teammates run **canonical, unmodified** Superpowers skills. They are forbidden from paraphrasing or replacing them.
|
|
138
|
+
- TDD is enforced by `subagent-driven-development` + `test-driven-development` per implementer task. The `TaskCompleted` hook is a backstop, not the primary control.
|
|
139
|
+
- All cross-team chatter that needs an owner decision goes through the §7 escalation template. The hook spot-checks the template fields and refuses malformed escalations.
|
|
140
|
+
- Every phase boundary writes a checkpoint to `docs/superpowers/sessions/<slug>.md`. That's the only thing that survives a `/resume` failure — the slash command `/team-feature-resume` reads it back.
|
|
141
|
+
|
|
142
|
+
## Out of scope
|
|
143
|
+
|
|
144
|
+
- Token-usage metrics per teammate per phase.
|
|
145
|
+
- Per-role permission allowlists.
|
|
146
|
+
- Frontend/backend specialist implementers (defer until pattern proves out).
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: designer
|
|
3
|
+
description: Runs the Superpowers `brainstorming` skill end-to-end to produce an owner-approved design document. Owns phase 1 of the team-superpower workflow. Cannot write code, plans, or any artifact outside `docs/superpowers/specs/`.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Designer — Phase 1 (Brainstorming)
|
|
9
|
+
|
|
10
|
+
You are the **designer** teammate on a team-superpower agent team. The lead spawned you to run **one** Superpowers skill: `brainstorming`. Your output is a committed design document that the owner has signed off on. Nothing more.
|
|
11
|
+
|
|
12
|
+
## Hard rules
|
|
13
|
+
|
|
14
|
+
1. Run the unmodified Superpowers `brainstorming` skill at `~/.claude/plugins/superpowers/skills/brainstorming/SKILL.md`. Follow it verbatim. Do not invent steps, skip the visual-companion offer, or collapse the clarifying-question loop. Read the SKILL.md before you do anything else.
|
|
15
|
+
2. **Never** write code, plans, worktree commands, or anything outside `docs/superpowers/specs/`.
|
|
16
|
+
3. Save the design doc to `docs/superpowers/specs/YYYY-MM-DD-<slug>-design.md` and commit it. The brainstorming skill already prescribes this; do not deviate from its filename pattern. The `<slug>` is given to you by the lead in your spawn prompt.
|
|
17
|
+
4. Before sending a clarifying question to the owner, **post it to the lead via mailbox first**. The lead may answer from project context or escalate. Never DM the owner directly.
|
|
18
|
+
5. Every escalation you do raise MUST use the template in `docs/superpowers/ESCALATION.md`. No exceptions, even for one-line questions.
|
|
19
|
+
6. When the owner signs off on the design, post `DESIGN_APPROVED <path>` to the lead's mailbox where `<path>` is the absolute path of the design doc. Then idle.
|
|
20
|
+
|
|
21
|
+
## What you must NOT do
|
|
22
|
+
|
|
23
|
+
- Decide implementation strategy. The plan is the planner's job.
|
|
24
|
+
- Pick a stack, framework, or library beyond what the brainstorming skill explicitly asks you to discuss with the owner.
|
|
25
|
+
- Touch the worktree. There is no worktree yet — it is created in phase 2.
|
|
26
|
+
- Skip the owner sign-off step inside the brainstorming skill. Phase 2 cannot start without an approved design.
|
|
27
|
+
|
|
28
|
+
## When you idle
|
|
29
|
+
|
|
30
|
+
- If you have unanswered inbound peer messages (`from != "lead"`, `replied == false`), the `TeammateIdle` hook will block your idle with `BLOCKED_IDLE`. Either reply or escalate per the template before going idle.
|
|
31
|
+
- After `DESIGN_APPROVED` is posted, idle. The lead will not call you again for this feature.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementer
|
|
3
|
+
description: Executes one `impl:` task at a time via Superpowers `subagent-driven-development` with `test-driven-development` (RED-GREEN-REFACTOR). Owns phase 4 of the team-superpower workflow. Cannot modify the plan or touch files outside its assigned task.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Implementer — Phase 4 (Implementation)
|
|
9
|
+
|
|
10
|
+
You are an **implementer** teammate. There may be one or more of you running in parallel. Your only job: self-claim `impl:`-prefixed tasks from the shared task list and complete each one through the canonical Superpowers chain.
|
|
11
|
+
|
|
12
|
+
## Hard rules
|
|
13
|
+
|
|
14
|
+
1. For every task, run the unmodified Superpowers `subagent-driven-development` skill at `~/.claude/plugins/superpowers/skills/subagent-driven-development/SKILL.md`. It dispatches a fresh subagent for the task and applies the two-stage review (spec compliance, then code quality). Read the SKILL.md before claiming your first task.
|
|
15
|
+
2. Inside that flow, every code change MUST go through the canonical `test-driven-development` skill: RED (failing test first) → GREEN (minimal code to pass) → REFACTOR. **If you ever realise you wrote production code before a failing test existed, delete that code and start the task over.** This is non-negotiable per the TDD skill.
|
|
16
|
+
3. You **may not modify the plan**. If the plan is wrong, halt and escalate to the lead via the §7 template (`docs/superpowers/ESCALATION.md`). The lead will route it to the planner; a plan change requires owner approval.
|
|
17
|
+
4. You **may not edit files assigned to another active implementer task**. Before opening any file, read the shared task list and confirm no `in-progress` task on a peer claims that path. If overlap is unavoidable, post a coordination message to the lead and wait.
|
|
18
|
+
5. Mark a task complete **only** after the two-stage review inside `subagent-driven-development` passes. The `TaskCompleted` hook will reject your completion if `metadata.plan_approved_at` is missing — make sure it's stamped from the lead's plan-approval handoff.
|
|
19
|
+
6. One task at a time. Do not batch.
|
|
20
|
+
|
|
21
|
+
## Task claiming protocol
|
|
22
|
+
|
|
23
|
+
1. Read the shared task list. Pick the lowest-numbered `impl:` task whose dependencies are all complete and whose file scope does not overlap an in-progress peer task.
|
|
24
|
+
2. Mark it in-progress with your teammate id.
|
|
25
|
+
3. Run subagent-driven-development.
|
|
26
|
+
4. On completion (two-stage review passed): mark the task complete with the required metadata.
|
|
27
|
+
|
|
28
|
+
## When the plan is wrong
|
|
29
|
+
|
|
30
|
+
Escalate. Do NOT silently work around it. Example escalation:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
BLOCKED: Task impl:add-user-endpoint specifies POST /users but design doc says PUT /users/{id}. Which is correct?
|
|
34
|
+
Phase: implementation
|
|
35
|
+
Context: Plan task 4 reads "POST /users → 201". Design doc §3 reads "PUT /users/{id} idempotent". I can write either but they are not equivalent and the test I'd write differs.
|
|
36
|
+
Options:
|
|
37
|
+
A. Follow the plan (POST) and let reviewer flag if wrong.
|
|
38
|
+
B. Halt; planner amends; owner re-approves the plan delta.
|
|
39
|
+
C. Owner clarifies design intent directly.
|
|
40
|
+
Recommendation: B — the plan is the source of truth for code, and a plan that contradicts the approved design must be reconciled before more tasks are claimed.
|
|
41
|
+
Need from you: choose A/B/C.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## When you idle
|
|
45
|
+
|
|
46
|
+
After a task completes, claim the next eligible one. If none are available and you have no unanswered inbound mail, idle. The `TeammateIdle` hook will block idle if peer mail is unanswered.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Runs Superpowers `using-git-worktrees` then `writing-plans`. Owns phase 2-3 of the team-superpower workflow. Halts on broken test baseline. Cannot write feature code or modify the design.
|
|
4
|
+
tools: Read, Write, Bash, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Planner — Phase 2 (Worktree) and Phase 3 (Plan)
|
|
9
|
+
|
|
10
|
+
You are the **planner** teammate. You run two Superpowers skills sequentially: first `using-git-worktrees`, then `writing-plans`. Both must be the unmodified canonical versions from `~/.claude/plugins/superpowers/skills/`.
|
|
11
|
+
|
|
12
|
+
## Phase 2 — `using-git-worktrees`
|
|
13
|
+
|
|
14
|
+
1. Read `~/.claude/plugins/superpowers/skills/using-git-worktrees/SKILL.md` first.
|
|
15
|
+
2. Run the skill end-to-end: create the isolated branch, run project setup, verify clean test baseline.
|
|
16
|
+
3. **If the clean-test-baseline check fails, halt immediately and escalate to the lead via the §7 template (`docs/superpowers/ESCALATION.md`).** Do NOT proceed onto a broken baseline. Your escalation must include exact failing test names and the project's setup command output.
|
|
17
|
+
4. When complete, post `WORKTREE_READY <path> <branch>` to the lead's mailbox.
|
|
18
|
+
|
|
19
|
+
## Phase 3 — `writing-plans`
|
|
20
|
+
|
|
21
|
+
1. Read `~/.claude/plugins/superpowers/skills/writing-plans/SKILL.md` first.
|
|
22
|
+
2. Read the approved design doc the lead handed you (path will be in your spawn prompt).
|
|
23
|
+
3. Run the skill verbatim. Every task you produce MUST be 2–5 minutes of work with **exact file paths, complete code, and explicit verification steps**. Anything vaguer than that — fix it before posting.
|
|
24
|
+
4. Each task in the plan MUST also declare:
|
|
25
|
+
- the files it will touch (so the lead can serialize overlapping tasks)
|
|
26
|
+
- a dependency list (which task numbers must complete first)
|
|
27
|
+
5. Save the plan to `docs/superpowers/plans/YYYY-MM-DD-<slug>-plan.md` and commit it.
|
|
28
|
+
6. **Before submitting the plan to the lead**, post the draft to the `reviewer` teammate's mailbox for a sanity-check round (not a full review — just: matches the design doc, task sizing is right, verification steps present). Wait one round. Incorporate or rebut the reviewer's points; do not start a debate loop.
|
|
29
|
+
7. Then post `PLAN_READY <path>` to the lead, who will route it to the owner for approval.
|
|
30
|
+
|
|
31
|
+
## Hard rules
|
|
32
|
+
|
|
33
|
+
- The plan **may not** modify or contradict the approved design doc. If a planning detail forces a design change, halt and escalate to the lead — the design must be re-approved before the plan can change.
|
|
34
|
+
- You **may not** write feature code. None. Not even a stub. The plan describes code; the implementer writes it.
|
|
35
|
+
- You **may not** mark the plan complete until the owner approves it. The lead will tell you.
|
|
36
|
+
|
|
37
|
+
## Escalation
|
|
38
|
+
|
|
39
|
+
Use the §7 template from `docs/superpowers/ESCALATION.md` for any blocker. Common ones:
|
|
40
|
+
- Test baseline is red.
|
|
41
|
+
- Design doc is ambiguous on a load-bearing decision.
|
|
42
|
+
- A task can't be cut to under 5 minutes without losing meaning — flag it instead of hiding the bloat.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Runs Superpowers `requesting-code-review` (phase 5) and `finishing-a-development-branch` (phase 6). Also handles the plan sanity-check round during phase 3. Read-only on feature code.
|
|
4
|
+
tools: Read, Write, Bash, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Reviewer — Phase 3 sanity check, Phase 5 review, Phase 6 finish
|
|
9
|
+
|
|
10
|
+
You are the **reviewer** teammate. You wear three hats at three different points in the workflow. Read this fully before responding to any mail.
|
|
11
|
+
|
|
12
|
+
## Hard rules
|
|
13
|
+
|
|
14
|
+
1. You are **read-only on feature code**. Your write scope is `docs/superpowers/reviews/` only. Never edit production files. If you spot a bug, file it as a review finding, not a fix.
|
|
15
|
+
2. You may not approve your own implementer's work — there is no such case here because you are not an implementer, but the principle stands: review findings must reference the plan and design, not personal preference.
|
|
16
|
+
3. Critical-severity issues in a final review BLOCK phase 6. They go back as new `impl:` tasks in the shared task list, with the responsible implementer named.
|
|
17
|
+
|
|
18
|
+
## Hat 1 — Plan sanity check (phase 3, mailbox round)
|
|
19
|
+
|
|
20
|
+
When the planner posts a draft plan to your mailbox, you have **one round** to respond with:
|
|
21
|
+
- Does the plan cover everything in the approved design doc? Anything missing?
|
|
22
|
+
- Are tasks the right size (2–5 minutes each, exact paths, complete code, verification steps)?
|
|
23
|
+
- Are dependencies and file-scope metadata present on every task?
|
|
24
|
+
|
|
25
|
+
This is **not** a full review. No code is written yet. Reply concisely with a bullet list of issues or `LGTM`. The planner is not obligated to accept your points but must respond to each.
|
|
26
|
+
|
|
27
|
+
## Hat 2 — Final code review (phase 5)
|
|
28
|
+
|
|
29
|
+
After all `impl:` tasks complete, the lead assigns you a `review:` task. Run the unmodified Superpowers `requesting-code-review` skill at `~/.claude/plugins/superpowers/skills/requesting-code-review/SKILL.md`. Read the SKILL.md first.
|
|
30
|
+
|
|
31
|
+
Output:
|
|
32
|
+
- Save the report to `docs/superpowers/reviews/YYYY-MM-DD-<slug>-review.md`, with findings grouped by severity (critical / major / minor / nit).
|
|
33
|
+
- For every critical finding, name the responsible implementer and the failing task number. The lead will file these as fresh `impl:` tasks. Phase 6 does not start until they are resolved and you have re-reviewed.
|
|
34
|
+
- On clean review, post `REVIEW_PASSED <path>` to the lead's mailbox.
|
|
35
|
+
|
|
36
|
+
## Hat 3 — Finish branch (phase 6)
|
|
37
|
+
|
|
38
|
+
Run the unmodified Superpowers `finishing-a-development-branch` skill. It presents the owner with the merge / PR / keep / discard decision. **This is the only owner touchpoint in phase 6.** Do not pre-decide for them.
|
|
39
|
+
|
|
40
|
+
Once the owner chooses, post `FINISH_DONE <decision> <ref>` to the lead and idle. The lead handles team cleanup.
|
|
41
|
+
|
|
42
|
+
## Escalation
|
|
43
|
+
|
|
44
|
+
Use the §7 template in `docs/superpowers/ESCALATION.md` for any blocker. Common ones:
|
|
45
|
+
- Plan and design doc disagree and you can't tell which is canonical.
|
|
46
|
+
- Critical issue but the responsible implementer is unclear (e.g. cross-cutting bug).
|
|
47
|
+
- Finishing skill encounters a dirty worktree.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Escalation template (team-superpower)
|
|
2
|
+
|
|
3
|
+
Every owner-facing question and every "I'm blocked" peer message MUST use this exact format. The `TaskCompleted` hook spot-checks for the field labels, and the lead refuses to forward escalations that don't match.
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
BLOCKED: <one-line question>
|
|
9
|
+
Phase: <brainstorming | worktree | plan | implementation | review | finish>
|
|
10
|
+
Context: <2-4 sentences — what we tried, what we considered, why we are stuck>
|
|
11
|
+
Options:
|
|
12
|
+
A. <option> — <trade-off>
|
|
13
|
+
B. <option> — <trade-off>
|
|
14
|
+
C. <option> — <trade-off> (optional)
|
|
15
|
+
Recommendation: <our pick + one-sentence why>
|
|
16
|
+
Need from you: <choose one | yes/no | other>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
All five labels (`Phase`, `Context`, `Options`, `Recommendation`, `Need from you`) MUST appear. Missing any → the hook blocks the task completion with `BAD_ESCALATION: missing field(s) ...`.
|
|
20
|
+
|
|
21
|
+
## Worked example 1 — peer-to-peer (planner → designer)
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
BLOCKED: Acceptance criterion "fast" on req #4 is not measurable. What does "fast" mean here?
|
|
25
|
+
Phase: plan
|
|
26
|
+
Context: I am sizing tasks for the search endpoint. Design doc §4 says "results must come back fast." The plan needs a concrete number so the test the implementer writes can fail until the number is hit. I considered defaulting to "p95 < 200ms on a 10k-row fixture" but that's me guessing on the owner's behalf.
|
|
27
|
+
Options:
|
|
28
|
+
A. Adopt p95 < 200ms on the 10k-row fixture and proceed — designer can re-open if wrong.
|
|
29
|
+
B. Pause planning; designer amends the design doc with a measurable number; owner re-approves the doc delta.
|
|
30
|
+
C. Drop the criterion from the plan and tag it as a follow-up.
|
|
31
|
+
Recommendation: B — "fast" is the kind of vague that costs a rewrite later, and the design doc is the right place to fix it once.
|
|
32
|
+
Need from you: choose A/B/C.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Worked example 2 — lead-to-owner (plan-vs-design mismatch surfaced mid-implementation)
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
BLOCKED: implementer-1 reports that task impl:add-user-endpoint specifies POST /users, but the approved design doc says PUT /users/{id}. Which is canonical?
|
|
39
|
+
Phase: implementation
|
|
40
|
+
Context: The plan was approved 2026-05-12T09:14Z. Task 4 reads "POST /users → 201 Created with body". Design doc §3 (approved 2026-05-12T08:51Z) reads "idempotent PUT /users/{id}, 200 or 201". Both choices change the test the implementer writes in the RED step. We have not yet written code for this task — TDD held the line.
|
|
41
|
+
Options:
|
|
42
|
+
A. Owner confirms PUT /users/{id} is correct → planner amends task 4 → owner re-approves the plan delta → implementer proceeds.
|
|
43
|
+
B. Owner confirms POST /users is correct → designer amends the design doc → owner re-approves the design delta → implementer proceeds.
|
|
44
|
+
C. Owner reopens the design question entirely (the two APIs imply different semantics).
|
|
45
|
+
Recommendation: A — the design doc was approved first and the discrepancy reads as a plan-writing slip, not a design change. But this is a load-bearing decision and we won't move without your call.
|
|
46
|
+
Need from you: choose A/B/C.
|
|
47
|
+
```
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Superpowers session workspace
|
|
2
|
+
|
|
3
|
+
This directory holds the artifacts produced by `/team-feature` runs. The team-superpower plugin seeds it on first use; afterwards, the design / plan / review / checkpoint files for each feature are written by the team and committed.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
docs/superpowers/
|
|
9
|
+
├── ESCALATION.md # template — referenced by every teammate
|
|
10
|
+
├── README.md # this file
|
|
11
|
+
├── specs/ YYYY-MM-DD-<slug>-design.md # written by designer (phase 1)
|
|
12
|
+
├── plans/ YYYY-MM-DD-<slug>-plan.md # written by planner (phase 3)
|
|
13
|
+
├── reviews/ YYYY-MM-DD-<slug>-review.md # written by reviewer (phase 5)
|
|
14
|
+
└── sessions/ YYYY-MM-DD-<slug>.md # checkpoint, updated by lead each phase
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## How to launch
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
/team-feature <one-line feature idea>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The lead handles prechecks, spawns the team, and drives the Superpowers skill chain.
|
|
24
|
+
|
|
25
|
+
## Owner touchpoints (max 4 per feature)
|
|
26
|
+
|
|
27
|
+
1. **Brainstorming clarifying questions.** The designer batches them per phase; you answer in plain English.
|
|
28
|
+
2. **Design sign-off.** The brainstorming skill's built-in approval step.
|
|
29
|
+
3. **Plan approval.** Before any implementer task starts.
|
|
30
|
+
4. **Finish-branch decision.** Merge / PR / keep / discard at phase 6.
|
|
31
|
+
|
|
32
|
+
Anything else that reaches you must use the §7 escalation template in `ESCALATION.md`. Refuse questions that don't follow it — that's the contract.
|
|
33
|
+
|
|
34
|
+
## Reading a checkpoint
|
|
35
|
+
|
|
36
|
+
`sessions/YYYY-MM-DD-<slug>.md` is the source of truth for in-flight features. Each phase boundary appends or updates:
|
|
37
|
+
|
|
38
|
+
- The `## Phases` checklist (which phases are done, file paths to the artifacts).
|
|
39
|
+
- The `## Teammates` block (role, agent id, current task or `idle`).
|
|
40
|
+
- The `## Open escalations` block (anything blocking the owner or a peer).
|
|
41
|
+
|
|
42
|
+
The lead commits this file after every phase transition. If the lead crashes, your feature lives in this file.
|
|
43
|
+
|
|
44
|
+
## Recovery — `/team-feature-resume`
|
|
45
|
+
|
|
46
|
+
If `/resume` drops the team mid-feature (the platform doesn't restore in-process teammates yet), use:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
/team-feature-resume <checkpoint-filename>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The lead reads the checkpoint, respawns the right teammates, and continues from the next unchecked phase. Completed phases are not redone. A resume-log entry is appended to the checkpoint for the audit trail.
|
|
53
|
+
|
|
54
|
+
## Cleanup model
|
|
55
|
+
|
|
56
|
+
The lead is the only thing that knows when a team's work is done. There is no `TeamShutdown` hook event, so cleanup is driven by the slash commands:
|
|
57
|
+
|
|
58
|
+
- **Automatic**, the happy path: `/team-feature` runs cleanup immediately after `FINISH_DONE`. The lead verifies all phases complete, all expected commits in place, every teammate idle, then invokes the canonical "clean up the team" primitive and confirms with a final scan. A `## Closing` block is appended to the checkpoint.
|
|
59
|
+
- **Manual**, the orphan path: if a lead crashed and left `~/.claude/teams/superpower-<slug>/` behind, run `/team-cleanup <slug>` from a fresh session. The slash command dry-runs first, prints what would be removed, asks for confirmation, then applies. The heartbeat file (`docs/superpowers/sessions/<slug>.heartbeat`) protects against wiping a live team — if it was touched in the last 10 minutes, cleanup refuses unless you explicitly confirm with `--ignore-heartbeat`.
|
|
60
|
+
|
|
61
|
+
Project-side artefacts (`specs/`, `plans/`, `reviews/`, and the checkpoint itself) are **always preserved**. Only platform-side state under `~/.claude/teams/superpower-<slug>/` and `~/.claude/tasks/superpower-<slug>/` is removed, plus any matching tmux session.
|
|
62
|
+
|
|
63
|
+
## Heartbeat protocol
|
|
64
|
+
|
|
65
|
+
The lead touches `docs/superpowers/sessions/<slug>.heartbeat` at every phase boundary. Future sessions read its mtime to decide whether a previous lead is still alive:
|
|
66
|
+
|
|
67
|
+
- mtime < 10 minutes → lead is likely alive; cleanup refuses without explicit override.
|
|
68
|
+
- mtime ≥ 10 minutes (or file missing) → safe to clean up.
|
|
69
|
+
|
|
70
|
+
If you ever want to confirm liveness manually:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
bash plugins/team-superpower/scripts/team-state.sh scan <slug>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Troubleshooting
|
|
77
|
+
|
|
78
|
+
| Symptom | What it usually means | First thing to check |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `BLOCKED_IDLE: N unanswered peer messages` from a teammate | A peer asked the teammate something and they tried to idle without replying | Open the teammate's mailbox, reply or escalate |
|
|
81
|
+
| `BAD_PREFIX` on a new task | The lead created a task without the `impl:`/`review:`/`meta:`/`block:` prefix | Lead's bug — fix the task title |
|
|
82
|
+
| `NO_PLAN_APPROVAL` blocking a task complete | An `impl:` task is missing `metadata.plan_approved_at` | Lead forgot to stamp tasks after owner plan-approval; backfill from the checkpoint timestamp |
|
|
83
|
+
| `BAD_ESCALATION: missing field(s) ...` | A teammate posted a blocker without all five template fields | Rewrite using the full template in `ESCALATION.md` |
|
|
84
|
+
| Lead refuses to ping the owner | The teammate's request to escalate didn't use the §7 template | Same as above |
|
|
85
|
+
| Teammate ran a non-Superpowers approximation of a skill | Teammate paraphrased the SKILL.md instead of following it | The agent's system prompt requires the canonical skill — re-spawn and remind it explicitly |
|
|
86
|
+
| Two implementers want the same file | Plan didn't capture file-scope metadata for the overlapping tasks | Serialize by holding one; planner should backfill file-scope on the plan |
|
|
87
|
+
| `REFUSED: heartbeat ... is Ns old` from cleanup | Heartbeat is fresh — cleanup script thinks a lead is alive | Verify nothing's running; if certain the previous lead is dead, run with `--ignore-heartbeat` |
|
|
88
|
+
| `/team-feature` halts at preflight | Stale team config left over from a previous run | Run `/team-cleanup <slug>` (or resume via `/team-feature-resume`) |
|
|
89
|
+
| Auto-cleanup skipped after FINISH_DONE | One of Step A's preconditions failed (missing commits, in-progress tasks, etc.) | Read the lead's halt reason; once resolved, run `/team-cleanup <slug>` |
|
|
90
|
+
| Hook log noise | Hooks write tuning data to `.claude/hooks/log.jsonl` | Inspect the file; trim or refine matchers if a hook is over-triggering |
|
|
91
|
+
|
|
92
|
+
## Emergency bypass
|
|
93
|
+
|
|
94
|
+
`--dangerously-skip-permissions` will let a single task ship without the hooks firing. **Don't.** The hooks exist because Superpowers gates exist. Use the escalation template to surface the blocker properly.
|
|
95
|
+
|
|
96
|
+
## Where the methodology lives
|
|
97
|
+
|
|
98
|
+
The team-superpower plugin is purely the coordination layer. The actual development discipline (TDD, plan format, two-stage review, branch hygiene) is owned by the upstream [obra/superpowers](https://github.com/obra/superpowers) skills. If a skill's behaviour changes, the team picks it up automatically — agents reference skills by name, not by content.
|