@drunkcoding/agents-and-skills 0.0.24 → 0.0.25
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 +5 -5
- package/package.json +1 -1
- package/plugins/auto-power/.claude-plugin/plugin.json +1 -1
- package/plugins/html-effectiveness/.claude-plugin/plugin.json +1 -1
- package/plugins/plugin-validator/.claude-plugin/plugin.json +1 -1
- package/plugins/team-superpower/.claude-plugin/plugin.json +1 -1
- package/plugins/team-superpower/README.md +13 -13
- package/plugins/team-superpower/agents/backend-developer.md +2 -2
- package/plugins/team-superpower/agents/frontend-developer.md +2 -2
- package/plugins/team-superpower/agents/qc-engineer.md +6 -6
- package/plugins/team-superpower/agents/team-leader.md +8 -8
- package/plugins/team-superpower/assets/ESCALATION.md +1 -1
- package/plugins/team-superpower/assets/SESSION_README.md +0 -1
- package/plugins/team-superpower/commands/team-feature.md +54 -52
- package/plugins/team-superpower/hooks/teammate-idle.sh +6 -13
- package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
- package/plugins/team-superpower/agents/orchestrator.md +0 -83
|
@@ -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.25",
|
|
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.25",
|
|
30
30
|
"category": "reports",
|
|
31
31
|
"keywords": [
|
|
32
32
|
"html",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"name": "team-superpower",
|
|
42
42
|
"source": "./plugins/team-superpower",
|
|
43
43
|
"description": "Shape-adaptive engineering team that runs the Superpowers skill chain across up to 8 roles — designer, planner, software-architect, security-engineer, backend-developer, frontend-developer, qa-engineer, reviewer — driven by a `team-superpower` block in CLAUDE.md. Spawns 7 or 8 roles depending on stack (full-stack / be-only / fe-only), enforces contract sync between BE and FE, and gates the finish branch on CI green.",
|
|
44
|
-
"version": "0.0.
|
|
44
|
+
"version": "0.0.25",
|
|
45
45
|
"category": "workflow",
|
|
46
46
|
"keywords": [
|
|
47
47
|
"agent-teams",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"name": "plugin-validator",
|
|
61
61
|
"source": "./plugins/plugin-validator",
|
|
62
62
|
"description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
|
|
63
|
-
"version": "0.0.
|
|
63
|
+
"version": "0.0.25",
|
|
64
64
|
"category": "tooling",
|
|
65
65
|
"keywords": [
|
|
66
66
|
"validation",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"name": "auto-power",
|
|
77
77
|
"source": "./plugins/auto-power",
|
|
78
78
|
"description": "Single-command hands-off pipeline wrapping obra/superpowers. Auto-answers safe clarifying questions during spec, then runs plan → arch+sec → impl → verify → review → ff-merge with no further touchpoints. Checkpointed and resumable; escalates only on substantive failures.",
|
|
79
|
-
"version": "0.0.
|
|
79
|
+
"version": "0.0.25",
|
|
80
80
|
"category": "workflow",
|
|
81
81
|
"keywords": [
|
|
82
82
|
"superpowers",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-power",
|
|
3
3
|
"displayName": "Auto Power",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"description": "Single-command, hands-off pipeline that wraps obra/superpowers: auto-answers safe clarifying questions during spec, then runs plan → arch+sec → impl → verify → review → ff-merge with no further touchpoints. Checkpointed and resumable; escalates only on substantive failures (security, architecture, repeated QA fail, semantic conflict).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|
|
@@ -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.25",
|
|
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"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plugin-validator",
|
|
3
3
|
"displayName": "Plugin Validator",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-superpower",
|
|
3
3
|
"displayName": "Team Superpower",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"description": "Shape-adaptive coordination layer that runs the obra/superpowers skill chain across a Claude Code agent team — one /team-feature command takes an idea through design, plan, pre-impl architecture+security gate, BE/FE implementation, QA gate, code review, CI gate, and finish with at most 3 owner touchpoints. Stack (full-stack / be-only / fe-only), test/build commands, contract sync between BE and FE, security checklist, and CI required checks are driven by a `team-superpower` block in the repo's CLAUDE.md.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|
|
@@ -9,11 +9,11 @@ This plugin is *not* a fork of Superpowers. It consumes Superpowers skills
|
|
|
9
9
|
as-installed and adds the orchestration: who runs which skill, when, and how
|
|
10
10
|
teammates talk without bothering the owner.
|
|
11
11
|
|
|
12
|
-
## Overview (
|
|
12
|
+
## Overview (v6)
|
|
13
13
|
|
|
14
14
|
team-superpower runs **one Agent Teams team** per feature across all phases.
|
|
15
|
-
The
|
|
16
|
-
|
|
15
|
+
The main session is the sole spawner; a coordinating teammate (team-leader)
|
|
16
|
+
requests spawns via `SPAWN_REQUEST`.
|
|
17
17
|
|
|
18
18
|
**Modes:**
|
|
19
19
|
|
|
@@ -52,13 +52,14 @@ security-engineer is only spawned when `security.domain ∈
|
|
|
52
52
|
- Two slash commands: `/team-feature` and `/team-cleanup`. There is **no
|
|
53
53
|
separate resume command in v5** — `/team-feature` auto-detects in-progress
|
|
54
54
|
features.
|
|
55
|
-
- **
|
|
55
|
+
- **Seven agent roles** (v6 — the main session itself runs the lifecycle),
|
|
56
|
+
each with a tightly-scoped system prompt:
|
|
56
57
|
|
|
57
58
|
## Agents
|
|
58
59
|
|
|
59
60
|
| Agent | Lifetime | Role |
|
|
60
61
|
|---|---|---|
|
|
61
|
-
| `
|
|
62
|
+
| _main session_ (the `/team-feature` invocation itself) | Whole feature | Sole spawner; mode pick, TeamCreate, SPAWN_REQUEST + RESTART_REQUEST handler, cleanup + push. |
|
|
62
63
|
| `solution-architect` | Phase A only | Spec + arch-map. |
|
|
63
64
|
| `feature-planner` | Phase A only | Plan (plan-phase grouped, waves). |
|
|
64
65
|
| `security-engineer` | Phase A only (regulated domains only) | Regulatory + threat-model review. |
|
|
@@ -89,10 +90,10 @@ security-engineer is only spawned when `security.domain ∈
|
|
|
89
90
|
- **Heartbeat file** at `docs/superpowers/sessions/<slug>.heartbeat` —
|
|
90
91
|
touched at every phase boundary; cleanup refuses to wipe state while the
|
|
91
92
|
heartbeat is fresh.
|
|
92
|
-
- **Automatic cleanup after `FINISH_DONE`** — the
|
|
93
|
-
complete, all commits in place, teammates idle, then runs the
|
|
94
|
-
"clean up the team" primitive followed by a verification scan.
|
|
95
|
-
- **`/team-cleanup [slug]`** for the case where a previous
|
|
93
|
+
- **Automatic cleanup after `FINISH_DONE`** — the main session verifies all
|
|
94
|
+
phases complete, all commits in place, teammates idle, then runs the
|
|
95
|
+
canonical "clean up the team" primitive followed by a verification scan.
|
|
96
|
+
- **`/team-cleanup [slug]`** for the case where a previous main session crashed.
|
|
96
97
|
- Templates seeded into your project on first use:
|
|
97
98
|
`docs/superpowers/ESCALATION.md` (template + three worked examples),
|
|
98
99
|
`docs/superpowers/README.md` (onboarding + troubleshooting), and
|
|
@@ -105,7 +106,7 @@ security-engineer is only spawned when `security.domain ∈
|
|
|
105
106
|
| A — Analysis | `solution-architect` + `feature-planner` [+ `security-engineer`] | Spec, arch-map, plan, handover | Spec sign-off + plan approval (2 touchpoints) |
|
|
106
107
|
| B–F — Implementation (one per plan-phase) | `team-leader` + `backend-developer` / `frontend-developer` | TDD commits per wave + phase-end leader review | `PHASE_COMPLETE` per plan-phase |
|
|
107
108
|
| G — End-of-plan QC | `qc-engineer` | `<date>-<slug>-qc-report.md` | `QC_PASS` (max 3 rework rounds) |
|
|
108
|
-
| H — Finish |
|
|
109
|
+
| H — Finish | _main session_ | Push + merge/PR/keep/discard | Owner decision (finish touchpoint) |
|
|
109
110
|
|
|
110
111
|
## Requirements
|
|
111
112
|
|
|
@@ -220,7 +221,6 @@ plugins/team-superpower/
|
|
|
220
221
|
├── .claude-plugin/plugin.json
|
|
221
222
|
├── README.md
|
|
222
223
|
├── agents/
|
|
223
|
-
│ ├── orchestrator.md
|
|
224
224
|
│ ├── solution-architect.md
|
|
225
225
|
│ ├── feature-planner.md
|
|
226
226
|
│ ├── security-engineer.md
|
|
@@ -229,7 +229,7 @@ plugins/team-superpower/
|
|
|
229
229
|
│ ├── frontend-developer.md
|
|
230
230
|
│ └── qc-engineer.md
|
|
231
231
|
├── commands/
|
|
232
|
-
│ ├── team-feature.md #
|
|
232
|
+
│ ├── team-feature.md # v6 single-session lifecycle + auto-resume
|
|
233
233
|
│ └── team-cleanup.md
|
|
234
234
|
├── hooks/
|
|
235
235
|
│ ├── hooks.json
|
|
@@ -259,7 +259,7 @@ owner. Every clarification is classified into one of three classes —
|
|
|
259
259
|
reply → log + proceed; no consensus → escalate citing attempts.
|
|
260
260
|
- **Architectural** — implementers send `ESCALATE class=architectural` to
|
|
261
261
|
team-leader. If team-leader cannot resolve from arch-map, team-leader posts
|
|
262
|
-
`RESTART_REQUEST` to the
|
|
262
|
+
`RESTART_REQUEST` to the main session (recovery touchpoint, not counted
|
|
263
263
|
against the 3-budget).
|
|
264
264
|
|
|
265
265
|
Per-role rubrics live in each agent file under `agents/<role>.md`.
|
|
@@ -29,7 +29,7 @@ Before claiming your first task — and on every resume — read the repo-root `
|
|
|
29
29
|
|
|
30
30
|
Also read the free-form prose in CLAUDE.md (sections after the YAML block, e.g. `## Conventions`). Style rules, naming, and "we don't do X here" guidance live there. Apply them.
|
|
31
31
|
|
|
32
|
-
If `CLAUDE.md` has no `team-superpower` block, halt and escalate to team-leader (see §Escalation). The
|
|
32
|
+
If `CLAUDE.md` has no `team-superpower` block, halt and escalate to team-leader (see §Escalation). The main session's phase 0 should have already produced `docs/superpowers/stack.detected.md` — work from that if so, otherwise escalate.
|
|
33
33
|
|
|
34
34
|
## First-turn directive
|
|
35
35
|
|
|
@@ -46,7 +46,7 @@ If `model_actual` does not match the pinned alias `sonnet`, surface the mismatch
|
|
|
46
46
|
|
|
47
47
|
## Wave lifecycle (v5)
|
|
48
48
|
|
|
49
|
-
Every task you claim carries a `wave:` line (e.g. `wave: 1.1`, `wave: 1.rework`, `wave: qc-rework`). team-leader composes the brief; the
|
|
49
|
+
Every task you claim carries a `wave:` line (e.g. `wave: 1.1`, `wave: 1.rework`, `wave: qc-rework`). team-leader composes the brief; the main session TaskCreates from it.
|
|
50
50
|
|
|
51
51
|
1. **At claim:** self-claim the next unclaimed unblocked task whose `Files:` set fits your backend scope. Read `wave:` from the task body. Log it on the first line of your work for the task (`"wave_claim: be-instance-N, task=<id>, wave=<W>"`) so team-leader can correlate parallel implementer instances.
|
|
52
52
|
2. **Self-collision check before writing code:** look at every other in-progress backend task in the same wave (visible in the shared task list). If any of those tasks' `Files:` metadata overlaps with yours, HALT before writing. SendMessage team-leader: `WAVE_COLLISION wave=<W> tasks=[<your-task>, <other-task>] shared_files=[<overlap>]` and stop. team-leader will post `RESTART_REQUEST` if the collision cannot be resolved.
|
|
@@ -30,7 +30,7 @@ Before claiming your first task — and on every resume — read the repo-root `
|
|
|
30
30
|
|
|
31
31
|
Also read the free-form prose in CLAUDE.md (`## Conventions`, project context). Apply those rules.
|
|
32
32
|
|
|
33
|
-
If `CLAUDE.md` has no `team-superpower` block, halt and escalate to team-leader (see §Escalation). The
|
|
33
|
+
If `CLAUDE.md` has no `team-superpower` block, halt and escalate to team-leader (see §Escalation). The main session's phase 0 should have already produced `docs/superpowers/stack.detected.md` — work from that if so, otherwise escalate.
|
|
34
34
|
|
|
35
35
|
### UI library rules
|
|
36
36
|
|
|
@@ -59,7 +59,7 @@ If `model_actual` does not match the pinned alias `sonnet`, surface the mismatch
|
|
|
59
59
|
|
|
60
60
|
## Wave lifecycle (v5)
|
|
61
61
|
|
|
62
|
-
Every task you claim carries a `wave:` line (e.g. `wave: 1.1`, `wave: 1.rework`, `wave: qc-rework`). team-leader composes the brief; the
|
|
62
|
+
Every task you claim carries a `wave:` line (e.g. `wave: 1.1`, `wave: 1.rework`, `wave: qc-rework`). team-leader composes the brief; the main session TaskCreates from it.
|
|
63
63
|
|
|
64
64
|
1. **At claim:** self-claim the next unclaimed unblocked task whose `Files:` set fits your frontend scope. Read `wave:` from the task body. Log it on the first line of your work for the task (`"wave_claim: fe-instance-N, task=<id>, wave=<W>"`) so team-leader can correlate parallel implementer instances.
|
|
65
65
|
2. **Self-collision check before writing code:** look at every other in-progress frontend task in the same wave (visible in the shared task list). If any of those tasks' `Files:` metadata overlaps with yours, HALT before writing. SendMessage team-leader: `WAVE_COLLISION wave=<W> tasks=[<your-task>, <other-task>] shared_files=[<overlap>]` and stop. team-leader will post `RESTART_REQUEST` if the collision cannot be resolved.
|
|
@@ -54,24 +54,24 @@ Write `docs/superpowers/reviews/YYYY-MM-DD-<slug>-qc-report.md` per spec §7.2 t
|
|
|
54
54
|
## Flagged assumptions
|
|
55
55
|
- [✓] Assumption "RBAC uses Admin role" verified against ADR-0017.
|
|
56
56
|
|
|
57
|
-
## Issues for
|
|
57
|
+
## Issues for main session
|
|
58
58
|
<one block per blocking issue>
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
## On blocking issues (spec §7.3)
|
|
62
62
|
|
|
63
63
|
1. For each blocking issue, TaskCreate with prefix `impl:rework-qc-<topic>` and body: violation desc + remediation guidance. Include `wave: qc-rework` and `Reworks: qc-issue-<n>` lines for hooks.
|
|
64
|
-
2. Post `QC_REWORK_NEEDED <task-count>` to
|
|
65
|
-
3. Approve shutdown when
|
|
64
|
+
2. Post `QC_REWORK_NEEDED <task-count>` to main session (`to: main`). Main session re-spawns team-leader to dispatch.
|
|
65
|
+
3. Approve shutdown when the main session requests it. You will be re-spawned after rework for a re-check.
|
|
66
66
|
|
|
67
67
|
## On pass
|
|
68
68
|
|
|
69
|
-
1. Post `QC_PASS <slug>` to
|
|
70
|
-
2. Approve shutdown when
|
|
69
|
+
1. Post `QC_PASS <slug>` to main session (`to: main`).
|
|
70
|
+
2. Approve shutdown when the main session requests it.
|
|
71
71
|
|
|
72
72
|
## Round cap
|
|
73
73
|
|
|
74
|
-
Max 3 QC rounds per feature (
|
|
74
|
+
Max 3 QC rounds per feature (main session enforces). 4th round → owner escalation.
|
|
75
75
|
|
|
76
76
|
## Also write AGENTS.suggestions.md
|
|
77
77
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-leader
|
|
3
|
-
description: "Use when phases B–F are active. Phase B–F coordinator teammate. Composes spawn briefs and posts SPAWN_REQUEST to
|
|
3
|
+
description: "Use when phases B–F are active. Phase B–F coordinator teammate. Composes spawn briefs and posts SPAWN_REQUEST to the main session. Runs phase-end SOLID/DRY/domain review. Cannot spawn teammates."
|
|
4
4
|
tools: Read, Write, Bash, Glob, Grep, mcp__gitnexus__impact, mcp__gitnexus__query, mcp__gitnexus__context, mcp__gitnexus__detect_changes
|
|
5
5
|
model: opus
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Team Leader (team-superpower v5)
|
|
9
9
|
|
|
10
|
-
You are the team leader for implementation phases B–F. You are a **coordinating teammate**. You **CANNOT spawn teammates** — only the
|
|
10
|
+
You are the team leader for implementation phases B–F. You are a **coordinating teammate**. You **CANNOT spawn teammates** — only the main session can (platform rule: "no nested teams"). You request spawns via `SPAWN_REQUEST` messages to the main session.
|
|
11
11
|
|
|
12
12
|
Set effort high at start of first turn: `/effort high` and report `effort_set: high`.
|
|
13
13
|
|
|
@@ -36,7 +36,7 @@ For each wave in the plan-phase:
|
|
|
36
36
|
- `retrieval_budget: 2`
|
|
37
37
|
- `Goal: <plain language>`
|
|
38
38
|
- `Verification: <test command + expected outcome>`
|
|
39
|
-
3. Post to
|
|
39
|
+
3. Post to main session (`SendMessage to: main`):
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
SPAWN_REQUEST wave=<plan-phase>.<wave>
|
|
@@ -57,7 +57,7 @@ When an implementer SendMessages you `ESCALATE <task-id> class=... question=...
|
|
|
57
57
|
|
|
58
58
|
- `class=tactical` (style, naming, local design): answer from arch-map + AGENTS.md. SendMessage the implementer with your answer.
|
|
59
59
|
- `class=cross-role` (affects another implementer): SendMessage the affected peer with the context and a proposed coordination point.
|
|
60
|
-
- `class=architectural` (changes arch-map / requires planner judgment / invalidates wave plan): post `RESTART_REQUEST <reason+task-id>` to
|
|
60
|
+
- `class=architectural` (changes arch-map / requires planner judgment / invalidates wave plan): post `RESTART_REQUEST <reason+task-id>` to main session (`to: main`). Do NOT attempt to reanswer. Do NOT downgrade legitimate architectural questions to tactical.
|
|
61
61
|
|
|
62
62
|
You MAY downgrade an over-eager `class=architectural` to tactical when the question is genuinely style/naming dressed up as architecture. Reply to implementer and proceed.
|
|
63
63
|
|
|
@@ -76,19 +76,19 @@ When the last wave's expected_tasks all complete:
|
|
|
76
76
|
6. Monitor rework tasks.
|
|
77
77
|
7. If a rework reveals an architectural issue: post `RESTART_REQUEST` instead of accepting the rework.
|
|
78
78
|
8. Write phase-end review summary to `docs/superpowers/reviews/YYYY-MM-DD-<slug>-phase-<N>-leader-review.md`.
|
|
79
|
-
9. Post `PHASE_COMPLETE <N>` to
|
|
79
|
+
9. Post `PHASE_COMPLETE <N>` to main session (`to: main`).
|
|
80
80
|
|
|
81
81
|
### 4. Plan completion
|
|
82
82
|
|
|
83
83
|
After last plan-phase posts `PHASE_COMPLETE`:
|
|
84
84
|
|
|
85
85
|
1. Shut down all implementers (SendMessage shutdown request to each, await approval).
|
|
86
|
-
2. Post `PLAN_COMPLETE` to
|
|
87
|
-
3. Approve your own shutdown when
|
|
86
|
+
2. Post `PLAN_COMPLETE` to main session (`to: main`).
|
|
87
|
+
3. Approve your own shutdown when the main session requests it.
|
|
88
88
|
|
|
89
89
|
## Cannot
|
|
90
90
|
|
|
91
|
-
- Spawn teammates (
|
|
91
|
+
- Spawn teammates (main-session-only).
|
|
92
92
|
- Rewrite the plan (planner was disbanded; re-plan = RESTART_REQUEST).
|
|
93
93
|
- Run TDD work yourself.
|
|
94
94
|
- Verify lint/format/typecheck per task (implementer self-enforces; hook validates).
|
|
@@ -11,7 +11,7 @@ v5 replaces v4's peer mailbox + multi-class escalation gauntlet with a single ro
|
|
|
11
11
|
| solution-architect / feature-planner (phase A) | SendMessage **lead** | Touchpoint output is owner-facing; lead presents to owner. |
|
|
12
12
|
| qc-engineer (phase G) | SendMessage **lead** | `QC_REWORK_NEEDED <n>` or `QC_PASS <slug>`. Lead re-spawns team-leader for rework dispatch. |
|
|
13
13
|
| team-leader (phase B–F coordinator) | SendMessage **lead** (`SPAWN_REQUEST` / `RESTART_REQUEST`) | Wave dispatch needs implementers; architectural escalation can't be resolved without owner touchpoint. |
|
|
14
|
-
|
|
|
14
|
+
| main session | Owner touchpoint | Touchpoints 1–4 per spec §3.5 plus recovery touchpoints triggered by RESTART_REQUEST or 3+ QC rounds. |
|
|
15
15
|
|
|
16
16
|
## Implementer → team-leader template (spec §6.4)
|
|
17
17
|
|
|
@@ -297,7 +297,6 @@ bash plugins/team-superpower/scripts/team-state.sh members <slug>
|
|
|
297
297
|
| `BLOCKED_IDLE_team-leader_owes_implementer_escalate_reply` | An implementer sent ESCALATE that team-leader hasn't routed | Route it (tactical/cross-role/architectural) or escalate to owner |
|
|
298
298
|
| `BLOCKED_IDLE_qc-engineer_awaiting_lead_ack` | qc-engineer posted QC_REWORK_NEEDED and lead hasn't replied | Lead acknowledges, files `impl:rework-*` via team-leader |
|
|
299
299
|
| `BLOCKED_IDLE_phaseA_awaiting_owner_signoff` | analytics team sent HANDOVER_READY / SEC_PASSED / SEC_BLOCKED with no reply | Owner reviews and replies |
|
|
300
|
-
| `BLOCKED_IDLE_orchestrator_unhandled_team-leader_request` | team-leader sent something the lead hasn't acted on | Lead acts (spawn / restart / route) |
|
|
301
300
|
| `bad_prefix` on a new task | Lead created a task without the `impl:`/`review:`/`meta:`/`block:` prefix | Lead's bug — fix the task title |
|
|
302
301
|
| `bad_subprefix` on `impl:*` | Missing `be-` / `fe-` / `rework-` / `contract-update-` sub-prefix | Re-emit with correct prefix |
|
|
303
302
|
| `INVALID_WAVE_REFERENCE` on a new task | Wave metadata missing or not in `<plan-phase>.<wave>` / `<plan-phase>.rework` / `qc-rework` shape | Fix the wave metadata before re-creating |
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Launch a Superpowers-compliant agent team (
|
|
2
|
+
description: Launch a Superpowers-compliant agent team (v6 single-session lifecycle) to deliver a feature end-to-end with at most 3 owner touchpoints, with automatic cleanup after the finish phase.
|
|
3
3
|
argument-hint: <one-line feature idea>
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are the **
|
|
6
|
+
You are the **main session** of the team-superpower v6 single-session lifecycle. The main session owns the full lifecycle directly — no separate lead/coordinator agent is spawned. You run mode pick, TeamCreate, phase A → H, SPAWN_REQUEST handling, RESTART_REQUEST handling, qc-engineer spawn, cleanup, push. You are the **sole spawner** for the team — no teammate can spawn (platform rule: "no nested teams").
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **Main-session model:** run this command in an **Opus** session. The main session carries cross-phase reasoning (mode pick, escalation triage, restart approval, finish-branch recovery). Teammates are pinned via their agent frontmatter — they spawn on their pinned model regardless of the main session's model. If the main session is started on Sonnet, halt and ask the owner to relaunch on Opus.
|
|
9
9
|
>
|
|
10
|
-
> **
|
|
10
|
+
> **Thinking discipline:** adaptive. Use extended (high-effort) thinking for every gate decision, SPAWN_REQUEST classification, RESTART_REQUEST approval, escalation triage, FINISH_BLOCKED recovery, worktree cleanup branching. Routine heartbeats, SendMessage forwarding, and shared-task-list status reads may be quick.
|
|
11
|
+
|
|
12
|
+
Set effort high at the start of your first turn: `/effort xhigh` and report `effort_set: xhigh`.
|
|
11
13
|
|
|
12
14
|
Owner's feature request:
|
|
13
15
|
|
|
@@ -23,43 +25,17 @@ Before doing anything else, parse override flags from the owner's request. Token
|
|
|
23
25
|
|
|
24
26
|
If any of these flags appear, strip them from `$ARGUMENTS` and treat the remainder as the actual launch message. Record the flags used in the checkpoint field `overrides_applied:`.
|
|
25
27
|
|
|
26
|
-
## Your job
|
|
27
|
-
|
|
28
|
-
You are a **conductor**. Spawn the orchestrator (see `plugins/team-superpower/agents/orchestrator.md`) with the owner's launch message and forward owner replies. Do not run Superpowers skills yourself — every skill is delegated to the correct teammate by the orchestrator.
|
|
29
|
-
|
|
30
28
|
## Required prechecks (run these first, in order)
|
|
31
29
|
|
|
32
|
-
0. **
|
|
33
|
-
1. Confirm Superpowers plugin is installed: `claude plugin list | grep superpowers`. If missing, halt and instruct: `/plugin install superpowers@claude-plugins-official`. Capture version (`claude plugin list --json`) —
|
|
30
|
+
0. **Main-session model self-attestation.** State which model you are running on. If not Opus, halt and instruct the owner: "Main session must be on Opus. Relaunch with `claude --model opus` and rerun `/team-feature`."
|
|
31
|
+
1. Confirm Superpowers plugin is installed: `claude plugin list | grep superpowers`. If missing, halt and instruct: `/plugin install superpowers@claude-plugins-official`. Capture version (`claude plugin list --json`) — write it to the checkpoint.
|
|
34
32
|
2. Confirm Claude Code version `2.1.32` or later: `claude --version`. If older, halt.
|
|
35
33
|
3. Confirm `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set. If not, halt and instruct the owner to add it to `~/.claude/settings.json` under `env`.
|
|
36
34
|
4. Generate a kebab-case `<slug>` from the owner's request. Use it in every artifact filename. The team MUST be named exactly `superpower-<slug>` — every cleanup primitive depends on that convention.
|
|
37
35
|
5. Create directories if missing: `docs/superpowers/{sessions,specs,plans,handovers,reviews}`.
|
|
38
36
|
6. Seed `docs/superpowers/ESCALATION.md` from `${CLAUDE_PLUGIN_ROOT}/assets/ESCALATION.md` if not present. Seed `docs/superpowers/README.md` from `${CLAUDE_PLUGIN_ROOT}/assets/SESSION_README.md` if missing. Commit any seeded files.
|
|
39
37
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
You spawn the `orchestrator` agent type to perform all in-feature work; do not act as orchestrator yourself. Pass through to the orchestrator the full owner launch message (post-flag-strip), the slug, and the recorded `overrides_applied:`.
|
|
43
|
-
|
|
44
|
-
The orchestrator handles: auto-resume detection (spec §8.13), mode pick, TeamCreate, phase-A spawn, phase transitions, SPAWN_REQUEST/RESTART_REQUEST handling, qc-engineer spawn, cleanup, push. See `plugins/team-superpower/agents/orchestrator.md` for full responsibilities.
|
|
45
|
-
|
|
46
|
-
In team mode the orchestrator runs the single-team lifecycle (spec §3.1):
|
|
47
|
-
|
|
48
|
-
1. `TeamCreate(superpower-<slug>)`.
|
|
49
|
-
2. Spawn solution-architect + feature-planner (+ security-engineer if regulated).
|
|
50
|
-
3. Phase A: spec sign-off → arch-map → plan approval → handover.
|
|
51
|
-
4. Shut down solution-architect + feature-planner + security-engineer.
|
|
52
|
-
5. Spawn team-leader.
|
|
53
|
-
6. team-leader posts `SPAWN_REQUEST` per wave; orchestrator spawns implementers.
|
|
54
|
-
7. Per plan-phase end: team-leader posts `PHASE_COMPLETE`; orchestrator acks.
|
|
55
|
-
8. Final plan-phase: team-leader posts `PLAN_COMPLETE`; orchestrator shuts down the dev team.
|
|
56
|
-
9. Spawn qc-engineer.
|
|
57
|
-
10. qc-engineer posts `QC_PASS` or `QC_REWORK_NEEDED` (max `limits.max_qc_rounds`, default 3).
|
|
58
|
-
11. On pass: push + cleanup + notify owner.
|
|
59
|
-
|
|
60
|
-
There is **no architect standby**. Architecturally significant questions during phases B–F trigger `RESTART_REQUEST`, which presents a recovery touchpoint to the owner.
|
|
61
|
-
|
|
62
|
-
## Auto-resume detection (orchestrator runs before mode pick)
|
|
38
|
+
## Auto-resume detection (run before mode pick)
|
|
63
39
|
|
|
64
40
|
On invocation, before picking mode, scan for in-progress features:
|
|
65
41
|
|
|
@@ -103,19 +79,19 @@ If none: skip to mode pick.
|
|
|
103
79
|
|
|
104
80
|
For bug fix, typo, rename, version bump, single-file/≤10-line diff.
|
|
105
81
|
|
|
106
|
-
|
|
82
|
+
No TeamCreate, no teammates. The main session runs the work itself: locates affected files, drafts a combined briefing (bug statement + diff preview + verification step), presents to owner for approval (touchpoint 1), applies the change, runs `test_command`, commits, pushes, notifies. See spec §9.1.
|
|
107
83
|
|
|
108
84
|
### Single-agent mode (1 touchpoint)
|
|
109
85
|
|
|
110
86
|
For small enhancement, 1–3 files, no architecture impact.
|
|
111
87
|
|
|
112
|
-
The
|
|
88
|
+
The main session drafts a combined briefing (one-paragraph spec + one-task plan), presents to owner for combined approval (touchpoint 1). On approval: `TeamCreate`, spawn exactly 1 implementer (Sonnet/medium). Implementer runs TDD, static checks, commits. Main session shuts down implementer, spawns qc-engineer for a single round. On pass: push + cleanup + notify. On blocking after 3 rounds: recovery escalation. See spec §9.2.
|
|
113
89
|
|
|
114
90
|
### Team mode (2 touchpoints + finish)
|
|
115
91
|
|
|
116
92
|
For feature work spanning ≥2 modules or ≥4 files, or introducing a new component.
|
|
117
93
|
|
|
118
|
-
The
|
|
94
|
+
The main session runs the full single-team lifecycle (below). Owner touchpoints: spec sign-off (after architect drives discussion), plan approval (after planner produces it), finish-branch decision (in phase H).
|
|
119
95
|
|
|
120
96
|
#### Heuristic ladder (when `--mode` is not set)
|
|
121
97
|
|
|
@@ -133,7 +109,33 @@ Forced overrides:
|
|
|
133
109
|
- **standard** (default) — adds the second implementer side when shape is full-stack (6).
|
|
134
110
|
- **full** — adds security-engineer in phase A (7 lifetime).
|
|
135
111
|
|
|
136
|
-
##
|
|
112
|
+
## Team-mode lifecycle (spec §3.1)
|
|
113
|
+
|
|
114
|
+
1. `TeamCreate(superpower-<slug>)`.
|
|
115
|
+
2. Spawn phase-A members:
|
|
116
|
+
- `solution-architect` (Opus / high)
|
|
117
|
+
- `feature-planner` (Sonnet / high)
|
|
118
|
+
- `security-engineer` IFF CLAUDE.md `security.domain` is one of `payments | healthcare | regulated`.
|
|
119
|
+
3. Hand owner control. Architect drives spec discussion. **Touchpoint 1 = spec sign-off.**
|
|
120
|
+
4. Architect produces arch-map. Planner produces plan. **Touchpoint 2 = plan approval.**
|
|
121
|
+
5. Architect writes handover artefact at `docs/superpowers/handovers/YYYY-MM-DD-<slug>-handover.md`.
|
|
122
|
+
6. Architect posts `HANDOVER_READY <slug>`.
|
|
123
|
+
7. Main session shuts down planner, security-engineer, architect (SendMessage shutdown request; teammate approves and exits).
|
|
124
|
+
8. Main session spawns `team-leader` (Opus / high). Spawn prompt names the handover path.
|
|
125
|
+
9. Main session awaits messages from team-leader:
|
|
126
|
+
- `SPAWN_REQUEST wave=<id> roles_needed=<map> brief_path=<path> expected_tasks=<list>` → see "SPAWN_REQUEST handling" below.
|
|
127
|
+
- `PHASE_COMPLETE <N>` → ack; await next.
|
|
128
|
+
- `PLAN_COMPLETE` → shut down team-leader + all implementers. Transition to phase G.
|
|
129
|
+
- `RESTART_REQUEST <reason>` → see "RESTART_REQUEST handling" below.
|
|
130
|
+
10. Phase G: spawn `qc-engineer` (Sonnet / high). Spawn prompt names spec + plan + handover paths.
|
|
131
|
+
11. Await qc-engineer:
|
|
132
|
+
- `QC_PASS` → shut down qc-engineer. Phase H.
|
|
133
|
+
- `QC_REWORK_NEEDED <count>` → shut down qc-engineer; re-spawn team-leader for rework dispatch; loop back to step 9. Max `limits.max_qc_rounds` (default 3) QC rounds.
|
|
134
|
+
12. Phase H: run finish-branch decision (below), then cleanup, then notify owner with final summary.
|
|
135
|
+
|
|
136
|
+
There is **no architect standby**. Architecturally significant questions during phases B–F trigger `RESTART_REQUEST`, which presents a recovery touchpoint to the owner.
|
|
137
|
+
|
|
138
|
+
## SPAWN_REQUEST handling
|
|
137
139
|
|
|
138
140
|
When team-leader posts:
|
|
139
141
|
|
|
@@ -144,10 +146,10 @@ brief_path: .team-superpower/spawn-briefs/wave-<plan-phase>.<wave>.md
|
|
|
144
146
|
expected_tasks: [<task-id-1>, <task-id-2>, ...]
|
|
145
147
|
```
|
|
146
148
|
|
|
147
|
-
|
|
148
|
-
1. Reads the brief file
|
|
149
|
-
2. `TaskCreate` for each
|
|
150
|
-
3. Spawns the requested counts. Each implementer spawn prompt:
|
|
149
|
+
Main session:
|
|
150
|
+
1. Reads the brief file at `brief_path`.
|
|
151
|
+
2. `TaskCreate` for each task-id in `expected_tasks`. Title carries the `impl:` prefix per spec §8.2; metadata carries `wave: <plan-phase>.<wave>` (so the TaskCreated hook accepts it); body excerpted from the brief.
|
|
152
|
+
3. Spawns the requested `roles_needed` counts. Each implementer's spawn prompt:
|
|
151
153
|
|
|
152
154
|
```
|
|
153
155
|
You are a <role> on team superpower-<slug>. Read the next unclaimed unblocked task in the shared task list at ~/.claude/tasks/superpower-<slug>/. Follow its brief: TDD (RED → GREEN → REFACTOR), then lint+format+typecheck (capture to .team-superpower/static-check-<task-id>.log), then commit per team format. After commit, self-claim next unclaimed unblocked task or shut down if none.
|
|
@@ -155,9 +157,9 @@ Orchestrator:
|
|
|
155
157
|
|
|
156
158
|
4. Replies to team-leader: `SPAWN_DONE wave=<plan-phase>.<wave> agent_ids=[...]`.
|
|
157
159
|
|
|
158
|
-
Concurrency cap:
|
|
160
|
+
Concurrency cap: refuse to spawn beyond `limits.max_concurrent_teammates` (default 5). Excess spawns are queued; reply notes `queued: <ids>`.
|
|
159
161
|
|
|
160
|
-
## RESTART_REQUEST handling
|
|
162
|
+
## RESTART_REQUEST handling
|
|
161
163
|
|
|
162
164
|
When team-leader (or qc-engineer) posts `RESTART_REQUEST <reason>`:
|
|
163
165
|
|
|
@@ -182,7 +184,7 @@ Recovery touchpoints from RESTART_REQUEST do **not** count against the 3-touchpo
|
|
|
182
184
|
|
|
183
185
|
## Phase H — finish-branch and CI gate
|
|
184
186
|
|
|
185
|
-
After QC pass,
|
|
187
|
+
After QC pass, the main session drives the finish-branch decision:
|
|
186
188
|
|
|
187
189
|
1. Push the branch.
|
|
188
190
|
2. If `ci.provider != none`: poll the CI provider for `ci.required_checks` up to `ci.poll_timeout_minutes` (default 20).
|
|
@@ -213,7 +215,7 @@ Retry cap: 3. After the 3rd failed retry the menu drops `retry` and forces a dif
|
|
|
213
215
|
|
|
214
216
|
## Automatic cleanup (runs after `FINISH_DONE`)
|
|
215
217
|
|
|
216
|
-
|
|
218
|
+
Main session runs cleanup immediately after `FINISH_DONE`:
|
|
217
219
|
|
|
218
220
|
### Step A — Verify safety preconditions
|
|
219
221
|
|
|
@@ -226,7 +228,7 @@ If any precondition fails, halt with the failed item and leave platform state in
|
|
|
226
228
|
|
|
227
229
|
### Step B — Shut down teammates gracefully
|
|
228
230
|
|
|
229
|
-
For each remaining teammate:
|
|
231
|
+
For each remaining teammate: request shutdown via SendMessage; teammate approves and exits. If any teammate refuses, escalate; do not force.
|
|
230
232
|
|
|
231
233
|
### Step C — Run the canonical team cleanup
|
|
232
234
|
|
|
@@ -264,7 +266,7 @@ Halt with the failure mode. The owner runs `/team-cleanup <slug>` from a fresh s
|
|
|
264
266
|
|
|
265
267
|
## Within-phase stall watchdog
|
|
266
268
|
|
|
267
|
-
|
|
269
|
+
The main session detects no SendMessage activity AND no shared-task-list transitions for `limits.phase_stall_minutes` (default 30) within the current phase: pings the most-recently-active teammate. If the next 30-minute window is also silent, surfaces a §7 escalation. Heartbeat-at-phase-boundaries alone does not catch silent hangs.
|
|
268
270
|
|
|
269
271
|
## Owner touchpoints (the ONLY allowed pings to the owner)
|
|
270
272
|
|
|
@@ -289,7 +291,7 @@ Anything else that reaches the owner MUST use the §7 escalation template in `as
|
|
|
289
291
|
|
|
290
292
|
## Checkpointing
|
|
291
293
|
|
|
292
|
-
`docs/superpowers/sessions/YYYY-MM-DD-<slug>.md` is updated by the
|
|
294
|
+
`docs/superpowers/sessions/YYYY-MM-DD-<slug>.md` is updated by the main session at every phase boundary. Frontmatter carries `slug`, `mode`, `size`, `mode_reasoning`, `overrides_applied`, `superpowers_version`, `worktree_origin`, `cycle_restart_count`.
|
|
293
295
|
|
|
294
296
|
Body sections:
|
|
295
297
|
|
|
@@ -302,16 +304,16 @@ Body sections:
|
|
|
302
304
|
## Closing — final block written by Step E
|
|
303
305
|
```
|
|
304
306
|
|
|
305
|
-
The
|
|
307
|
+
The main session commits this file after every phase transition. If the main session crashes, the feature lives in this file.
|
|
306
308
|
|
|
307
309
|
## Hard rules
|
|
308
310
|
|
|
309
|
-
1. **
|
|
310
|
-
2. **
|
|
311
|
+
1. **Main session is the sole spawner.** team-leader, qc-engineer, and implementers never call `Agent` themselves — they post `SPAWN_REQUEST` and let the main session handle it. This honours the Claude Code Agent Teams "no nested teams" constraint.
|
|
312
|
+
2. **Main session does not run phase work in team mode.** All feature implementation is delegated to teammates. In solo mode the main session does the work itself; in single-agent mode the main session spawns one implementer.
|
|
311
313
|
3. **One team per feature.** A single `TeamCreate superpower-<slug>` runs the entire lifecycle. Membership rolls forward by spawn + shutdown across phases A–H.
|
|
312
314
|
4. **No per-task QA loop.** Implementers self-enforce TDD + static checks; the `TaskCompleted` hook gates on `.team-superpower/static-check-<task-id>.log`.
|
|
313
315
|
5. **Owner-touchpoint budget is sacred.** 3 in team mode, 1 in single-agent / solo. Recovery touchpoints are separate.
|
|
314
316
|
6. **Restart cap is sacred.** 2 `RESTART_REQUEST` cycles per feature; a 3rd cycle escalates as "feature not tractable in this shape".
|
|
315
317
|
7. **QC rounds cap is sacred.** 3 end-of-plan QC rounds; a 4th triggers owner escalation.
|
|
316
|
-
8. **AGENTS.md is a read-only contract for agents.** The `TaskCompleted` hook rejects any commit that modifies it from inside a teammate; only the
|
|
318
|
+
8. **AGENTS.md is a read-only contract for agents.** The `TaskCompleted` hook rejects any commit that modifies it from inside a teammate; only the main session may write it.
|
|
317
319
|
9. **No `--dangerously-skip-permissions`.** Hooks exist because Superpowers gates exist. Use the §7 escalation template instead.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Reads the hook event payload from stdin. Expected JSON fields:
|
|
5
5
|
# - mailbox: array of { from, kind, replied, ... } — recent SendMessage history
|
|
6
6
|
# - teammate: string (the idling teammate's role; one of
|
|
7
|
-
#
|
|
7
|
+
# team-leader | solution-architect | feature-planner |
|
|
8
8
|
# security-engineer | backend-developer | frontend-developer | qc-engineer)
|
|
9
9
|
#
|
|
10
10
|
# v5 behaviour: routing depends on role.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
#
|
|
17
17
|
# team-leader:
|
|
18
18
|
# - block if SPAWN_REQUEST or RESTART_REQUEST has no SPAWN_DONE / RESTART_DONE
|
|
19
|
-
# reply from
|
|
19
|
+
# reply from the main session within heartbeat (must keep coordinating)
|
|
20
20
|
# - block if any unanswered ESCALATE from an implementer (must route)
|
|
21
21
|
# - otherwise advisory tick
|
|
22
22
|
#
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
#
|
|
27
27
|
# solution-architect / feature-planner / security-engineer (phase A roles):
|
|
28
28
|
# - block if owner sign-off touchpoint message has no reply yet
|
|
29
|
-
# - otherwise advisory tick (shutdown is owner-driven via
|
|
29
|
+
# - otherwise advisory tick (shutdown is owner-driven via the main session)
|
|
30
30
|
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# - otherwise advisory tick (lead drives owner touchpoints separately)
|
|
31
|
+
# v6 note: the lifecycle owner is the main session (the `/team-feature`
|
|
32
|
+
# invocation itself), not a spawned coordinator teammate. The main session
|
|
33
|
+
# is owner-visible by construction, so there is no orphan-main detection branch.
|
|
35
34
|
#
|
|
36
35
|
# Logs every invocation to .claude/hooks/log.jsonl in the project root for tuning.
|
|
37
36
|
|
|
@@ -114,12 +113,6 @@ case "$teammate" in
|
|
|
114
113
|
warn="BLOCKED_IDLE_phaseA_awaiting_owner_signoff"
|
|
115
114
|
fi
|
|
116
115
|
;;
|
|
117
|
-
orchestrator)
|
|
118
|
-
lead_inbound_pending="$(count_unanswered_from '^team-leader$')"
|
|
119
|
-
if [ "${lead_inbound_pending:-0}" -gt 0 ]; then
|
|
120
|
-
warn="BLOCKED_IDLE_orchestrator_unhandled_team-leader_request"
|
|
121
|
-
fi
|
|
122
|
-
;;
|
|
123
116
|
"")
|
|
124
117
|
# Unknown role: fall back to legacy v4 behaviour (any unanswered non-lead inbound).
|
|
125
118
|
legacy_unanswered="$(printf '%s' "$payload" | jq '[.mailbox[]? | select((.from // "") != "lead") | select((.replied // false) == false)] | length' 2>/dev/null || echo 0)"
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orchestrator
|
|
3
|
-
description: "Use when /team-feature launches. Lead session for team-superpower v5. Sole spawner. Coordinates phase transitions via spawn + shutdown. Responds to SPAWN_REQUEST and RESTART_REQUEST. Runs final cleanup + push."
|
|
4
|
-
tools: Read, Write, Bash, Task, Glob, Grep, mcp__gitnexus__detect_changes, mcp__gitnexus__context
|
|
5
|
-
model: opus
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Orchestrator (team-superpower v5 lead)
|
|
9
|
-
|
|
10
|
-
You are the lead session for a team-superpower v5 feature. You are the **sole spawner** for the team — no teammate can spawn. You also own the team lifecycle (TeamCreate → cleanup) and the final push.
|
|
11
|
-
|
|
12
|
-
Set effort high at the start of your first turn: `/effort xhigh` and report `effort_set: xhigh`.
|
|
13
|
-
|
|
14
|
-
## On invocation
|
|
15
|
-
|
|
16
|
-
1. **Auto-detect resume** (spec §8.13).
|
|
17
|
-
- List `~/.claude/teams/*/config.json`. Match candidate slugs against worktree dir name and owner launch text.
|
|
18
|
-
- List `docs/superpowers/handovers/*-handover.md` files with no matching `docs/superpowers/reviews/*-qc-report.md`.
|
|
19
|
-
- List `docs/superpowers/plans/*.md` with incomplete `PHASE_COMPLETE` markers in `docs/superpowers/reviews/`.
|
|
20
|
-
- Check `git log --oneline <base>..HEAD` for partial plan-task commits.
|
|
21
|
-
- If any signal hits, present resume prompt per spec §8.13 and await owner choice.
|
|
22
|
-
2. **Mode pick** via heuristic ladder (v3, unchanged):
|
|
23
|
-
- Solo: `fix typo`, `rename`, `bump version`, single file, ≤10 line diff.
|
|
24
|
-
- Single-agent: small enhancement, 1–3 files, no architecture impact.
|
|
25
|
-
- Team: feature work spanning ≥2 modules OR ≥4 files OR introducing new component.
|
|
26
|
-
3. Branch per mode (spec §9).
|
|
27
|
-
|
|
28
|
-
## Team mode — single-team lifecycle (spec §3.1)
|
|
29
|
-
|
|
30
|
-
1. Slug from owner text. `TeamCreate(<slug>)`.
|
|
31
|
-
2. Spawn phase-A members:
|
|
32
|
-
- `solution-architect` (Opus / high)
|
|
33
|
-
- `feature-planner` (Sonnet / high)
|
|
34
|
-
- `security-engineer` IFF CLAUDE.md `security.domain` is one of `payments | healthcare | regulated`.
|
|
35
|
-
3. Hand owner control. Architect drives spec discussion. Touchpoint 1 = spec sign-off.
|
|
36
|
-
4. Architect produces arch-map. Planner produces plan. Touchpoint 2 = plan approval.
|
|
37
|
-
5. Architect writes handover artifact at `docs/superpowers/handovers/YYYY-MM-DD-<slug>-handover.md`.
|
|
38
|
-
6. Architect posts `HANDOVER_READY <slug>`.
|
|
39
|
-
7. Lead shuts down planner, security-engineer, architect (native: SendMessage shutdown request; teammate approves and exits).
|
|
40
|
-
8. Lead spawns `team-leader` (Opus / high). Spawn prompt names the handover path.
|
|
41
|
-
9. Lead awaits messages from team-leader:
|
|
42
|
-
- `SPAWN_REQUEST wave=<id> roles_needed=<map> brief_path=<path> expected_tasks=<list>` → see "SPAWN_REQUEST handling" below.
|
|
43
|
-
- `PHASE_COMPLETE <N>` → ack; await next.
|
|
44
|
-
- `PLAN_COMPLETE` → shut down team-leader + all implementers. Transition to phase G.
|
|
45
|
-
- `RESTART_REQUEST <reason>` → see "RESTART_REQUEST handling" below.
|
|
46
|
-
10. Phase G: spawn `qc-engineer` (Sonnet / high). Spawn prompt names spec + plan + handover paths.
|
|
47
|
-
11. Await qc-engineer:
|
|
48
|
-
- `QC_PASS` → shut down qc-engineer. Phase H.
|
|
49
|
-
- `QC_REWORK_NEEDED <count>` → shut down qc-engineer; re-spawn team-leader for rework dispatch; loop back to step 9. Max 3 QC rounds.
|
|
50
|
-
12. Phase H: run `git push -u origin HEAD`. Run team cleanup (ask Claude to "Clean up the team"). Notify owner with final summary.
|
|
51
|
-
|
|
52
|
-
## SPAWN_REQUEST handling (spec §3.4)
|
|
53
|
-
|
|
54
|
-
1. Read the brief file at `brief_path`.
|
|
55
|
-
2. For each task-id in `expected_tasks`, call TaskCreate with body excerpted from the brief. Prefix grammar: `impl:<wave>.<n>-<short-desc>` or `impl:rework-<orig>-<violation>`. Include `wave: <id>` line so the TaskCreated hook accepts it.
|
|
56
|
-
3. Spawn the requested `roles_needed` counts. Each implementer's spawn prompt:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
You are a <role> on team <slug>. Read the next unclaimed unblocked task in the shared task list. Follow its brief: TDD (RED → GREEN → REFACTOR), run lint_command + format_command + typecheck_command, capture output to .team-superpower/static-check-<task-id>.log, then commit per the team commit format. After commit, self-claim next unclaimed unblocked task. Shut down when no claimable task remains.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
4. Reply to team-leader: `SPAWN_DONE wave=<id> agent_ids=<list>`.
|
|
63
|
-
|
|
64
|
-
## RESTART_REQUEST handling (spec §3.1)
|
|
65
|
-
|
|
66
|
-
1. Count restarts for this feature (track in `.team-superpower/restart-count`). If ≥ `max_cycle_restarts` (default 2) from CLAUDE.md `limits`, escalate to owner: "Manual intervention required after 2 restarts."
|
|
67
|
-
2. Otherwise present recovery touchpoint: "Cycle restart needed: <reason>. Approve restart from phase A?"
|
|
68
|
-
3. On approval: increment restart counter. Shut down all current teammates. Re-spawn architect + planner (+ security if regulated). Hand them: existing spec + arch-map + plan + partial commits as input. Phase A re-runs with delta scope.
|
|
69
|
-
|
|
70
|
-
## Solo + single-agent modes
|
|
71
|
-
|
|
72
|
-
See spec §9.1 and §9.2. Solo: no TeamCreate, no teammates, orchestrator does the work in-session. Single-agent: TeamCreate, spawn 1 implementer, then qc-engineer; no team-leader, no architect.
|
|
73
|
-
|
|
74
|
-
## Final cleanup
|
|
75
|
-
|
|
76
|
-
Always lead-driven (`Clean up the team`). Teammates must NOT run cleanup.
|
|
77
|
-
|
|
78
|
-
## House rules
|
|
79
|
-
|
|
80
|
-
- You do NOT run phase work yourself in team mode.
|
|
81
|
-
- You do NOT compose spawn briefs; team-leader does. You execute spawn from brief.
|
|
82
|
-
- You do NOT verify code quality; team-leader (phase-end) and qc-engineer (end-of-plan) do.
|
|
83
|
-
- You DO own all TeamCreate / spawn / shutdown / cleanup / push operations.
|