@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.
Files changed (62) hide show
  1. package/.claude-plugin/marketplace.json +5 -5
  2. package/README.md +23 -0
  3. package/package.json +1 -1
  4. package/plugins/auto-power/.claude-plugin/plugin.json +1 -1
  5. package/plugins/html-effectiveness/.claude-plugin/plugin.json +1 -1
  6. package/plugins/plugin-validator/.claude-plugin/plugin.json +1 -1
  7. package/plugins/team-superpower/.claude-plugin/plugin.json +1 -1
  8. package/plugins/team-superpower/README.md +186 -115
  9. package/plugins/team-superpower/agents/backend-developer.md +161 -39
  10. package/plugins/team-superpower/agents/feature-planner.md +66 -0
  11. package/plugins/team-superpower/agents/frontend-developer.md +163 -34
  12. package/plugins/team-superpower/agents/orchestrator.md +83 -0
  13. package/plugins/team-superpower/agents/qc-engineer.md +84 -0
  14. package/plugins/team-superpower/agents/security-engineer.md +90 -40
  15. package/plugins/team-superpower/agents/solution-architect.md +80 -0
  16. package/plugins/team-superpower/agents/team-leader.md +100 -0
  17. package/plugins/team-superpower/assets/AGENTS.md.template +23 -0
  18. package/plugins/team-superpower/assets/CLAUDE.md.template +25 -4
  19. package/plugins/team-superpower/assets/ESCALATION.md +114 -66
  20. package/plugins/team-superpower/assets/SESSION_README.md +233 -113
  21. package/plugins/team-superpower/commands/team-feature.md +195 -443
  22. package/plugins/team-superpower/hooks/task-completed.sh +180 -59
  23. package/plugins/team-superpower/hooks/task-created.sh +77 -19
  24. package/plugins/team-superpower/hooks/teammate-idle.sh +118 -13
  25. package/plugins/team-superpower/scripts/assess-complexity.sh +194 -0
  26. package/plugins/team-superpower/scripts/detect-stack.sh +39 -0
  27. package/plugins/team-superpower/scripts/team-state.sh +106 -37
  28. package/plugins/team-superpower/scripts/wave-collision-check.sh +60 -0
  29. package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
  30. package/plugins/html-effectiveness/tests/_tmp.test.js +0 -58
  31. package/plugins/html-effectiveness/tests/fixtures/01-exploration-code-approaches.data.json +0 -3
  32. package/plugins/html-effectiveness/tests/fixtures/02-exploration-visual-designs.data.json +0 -3
  33. package/plugins/html-effectiveness/tests/fixtures/03-code-review-pr.data.json +0 -3
  34. package/plugins/html-effectiveness/tests/fixtures/04-code-understanding.data.json +0 -3
  35. package/plugins/html-effectiveness/tests/fixtures/05-design-system.data.json +0 -3
  36. package/plugins/html-effectiveness/tests/fixtures/06-component-variants.data.json +0 -3
  37. package/plugins/html-effectiveness/tests/fixtures/07-prototype-animation.data.json +0 -3
  38. package/plugins/html-effectiveness/tests/fixtures/08-prototype-interaction.data.json +0 -3
  39. package/plugins/html-effectiveness/tests/fixtures/09-slide-deck.data.json +0 -3
  40. package/plugins/html-effectiveness/tests/fixtures/10-svg-illustrations.data.json +0 -3
  41. package/plugins/html-effectiveness/tests/fixtures/11-status-report.data.json +0 -37
  42. package/plugins/html-effectiveness/tests/fixtures/12-incident-report.data.json +0 -3
  43. package/plugins/html-effectiveness/tests/fixtures/13-flowchart-diagram.data.json +0 -3
  44. package/plugins/html-effectiveness/tests/fixtures/14-research-feature-explainer.data.json +0 -3
  45. package/plugins/html-effectiveness/tests/fixtures/15-research-concept-explainer.data.json +0 -3
  46. package/plugins/html-effectiveness/tests/fixtures/16-implementation-plan.data.json +0 -3
  47. package/plugins/html-effectiveness/tests/fixtures/17-pr-writeup.data.json +0 -3
  48. package/plugins/html-effectiveness/tests/fixtures/18-editor-triage-board.data.json +0 -3
  49. package/plugins/html-effectiveness/tests/fixtures/19-editor-feature-flags.data.json +0 -3
  50. package/plugins/html-effectiveness/tests/fixtures/20-editor-prompt-tuner.data.json +0 -3
  51. package/plugins/html-effectiveness/tests/fixtures/_canned.data.json +0 -7
  52. package/plugins/html-effectiveness/tests/fixtures/_canned.html.tmpl +0 -7
  53. package/plugins/html-effectiveness/tests/fixtures/_canned.manifest.json +0 -18
  54. package/plugins/html-effectiveness/tests/manifest.test.js +0 -61
  55. package/plugins/html-effectiveness/tests/mustache.test.js +0 -47
  56. package/plugins/html-effectiveness/tests/render.test.js +0 -118
  57. package/plugins/team-superpower/agents/designer.md +0 -50
  58. package/plugins/team-superpower/agents/planner.md +0 -186
  59. package/plugins/team-superpower/agents/qa-engineer.md +0 -47
  60. package/plugins/team-superpower/agents/reviewer.md +0 -110
  61. package/plugins/team-superpower/agents/software-architect.md +0 -45
  62. package/plugins/team-superpower/commands/team-feature-resume.md +0 -185
@@ -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.18",
15
+ "version": "0.0.23",
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.18",
29
+ "version": "0.0.23",
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.18",
44
+ "version": "0.0.23",
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.18",
63
+ "version": "0.0.23",
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.18",
79
+ "version": "0.0.23",
80
80
  "category": "workflow",
81
81
  "keywords": [
82
82
  "superpowers",
package/README.md CHANGED
@@ -14,6 +14,29 @@ Published on npm as [`@drunkcoding/agents-and-skills`](https://www.npmjs.com/pac
14
14
  | [`plugin-validator`](plugins/plugin-validator) | Orchestrated validator that checks every plugin's skills, agents, commands, and hooks for spec compliance — runs in parallel and proposes batched fixes. |
15
15
  | [`auto-power`](plugins/auto-power) | 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 on substantive failures. |
16
16
 
17
+ ## team-superpower v3
18
+
19
+ The `team-superpower` plugin shipped a v3 amendment in 2026-05. Three additions on top of v2:
20
+
21
+ 1. **Autonomous complexity assessment (phase 0.5).** The lead picks mode (`solo` / `single-agent` / `team`) and size (`minimal` / `standard` / `full`) from launch-message heuristics. No extra owner touchpoint; the 3-touchpoint promise is preserved. Override per feature with `/team-feature --mode=<mode> --size=<size>`; preview with `--explain`.
22
+
23
+ 2. **Dependency-grouped parallel waves (phase 4).** The planner emits a `## Waves` section. Independent tasks within a wave run concurrently across up to **2 BE + 2 FE implementers** at peak. Collisions on shared files hard-fail and force a planner re-plan; cap is 3 retries before owner escalation.
24
+
25
+ 3. **Per-role model and effort configuration.** Each agent file pins `model:` (alias) and `effort:`:
26
+ - **Opus** for orchestration / design / architecture / security / final review (lead + designer + software-architect + security-engineer + reviewer).
27
+ - **Sonnet** for planning / implementation / QA (planner + backend-developer + frontend-developer + qa-engineer).
28
+
29
+ For production teams, pin specific versions via env vars:
30
+
31
+ ```bash
32
+ export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-7"
33
+ export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-6"
34
+ ```
35
+
36
+ Agent files use aliases so version bumps are intentional.
37
+
38
+ A typical full-stack `team-standard` feature runs ~3 Opus sessions (lead, designer, reviewer) and ~5–7 Sonnet sessions (planner, BE×1–2, FE×1–2, QA). See `plugins/team-superpower/docs/superpowers/team-superpower-v3-spec.md` for the full spec and `plugins/team-superpower/assets/SESSION_README.md` for owner-facing operational notes.
39
+
17
40
  ## Install
18
41
 
19
42
  ### Claude Code marketplace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drunkcoding/agents-and-skills",
3
- "version": "0.0.18",
3
+ "version": "0.0.23",
4
4
  "description": "Personal collection of Claude Code skills and agents, installable via `npx skills`.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "auto-power",
3
3
  "displayName": "Auto Power",
4
- "version": "0.0.18",
4
+ "version": "0.0.23",
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.18",
4
+ "version": "0.0.23",
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.18",
4
+ "version": "0.0.23",
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.18",
4
+ "version": "0.0.23",
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"
@@ -1,58 +1,127 @@
1
1
  # team-superpower
2
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 design → plan → architecture + security gate → BE/FE implementation → QA gate → code review → finish, with at most **3 owner touchpoints**.
3
+ Coordination layer that runs the [obra/superpowers](https://github.com/obra/superpowers)
4
+ skill chain on top of **Claude Code Agent Teams**. One `/team-feature` command
5
+ takes an idea through analysis → planning → implementation → end-of-plan QC →
6
+ finish, with at most **3 owner touchpoints**.
4
7
 
5
- This plugin is *not* a fork of Superpowers. It consumes Superpowers skills as-installed and adds the orchestration: who runs which skill, when, and how teammates talk without bothering the owner.
8
+ This plugin is *not* a fork of Superpowers. It consumes Superpowers skills
9
+ as-installed and adds the orchestration: who runs which skill, when, and how
10
+ teammates talk without bothering the owner.
6
11
 
7
- ## v2 — shape-adaptive, project-aware
12
+ ## Overview (v5)
8
13
 
9
- The plugin reads a `team-superpower` YAML block from your repo-root `CLAUDE.md` to drive every stack decision: BE-only repos do not spawn a frontend teammate, FE-only repos do not spawn a backend teammate, full-stack repos get both plus a contract-publish gate. Test/build/format commands come from `CLAUDE.md` — no more hard-coded `dotnet test`. CI green is required before the finish-branch menu (when a CI provider is configured). The security engineer's checklist is project-aware (no SQL items if no SQL, no XSS items if no HTML). The Superpowers version is pinned at session start so mid-feature skill drift can't corrupt recovery. See `assets/CLAUDE.md.template` for the schema and `docs/superpowers/README.md` (seeded on first run) for the operating manual.
14
+ team-superpower runs **one Agent Teams team** per feature across all phases.
15
+ The lead (orchestrator) is the sole spawner; a coordinating teammate
16
+ (team-leader) requests spawns via `SPAWN_REQUEST`.
17
+
18
+ **Modes:**
19
+
20
+ - **Solo** (1 touchpoint, no team) — bug fixes, typos, single-file changes.
21
+ - **Single-agent** (1 touchpoint, 1 team) — small enhancements.
22
+ - **Team** (2 phase-A touchpoints + 1 phase-H finish touchpoint, 1 team
23
+ across phases A–H) — full features.
24
+
25
+ **Pipeline (team mode):**
26
+ Phase A (solution-architect + feature-planner [+ security-engineer]) →
27
+ handover → Phases B–F (team-leader + implementers, per-plan-phase wave
28
+ dispatch + phase-end SOLID/DRY review) → Phase G (qc-engineer, end-of-plan
29
+ QC, max 3 rounds) → Phase H (lead push + finish-branch decision + cleanup).
30
+
31
+ **Restart-on-stuck:** mid-implementation architectural questions trigger a
32
+ full cycle restart (max 2). No architect standby — phase-A roles shut down
33
+ at handover.
34
+
35
+ See `docs/superpowers/team-superpower-v5-spec.md` for the canonical spec,
36
+ `docs/superpowers/agent-team-flows-v5.md` for diagrams, and
37
+ `docs/superpowers/agent-team-checklist.md` for acceptance criteria.
38
+
39
+ ## Project-aware via CLAUDE.md
40
+
41
+ The plugin reads a `team-superpower` YAML block from your repo-root `CLAUDE.md`
42
+ to drive every stack decision: BE-only repos do not spawn a frontend
43
+ teammate, FE-only repos do not spawn a backend teammate, full-stack repos
44
+ get both plus a contract-publish gate. Test/build/lint/typecheck/format
45
+ commands come from `CLAUDE.md` — no hard-coded toolchain. The
46
+ security-engineer is only spawned when `security.domain ∈
47
+ {payments, healthcare}` or `security.pii: yes`. See
48
+ `assets/CLAUDE.md.template` for the schema.
10
49
 
11
50
  ## What you get
12
51
 
13
- - Three slash commands: `/team-feature`, `/team-feature-resume`, `/team-cleanup`.
14
- - **Eight agent roles**, each with a tightly-scoped system prompt mapping it to specific Superpowers skills or gate behaviour:
15
- - `designer` — runs `brainstorming` (phase 1).
16
- - `planner` runs `using-git-worktrees` then `writing-plans` (phase 2). Routes implementation by `impl:be-` / `impl:fe-` prefix.
17
- - `software-architect` — phase-3 pre-impl architecture gate. Reviews design + plan. Posts `ARCH_PASSED` / `ARCH_BLOCKED`.
18
- - `security-engineer` — phase-3 pre-impl security gate, parallel with `software-architect`. Threat-models design + plan. Posts `SEC_PASSED` / `SEC_BLOCKED`.
19
- - `backend-developer` — phase-4 implementer for `impl:be-` tasks (server, data, infra, CI). Runs `subagent-driven-development` + `test-driven-development` per task.
20
- - `frontend-developer` phase-4 implementer for `impl:fe-` tasks. Same skill chain.
21
- - `qa-engineer` — phase-5 post-impl QA gate. Verifies acceptance criteria + regression coverage. Posts `QA_PASSED` / `QA_BLOCKED`.
22
- - `reviewer` phase-6 runs `requesting-code-review`; phase-7 runs `finishing-a-development-branch`.
23
- - Three guardrail hooks (registered automatically via `hooks/hooks.json`):
24
- - `TeammateIdle` refuses idle while peer mail is unanswered.
25
- - `TaskCreated` enforces `impl:` / `review:` / `meta:` / `block:` task title prefixes.
26
- - `TaskCompleted` gates `impl:` completions on `plan_approved_at` and validates escalation entries.
27
- - `scripts/team-state.sh` inspection + cleanup helper. Called by the slash commands; also runnable directly.
52
+ - Two slash commands: `/team-feature` and `/team-cleanup`. There is **no
53
+ separate resume command in v5** `/team-feature` auto-detects in-progress
54
+ features.
55
+ - **Eight agent roles**, each with a tightly-scoped system prompt:
56
+
57
+ ## Agents
58
+
59
+ | Agent | Lifetime | Role |
60
+ |---|---|---|
61
+ | `orchestrator` | Whole feature | Lead session; sole spawner; SPAWN_REQUEST + RESTART_REQUEST handler; cleanup + push. |
62
+ | `solution-architect` | Phase A only | Spec + arch-map. |
63
+ | `feature-planner` | Phase A only | Plan (plan-phase grouped, waves). |
64
+ | `security-engineer` | Phase A only (regulated domains only) | Regulatory + threat-model review. |
65
+ | `team-leader` | Phases B–F | Coordinator; composes spawn briefs; runs phase-end SOLID/DRY/domain review. |
66
+ | `backend-developer` / `frontend-developer` | Per wave | TDD implementation, static-check log capture, commit. |
67
+ | `qc-engineer` | Phase G only | End-of-plan 5-step QC; rework dispatch if blocking. |
68
+
69
+ - **Three guardrail hooks** (registered automatically via `hooks/hooks.json`):
70
+ - `TeammateIdle` — role-aware idle routing (refuses idle when the role's
71
+ outstanding obligation is open).
72
+ - `TaskCreated` — enforces `impl:` / `review:` / `meta:` / `block:` task
73
+ title prefixes, v5 wave shape, and shape-marker scope.
74
+ - `TaskCompleted` — gates `impl:` completions on the static-check log
75
+ (`.team-superpower/static-check-<task-id>.log`) and rework-reference
76
+ (`Reworks: <orig-id>` for `impl:rework-*`).
77
+ - `scripts/team-state.sh` — inspection + cleanup helper; new `members <slug>`
78
+ subcommand lists role / id / status per teammate.
28
79
  - Robustness primitives baked into the workflow:
29
- - **Preflight scan** in `/team-feature` and `/team-feature-resume` — detects orphaned team config, stale task lists, and in-flight runs before doing anything destructive.
30
- - **Two gate phases** (pre-impl arch+security, post-impl QA) — block forward progress until findings resolve, so the reviewer at phase 6 sees clean code-quality issues only, not architectural or security regressions.
31
- - **Heartbeat file** at `docs/superpowers/sessions/<slug>.heartbeat`touched at every phase boundary; cleanup refuses to wipe state while the heartbeat is fresh.
32
- - **Atomic checkpoint writes** (tmp + rename) — half-written checkpoints can't corrupt recovery.
33
- - **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.
34
- - **`/team-cleanup [slug]`** for the case where a previous lead crashed and the canonical cleanup path is no longer available.
35
- - Templates seeded into your project on first use: `docs/superpowers/ESCALATION.md` (escalation template + 2 worked examples) and `docs/superpowers/README.md` (onboarding + troubleshooting).
80
+ - **Preflight scan** in `/team-feature` — detects orphaned team config and
81
+ in-flight runs before doing anything destructive.
82
+ - **Auto-resume** in `/team-feature` — detects in-progress handovers
83
+ without a matching qc-report and offers to continue.
84
+ - **Phase-end leader review** — team-leader scans every plan-phase's diff
85
+ against the arch-map for SOLID/DRY/domain violations and dispatches
86
+ `impl:rework-*` tasks.
87
+ - **End-of-plan QC** — qc-engineer runs once after `PLAN_COMPLETE`; up to 3
88
+ rework rounds.
89
+ - **Heartbeat file** at `docs/superpowers/sessions/<slug>.heartbeat` —
90
+ touched at every phase boundary; cleanup refuses to wipe state while the
91
+ heartbeat is fresh.
92
+ - **Automatic cleanup after `FINISH_DONE`** — the lead verifies all phases
93
+ complete, all commits in place, teammates idle, then runs the canonical
94
+ "clean up the team" primitive followed by a verification scan.
95
+ - **`/team-cleanup [slug]`** for the case where a previous lead crashed.
96
+ - Templates seeded into your project on first use:
97
+ `docs/superpowers/ESCALATION.md` (template + three worked examples),
98
+ `docs/superpowers/README.md` (onboarding + troubleshooting), and
99
+ `docs/superpowers/handovers/README.md` (handover artefact contract).
36
100
 
37
101
  ## Phase chain at a glance
38
102
 
39
103
  | Phase | Role(s) | Output | Gate? |
40
104
  |---|---|---|---|
41
- | 1 Design | `designer` | Design doc `docs/superpowers/specs/` | Owner approval |
42
- | 2 Plan | `planner` | Worktree + plan with `impl:be-` / `impl:fe-` tasks `docs/superpowers/plans/` | Owner approval |
43
- | 3 Pre-impl review (parallel) | `software-architect` + `security-engineer` | ARCH + SEC reports → `docs/superpowers/reviews/` | Both must post PASSED |
44
- | 4 Implementation (parallel) | `backend-developer` + `frontend-developer` | TDD commits on feature branch | All `impl:` tasks complete |
45
- | 5 QA | `qa-engineer` | QA report → `docs/superpowers/reviews/` | `QA_PASSED` |
46
- | 6 Code review | `reviewer` | Review report → `docs/superpowers/reviews/` | `REVIEW_PASSED` |
47
- | 7 Finish | `reviewer` | Merge / PR / keep / discard | Owner decision |
105
+ | A Analysis | `solution-architect` + `feature-planner` [+ `security-engineer`] | Spec, arch-map, plan, handover | Spec sign-off + plan approval (2 touchpoints) |
106
+ | 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
+ | G — End-of-plan QC | `qc-engineer` | `<date>-<slug>-qc-report.md` | `QC_PASS` (max 3 rework rounds) |
108
+ | H Finish | `orchestrator` | Push + merge/PR/keep/discard | Owner decision (finish touchpoint) |
48
109
 
49
110
  ## Requirements
50
111
 
51
112
  - Claude Code `2.1.32` or later.
52
- - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in your environment (the slash command halts if absent).
53
- - The Superpowers plugin installed: `/plugin install superpowers@claude-plugins-official`.
54
- - `jq` on `$PATH` (the hooks degrade to log-only when missing, but you want them enforcing).
55
- - **Run the lead session on Opus.** The 8 teammate agents are pinned to Sonnet via `model: sonnet` in their frontmatter, so they always spawn on Sonnet. The lead inherits whatever model your `/team-feature` session is using, and the lead carries the cross-phase reasoning load (gate decisions, escalation triage, FINISH_BLOCKED recovery), so Opus is the right tier. The command performs a self-attestation check at preflight and halts if the lead reports it is running on Sonnet/Haiku.
113
+ - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in your environment (the slash
114
+ command halts if absent).
115
+ - The Superpowers plugin installed:
116
+ `/plugin install superpowers@claude-plugins-official`.
117
+ - `jq` on `$PATH` (hooks degrade to log-only when missing, but you want them
118
+ enforcing).
119
+ - **Run the lead session on Opus.** Teammates are pinned via their agent
120
+ frontmatter, so they always spawn on their pinned model. The lead carries
121
+ the cross-phase reasoning load (gate decisions, SPAWN_REQUEST handling,
122
+ RESTART_REQUEST approval, FINISH_BLOCKED recovery), so Opus is the right
123
+ tier. The command performs a self-attestation check at preflight and halts
124
+ if the lead reports it is running on Sonnet/Haiku.
56
125
 
57
126
  ## Install
58
127
 
@@ -76,37 +145,43 @@ Then make sure the agent-teams env flag is set in `~/.claude/settings.json`:
76
145
  /team-feature add a /healthcheck endpoint that returns 200 OK
77
146
  ```
78
147
 
79
- You will be interrupted at most three times:
148
+ You will be interrupted at most three times in team mode:
80
149
 
81
- 1. Design sign-off (after phase 1).
82
- 2. Plan approval (after phase 2).
83
- 3. Finish-branch decision — merge / PR / keep / discard (in phase 7).
150
+ 1. Spec sign-off (mid phase A).
151
+ 2. Plan approval (end phase A).
152
+ 3. Finish-branch decision — merge / PR / keep / discard (phase H).
84
153
 
85
- 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.
154
+ Anything else that reaches you uses the escalation template in
155
+ `docs/superpowers/ESCALATION.md`. If a teammate pings you without using the
156
+ template, that's a bug — file it.
86
157
 
87
158
  ## Task prefix routing
88
159
 
89
- The planner assigns every `impl:` task one of two sub-prefixes; the lead routes by prefix:
160
+ The planner assigns every `impl:` task one of these sub-prefixes; the lead
161
+ routes by prefix:
90
162
 
91
163
  | Prefix | Routed to | Scope |
92
164
  |---|---|---|
93
- | `impl:be-` | `backend-developer` | Server-side code, APIs, data, schemas, migrations, infra / CI scripts, Docker, IaC |
94
- | `impl:fe-` | `frontend-developer` | UI components, pages, client-side state, styles, browser assets |
165
+ | `impl:be-*` | `backend-developer` | Server-side code, APIs, data, schemas, infra |
166
+ | `impl:be-migration-*` | `backend-developer` | Schema migrations (serialised by hook) |
167
+ | `impl:be-contract-publish-*` | `backend-developer` | Publishes contract; gates FE tasks |
168
+ | `impl:fe-*` | `frontend-developer` | UI components, pages, client-side state, styles |
169
+ | `impl:contract-update-*` | `backend-developer` | Contract drift fix (scope-neutral) |
170
+ | `impl:rework-*` | inherits originating task's role | Phase-end leader review or QC rework |
95
171
 
96
- Defect-fix tasks filed mid-flight inherit the routing prefix:
97
-
98
- | Prefix | Filed by | Routed to |
99
- |---|---|---|
100
- | `impl:qa-fix-be-` / `impl:qa-fix-fe-` | `qa-engineer` (phase 5) | matching BE / FE implementer |
101
- | `impl:review-fix-be-` / `impl:review-fix-fe-` | `reviewer` (phase 6) | matching BE / FE implementer |
172
+ Wave metadata must be one of: `<plan-phase>.<wave>` (e.g. `1.1`),
173
+ `<plan-phase>.rework`, or `qc-rework`.
102
174
 
103
175
  ## Resume after `/resume` drops the team
104
176
 
105
- ```text
106
- /team-feature-resume YYYY-MM-DD-<slug>.md
107
- ```
177
+ Re-run `/team-feature` from the same worktree. The lead detects:
108
178
 
109
- 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.
179
+ 1. Existing `~/.claude/teams/superpower-<slug>/` directory.
180
+ 2. In-progress feature artefacts (handover without matching qc-report).
181
+ 3. Partial commits ahead of the base branch.
182
+
183
+ …and presents a single resume prompt. On continue, completed phases are not
184
+ redone.
110
185
 
111
186
  ## Clean up after a crashed lead
112
187
 
@@ -115,47 +190,29 @@ The lead reads the committed checkpoint in `docs/superpowers/sessions/`, scans `
115
190
  /team-cleanup --all
116
191
  ```
117
192
 
118
- 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.
193
+ Use this when a previous lead died (terminal closed, `/resume` lost the team,
194
+ OS killed the process) and left `~/.claude/teams/superpower-<slug>/` behind.
195
+ Project-side artefacts under `docs/superpowers/{specs,plans,handovers,reviews}`
196
+ are preserved; only platform-side state plus per-feature scratch
197
+ (`.team-superpower/spawn-briefs/`, `.team-superpower/static-check-*.log`) is
198
+ removed.
119
199
 
120
- 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.
200
+ The slash command dry-runs first, prints what would be removed, and asks for
201
+ confirmation. The heartbeat file at
202
+ `docs/superpowers/sessions/<slug>.heartbeat` is checked — if it was touched
203
+ in the last 10 minutes, cleanup refuses unless the owner explicitly confirms
204
+ with `--ignore-heartbeat` that the previous lead is dead.
121
205
 
122
206
  The helper script is also runnable directly:
123
207
 
124
208
  ```bash
125
209
  bash plugins/team-superpower/scripts/team-state.sh scan # list all teams
126
210
  bash plugins/team-superpower/scripts/team-state.sh scan <slug> # inspect one
211
+ bash plugins/team-superpower/scripts/team-state.sh members <slug> # list role/id/status
127
212
  bash plugins/team-superpower/scripts/team-state.sh cleanup <slug> # dry-run
128
213
  bash plugins/team-superpower/scripts/team-state.sh cleanup <slug> --force # apply
129
214
  ```
130
215
 
131
- ## Automatic cleanup after the feature ships
132
-
133
- `/team-feature` runs cleanup automatically the instant the reviewer reports `FINISH_DONE` (merge / PR / keep / discard). Before wiping anything, the lead verifies:
134
-
135
- - every phase from design through finish is complete in the checkpoint
136
- - the shared task list has zero in-progress tasks
137
- - the expected commits exist on the worktree (design, plan, ARCH+SEC reports, TDD pairs of test + code, QA report, code-review report, and any merge / PR-prep commit per the finish decision)
138
- - all teammates are idle and shut down
139
-
140
- 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.**
141
-
142
- ### Worktree removal on merge
143
-
144
- When (and only when) the finish decision is `merged` AND the platform-cleanup scan shows everything `absent`, the lead now runs a Step D.5 worktree removal between team cleanup and the final checkpoint commit. `git worktree remove <path>` is non-forced by default; the feature branch is left in place (only the worktree directory is removed). If `git worktree remove` fails (untracked files, locked worktree, in-progress git operation), the lead presents a 4-option menu:
145
-
146
- | | Option | Behaviour |
147
- |---|---|---|
148
- | A | Show files + retry | Lists blocking files via `git status --short` + `git diff --stat`, then retries (cap 3). |
149
- | B | Force remove | Discards uncommitted work in the worktree (requires typed `yes` confirmation). |
150
- | C | Keep worktree | Leaves the directory on disk; owner removes manually. |
151
- | D | Escalate | §7 escalation with verbatim stderr. |
152
-
153
- Other finish decisions (`pr_opened`, `kept`, `discarded`) skip Step D.5 — the worktree stays so the owner can keep working in it or inspect artefacts. The Closing block records the outcome with a `worktree:` field.
154
-
155
- ### Merge-failure menu
156
-
157
- If the reviewer's merge step in phase 7 fails (`conflict` / `non-ff` / `dirty-worktree` / `push-rejected`), it posts `FINISH_BLOCKED <reason>` instead of `FINISH_DONE`. The lead surfaces a 5-option menu — retry / switch to pr_opened / switch to kept / switch to discarded / escalate — counted as the same finish-branch touchpoint, not a new one. Retries cap at 3; after the 3rd `FINISH_BLOCKED`, option A drops. The cap persists across `/team-feature-resume` via the checkpoint.
158
-
159
216
  ## Layout
160
217
 
161
218
  ```
@@ -163,60 +220,74 @@ plugins/team-superpower/
163
220
  ├── .claude-plugin/plugin.json
164
221
  ├── README.md
165
222
  ├── agents/
166
- │ ├── designer.md
167
- │ ├── planner.md
168
- │ ├── software-architect.md
223
+ │ ├── orchestrator.md
224
+ │ ├── solution-architect.md
225
+ │ ├── feature-planner.md
169
226
  │ ├── security-engineer.md
227
+ │ ├── team-leader.md
170
228
  │ ├── backend-developer.md
171
229
  │ ├── frontend-developer.md
172
- ├── qa-engineer.md
173
- │ └── reviewer.md
230
+ └── qc-engineer.md
174
231
  ├── commands/
175
- │ ├── team-feature.md
176
- │ ├── team-feature-resume.md
232
+ │ ├── team-feature.md # v5 single-team lifecycle + auto-resume
177
233
  │ └── team-cleanup.md
178
234
  ├── hooks/
179
235
  │ ├── hooks.json
180
- │ ├── teammate-idle.sh
181
- │ ├── task-created.sh recognises v2 sub-prefixes and the shape marker
182
- │ └── task-completed.sh migration serialization + contract-publish verification
236
+ │ ├── teammate-idle.sh # role-aware idle routing
237
+ │ ├── task-created.sh # impl:/review:/meta:/block: + v5 wave shape
238
+ │ └── task-completed.sh # static-check log + rework reference gate
183
239
  ├── scripts/
184
- │ ├── team-state.sh inspection + cleanup helper
185
- │ ├── detect-stack.sh → filesystem-based stack detection (BE / FE / contracts / CI)
186
- │ └── parse-claudemd.sh → extract the team-superpower block from CLAUDE.md
240
+ │ ├── team-state.sh # inspection + cleanup helper + members subcommand
241
+ │ ├── detect-stack.sh
242
+ │ └── parse-claudemd.sh
187
243
  └── assets/
188
- ├── ESCALATION.md seeded to docs/superpowers/ESCALATION.md on first run
189
- ├── SESSION_README.md seeded to docs/superpowers/README.md on first run
190
- └── CLAUDE.md.template copy to repo root if no CLAUDE.md exists
244
+ ├── ESCALATION.md # seeded to docs/superpowers/ESCALATION.md on first run
245
+ ├── SESSION_README.md # seeded to docs/superpowers/README.md on first run
246
+ └── CLAUDE.md.template # copy to repo root if no CLAUDE.md exists
191
247
  ```
192
248
 
193
249
  ## Clarification routing
194
250
 
195
- Teammates resolve as many clarifications as possible without involving the owner. Every clarification is classified into one of four classes — `tactical`, `cross-role`, `architectural`, `owner-only` — per the table in `assets/ESCALATION.md` § Decision classes.
251
+ Teammates resolve as many clarifications as possible without involving the
252
+ owner. Every clarification is classified into one of three classes —
253
+ `tactical`, `cross-role`, `architectural` — per `assets/ESCALATION.md`.
196
254
 
197
- - **Tactical** questions (naming, wording, thresholds in range) are decided by the originator and logged in the session checkpoint's `## Assumptions` block. No mailbox, no escalation.
198
- - **Cross-role** questions go to the relevant peer; consensus on first reply → log + proceed; after 2 round-trips with no consensus → escalate citing the attempts.
199
- - **Architectural** questions go to `software-architect`; sign-off → log; dissent → escalate.
200
- - **Owner-only** questions (scope, design-vs-plan contradiction, security-blocking) escalate immediately.
255
+ - **Tactical** (naming, wording, thresholds in range) decided by the
256
+ originator and logged in the checkpoint's `## Assumptions` block. No
257
+ SendMessage, no escalation.
258
+ - **Cross-role** to the relevant peer via SendMessage; consensus on first
259
+ reply → log + proceed; no consensus → escalate citing attempts.
260
+ - **Architectural** — implementers send `ESCALATE class=architectural` to
261
+ team-leader. If team-leader cannot resolve from arch-map, team-leader posts
262
+ `RESTART_REQUEST` to the orchestrator (recovery touchpoint, not counted
263
+ against the 3-budget).
201
264
 
202
- Every escalation carries a `Peer attempts:` field. The `TaskCompleted` hook warns when missing (warn-only). The lead refuses to forward an escalation to the owner with `RETRY_PEER` when the class is not `owner-only` and `Peer attempts` is empty. Per-role rubrics live in each agent file under `agents/<role>.md` § Clarification routing.
265
+ Per-role rubrics live in each agent file under `agents/<role>.md`.
203
266
 
204
267
  ## Design
205
268
 
206
- See the project's `docs/superpowers/README.md` after first run for the operating manual. The short version:
207
-
208
269
  - The **lead** is a conductor. It never runs a Superpowers skill itself.
209
- - Teammates run **canonical, unmodified** Superpowers skills. They are forbidden from paraphrasing or replacing them.
210
- - TDD is enforced by `subagent-driven-development` + `test-driven-development` per implementer task. The `TaskCompleted` hook is a backstop, not the primary control.
211
- - **Two gate phases** keep the reviewer's job small. Architecture and security issues are caught at phase 3 (pre-impl) so implementers don't waste cycles on plans that fail review. QA defects are caught at phase 5 (post-impl) so the reviewer at phase 6 only deals with code-quality findings.
212
- - 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.
213
- - 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.
270
+ - Teammates run **canonical, unmodified** Superpowers skills. They are
271
+ forbidden from paraphrasing or replacing them.
272
+ - TDD is enforced by `subagent-driven-development` +
273
+ `test-driven-development` per implementer task. Static checks (lint +
274
+ format + typecheck) are captured to a log and gated by the `TaskCompleted`
275
+ hook.
276
+ - **Phase-end leader review** + **end-of-plan QC** keep architectural drift
277
+ in check without a per-task QA loop.
278
+ - All cross-team chatter that needs an owner decision goes through the §7
279
+ escalation template.
280
+ - Every phase boundary writes a checkpoint to
281
+ `docs/superpowers/sessions/<slug>.md`.
214
282
 
215
283
  ## Out of scope
216
284
 
217
285
  - Token-usage metrics per teammate per phase.
218
286
  - Per-role permission allowlists.
219
- - Standalone devops, technical-writer, or minimal-change-engineer roles — infra/CI folds into `backend-developer`; documentation lands in PR descriptions and inline; minimal-change patterns are scoped per task by the planner.
287
+ - Standalone devops, technical-writer, or minimal-change-engineer roles —
288
+ infra/CI folds into `backend-developer`; documentation lands in PR
289
+ descriptions and inline; minimal-change patterns are scoped per task by
290
+ the planner.
220
291
 
221
292
  ## License
222
293