refactor: replace Task tool with Agent tool and fix schema compliance

## Task -> Agent Replacement
- Replace all Task({}) calls with Agent({}) across .claude/ directory
- Update allowed-tools declarations from Task to Agent
- Update documentation references from "Task tool" to "Agent tool"

## Schema Compliance Fixes

### Agent Schema
- Add missing required `description` parameter in 6 files
- Add missing `run_in_background: false` for subagent calls
- Add missing `subagent_type` parameter

### AskUserQuestion Schema
- Fix issue-manage/SKILL.md: reduce options from 5 to 4 (max allowed)

### SendMessage Schema
- Fix team-worker.md: use correct params (type, content, summary)
- Remove invalid `team_name` parameter

### TaskCreate/TaskUpdate Schema
- Remove invalid `blockedBy`, `owner`, `status` from TaskCreate calls
- Use separate TaskUpdate calls for dependencies and ownership
- Fix TaskUpdate syntax to use object parameter

### TeamDelete Schema
- Remove parameters from TeamDelete() calls (should be no params)

### TaskOutput Schema
- Fix Python-style syntax to JavaScript object syntax

## Files Changed
- 146 files updated across commands/, skills/, skills_lib/, agents/
This commit is contained in:
catlog22
2026-03-04 22:40:39 +08:00
parent 64e772f9b8
commit 16bbfcd12a
146 changed files with 505 additions and 516 deletions

View File

@@ -1,7 +1,7 @@
---
name: team-frontend
description: Unified team skill for frontend development. Uses team-worker agent architecture with role-spec files for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Built-in ui-ux-pro-max design intelligence. Triggers on "team frontend".
allowed-tools: Task, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, mcp__ace-tool__search_context
allowed-tools: Agent, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, mcp__ace-tool__search_context
---
# Team Frontend Development
@@ -108,7 +108,7 @@ Phase 3 needs task dispatch
When coordinator spawns workers, use `team-worker` agent with role-spec path:
```
Task({
Agent({
subagent_type: "team-worker",
description: "Spawn <role> worker",
team_name: "frontend",
@@ -233,7 +233,7 @@ AskUserQuestion({
| Choice | Steps |
|--------|-------|
| Archive & Clean | Verify completed -> update status -> TeamDelete("frontend") -> final summary |
| Archive & Clean | Verify completed -> update status -> TeamDelete() -> final summary |
| Keep Active | Status="paused" -> "Resume with: Skill(skill='team-frontend', args='resume')" |
| Export Results | Ask target dir -> copy artifacts -> Archive flow |

View File

@@ -25,7 +25,6 @@ Every task description uses structured format:
```
TaskCreate({
subject: "<TASK-ID>",
owner: "<role>",
description: "PURPOSE: <what this task achieves> | Success: <measurable completion criteria>
TASK:
- <step 1: specific action>
@@ -38,10 +37,9 @@ CONTEXT:
- Upstream artifacts: <artifact-1>, <artifact-2>
- Shared memory: <session>/.msg/meta.json
EXPECTED: <deliverable path> + <quality criteria>
CONSTRAINTS: <scope limits, focus areas>",
blockedBy: [<dependency-list>],
status: "pending"
CONSTRAINTS: <scope limits, focus areas>"
})
TaskUpdate({ taskId: "<TASK-ID>", addBlockedBy: [<dependency-list>], owner: "<role>" })
```
### Mode Router
@@ -72,9 +70,9 @@ CONTEXT:
- Scope: <scope>
- Shared memory: <session>/.msg/meta.json
EXPECTED: <session>/analysis/design-intelligence.json + requirements.md | Structured design data
CONSTRAINTS: Read-only analysis | No code modifications",
status: "pending"
CONSTRAINTS: Read-only analysis | No code modifications"
})
TaskUpdate({ taskId: "ANALYZE-001", owner: "analyst" })
```
**ARCH-001** (architect):
@@ -94,10 +92,9 @@ CONTEXT:
- Upstream artifacts: design-intelligence.json, requirements.md
- Shared memory: <session>/.msg/meta.json
EXPECTED: <session>/architecture/design-tokens.json + component-specs/ + project-structure.md
CONSTRAINTS: Use ui-ux-pro-max recommendations for token values | Support light/dark mode",
blockedBy: ["ANALYZE-001"],
status: "pending"
CONSTRAINTS: Use ui-ux-pro-max recommendations for token values | Support light/dark mode"
})
TaskUpdate({ taskId: "ARCH-001", addBlockedBy: ["ANALYZE-001"], owner: "architect" })
```
**DEV-001** (developer):
@@ -117,10 +114,9 @@ CONTEXT:
- Upstream artifacts: design-tokens.json, component-specs/, project-structure.md
- Shared memory: <session>/.msg/meta.json
EXPECTED: src/styles/tokens.css + component files | Design-token compliant code
CONSTRAINTS: Use CSS variables from tokens | Mobile-first responsive | WCAG AA",
blockedBy: ["ARCH-001"],
status: "pending"
CONSTRAINTS: Use CSS variables from tokens | Mobile-first responsive | WCAG AA"
})
TaskUpdate({ taskId: "DEV-001", addBlockedBy: ["ARCH-001"], owner: "developer" })
```
**QA-001** (qa):
@@ -140,10 +136,9 @@ CONTEXT:
- Upstream artifacts: design-intelligence.json, design-tokens.json, src/**
- Shared memory: <session>/.msg/meta.json
EXPECTED: <session>/qa/audit-001.md | Weighted score + verdict + categorized issues
CONSTRAINTS: Read-only review | No code modifications",
blockedBy: ["DEV-001"],
status: "pending"
CONSTRAINTS: Read-only review | No code modifications"
})
TaskUpdate({ taskId: "QA-001", addBlockedBy: ["DEV-001"], owner: "qa" })
```
---

View File

@@ -69,10 +69,9 @@ CONTEXT:
- Upstream artifacts: <session>/qa/audit-<NNN>.md
- Shared memory: <session>/.msg/meta.json
EXPECTED: Fixed source files | QA issues resolved
CONSTRAINTS: Targeted fixes only | Do not introduce regressions",
blockedBy: [],
status: "pending"
CONSTRAINTS: Targeted fixes only | Do not introduce regressions"
})
TaskUpdate({ taskId: "DEV-fix-<round>", owner: "developer" })
TaskCreate({
subject: "QA-recheck-<round>",
@@ -86,10 +85,9 @@ CONTEXT:
- Review type: code-review
- Shared memory: <session>/.msg/meta.json
EXPECTED: <session>/qa/audit-<NNN>.md | Improved score
CONSTRAINTS: Read-only review",
blockedBy: ["DEV-fix-<round>"],
status: "pending"
CONSTRAINTS: Read-only review"
})
TaskUpdate({ taskId: "QA-recheck-<round>", addBlockedBy: ["DEV-fix-<round>"], owner: "qa" })
```
6. Proceed to handleSpawnNext
@@ -105,7 +103,7 @@ Find and spawn the next ready tasks.
2. For each ready task, spawn team-worker:
```
Task({
Agent({
subagent_type: "team-worker",
description: "Spawn <role> worker for <task-id>",
team_name: "frontend",

View File

@@ -204,7 +204,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol):
Find first unblocked task and spawn its worker:
```
Task({
Agent({
subagent_type: "team-worker",
description: "Spawn analyst worker",
team_name: "frontend",
@@ -273,6 +273,6 @@ AskUserQuestion({
| Choice | Steps |
|--------|-------|
| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("frontend") -> output final summary |
| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete() -> output final summary |
| Keep Active | Update session status="paused" -> output: "Session paused. Resume with: Skill(skill='team-frontend', args='resume')" |
| Export Results | AskUserQuestion for target directory -> copy artifacts -> Archive & Clean flow |