@drunkcoding/agents-and-skills 0.0.18 → 0.0.23
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/README.md +23 -0
- 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 +186 -115
- package/plugins/team-superpower/agents/backend-developer.md +161 -39
- package/plugins/team-superpower/agents/feature-planner.md +66 -0
- package/plugins/team-superpower/agents/frontend-developer.md +163 -34
- package/plugins/team-superpower/agents/orchestrator.md +83 -0
- package/plugins/team-superpower/agents/qc-engineer.md +84 -0
- package/plugins/team-superpower/agents/security-engineer.md +90 -40
- package/plugins/team-superpower/agents/solution-architect.md +80 -0
- package/plugins/team-superpower/agents/team-leader.md +100 -0
- package/plugins/team-superpower/assets/AGENTS.md.template +23 -0
- package/plugins/team-superpower/assets/CLAUDE.md.template +25 -4
- package/plugins/team-superpower/assets/ESCALATION.md +114 -66
- package/plugins/team-superpower/assets/SESSION_README.md +233 -113
- package/plugins/team-superpower/commands/team-feature.md +195 -443
- package/plugins/team-superpower/hooks/task-completed.sh +180 -59
- package/plugins/team-superpower/hooks/task-created.sh +77 -19
- package/plugins/team-superpower/hooks/teammate-idle.sh +118 -13
- package/plugins/team-superpower/scripts/assess-complexity.sh +194 -0
- package/plugins/team-superpower/scripts/detect-stack.sh +39 -0
- package/plugins/team-superpower/scripts/team-state.sh +106 -37
- package/plugins/team-superpower/scripts/wave-collision-check.sh +60 -0
- package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
- package/plugins/html-effectiveness/tests/_tmp.test.js +0 -58
- package/plugins/html-effectiveness/tests/fixtures/01-exploration-code-approaches.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/02-exploration-visual-designs.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/03-code-review-pr.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/04-code-understanding.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/05-design-system.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/06-component-variants.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/07-prototype-animation.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/08-prototype-interaction.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/09-slide-deck.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/10-svg-illustrations.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/11-status-report.data.json +0 -37
- package/plugins/html-effectiveness/tests/fixtures/12-incident-report.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/13-flowchart-diagram.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/14-research-feature-explainer.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/15-research-concept-explainer.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/16-implementation-plan.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/17-pr-writeup.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/18-editor-triage-board.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/19-editor-feature-flags.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/20-editor-prompt-tuner.data.json +0 -3
- package/plugins/html-effectiveness/tests/fixtures/_canned.data.json +0 -7
- package/plugins/html-effectiveness/tests/fixtures/_canned.html.tmpl +0 -7
- package/plugins/html-effectiveness/tests/fixtures/_canned.manifest.json +0 -18
- package/plugins/html-effectiveness/tests/manifest.test.js +0 -61
- package/plugins/html-effectiveness/tests/mustache.test.js +0 -47
- package/plugins/html-effectiveness/tests/render.test.js +0 -118
- package/plugins/team-superpower/agents/designer.md +0 -50
- package/plugins/team-superpower/agents/planner.md +0 -186
- package/plugins/team-superpower/agents/qa-engineer.md +0 -47
- package/plugins/team-superpower/agents/reviewer.md +0 -110
- package/plugins/team-superpower/agents/software-architect.md +0 -45
- package/plugins/team-superpower/commands/team-feature-resume.md +0 -185
|
@@ -1,90 +1,168 @@
|
|
|
1
1
|
# Superpowers session workspace
|
|
2
2
|
|
|
3
|
-
This directory holds the
|
|
3
|
+
This directory holds the artefacts produced by `/team-feature` runs. The
|
|
4
|
+
team-superpower plugin seeds it on first use; afterwards the spec / plan /
|
|
5
|
+
handover / review / checkpoint files for each feature are written by the team
|
|
6
|
+
and committed.
|
|
7
|
+
|
|
8
|
+
## v5 at a glance
|
|
9
|
+
|
|
10
|
+
- **One team per feature.** A single `TeamCreate superpower-<slug>` runs the
|
|
11
|
+
whole lifecycle. Membership rolls forward by spawn + shutdown across phases
|
|
12
|
+
A–H — no nested teams, no concurrent teams.
|
|
13
|
+
- **Lead is the sole spawner.** `team-leader` composes wave briefs and posts
|
|
14
|
+
`SPAWN_REQUEST` to lead; lead reads the brief, files tasks, spawns
|
|
15
|
+
implementers, replies `SPAWN_DONE`. The same channel carries
|
|
16
|
+
`RESTART_REQUEST` when the team is architecturally stuck.
|
|
17
|
+
- **No per-task QA loop.** Implementers run lint + typecheck + format before
|
|
18
|
+
every commit; the output is captured to
|
|
19
|
+
`.team-superpower/static-check-<task-id>.log` and the `TaskCompleted` hook
|
|
20
|
+
rejects any completion without an `exit=0` line.
|
|
21
|
+
- **Phase-end review.** team-leader runs a consolidated SOLID/DRY/domain pass
|
|
22
|
+
at the end of every plan-phase and emits `impl:rework-*` tasks where needed.
|
|
23
|
+
- **End-of-plan QC.** Lead spawns one `qc-engineer` after `PLAN_COMPLETE`. Up
|
|
24
|
+
to 3 rework rounds (`limits.max_qc_rounds`), then owner escalation.
|
|
25
|
+
- **Restart on stuck.** Up to 2 `RESTART_REQUEST` cycles
|
|
26
|
+
(`limits.max_cycle_restarts`); a third escalates to the owner as "feature
|
|
27
|
+
not tractable".
|
|
4
28
|
|
|
5
29
|
## Customising for your project
|
|
6
30
|
|
|
7
|
-
Stack decisions, test/build commands, contract source-of-truth, CI provider,
|
|
31
|
+
Stack decisions, test/build commands, contract source-of-truth, CI provider,
|
|
32
|
+
and security posture are all driven by a `team-superpower` fenced block in your
|
|
33
|
+
repo-root `CLAUDE.md`. The plugin reads it on every run; it **never
|
|
34
|
+
overwrites it**.
|
|
8
35
|
|
|
9
36
|
### 1. Write a `team-superpower` block in CLAUDE.md
|
|
10
37
|
|
|
11
|
-
Copy `plugins/team-superpower/assets/CLAUDE.md.template` to your repo root as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- `
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
38
|
+
Copy `plugins/team-superpower/assets/CLAUDE.md.template` to your repo root as
|
|
39
|
+
`CLAUDE.md` (or paste the `team-superpower` block into your existing CLAUDE.md).
|
|
40
|
+
The block recognises:
|
|
41
|
+
|
|
42
|
+
- `backend` — `language`, `framework`, `test_framework`, `build_command`,
|
|
43
|
+
`test_command`, `format_command`, `lint_command`, `typecheck_command`,
|
|
44
|
+
`migration_tool`, `package_manager`. Set `backend: none` to declare a
|
|
45
|
+
frontend-only repo.
|
|
46
|
+
- `frontend` — `language`, `framework`, `bundler`, `test_framework`,
|
|
47
|
+
`e2e_framework`, `ui_library`, `package_manager`, `build_command`,
|
|
48
|
+
`test_command`, `lint_command`, `typecheck_command`, `format_command`. Set
|
|
49
|
+
`frontend: none` to declare a backend-only repo.
|
|
50
|
+
- `contracts` — `source_of_truth` (`openapi` / `grpc` / `graphql` /
|
|
51
|
+
`typescript` / `none`), `openapi_path`, `ts_gen_command`.
|
|
52
|
+
- `ci` — `provider`, `workflow_path`, `required_checks`,
|
|
53
|
+
`poll_timeout_minutes` (default 20). Used by team-leader at the
|
|
54
|
+
finish-branch decision (phase H).
|
|
55
|
+
- `security` — `domain` (`payments` / `healthcare` / `generic` /
|
|
56
|
+
`internal-only`), `pii`, `public_endpoints`, `data_at_rest`. Drives whether
|
|
57
|
+
`security-engineer` is spawned in phase A.
|
|
58
|
+
- `limits` — `phase_stall_minutes`, `max_tasks_per_implementer`,
|
|
59
|
+
`max_concurrent_teammates`, `max_iterations_per_task`, `task_token_budget`,
|
|
60
|
+
`retrieval_budget_per_task`, `max_qc_rounds`, `max_cycle_restarts`.
|
|
61
|
+
|
|
62
|
+
Free-form prose around the block (e.g. a `## Conventions` section with
|
|
63
|
+
project-specific rules) is passed to every teammate as project context.
|
|
20
64
|
|
|
21
65
|
### 2. Auto-detection fallback
|
|
22
66
|
|
|
23
|
-
If `CLAUDE.md` is missing or has no `team-superpower` block, the lead runs
|
|
67
|
+
If `CLAUDE.md` is missing or has no `team-superpower` block, the lead runs
|
|
68
|
+
`scripts/detect-stack.sh` in phase 0 and writes its best guess to
|
|
69
|
+
`docs/superpowers/stack.detected.md`, then halts and asks you to review the
|
|
70
|
+
`# CONFIRM:` lines and paste the corrected block into CLAUDE.md. **The plugin
|
|
71
|
+
will not edit your CLAUDE.md for you.**
|
|
24
72
|
|
|
25
73
|
### 3. Shape-adaptive team
|
|
26
74
|
|
|
27
75
|
Once the block (or detection) is parsed, the lead decides the **stack shape**:
|
|
28
76
|
|
|
29
|
-
| Shape |
|
|
30
|
-
|
|
31
|
-
| `full-stack` |
|
|
32
|
-
| `be-only` |
|
|
33
|
-
| `fe-only` |
|
|
77
|
+
| Shape | Phase-A roles | Implementation roles |
|
|
78
|
+
|-------|---------------|----------------------|
|
|
79
|
+
| `full-stack` | solution-architect, feature-planner, (security-engineer) | backend-developer, frontend-developer |
|
|
80
|
+
| `be-only` | solution-architect, feature-planner, (security-engineer) | backend-developer |
|
|
81
|
+
| `fe-only` | solution-architect, feature-planner, (security-engineer) | frontend-developer |
|
|
82
|
+
|
|
83
|
+
`security-engineer` is added only when `security.domain ∈
|
|
84
|
+
{payments, healthcare}` OR `security.pii: yes`. Otherwise solution-architect
|
|
85
|
+
runs a lightweight security pass alone.
|
|
34
86
|
|
|
35
|
-
The shape is written to `docs/superpowers/sessions/<slug>.shape`; the
|
|
87
|
+
The shape is written to `docs/superpowers/sessions/<slug>.shape`; the
|
|
88
|
+
`TaskCreated` hook reads it to reject `impl:fe-*` in BE-only repos and
|
|
89
|
+
vice-versa.
|
|
36
90
|
|
|
37
91
|
#### Concurrency model
|
|
38
92
|
|
|
39
|
-
The
|
|
93
|
+
Phase-gated. The roles listed above are the **lifetime** team size, not the
|
|
94
|
+
parallelism. Roles alive at any moment:
|
|
40
95
|
|
|
41
96
|
| Phase | Concurrent teammates |
|
|
42
97
|
|-------|----------------------|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
| 5 QA | 1 (qa-engineer) |
|
|
48
|
-
| 6 review | 1 (reviewer) |
|
|
49
|
-
| 7 finish | 1 (reviewer, hat 2 — reused) |
|
|
98
|
+
| A — analytics | solution-architect + feature-planner (+ security-engineer when in scope) |
|
|
99
|
+
| B–F — implementation | team-leader + 1–N implementers (capped by `limits.max_concurrent_teammates`, default 5) |
|
|
100
|
+
| G — end-of-plan QC | team-leader + qc-engineer |
|
|
101
|
+
| H — finish | team-leader (drives CI gate + finish-branch decision) |
|
|
50
102
|
|
|
51
|
-
|
|
103
|
+
Phase-A members shut down at `HANDOVER_READY`. No standby. If the team hits an
|
|
104
|
+
architectural blocker mid-implementation, team-leader posts `RESTART_REQUEST`
|
|
105
|
+
and lead re-runs phase A with the handover + partial commits as input.
|
|
52
106
|
|
|
53
|
-
|
|
107
|
+
#### Within-phase stall watchdog
|
|
54
108
|
|
|
55
|
-
|
|
109
|
+
If lead detects no mailbox activity or shared-task-list transitions for
|
|
110
|
+
`limits.phase_stall_minutes` (default 30) within a phase, it pings the active
|
|
111
|
+
teammate; if the next 30-minute window is also silent, it surfaces a §7
|
|
112
|
+
escalation.
|
|
56
113
|
|
|
57
|
-
|
|
114
|
+
#### Worktree reuse
|
|
58
115
|
|
|
59
|
-
|
|
116
|
+
If you launch `/team-feature` from inside a linked git worktree on a feature
|
|
117
|
+
branch, the planner reuses that worktree instead of nesting a new one. The
|
|
118
|
+
signal `WORKTREE_READY <path> <branch> <origin>` carries `origin: reused` and
|
|
119
|
+
the checkpoint records `**Worktree origin:** reused`.
|
|
60
120
|
|
|
61
|
-
| Where `/team-feature` is launched | Branch
|
|
121
|
+
| Where `/team-feature` is launched | Branch | Behavior |
|
|
62
122
|
|---|---|---|
|
|
63
|
-
| Linked worktree
|
|
64
|
-
| Linked worktree
|
|
65
|
-
| Main repo
|
|
123
|
+
| Linked worktree | feature branch | **Reuse** the current worktree. |
|
|
124
|
+
| Linked worktree | `main`, `master`, `develop`, `dev`, `release/*`, `releases/*` | **Halt.** Switch to a feature branch and re-run. |
|
|
125
|
+
| Main repo | any | **Create** a fresh worktree via Superpowers `using-git-worktrees`. |
|
|
66
126
|
|
|
67
|
-
A reused worktree is owned by you, not the team —
|
|
68
|
-
|
|
69
|
-
The clean-test-baseline check still runs in both modes. If you reused a worktree with uncommitted changes that break the baseline, the planner halts with a §7 escalation asking you to stash or commit first.
|
|
127
|
+
A reused worktree is owned by you, not the team — auto-removal after merge
|
|
128
|
+
**does not run** when origin is `reused`.
|
|
70
129
|
|
|
71
130
|
### 4. Contract sync (full-stack only)
|
|
72
131
|
|
|
73
|
-
When both BE and FE are present and `contracts.source_of_truth != none`, the
|
|
132
|
+
When both BE and FE are present and `contracts.source_of_truth != none`, the
|
|
133
|
+
planner emits `impl:be-contract-publish-<slug>` as the first phase-B task. The
|
|
134
|
+
lead does not assign any `impl:fe-*` task until the backend-developer posts
|
|
135
|
+
`CONTRACT_PUBLISHED`. Every `impl:fe-*` task has
|
|
136
|
+
`depends_on: [impl:be-contract-publish-<slug>]` in its metadata.
|
|
74
137
|
|
|
75
|
-
Mid-implementation contract drift uses `impl:contract-update-<topic
|
|
138
|
+
Mid-implementation contract drift uses `impl:contract-update-<topic>`.
|
|
76
139
|
|
|
77
|
-
### 5. CI gate before finish
|
|
140
|
+
### 5. CI gate before finish (phase H)
|
|
78
141
|
|
|
79
|
-
|
|
142
|
+
team-leader pushes the branch in phase H, then (when `ci.provider != none`)
|
|
143
|
+
polls the CI provider for `ci.required_checks` up to `ci.poll_timeout_minutes`
|
|
144
|
+
(default 20). On green the finish-branch menu surfaces. On red the
|
|
145
|
+
merge-failure menu surfaces with an extra "Show CI logs" option. On timeout a
|
|
146
|
+
3-option menu (re-poll / switch to `pr_opened` / escalate) surfaces.
|
|
80
147
|
|
|
81
148
|
### 6. Project-aware security checklist
|
|
82
149
|
|
|
83
|
-
`security-engineer` reads the `security` block and the stack info, then
|
|
150
|
+
`security-engineer` reads the `security` block and the stack info, then
|
|
151
|
+
expands its checklist accordingly. A `domain: payments` repo gets idempotency
|
|
152
|
+
/ audit-trail / PCI items; a `data_at_rest: sql` repo gets parameterised-query
|
|
153
|
+
items; a no-FE repo skips XSS items entirely. The output report uses ✅/⚠️/❌
|
|
154
|
+
markers — any ❌ blocks phase B.
|
|
155
|
+
|
|
156
|
+
### 7. Iteration cap (MAX_ITERATIONS)
|
|
84
157
|
|
|
85
|
-
|
|
158
|
+
Every `impl:` task carries an `iteration_count:`. If an implementer retries
|
|
159
|
+
the same failing test 8 times it halts and posts a §7 escalation with
|
|
160
|
+
`what_failed:`, `one_change_to_fix:`, and `class:`. The `task-completed` hook
|
|
161
|
+
rejects completions where `iteration_count > 8` unless a `reflection:` block
|
|
162
|
+
is attached.
|
|
86
163
|
|
|
87
|
-
|
|
164
|
+
Configure per project in CLAUDE.md `limits.max_iterations_per_task` (default
|
|
165
|
+
8). Lower for slow-feedback environments; never raise above 12.
|
|
88
166
|
|
|
89
167
|
## Layout
|
|
90
168
|
|
|
@@ -92,13 +170,21 @@ The lead reads the installed Superpowers version in phase 0 and writes it to the
|
|
|
92
170
|
docs/superpowers/
|
|
93
171
|
├── ESCALATION.md # template — referenced by every teammate
|
|
94
172
|
├── README.md # this file
|
|
95
|
-
├── specs/
|
|
96
|
-
├── plans/
|
|
97
|
-
├──
|
|
98
|
-
├── reviews/
|
|
99
|
-
├── reviews/
|
|
100
|
-
├──
|
|
101
|
-
└── sessions/
|
|
173
|
+
├── specs/ YYYY-MM-DD-<slug>-spec.md # owner+architect, phase A
|
|
174
|
+
├── plans/ YYYY-MM-DD-<slug>-plan.md # feature-planner, phase A
|
|
175
|
+
├── handovers/ YYYY-MM-DD-<slug>-handover.md # solution-architect, end of phase A
|
|
176
|
+
├── reviews/ YYYY-MM-DD-<slug>-security.md # security-engineer, phase A (if spawned)
|
|
177
|
+
├── reviews/ YYYY-MM-DD-<slug>-qc.md # qc-engineer, phase G
|
|
178
|
+
├── sessions/ YYYY-MM-DD-<slug>.md # checkpoint, updated by lead each phase
|
|
179
|
+
└── sessions/ <slug>.shape # stack shape marker (be-only|fe-only|full-stack)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Per-feature scratch (lives next to the worktree):
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
.team-superpower/
|
|
186
|
+
├── spawn-briefs/ wave-<plan-phase>.<wave>.md # team-leader, one per wave
|
|
187
|
+
└── static-check-<task-id>.log # implementer, one per impl: task
|
|
102
188
|
```
|
|
103
189
|
|
|
104
190
|
## How to launch
|
|
@@ -107,112 +193,146 @@ docs/superpowers/
|
|
|
107
193
|
/team-feature <one-line feature idea>
|
|
108
194
|
```
|
|
109
195
|
|
|
110
|
-
The lead handles prechecks, spawns the team,
|
|
196
|
+
The lead handles prechecks, spawns the analytics team for phase A, drives the
|
|
197
|
+
hand-off to team-leader, and supervises through phase H.
|
|
198
|
+
|
|
199
|
+
To resume an in-flight feature drop back into the same worktree and re-run
|
|
200
|
+
`/team-feature` — the lead detects the existing `~/.claude/teams/superpower-<slug>/`
|
|
201
|
+
directory and continues from the checkpoint. **There is no separate resume
|
|
202
|
+
command in v5.**
|
|
111
203
|
|
|
112
204
|
## Owner touchpoints (max 3 per feature)
|
|
113
205
|
|
|
114
|
-
1. **
|
|
115
|
-
|
|
116
|
-
|
|
206
|
+
1. **Spec sign-off** (mid phase A). Solution-architect batches all clarifying
|
|
207
|
+
questions before this point.
|
|
208
|
+
2. **Plan approval** (end phase A). Before handover to team-leader.
|
|
209
|
+
3. **Finish-branch decision** (in phase H). Merge / PR / keep / discard.
|
|
117
210
|
|
|
118
|
-
|
|
211
|
+
Recovery touchpoints (`RESTART_REQUEST`, model fallback, CI timeout) are
|
|
212
|
+
**not** counted against the 3-touchpoint budget. Anything else that reaches
|
|
213
|
+
you must use the §7 escalation template in `ESCALATION.md`.
|
|
119
214
|
|
|
120
215
|
## Reading a checkpoint
|
|
121
216
|
|
|
122
|
-
`sessions/YYYY-MM-DD-<slug>.md` is the source of truth for in-flight features.
|
|
217
|
+
`sessions/YYYY-MM-DD-<slug>.md` is the source of truth for in-flight features.
|
|
218
|
+
Each phase boundary appends or updates:
|
|
123
219
|
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
220
|
+
- `## Phases` — checklist, file paths to the artefacts.
|
|
221
|
+
- `## Teammates` — role, agent id, current task or `idle`.
|
|
222
|
+
- `## Open escalations` — anything blocking the owner or a peer.
|
|
223
|
+
- `## Assumptions` — one line per non-owner decision (tactical, cross-role,
|
|
224
|
+
architectural).
|
|
225
|
+
- `## Cycle history` — append a row on every `RESTART_REQUEST`.
|
|
127
226
|
|
|
128
|
-
The lead commits this file after every phase transition. If the lead crashes,
|
|
227
|
+
The lead commits this file after every phase transition. If the lead crashes,
|
|
228
|
+
your feature lives in this file.
|
|
129
229
|
|
|
130
|
-
## Recovery —
|
|
230
|
+
## Recovery — auto-resume
|
|
131
231
|
|
|
132
|
-
If `/resume` drops the team mid-feature
|
|
232
|
+
If `/resume` drops the team mid-feature, re-run `/team-feature <slug>` from
|
|
233
|
+
the same worktree. The lead:
|
|
133
234
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
235
|
+
1. Reads `~/.claude/teams/superpower-<slug>/config.json` to know which roles
|
|
236
|
+
were alive.
|
|
237
|
+
2. Reads `docs/superpowers/sessions/<slug>.md` to know which phase is current.
|
|
238
|
+
3. If past phase A, reads `docs/superpowers/handovers/<date>-<slug>-handover.md`.
|
|
239
|
+
4. Re-spawns the right teammates (skipping completed phases). A
|
|
240
|
+
`Resume: <ISO ts>` line is appended to the checkpoint for the audit trail.
|
|
137
241
|
|
|
138
|
-
|
|
242
|
+
Completed phases are never redone. Partial commits are kept.
|
|
139
243
|
|
|
140
244
|
## Cleanup model
|
|
141
245
|
|
|
142
|
-
The lead is the only thing that knows when a team's work is done. There is no
|
|
246
|
+
The lead is the only thing that knows when a team's work is done. There is no
|
|
247
|
+
`TeamShutdown` hook event, so cleanup is driven by the slash commands:
|
|
143
248
|
|
|
144
|
-
- **Automatic**, the happy path: `/team-feature` runs cleanup immediately
|
|
249
|
+
- **Automatic**, the happy path: `/team-feature` runs cleanup immediately
|
|
250
|
+
after `FINISH_DONE`. The lead verifies all phases complete, all expected
|
|
251
|
+
commits in place, every teammate idle, then invokes the canonical "clean up
|
|
252
|
+
the team" primitive and confirms with a final scan. A `## Closing` block is
|
|
253
|
+
appended to the checkpoint.
|
|
145
254
|
|
|
146
255
|
### Closing-block fields
|
|
147
256
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- `
|
|
151
|
-
- `
|
|
152
|
-
- `
|
|
153
|
-
- `worktree: <state>` —
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
257
|
+
- `finished at: <ISO datetime>`
|
|
258
|
+
- `decision: <merged|pr_opened|kept|discarded>`
|
|
259
|
+
- `cleanup: complete`
|
|
260
|
+
- `cycle_restart_count: <N>` — how many `RESTART_REQUEST` cycles ran.
|
|
261
|
+
- `qc_rounds: <N>` — end-of-plan QC rounds consumed.
|
|
262
|
+
- `worktree: <state>` — `removed` | `already-absent` | `removal-skipped:<reason>` | `kept-by-owner` | `escalated`.
|
|
263
|
+
|
|
264
|
+
- **Manual**, the orphan path: if a lead crashed and left
|
|
265
|
+
`~/.claude/teams/superpower-<slug>/` behind, run `/team-cleanup <slug>` from
|
|
266
|
+
a fresh session. The slash command dry-runs first, prints what would be
|
|
267
|
+
removed, asks for confirmation, then applies. The heartbeat file
|
|
268
|
+
(`docs/superpowers/sessions/<slug>.heartbeat`) protects against wiping a
|
|
269
|
+
live team.
|
|
270
|
+
|
|
271
|
+
Project-side artefacts (`specs/`, `plans/`, `handovers/`, `reviews/`, and the
|
|
272
|
+
checkpoint itself) are **always preserved**. Only platform-side state under
|
|
273
|
+
`~/.claude/teams/superpower-<slug>/` and `~/.claude/tasks/superpower-<slug>/`
|
|
274
|
+
plus the per-feature scratch under `.team-superpower/` is removed.
|
|
162
275
|
|
|
163
276
|
## Heartbeat protocol
|
|
164
277
|
|
|
165
|
-
The lead touches `docs/superpowers/sessions/<slug>.heartbeat` at every phase
|
|
278
|
+
The lead touches `docs/superpowers/sessions/<slug>.heartbeat` at every phase
|
|
279
|
+
boundary. Future sessions read its mtime to decide whether a previous lead is
|
|
280
|
+
still alive:
|
|
166
281
|
|
|
167
|
-
- mtime < 10 minutes → lead is likely alive; cleanup refuses without explicit
|
|
282
|
+
- mtime < 10 minutes → lead is likely alive; cleanup refuses without explicit
|
|
283
|
+
override.
|
|
168
284
|
- mtime ≥ 10 minutes (or file missing) → safe to clean up.
|
|
169
285
|
|
|
170
|
-
If you ever want to confirm liveness manually:
|
|
171
|
-
|
|
172
286
|
```bash
|
|
173
287
|
bash plugins/team-superpower/scripts/team-state.sh scan <slug>
|
|
288
|
+
bash plugins/team-superpower/scripts/team-state.sh members <slug>
|
|
174
289
|
```
|
|
175
290
|
|
|
176
291
|
## Troubleshooting
|
|
177
292
|
|
|
178
293
|
| Symptom | What it usually means | First thing to check |
|
|
179
294
|
|---|---|---|
|
|
180
|
-
| `
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
|
|
|
190
|
-
| `
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
| `
|
|
194
|
-
|
|
|
195
|
-
| `FINISH_BLOCKED <reason>` from the reviewer | The merge step of `finishing-a-development-branch` failed (`conflict` / `non-ff` / `dirty-worktree` / `push-rejected`) | The lead surfaces a 5-option menu (retry / pr_opened / kept / discarded / escalate). Pick one; merge retries cap at 3. |
|
|
196
|
-
| `RETRY_PEER: try <role> first` | Lead bounced an escalation because the originator's class isn't `owner-only` and `Peer attempts` is empty | Originator mails the named role with the question, waits one cadence, then refiles citing the attempt. See `assets/ESCALATION.md` § Decision classes |
|
|
197
|
-
| `LOG_ASSUMPTION: tactical, log to checkpoint § Assumptions` | Lead bounced a `class=tactical` escalation | Originator logs one line under the session checkpoint's `## Assumptions` and proceeds. No owner touchpoint consumed |
|
|
198
|
-
| `git worktree remove` failed during cleanup | Step D.5 hit an uncommitted/untracked file or a locked worktree | Pick from the 4-option menu (show files + retry / force-remove with confirmation / keep / escalate). Force-remove discards uncommitted work — only confirm if you've checked the file list. |
|
|
199
|
-
| 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>` |
|
|
200
|
-
| 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 |
|
|
295
|
+
| `BLOCKED_IDLE_implementer_owes_team-leader_reply` | Implementer tried to idle with an unanswered message from team-leader | Open the implementer's mailbox, reply or escalate |
|
|
296
|
+
| `BLOCKED_IDLE_team-leader_awaiting_lead_on_spawn_or_restart` | team-leader sent SPAWN_REQUEST or RESTART_REQUEST and lead hasn't replied | Look at lead's mailbox; if dropped, re-post |
|
|
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
|
+
| `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
|
+
| `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
|
+
| `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
|
+
| `bad_subprefix` on `impl:*` | Missing `be-` / `fe-` / `rework-` / `contract-update-` sub-prefix | Re-emit with correct prefix |
|
|
303
|
+
| `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 |
|
|
304
|
+
| `MISSING_STATIC_CHECKS` on task complete | `.team-superpower/static-check-<task-id>.log` missing or has a non-zero `exit=` line | Implementer re-runs lint/typecheck/format, captures log, re-commits |
|
|
305
|
+
| `MISSING_REWORK_REFERENCE` on task complete | `impl:rework-*` commit body missing `Reworks: <orig-id>` line | Implementer amends the commit body and re-completes |
|
|
306
|
+
| `MIGRATION_RACE` on task complete | Two migration tasks were `in_progress` simultaneously | Lead should serialize migrations |
|
|
307
|
+
| `EMPTY_CONTRACT_PUBLISH` on task complete | A contract-publish task completed but no commit touched a contract file | Backend-developer didn't actually publish; investigate and re-run |
|
|
308
|
+
| `ARCH_BLOCKED` or `SEC_BLOCKED` from phase A | Pre-impl gate rejected the plan | Planner addresses the report, re-emits, re-runs the gate |
|
|
309
|
+
| Hook log noise | Hooks write tuning data to `.claude/hooks/log.jsonl` | Inspect; trim or refine matchers |
|
|
201
310
|
|
|
202
311
|
## Emergency bypass
|
|
203
312
|
|
|
204
|
-
`--dangerously-skip-permissions` will let a single task ship without the hooks
|
|
313
|
+
`--dangerously-skip-permissions` will let a single task ship without the hooks
|
|
314
|
+
firing. **Don't.** The hooks exist because Superpowers gates exist. Use the
|
|
315
|
+
escalation template to surface the blocker properly.
|
|
205
316
|
|
|
206
317
|
## Where the methodology lives
|
|
207
318
|
|
|
208
|
-
The team-superpower plugin is purely the coordination layer. The actual
|
|
319
|
+
The team-superpower plugin is purely the coordination layer. The actual
|
|
320
|
+
development discipline (TDD, plan format, two-stage review, branch hygiene) is
|
|
321
|
+
owned by the upstream [obra/superpowers](https://github.com/obra/superpowers)
|
|
322
|
+
skills. If a skill's behaviour changes, the team picks it up automatically —
|
|
323
|
+
agents reference skills by name, not by content.
|
|
209
324
|
|
|
210
325
|
## Session checkpoint § Assumptions
|
|
211
326
|
|
|
212
|
-
Every non-owner decision (tactical, cross-role with consensus, architectural
|
|
327
|
+
Every non-owner decision (tactical, cross-role with consensus, architectural
|
|
328
|
+
with sign-off) is logged as one line in the session checkpoint's
|
|
329
|
+
`## Assumptions` block. The qc-engineer scans this block at end-of-plan for
|
|
330
|
+
contradictions with the spec / plan; contradictions surface as QC findings.
|
|
331
|
+
Format:
|
|
213
332
|
|
|
214
333
|
```
|
|
215
334
|
- <ISO ts> <role> [class=<tactical|cross-role|architectural>]: <one-line decision> (peer: <role|none>, evidence: <link to mailbox msg | n/a>)
|
|
216
335
|
```
|
|
217
336
|
|
|
218
|
-
The owner sees the assumptions log at every phase boundary as part of the
|
|
337
|
+
The owner sees the assumptions log at every phase boundary as part of the
|
|
338
|
+
checkpoint commit.
|