Skip to content

Commit 0f1a5b6

Browse files
committed
Fix Skill vs Task tool guidance in delegation-enforcement.md
Corrected the Core Rule that was causing 'Agent type not found' errors: - Skills always use Skill tool (loads SKILL.md into main agent context) - Agents/subagents always use Task tool (spawns isolated subprocess) - Removed false claim that Skill tool 'replaces execution context' - Clarified why skills that spawn subagents MUST use Skill tool - Documented companion agent pattern as special case for non-subagent skills only - Updated docs-operator description in CLAUDE.md accordingly
1 parent 78ec793 commit 0f1a5b6

File tree

7 files changed

+21
-13
lines changed

7 files changed

+21
-13
lines changed

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
33
"name": "maister-plugins",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"description": "Structured, standards-aware development workflows for Claude Code",
66
"owner": {
77
"name": "Skillpanel",

plugins/maister-copilot/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maister-copilot",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Structured, standards-aware development workflows for Claude Code",
55
"author": {
66
"name": "Skillpanel",

plugins/maister-copilot/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ Subagents are specialized AI agents invoked by skills and orchestrators. All age
717717
| Agent | Purpose | Invoked By | Details |
718718
|-------|---------|------------|---------|
719719
| `project-analyzer` | Deep codebase analysis for tech stack, architecture, conventions | `/maister-init` | `agents/project-analyzer.md` |
720-
| `docs-operator` | Internal service agent: executes docs-manager operations mid-workflow and returns control to the caller. Has docs-manager skill preloaded. | init, standards-update, standards-discover | `agents/docs-operator.md` |
720+
| `docs-operator` | Internal service agent: executes docs-manager operations mid-workflow via Task tool. Has docs-manager skill preloaded. **Special case**: companion agent pattern only works here because docs-manager does NOT spawn subagents (only file operations). Do not use this pattern for skills that spawn subagents. | init, standards-update, standards-discover | `agents/docs-operator.md` |
721721
| `task-classifier` | Classifies task descriptions into workflow types with confidence scoring | `/work` command | `agents/task-classifier.md` |
722722
| `gap-analyzer` | Compares current vs desired state with characteristic-detection-based analysis modules | development-orchestrator | `agents/gap-analyzer.md` |
723723
| `specification-creator` | Creates specs from gathered requirements with reusability search and self-verification | development-orchestrator, migration-orchestrator | `agents/specification-creator.md` |

plugins/maister-copilot/skills/orchestrator-framework/references/delegation-enforcement.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ Orchestrators must delegate work to skills and subagents instead of executing in
66

77
**Always use Skill/Task tools to delegate. Never execute delegated work inline.**
88

9-
When a phase requires a skill or subagent:
10-
1. Use the `Skill` tool for skills **that are the last step in a phase/workflow** (Skill tool does not return control to the caller)
11-
2. Use the `Task` tool for subagents **and for mid-workflow skill operations** (Task tool returns control after completion)
9+
When a phase requires delegation:
10+
1. Use the **Skill tool** for **skills** — loads SKILL.md instructions into the main agent's context; the main agent executes the skill's instructions and continues with the orchestrator workflow afterward
11+
2. Use the **Task tool** for **subagents/agents** — spawns an isolated subprocess that returns results when complete
1212
3. Wait for completion before continuing
1313

14-
**Important**: The Skill tool replaces the active execution context. Use it only when nothing needs to execute after it in the same workflow. For internal service skills that are invoked mid-workflow (like `docs-manager`), create a companion agent that preloads the skill via the `skills` frontmatter field and invoke it via Task tool instead.
14+
**Skills and agents are NOT interchangeable.** Skills always use Skill tool; agents always use Task tool. Never invoke a skill via Task tool (`subagent_type`) — it will fail with "Agent type not found."
15+
16+
**Why skills MUST use Skill tool**: Skills like `codebase-analyzer`, `implementer`, and `implementation-verifier` spawn their own subagents (Explore agents, reporters, planners). Subagents cannot spawn other subagents — so these skills must run in the main agent context via Skill tool.
17+
18+
**Companion agent pattern** (e.g., `docs-operator`): Only works for skills that do NOT spawn subagents (like `docs-manager` which only does file operations). A companion agent preloads the skill via the `skills` frontmatter field and is invoked via Task tool. This pattern fails for any skill that needs to spawn subagents.
1519

1620
---
1721

plugins/maister/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maister",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Structured, standards-aware development workflows for Claude Code",
55
"author": {
66
"name": "Skillpanel",

plugins/maister/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ Subagents are specialized AI agents invoked by skills and orchestrators. All age
717717
| Agent | Purpose | Invoked By | Details |
718718
|-------|---------|------------|---------|
719719
| `project-analyzer` | Deep codebase analysis for tech stack, architecture, conventions | `/maister:init` | `agents/project-analyzer.md` |
720-
| `docs-operator` | Internal service agent: executes docs-manager operations mid-workflow and returns control to the caller. Has docs-manager skill preloaded. | init, standards-update, standards-discover | `agents/docs-operator.md` |
720+
| `docs-operator` | Internal service agent: executes docs-manager operations mid-workflow via Task tool. Has docs-manager skill preloaded. **Special case**: companion agent pattern only works here because docs-manager does NOT spawn subagents (only file operations). Do not use this pattern for skills that spawn subagents. | init, standards-update, standards-discover | `agents/docs-operator.md` |
721721
| `task-classifier` | Classifies task descriptions into workflow types with confidence scoring | `/work` command | `agents/task-classifier.md` |
722722
| `gap-analyzer` | Compares current vs desired state with characteristic-detection-based analysis modules | development-orchestrator | `agents/gap-analyzer.md` |
723723
| `specification-creator` | Creates specs from gathered requirements with reusability search and self-verification | development-orchestrator, migration-orchestrator | `agents/specification-creator.md` |

plugins/maister/skills/orchestrator-framework/references/delegation-enforcement.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ Orchestrators must delegate work to skills and subagents instead of executing in
66

77
**Always use Skill/Task tools to delegate. Never execute delegated work inline.**
88

9-
When a phase requires a skill or subagent:
10-
1. Use the `Skill` tool for skills **that are the last step in a phase/workflow** (Skill tool does not return control to the caller)
11-
2. Use the `Task` tool for subagents **and for mid-workflow skill operations** (Task tool returns control after completion)
9+
When a phase requires delegation:
10+
1. Use the **Skill tool** for **skills** — loads SKILL.md instructions into the main agent's context; the main agent executes the skill's instructions and continues with the orchestrator workflow afterward
11+
2. Use the **Task tool** for **subagents/agents** — spawns an isolated subprocess that returns results when complete
1212
3. Wait for completion before continuing
1313

14-
**Important**: The Skill tool replaces the active execution context. Use it only when nothing needs to execute after it in the same workflow. For internal service skills that are invoked mid-workflow (like `docs-manager`), create a companion agent that preloads the skill via the `skills` frontmatter field and invoke it via Task tool instead.
14+
**Skills and agents are NOT interchangeable.** Skills always use Skill tool; agents always use Task tool. Never invoke a skill via Task tool (`subagent_type`) — it will fail with "Agent type not found."
15+
16+
**Why skills MUST use Skill tool**: Skills like `codebase-analyzer`, `implementer`, and `implementation-verifier` spawn their own subagents (Explore agents, reporters, planners). Subagents cannot spawn other subagents — so these skills must run in the main agent context via Skill tool.
17+
18+
**Companion agent pattern** (e.g., `docs-operator`): Only works for skills that do NOT spawn subagents (like `docs-manager` which only does file operations). A companion agent preloads the skill via the `skills` frontmatter field and is invoked via Task tool. This pattern fails for any skill that needs to spawn subagents.
1519

1620
---
1721

0 commit comments

Comments
 (0)