@drunkcoding/agents-and-skills 0.0.13 → 0.0.15
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 +9 -6
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugins/html-effectiveness/.claude-plugin/plugin.json +1 -1
- package/plugins/html-effectiveness/README.md +9 -4
- package/plugins/html-effectiveness/agents/report-builder.md +4 -0
- package/plugins/html-effectiveness/assets/base.css +40 -20
- package/plugins/html-effectiveness/docs/template-gallery.md +28 -0
- package/plugins/html-effectiveness/scripts/_tmp.js +37 -0
- package/plugins/html-effectiveness/scripts/catalog.js +47 -0
- package/plugins/html-effectiveness/scripts/extract.js +104 -0
- package/plugins/html-effectiveness/scripts/render.js +2 -2
- package/plugins/html-effectiveness/skills/html-effectiveness/SKILL.md +4 -4
- package/plugins/html-effectiveness/templates/01-exploration-code-approaches.html.tmpl +400 -0
- package/plugins/html-effectiveness/templates/02-exploration-visual-designs.html.tmpl +456 -0
- package/plugins/html-effectiveness/templates/03-code-review-pr.html.tmpl +581 -0
- package/plugins/html-effectiveness/templates/04-code-understanding.html.tmpl +443 -0
- package/plugins/html-effectiveness/templates/05-design-system.html.tmpl +578 -0
- package/plugins/html-effectiveness/templates/06-component-variants.html.tmpl +557 -0
- package/plugins/html-effectiveness/templates/07-prototype-animation.html.tmpl +417 -0
- package/plugins/html-effectiveness/templates/08-prototype-interaction.html.tmpl +363 -0
- package/plugins/html-effectiveness/templates/09-slide-deck.html.tmpl +535 -0
- package/plugins/html-effectiveness/templates/10-svg-illustrations.html.tmpl +444 -0
- package/plugins/html-effectiveness/templates/11-status-report.html.tmpl +152 -0
- package/plugins/html-effectiveness/templates/12-incident-report.html.tmpl +547 -0
- package/plugins/html-effectiveness/templates/13-flowchart-diagram.html.tmpl +361 -0
- package/plugins/html-effectiveness/templates/14-research-feature-explainer.html.tmpl +348 -0
- package/plugins/html-effectiveness/templates/15-research-concept-explainer.html.tmpl +334 -0
- package/plugins/html-effectiveness/templates/16-implementation-plan.html.tmpl +657 -0
- package/plugins/html-effectiveness/templates/17-pr-writeup.html.tmpl +553 -0
- package/plugins/html-effectiveness/templates/18-editor-triage-board.html.tmpl +541 -0
- package/plugins/html-effectiveness/templates/19-editor-feature-flags.html.tmpl +627 -0
- package/plugins/html-effectiveness/templates/20-editor-prompt-tuner.html.tmpl +687 -0
- package/plugins/html-effectiveness/templates/manifest.json +436 -2
- package/plugins/html-effectiveness/tests/_tmp.test.js +58 -0
- package/plugins/html-effectiveness/tests/fixtures/01-exploration-code-approaches.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/02-exploration-visual-designs.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/03-code-review-pr.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/04-code-understanding.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/05-design-system.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/06-component-variants.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/07-prototype-animation.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/08-prototype-interaction.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/09-slide-deck.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/10-svg-illustrations.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/11-status-report.data.json +37 -0
- package/plugins/html-effectiveness/tests/fixtures/12-incident-report.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/13-flowchart-diagram.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/14-research-feature-explainer.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/15-research-concept-explainer.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/16-implementation-plan.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/17-pr-writeup.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/18-editor-triage-board.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/19-editor-feature-flags.data.json +3 -0
- package/plugins/html-effectiveness/tests/fixtures/20-editor-prompt-tuner.data.json +3 -0
- package/plugins/html-effectiveness/tests/manifest.test.js +61 -0
- package/plugins/plugin-validator/.claude-plugin/plugin.json +1 -1
- package/plugins/plugin-validator/skills/validate-agents/SKILL.md +2 -2
- package/plugins/plugin-validator/skills/validate-commands/SKILL.md +2 -2
- package/plugins/plugin-validator/skills/validate-hooks/SKILL.md +57 -18
- package/plugins/team-superpower/.claude-plugin/plugin.json +7 -39
- package/plugins/team-superpower/README.md +85 -24
- package/plugins/team-superpower/agents/backend-developer.md +82 -0
- package/plugins/team-superpower/agents/designer.md +5 -1
- package/plugins/team-superpower/agents/frontend-developer.md +96 -0
- package/plugins/team-superpower/agents/planner.md +144 -16
- package/plugins/team-superpower/agents/qa-engineer.md +30 -0
- package/plugins/team-superpower/agents/reviewer.md +68 -22
- package/plugins/team-superpower/agents/security-engineer.md +110 -0
- package/plugins/team-superpower/agents/software-architect.md +30 -0
- package/plugins/team-superpower/assets/CLAUDE.md.template +96 -0
- package/plugins/team-superpower/assets/ESCALATION.md +19 -5
- package/plugins/team-superpower/assets/SESSION_README.md +119 -11
- package/plugins/team-superpower/commands/team-feature-resume.md +72 -6
- package/plugins/team-superpower/commands/team-feature.md +329 -28
- package/plugins/team-superpower/hooks/hooks.json +0 -3
- package/plugins/team-superpower/hooks/task-completed.sh +54 -5
- package/plugins/team-superpower/hooks/task-created.sh +79 -4
- package/plugins/team-superpower/scripts/detect-stack.sh +434 -0
- package/plugins/team-superpower/scripts/parse-claudemd.sh +194 -0
- package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
- package/plugins/tech-graph/agents/tech-graph.md +8 -0
- package/plugins/team-superpower/agents/implementer.md +0 -46
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Project: <your-project-name>
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
This file is the source of truth for project context. team-superpower reads
|
|
5
|
+
the structured `team-superpower` YAML block below to decide which teammates
|
|
6
|
+
to spawn and what test / build / format commands to use. The free-form prose
|
|
7
|
+
outside the block is passed verbatim to every teammate as project context.
|
|
8
|
+
|
|
9
|
+
team-superpower will NEVER overwrite this file. If it detects a missing
|
|
10
|
+
block, it writes its best guess to `docs/superpowers/stack.detected.md` for
|
|
11
|
+
you to copy/edit/paste here.
|
|
12
|
+
|
|
13
|
+
Delete this comment block before committing.
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
<short narrative describing what the project is, who consumes it, and any cross-
|
|
17
|
+
service dependencies your team should know about. Example: "This is the orders
|
|
18
|
+
microservice for the storefront. APIs talk to the payments service via gRPC.
|
|
19
|
+
PII goes through the redaction pipeline (see redaction-guide).">
|
|
20
|
+
|
|
21
|
+
```team-superpower
|
|
22
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
23
|
+
# Backend
|
|
24
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
25
|
+
# Set `backend: none` (no further keys) if this is a frontend-only repo.
|
|
26
|
+
backend:
|
|
27
|
+
language: csharp # csharp | node-ts | python | go | rust | java
|
|
28
|
+
framework: aspnetcore # framework name; e.g. aspnetcore | fastapi | express | nestjs | gin | axum | spring-boot
|
|
29
|
+
test_framework: xunit # xunit | nunit | mstest | reqnroll | pytest | jest | vitest | go-testing | cargo-test | junit
|
|
30
|
+
build_command: dotnet build
|
|
31
|
+
test_command: dotnet test
|
|
32
|
+
format_command: dotnet format --verify-no-changes # set to "none" if no style check is wired
|
|
33
|
+
migration_tool: ef-core # ef-core | flyway | liquibase | alembic | django-migrations | prisma | typeorm | knex | none
|
|
34
|
+
package_manager: nuget # nuget | npm | pnpm | yarn | bun | pip | poetry | pipenv | go-modules | cargo | maven | gradle
|
|
35
|
+
|
|
36
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
37
|
+
# Frontend
|
|
38
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
39
|
+
# Set `frontend: none` (no further keys) if this is a backend-only repo.
|
|
40
|
+
frontend:
|
|
41
|
+
language: typescript # typescript | javascript
|
|
42
|
+
framework: react # react | vue | svelte | solid | angular | next | nuxt
|
|
43
|
+
bundler: vite # vite | webpack | rspack | next | nuxt | rollup | none
|
|
44
|
+
test_framework: vitest # vitest | jest | none
|
|
45
|
+
e2e_framework: playwright # playwright | cypress | none
|
|
46
|
+
ui_library: shadcn # shadcn | mui | antd | tailwind-only | none
|
|
47
|
+
package_manager: pnpm # npm | pnpm | yarn | bun
|
|
48
|
+
build_command: pnpm build
|
|
49
|
+
test_command: pnpm test
|
|
50
|
+
|
|
51
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
52
|
+
# Contracts — only relevant when both backend AND frontend are present.
|
|
53
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
54
|
+
contracts:
|
|
55
|
+
source_of_truth: openapi # openapi | grpc | graphql | typescript | none
|
|
56
|
+
openapi_path: contracts/openapi.yaml
|
|
57
|
+
ts_gen_command: pnpm generate:api-types # command that regenerates FE-consumable types from the contract
|
|
58
|
+
|
|
59
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
60
|
+
# CI — read by reviewer in phase 7 to gate the finish-branch decision.
|
|
61
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
62
|
+
ci:
|
|
63
|
+
provider: github-actions # github-actions | azure-pipelines | gitlab-ci | circleci | none
|
|
64
|
+
workflow_path: .github/workflows/ci.yml
|
|
65
|
+
required_checks: ["build", "test", "lint"]
|
|
66
|
+
poll_timeout_minutes: 20
|
|
67
|
+
|
|
68
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
69
|
+
# Security — drives the security-engineer's checklist (phase 3).
|
|
70
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
71
|
+
security:
|
|
72
|
+
domain: payments # payments | healthcare | generic | internal-only
|
|
73
|
+
pii: yes # yes | no
|
|
74
|
+
public_endpoints: yes # yes | no
|
|
75
|
+
data_at_rest: sql # sql | nosql | none
|
|
76
|
+
|
|
77
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
78
|
+
# Limits — operational tuning. Defaults are sensible; override only if needed.
|
|
79
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
80
|
+
limits:
|
|
81
|
+
phase_stall_minutes: 30 # within-phase stall watchdog window; two empty windows force a §7 escalation
|
|
82
|
+
max_tasks_per_implementer: 12 # planner halts and asks the owner to split the feature above this
|
|
83
|
+
max_concurrent_teammates: 5 # hard cap on parallel teammates (best-practice guidance from CLAUDE.md)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Conventions
|
|
87
|
+
|
|
88
|
+
<!--
|
|
89
|
+
Anything below is free-form prose. Capture local style rules, conventions
|
|
90
|
+
the architecture review or implementers should respect, and any "we don't do
|
|
91
|
+
X here" rules. Implementers will read this at task start.
|
|
92
|
+
-->
|
|
93
|
+
|
|
94
|
+
- (Example) File-scoped namespaces, nullable reference types on.
|
|
95
|
+
- (Example) React components are function components only.
|
|
96
|
+
- (Example) All API endpoints require `[Authorize]` unless explicitly marked `[AllowAnonymous]`.
|
|
@@ -6,7 +6,7 @@ Every owner-facing question and every "I'm blocked" peer message MUST use this e
|
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
BLOCKED: <one-line question>
|
|
9
|
-
Phase: <
|
|
9
|
+
Phase: <design | plan | pre_impl_review | implementation | qa | review | finish>
|
|
10
10
|
Context: <2-4 sentences — what we tried, what we considered, why we are stuck>
|
|
11
11
|
Options:
|
|
12
12
|
A. <option> — <trade-off>
|
|
@@ -35,13 +35,27 @@ Need from you: choose A/B/C.
|
|
|
35
35
|
## Worked example 2 — lead-to-owner (plan-vs-design mismatch surfaced mid-implementation)
|
|
36
36
|
|
|
37
37
|
```
|
|
38
|
-
BLOCKED:
|
|
38
|
+
BLOCKED: backend-developer reports that task impl:be-add-user-endpoint specifies POST /users, but the approved design doc says PUT /users/{id}. Which is canonical?
|
|
39
39
|
Phase: implementation
|
|
40
|
-
Context: The plan was approved 2026-05-12T09:14Z. Task 4 reads "POST /users → 201 Created with body". Design doc §3 (approved 2026-05-12T08:51Z) reads "idempotent PUT /users/{id}, 200 or 201". Both choices change the test the
|
|
40
|
+
Context: The plan was approved 2026-05-12T09:14Z. Task 4 reads "POST /users → 201 Created with body". Design doc §3 (approved 2026-05-12T08:51Z) reads "idempotent PUT /users/{id}, 200 or 201". Both choices change the test the backend-developer writes in the RED step. We have not yet written code for this task — TDD held the line.
|
|
41
41
|
Options:
|
|
42
|
-
A. Owner confirms PUT /users/{id} is correct → planner amends task 4 → owner re-approves the plan delta →
|
|
43
|
-
B. Owner confirms POST /users is correct → designer amends the design doc → owner re-approves the design delta →
|
|
42
|
+
A. Owner confirms PUT /users/{id} is correct → planner amends task 4 → owner re-approves the plan delta → backend-developer proceeds.
|
|
43
|
+
B. Owner confirms POST /users is correct → designer amends the design doc → owner re-approves the design delta → backend-developer proceeds.
|
|
44
44
|
C. Owner reopens the design question entirely (the two APIs imply different semantics).
|
|
45
45
|
Recommendation: A — the design doc was approved first and the discrepancy reads as a plan-writing slip, not a design change. But this is a load-bearing decision and we won't move without your call.
|
|
46
46
|
Need from you: choose A/B/C.
|
|
47
47
|
```
|
|
48
|
+
|
|
49
|
+
## Worked example 3 — lead-to-owner (`FINISH_BLOCKED` option E)
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
BLOCKED: Merge of feature/user-search into main failed: push rejected because origin/main advanced. Owner picked option E (escalate) from the 5-option menu rather than retrying inline.
|
|
53
|
+
Phase: finish
|
|
54
|
+
Context: Reviewer attempted `git push` after a clean local merge. Push was rejected: "Updates were rejected because the remote contains work that you do not have locally." The remote moved between phase 6 and phase 7. The lead's 5-option menu was presented; owner chose E because they want to coordinate the rebase manually rather than have the team retry blind.
|
|
55
|
+
Options:
|
|
56
|
+
A. Owner rebases the feature branch locally onto origin/main, signals "ready to retry"; lead instructs reviewer to retry merge (counts as 1/3 retries).
|
|
57
|
+
B. Owner pulls latest origin/main into trunk first, then signals; lead retries.
|
|
58
|
+
C. Owner switches the decision to pr_opened and merges via GitHub UI.
|
|
59
|
+
Recommendation: A — the conflict surface is small and a clean rebase plus retry is the cheapest path. We won't move until you say which.
|
|
60
|
+
Need from you: choose A/B/C.
|
|
61
|
+
```
|
|
@@ -2,16 +2,103 @@
|
|
|
2
2
|
|
|
3
3
|
This directory holds the artifacts produced by `/team-feature` runs. The team-superpower plugin seeds it on first use; afterwards, the design / plan / review / checkpoint files for each feature are written by the team and committed.
|
|
4
4
|
|
|
5
|
+
## Customising for your project
|
|
6
|
+
|
|
7
|
+
Stack decisions, test/build commands, contract source-of-truth, CI provider, and security posture are all driven by a `team-superpower` fenced block in your repo-root `CLAUDE.md`. The plugin reads it on every run; it **never overwrites it**.
|
|
8
|
+
|
|
9
|
+
### 1. Write a `team-superpower` block in CLAUDE.md
|
|
10
|
+
|
|
11
|
+
Copy `plugins/team-superpower/assets/CLAUDE.md.template` to your repo root as `CLAUDE.md` (or paste the `team-superpower` block into your existing CLAUDE.md). The block recognises:
|
|
12
|
+
|
|
13
|
+
- `backend` — `language`, `framework`, `test_framework`, `build_command`, `test_command`, `format_command`, `migration_tool`, `package_manager`. Set `backend: none` to declare a frontend-only repo.
|
|
14
|
+
- `frontend` — `language`, `framework`, `bundler`, `test_framework`, `e2e_framework`, `ui_library`, `package_manager`, `build_command`, `test_command`. Set `frontend: none` to declare a backend-only repo.
|
|
15
|
+
- `contracts` — `source_of_truth` (`openapi` / `grpc` / `graphql` / `typescript` / `none`), `openapi_path`, `ts_gen_command`.
|
|
16
|
+
- `ci` — `provider`, `workflow_path`, `required_checks`, `poll_timeout_minutes` (default 20).
|
|
17
|
+
- `security` — `domain` (`payments` / `healthcare` / `generic` / `internal-only`), `pii`, `public_endpoints`, `data_at_rest`.
|
|
18
|
+
|
|
19
|
+
Free-form prose around the block (e.g. a `## Conventions` section with project-specific rules) is passed to every teammate as project context.
|
|
20
|
+
|
|
21
|
+
### 2. Auto-detection fallback
|
|
22
|
+
|
|
23
|
+
If `CLAUDE.md` is missing or has no `team-superpower` block, the lead runs `scripts/detect-stack.sh` in phase 0 and writes its best guess to `docs/superpowers/stack.detected.md`, then halts and asks you to review the `# CONFIRM:` lines and paste the corrected block into CLAUDE.md. **The plugin will not edit your CLAUDE.md for you.**
|
|
24
|
+
|
|
25
|
+
### 3. Shape-adaptive team
|
|
26
|
+
|
|
27
|
+
Once the block (or detection) is parsed, the lead decides the **stack shape**:
|
|
28
|
+
|
|
29
|
+
| Shape | Teammates spawned |
|
|
30
|
+
|-------|-------------------|
|
|
31
|
+
| `full-stack` | designer, planner, software-architect, security-engineer, backend-developer, frontend-developer, qa-engineer, reviewer (8) |
|
|
32
|
+
| `be-only` | designer, planner, software-architect, security-engineer, backend-developer, qa-engineer, reviewer (7) — no `frontend-developer` |
|
|
33
|
+
| `fe-only` | designer, planner, software-architect, security-engineer, frontend-developer, qa-engineer, reviewer (7) — no `backend-developer` |
|
|
34
|
+
|
|
35
|
+
The shape is written to `docs/superpowers/sessions/<slug>.shape`; the `TaskCreated` hook reads it to reject `impl:fe-*` in BE-only repos and vice-versa.
|
|
36
|
+
|
|
37
|
+
#### Concurrency model
|
|
38
|
+
|
|
39
|
+
The numbers above (7 or 8) are the **lifetime** team size, not the parallelism. Roles are phase-gated: only the teammates needed for the current phase are alive at any moment. The maximum concurrency is **2 teammates in parallel**:
|
|
40
|
+
|
|
41
|
+
| Phase | Concurrent teammates |
|
|
42
|
+
|-------|----------------------|
|
|
43
|
+
| 1 design | 1 (designer) |
|
|
44
|
+
| 2 plan | 1 (planner) |
|
|
45
|
+
| 3 pre-impl gate | 2 (software-architect + security-engineer, parallel) |
|
|
46
|
+
| 4 implementation | 1 (`be-only` or `fe-only`) or 2 (`full-stack`, after `CONTRACT_PUBLISHED`) |
|
|
47
|
+
| 5 QA | 1 (qa-engineer) |
|
|
48
|
+
| 6 review | 1 (reviewer) |
|
|
49
|
+
| 7 finish | 1 (reviewer, hat 2 — reused) |
|
|
50
|
+
|
|
51
|
+
This matches the Claude Code agent-team best practice of "3–5 teammates in parallel, 5–6 tasks each". The lead caps concurrency at 5 (configurable via `limits.max_concurrent_teammates` in CLAUDE.md) and refuses to start a phase that would exceed it. The planner caps tasks per implementer at 12 (configurable via `limits.max_tasks_per_implementer`) and asks the owner to split the feature if a plan would exceed it.
|
|
52
|
+
|
|
53
|
+
If the lead detects no mailbox activity or shared-task-list transitions for `limits.phase_stall_minutes` (default 30) within a phase, it pings the active teammate; if the next 30-minute window is also silent, it surfaces a §7 escalation. This is the within-phase stall watchdog — heartbeat-at-phase-boundaries alone doesn't catch silent hangs.
|
|
54
|
+
|
|
55
|
+
#### Worktree reuse
|
|
56
|
+
|
|
57
|
+
If you launch `/team-feature` from inside a linked git worktree on a feature branch, the planner reuses that worktree instead of nesting a new one inside it. The signal `WORKTREE_READY <path> <branch> <origin>` carries `origin: reused` and the checkpoint records `**Worktree origin:** reused`.
|
|
58
|
+
|
|
59
|
+
Detection is automatic — no config needed:
|
|
60
|
+
|
|
61
|
+
| Where `/team-feature` is launched | Branch | Behavior |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| Linked worktree | feature branch (anything not protected) | **Reuse** the current worktree. |
|
|
64
|
+
| Linked worktree | `main`, `master`, `develop`, `dev`, `release/*`, `releases/*` | **Halt.** Switch to a feature branch (`git checkout -b feature/<slug>`) and re-run. |
|
|
65
|
+
| Main repo | any | **Create** a fresh worktree via Superpowers `using-git-worktrees`. |
|
|
66
|
+
|
|
67
|
+
A reused worktree is owned by you, not the team — Step D.5 auto-removal after merge **does not run** when origin is `reused`; the Closing block records `worktree: removal-skipped:reused-existing-worktree` and the worktree stays on disk. Created worktrees are removed after a successful merge as before.
|
|
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.
|
|
70
|
+
|
|
71
|
+
### 4. Contract sync (full-stack only)
|
|
72
|
+
|
|
73
|
+
When both BE and FE are present and `contracts.source_of_truth != none`, the planner emits `impl:be-contract-publish-<slug>` as the first phase-4 task. The lead does not assign any `impl:fe-*` task until the backend-developer posts `CONTRACT_PUBLISHED`. Every `impl:fe-*` task has `depends_on: [impl:be-contract-publish-<slug>]` in its metadata.
|
|
74
|
+
|
|
75
|
+
Mid-implementation contract drift uses `impl:contract-update-<topic>`: BE files it (often after FE posts `CONTRACT_DRIFT_DETECTED`), updates the contract, runs `ts_gen_command`, posts `CONTRACT_UPDATED`, and FE resumes after re-pulling the contract hash.
|
|
76
|
+
|
|
77
|
+
### 5. CI gate before finish
|
|
78
|
+
|
|
79
|
+
The reviewer pushes the branch in phase 7, then (when `ci.provider != none`) polls the CI provider for `ci.required_checks` up to `ci.poll_timeout_minutes` (default 20). On green, the finish-branch menu surfaces. On red, the merge-failure menu surfaces with an extra "Show CI logs" option. On timeout, a 3-option menu (re-poll / switch to pr_opened / escalate) surfaces. Every CI variant counts as the **same** finish-branch touchpoint — the 3-touchpoint cap holds.
|
|
80
|
+
|
|
81
|
+
### 6. Project-aware security checklist
|
|
82
|
+
|
|
83
|
+
`security-engineer` reads the `security` block and the stack info, then expands its checklist accordingly. A `domain: payments` repo gets idempotency / audit-trail / PCI items; a `data_at_rest: sql` repo gets parameterised-query items; a no-FE repo skips XSS items entirely. The output report uses ✅/⚠️/❌ markers — any ❌ blocks phase 4.
|
|
84
|
+
|
|
85
|
+
### 7. Superpowers version pinning
|
|
86
|
+
|
|
87
|
+
The lead reads the installed Superpowers version in phase 0 and writes it to the checkpoint frontmatter (`superpowers_version`). On `/team-feature-resume`, the lead checks whether the installed version still matches. If not, you see a 3-option menu (continue anyway / roll back Superpowers / discard this feature). The pin is informational + safety — never a hard block; you can always continue.
|
|
88
|
+
|
|
5
89
|
## Layout
|
|
6
90
|
|
|
7
91
|
```
|
|
8
92
|
docs/superpowers/
|
|
9
93
|
├── ESCALATION.md # template — referenced by every teammate
|
|
10
94
|
├── README.md # this file
|
|
11
|
-
├── specs/ YYYY-MM-DD-<slug>-design.md
|
|
12
|
-
├── plans/ YYYY-MM-DD-<slug>-plan.md
|
|
13
|
-
├── reviews/ YYYY-MM-DD-<slug>-
|
|
14
|
-
|
|
95
|
+
├── specs/ YYYY-MM-DD-<slug>-design.md # written by designer (phase 1)
|
|
96
|
+
├── plans/ YYYY-MM-DD-<slug>-plan.md # written by planner (phase 2)
|
|
97
|
+
├── reviews/ YYYY-MM-DD-<slug>-arch.md # written by software-architect (phase 3)
|
|
98
|
+
├── reviews/ YYYY-MM-DD-<slug>-security.md # written by security-engineer (phase 3)
|
|
99
|
+
├── reviews/ YYYY-MM-DD-<slug>-qa.md # written by qa-engineer (phase 5)
|
|
100
|
+
├── reviews/ YYYY-MM-DD-<slug>-review.md # written by reviewer (phase 6)
|
|
101
|
+
└── sessions/ YYYY-MM-DD-<slug>.md # checkpoint, updated by lead each phase
|
|
15
102
|
```
|
|
16
103
|
|
|
17
104
|
## How to launch
|
|
@@ -22,12 +109,11 @@ docs/superpowers/
|
|
|
22
109
|
|
|
23
110
|
The lead handles prechecks, spawns the team, and drives the Superpowers skill chain.
|
|
24
111
|
|
|
25
|
-
## Owner touchpoints (max
|
|
112
|
+
## Owner touchpoints (max 3 per feature)
|
|
26
113
|
|
|
27
|
-
1. **
|
|
28
|
-
2. **
|
|
29
|
-
3. **
|
|
30
|
-
4. **Finish-branch decision.** Merge / PR / keep / discard at phase 6.
|
|
114
|
+
1. **Design sign-off** (after phase 1). The brainstorming skill's built-in approval step. Designer batches any clarifying questions before this point so they piggy-back the same touchpoint.
|
|
115
|
+
2. **Plan approval** (after phase 2). Before the pre-impl arch+security gate runs.
|
|
116
|
+
3. **Finish-branch decision** (in phase 7). Merge / PR / keep / discard.
|
|
31
117
|
|
|
32
118
|
Anything else that reaches you must use the §7 escalation template in `ESCALATION.md`. Refuse questions that don't follow it — that's the contract.
|
|
33
119
|
|
|
@@ -56,6 +142,20 @@ The lead reads the checkpoint, respawns the right teammates, and continues from
|
|
|
56
142
|
The lead is the only thing that knows when a team's work is done. There is no `TeamShutdown` hook event, so cleanup is driven by the slash commands:
|
|
57
143
|
|
|
58
144
|
- **Automatic**, the happy path: `/team-feature` runs cleanup immediately after `FINISH_DONE`. The lead verifies all phases complete, all expected commits in place, every teammate idle, then invokes the canonical "clean up the team" primitive and confirms with a final scan. A `## Closing` block is appended to the checkpoint.
|
|
145
|
+
|
|
146
|
+
### Closing-block fields
|
|
147
|
+
|
|
148
|
+
The auto-cleanup writes a `## Closing` block with these fields:
|
|
149
|
+
|
|
150
|
+
- `finished at: <ISO datetime>` — when cleanup finished.
|
|
151
|
+
- `decision: <merged|pr_opened|kept|discarded>` — the finish-branch decision.
|
|
152
|
+
- `cleanup: complete` — confirms all cleanup steps ran (or were intentionally skipped).
|
|
153
|
+
- `worktree: <state>` — outcome of Step D.5. One of: `removed`, `already-absent`, `removal-skipped:<reason>`, `removed (after manual fix)`, `force-removed`, `kept-by-owner`, `escalated`.
|
|
154
|
+
- `worktree_path: <path>` — present only when the worktree directory still exists on disk (states `kept-by-owner`, `escalated`, or `removal-skipped` where the path exists).
|
|
155
|
+
- `merge_retries: K` — present only when K > 0; how many retries the 5-option menu ran before reaching `FINISH_DONE`.
|
|
156
|
+
- `dropped_files: [<path>, ...]` — present only when `worktree: force-removed`; the file list snapshot from before the forced removal.
|
|
157
|
+
|
|
158
|
+
`removal-skipped` reasons: `not-merged-decision` (decision was pr_opened/kept/discarded) | `team-cleanup-incomplete` (Step C/D left platform state present) | `no-worktree-recorded` (checkpoint had no `**Worktree:**` line).
|
|
59
159
|
- **Manual**, the orphan path: if a lead crashed and left `~/.claude/teams/superpower-<slug>/` behind, run `/team-cleanup <slug>` from a fresh session. The slash command dry-runs first, prints what would be removed, asks for confirmation, then applies. The heartbeat file (`docs/superpowers/sessions/<slug>.heartbeat`) protects against wiping a live team — if it was touched in the last 10 minutes, cleanup refuses unless you explicitly confirm with `--ignore-heartbeat`.
|
|
60
160
|
|
|
61
161
|
Project-side artefacts (`specs/`, `plans/`, `reviews/`, and the checkpoint itself) are **always preserved**. Only platform-side state under `~/.claude/teams/superpower-<slug>/` and `~/.claude/tasks/superpower-<slug>/` is removed, plus any matching tmux session.
|
|
@@ -78,14 +178,22 @@ bash plugins/team-superpower/scripts/team-state.sh scan <slug>
|
|
|
78
178
|
| Symptom | What it usually means | First thing to check |
|
|
79
179
|
|---|---|---|
|
|
80
180
|
| `BLOCKED_IDLE: N unanswered peer messages` from a teammate | A peer asked the teammate something and they tried to idle without replying | Open the teammate's mailbox, reply or escalate |
|
|
81
|
-
| `BAD_PREFIX` on a new task | The lead created a task without the `impl:`/`review:`/`meta:`/`block:` prefix | Lead's bug — fix the task title |
|
|
181
|
+
| `BAD_PREFIX` on a new task | The lead created a task without the `impl:`/`review:`/`meta:`/`block:` prefix (or used an `impl:` task without one of the v2 sub-prefixes: `be-`, `fe-`, `qa-fix-be-`, `qa-fix-fe-`, `review-fix-be-`, `review-fix-fe-`, `contract-update-`, `be-migration-`, `be-contract-publish-`) | Lead's bug — fix the task title |
|
|
182
|
+
| `SHAPE_REJECTED: shape is 'be-only'` (or `fe-only`) | A task was created with a prefix the shape doesn't allow (e.g. `impl:fe-*` in a BE-only repo) | Planner or lead bug — re-check `docs/superpowers/sessions/<slug>.shape` and re-emit |
|
|
183
|
+
| `MIGRATION_RACE` on task complete | Two `impl:be-migration-*` tasks were `in_progress` simultaneously | Lead should serialize migrations; backend-developer should idle if another migration is in flight |
|
|
184
|
+
| `EMPTY_CONTRACT_PUBLISH` on task complete | A `impl:be-contract-publish-*` task completed but no commit touched a contract file | Backend-developer didn't actually publish; investigate and re-run the task |
|
|
185
|
+
| `superpowers_version` mismatch on resume | Superpowers was upgraded between feature start and resume | Pick continue / rollback / discard from the 3-option menu |
|
|
82
186
|
| `NO_PLAN_APPROVAL` blocking a task complete | An `impl:` task is missing `metadata.plan_approved_at` | Lead forgot to stamp tasks after owner plan-approval; backfill from the checkpoint timestamp |
|
|
187
|
+
| `ARCH_BLOCKED` or `SEC_BLOCKED` from phase 3 | Pre-impl gate rejected the plan; arch/security findings need plan revisions | Planner addresses the report, re-emits the plan, re-runs the gate before phase 4 starts |
|
|
188
|
+
| `QA_BLOCKED` from phase 5 | Acceptance criteria or regression coverage missing post-implementation | Lead files `impl:qa-fix-be-` / `impl:qa-fix-fe-` tasks; loop back to phase 4 |
|
|
189
|
+
| Backend developer and frontend developer want the same file | Plan didn't capture file-scope metadata for the overlapping tasks, or the task was mis-prefixed | Serialize by holding one; planner should re-route by `impl:be-` / `impl:fe-` prefix and backfill file-scope |
|
|
83
190
|
| `BAD_ESCALATION: missing field(s) ...` | A teammate posted a blocker without all five template fields | Rewrite using the full template in `ESCALATION.md` |
|
|
84
191
|
| Lead refuses to ping the owner | The teammate's request to escalate didn't use the §7 template | Same as above |
|
|
85
192
|
| Teammate ran a non-Superpowers approximation of a skill | Teammate paraphrased the SKILL.md instead of following it | The agent's system prompt requires the canonical skill — re-spawn and remind it explicitly |
|
|
86
|
-
| Two implementers want the same file | Plan didn't capture file-scope metadata for the overlapping tasks | Serialize by holding one; planner should backfill file-scope on the plan |
|
|
87
193
|
| `REFUSED: heartbeat ... is Ns old` from cleanup | Heartbeat is fresh — cleanup script thinks a lead is alive | Verify nothing's running; if certain the previous lead is dead, run with `--ignore-heartbeat` |
|
|
88
194
|
| `/team-feature` halts at preflight | Stale team config left over from a previous run | Run `/team-cleanup <slug>` (or resume via `/team-feature-resume`) |
|
|
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
|
+
| `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. |
|
|
89
197
|
| Auto-cleanup skipped after FINISH_DONE | One of Step A's preconditions failed (missing commits, in-progress tasks, etc.) | Read the lead's halt reason; once resolved, run `/team-cleanup <slug>` |
|
|
90
198
|
| Hook log noise | Hooks write tuning data to `.claude/hooks/log.jsonl` | Inspect the file; trim or refine matchers if a hook is over-triggering |
|
|
91
199
|
|
|
@@ -28,6 +28,24 @@ Same prechecks as `/team-feature`:
|
|
|
28
28
|
|
|
29
29
|
Halt on any failure.
|
|
30
30
|
|
|
31
|
+
### Step 2.5 — Superpowers version-pin check
|
|
32
|
+
|
|
33
|
+
Read the checkpoint frontmatter (the YAML block between `---` markers at the top of the file). Extract `superpowers_version`. Read the currently-installed Superpowers version (`claude plugin list --json` → grep for `superpowers`). Compare:
|
|
34
|
+
|
|
35
|
+
- **Versions match** → proceed.
|
|
36
|
+
- **Versions differ** → halt and surface this 3-option menu to the owner:
|
|
37
|
+
|
|
38
|
+
> **Superpowers version drifted** since this feature started:
|
|
39
|
+
> - pinned in checkpoint: `<pinned>`
|
|
40
|
+
> - currently installed: `<current>`
|
|
41
|
+
>
|
|
42
|
+
> Skill semantics may have shifted. Pick one:
|
|
43
|
+
> - **A. Continue anyway** — accept the risk; semantics may differ mid-feature.
|
|
44
|
+
> - **B. Roll back Superpowers** — owner runs `/plugin install superpowers@<pinned>` and re-runs `/team-feature-resume`. (Lead halts; cannot install plugins itself.)
|
|
45
|
+
> - **C. Discard this feature** — halt resume; the owner manually cleans state via `/team-cleanup <slug>` and starts fresh.
|
|
46
|
+
|
|
47
|
+
This is **not** counted as a touchpoint because it only happens on resume after a rare Superpowers update. On choice A, log `superpowers_pin_overridden: <pinned> → <current>` to the resume-log block; on choice B halt without changes; on choice C halt and instruct the owner to `/team-cleanup`.
|
|
48
|
+
|
|
31
49
|
### Step 3 — Preflight scan
|
|
32
50
|
|
|
33
51
|
Run:
|
|
@@ -52,9 +70,34 @@ After any cleanup, re-run the scan and confirm `team_config_state: absent` befor
|
|
|
52
70
|
The next pending phase is the first unchecked box in the checkpoint's `## Phases` section. Open escalations in the checkpoint take precedence — resolve them before resuming.
|
|
53
71
|
|
|
54
72
|
Read all the artefacts the next phase depends on:
|
|
55
|
-
- If next phase is `
|
|
56
|
-
- If next phase is `
|
|
57
|
-
- If next phase is `
|
|
73
|
+
- If next phase is `plan` or later: design doc (path is in the checkpoint).
|
|
74
|
+
- If next phase is `pre_impl_review` or later: plan + `plan_approved_at` timestamp.
|
|
75
|
+
- If next phase is `implementation` or later: ARCH + SEC reports (both must be `*_PASSED`).
|
|
76
|
+
- If next phase is `qa` or later: implementation commits on the worktree branch.
|
|
77
|
+
- If next phase is `review` or later: QA report (`QA_PASSED`).
|
|
78
|
+
- If next phase is `finish`: code-review report (`REVIEW_PASSED`).
|
|
79
|
+
|
|
80
|
+
### Step 4.a — Mid-phase 7 resume (merge_blocked)
|
|
81
|
+
|
|
82
|
+
If the checkpoint's `## Phases` block shows `- [ ] finish (blocked: <reason>, merge_retries: K/3)`, the previous lead crashed inside phase-7 merge-failure handling. Resume protocol:
|
|
83
|
+
|
|
84
|
+
1. Read `<reason>` and `K` from the checkpoint line.
|
|
85
|
+
2. Re-spawn the reviewer (Hat 2 only; reviewer is reused).
|
|
86
|
+
3. Re-present the 5-option menu from `/team-feature` § Phase 7 merge-failure handling, with option A dropped if `K == 3`.
|
|
87
|
+
4. The owner's choice is translated and reviewer continues per the same translation table.
|
|
88
|
+
5. On the next `FINISH_DONE`, normal auto-cleanup runs (including Step D.5 if decision is `merged`).
|
|
89
|
+
|
|
90
|
+
Do NOT re-run earlier phases. Their checkpoints stand.
|
|
91
|
+
|
|
92
|
+
### Step 4.b — Mid-Step-D.5 resume (worktree removal in flight)
|
|
93
|
+
|
|
94
|
+
If the checkpoint's `## Closing` block exists but is incomplete (has `decision:` and `cleanup: complete` but is missing the `worktree:` line) AND the recorded decision is `merged`, the previous lead crashed inside Step D.5. Resume protocol:
|
|
95
|
+
|
|
96
|
+
1. Read `**Worktree origin:**` from the checkpoint. If it is `reused`, Step D.5 should never have run — abort the mid-Step-D.5 path: append `worktree: removal-skipped:reused-existing-worktree` to the Closing block, commit, and exit normally. The owner's pre-existing worktree stays on disk. Skip to Step 5 of the resume protocol only if there is still feature work to resume; otherwise the resume terminates here.
|
|
97
|
+
2. Verify Step A–D conditions still hold by running `bash ${CLAUDE_PLUGIN_ROOT}/scripts/team-state.sh scan <slug>` — all states must be `absent`. If anything is `present`, halt and instruct the owner to run `/team-cleanup <slug>` before resuming.
|
|
98
|
+
3. Re-run Step D.5 from the top: read `**Worktree:**`, `cd` to repo root, check `git worktree list --porcelain`, attempt non-forced remove. The procedure is idempotent — if the worktree was already removed in the prior session it'll be recorded as `already-absent`.
|
|
99
|
+
4. On remove failure, re-enter the 4-option remove-failure menu fresh (no carry-over retry count — the prior session's count was not persisted because Step D.5 retries are per-session, not per-run; this is intentional, the owner sees a fresh menu).
|
|
100
|
+
5. On completion, write the missing Closing-block fields (`worktree`, `worktree_path` if applicable, `dropped_files` if applicable) and commit.
|
|
58
101
|
|
|
59
102
|
### Step 5 — Reconstruct context
|
|
60
103
|
|
|
@@ -62,9 +105,30 @@ Read all the artefacts the next phase depends on:
|
|
|
62
105
|
- Recreate the team with the same name (`superpower-<slug>`).
|
|
63
106
|
- Touch `docs/superpowers/sessions/<slug>.heartbeat` and update it at every phase boundary (same protocol as `/team-feature`).
|
|
64
107
|
|
|
65
|
-
### Step 6 —
|
|
108
|
+
### Step 6 — Re-read the shape marker
|
|
109
|
+
|
|
110
|
+
Read `docs/superpowers/sessions/<slug>.shape` and `stack_shape` from the checkpoint frontmatter. They must match — if they disagree, halt and escalate (one was hand-edited). The shape determines which implementer to respawn:
|
|
111
|
+
|
|
112
|
+
- `full-stack` → both `backend-developer` and `frontend-developer` are eligible to respawn.
|
|
113
|
+
- `be-only` → only `backend-developer`. NEVER respawn `frontend-developer` for a `be-only` feature.
|
|
114
|
+
- `fe-only` → only `frontend-developer`. NEVER respawn `backend-developer`.
|
|
115
|
+
|
|
116
|
+
If the marker file is missing, re-derive shape from `CLAUDE.md` via `bash ${CLAUDE_PLUGIN_ROOT}/scripts/parse-claudemd.sh shape CLAUDE.md` and write the marker file before continuing.
|
|
117
|
+
|
|
118
|
+
### Step 6 (cont.) — Respawn only the teammates needed
|
|
119
|
+
|
|
120
|
+
For the next phase, spawn the relevant role(s) using the agent definitions shipped with this plugin. Do **not** respawn teammates whose phase is complete unless that phase needs them again later (e.g. reviewer is reused in phase 7 for finish; planner is re-spawned if phase 3 returned `ARCH_BLOCKED` / `SEC_BLOCKED` and the plan needs revision; backend-developer / frontend-developer are re-spawned for `impl:qa-fix-*` or `impl:review-fix-*` tasks). Phase-to-role map:
|
|
66
121
|
|
|
67
|
-
|
|
122
|
+
| Next phase | Spawn |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `design` | `designer` |
|
|
125
|
+
| `plan` | `planner` |
|
|
126
|
+
| `pre_impl_review` | `software-architect` + `security-engineer` (parallel) |
|
|
127
|
+
| `implementation` | `backend-developer` and/or `frontend-developer`, **filtered by stack_shape** (be-only ⇒ BE only; fe-only ⇒ FE only; full-stack ⇒ both, route by prefix) |
|
|
128
|
+
| `qa` | `qa-engineer` |
|
|
129
|
+
| `review` | `reviewer` |
|
|
130
|
+
| `finish` | `reviewer` |
|
|
131
|
+
| `finish (blocked: ...)` | `reviewer` (Hat 2) — same reviewer instance; re-present the 5-option menu, honour the persisted `merge_retries` count |
|
|
68
132
|
|
|
69
133
|
Hand each respawned teammate:
|
|
70
134
|
- the slug
|
|
@@ -94,7 +158,7 @@ Append to the checkpoint (atomic write — tmp + rename) and commit:
|
|
|
94
158
|
### Step 9 — Resume the phase chain
|
|
95
159
|
|
|
96
160
|
Continue per the same rules as `/team-feature`:
|
|
97
|
-
-
|
|
161
|
+
- three allowed owner touchpoints (design sign-off, plan approval, finish-branch decision — `FINISH_BLOCKED` follow-up menus count as the same finish-branch touchpoint continued), nothing else without §7 template
|
|
98
162
|
- checkpoint after every phase boundary, atomic writes
|
|
99
163
|
- heartbeat touched at every phase boundary
|
|
100
164
|
- automatic cleanup after `FINISH_DONE`
|
|
@@ -107,5 +171,7 @@ Continue per the same rules as `/team-feature`:
|
|
|
107
171
|
- **Never** skip Step 3 preflight. Stale team configs cause runtime errors and silently re-use the wrong session IDs.
|
|
108
172
|
- **Never** force-cleanup state with a fresh heartbeat unless the owner has confirmed in writing the previous lead is dead.
|
|
109
173
|
- **Never** skip the resume-log commit. It is the audit trail that proves the resume happened.
|
|
174
|
+
- **Never** respawn an implementer for a shape that excludes it (`frontend-developer` in `be-only`, `backend-developer` in `fe-only`). The hooks will reject the implementer's task creations anyway, but spawning is your decision and you do not bypass the shape.
|
|
175
|
+
- **Never** silently ignore a `superpowers_version` mismatch. Always surface the 3-option menu at Step 2.5.
|
|
110
176
|
|
|
111
177
|
If anything in the checkpoint looks tampered with or inconsistent (e.g. plan marked approved but no plan file exists, completed task with missing commits), halt and escalate to the owner with the §7 template. Do not paper over.
|