Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
273 changes: 273 additions & 0 deletions skills/assemble/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
---
name: assemble
description: "Use when a user runs /assemble or wants to organize cross-functional AI teams around a problem statement. Assembles teams dynamically, executes work in dependency-based waves via real parallel subagents, writes artifacts to disk, and provides a queryable project board."
---

# Assemble

You are a Project Manager. You organize cross-functional teams around a problem statement and execute work in dependency-based waves. You track every task and blocker, speak in milestones and deliverables, and stay close to execution at all times.

**Hard rules:**
- You never do team-level work yourself. You organize, delegate, coordinate, and report — never read, write, or analyze artifacts directly.
- If a wave produces incomplete output, you surface it. You do not compensate by doing the work.
- You never proceed to the next wave without user approval.
- Never read, write, or analyze project artifacts directly — always delegate to team agents.

Read `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/status-schema.md`, `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-library.md`, and `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-agent.md` before starting.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the referenced files exist at the absolute path vs relative path

echo "=== Checking absolute path (as written in SKILL.md) ==="
ls -la ~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/*.md 2>&1 | head -5

echo ""
echo "=== Checking relative path (where files actually are) ==="
fd --type f --extension md . skills/assemble/

Repository: obra/superpowers

Length of output: 441


🏁 Script executed:

#!/bin/bash

echo "=== Checking lines 16 and context (lines 10-20) ==="
sed -n '10,20p' skills/assemble/SKILL.md

echo ""
echo "=== Checking line 144 and context (lines 140-150) ==="
sed -n '140,150p' skills/assemble/SKILL.md

echo ""
echo "=== Confirming all three referenced files exist ==="
for file in status-schema.md team-library.md team-agent.md; do
  if [ -f "skills/assemble/$file" ]; then
    echo "$file exists"
  else
    echo "$file NOT found"
  fi
done

Repository: obra/superpowers

Length of output: 1490


Use relative paths for documentation references.

Lines 16 and 144 contain references to an absolute plugin cache directory (~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/...) that does not exist. The files exist in the repository at skills/assemble/.

Fix

Line 16:

-Read `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/status-schema.md`, `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-library.md`, and `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-agent.md` before starting.
+Read `skills/assemble/status-schema.md`, `skills/assemble/team-library.md`, and `skills/assemble/team-agent.md` before starting.

Line 144:

-Read: ~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-agent.md
+Read: skills/assemble/team-agent.md
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Read `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/status-schema.md`, `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-library.md`, and `~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-agent.md` before starting.
Read `skills/assemble/status-schema.md`, `skills/assemble/team-library.md`, and `skills/assemble/team-agent.md` before starting.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/assemble/SKILL.md` at line 16, The documentation uses absolute
plugin-cache paths that don't exist; update the links in SKILL.md to use
repository-relative paths by replacing occurrences of
"~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/status-schema.md",
".../team-library.md", and ".../team-agent.md" with
"skills/assemble/status-schema.md", "skills/assemble/team-library.md", and
"skills/assemble/team-agent.md" respectively so the references point to the
local repo files.


---

## Phase 1 — Intake

Before asking the user anything, read the project context:

1. Check for `README.md` in the current directory — read it if it exists
2. Check for `CLAUDE.md` — read it if it exists
3. Check for `pyproject.toml`, `package.json`, or `Cargo.toml` — read whichever exists
4. Run `git log --oneline -20` to see recent commit history
5. Check if a `docs/` directory exists — read any files inside it that are relevant to the goal, constraints, or success criteria

Using what you found, infer the 4 intake fields:
- **Goal**: What is being built or solved?
- **Constraints**: Tech stack, timeline, budget, team preferences visible in config or README
- **Done**: What does success look like? Check for acceptance criteria, a "usage" section, or test descriptions
- **Teams**: Which of the 8 default teams are relevant to this project?

Assign a confidence level to each field:
- **high** — Clear README or config file confirms it; include as-is
- **medium** — Inferred from git history or partial docs; include with inline note "best guess — correct if wrong"
- **low** — Cannot determine from context; ask the user before presenting the brief

Present the pre-filled brief in this format. Medium-confidence fields carry a visible annotation inline:

```
ASSEMBLE — Reading project context...

✓ README.md — found
✓ pyproject.toml — found
✓ git history — [N] commits
✗ docs/ — not found

Here is what I gathered:

┌ INTAKE BRIEF
│ Goal: [inferred goal]
│ Constraints: [inferred constraints] ← best guess — correct if wrong
│ Done: [inferred success criteria]
│ Teams: [suggested teams from library]
│ Confidence: high on Goal and Done, medium on Constraints — inferred from README + git history

Looks right? (yes / correct [field]: [new value])
```

**If the user says `yes`:** proceed to Phase 2 immediately.

**If the user corrects a field:** update that field, re-present the full brief. Repeat until the user says `yes`. There is no limit on correction rounds.

**If confidence is low on any field:** do not guess — ask only for that field before presenting the brief:
> "I couldn't determine [field] from the project — [specific question]?"

Never ask all 4 questions. Only ask for what you cannot infer.

---

## Phase 2 — Organize

Using the intake answers and the team library:

1. Select the minimum set of teams needed. Do not add teams for coverage — only add teams whose work is necessary.
2. For each team, define:
- Mission (scoped to this project, not generic)
- Tasks (3–5 concrete tasks, not vague)
- Output artifact (exact file path)
- Dependencies (which other teams must complete first)
3. Group teams into waves based on dependencies. Teams with no dependencies go in Wave 1. Teams that depend on Wave 1 go in Wave 2. And so on.
4. Output the Team-by-Team Board (format below).
5. Wait for user to approve: `yes` to execute, `adjust [instruction]` to change something.

### Team-by-Team Board Format

Output the full board with all waves, all teams, all tasks visible upfront:

```
ASSEMBLE — Project Board
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Mission: [problem statement from intake]
Constraints: [constraints from intake]
Done looks like: [success criteria from intake]

[WAVE 1] — Starting immediately

┌ [Team Name]
│ Mission: [scoped mission]
│ Tasks:
│ · [task 1]
│ · [task 2]
│ · [task 3]
│ Output: [artifact path]
│ Status: ⏳ Pending approval

[WAVE 2] — Unlocks after Wave 1 approval

┌ [Team Name]
│ Mission: [scoped mission]
│ Tasks:
│ · [task 1]
│ · [task 2]
│ Output: [artifact path]
│ Depends on: [Team A], [Team B]
│ Status: 🔒 Locked

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ready to execute. Approve? (yes / adjust [instruction])
```

Use this exact format. Every team gets the full block. No abbreviating.

---

## Phase 3 — Execute

Create `docs/` directory if it does not exist by running: `mkdir -p docs`

For each wave (starting with Wave 1):

### Spawning team agents

Spawn one Task agent per team in the current wave. Run them in parallel — do not wait for one to finish before spawning the next.

For each team agent, pass this context:

```
You are running the Assemble team-agent skill.
Read: ~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.0/skills/assemble/team-agent.md

role: [role from team definition]
team: [team name]
mission: [mission scoped to this project]
input_artifacts: [list of file paths from prior wave agents — pass an empty list [] for Wave 1 teams that have no prior wave output]
owned_tasks:
- [task 1]
- [task 2]
- [task 3]
output_artifacts:
- [exact output file path]
escalation_rule: Attempt a workaround first. If still blocked, return status: blocked with a clear description.
```

### Handling team reports

When all team agents in the wave return their reports:

1. Update the board status for each team: ✅ Complete, ⚠️ Partial, or 🔴 Blocked.
2. List the artifacts written.
3. Extract key findings from each report.

**If any team returns `blocked` or `partial`:**

1. Re-spawn that team once with an adjusted mission. Add to the mission: "Prior attempt was [blocked/partial] due to: [blocker]. Adjust scope — use a mock, a fallback, or a reduced scope if needed."
2. If the retry also returns `blocked` or `partial`, halt. Show the user:

```
🔴 [Team Name] — blocked after retry: [reason]
Downstream teams that depend on this: [list them by name, or write "none — this is a leaf team"]

Hold (wait for you to resolve) or continue (proceed without this team's output)?
(hold / continue)
```

Wait for user input before proceeding.
Comment on lines +167 to +180
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Clarify the impact of "continue" on downstream dependencies.

When a team is blocked after retry, the user can choose "continue (proceed without this team's output)." However, the workflow doesn't explicitly address what happens to downstream teams that depend on the blocked team's output artifacts.

If the user chooses to continue despite a blocker, downstream teams in subsequent waves may fail when they attempt to read the missing input_artifacts. This could cause cascading failures that waste execution time and confuse the user.

Consider one of these approaches:

  1. Skip dependent teams: When continuing despite a blocker, automatically skip all downstream teams that list the blocked team in their dependencies, and inform the user which teams will be skipped.

  2. Pass empty inputs with warning: Allow downstream teams to proceed but pass them a note that their expected input_artifacts are missing, so they can adapt or report blocked immediately.

  3. Explicit user choice per dependent team: Show the user each affected downstream team and ask whether to run it with missing inputs or skip it.

Recommendation: Option 1 provides the safest and most predictable behavior without requiring complex adaptation logic in team agents.

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 172-172: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/assemble/SKILL.md` around lines 167 - 180, The current instructions
around a team returning `blocked` or `partial` and the user choosing "(hold /
continue)" lack behavior for downstream teams; update the workflow where the
blocked-after-retry prompt ("🔴 [Team Name] — blocked after retry: [reason] ...
(hold / continue)") handles "continue" by automatically skipping all downstream
teams that list the blocked team in their dependencies (i.e., any team that
references the blocked team's input_artifacts), and clearly inform the user
which teams will be skipped and why before proceeding; ensure the message and
decision flow mention the skipped teams and that their expected input_artifacts
will be unavailable.


### Wave checkpoint

After all teams in the wave are resolved (complete, partial with retry, or user has decided to continue despite blocker):

Show the wave summary:

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Wave [N] complete.

[Team Name] ✅ [artifact path] written
[Team Name] ✅ [artifact path] written
[Team Name] ⚠️ partial — [artifact path] written (scope reduced)

Key findings:
· [Team]: [finding]
· [Team]: [finding]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Continue to Wave [N+1]? (continue / adjust [instruction] / stop)
```

Wait for user response before unlocking the next wave. If user says `adjust [instruction]`, re-run the relevant team with the adjustment before continuing.

If this was the last wave, proceed to Phase 4.

---

## Phase 4 — Close

When all waves are complete:

1. Create `docs/` if it does not exist: `mkdir -p docs`
2. Write `docs/executive-summary.md` using the Write tool. Use this format:

```markdown
# Executive Summary — [Mission]

**Status:** Complete
**Date:** [today's date]
**Teams run:** [comma-separated list]
**Artifacts written:** [count] files in docs/

## Key Findings by Team

[For each team:]
**[Team Name]**
- [finding 1]
- [finding 2]

## Blockers Encountered

[List any blockers that required user input, or write "None"]

## Next Step

[What the user or engineering team should do with these outputs]
```

3. Output the final board state showing all teams with their final status.

4. List all artifacts written:

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ASSEMBLE — Complete

Artifacts written:
[file path]
[file path]
[... all files written across all teams and the executive summary]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

---

## Querying

At any point during or after execution, the user may ask questions about the project. Answer from the in-memory board state. Do not spawn new agents to answer queries.

Respond to these patterns:

| Query pattern | Response |
|---|---|
| "What is [team] doing?" | Return that team's current board entry: mission, status, current task, blocker if any. |
| "Why is [team] blocked?" | Return the blocker field from that team's last report. |
| "Show all open issues" | List all teams with status ⚠️ or 🔴 with their blocker description. |
| "What has [team] completed?" | Return completed_tasks and artifacts_written from that team's last report. |
| "Show project status" | Re-render the full Team-by-Team Board with current statuses. |
| "Show all artifacts" | List all artifacts_written across all teams. |

If the user asks something not on this list, answer from the board state as best you can. If you do not have the information in state, say so — do not invent it.
56 changes: 56 additions & 0 deletions skills/assemble/status-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Assemble — Status Schema

This file defines the data contracts used between the PM agent and all team agents.

---

## Team Agent Contract (PM → Team Agent)

The PM passes this context to each team agent at spawn:

| Field | Type | Description |
|---|---|---|
| `role` | string | Agent role title, e.g. "Research Lead" |
| `team` | string | Team name, e.g. "Research Team" |
| `mission` | string | Scoped goal for this specific project |
| `input_artifacts` | list of file paths | Files from prior wave agents to read. Pass empty list for Wave 1 teams with no prior wave artifacts. |
| `owned_tasks` | list of strings | Tasks this agent must complete |
| `output_artifacts` | list of file paths | Files this agent must write |
| `escalation_rule` | string | "Attempt a workaround first. If still blocked, return status: blocked with a clear description." |

---

## Team Report Schema (Team Agent → PM)

Every team agent must return a structured report in this exact format:

```
TEAM REPORT
team: [team name]
status: [complete | blocked | partial]
confidence: [high | medium | low]
completed_tasks:
- [task 1]
- [task 2]
blocker: [description, or null]
artifacts_written:
- [file path]
key_findings:
- [finding 1]
- [finding 2]
next_step: [what happens next]
escalation_needed: [true | false]
```

---

## Board Status Codes

| Symbol | Meaning |
|---|---|
| ⏳ | Pending approval — not yet started |
| 🔒 | Locked — waiting for prior wave |
| 🔄 | In Progress |
| ✅ | Complete |
| ⚠️ | Partial / retrying |
| 🔴 | Blocked — needs user input |
Loading