A Claude Code plugin that adds an Agent Team skill for orchestrating parallel work via AI teammates. The plugin provides a team lead orchestrator, hook enforcement, and persistent workspace tracking.
.claude-plugin/ Plugin manifest + marketplace registry
hooks/hooks.json Plugin-level hooks (use ${CLAUDE_PLUGIN_ROOT} for paths)
scripts/ Hook scripts (bash, require jq)
skills/execute/ Pipeline entry point — Phase 0 prep + Phase 4 per-task pipeline
references/ Communication protocol, coordination patterns, error recovery,
prior-context loading, plan-mode protocol
examples/ Plan proposal example
agents/ Spawn templates (Executor / Reviewer / Challenger), execute-reviewer
skills/audit/ Audit stage — gates, integration-only review, lessons, report
references/ Completion gates, elegance rubric, report format
examples/ Lessons-learned examples
agents/ Reviewer (integration-only), elegance-reviewer, audit-reviewer
docs/ Shared reference docs (roles, archetypes, workspace templates, custom roles)
- Hooks are plugin-level (
hooks/hooks.json), not in SKILL.md frontmatter — this is how Claude Code plugins register hooks ${CLAUDE_PLUGIN_ROOT}is the only valid path variable in hooks.json — it resolves to the plugin install directory at runtime- Each stage skill is self-contained — stage-specific references, examples, and agents live in subfolders (
references/,examples/,agents/) alongside SKILL.md - Shared docs (
docs/) contain only cross-cutting references: teammate roles, workspace templates, team archetypes, custom roles - Team per stage + per-task pipeline — each pipeline stage (execute, audit) creates an ephemeral team. Within execute, every task spawns its own ephemeral Executor → Reviewer → Challenger trio. Workspace files (including new
reviews/subdirectory andimpact_files/review_status/challenge_statusfields ontask-graph.json) are the only persistent handoff. - 3-role universal taxonomy — Lead orchestrates; Executor / Reviewer / Challenger run per task with archetype-specific prompt extensions. Legacy role names (Implementer, Tester, etc.) are colloquial archetype specializations, not separate roles.
- No
disable-model-invocation— the skill auto-invokes on matching trigger phrases
| Area | Purpose | Edit Guidelines |
|---|---|---|
.claude-plugin/plugin.json |
Plugin identity | Bump version here on release |
.claude-plugin/marketplace.json |
Marketplace registry | Bump version here too, keep in sync with plugin.json |
hooks/hooks.json |
Hook registration (13 hook entries) | Update timeout values, add new hooks, or update hook command paths |
scripts/*.sh |
Hook enforcement logic (16 scripts) | Written in bash (#!/bin/bash), degrade gracefully without jq |
skills/execute/SKILL.md |
Pipeline entry point | Phase 0 prep (resolve plan + decompose + approve) + Phase 3 (team init) + Phase 4 (per-task E/R/C pipeline). Auto-chains to writing-plans if no plan, auto-chains to audit when done. |
skills/execute/references/ |
Execute stage references | Communication protocol, coordination patterns, error recovery, prior-context loading, plan-mode protocol |
skills/execute/examples/ |
Execute stage examples | Plan proposal example |
skills/execute/agents/ |
Execute stage agents | Spawn templates (3 universal: Executor / Reviewer / Challenger), execute-reviewer agent |
skills/audit/SKILL.md |
Audit stage | Completion gates, integration-only deep review, elegance review, report, lessons |
skills/audit/references/ |
Audit stage references | Completion gates, elegance rubric, report format |
skills/audit/examples/ |
Audit stage examples | Lessons-learned example |
skills/audit/agents/ |
Audit stage agents | Audit-reviewer, elegance-reviewer, reviewer agents |
docs/teammate-roles.md |
Role definitions + selection guide | Update when adding new roles |
docs/workspace-templates.md |
Workspace file templates + task-graph.json schema |
Update when adding new workspace files or changing DAG schema |
docs/team-archetypes.md |
Team type definitions + phase profiles | Update when adding new archetypes or modifying plan-mode defaults |
docs/custom-roles.md |
Project-specific role template | Reference for users creating custom roles |
CHANGELOG.md |
Version history | Add entry for each release |
README.md |
User-facing documentation | Keep in sync with feature changes |
tests/ |
Hook and structure tests | hooks/ for hook tests, structure/ for plugin validation |
.agent-team/0309-protocol-research/ |
Research findings | Reference only — do not modify. Contains 4 reports on protocol, patterns, resilience, and scaling |
- Follow semver:
MAJOR.MINOR.PATCH - Version must be updated in both:
plugin.jsonandmarketplace.json - Use
claude plugin validate .before releasing
Follow Conventional Commits:
feat: new feature or capability
fix: bug fix
docs: documentation changes (README, CLAUDE.md, docs/)
refactor: code restructuring without behavior change
chore: maintenance (CI, dependencies)
- Must be executable (
chmod +x) - Must handle missing
jqgracefully (exit 0 if not found) - Must handle missing
gitgracefully (skip git-dependent checks) - Exit codes:
0= allow,2= block with feedback to stderr
- The frontmatter (
---block) defines skill metadata — do not addhooks:ordisable-model-invocationback - Each stage skill has its own phase structure — preserve the stage-specific flow
- Stage-specific content lives in subfolders (
references/,examples/,agents/) — keep SKILL.md focused on orchestration logic, detailed reference material in subfolders - Doc references use
../../docs/relative paths fromskills/{stage}/for shared docs,./references/or./agents/for stage-local files
bash tests/run-tests.shRuns 16 test files covering all hooks and plugin structure.
claude plugin validate .claude --plugin-dir /path/to/agent-team-pluginThen trigger with: "use agent team to [task]"
Thirteen hook entries registered in hooks/hooks.json:
- TaskCompleted — try marking a task complete without file changes (should block)
- TeammateIdle — let a teammate go idle with in-progress tasks (should nudge)
- SessionStart(compact) — compact context in a team session (should recover workspace)
- PreToolUse(Write|Edit) — have a teammate edit another's file (should warn, then block)
- ValidateWorkspace — spawn a teammate with incomplete workspace (should block)
- ValidateTaskGraph — spawn a teammate with malformed task-graph.json (should block)
- SubagentStart — spawn a teammate (should log to events.log)
- SubagentStop — teammate shuts down (should log to events.log)
- ComputeCriticalPath — complete a task and check stderr for critical path update
- DetectResume — start a new session with an incomplete workspace and check stdout for resume context
- CheckIntegrationPoint — complete both upstream tasks of a convergence point and check stderr for integration nudge
- PlanRevisionLimit — send 3rd PLAN_REVISION to a teammate (should block)
- PreShutdownCommit — call TeamDelete with uncommitted owned files (should block)
- Add the script to
scripts/ - Make it executable
- Register it in
hooks/hooks.jsonusing${CLAUDE_PLUGIN_ROOT}/scripts/your-script.sh - Document in the relevant stage skill's SKILL.md and README
- Test: run
claude plugin validate .then test manually in a team session
In v4.0, the universal roles (Executor / Reviewer / Challenger) are not customized directly — instead, project-specific specializations are added as archetype extensions in docs/custom-roles.md. The lead reads custom-roles.md during Phase 0.4 and applies matching extensions during Phase 4 spawn.
To add a new specialization:
- Identify which standard role the specialization extends (Executor, Reviewer, or Challenger).
- Identify which archetype it applies to (Implementation, Research, Audit, or Planning).
- Identify the trigger pattern — what task descriptions should activate this extension?
- Add a new section to
docs/custom-roles.mdusing the appropriate template (Custom Executor / Reviewer / Challenger Extension). - Test the activation — invoke
/agent-team:executeon a plan with a matching task description and verify the spawn prompt includes the extension's directives.
Example: A "Database Migration" extension for Implementation Executors and Challengers — see docs/custom-roles.md for the full pattern.
Do NOT add new role definitions to docs/teammate-roles.md — that file documents the universal taxonomy and is not extended per-project.
- Create a new
skills/{stage}/SKILL.mdwith frontmatter (name, description, argument-hint, allowed-tools) - Create subfolders as needed:
references/,examples/,agents/ - Add stage-specific orchestration logic, referencing
../../docs/for shared docs - Add trigger patterns to
docs/team-archetypes.mdif applicable - Update
tests/structure/test-doc-references.sh— add assertions for new skill and subfolders - Update
README.mdPipeline Commands table and Plugin Structure tree - Add rows to
CLAUDE.mdFile Ownership table - Update auto-chaining: if the new stage chains from execute (e.g., between Phase 4 and audit), update execute's "Stage Complete" section. If it chains from audit, update audit's end.
- Test: run
bash tests/run-tests.sh, then trigger the skill with a matching phrase
- Run
bash tests/run-tests.sh— all tests must pass - Update version in
.claude-plugin/plugin.json - Update version in
.claude-plugin/marketplace.json - Add entry to
CHANGELOG.md - Run
claude plugin validate . - Commit with
chore: bump version to X.Y.Z - Tag with
git tag vX.Y.Z