mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
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:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: team-uidesign
|
||||
description: Unified team skill for UI design team. All roles invoke this skill with --role arg for role-specific execution. CP-9 Dual-Track design+implementation.
|
||||
allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), WebFetch(*), WebSearch(*)
|
||||
allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), WebFetch(*), WebSearch(*)
|
||||
---
|
||||
|
||||
# Team UI Design
|
||||
@@ -352,7 +352,7 @@ Beat 1 2 3 4 5 6
|
||||
When coordinator spawns workers, use `team-worker` agent with role-spec path:
|
||||
|
||||
```
|
||||
Task({
|
||||
Agent({
|
||||
subagent_type: "team-worker",
|
||||
description: "Spawn <role> worker",
|
||||
team_name: "uidesign",
|
||||
@@ -397,7 +397,7 @@ AskUserQuestion({
|
||||
|
||||
| Choice | Action |
|
||||
|--------|--------|
|
||||
| Archive & Clean | Update session status="completed" -> TeamDelete(uidesign) -> output final summary |
|
||||
| Archive & Clean | Update session status="completed" -> TeamDelete() -> output final summary |
|
||||
| Keep Active | Update session status="paused" -> output resume instructions: `Skill(skill="team-uidesign", args="resume")` |
|
||||
| Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean |
|
||||
|
||||
|
||||
@@ -24,7 +24,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>
|
||||
@@ -37,10 +36,9 @@ CONTEXT:
|
||||
- Upstream artifacts: <artifact-1>, <artifact-2>
|
||||
- Shared memory: <session>/wisdom/.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
|
||||
@@ -71,9 +69,9 @@ CONTEXT:
|
||||
- Industry: <industry>
|
||||
- Shared memory: <session>/wisdom/.msg/meta.json
|
||||
EXPECTED: <session>/research/*.json | All 4 research files with valid JSON
|
||||
CONSTRAINTS: Read-only analysis | Focus on <design-scope>",
|
||||
status: "pending"
|
||||
CONSTRAINTS: Read-only analysis | Focus on <design-scope>"
|
||||
})
|
||||
TaskUpdate({ taskId: "RESEARCH-001", owner: "researcher" })
|
||||
```
|
||||
|
||||
**DESIGN-001** (designer):
|
||||
@@ -93,10 +91,9 @@ CONTEXT:
|
||||
- Upstream artifacts: research/*.json
|
||||
- Shared memory: <session>/wisdom/.msg/meta.json
|
||||
EXPECTED: <session>/design/design-tokens.json + component-specs/*.md | Complete token system + spec
|
||||
CONSTRAINTS: Follow W3C Design Tokens Format | All color tokens need light/dark",
|
||||
blockedBy: ["RESEARCH-001"],
|
||||
status: "pending"
|
||||
CONSTRAINTS: Follow W3C Design Tokens Format | All color tokens need light/dark"
|
||||
})
|
||||
TaskUpdate({ taskId: "DESIGN-001", addBlockedBy: ["RESEARCH-001"], owner: "designer" })
|
||||
```
|
||||
|
||||
**AUDIT-001** (reviewer):
|
||||
@@ -116,10 +113,9 @@ CONTEXT:
|
||||
- Upstream artifacts: design/design-tokens.json, design/component-specs/*.md
|
||||
- Shared memory: <session>/wisdom/.msg/meta.json
|
||||
EXPECTED: <session>/audit/audit-001.md | 5-dimension scored report
|
||||
CONSTRAINTS: Read-only analysis | GC convergence: score >= 8 and 0 critical",
|
||||
blockedBy: ["DESIGN-001"],
|
||||
status: "pending"
|
||||
CONSTRAINTS: Read-only analysis | GC convergence: score >= 8 and 0 critical"
|
||||
})
|
||||
TaskUpdate({ taskId: "AUDIT-001", addBlockedBy: ["DESIGN-001"], owner: "reviewer" })
|
||||
```
|
||||
|
||||
**BUILD-001** (implementer):
|
||||
@@ -139,10 +135,9 @@ CONTEXT:
|
||||
- Upstream artifacts: design/design-tokens.json, design/component-specs/*.md, audit/audit-001.md
|
||||
- Shared memory: <session>/wisdom/.msg/meta.json
|
||||
EXPECTED: <session>/build/**/* | Component + tokens CSS/TS + tests
|
||||
CONSTRAINTS: Use var(--token-name) only | Follow project patterns",
|
||||
blockedBy: ["AUDIT-001"],
|
||||
status: "pending"
|
||||
CONSTRAINTS: Use var(--token-name) only | Follow project patterns"
|
||||
})
|
||||
TaskUpdate({ taskId: "BUILD-001", addBlockedBy: ["AUDIT-001"], owner: "implementer" })
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -68,7 +68,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: "uidesign",
|
||||
@@ -126,10 +126,9 @@ CONTEXT:
|
||||
- Upstream artifacts: audit/audit-<NNN>.md
|
||||
- Shared memory: <session>/wisdom/.msg/meta.json
|
||||
EXPECTED: Updated design artifacts | All flagged issues addressed
|
||||
CONSTRAINTS: Targeted fixes only",
|
||||
blockedBy: [],
|
||||
status: "pending"
|
||||
CONSTRAINTS: Targeted fixes only"
|
||||
})
|
||||
TaskUpdate({ taskId: "DESIGN-fix-<round>", owner: "designer" })
|
||||
```
|
||||
|
||||
After fix completes, create new AUDIT task blocked by the fix task. Increment gc_state.round.
|
||||
|
||||
@@ -213,7 +213,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 researcher worker",
|
||||
team_name: "uidesign",
|
||||
@@ -285,6 +285,6 @@ AskUserQuestion({
|
||||
|
||||
| Choice | Steps |
|
||||
|--------|-------|
|
||||
| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("uidesign") -> output final summary with artifact paths |
|
||||
| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete() -> output final summary with artifact paths |
|
||||
| Keep Active | Update session status="paused" -> output: "Session paused. Resume with: Skill(skill='team-uidesign', args='resume')" |
|
||||
| Export Results | AskUserQuestion for target directory -> copy all artifacts -> Archive & Clean flow |
|
||||
|
||||
Reference in New Issue
Block a user