ai-agents-workflow
A Claude Code plugin that installs a portable multi-agent governance pipeline into any repo: chief-orchestrator, delivery-PM, lead, executor, design-agent, reviewer, integration-checker, init, resume-orchestrator, pr-lessons-harvester — plus 28 governance skills (organized by lifecycle stage) and a Node-based hook chain that enforces stage discipline, P1 plan approval, and plan-mode pre-flight.
Install (remote marketplace, recommended)
From any target repo:
/plugin marketplace add KingSharkG/ai-agents-workflow
/plugin install ai-agents-workflow@ai-agents-workflow
Verify:
/plugin
You should see ai-agents-workflow listed as enabled. Pick up upstream edits with:
/plugin marketplace update ai-agents-workflow
/plugin uninstall ai-agents-workflow
/plugin install ai-agents-workflow@ai-agents-workflow
Note: /plugin marketplace update only refreshes the marketplace source — you must uninstall and reinstall for changes to take effect in the plugin cache.
Install (local development)
If you have this repo cloned locally and want to iterate on the plugin itself:
/plugin marketplace add /absolute/path/to/ai-agents-workflow
/plugin install ai-agents-workflow@ai-agents-workflow
Pick up local edits with the same update sequence:
/plugin marketplace update ai-agents-workflow
/plugin uninstall ai-agents-workflow
/plugin install ai-agents-workflow@ai-agents-workflow
Uninstall
/plugin uninstall ai-agents-workflow
/plugin marketplace remove ai-agents-workflow
Usage
Eight namespaced slash commands cover the plugin's surface:
| Command | Purpose |
|---|
/ai-agents-workflow:init | Bootstrap <artifact-root>/config/PROJECT_CONFIG.md |
/ai-agents-workflow:add <target-type> <value> [--domain <d>] | Add a config entry |
/ai-agents-workflow:update | Refresh CLI-owned sections of the config |
/ai-agents-workflow:remove <target-type> <value> [--domain <d>] | Remove a config entry |
/ai-agents-workflow:task <description> | Classify and route a task (see Intake Classification) |
/ai-agents-workflow:continue [task_id] | Resume an interrupted or in-progress task |
/ai-agents-workflow:pr-lessons <PR-ref> | Harvest review comments from a PR into the lessons file |
/ai-agents-workflow:review [pr-number | URL | phrase] | PR-lessons-aware review of local diff or a GitHub PR; offers to dispatch fixes via /ai-agents-workflow:task |
Valid <target-type> values for :add / :remove: domain, skill, plugin, baseline, validation-rule, forbidden-action, best-practice, cross-domain-rule.
Natural-language invocations (e.g., "initialize project config") still work — the slash commands are a typed shortcut, not a replacement.
Lifecycle Stages
A task progresses through up to four explicit stages, recorded in orchestration-state.json → stage (schema_version 3+):
| Stage | What runs | Subagents legal here |
|---|
intake | Classify the request, ask clarifications if ambiguous, write task-data.md and initialize state | chief-orchestrator, delivery-pm |
planning | Delivery PM produces the plan; P1 user gate approves it | chief-orchestrator, delivery-pm, lead, design-agent |
execution | Per-subtask Lead → Executor → Integration → Reviewer cycles, P2 phase boundary | chief-orchestrator, lead, executor, reviewer, design-agent, integration-checker |
closure | Post-approval cleanup, task-level summary, P4 task-completion gate, optional P5 retrospective | chief-orchestrator |
The pre-task-guard.js Phase 3.5 hook blocks subagent dispatches that don't belong to the active stage. Stage reopens are supported as soft transitions: execution → planning (Reviewer needs-replan or P2 user-elected replan) and closure → execution (reversal-packet). The reopen counter is soft-capped at 3; a 4th attempt triggers a blocker-escalation-report plus a "Continue / Abort" P-gate.
See ai/playbooks/ORCHESTRATION.md for the stage-grouped flow, the stage transition diagram, and the trivial-path compressed flow.
Intake Classification
The /ai-agents-workflow:task command classifies each request before deciding how much of the pipeline to run: