| name | agent |
| description | Start a Clean Claude agent with optional reactive links. Examples: /agent frontend-engineer, /agent frontend-engineer --link qa-engineer, /agent architect --link frontend-engineer,qa-engineer |
| user-invocable | false |
| context | conversation |
| allowed-tools | Read, Write, Bash, Task |
Agent Skill โ Start with Reactive Links
Start any Clean Claude agent with optional reactive connections to other agents.
Syntax
/agent <agent-name> [--link <agents>] [--stack <stack>] [--task <description>] [--review]
Arguments
| Argument | Description | Example |
|---|
<agent-name> | Agent to start | frontend-engineer, qa-engineer |
--link <agents> | Agents to link reactively (comma-separated) | --link qa-engineer |
--stack <stack> | Stack context | --stack frontend |
--task <desc> | Task description | --task "Build login form" |
--review | Enable code review loop (Architect โ Dev) | --review |
Escalation Keywords
Agents can escalate issues by using these keywords in their output:
| Keyword | Escalates To | Description |
|---|
BLOCKED: | Architect | Design block, need decision |
SPEC_GAP: | PO | Missing requirement |
UNCLEAR: | PO | Ambiguous criteria |
DESIGN_FLAW: | Architect | Architectural issue found |
CONTRADICTION: | PO | Conflicting requirements |
Example agent output:
BLOCKED: Cannot implement real-time sync without WebSocket infrastructure.
Need architectural decision on connection strategy.
โ Automatically routes to architect
Examples
Start frontend-engineer alone
/agent frontend-engineer
Agent works, no reactive loop.
Start frontend-engineer linked to QA
/agent frontend-engineer --link qa-engineer
Frontend works โ QA verifies โ error โ Frontend fixes โ loop
Start architect linked to dev and QA
/agent architect --link frontend-engineer,qa-engineer
Architect designs โ Frontend implements โ QA verifies โ errors route back
Start with task description
/agent frontend-engineer --link qa-engineer --task "Build user authentication form"
Available Agents
| Agent | Role | Common Links |
|---|
architect | Architecture, design | frontend-engineer, backend-engineer |
product-owner | User stories | architect |
frontend-engineer | UI implementation | qa-engineer, architect |
backend-engineer | API implementation | qa-engineer, architect |
qa-engineer | Testing, verification | frontend-engineer, backend-engineer |
devops-engineer | CI/CD, ship, deploy, publish | frontend-engineer, backend-engineer |
Reactive Links โ Full Matrix
Link Types
| Link | Trigger | Action |
|---|
| QA โ Dev | Test failure | Dev fixes code |
| QA โ Architect | Design flaw detected | Architect redesigns |
| QA โ PO | Unclear acceptance criteria | PO clarifies spec |
| Dev โ Architect | Blocked by design | Architect adjusts |
| Dev โ PO | Edge case not covered | PO completes spec |
| Architect โ PO | Contradiction/impossibility | PO arbitrates |
| Architect โ Dev | Code review feedback | Dev improves |
| Spec Drift | Code โ Spec | PO or Dev aligns |
1. QA โ Dev (Test Failures)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ qa- โ test โ frontend- โ
โ engineer โ fail โ dev โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
โฒ โ
โ fixed โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
Trigger: FAIL, expect, assertion error
Route to: Last dev who touched the file (ownership) or stack dev
2. QA โ Architect (Design Flaws)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ qa- โ design โ architect โ new โ dev โ
โ engineer โ flaw โ โ design โ โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
โฒ โ
โ re-verify โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Trigger: Race condition, circular dependency, architectural issue
Detection: circular, deadlock, race condition, coupling
3. QA โ PO (Unclear Criteria)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ qa- โ unclear โ product- โ clarify โ qa- โ
โ engineer โ criteriaโ owner โ spec โ engineer โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
Trigger: ambiguous, not specified, undefined behavior
Detection: QA reports unclear acceptance criteria
4. Dev โ Architect (Design Block)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ frontend- โ blocked โ architect โ adjust โ frontend- โ
โ dev โ by โ โ design โ dev โ
โโโโโโโโโโโโโโโโ design โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
โโโโโโโถ
Trigger: cannot implement, design issue, need architectural decision
Detection: Dev explicitly flags design problem
5. Dev โ PO (Spec Gap)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ frontend- โ edge โ product- โ update โ frontend- โ
โ dev โ case โ owner โ spec โ dev โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
Trigger: edge case, not covered in spec, what if, missing requirement
Detection: Dev finds gap in specification
6. Architect โ PO (Feasibility)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ architect โ contra- โ product- โ decide โ architect โ
โ โ diction โ owner โ tradeoffโ โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
Trigger: contradiction, impossible, tradeoff needed, mutually exclusive
Detection: Architect identifies spec issues
7. Architect โ Dev (Code Review)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ architect โ review โ frontend- โ improve โ architect โ
โ โ feedbackโ dev โ code โ โ
โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ โโโโโโโถ โโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโโโโโโโ approved โโโโโโโโโโโโโโโโโโโโโโโโ
Trigger: Post-implementation review
Mode: Enable with --review flag
8. Spec Drift Detection (Bidirectional)
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Spec โโโโ drift detected โโโโโโโถโ Code โ
โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Update โ OR โ Update โ
โ Spec โ โ Code โ
โ (--sync) โ โ (--impl) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Trigger: /heal spec or automatic drift detection
Route: PO updates spec OR Dev updates code
Full Workflow with All Links
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COMPLETE REACTIVE SYSTEM โ
โ โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ product-owner โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโฌโโโโโโโโ โ โ
โ โ spec โ โ
โ โผ contradiction โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ architect โ โ โ โ
โ โ โโโโโโโโ design flaw โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโฌโโโโโโโโ โ โ โ โ
โ โ design โ โ โ โ
โ โผ blocked by โ โ โ โ
โ โโโโโโโโโโโโโโโโโ design โโโโโโ โ โ โ
โ โ frontend- โ โ โ โ
โ โ dev โโโโโโโ spec gap โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโฌโโโโโโโโ โ โ
โ โ code โ โ
โ โผ โ โ
โ โโโโโโโโโโโโโโโโโ โ โ
โ โ qa-engineer โโโโโโ test failure โโโถ Dev โโโโโโโโโโโโโโโโโโโโโ โ
โ โ โโโโโโ design flaw โโโโถ Architect โ
โ โ โโโโโโ unclear spec โโโถ PO โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
How It Works
- Parse arguments from the skill invocation
- Initialize .clean-claude/ if not exists
- Configure links in
.clean-claude/links.json
- Start the agent with context
- Hooks route based on configured links
Implementation
When you invoke /agent, parse the arguments and:
Step 1: Parse Arguments
Extract from the user's command:
agent_name: The agent to start
links: Array of linked agents (from --link)
stack: Stack context (from --stack, default: "frontend")
task: Task description (from --task)
Step 2: Initialize Clean Claude State
mkdir -p .clean-claude
cat > .clean-claude/links.json << EOF
{
"primary": "<agent_name>",
"links": [<links_array>],
"stack": "<stack>",
"task": "<task>"
}
EOF
cat > .clean-claude/state.json << EOF
{
"workflow": "agent",
"feature": "<task or 'ad-hoc'>",
"stack": "<stack>",
"phase": "active",
"retryCount": 0,
"maxRetries": 3,
"agents": {
"primary": "<agent_name>",
"links": [<links_array>],
"lastActive": null,
"lastDev": null,
"history": []
},
"status": "in_progress"
}
EOF
Step 3: Start the Agent
Use the Task tool to spawn the agent:
Use the <agent_name> agent to work on: <task>
Context:
- Stack: <stack>
- Linked agents: <links>
- When complete, linked agents will be triggered automatically
<Additional context from .clean-claude/context.json if exists>
Step 4: Reactive Routing
The hooks will handle routing based on .clean-claude/links.json:
When the primary agent completes:
- Check if there are linked agents
- Trigger the first link (e.g., qa-engineer)
- If error in verification โ route back to primary
- Loop until success
Examples of Parsed Commands
/agent frontend-engineer
{
"primary": "frontend-engineer",
"links": [],
"stack": "frontend",
"task": null
}
โ Starts frontend-engineer alone, no reactive loop
/agent frontend-engineer --link qa-engineer
{
"primary": "frontend-engineer",
"links": ["qa-engineer"],
"stack": "frontend",
"task": null
}
โ Starts frontend-engineer, QA verifies after, errors loop back
/agent frontend-engineer --link qa-engineer,architect --task "Build login"
{
"primary": "frontend-engineer",
"links": ["qa-engineer", "architect"],
"stack": "frontend",
"task": "Build login"
}
โ Starts frontend-engineer with full context, linked to both QA and architect
Shorthand Commands
For convenience, also support:
| Shorthand | Equivalent |
|---|
/agent front | /agent frontend-engineer |
/agent back | /agent backend-engineer |
/agent arch | /agent architect |
/agent qa | /agent qa-engineer |
/agent po | /agent product-owner |
/agent devops | /agent devops-engineer |
Integration with Existing Workflow
This skill complements /reactive-loop:
/reactive-loop โ Full workflow (PO โ Arch โ Dev โ QA)
/agent โ Flexible, start any agent with chosen links
Both use the same .clean-claude/ state and routing infrastructure.