oh-my-customcode 0.22.0 → 0.23.0

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.
Files changed (23) hide show
  1. package/package.json +1 -1
  2. package/templates/.claude/agents/sys-memory-keeper.md +2 -2
  3. package/templates/.claude/hooks/hooks.json +29 -5
  4. package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +4 -4
  5. package/templates/.claude/hooks/scripts/git-delegation-guard.sh +1 -1
  6. package/templates/.claude/hooks/scripts/model-escalation-advisor.sh +1 -1
  7. package/templates/.claude/hooks/scripts/session-env-check.sh +23 -0
  8. package/templates/.claude/hooks/scripts/stuck-detector.sh +1 -1
  9. package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +3 -3
  10. package/templates/.claude/rules/MUST-agent-design.md +12 -0
  11. package/templates/.claude/rules/MUST-agent-teams.md +34 -34
  12. package/templates/.claude/rules/MUST-orchestrator-coordination.md +29 -29
  13. package/templates/.claude/rules/MUST-parallel-execution.md +36 -36
  14. package/templates/.claude/rules/MUST-tool-identification.md +8 -6
  15. package/templates/.claude/rules/SHOULD-hud-statusline.md +4 -4
  16. package/templates/.claude/rules/SHOULD-memory-integration.md +2 -2
  17. package/templates/.claude/skills/dag-orchestration/SKILL.md +1 -0
  18. package/templates/.claude/skills/de-lead-routing/SKILL.md +15 -14
  19. package/templates/.claude/skills/dev-lead-routing/SKILL.md +1 -0
  20. package/templates/.claude/skills/multi-model-verification/SKILL.md +9 -9
  21. package/templates/.claude/skills/qa-lead-routing/SKILL.md +21 -20
  22. package/templates/.claude/skills/secretary-routing/SKILL.md +1 -0
  23. package/templates/.claude/skills/worker-reviewer-pipeline/SKILL.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -47,8 +47,8 @@ Provider: claude-mem | Collection: claude_memories | Archive: ~/.claude-mem/arch
47
47
  When triggered by session-end signal from orchestrator:
48
48
 
49
49
  1. **Collect** session summary: completed tasks, key decisions, open items
50
- 2. **Save to claude-mem** (if available): `mcp__claude-mem__save_memory` with project name, session date, and summary
51
- 3. **Verify episodic-memory** (if available): `mcp__episodic-memory__search` to confirm session is indexed
50
+ 2. **Save to claude-mem** (if available): `mcp__plugin_claude-mem_mcp-search__save_memory` with project name, session date, and summary
51
+ 3. **Verify episodic-memory** (if available): `mcp__plugin_episodic-memory_episodic-memory__search` to confirm session is indexed
52
52
  4. **Report** results to orchestrator: saved/skipped/failed per system
53
53
 
54
54
  ### Failure Handling
@@ -63,7 +63,7 @@
63
63
  "description": "Suggest manual compaction at logical intervals"
64
64
  },
65
65
  {
66
- "matcher": "tool == \"Task\"",
66
+ "matcher": "tool == \"Task\" || tool == \"Agent\"",
67
67
  "hooks": [
68
68
  {
69
69
  "type": "command",
@@ -82,7 +82,7 @@
82
82
  "command": "bash .claude/hooks/scripts/model-escalation-advisor.sh"
83
83
  }
84
84
  ],
85
- "description": "HUD statusline + R010 git delegation guard + R018 Agent Teams advisor on Task spawn"
85
+ "description": "HUD statusline + R010 git delegation guard + R018 Agent Teams advisor on Agent/Task spawn"
86
86
  }
87
87
  ],
88
88
  "SessionStart": [
@@ -97,6 +97,30 @@
97
97
  "description": "Check codex CLI and Agent Teams availability at session start"
98
98
  }
99
99
  ],
100
+ "SubagentStart": [
101
+ {
102
+ "matcher": "*",
103
+ "hooks": [
104
+ {
105
+ "type": "command",
106
+ "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.agent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.description // \"\"' | head -c 40)\necho \"─── [SubagentStart] ${agent_type}:${model} | ${desc} ───\" >&2\necho \"$input\""
107
+ }
108
+ ],
109
+ "description": "HUD display when a subagent starts (complements PreToolUse Agent matcher)"
110
+ }
111
+ ],
112
+ "SubagentStop": [
113
+ {
114
+ "matcher": "*",
115
+ "hooks": [
116
+ {
117
+ "type": "command",
118
+ "command": "bash .claude/hooks/scripts/task-outcome-recorder.sh"
119
+ }
120
+ ],
121
+ "description": "Record agent outcomes on subagent completion (complements PostToolUse Agent matcher)"
122
+ }
123
+ ],
100
124
  "PostToolUse": [
101
125
  {
102
126
  "matcher": "tool == \"Bash\"",
@@ -169,17 +193,17 @@
169
193
  "description": "Type check Python files with ty after edits"
170
194
  },
171
195
  {
172
- "matcher": "tool == \"Task\"",
196
+ "matcher": "tool == \"Task\" || tool == \"Agent\"",
173
197
  "hooks": [
174
198
  {
175
199
  "type": "command",
176
200
  "command": "bash .claude/hooks/scripts/task-outcome-recorder.sh"
177
201
  }
178
202
  ],
179
- "description": "Record task outcomes (success/failure) for model escalation decisions"
203
+ "description": "Record agent/task outcomes (success/failure) for model escalation decisions"
180
204
  },
181
205
  {
182
- "matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"Task\"",
206
+ "matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"Task\" || tool == \"Agent\"",
183
207
  "hooks": [
184
208
  {
185
209
  "type": "command",
@@ -2,8 +2,8 @@
2
2
  set -euo pipefail
3
3
 
4
4
  # Agent Teams Advisor Hook
5
- # Trigger: PreToolUse, tool == "Task"
6
- # Purpose: Track Task tool usage count per session and warn when Agent Teams may be more appropriate
5
+ # Trigger: PreToolUse, tool == "Task" || tool == "Agent"
6
+ # Purpose: Track Agent/Task tool usage count per session and warn when Agent Teams may be more appropriate
7
7
  # Protocol: stdin JSON -> process -> stdout pass-through, exit 0 always (advisory only)
8
8
 
9
9
  input=$(cat)
@@ -27,12 +27,12 @@ echo "$COUNT" > "$COUNTER_FILE"
27
27
  # Warn from 2nd Task call onward -- Agent Teams may be more appropriate
28
28
  if [ "$COUNT" -ge 2 ]; then
29
29
  echo "" >&2
30
- echo "--- [R018 Advisor] Task tool call #${COUNT} in this session ---" >&2
30
+ echo "--- [R018 Advisor] Agent/Task tool call #${COUNT} in this session ---" >&2
31
31
  echo " WARNING: Multiple Task calls detected. Consider Agent Teams if:" >&2
32
32
  echo " * 3+ agents needed for this work" >&2
33
33
  echo " * Review -> fix -> re-review cycle exists" >&2
34
34
  echo " * Agents need shared state or coordination" >&2
35
- echo " Current: Task(${agent_type}) -- ${prompt_preview}" >&2
35
+ echo " Current: Agent(${agent_type}) -- ${prompt_preview}" >&2
36
36
  echo "-----------------------------------------------------------" >&2
37
37
  fi
38
38
 
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
2
  # R010 git-delegation-guard hook
3
- # Warns when git operations are delegated to a non-mgr-gitnerd agent via Task tool.
3
+ # Warns when git operations are delegated to a non-mgr-gitnerd agent via Agent/Task tool.
4
4
  # WARN only - does NOT block (exit 0, passes input through).
5
5
 
6
6
  input=$(cat)
@@ -2,7 +2,7 @@
2
2
  set -euo pipefail
3
3
 
4
4
  # Model Escalation Advisor Hook
5
- # Trigger: PreToolUse, tool == "Task"
5
+ # Trigger: PreToolUse, tool == "Task" || tool == "Agent"
6
6
  # Purpose: Advise model escalation when failure patterns detected
7
7
  # Protocol: stdin JSON -> process -> stdout pass-through, exit 0 always
8
8
 
@@ -27,6 +27,23 @@ if [ "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-0}" = "1" ]; then
27
27
  AGENT_TEAMS_STATUS="enabled"
28
28
  fi
29
29
 
30
+ # Claude Code version detection
31
+ CLAUDE_VERSION="unknown"
32
+ if command -v claude >/dev/null 2>&1; then
33
+ CLAUDE_VERSION=$(claude --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
34
+ fi
35
+
36
+ # Version compatibility check
37
+ MIN_COMPAT_VERSION="2.1.63"
38
+ COMPAT_STATUS="unknown"
39
+ if [ "$CLAUDE_VERSION" != "unknown" ]; then
40
+ if printf '%s\n' "$MIN_COMPAT_VERSION" "$CLAUDE_VERSION" | sort -V | head -1 | grep -q "^${MIN_COMPAT_VERSION}$"; then
41
+ COMPAT_STATUS="compatible"
42
+ else
43
+ COMPAT_STATUS="outdated"
44
+ fi
45
+ fi
46
+
30
47
  # Git workflow reminder
31
48
  CURRENT_BRANCH="unknown"
32
49
  if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
@@ -39,11 +56,17 @@ cat > "$STATUS_FILE" << ENVEOF
39
56
  codex=${CODEX_STATUS}
40
57
  agent_teams=${AGENT_TEAMS_STATUS}
41
58
  git_branch=${CURRENT_BRANCH}
59
+ claude_version=${CLAUDE_VERSION}
60
+ compat_status=${COMPAT_STATUS}
42
61
  ENVEOF
43
62
 
44
63
  # Report to stderr (visible in conversation)
45
64
  echo " codex CLI: ${CODEX_STATUS}" >&2
46
65
  echo " Agent Teams: ${AGENT_TEAMS_STATUS}" >&2
66
+ echo " Claude Code: v${CLAUDE_VERSION} (${COMPAT_STATUS})" >&2
67
+ if [ "$COMPAT_STATUS" = "outdated" ]; then
68
+ echo " ⚠ Claude Code v${MIN_COMPAT_VERSION}+ recommended for full hook compatibility" >&2
69
+ fi
47
70
  echo "" >&2
48
71
  echo " [Git Workflow Reminder]" >&2
49
72
  echo " Current branch: ${CURRENT_BRANCH}" >&2
@@ -2,7 +2,7 @@
2
2
  set -euo pipefail
3
3
 
4
4
  # Stuck Detector Hook
5
- # Trigger: PostToolUse, tool matches "Edit|Write|Bash|Task"
5
+ # Trigger: PostToolUse, tool matches "Edit|Write|Bash|Task|Agent"
6
6
  # Purpose: Detect repetitive failure loops and advise recovery
7
7
  # Protocol: stdin JSON -> process -> stdout pass-through, exit 0 always
8
8
 
@@ -1,8 +1,8 @@
1
1
  #!/bin/bash
2
2
  set -euo pipefail
3
3
 
4
- # Task Outcome Recorder Hook
5
- # Trigger: PostToolUse, tool == "Task"
4
+ # Task/Agent Outcome Recorder Hook
5
+ # Trigger: PostToolUse, tool == "Task" || tool == "Agent"
6
6
  # Purpose: Record task outcomes for model escalation decisions
7
7
  # Protocol: stdin JSON -> process -> stdout pass-through, exit 0 always
8
8
 
@@ -52,7 +52,7 @@ fi
52
52
  # Report failures to stderr
53
53
  if [ "$outcome" = "failure" ]; then
54
54
  echo "" >&2
55
- echo "--- [Task Outcome] FAILURE: ${agent_type}:${model} ---" >&2
55
+ echo "--- [Agent Outcome] FAILURE: ${agent_type}:${model} ---" >&2
56
56
  echo " ${description}" >&2
57
57
  echo " Error: $(echo "$error_summary" | head -c 100)" >&2
58
58
  echo "-----------------------------------------------" >&2
@@ -30,8 +30,20 @@ escalation: # Model escalation policy (optional)
30
30
  enabled: true # Enable auto-escalation advisory
31
31
  path: haiku → sonnet → opus # Escalation sequence
32
32
  threshold: 2 # Failures before advisory
33
+ isolation: worktree # Run in isolated git worktree
34
+ background: true # Run in background
35
+ maxTurns: 10 # Max conversation turns
36
+ mcpServers: [server-1] # MCP servers available
37
+ hooks: # Agent-specific hooks
38
+ PreToolUse:
39
+ - matcher: "Edit"
40
+ command: "echo hook"
41
+ permissionMode: bypassPermissions # Permission mode
42
+ disallowedTools: [Bash] # Tools to disallow
33
43
  ```
34
44
 
45
+ > **Note**: `isolation`, `background`, `maxTurns`, `mcpServers`, `hooks`, `permissionMode`, `disallowedTools` are supported in Claude Code v2.1.63+.
46
+
35
47
  ### Escalation Policy
36
48
 
37
49
  When `escalation.enabled: true`, the model-escalation hooks will track outcomes for this agent type and advise escalation when failures exceed the threshold. This is advisory-only — the orchestrator decides whether to accept the recommendation.
@@ -12,28 +12,28 @@ Available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessag
12
12
 
13
13
  | Scenario | Preferred | Reason |
14
14
  |----------|-----------|--------|
15
- | Simple independent subtasks | Task Tool | Lower cost, no coordination overhead |
15
+ | Simple independent subtasks | Agent Tool | Lower cost, no coordination overhead |
16
16
  | Multi-step with shared state | **Agent Teams** | Shared task list, peer messaging |
17
17
  | Research requiring discussion | **Agent Teams** | Iterative discovery, synthesis |
18
- | Cost-sensitive batch ops | Task Tool | Minimal token overhead |
18
+ | Cost-sensitive batch ops | Agent Tool | Minimal token overhead |
19
19
  | Complex debugging across modules | **Agent Teams** | Cross-module state sharing |
20
20
  | Code review + fix cycle | **Agent Teams** | Review → fix → re-review loop |
21
- | Single file operations | Task Tool | Overkill for simple tasks |
21
+ | Single file operations | Agent Tool | Overkill for simple tasks |
22
22
  | Dynamic agent creation + usage | **Agent Teams** | Create → test → iterate cycle |
23
23
 
24
24
  **When Agent Teams is enabled and criteria are met, usage is MANDATORY.**
25
25
 
26
- ## Self-Check (MANDATORY Before Task Tool)
26
+ ## Self-Check (MANDATORY Before Agent Tool)
27
27
 
28
- BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
28
+ BEFORE using Agent tool for 2+ agent tasks, this check is **ENFORCED**:
29
29
 
30
30
  ```
31
31
  ╔══════════════════════════════════════════════════════════════════╗
32
- ║ BEFORE USING Task TOOL FOR 2+ AGENTS: ║
32
+ ║ BEFORE USING Agent TOOL FOR 2+ AGENTS: ║
33
33
  ║ ║
34
34
  ║ 1. Is Agent Teams available? ║
35
35
  ║ YES → MUST check criteria #2-#5 ║
36
- ║ NO → Proceed with Task tool
36
+ ║ NO → Proceed with Agent tool
37
37
  ║ ║
38
38
  ║ 2. Will 3+ agents be involved? ║
39
39
  ║ YES → MUST use Agent Teams ║
@@ -41,10 +41,10 @@ BEFORE using Task tool for 2+ agent tasks, this check is **ENFORCED**:
41
41
  ║ ║
42
42
  ║ 3. Is there a review → fix → re-review cycle? ║
43
43
  ║ YES → MUST use Agent Teams ║
44
- ║ NO → Proceed with Task tool
44
+ ║ NO → Proceed with Agent tool
45
45
  ║ ║
46
46
  ║ Simple rule: 3+ agents OR review cycle → Agent Teams ║
47
- ║ Everything else → Task tool
47
+ ║ Everything else → Agent tool
48
48
  ╚══════════════════════════════════════════════════════════════════╝
49
49
  ```
50
50
 
@@ -73,60 +73,60 @@ When spawning Agent Teams members:
73
73
  ## Common Violations
74
74
 
75
75
  ```
76
- ❌ WRONG: Agent Teams enabled, 3+ research tasks using Task tool
77
- Task(Explore):haiku → Analysis 1
78
- Task(Explore):haiku → Analysis 2
79
- Task(Explore):haiku → Analysis 3
76
+ ❌ WRONG: Agent Teams enabled, 3+ research tasks using Agent tool
77
+ Agent(Explore):haiku → Analysis 1
78
+ Agent(Explore):haiku → Analysis 2
79
+ Agent(Explore):haiku → Analysis 3
80
80
 
81
81
  ✓ CORRECT: TeamCreate → spawn researchers → coordinate via shared task list
82
82
  TeamCreate("research-team")
83
- Task(researcher-1) → Analysis 1 ┐
84
- Task(researcher-2) → Analysis 2 ├─ Spawned as team members
85
- Task(researcher-3) → Analysis 3 ┘
83
+ Agent(researcher-1) → Analysis 1 ┐
84
+ Agent(researcher-2) → Analysis 2 ├─ Spawned as team members
85
+ Agent(researcher-3) → Analysis 3 ┘
86
86
  SendMessage(coordinate)
87
87
 
88
- ❌ WRONG: Code review + fix as independent Tasks
89
- Task(reviewer) → "Review code"
88
+ ❌ WRONG: Code review + fix as independent Agents
89
+ Agent(reviewer) → "Review code"
90
90
  (receive result)
91
- Task(implementer) → "Fix issues"
91
+ Agent(implementer) → "Fix issues"
92
92
  (receive result)
93
- Task(reviewer) → "Re-review"
93
+ Agent(reviewer) → "Re-review"
94
94
 
95
95
  ✓ CORRECT: Agent Teams for review-fix cycle
96
96
  TeamCreate("review-fix")
97
- Task(reviewer) + Task(implementer) → team members
97
+ Agent(reviewer) + Agent(implementer) → team members
98
98
  reviewer → SendMessage(implementer, "issues found")
99
99
  implementer → fixes → SendMessage(reviewer, "fixed")
100
100
  reviewer → re-reviews → done
101
101
 
102
102
  ❌ WRONG: Multi-expert task without coordination
103
- Task(lang-typescript-expert) → "Implement frontend"
104
- Task(be-express-expert) → "Implement API"
103
+ Agent(lang-typescript-expert) → "Implement frontend"
104
+ Agent(be-express-expert) → "Implement API"
105
105
  (no shared state, results manually combined)
106
106
 
107
107
  ✓ CORRECT: Agent Teams for cross-domain work
108
108
  TeamCreate("fullstack")
109
- Task(frontend-dev) + Task(backend-dev) → team members
109
+ Agent(frontend-dev) + Agent(backend-dev) → team members
110
110
  Shared TaskList for interface contracts
111
111
  SendMessage for API schema coordination
112
112
 
113
113
  ❌ WRONG: Spawning team members one at a time
114
114
  TeamCreate("research-team")
115
- Message 1: Task(researcher-1) → Analysis 1 (only 1/3 spawned)
116
- Message 2: Task(researcher-2) → Analysis 2 (late spawn)
117
- Message 3: Task(researcher-3) → Analysis 3 (late spawn)
115
+ Message 1: Agent(researcher-1) → Analysis 1 (only 1/3 spawned)
116
+ Message 2: Agent(researcher-2) → Analysis 2 (late spawn)
117
+ Message 3: Agent(researcher-3) → Analysis 3 (late spawn)
118
118
 
119
119
  ✓ CORRECT: All members in a single message
120
120
  TeamCreate("research-team")
121
121
  Single message:
122
- Task(researcher-1) → Analysis 1 ┐
123
- Task(researcher-2) → Analysis 2 ├─ ALL spawned together
124
- Task(researcher-3) → Analysis 3 ┘
122
+ Agent(researcher-1) → Analysis 1 ┐
123
+ Agent(researcher-2) → Analysis 2 ├─ ALL spawned together
124
+ Agent(researcher-3) → Analysis 3 ┘
125
125
  ```
126
126
 
127
127
  ## Cost Guidelines
128
128
 
129
- | Criteria | Task Tool | Agent Teams |
129
+ | Criteria | Agent Tool | Agent Teams |
130
130
  |----------|-----------|-------------|
131
131
  | Agent count | 1-2 | 3+ |
132
132
  | Inter-task dependency | None | Present |
@@ -185,18 +185,18 @@ When Agent Teams creates a new agent via mgr-creator:
185
185
  ## Lifecycle
186
186
 
187
187
  ```
188
- TeamCreate → TaskCreate → Task(spawn members) → SendMessage(coordinate)
188
+ TeamCreate → TaskCreate → Agent(spawn members) → SendMessage(coordinate)
189
189
  → TaskUpdate(progress) → ... → shutdown members → TeamDelete
190
190
  ```
191
191
 
192
192
  ## Fallback
193
193
 
194
- When Agent Teams unavailable: use Task tool with R009/R010 rules.
194
+ When Agent Teams unavailable: use Agent tool with R009/R010 rules.
195
195
  When Agent Teams available: actively prefer it for qualifying tasks. This is not optional.
196
196
 
197
197
  ## Cost Awareness
198
198
 
199
- Agent Teams actively preferred for qualifying collaborative tasks. Use Task tool only when:
199
+ Agent Teams actively preferred for qualifying collaborative tasks. Use Agent tool only when:
200
200
  - 1-2 agents with no inter-dependency
201
201
  - No review → fix cycles
202
202
  - Simple independent subtasks
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Core Rule
6
6
 
7
- The main conversation is the **sole orchestrator**. It uses routing skills to delegate tasks to subagents via the Task tool. Subagents CANNOT spawn other subagents.
7
+ The main conversation is the **sole orchestrator**. It uses routing skills to delegate tasks to subagents via the Agent tool (formerly Task tool). Subagents CANNOT spawn other subagents.
8
8
 
9
9
  **The orchestrator MUST NEVER directly write, edit, or create files. ALL file modifications MUST be delegated to appropriate subagents.**
10
10
 
@@ -19,7 +19,7 @@ The main conversation is the **sole orchestrator**. It uses routing skills to de
19
19
  ║ NO → I am a subagent, proceed with task ║
20
20
  ║ ║
21
21
  ║ 2. Have I identified the correct specialized agent? ║
22
- ║ YES → Delegate via Task tool
22
+ ║ YES → Delegate via Agent tool
23
23
  ║ NO → Check delegation table below ║
24
24
  ║ ║
25
25
  ║ 3. Am I about to use Write/Edit tool from orchestrator? ║
@@ -65,7 +65,7 @@ Main Conversation (orchestrator)
65
65
  ├─ de-lead-routing → de-* experts
66
66
  └─ qa-lead-routing → qa-planner, qa-writer, qa-engineer
67
67
 
68
- Task tool spawns subagents (flat, no hierarchy)
68
+ Agent tool spawns subagents (flat, no hierarchy)
69
69
  ```
70
70
 
71
71
  ## Common Violations
@@ -76,44 +76,44 @@ Main Conversation (orchestrator)
76
76
  Main conversation → Edit("package.json", old, new)
77
77
 
78
78
  ✓ CORRECT: Orchestrator delegates to specialist
79
- Main conversation → Task(lang-golang-expert) → Write("src/main.go", content)
80
- Main conversation → Task(tool-npm-expert) → Edit("package.json", old, new)
79
+ Main conversation → Agent(lang-golang-expert) → Write("src/main.go", content)
80
+ Main conversation → Agent(tool-npm-expert) → Edit("package.json", old, new)
81
81
 
82
82
  ❌ WRONG: Orchestrator runs git commands directly
83
83
  Main conversation → Bash("git commit -m 'fix'")
84
84
  Main conversation → Bash("git push origin main")
85
85
 
86
86
  ✓ CORRECT: Orchestrator delegates to mgr-gitnerd
87
- Main conversation → Task(mgr-gitnerd) → git commit
88
- Main conversation → Task(mgr-gitnerd) → git push
87
+ Main conversation → Agent(mgr-gitnerd) → git commit
88
+ Main conversation → Agent(mgr-gitnerd) → git push
89
89
 
90
90
  ❌ WRONG: Using general-purpose when specialist exists
91
- Main conversation → Task(general-purpose) → "Write Go code"
91
+ Main conversation → Agent(general-purpose) → "Write Go code"
92
92
 
93
93
  ✓ CORRECT: Using the right specialist
94
- Main conversation → Task(lang-golang-expert) → "Write Go code"
94
+ Main conversation → Agent(lang-golang-expert) → "Write Go code"
95
95
 
96
96
  ❌ WRONG: Orchestrator creates files "just this once"
97
97
  "It's just a small config file, I'll write it directly..."
98
98
 
99
99
  ✓ CORRECT: Always delegate, no matter how small
100
- Task(appropriate-agent) → create config file
100
+ Agent(appropriate-agent) → create config file
101
101
 
102
102
  ❌ WRONG: Bundling git operations with file editing in non-gitnerd agent
103
- Main conversation → Task(general-purpose) → "git revert + edit file + git commit"
104
- Main conversation → Task(lang-typescript-expert) → "fix bug and commit"
103
+ Main conversation → Agent(general-purpose) → "git revert + edit file + git commit"
104
+ Main conversation → Agent(lang-typescript-expert) → "fix bug and commit"
105
105
 
106
106
  ✓ CORRECT: Separate file editing from git operations
107
- Main conversation → Task(lang-typescript-expert) → "fix bug" (file edit only)
108
- Main conversation → Task(mgr-gitnerd) → "git commit" (git operation only)
107
+ Main conversation → Agent(lang-typescript-expert) → "fix bug" (file edit only)
108
+ Main conversation → Agent(mgr-gitnerd) → "git commit" (git operation only)
109
109
 
110
110
  ❌ WRONG: Including git commands in non-gitnerd agent prompt for "convenience"
111
- Task(general-purpose, prompt="revert the last commit, edit the file, then commit the fix")
111
+ Agent(general-purpose, prompt="revert the last commit, edit the file, then commit the fix")
112
112
 
113
113
  ✓ CORRECT: Split into separate delegations
114
- Task(mgr-gitnerd, prompt="revert the last commit")
115
- Task(appropriate-expert, prompt="edit the file to fix the issue")
116
- Task(mgr-gitnerd, prompt="commit the fix")
114
+ Agent(mgr-gitnerd, prompt="revert the last commit")
115
+ Agent(appropriate-expert, prompt="edit the file to fix the issue")
116
+ Agent(mgr-gitnerd, prompt="commit the fix")
117
117
  ```
118
118
 
119
119
  ## Session Continuity
@@ -190,7 +190,7 @@ Available models:
190
190
  - inherit: Use parent conversation's model
191
191
 
192
192
  Usage:
193
- Task(
193
+ Agent(
194
194
  subagent_type: "general-purpose",
195
195
  prompt: "Analyze architecture",
196
196
  model: "opus"
@@ -217,10 +217,10 @@ Internal rules ALWAYS take precedence over external skills.
217
217
  Translation:
218
218
  External skill says → Internal rule requires
219
219
  ─────────────────────────────────────────────────────
220
- "git commit -m ..." → Task(mgr-gitnerd) commit
221
- "git push ..." → Task(mgr-gitnerd) push
222
- "gh pr create ..." → Task(mgr-gitnerd) create PR
223
- "git merge ..." → Task(mgr-gitnerd) merge
220
+ "git commit -m ..." → Agent(mgr-gitnerd) commit
221
+ "git push ..." → Agent(mgr-gitnerd) push
222
+ "gh pr create ..." → Agent(mgr-gitnerd) create PR
223
+ "git merge ..." → Agent(mgr-gitnerd) merge
224
224
 
225
225
  WRONG:
226
226
  [Using external skill]
@@ -228,7 +228,7 @@ WRONG:
228
228
 
229
229
  CORRECT:
230
230
  [Using external skill]
231
- Main conversation → Task(mgr-gitnerd) → git push
231
+ Main conversation → Agent(mgr-gitnerd) → git push
232
232
 
233
233
  The skill's WORKFLOW is followed, but git EXECUTION is delegated to mgr-gitnerd per R010.
234
234
  ```
@@ -241,24 +241,24 @@ When `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`: Agent Teams is **MANDATORY** for
241
241
 
242
242
  ```
243
243
  Main Conversation (orchestrator)
244
- ├─ Simple/independent tasks → Task tool (R009)
244
+ ├─ Simple/independent tasks → Agent tool (R009)
245
245
  └─ Collaborative/iterative tasks → Agent Teams (R018)
246
246
  ├─ TeamCreate
247
247
  ├─ TaskCreate (shared tasks)
248
- ├─ Task(spawn members)
248
+ ├─ Agent(spawn members)
249
249
  └─ SendMessage(coordinate)
250
250
  ```
251
251
 
252
- ### When to Use Agent Teams vs Task Tool
252
+ ### When to Use Agent Teams vs Agent Tool
253
253
 
254
- | Criteria | Task Tool | Agent Teams (MUST) |
254
+ | Criteria | Agent Tool | Agent Teams (MUST) |
255
255
  |----------|-----------|-------------------|
256
256
  | Agent count | 1-2 | 3+ |
257
257
  | Coordination needed | No | Yes |
258
258
  | Review/fix cycles | No | Yes |
259
259
  | Shared state | No | Yes |
260
260
 
261
- Using Task tool when Agent Teams criteria are met is a **VIOLATION** of R018.
261
+ Using Agent tool when Agent Teams criteria are met is a **VIOLATION** of R018.
262
262
 
263
263
  ## Announcement Format
264
264
 
@@ -17,17 +17,17 @@ Examples: creating multiple agents, reviewing multiple files, batch operations o
17
17
 
18
18
  ## Agent Teams Gate (R018 Integration)
19
19
 
20
- Before spawning parallel Task instances, evaluate Agent Teams eligibility:
20
+ Before spawning parallel Agent instances, evaluate Agent Teams eligibility:
21
21
 
22
22
  ```
23
23
  2+ independent tasks detected
24
24
 
25
25
  Is Agent Teams available? (env or tools check)
26
- ├─ NO → Proceed with Task tool (standard R009)
26
+ ├─ NO → Proceed with Agent tool (standard R009)
27
27
  └─ YES → Check eligibility:
28
28
  ├─ 3+ agents needed? → Agent Teams (MUST)
29
29
  ├─ Review → fix cycle? → Agent Teams (MUST)
30
- └─ Neither → Task tool (standard R009)
30
+ └─ Neither → Agent tool (standard R009)
31
31
  ```
32
32
 
33
33
  This gate is MANDATORY when Agent Teams is enabled. Skipping it is a violation of both R009 and R018.
@@ -35,10 +35,10 @@ This gate is MANDATORY when Agent Teams is enabled. Skipping it is a violation o
35
35
  ## Self-Check
36
36
 
37
37
  Before writing/editing multiple files:
38
- 1. Are files independent? → YES: spawn parallel Task agents
38
+ 1. Are files independent? → YES: spawn parallel agents
39
39
  2. Using Write/Edit sequentially for 2+ files? → STOP, parallelize
40
40
  3. Specialized agent available? → Use it (not general-purpose)
41
- 4. Agent Teams available + 3+ agents or review cycle? → YES: use Agent Teams instead of Task
41
+ 4. Agent Teams available + 3+ agents or review cycle? → YES: use Agent Teams instead of Agent tool
42
42
  5. Agent Teams members? → ALL members MUST spawn in a single message (no partial spawning)
43
43
 
44
44
  ### Common Violations to Avoid
@@ -48,50 +48,50 @@ Before writing/editing multiple files:
48
48
  Write(file1.kt) → Write(file2.kt) → Write(file3.kt) → Write(file4.kt)
49
49
 
50
50
  ✓ CORRECT: Spawn parallel agents
51
- Task(agent1 → file1.kt) ┐
52
- Task(agent2 → file2.kt) ├─ All in single message
53
- Task(agent3 → file3.kt) │
54
- Task(agent4 → file4.kt) ┘
51
+ Agent(agent1 → file1.kt) ┐
52
+ Agent(agent2 → file2.kt) ├─ All in single message
53
+ Agent(agent3 → file3.kt) │
54
+ Agent(agent4 → file4.kt) ┘
55
55
 
56
56
  ❌ WRONG: Project scaffolding sequentially
57
57
  Write(package.json) → Write(tsconfig.json) → Write(src/index.ts) → ...
58
58
 
59
59
  ✓ CORRECT: Parallel scaffolding
60
- Task(agent1 → "Create package.json, tsconfig.json") ┐
61
- Task(agent2 → "Create src/cli.ts, src/index.ts") ├─ Parallel
62
- Task(agent3 → "Create src/analyzer/*.ts") │
63
- Task(agent4 → "Create src/converter/*.ts") ┘
60
+ Agent(agent1 → "Create package.json, tsconfig.json") ┐
61
+ Agent(agent2 → "Create src/cli.ts, src/index.ts") ├─ Parallel
62
+ Agent(agent3 → "Create src/analyzer/*.ts") │
63
+ Agent(agent4 → "Create src/converter/*.ts") ┘
64
64
 
65
65
  ❌ WRONG: Secretary doing all the work
66
66
  Secretary writes domain/, usecase/, infrastructure/ sequentially
67
67
 
68
68
  ✓ CORRECT: Delegate to specialists
69
- Task(lang-kotlin-expert → domain layer)
70
- Task(be-springboot-expert → infrastructure layer)
71
- Task(lang-kotlin-expert → usecase layer)
69
+ Agent(lang-kotlin-expert → domain layer)
70
+ Agent(be-springboot-expert → infrastructure layer)
71
+ Agent(lang-kotlin-expert → usecase layer)
72
72
 
73
- ❌ WRONG: Single Task delegating to multiple agents
74
- Task(dev-lead → "coordinate lang-kotlin-expert and be-springboot-expert")
73
+ ❌ WRONG: Single Agent delegating to multiple agents
74
+ Agent(dev-lead → "coordinate lang-kotlin-expert and be-springboot-expert")
75
75
 
76
- This creates a SEQUENTIAL bottleneck inside the Task!
76
+ This creates a SEQUENTIAL bottleneck inside the Agent!
77
77
 
78
- ✓ CORRECT: Multiple Tasks in parallel, one per agent
79
- Task(lang-kotlin-expert → usecase commands) ┐
80
- Task(lang-kotlin-expert → usecase queries) ├─ All spawned together
81
- Task(be-springboot-expert → persistence) │
82
- Task(be-springboot-expert → security) ┘
78
+ ✓ CORRECT: Multiple Agents in parallel, one per agent
79
+ Agent(lang-kotlin-expert → usecase commands) ┐
80
+ Agent(lang-kotlin-expert → usecase queries) ├─ All spawned together
81
+ Agent(be-springboot-expert → persistence) │
82
+ Agent(be-springboot-expert → security) ┘
83
83
 
84
84
  ❌ WRONG: Agent Teams partial spawn (1 of N members)
85
85
  TeamCreate("feature-team")
86
- Message 1: Task(member-1) ← only 1/3 spawned, VIOLATION
87
- Message 2: Task(member-2) ← sequential, VIOLATION
88
- Message 3: Task(member-3) ← sequential, VIOLATION
86
+ Message 1: Agent(member-1) ← only 1/3 spawned, VIOLATION
87
+ Message 2: Agent(member-2) ← sequential, VIOLATION
88
+ Message 3: Agent(member-3) ← sequential, VIOLATION
89
89
 
90
90
  ✓ CORRECT: All Agent Teams members in single message
91
91
  TeamCreate("feature-team")
92
- Task(member-1) ┐
93
- Task(member-2) ├─ Single message, all at once
94
- Task(member-3) ┘
92
+ Agent(member-1) ┐
93
+ Agent(member-2) ├─ Single message, all at once
94
+ Agent(member-3) ┘
95
95
  ```
96
96
 
97
97
  ## Execution Rules
@@ -103,21 +103,21 @@ Before writing/editing multiple files:
103
103
  | Instance independence | Isolated context, no shared state |
104
104
  | Large tasks (>3 min) | MUST split into parallel sub-tasks |
105
105
 
106
- ## Task Tool Requirements
106
+ ## Agent Tool Requirements
107
107
 
108
108
  - Use specific `subagent_type` (not "general-purpose" when specialist exists)
109
109
  - Use `model` parameter for cost optimization (haiku for search, sonnet for code, opus for reasoning)
110
- - Each independent unit = separate Task tool call in the SAME message
110
+ - Each independent unit = separate Agent tool call in the SAME message
111
111
 
112
112
  ## Display Format
113
113
 
114
114
  ```
115
- [Instance 1] Task(mgr-creator):sonnet → Create Go agent
116
- [Instance 2] Task(lang-python-expert):sonnet → Review Python code
117
- [Instance 3] Task(Explore):haiku → Search codebase
115
+ [Instance 1] Agent(mgr-creator):sonnet → Create Go agent
116
+ [Instance 2] Agent(lang-python-expert):sonnet → Review Python code
117
+ [Instance 3] Agent(Explore):haiku → Search codebase
118
118
  ```
119
119
 
120
- Must use `Task({subagent_type}):{model}` format. Custom names not allowed.
120
+ Must use `Agent({subagent_type}):{model}` format. Custom names not allowed.
121
121
 
122
122
  ## Result Aggregation
123
123
 
@@ -62,21 +62,23 @@ For parallel calls: list ALL identifications BEFORE the tool calls.
62
62
  | File Read | Read, Glob, Grep | Reading / Searching |
63
63
  | File Write | Write, Edit | Writing / Editing |
64
64
  | Network | WebFetch | Fetching |
65
- | Execution | Bash, Task | Running / Spawning |
65
+ | Execution | Bash, Agent | Running / Spawning |
66
66
 
67
- ## Task Tool Format
67
+ ## Agent Tool Format
68
68
 
69
69
  ```
70
- Task(subagent_type):model → description
70
+ Agent(subagent_type):model → description
71
71
  ```
72
72
 
73
- `subagent_type` MUST match actual Task tool parameter. Custom names not allowed.
73
+ `subagent_type` MUST match actual Agent tool parameter. Custom names not allowed.
74
+
75
+ > **Note**: Claude Code v2.1.63+ renamed the Task tool to Agent tool. Both names refer to the same tool; `Agent(...)` is the current canonical form.
74
76
 
75
77
  ## Example
76
78
 
77
79
  ```
78
80
  [mgr-creator][sonnet] → Write: .claude/agents/new-agent.md
79
81
  [secretary][opus] → Spawning:
80
- [1] Task(lang-golang-expert):sonnet → Go code review
81
- [2] Task(lang-python-expert):sonnet → Python code review
82
+ [1] Agent(lang-golang-expert):sonnet → Go code review
83
+ [2] Agent(lang-python-expert):sonnet → Python code review
82
84
  ```
@@ -8,7 +8,7 @@
8
8
  |--------|-----------|----------------|
9
9
  | Channel | stderr (hooks) | stdout (dedicated statusline) |
10
10
  | Location | Inline in conversation log | Persistent bar at screen bottom |
11
- | Trigger | PreToolUse (Task matcher) | Message update cycle (~300ms) |
11
+ | Trigger | PreToolUse (Agent/Task matcher) | Message update cycle (~300ms) |
12
12
  | Role | Event notifications | Persistent session status |
13
13
 
14
14
  ## HUD Events (Hook-based)
@@ -26,14 +26,14 @@ Multi-step tasks, parallel execution, long-running operations. Skip for single b
26
26
 
27
27
  ### Implementation
28
28
 
29
- Implemented in `.claude/hooks/hooks.json` (PreToolUse → Task matcher).
29
+ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Agent/Task matcher).
30
30
 
31
31
  ### Parallel Display
32
32
 
33
33
  ```
34
34
  ─── [Agent] secretary | [Parallel] 4 ───
35
- [1] Task(mgr-creator):sonnet → Create agent
36
- [2] Task(lang-golang-expert):haiku → Code review
35
+ [1] Agent(mgr-creator):sonnet → Create agent
36
+ [2] Agent(lang-golang-expert):haiku → Code review
37
37
  ```
38
38
 
39
39
  ## Statusline API (Command-based)
@@ -60,8 +60,8 @@ User signals session end
60
60
 
61
61
  | System | Tool | Action | Required |
62
62
  |--------|------|--------|----------|
63
- | claude-mem | `mcp__claude-mem__save_memory` | Save session summary with project, tasks, decisions | No (best-effort) |
64
- | episodic-memory | `mcp__episodic-memory__search` | Verify session is indexed for future retrieval | No (best-effort) |
63
+ | claude-mem | `mcp__plugin_claude-mem_mcp-search__save_memory` | Save session summary with project, tasks, decisions | No (best-effort) |
64
+ | episodic-memory | `mcp__plugin_episodic-memory_episodic-memory__search` | Verify session is indexed for future retrieval | No (best-effort) |
65
65
 
66
66
  ### Failure Policy
67
67
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: dag-orchestration
3
3
  description: YAML-based DAG workflow engine with topological execution and failure strategies
4
+ context: fork
4
5
  ---
5
6
 
6
7
  # DAG Orchestration Skill
@@ -2,6 +2,7 @@
2
2
  name: de-lead-routing
3
3
  description: Routes data engineering tasks to the correct DE expert agent. Use when user requests data pipeline design, DAG authoring, SQL modeling, stream processing, or warehouse optimization.
4
4
  user-invocable: false
5
+ context: fork
5
6
  ---
6
7
 
7
8
  # DE Lead Routing Skill
@@ -47,17 +48,17 @@ Routes data engineering tasks to appropriate DE expert agents. This skill contai
47
48
 
48
49
  ## Routing Decision (Priority Order)
49
50
 
50
- Before routing via Task tool, evaluate in this order:
51
+ Before routing via Agent tool, evaluate in this order:
51
52
 
52
53
  ### Step 1: Agent Teams Eligibility (R018)
53
54
  Check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
54
55
 
55
56
  | Scenario | Preferred |
56
57
  |----------|-----------|
57
- | Single-tool DE task | Task Tool |
58
+ | Single-tool DE task | Agent Tool |
58
59
  | Multi-tool pipeline design (3+ tools) | Agent Teams |
59
60
  | Cross-tool data quality analysis | Agent Teams |
60
- | Quick DAG/model validation | Task Tool |
61
+ | Quick DAG/model validation | Agent Tool |
61
62
 
62
63
  ### Step 2: Codex-Exec Hybrid (Code Generation)
63
64
  For **new pipeline code**, **DAG scaffolding**, or **SQL model generation**:
@@ -116,10 +117,10 @@ Detection:
116
117
  - Pipeline architecture → de-pipeline-expert
117
118
 
118
119
  Route (parallel where independent):
119
- Task(de-pipeline-expert → overall architecture design)
120
- Task(de-airflow-expert → DAG structure)
121
- Task(de-dbt-expert → model design)
122
- Task(de-snowflake-expert → warehouse setup)
120
+ Agent(de-pipeline-expert → overall architecture design)
121
+ Agent(de-airflow-expert → DAG structure)
122
+ Agent(de-dbt-expert → model design)
123
+ Agent(de-snowflake-expert → warehouse setup)
123
124
 
124
125
  Aggregate:
125
126
  Pipeline architecture defined
@@ -174,25 +175,25 @@ For projects spanning multiple DE tools:
174
175
  | de-kafka-expert | `sonnet` | `opus` for topology design |
175
176
  | de-snowflake-expert | `sonnet` | `opus` for warehouse design |
176
177
 
177
- ### Task Call Examples
178
+ ### Agent Call Examples
178
179
 
179
180
  ```
180
181
  # Complex pipeline architecture
181
- Task(
182
+ Agent(
182
183
  subagent_type: "general-purpose",
183
184
  prompt: "Design end-to-end pipeline architecture following de-pipeline-expert guidelines",
184
185
  model: "opus"
185
186
  )
186
187
 
187
188
  # Standard DAG review
188
- Task(
189
+ Agent(
189
190
  subagent_type: "general-purpose",
190
191
  prompt: "Review Airflow DAGs in dags/ following de-airflow-expert guidelines",
191
192
  model: "sonnet"
192
193
  )
193
194
 
194
195
  # Quick dbt test validation
195
- Task(
196
+ Agent(
196
197
  subagent_type: "Explore",
197
198
  prompt: "Find all dbt models missing schema tests",
198
199
  model: "haiku"
@@ -216,9 +217,9 @@ Detection:
216
217
  - kafka/ → de-kafka-expert
217
218
 
218
219
  Route (parallel):
219
- Task(de-airflow-expert role → review dags/, model: "sonnet")
220
- Task(de-dbt-expert role → review models/, model: "sonnet")
221
- Task(de-kafka-expert role → review kafka/, model: "sonnet")
220
+ Agent(de-airflow-expert role → review dags/, model: "sonnet")
221
+ Agent(de-dbt-expert role → review models/, model: "sonnet")
222
+ Agent(de-kafka-expert role → review kafka/, model: "sonnet")
222
223
  ```
223
224
 
224
225
  ## Display Format
@@ -2,6 +2,7 @@
2
2
  name: dev-lead-routing
3
3
  description: Routes development tasks to the correct language or framework expert agent. Use when user requests code review, implementation, refactoring, or debugging.
4
4
  user-invocable: false
5
+ context: fork
5
6
  ---
6
7
 
7
8
  # Dev Lead Routing
@@ -33,15 +33,15 @@ Inspired by Pi Coding Agent Workflow Extension's multi-model verification patter
33
33
 
34
34
  ### Prerequisites
35
35
  - Agent Teams enabled (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`) for full parallel execution
36
- - Falls back to sequential Task tool execution if Agent Teams unavailable
36
+ - Falls back to sequential Agent tool execution if Agent Teams unavailable
37
37
 
38
38
  ### Execution Flow
39
39
 
40
40
  1. **Input**: File path(s) or diff to verify
41
41
  2. **Spawn Parallel Reviewers**:
42
- - `Task(opus)` → Architecture & design review
43
- - `Task(sonnet)` → Code quality & correctness review
44
- - `Task(haiku)` → Style & convention review
42
+ - `Agent(opus)` → Architecture & design review
43
+ - `Agent(sonnet)` → Code quality & correctness review
44
+ - `Agent(haiku)` → Style & convention review
45
45
  3. **Collect Results**: Each reviewer returns findings with severity
46
46
  4. **Aggregate**: Merge and deduplicate findings
47
47
  5. **Report**: Unified report sorted by severity
@@ -59,14 +59,14 @@ TeamCreate("verification-team")
59
59
 
60
60
  Members communicate findings via SendMessage for cross-cutting concerns.
61
61
 
62
- ### Task Tool Fallback
62
+ ### Agent Tool Fallback
63
63
 
64
- When Agent Teams is unavailable, spawn parallel Task agents:
64
+ When Agent Teams is unavailable, spawn parallel agents:
65
65
 
66
66
  ```
67
- [1] Task(general-purpose):opus → Architecture review
68
- [2] Task(general-purpose):sonnet → Code quality review
69
- [3] Task(general-purpose):haiku → Style & convention review
67
+ [1] Agent(general-purpose):opus → Architecture review
68
+ [2] Agent(general-purpose):sonnet → Code quality review
69
+ [3] Agent(general-purpose):haiku → Style & convention review
70
70
  ```
71
71
 
72
72
  ## Output Format
@@ -2,6 +2,7 @@
2
2
  name: qa-lead-routing
3
3
  description: Coordinates QA workflow across planning, writing, and execution agents. Use when user requests testing, quality assurance, or test documentation.
4
4
  user-invocable: false
5
+ context: fork
5
6
  ---
6
7
 
7
8
  # QA Lead Routing Skill
@@ -20,16 +21,16 @@ Coordinates QA team activities by routing tasks to qa-planner, qa-writer, and qa
20
21
 
21
22
  ## Routing Decision (Priority Order)
22
23
 
23
- Before routing via Task tool, evaluate Agent Teams eligibility first:
24
+ Before routing via Agent tool, evaluate Agent Teams eligibility first:
24
25
 
25
- **Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
26
+ **Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Agent tool. See R018 for the full decision matrix.
26
27
 
27
28
  | Scenario | Preferred |
28
29
  |----------|-----------|
29
- | Single QA phase (plan/write/execute) | Task Tool |
30
+ | Single QA phase (plan/write/execute) | Agent Tool |
30
31
  | Full QA cycle (plan + write + execute + report) | Agent Teams |
31
32
  | Quality analysis (parallel strategy + results) | Agent Teams |
32
- | Quick test validation | Task Tool |
33
+ | Quick test validation | Agent Tool |
33
34
 
34
35
  ## Command Routing
35
36
 
@@ -51,7 +52,7 @@ full_qa_cycle → all agents (sequential)
51
52
  User: "Create test plan for feature X"
52
53
 
53
54
  Route:
54
- Task(qa-planner role → create test plan, model: "sonnet")
55
+ Agent(qa-planner role → create test plan, model: "sonnet")
55
56
 
56
57
  Output:
57
58
  - Test scenarios
@@ -66,7 +67,7 @@ Output:
66
67
  User: "Document test cases for API"
67
68
 
68
69
  Route:
69
- Task(qa-writer role → document test cases, model: "sonnet")
70
+ Agent(qa-writer role → document test cases, model: "sonnet")
70
71
 
71
72
  Output:
72
73
  - Test case specifications
@@ -81,7 +82,7 @@ Output:
81
82
  User: "Execute tests for module Y"
82
83
 
83
84
  Route:
84
- Task(qa-engineer role → execute tests, model: "sonnet")
85
+ Agent(qa-engineer role → execute tests, model: "sonnet")
85
86
 
86
87
  Output:
87
88
  - Test execution results
@@ -98,8 +99,8 @@ When analysis is needed (parallel execution):
98
99
  User: "Analyze quality metrics"
99
100
 
100
101
  Route (parallel):
101
- Task(qa-planner role → analyze strategy, model: "sonnet")
102
- Task(qa-engineer role → analyze results, model: "sonnet")
102
+ Agent(qa-planner role → analyze strategy, model: "sonnet")
103
+ Agent(qa-engineer role → analyze results, model: "sonnet")
103
104
 
104
105
  Aggregate:
105
106
  Strategy insights + execution data
@@ -113,10 +114,10 @@ For complete quality assurance workflow:
113
114
  User: "Run full QA cycle for feature Z"
114
115
 
115
116
  Route (sequential):
116
- 1. Task(qa-planner role → create test plan, model: "sonnet")
117
- 2. Task(qa-writer role → document test cases, model: "sonnet")
118
- 3. Task(qa-engineer role → execute tests, model: "sonnet")
119
- 4. Task(qa-writer role → generate report, model: "sonnet")
117
+ 1. Agent(qa-planner role → create test plan, model: "sonnet")
118
+ 2. Agent(qa-writer role → document test cases, model: "sonnet")
119
+ 3. Agent(qa-engineer role → execute tests, model: "sonnet")
120
+ 4. Agent(qa-writer role → generate report, model: "sonnet")
120
121
 
121
122
  Aggregate and present final report
122
123
  ```
@@ -176,9 +177,9 @@ Only when tasks are truly independent:
176
177
 
177
178
  ```
178
179
  Example:
179
- Task(qa-engineer role → test module A, model: "sonnet")
180
- Task(qa-engineer role → test module B, model: "sonnet")
181
- Task(qa-engineer role → test module C, model: "sonnet")
180
+ Agent(qa-engineer role → test module A, model: "sonnet")
181
+ Agent(qa-engineer role → test module B, model: "sonnet")
182
+ Agent(qa-engineer role → test module C, model: "sonnet")
182
183
  ```
183
184
 
184
185
  ## Sub-agent Model Selection
@@ -193,25 +194,25 @@ Example:
193
194
 
194
195
  All QA agents typically use `sonnet` for balanced quality output.
195
196
 
196
- ### Task Call Examples
197
+ ### Agent Call Examples
197
198
 
198
199
  ```
199
200
  # Test planning
200
- Task(
201
+ Agent(
201
202
  subagent_type: "general-purpose",
202
203
  prompt: "Create comprehensive test plan for authentication feature following qa-planner guidelines",
203
204
  model: "sonnet"
204
205
  )
205
206
 
206
207
  # Test documentation
207
- Task(
208
+ Agent(
208
209
  subagent_type: "general-purpose",
209
210
  prompt: "Document test cases for API endpoints following qa-writer guidelines",
210
211
  model: "sonnet"
211
212
  )
212
213
 
213
214
  # Test execution
214
- Task(
215
+ Agent(
215
216
  subagent_type: "general-purpose",
216
217
  prompt: "Execute integration tests and report results following qa-engineer guidelines",
217
218
  model: "sonnet"
@@ -2,6 +2,7 @@
2
2
  name: secretary-routing
3
3
  description: Routes agent management tasks to the correct manager agent. Use when user requests agent creation, updates, audits, git operations, or verification.
4
4
  user-invocable: false
5
+ context: fork
5
6
  ---
6
7
 
7
8
  # Secretary Routing Skill
@@ -91,9 +91,9 @@ TeamCreate("review-pipeline")
91
91
  Shared TaskList for tracking issues
92
92
  ```
93
93
 
94
- When Agent Teams is NOT available, falls back to sequential Task tool calls:
94
+ When Agent Teams is NOT available, falls back to sequential Agent tool calls:
95
95
  ```
96
- Task(worker) → result → Task(reviewer) → verdict → Task(worker) → ...
96
+ Agent(worker) → result → Agent(reviewer) → verdict → Agent(worker) → ...
97
97
  ```
98
98
 
99
99
  ## Display Format