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

@@ -2,7 +2,7 @@
name: animation-extract
description: Extract animation and transition patterns from prompt inference and image references for design system documentation
argument-hint: "[-y|--yes] [--design-id <id>] [--session <id>] [--images "<glob>"] [--focus "<types>"] [--interactive] [--refine]"
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), AskUserQuestion(*), Task(ui-design-agent)
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), AskUserQuestion(*), Agent(ui-design-agent)
---
## Auto Mode
@@ -207,14 +207,14 @@ IF has_images:
### Step 2: Generate Animation Specification Options (Agent Task 1)
**Executor**: `Task(ui-design-agent)`
**Executor**: `Agent(ui-design-agent)`
**Conditional Logic**: Branch based on `refine_mode` flag
```javascript
IF NOT refine_mode:
// EXPLORATION MODE (default)
Task(ui-design-agent): `
Agent(ui-design-agent): `
[ANIMATION_SPECIFICATION_GENERATION_TASK]
Generate context-aware animation specification questions
@@ -308,7 +308,7 @@ IF NOT refine_mode:
ELSE:
// REFINEMENT MODE
Task(ui-design-agent): `
Agent(ui-design-agent): `
[ANIMATION_REFINEMENT_OPTIONS_TASK]
Generate refinement options for existing animation system
@@ -656,7 +656,7 @@ ELSE:
## Phase 2: Animation System Generation (Agent Task 2)
**Executor**: `Task(ui-design-agent)` for animation token generation
**Executor**: `Agent(ui-design-agent)` for animation token generation
### Step 1: Load User Selection or Use Defaults
@@ -706,14 +706,14 @@ IF has_images:
bash(mkdir -p {base_path}/animation-extraction)
```
### Step 3: Launch Animation Generation Task
### Step 3: Launch Animation Generation Agent
**Conditional Task**: Branch based on `refine_mode` flag
```javascript
IF NOT refine_mode:
// EXPLORATION MODE
Task(ui-design-agent): `
Agent(ui-design-agent): `
[ANIMATION_SYSTEM_GENERATION_TASK]
Generate production-ready animation system based on user preferences and CSS extraction
@@ -871,7 +871,7 @@ IF NOT refine_mode:
ELSE:
// REFINEMENT MODE
Task(ui-design-agent): `
Agent(ui-design-agent): `
[ANIMATION_SYSTEM_REFINEMENT_TASK]
Apply selected refinements to existing animation system

View File

@@ -2,7 +2,7 @@
name: explore-auto
description: Interactive exploratory UI design workflow with style-centric batch generation, creates design variants from prompts/images with parallel execution and user selection
argument-hint: "[--input "<value>"] [--targets "<list>"] [--target-type "page|component"] [--session <id>] [--style-variants <count>] [--layout-variants <count>]"
allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*), Task(conceptual-planning-agent)
allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*), Agent(conceptual-planning-agent)
---
# UI Design Auto Workflow Command

View File

@@ -2,7 +2,7 @@
name: generate
description: Assemble UI prototypes by combining layout templates with design tokens (default animation support), pure assembler without new content generation
argument-hint: [--design-id <id>] [--session <id>]
allowed-tools: TodoWrite(*), Read(*), Write(*), Task(ui-design-agent), Bash(*)
allowed-tools: TodoWrite(*), Read(*), Write(*), Agent(ui-design-agent), Bash(*)
---
# Generate UI Prototypes (/workflow:ui-design:generate)
@@ -129,7 +129,7 @@ ELSE:
## Phase 2: Assembly (Agent)
**Executor**: `Task(ui-design-agent)` grouped by `target × style` (max 10 layouts per agent, max 6 concurrent agents)
**Executor**: `Agent(ui-design-agent)` grouped by `target × style` (max 10 layouts per agent, max 6 concurrent agents)
**⚠️ Core Principle**: **Each agent processes ONLY ONE style** (but can process multiple layouts for that style)
@@ -204,7 +204,7 @@ TodoWrite({todos: [
For each batch (up to 6 parallel agents per batch):
For each agent group `{target, style_id, layout_ids[]}` in current batch:
```javascript
Task(ui-design-agent): `
Agent(ui-design-agent): `
[LAYOUT_STYLE_ASSEMBLY]
🎯 {target} × Style-{style_id} × Layouts-{layout_ids}
⚠️ CONSTRAINT: Use ONLY style-{style_id}/design-tokens.json (never mix styles)

View File

@@ -2,7 +2,7 @@
name: workflow:ui-design:import-from-code
description: Import design system from code files (CSS/JS/HTML/SCSS) with automatic file discovery and parallel agent analysis
argument-hint: "[--design-id <id>] [--session <id>] [--source <path>]"
allowed-tools: Read,Write,Bash,Glob,Grep,Task,TodoWrite
allowed-tools: Read,Write,Bash,Glob,Grep,Agent,TodoWrite
auto-continue: true
---

View File

@@ -2,7 +2,7 @@
name: layout-extract
description: Extract structural layout information from reference images or text prompts using Claude analysis with variant generation or refinement mode
argument-hint: "[-y|--yes] [--design-id <id>] [--session <id>] [--images "<glob>"] [--prompt "<desc>"] [--targets "<list>"] [--variants <count>] [--device-type <desktop|mobile|tablet|responsive>] [--interactive] [--refine]"
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), AskUserQuestion(*), Task(ui-design-agent), mcp__exa__web_search_exa(*)
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), AskUserQuestion(*), Agent(ui-design-agent), mcp__exa__web_search_exa(*)
---
## Auto Mode
@@ -162,7 +162,7 @@ IF refine_mode:
```
### Step 1: Generate Options (Agent Task 1 - Mode-Specific)
**Executor**: `Task(ui-design-agent)`
**Executor**: `Agent(ui-design-agent)`
**Exploration Mode** (default): Generate contrasting layout concepts
**Refinement Mode** (`--refine`): Generate refinement options for existing layouts
@@ -171,7 +171,7 @@ IF refine_mode:
// Conditional agent task based on refine_mode
IF NOT refine_mode:
// EXPLORATION MODE
Task(ui-design-agent): `
Agent(ui-design-agent): `
[LAYOUT_CONCEPT_GENERATION_TASK]
Generate {variants_count} structurally distinct layout concepts for each target
@@ -217,7 +217,7 @@ IF NOT refine_mode:
`
ELSE:
// REFINEMENT MODE
Task(ui-design-agent): `
Agent(ui-design-agent): `
[LAYOUT_REFINEMENT_OPTIONS_TASK]
Generate refinement options for existing layout(s)
@@ -461,7 +461,7 @@ Proceeding to generate {total_selections} detailed layout template(s)...
## Phase 2: Layout Template Generation (Agent Task 2)
**Executor**: `Task(ui-design-agent)` × `Total_Selected_Templates` in **parallel**
**Executor**: `Agent(ui-design-agent)` × `Total_Selected_Templates` in **parallel**
### Step 1: Load User Selections or Default to All
```bash
@@ -512,7 +512,7 @@ REPORT: "Generating {total_tasks} layout templates across {targets.length} targe
Generate layout templates for ALL selected concepts in parallel:
```javascript
FOR each task in task_list:
Task(ui-design-agent): `
Agent(ui-design-agent): `
[LAYOUT_TEMPLATE_GENERATION_TASK #{task.variant_id} for {task.target}]
Generate detailed layout template based on user-selected concept.
Focus ONLY on structure and layout. DO NOT concern with visual style (colors, fonts, etc.).

View File

@@ -2,7 +2,7 @@
name: workflow:ui-design:reference-page-generator
description: Generate multi-component reference pages and documentation from design run extraction
argument-hint: "[--design-run <path>] [--package-name <name>] [--output-dir <path>]"
allowed-tools: Read,Write,Bash,Task,TodoWrite
allowed-tools: Read,Write,Bash,Agent,TodoWrite
auto-continue: true
---
@@ -198,7 +198,7 @@ echo "[Phase 1] Component data preparation complete"
**Agent Task**:
```javascript
Task(ui-design-agent): `
Agent(ui-design-agent): `
[PREVIEW_SHOWCASE_GENERATION]
Generate interactive multi-component showcase panel for reference package
@@ -210,7 +210,7 @@ Task(ui-design-agent): `
2. ${package_dir}/design-tokens.json (design tokens - REQUIRED)
3. ${package_dir}/animation-tokens.json (optional, if exists)
## Generation Task
## Generation Agent
Create interactive showcase with these sections: