From 16bbfcd12a0b2fcbeef72a9760e03cb2a6fd261c Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 4 Mar 2026 22:40:39 +0800 Subject: [PATCH] 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/ --- .claude/CLAUDE.md | 4 +- .claude/agents/team-worker.md | 21 ++++-- .claude/commands/ccw-coordinator.md | 2 +- .claude/commands/idaw/run-coordinate.md | 10 +-- .claude/commands/issue/discover-by-prompt.md | 4 +- .claude/commands/issue/discover.md | 8 +- .claude/commands/issue/execute.md | 2 +- .claude/commands/issue/plan.md | 4 +- .claude/commands/issue/queue.md | 4 +- .claude/commands/memory/prepare.md | 2 +- .../commands/workflow/analyze-with-file.md | 10 +-- .../commands/workflow/brainstorm-with-file.md | 8 +- .claude/commands/workflow/clean.md | 2 +- .../workflow/collaborative-plan-with-file.md | 2 +- .claude/commands/workflow/debug-with-file.md | 2 +- .../workflow/integration-test-cycle.md | 14 ++-- .claude/commands/workflow/refactor-cycle.md | 8 +- .../commands/workflow/roadmap-with-file.md | 6 +- .../workflow/ui-design/animation-extract.md | 16 ++-- .../workflow/ui-design/explore-auto.md | 2 +- .../commands/workflow/ui-design/generate.md | 6 +- .../workflow/ui-design/import-from-code.md | 2 +- .../workflow/ui-design/layout-extract.md | 12 +-- .../ui-design/reference-page-generator.md | 6 +- .../workflow/unified-execute-with-file.md | 10 +-- .../_shared/COMMAND-TO-SKILL-CONVERSION.md | 18 ++--- .claude/skills/_shared/SKILL-DESIGN-SPEC.md | 8 +- .claude/skills/brainstorm/SKILL.md | 2 +- .claude/skills/issue-manage/SKILL.md | 5 +- .claude/skills/memory-manage/SKILL.md | 2 +- .claude/skills/review-code/SKILL.md | 2 +- .../skills/review-code/phases/orchestrator.md | 3 +- .claude/skills/review-cycle/SKILL.md | 2 +- .../skills/review-cycle/phases/review-fix.md | 6 +- .claude/skills/skill-generator/SKILL.md | 2 +- .../phases/03-phase-generation.md | 4 +- .../skill-generator/specs/cli-integration.md | 8 +- .../templates/autonomous-orchestrator.md | 2 +- .../templates/code-analysis-action.md | 4 +- .../templates/sequential-phase.md | 2 +- .../skill-generator/templates/skill-md.md | 4 +- .claude/skills/skill-tuning/SKILL.md | 2 +- .../phases/actions/action-diagnose-agent.md | 2 +- .../phases/actions/action-propose-fixes.md | 2 +- .../skill-tuning/phases/orchestrator.md | 3 +- .../specs/skill-authoring-principles.md | 11 ++- .../skill-tuning/specs/tuning-strategies.md | 13 +++- .claude/skills/spec-generator/SKILL.md | 2 +- .../spec-generator/phases/01-discovery.md | 2 +- .claude/skills/team-arch-opt/SKILL.md | 6 +- .../roles/coordinator/commands/dispatch.md | 63 ++++++++-------- .../roles/coordinator/commands/monitor.md | 10 +-- .../team-arch-opt/roles/coordinator/role.md | 4 +- .../subagents/discuss-subagent.md | 2 +- .../subagents/explore-subagent.md | 2 +- .claude/skills/team-brainstorm/SKILL.md | 8 +- .../roles/coordinator/commands/dispatch.md | 42 ++++------- .../roles/coordinator/commands/monitor.md | 2 +- .../team-brainstorm/roles/coordinator/role.md | 6 +- .claude/skills/team-coordinate/SKILL.md | 4 +- .../roles/coordinator/commands/dispatch.md | 6 +- .../roles/coordinator/commands/monitor.md | 4 +- .../subagents/discuss-subagent.md | 2 +- .../subagents/explore-subagent.md | 2 +- .claude/skills/team-executor/SKILL.md | 4 +- .../roles/executor/commands/monitor.md | 2 +- .../team-executor/specs/session-schema.md | 2 +- .claude/skills/team-frontend/SKILL.md | 6 +- .../roles/coordinator/commands/dispatch.md | 25 +++---- .../roles/coordinator/commands/monitor.md | 12 ++- .../team-frontend/roles/coordinator/role.md | 4 +- .claude/skills/team-issue/SKILL.md | 8 +- .../skills/team-issue/role-specs/explorer.md | 2 +- .../team-issue/role-specs/implementer.md | 4 +- .../team-issue/role-specs/integrator.md | 2 +- .../skills/team-issue/role-specs/planner.md | 2 +- .../roles/coordinator/commands/dispatch.md | 74 +++++++------------ .../roles/coordinator/commands/monitor.md | 4 +- .../team-issue/roles/coordinator/role.md | 4 +- .claude/skills/team-iterdev/SKILL.md | 6 +- .../roles/coordinator/commands/dispatch.md | 46 ++++-------- .../roles/coordinator/commands/monitor.md | 2 +- .../team-iterdev/roles/coordinator/role.md | 4 +- .claude/skills/team-lifecycle/SKILL.md | 4 +- .../team-lifecycle/role-specs/analyst.md | 2 +- .../team-lifecycle/role-specs/executor.md | 2 +- .../team-lifecycle/role-specs/fe-developer.md | 2 +- .../team-lifecycle/role-specs/planner.md | 4 +- .../team-lifecycle/role-specs/writer.md | 2 +- .../roles/coordinator/commands/dispatch.md | 8 +- .../roles/coordinator/commands/monitor.md | 2 +- .../subagents/discuss-subagent.md | 2 +- .../subagents/doc-generation-subagent.md | 2 +- .../subagents/explore-subagent.md | 8 +- .claude/skills/team-perf-opt/SKILL.md | 6 +- .../roles/coordinator/commands/monitor.md | 2 +- .../team-perf-opt/roles/coordinator/role.md | 4 +- .../subagents/discuss-subagent.md | 2 +- .../subagents/explore-subagent.md | 2 +- .claude/skills/team-planex/SKILL.md | 4 +- .../skills/team-planex/role-specs/executor.md | 2 +- .../skills/team-planex/role-specs/planner.md | 2 +- .../roles/coordinator/commands/monitor.md | 2 +- .../skills/team-quality-assurance/SKILL.md | 8 +- .../roles/coordinator/commands/monitor.md | 2 +- .claude/skills/team-review/SKILL.md | 6 +- .../roles/coordinator/commands/monitor.md | 2 +- .claude/skills/team-roadmap-dev/SKILL.md | 6 +- .../roles/coordinator/commands/monitor.md | 2 +- .claude/skills/team-tech-debt/SKILL.md | 6 +- .../roles/coordinator/commands/monitor.md | 2 +- .../team-tech-debt/roles/coordinator/role.md | 2 +- .claude/skills/team-testing/SKILL.md | 6 +- .../team-testing/role-specs/executor.md | 2 +- .../team-testing/role-specs/generator.md | 2 +- .../roles/coordinator/commands/dispatch.md | 21 ++---- .../roles/coordinator/commands/monitor.md | 8 +- .../team-testing/roles/coordinator/role.md | 4 +- .claude/skills/team-uidesign/SKILL.md | 6 +- .../roles/coordinator/commands/dispatch.md | 25 +++---- .../roles/coordinator/commands/monitor.md | 7 +- .../team-uidesign/roles/coordinator/role.md | 4 +- .claude/skills/team-ultra-analyze/SKILL.md | 6 +- .../role-specs/discussant.md | 9 ++- .../team-ultra-analyze/role-specs/explorer.md | 2 +- .../roles/coordinator/commands/dispatch.md | 47 +++++------- .../roles/coordinator/commands/monitor.md | 15 ++-- .../roles/coordinator/role.md | 4 +- .claude/skills/workflow-execute/SKILL.md | 4 +- .claude/skills/workflow-lite-planex/SKILL.md | 2 +- .../phases/02-lite-execute.md | 2 +- .../skills/workflow-multi-cli-plan/SKILL.md | 2 +- .../phases/01-multi-cli-plan.md | 4 +- .../phases/02-lite-execute.md | 2 +- .claude/skills/workflow-plan/SKILL.md | 2 +- .../phases/03-conflict-resolution.md | 2 +- .../skills/workflow-skill-designer/SKILL.md | 2 +- .../phases/01-requirements-analysis.md | 2 +- .../phases/03-phase-design.md | 2 +- .claude/skills/workflow-tdd-plan/SKILL.md | 2 +- .../phases/04-conflict-resolution.md | 2 +- .claude/skills/workflow-test-fix/SKILL.md | 2 +- .../src/components/ChunkErrorBoundary.tsx | 16 +++- ccw/frontend/src/locales/en/team.json | 3 + ccw/frontend/src/locales/zh/team.json | 3 + ccw/frontend/src/pages/TeamPage.tsx | 45 ++++++++++- 146 files changed, 505 insertions(+), 516 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index c4a00e6d..32f3c09d 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -16,7 +16,7 @@ Available CLI endpoints are dynamically defined by the config file - **File Modification**: @~/.ccw/workflows/file-modification.md ### Agent Calls -- **Always use `run_in_background: false`** for Task tool agent calls: `Task({ subagent_type: "xxx", prompt: "...", run_in_background: false })` to ensure synchronous execution and immediate result visibility +- **Always use `run_in_background: false`** for Agent tool calls: `Agent({ subagent_type: "xxx", prompt: "...", run_in_background: false })` to ensure synchronous execution and immediate result visibility - **TaskOutput usage**: Only use `TaskOutput({ task_id: "xxx", block: false })` + sleep loop to poll completion status. NEVER read intermediate output during agent/CLI execution - wait for final result only ### CLI Tool Calls (ccw cli) @@ -27,7 +27,7 @@ Available CLI endpoints are dynamically defined by the config file run_in_background: true // Bash tool parameter, not ccw cli parameter }) ``` -- **CRITICAL — Agent-specific instructions ALWAYS override this default.** If an agent's definition file (`.claude/agents/*.md`) specifies `run_in_background: false`, that instruction takes highest priority. Subagents (Task tool agents) CANNOT receive hook callbacks, so they MUST use `run_in_background: false` for CLI calls that produce required results. +- **CRITICAL — Agent-specific instructions ALWAYS override this default.** If an agent's definition file (`.claude/agents/*.md`) specifies `run_in_background: false`, that instruction takes highest priority. Subagents (Agent tool agents) CANNOT receive hook callbacks, so they MUST use `run_in_background: false` for CLI calls that produce required results. - **After CLI call (main conversation only)**: Stop output immediately - let CLI execute in background. **DO NOT use TaskOutput polling** - wait for hook callback to receive results ### CLI Analysis Calls diff --git a/.claude/agents/team-worker.md b/.claude/agents/team-worker.md index c29bb9f7..ddc71d6a 100644 --- a/.claude/agents/team-worker.md +++ b/.claude/agents/team-worker.md @@ -105,7 +105,7 @@ Execute on every loop iteration: - If inner loop continuation → proceed to Phase 5-F (all done) 4. **Has matching tasks** → pick first by ID order 5. `TaskGet(taskId)` → read full task details -6. `TaskUpdate(taskId, status="in_progress")` → claim the task +6. `TaskUpdate({ taskId: taskId, status: "in_progress" })` → claim the task ### Resume Artifact Check @@ -130,7 +130,7 @@ When role_spec instructs to call a subagent, use these templates: **Discuss subagent** (for inline discuss rounds): ``` -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: "Discuss ", @@ -169,7 +169,7 @@ JSON with: verdict (consensus_reached|consensus_blocked), severity (HIGH|MEDIUM| **Explore subagent** (for codebase exploration): ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore ", @@ -196,7 +196,7 @@ Return summary: file count, pattern count, top 5 files, output path` **Doc-generation subagent** (for writer document generation): ``` -Task({ +Agent({ subagent_type: "universal-executor", run_in_background: false, description: "Generate ", @@ -294,8 +294,13 @@ After Phase 4 completes, determine Phase 5 variant (see Execution Flow for decis 1. **TaskUpdate**: Mark current task `completed` 2. **Message Bus**: Log state_update (same call as Phase 5-L step 2) 3. **Compile final report** and **SendMessage** to coordinator: - ``` - SendMessage(team_name=, recipient="coordinator", message="[] ") + ```javascript + SendMessage({ + type: "message", + recipient: "coordinator", + content: "[] ", + summary: "[] Final report delivered" + }) ``` Report contents: tasks completed (count + list), artifacts produced (paths), files modified (with evidence), discuss results (verdicts + ratings), key decisions (from context_accumulator), verification summary, warnings/issues. 4. **Fast-Advance Check**: Call `TaskList()`, find pending tasks whose blockedBy are ALL completed, apply rules: @@ -303,7 +308,7 @@ After Phase 4 completes, determine Phase 5 variant (see Execution Flow for decis | Condition | Action | |-----------|--------| | Same-prefix successor (inner loop role) | Do NOT spawn — main agent handles via inner loop | -| 1 ready task, simple linear successor, different prefix | Spawn directly via `Task(run_in_background: true)` + log `fast_advance` | +| 1 ready task, simple linear successor, different prefix | Spawn directly via `Agent(run_in_background: true)` + log `fast_advance` | | Multiple ready tasks (parallel window) | SendMessage to coordinator (needs orchestration) | | No ready tasks + others running | SendMessage to coordinator (status update) | | No ready tasks + nothing running | SendMessage to coordinator (pipeline may be complete) | @@ -314,7 +319,7 @@ After Phase 4 completes, determine Phase 5 variant (see Execution Flow for decis When fast-advancing to a different-prefix successor: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: , diff --git a/.claude/commands/ccw-coordinator.md b/.claude/commands/ccw-coordinator.md index 4295d94f..e2641594 100644 --- a/.claude/commands/ccw-coordinator.md +++ b/.claude/commands/ccw-coordinator.md @@ -2,7 +2,7 @@ name: ccw-coordinator description: Command orchestration tool - analyze requirements, recommend chain, execute sequentially with state persistence argument-hint: "[task description]" -allowed-tools: Task(*), AskUserQuestion(*), Read(*), Write(*), Bash(*), Glob(*), Grep(*) +allowed-tools: Agent(*), AskUserQuestion(*), Read(*), Write(*), Bash(*), Glob(*), Grep(*) --- # CCW Coordinator Command diff --git a/.claude/commands/idaw/run-coordinate.md b/.claude/commands/idaw/run-coordinate.md index 15feb2e5..9fead94e 100644 --- a/.claude/commands/idaw/run-coordinate.md +++ b/.claude/commands/idaw/run-coordinate.md @@ -2,7 +2,7 @@ name: run-coordinate description: IDAW coordinator - execute task skill chains via external CLI with hook callbacks and git checkpoints argument-hint: "[-y|--yes] [--task [,,...]] [--dry-run] [--tool ]" -allowed-tools: Task(*), AskUserQuestion(*), Read(*), Write(*), Bash(*), Glob(*), Grep(*) +allowed-tools: Agent(*), AskUserQuestion(*), Read(*), Write(*), Bash(*), Glob(*), Grep(*) --- # IDAW Run Coordinate Command (/idaw:run-coordinate) @@ -216,7 +216,7 @@ const chain = firstTask.skill_chain || SKILL_CHAIN_MAP[resolvedType] || SKILL_CH firstTask.status = 'in_progress'; firstTask.task_type = resolvedType; firstTask.execution.started_at = new Date().toISOString(); -Write(`.workflow/.idaw/tasks/${firstTask.id}.json`, JSON.stringify(firstTask, null, 2)); +Write(`.workflow/.idaw/tasks/${firstTask.id}.json`, JSON.stringify(firstAgent, null, 2)); // Update session session.current_task = firstTask.id; @@ -239,7 +239,7 @@ CONSTRAINTS: Keep concise`; // Assemble prompt for first skill const skillName = chain[0]; -const prompt = assembleCliPrompt(skillName, firstTask, null, autoYes); +const prompt = assembleCliPrompt(skillName, firstAgent, null, autoYes); session.prompts_used.push({ task_id: firstTask.id, @@ -403,7 +403,7 @@ CONSTRAINTS: Actionable diagnosis`; nextTask.status = 'in_progress'; nextTask.task_type = nextType; nextTask.execution.started_at = new Date().toISOString(); - Write(`.workflow/.idaw/tasks/${nextTaskId}.json`, JSON.stringify(nextTask, null, 2)); + Write(`.workflow/.idaw/tasks/${nextTaskId}.json`, JSON.stringify(nextAgent, null, 2)); session.current_task = nextTaskId; session.current_skill_index = 0; @@ -417,7 +417,7 @@ CONSTRAINTS: Actionable diagnosis`; } const nextSkillName = nextChain[0]; - const nextPrompt = assembleCliPrompt(nextSkillName, nextTask, null, true); + const nextPrompt = assembleCliPrompt(nextSkillName, nextAgent, null, true); session.prompts_used.push({ task_id: nextTaskId, diff --git a/.claude/commands/issue/discover-by-prompt.md b/.claude/commands/issue/discover-by-prompt.md index db1269f8..5b15429d 100644 --- a/.claude/commands/issue/discover-by-prompt.md +++ b/.claude/commands/issue/discover-by-prompt.md @@ -2,7 +2,7 @@ name: issue:discover-by-prompt description: Discover issues from user prompt with Gemini-planned iterative multi-agent exploration. Uses ACE semantic search for context gathering and supports cross-module comparison (e.g., frontend vs backend API contracts). argument-hint: "[-y|--yes] [--scope=src/**] [--depth=standard|deep] [--max-iterations=5]" -allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Task(*), AskUserQuestion(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*), mcp__exa__search(*) +allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Agent(*), AskUserQuestion(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*), mcp__exa__search(*) --- ## Auto Mode @@ -404,7 +404,7 @@ while (shouldContinue && iteration < maxIterations) { // Step 3: Launch dimension agents with ACE context const agentPromises = iterationPlan.dimensions.map(dimension => - Task({ + Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore ${dimension.name} (iteration ${iteration})`, diff --git a/.claude/commands/issue/discover.md b/.claude/commands/issue/discover.md index 2fdd968c..ac481426 100644 --- a/.claude/commands/issue/discover.md +++ b/.claude/commands/issue/discover.md @@ -2,7 +2,7 @@ name: issue:discover description: Discover potential issues from multiple perspectives (bug, UX, test, quality, security, performance, maintainability, best-practices) using CLI explore. Supports Exa external research for security and best-practices perspectives. argument-hint: "[-y|--yes] [--perspectives=bug,ux,...] [--external]" -allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Task(*), AskUserQuestion(*), Glob(*), Grep(*) +allowed-tools: Skill(*), TodoWrite(*), Read(*), Bash(*), Agent(*), AskUserQuestion(*), Glob(*), Grep(*) --- ## Auto Mode @@ -185,7 +185,7 @@ Launch N agents in parallel (one per selected perspective): ```javascript // Launch agents in parallel - agents write JSON and return summary const agentPromises = selectedPerspectives.map(perspective => - Task({ + Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Discover ${perspective} issues`, @@ -322,7 +322,7 @@ if (response === "Export to Issues") { **Perspective Analysis Agent**: ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Discover ${perspective} issues`, @@ -368,7 +368,7 @@ Task({ **Exa Research Agent** (for security and best-practices): ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `External research for ${perspective} via Exa`, diff --git a/.claude/commands/issue/execute.md b/.claude/commands/issue/execute.md index 8c62d452..c7784430 100644 --- a/.claude/commands/issue/execute.md +++ b/.claude/commands/issue/execute.md @@ -429,7 +429,7 @@ On failure, run: { timeout: 3600000, run_in_background: true } ); } else { - return Task({ + return Agent({ subagent_type: 'code-developer', run_in_background: false, description: `Execute solution ${solutionId}`, diff --git a/.claude/commands/issue/plan.md b/.claude/commands/issue/plan.md index cfc5136f..1a6e3009 100644 --- a/.claude/commands/issue/plan.md +++ b/.claude/commands/issue/plan.md @@ -2,7 +2,7 @@ name: plan description: Batch plan issue resolution using issue-plan-agent (explore + plan closed-loop) argument-hint: "[-y|--yes] --all-pending [,,...] [--batch-size 3]" -allowed-tools: TodoWrite(*), Task(*), Skill(*), AskUserQuestion(*), Bash(*), Read(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), Skill(*), AskUserQuestion(*), Bash(*), Read(*), Write(*) --- ## Auto Mode @@ -222,7 +222,7 @@ for (let i = 0; i < agentTasks.length; i += MAX_PARALLEL) { // Collect results from this chunk for (const { taskId, batchIndex } of taskIds) { - const result = TaskOutput(task_id=taskId, block=true); + const result = TaskOutput({ task_id: taskId, block: true }); // Extract JSON from potential markdown code blocks (agent may wrap in ```json...```) const jsonText = extractJsonFromMarkdown(result); diff --git a/.claude/commands/issue/queue.md b/.claude/commands/issue/queue.md index caef9c8f..dafe3c52 100644 --- a/.claude/commands/issue/queue.md +++ b/.claude/commands/issue/queue.md @@ -2,7 +2,7 @@ name: queue description: Form execution queue from bound solutions using issue-queue-agent (solution-level) argument-hint: "[-y|--yes] [--queues ] [--issue ]" -allowed-tools: TodoWrite(*), Task(*), Bash(*), Read(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), Bash(*), Read(*), Write(*) --- ## Auto Mode @@ -247,7 +247,7 @@ if (numQueues === 1) { description=`Queue ${i + 1}/${numQueues}: ${group.length} solutions` ) ); - // All agents launched in parallel via single message with multiple Task tool calls + // All agents launched in parallel via single message with multiple Agent tool calls } ``` diff --git a/.claude/commands/memory/prepare.md b/.claude/commands/memory/prepare.md index 9a0fa892..32eef92b 100644 --- a/.claude/commands/memory/prepare.md +++ b/.claude/commands/memory/prepare.md @@ -2,7 +2,7 @@ name: prepare description: Delegate to universal-executor agent to analyze project via Gemini/Qwen CLI and return JSON core content package for task context argument-hint: "[--tool gemini|qwen] \"task context description\"" -allowed-tools: Task(*), Bash(*) +allowed-tools: Agent(*), Bash(*) examples: - /memory:prepare "在当前前端基础上开发用户认证功能" - /memory:prepare --tool qwen "重构支付模块API" diff --git a/.claude/commands/workflow/analyze-with-file.md b/.claude/commands/workflow/analyze-with-file.md index b5c6bfce..33c80c4d 100644 --- a/.claude/commands/workflow/analyze-with-file.md +++ b/.claude/commands/workflow/analyze-with-file.md @@ -2,7 +2,7 @@ name: analyze-with-file description: Interactive collaborative analysis with documented discussions, CLI-assisted exploration, and evolving understanding argument-hint: "[-y|--yes] [-c|--continue] \"topic or question\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode @@ -226,7 +226,7 @@ Interactive collaborative analysis workflow with **documented discussion process **Single Exploration Example**: ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore codebase: ${topicSlug}`, @@ -256,7 +256,7 @@ Schema: {relevant_files, patterns, key_findings, questions_for_user, _metadata} ```javascript // Launch parallel explorations for each selected perspective selectedPerspectives.forEach(perspective => { - Task({ + Agent({ subagent_type: "cli-explore-agent", run_in_background: false, // Sequential execution, wait for each description: `Explore ${perspective.name}: ${topicSlug}`, @@ -399,7 +399,7 @@ CONSTRAINTS: ${perspective.constraints} - explorations.json contains initial findings - discussion.md has Round 1 results -**Guideline**: For complex tasks (code analysis, implementation, refactoring), delegate to agents via Task tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process. +**Guideline**: For complex tasks (code analysis, implementation, refactoring), delegate to agents via Agent tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process. **Workflow Steps**: @@ -739,7 +739,7 @@ In round 1 we discussed X, then in round 2 user said Y... ## Best Practices 1. **Clear Topic Definition**: Detailed topics lead to better dimension identification -2. **Agent-First for Complex Tasks**: For code analysis, implementation, or refactoring tasks during discussion, delegate to agents via Task tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process +2. **Agent-First for Complex Tasks**: For code analysis, implementation, or refactoring tasks during discussion, delegate to agents via Agent tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process 3. **Review discussion.md**: Check understanding evolution before conclusions 4. **Embrace Corrections**: Track wrong-to-right transformations as learnings 5. **Document Evolution**: discussion.md captures full thinking process diff --git a/.claude/commands/workflow/brainstorm-with-file.md b/.claude/commands/workflow/brainstorm-with-file.md index 99242fe1..24c02bfe 100644 --- a/.claude/commands/workflow/brainstorm-with-file.md +++ b/.claude/commands/workflow/brainstorm-with-file.md @@ -2,7 +2,7 @@ name: brainstorm-with-file description: Interactive brainstorming with multi-CLI collaboration, idea expansion, and documented thought evolution argument-hint: "[-y|--yes] [-c|--continue] [-m|--mode creative|structured] \"idea or topic\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode @@ -245,7 +245,7 @@ Output as structured exploration vectors for multi-perspective analysis. **Agent Call Example**: ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore codebase for brainstorm: ${topicSlug}`, @@ -410,7 +410,7 @@ CONSTRAINTS: Consider existing system architecture - perspectives.json contains initial ideas - brainstorm.md has Round 2 findings -**Guideline**: For complex tasks (code analysis, implementation, POC creation), delegate to agents via Task tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process. +**Guideline**: For complex tasks (code analysis, implementation, POC creation), delegate to agents via Agent tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process. **Workflow Steps**: @@ -725,7 +725,7 @@ Dimensions matched against topic keywords to identify focus areas: ## Best Practices 1. **Clear Topic Definition**: Detailed topics → better role selection and exploration -2. **Agent-First for Complex Tasks**: For code analysis, POC implementation, or technical validation during refinement, delegate to agents via Task tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process +2. **Agent-First for Complex Tasks**: For code analysis, POC implementation, or technical validation during refinement, delegate to agents via Agent tool (cli-explore-agent, code-developer, universal-executor) or CLI calls (ccw cli). Avoid direct analysis/execution in main process 3. **Review brainstorm.md**: Check thought evolution before final decisions 4. **Embrace Conflicts**: Perspective conflicts often reveal important tradeoffs 5. **Document Evolution**: brainstorm.md captures full thinking process for team review diff --git a/.claude/commands/workflow/clean.md b/.claude/commands/workflow/clean.md index 42627b19..1420ef52 100644 --- a/.claude/commands/workflow/clean.md +++ b/.claude/commands/workflow/clean.md @@ -2,7 +2,7 @@ name: clean description: Intelligent code cleanup with mainline detection, stale artifact discovery, and safe execution argument-hint: "[-y|--yes] [--dry-run] [\"focus area\"]" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Glob(*), Bash(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Glob(*), Bash(*), Write(*) --- # Clean Command (/workflow:clean) diff --git a/.claude/commands/workflow/collaborative-plan-with-file.md b/.claude/commands/workflow/collaborative-plan-with-file.md index bcba835e..e23689ce 100644 --- a/.claude/commands/workflow/collaborative-plan-with-file.md +++ b/.claude/commands/workflow/collaborative-plan-with-file.md @@ -2,7 +2,7 @@ name: workflow:collaborative-plan-with-file description: Collaborative planning with Plan Note - Understanding agent creates shared plan-note.md template, parallel agents fill pre-allocated sections, conflict detection without merge. Outputs executable plan-note.md. argument-hint: "[-y|--yes] [--max-agents=5]" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Bash(*), Write(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Bash(*), Write(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*) --- ## Auto Mode diff --git a/.claude/commands/workflow/debug-with-file.md b/.claude/commands/workflow/debug-with-file.md index 2611f80f..bfb209c7 100644 --- a/.claude/commands/workflow/debug-with-file.md +++ b/.claude/commands/workflow/debug-with-file.md @@ -2,7 +2,7 @@ name: debug-with-file description: Interactive hypothesis-driven debugging with documented exploration, understanding evolution, and Gemini-assisted correction argument-hint: "[-y|--yes] \"bug description or error message\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode diff --git a/.claude/commands/workflow/integration-test-cycle.md b/.claude/commands/workflow/integration-test-cycle.md index b5cde5c5..5bc76966 100644 --- a/.claude/commands/workflow/integration-test-cycle.md +++ b/.claude/commands/workflow/integration-test-cycle.md @@ -2,7 +2,7 @@ name: integration-test-cycle description: Self-iterating integration test workflow with codebase exploration, test development, autonomous test-fix cycles, and reflection-driven strategy adjustment argument-hint: "[-y|--yes] [-c|--continue] [--max-iterations=N] \"module or feature description\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*), Skill(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*), Skill(*) --- ## Auto Mode @@ -209,7 +209,7 @@ Unified integration test workflow: **Explore → Design → Develop → Test → 1. **Codebase Exploration via cli-explore-agent** ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore integration points: ${topicSlug}`, @@ -391,7 +391,7 @@ Also set `state.json.phase` to `"designed"`. 1. **Generate Integration Tests via @code-developer** ```javascript -Task({ +Agent({ subagent_type: "code-developer", run_in_background: false, description: `Generate integration tests: ${topicSlug}`, @@ -435,7 +435,7 @@ Also set state.json "phase" to "developed". 2. **Code Validation Gate via @test-fix-agent** ```javascript -Task({ +Agent({ subagent_type: "test-fix-agent", run_in_background: false, description: `Validate generated tests: ${topicSlug}`, @@ -605,7 +605,7 @@ After each iteration, update the `## Cumulative Learnings` section in reflection **@test-fix-agent** (test execution): ```javascript -Task({ +Agent({ subagent_type: "test-fix-agent", run_in_background: false, description: `Execute integration tests: iteration ${N}`, @@ -637,7 +637,7 @@ For each failure, assign: **@cli-planning-agent** (failure analysis with reflection): ```javascript -Task({ +Agent({ subagent_type: "cli-planning-agent", run_in_background: false, description: `Analyze failures: iteration ${N} - ${strategy}`, @@ -676,7 +676,7 @@ Analyze test failures using reflection context and generate fix strategy. **@test-fix-agent** (apply fixes): ```javascript -Task({ +Agent({ subagent_type: "test-fix-agent", run_in_background: false, description: `Apply fixes: iteration ${N} - ${strategy}`, diff --git a/.claude/commands/workflow/refactor-cycle.md b/.claude/commands/workflow/refactor-cycle.md index 76503512..77f1264f 100644 --- a/.claude/commands/workflow/refactor-cycle.md +++ b/.claude/commands/workflow/refactor-cycle.md @@ -2,7 +2,7 @@ name: refactor-cycle description: Tech debt discovery and self-iterating refactoring with multi-dimensional analysis, prioritized execution, regression validation, and reflection-driven adjustment argument-hint: "[-y|--yes] [-c|--continue] [--scope=module|project] \"module or refactoring goal\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode @@ -200,7 +200,7 @@ Closed-loop tech debt lifecycle: **Discover → Assess → Plan → Refactor → 1. **Codebase Exploration via cli-explore-agent** ```javascript -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore codebase for debt: ${topicSlug}`, @@ -465,7 +465,7 @@ Set `state.json.current_item` to item ID. #### Step 4.2: Execute Refactoring ```javascript -Task({ +Agent({ subagent_type: "code-developer", run_in_background: false, description: `Refactor ${item.id}: ${item.title}`, @@ -499,7 +499,7 @@ ${JSON.stringify(item.refactor_plan, null, 2)} ```javascript // 1. Run tests -Task({ +Agent({ subagent_type: "test-fix-agent", run_in_background: false, description: `Validate refactoring: ${item.id}`, diff --git a/.claude/commands/workflow/roadmap-with-file.md b/.claude/commands/workflow/roadmap-with-file.md index 73fc888a..910165a2 100644 --- a/.claude/commands/workflow/roadmap-with-file.md +++ b/.claude/commands/workflow/roadmap-with-file.md @@ -2,7 +2,7 @@ name: roadmap-with-file description: Strategic requirement roadmap with iterative decomposition and issue creation. Outputs roadmap.md (human-readable, single source) + issues.jsonl (machine-executable). Handoff to team-planex. argument-hint: "[-y|--yes] [-c|--continue] [-m progressive|direct|auto] \"requirement description\"" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode @@ -355,12 +355,12 @@ Bash(`mkdir -p ${sessionFolder}`) **Agent Prompt Template**: ```javascript -Task({ +Agent({ subagent_type: "cli-roadmap-plan-agent", run_in_background: false, description: `Roadmap decomposition: ${slug}`, prompt: ` -## Roadmap Decomposition Task +## Roadmap Decomposition Agent ### Input Context - **Requirement**: ${requirement} diff --git a/.claude/commands/workflow/ui-design/animation-extract.md b/.claude/commands/workflow/ui-design/animation-extract.md index aa78b479..02f0e757 100644 --- a/.claude/commands/workflow/ui-design/animation-extract.md +++ b/.claude/commands/workflow/ui-design/animation-extract.md @@ -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 ] [--session ] [--images ""] [--focus ""] [--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 diff --git a/.claude/commands/workflow/ui-design/explore-auto.md b/.claude/commands/workflow/ui-design/explore-auto.md index 8a9d3951..915538e4 100644 --- a/.claude/commands/workflow/ui-design/explore-auto.md +++ b/.claude/commands/workflow/ui-design/explore-auto.md @@ -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 ""] [--targets ""] [--target-type "page|component"] [--session ] [--style-variants ] [--layout-variants ]" -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 diff --git a/.claude/commands/workflow/ui-design/generate.md b/.claude/commands/workflow/ui-design/generate.md index 4c3159bf..a7416211 100644 --- a/.claude/commands/workflow/ui-design/generate.md +++ b/.claude/commands/workflow/ui-design/generate.md @@ -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 ] [--session ] -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) diff --git a/.claude/commands/workflow/ui-design/import-from-code.md b/.claude/commands/workflow/ui-design/import-from-code.md index 8d2168fe..62450e2f 100644 --- a/.claude/commands/workflow/ui-design/import-from-code.md +++ b/.claude/commands/workflow/ui-design/import-from-code.md @@ -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 ] [--session ] [--source ]" -allowed-tools: Read,Write,Bash,Glob,Grep,Task,TodoWrite +allowed-tools: Read,Write,Bash,Glob,Grep,Agent,TodoWrite auto-continue: true --- diff --git a/.claude/commands/workflow/ui-design/layout-extract.md b/.claude/commands/workflow/ui-design/layout-extract.md index 8df4aeb4..1c5e29bc 100644 --- a/.claude/commands/workflow/ui-design/layout-extract.md +++ b/.claude/commands/workflow/ui-design/layout-extract.md @@ -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 ] [--session ] [--images ""] [--prompt ""] [--targets ""] [--variants ] [--device-type ] [--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.). diff --git a/.claude/commands/workflow/ui-design/reference-page-generator.md b/.claude/commands/workflow/ui-design/reference-page-generator.md index d4e60e48..515814f7 100644 --- a/.claude/commands/workflow/ui-design/reference-page-generator.md +++ b/.claude/commands/workflow/ui-design/reference-page-generator.md @@ -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 ] [--package-name ] [--output-dir ]" -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: diff --git a/.claude/commands/workflow/unified-execute-with-file.md b/.claude/commands/workflow/unified-execute-with-file.md index 50cb9dee..41f7d1e8 100644 --- a/.claude/commands/workflow/unified-execute-with-file.md +++ b/.claude/commands/workflow/unified-execute-with-file.md @@ -2,7 +2,7 @@ name: unified-execute-with-file description: Universal execution engine for consuming any planning/brainstorm/analysis output with minimal progress tracking, multi-agent coordination, and incremental execution argument-hint: "[-y|--yes] [[,] | -p|--plan [,]] [--auto-commit] [--commit-prefix \"prefix\"] [\"execution context or task name\"]" -allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) +allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*) --- ## Auto Mode @@ -34,7 +34,7 @@ When `--yes` or `-y`: Auto-confirm execution decisions, follow plan's DAG depend ``` **Execution Methods**: -- **Agent**: Task tool with code-developer (recommended for standard tasks) +- **Agent**: Agent tool with code-developer (recommended for standard tasks) - **CLI-Codex**: `ccw cli --tool codex` (complex tasks, git-aware) - **CLI-Gemini**: `ccw cli --tool gemini` (analysis-heavy tasks) - **Auto**: Select based on task complexity (default in `-y` mode) @@ -99,7 +99,7 @@ Universal execution engine consuming **any** planning output and executing it wi │ Phase 5: Per-Task Execution (Agent OR CLI) │ │ ├─ Extract relevant notes from previous tasks │ │ ├─ Inject notes into execution context │ -│ ├─ Route to Agent (Task tool) OR CLI (ccw cli command) │ +│ ├─ Route to Agent (Agent tool) OR CLI (ccw cli command) │ │ ├─ Generate structured notes for next task │ │ ├─ Auto-commit if enabled (conventional commit format) │ │ └─ Append event to unified log │ @@ -507,10 +507,10 @@ ${recommendations.map(r => \`- ${r}\`).join('\\n')} When: `executionMethod === "Agent"` or `Auto + Low Complexity` - Execute task via Task tool with code-developer agent: + Execute task via Agent tool with code-developer agent: ```javascript - Task({ + Agent({ subagent_type: "code-developer", // or other agent types run_in_background: false, description: task.title, diff --git a/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md b/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md index 9c73663c..3469636b 100644 --- a/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md +++ b/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md @@ -83,7 +83,7 @@ | 内容类型 | 保留要求 | 示例 | |---------|---------|------| | **Bash命令** | 完整命令,包含所有参数、管道、重定向 | `find . -name "*.json" \| head -1` | -| **Agent Prompt** | 全文保留,包含OBJECTIVE、TASK、EXPECTED等所有节 | 完整的Task({prompt: "..."}) | +| **Agent Prompt** | 全文保留,包含OBJECTIVE、TASK、EXPECTED等所有节 | 完整的Agent({prompt: "..."}) | | **代码函数** | 完整函数体,所有if/else分支 | `analyzeTaskComplexity()` 全部代码 | | **参数表格** | 所有行列,不省略任何参数 | Session Types表格 | | **JSON Schema** | 所有字段、类型、required定义 | context-package.json schema | @@ -95,7 +95,7 @@ 1. **将代码替换为描述** - ❌ 错误:`Execute context gathering agent` - - ✅ 正确:完整的 `Task({ subagent_type: "context-search-agent", prompt: "...[完整200行prompt]..." })` + - ✅ 正确:完整的 `Agent({ subagent_type: "context-search-agent", prompt: "...[完整200行prompt]..." })` 2. **省略Prompt内容** - ❌ 错误:`Agent prompt for context gathering (see original file)` @@ -277,7 +277,7 @@ commands/ skills/ --- name: {skill-name} description: {简短描述}. Triggers on "{trigger-phrase}". -allowed-tools: Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep --- ``` @@ -440,7 +440,7 @@ Complete: IMPL_PLAN.md + Task JSONs |--------|---------|---------| | **代码块数量** | 计数 ` ```bash ` 和 ` ```javascript ` | 与原文件相等 | | **表格数量** | 计数 ` \| ` 开头的行 | 与原文件相等 | -| **Agent Prompt** | 搜索 `Task({` | 完整的prompt参数内容 | +| **Agent Prompt** | 搜索 `Agent({` | 完整的prompt参数内容 | | **步骤编号** | 检查 `### Step` | 编号序列与原文件一致 | | **文件行数** | `wc -l` | ±20%以内 | | **关键函数** | 搜索函数名 | 所有函数完整保留 | @@ -492,10 +492,10 @@ Execute the context-search-agent to gather project context. ### Step 2: Run context gathering ```javascript -Task({ +Agent({ subagent_type: "context-search-agent", prompt: ` -## Context Search Task +## Context Search Agent ### OBJECTIVE Gather comprehensive context for planning session ${sessionId} @@ -535,7 +535,7 @@ Gather comprehensive context for planning session ${sessionId} │ └─→ 数量应相等 │ │ │ │ Step 3: 关键内容抽查 │ -│ - 搜索 Task({ → Agent Prompt 完整性 │ +│ - 搜索 Agent({ → Agent Prompt 完整性 │ │ - 搜索函数名 → 函数体完整性 │ │ - 搜索表格标记 → 表格完整性 │ │ │ @@ -562,8 +562,8 @@ grep -c '^|' commands/workflow/tools/context-gather.md grep -c '^|' skills/workflow-plan/phases/02-context-gathering.md # 4. Agent Prompt检查 -grep -c 'Task({' commands/workflow/tools/context-gather.md -grep -c 'Task({' skills/workflow-plan/phases/02-context-gathering.md +grep -c 'Agent({' commands/workflow/tools/context-gather.md +grep -c 'Agent({' skills/workflow-plan/phases/02-context-gathering.md # 5. 函数定义检查 grep -E '^(function|const.*=.*=>|async function)' commands/workflow/tools/context-gather.md diff --git a/.claude/skills/_shared/SKILL-DESIGN-SPEC.md b/.claude/skills/_shared/SKILL-DESIGN-SPEC.md index d61d5dd4..a00a0630 100644 --- a/.claude/skills/_shared/SKILL-DESIGN-SPEC.md +++ b/.claude/skills/_shared/SKILL-DESIGN-SPEC.md @@ -140,7 +140,7 @@ graph TD --- name: {skill-name} description: {一句话描述}. {触发关键词}. Triggers on "{关键词1}", "{关键词2}". -allowed-tools: Task, AskUserQuestion, Read, Bash, Glob, Grep, Write, {其他MCP工具} +allowed-tools: Agent, AskUserQuestion, Read, Bash, Glob, Grep, Write, {其他MCP工具} --- # {Skill 标题} @@ -192,7 +192,7 @@ description: | # 必需:描述 + 触发词 Generate XXX documents. Triggers on "keyword1", "keyword2". allowed-tools: | # 必需:允许使用的工具 - Task, AskUserQuestion, Read, Bash, + Agent, AskUserQuestion, Read, Bash, Glob, Grep, Write, mcp__chrome__* --- ``` @@ -641,7 +641,7 @@ touch my-skill/templates/agent-base.md --- name: my-skill description: Generate XXX. Triggers on "keyword1", "keyword2". -allowed-tools: Task, AskUserQuestion, Read, Bash, Glob, Grep, Write +allowed-tools: Agent, AskUserQuestion, Read, Bash, Glob, Grep, Write --- # My Skill @@ -680,7 +680,7 @@ Generate XXX through multi-phase analysis. | 工具 | 用途 | 适用 Skill | |------|------|------------| -| `Task` | 启动子 Agent | 所有 | +| `Agent` | 启动子 Agent | 所有 | | `AskUserQuestion` | 用户交互 | 所有 | | `Read/Write/Glob/Grep` | 文件操作 | 所有 | | `Bash` | 脚本执行 | 需要自动化 | diff --git a/.claude/skills/brainstorm/SKILL.md b/.claude/skills/brainstorm/SKILL.md index 62967cca..3b477c94 100644 --- a/.claude/skills/brainstorm/SKILL.md +++ b/.claude/skills/brainstorm/SKILL.md @@ -1,7 +1,7 @@ --- name: brainstorm description: Unified brainstorming skill with dual-mode operation - auto pipeline and single role analysis. Triggers on "brainstorm", "头脑风暴". -allowed-tools: Skill(*), Task(conceptual-planning-agent, context-search-agent), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Glob(*), Bash(*) +allowed-tools: Skill(*), Agent(conceptual-planning-agent, context-search-agent), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Glob(*), Bash(*) --- # Brainstorm diff --git a/.claude/skills/issue-manage/SKILL.md b/.claude/skills/issue-manage/SKILL.md index 4aa840f6..9fc8938c 100644 --- a/.claude/skills/issue-manage/SKILL.md +++ b/.claude/skills/issue-manage/SKILL.md @@ -1,7 +1,7 @@ --- name: issue-manage description: Interactive issue management with menu-driven CRUD operations. Use when managing issues, viewing issue status, editing issue fields, performing bulk operations, or viewing issue history. Triggers on "manage issue", "list issues", "edit issue", "delete issue", "bulk update", "issue dashboard", "issue history", "completed issues". -allowed-tools: Bash, Read, Write, AskUserQuestion, Task, Glob +allowed-tools: Bash, Read, Write, AskUserQuestion, Agent, Glob --- # Issue Management Skill @@ -219,9 +219,8 @@ const action = AskUserQuestion({ header: 'Action', options: [ { label: 'List Issues', description: 'Browse active issues' }, - { label: 'View Issue', description: 'Detail view' }, + { label: 'View Issue', description: 'Detail view (includes history)' }, { label: 'Edit Issue', description: 'Modify fields' }, - { label: 'View History', description: 'Completed issues' }, { label: 'Bulk Operations', description: 'Batch actions' } ] }] diff --git a/.claude/skills/memory-manage/SKILL.md b/.claude/skills/memory-manage/SKILL.md index ef6f54c2..088812a9 100644 --- a/.claude/skills/memory-manage/SKILL.md +++ b/.claude/skills/memory-manage/SKILL.md @@ -1,7 +1,7 @@ --- name: memory-manage description: Unified memory management - CLAUDE.md updates and documentation generation with interactive routing. Triggers on "memory manage", "update claude", "update memory", "generate docs", "更新记忆", "生成文档". -allowed-tools: Task(*), Bash(*), AskUserQuestion(*), Read(*) +allowed-tools: Agent(*), Bash(*), AskUserQuestion(*), Read(*) --- # Memory Management Skill diff --git a/.claude/skills/review-code/SKILL.md b/.claude/skills/review-code/SKILL.md index 33bdef70..ba657f32 100644 --- a/.claude/skills/review-code/SKILL.md +++ b/.claude/skills/review-code/SKILL.md @@ -1,7 +1,7 @@ --- name: review-code description: Multi-dimensional code review with structured reports. Analyzes correctness, readability, performance, security, testing, and architecture. Triggers on "review code", "code review", "审查代码", "代码审查". -allowed-tools: Task, AskUserQuestion, Read, Write, Glob, Grep, Bash, mcp__ace-tool__search_context, mcp__ide__getDiagnostics +allowed-tools: Agent, AskUserQuestion, Read, Write, Glob, Grep, Bash, mcp__ace-tool__search_context, mcp__ide__getDiagnostics --- # Review Code diff --git a/.claude/skills/review-code/phases/orchestrator.md b/.claude/skills/review-code/phases/orchestrator.md index 94c619c6..8275e540 100644 --- a/.claude/skills/review-code/phases/orchestrator.md +++ b/.claude/skills/review-code/phases/orchestrator.md @@ -132,8 +132,9 @@ async function runOrchestrator() { // 确定当前需要审查的维度(使用 StateManager) const currentDimension = StateManager.getNextDimension(state); - const result = await Task({ + const result = await Agent({ subagent_type: 'universal-executor', + description: `Execute code review action: ${actionId}`, run_in_background: false, prompt: ` [WORK_DIR] diff --git a/.claude/skills/review-cycle/SKILL.md b/.claude/skills/review-cycle/SKILL.md index 61e3cc23..432e8ea6 100644 --- a/.claude/skills/review-cycle/SKILL.md +++ b/.claude/skills/review-cycle/SKILL.md @@ -1,7 +1,7 @@ --- name: review-cycle description: Unified multi-dimensional code review with automated fix orchestration. Routes to session-based (git changes), module-based (path patterns), or fix mode. Triggers on "workflow:review-cycle", "workflow:review-session-cycle", "workflow:review-module-cycle", "workflow:review-cycle-fix". -allowed-tools: Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill +allowed-tools: Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill --- # Review Cycle diff --git a/.claude/skills/review-cycle/phases/review-fix.md b/.claude/skills/review-cycle/phases/review-fix.md index 9997e93c..71a2fba6 100644 --- a/.claude/skills/review-cycle/phases/review-fix.md +++ b/.claude/skills/review-cycle/phases/review-fix.md @@ -332,7 +332,7 @@ for (let i = 0; i < batches.length; i += MAX_PARALLEL) { // Launch agents in parallel (run_in_background=true) for (const batch of chunk) { - const taskId = Task({ + const taskId = Agent({ subagent_type: "cli-planning-agent", run_in_background: true, description: `Plan batch ${batch.batch_id}: ${batch.findings.length} findings`, @@ -386,7 +386,7 @@ for (let i = 1; i <= aggregatedPlan.groups.length; i++) { **Planning Agent (Batch Mode - Partial Plan Only)**: ```javascript -Task({ +Agent({ subagent_type: "cli-planning-agent", run_in_background: true, description: `Plan batch ${batch.batch_id}: ${batch.findings.length} findings`, @@ -488,7 +488,7 @@ Before finalizing outputs: **Execution Agent** (per group): ```javascript -Task({ +Agent({ subagent_type: "cli-execute-agent", description: `Fix ${group.findings.length} issues: ${group.group_name}`, prompt: ` diff --git a/.claude/skills/skill-generator/SKILL.md b/.claude/skills/skill-generator/SKILL.md index 5410bcc0..9a1dd06f 100644 --- a/.claude/skills/skill-generator/SKILL.md +++ b/.claude/skills/skill-generator/SKILL.md @@ -1,7 +1,7 @@ --- name: skill-generator description: Meta-skill for creating new Claude Code skills with configurable execution modes. Supports sequential (fixed order) and autonomous (stateless) phase patterns. Use for skill scaffolding, skill creation, or building new workflows. Triggers on "create skill", "new skill", "skill generator". -allowed-tools: Task, AskUserQuestion, Read, Bash, Glob, Grep, Write +allowed-tools: Agent, AskUserQuestion, Read, Bash, Glob, Grep, Write --- # Skill Generator diff --git a/.claude/skills/skill-generator/phases/03-phase-generation.md b/.claude/skills/skill-generator/phases/03-phase-generation.md index a9ec7624..1b5a8dc7 100644 --- a/.claude/skills/skill-generator/phases/03-phase-generation.md +++ b/.claude/skills/skill-generator/phases/03-phase-generation.md @@ -240,7 +240,7 @@ async function executePhase(phaseId, phaseConfig, workDir) { const phasePrompt = Read(\`\${skillDir}/phases/\${phaseId}.md\`); // Use Task to invoke Agent - const result = await Task({ + const result = await Agent({ subagent_type: phaseConfig.agent?.type || 'universal-executor', run_in_background: phaseConfig.agent?.run_in_background || false, prompt: \` @@ -573,7 +573,7 @@ async function runOrchestrator(workDir) { try { const actionPrompt = Read(\`\${skillDir}/phases/actions/\${actionId}.md\`); - const result = await Task({ + const result = await Agent({ subagent_type: 'universal-executor', run_in_background: false, prompt: \` diff --git a/.claude/skills/skill-generator/specs/cli-integration.md b/.claude/skills/skill-generator/specs/cli-integration.md index 6d57954f..73793e0b 100644 --- a/.claude/skills/skill-generator/specs/cli-integration.md +++ b/.claude/skills/skill-generator/specs/cli-integration.md @@ -12,7 +12,7 @@ Suitable for scenarios that need immediate results. ```javascript // Agent call - synchronous -const result = Task({ +const result = Agent({ subagent_type: 'universal-executor', prompt: 'Execute task...', run_in_background: false // Key: synchronous execution @@ -77,7 +77,7 @@ ccw cli -p "" --tool --mode General-purpose executor, the most commonly used agent type. ```javascript -Task({ +Agent({ subagent_type: 'universal-executor', prompt: ` Execute task: @@ -99,7 +99,7 @@ Execute task: Code exploration agent for quick codebase understanding. ```javascript -Task({ +Agent({ subagent_type: 'Explore', prompt: ` Explore src/ directory: @@ -123,7 +123,7 @@ Thoroughness: medium Deep code analysis agent. ```javascript -Task({ +Agent({ subagent_type: 'cli-explore-agent', prompt: ` Deep analysis of src/auth/ module: diff --git a/.claude/skills/skill-generator/templates/autonomous-orchestrator.md b/.claude/skills/skill-generator/templates/autonomous-orchestrator.md index c32f8a78..afb13b48 100644 --- a/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +++ b/.claude/skills/skill-generator/templates/autonomous-orchestrator.md @@ -111,7 +111,7 @@ async function runOrchestrator() { try { const actionPrompt = Read(\`phases/actions/${actionId}.md\`); - const result = await Task({ + const result = await Agent({ subagent_type: 'universal-executor', run_in_background: false, prompt: \` diff --git a/.claude/skills/skill-generator/templates/code-analysis-action.md b/.claude/skills/skill-generator/templates/code-analysis-action.md index 68e2bb39..e08a66ea 100644 --- a/.claude/skills/skill-generator/templates/code-analysis-action.md +++ b/.claude/skills/skill-generator/templates/code-analysis-action.md @@ -96,7 +96,7 @@ async function execute${toPascalCase(id)}(context) { \` : '// No MCP tools configured'} // 3. Launch Agent for in-depth analysis - const agentResult = await Task({ + const agentResult = await Agent({ subagent_type: '\${agent.type}', prompt: \` \${generateAgentPrompt(analysis_type, scope)} @@ -408,7 +408,7 @@ const semanticContext = await mcp__ace_tool__search_context({ }); // Use semantic search results as Agent input context -const agentResult = await Task({ +const agentResult = await Agent({ subagent_type: 'Explore', prompt: \` Based on following semantic search results, perform in-depth analysis: diff --git a/.claude/skills/skill-generator/templates/sequential-phase.md b/.claude/skills/skill-generator/templates/sequential-phase.md index 3cacf587..e6089316 100644 --- a/.claude/skills/skill-generator/templates/sequential-phase.md +++ b/.claude/skills/skill-generator/templates/sequential-phase.md @@ -274,7 +274,7 @@ const tasks = [ \`\`\`javascript const results = await Promise.all( tasks.map(task => - Task({ + Agent({ subagent_type: 'universal-executor', run_in_background: false, prompt: task.prompt diff --git a/.claude/skills/skill-generator/templates/skill-md.md b/.claude/skills/skill-generator/templates/skill-md.md index 4173f080..f2b8cb09 100644 --- a/.claude/skills/skill-generator/templates/skill-md.md +++ b/.claude/skills/skill-generator/templates/skill-md.md @@ -223,7 +223,7 @@ function filterDocsByPhase(specs, phase, phaseIndex) { --- name: api-docs-generator description: Generate API documentation from source code. Triggers on "generate api docs", "api documentation". -allowed-tools: Task, Read, Write, Glob, Grep, Bash +allowed-tools: Agent, Read, Write, Glob, Grep, Bash --- # API Docs Generator @@ -265,7 +265,7 @@ Phase 3: Generation → api-docs.md --- name: task-manager description: Interactive task management with CRUD operations. Triggers on "manage tasks", "task list". -allowed-tools: Task, AskUserQuestion, Read, Write +allowed-tools: Agent, AskUserQuestion, Read, Write --- # Task Manager diff --git a/.claude/skills/skill-tuning/SKILL.md b/.claude/skills/skill-tuning/SKILL.md index a4ed984d..28a7765c 100644 --- a/.claude/skills/skill-tuning/SKILL.md +++ b/.claude/skills/skill-tuning/SKILL.md @@ -1,7 +1,7 @@ --- name: skill-tuning description: Universal skill diagnosis and optimization tool. Detect and fix skill execution issues including context explosion, long-tail forgetting, data flow disruption, and agent coordination failures. Supports Gemini CLI for deep analysis. Triggers on "skill tuning", "tune skill", "skill diagnosis", "optimize skill", "skill debug". -allowed-tools: Task, AskUserQuestion, Read, Write, Bash, Glob, Grep, mcp__ace-tool__search_context +allowed-tools: Agent, AskUserQuestion, Read, Write, Bash, Glob, Grep, mcp__ace-tool__search_context --- # Skill Tuning diff --git a/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md b/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md index 8147f43f..8fdace84 100644 --- a/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md +++ b/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md @@ -193,7 +193,7 @@ async function execute(state, workDir) { type: 'agent_failure', severity: 'medium', location: { file: 'SKILL.md' }, - description: 'Task tool used but not declared in allowed-tools', + description: 'Agent tool used but not declared in allowed-tools', evidence: [`${totalCalls} Task calls found, but Task not in allowed-tools`], root_cause: 'Tool declaration mismatch', impact: 'May cause runtime permission issues', diff --git a/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md b/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md index 12463690..877a5d65 100644 --- a/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md +++ b/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md @@ -216,7 +216,7 @@ async function execute(state, workDir) { file: 'phases/*.md', action: 'modify', diff: `+ try { - const result = await Task({...}); + const result = await Agent({...}); + if (!result) throw new Error('Empty result'); + } catch (e) { + updateState({ errors: [...errors, e.message], error_count: error_count + 1 }); diff --git a/.claude/skills/skill-tuning/phases/orchestrator.md b/.claude/skills/skill-tuning/phases/orchestrator.md index fc0a1d9b..07198ce4 100644 --- a/.claude/skills/skill-tuning/phases/orchestrator.md +++ b/.claude/skills/skill-tuning/phases/orchestrator.md @@ -99,8 +99,9 @@ async function runOrchestrator(workDir) { target_skill: { name: state.target_skill.name, path: state.target_skill.path } }; - const result = await Task({ + const result = await Agent({ subagent_type: 'universal-executor', + description: `Execute skill-tuning action: ${actionId}`, run_in_background: false, prompt: ` [CONTEXT] diff --git a/.claude/skills/skill-tuning/specs/skill-authoring-principles.md b/.claude/skills/skill-tuning/specs/skill-authoring-principles.md index b73136dc..359d4a38 100644 --- a/.claude/skills/skill-tuning/specs/skill-authoring-principles.md +++ b/.claude/skills/skill-tuning/specs/skill-authoring-principles.md @@ -114,18 +114,21 @@ Write(`${workDir}/final-output.json`, finalResult); // 只存最终结果 // 上下文流转模式 async function executePhase(context) { const { previousResult, constraints, config } = context; - - const result = await Task({ + + const result = await Agent({ + subagent_type: 'universal-executor', + description: 'Execute phase with context passing', + run_in_background: false, prompt: ` [CONTEXT] Previous: ${JSON.stringify(previousResult)} Constraints: ${constraints.join(', ')} - + [TASK] Process and return result directly. ` }); - + return { ...context, currentResult: result, diff --git a/.claude/skills/skill-tuning/specs/tuning-strategies.md b/.claude/skills/skill-tuning/specs/tuning-strategies.md index 490e94c6..55a7add6 100644 --- a/.claude/skills/skill-tuning/specs/tuning-strategies.md +++ b/.claude/skills/skill-tuning/specs/tuning-strategies.md @@ -140,8 +140,10 @@ function updateHistory(state, newItem) { ```javascript // Add summarization before passing to next phase -const summary = await Task({ +const summary = await Agent({ subagent_type: 'universal-executor', + description: 'Summarize content for context compression', + run_in_background: false, prompt: `Summarize in <100 words: ${fullContent}\nReturn JSON: { summary, key_points[] }` }); nextPhasePrompt = `Previous summary: ${summary.summary}`; @@ -268,12 +270,17 @@ function validateAgentResult(result, requiredFields) { ### flatten_nesting ```javascript -// Before: Agent A's prompt tells it to call Task({subagent_type: 'B'}) +// Before: Agent A's prompt tells it to call Agent({subagent_type: 'B'}) // After: Agent A returns signal, orchestrator handles // Agent A: return { needs_agent_b: true, context: {...} } // Orchestrator: if (parsedA.needs_agent_b) { - resultB = await Task({ subagent_type: 'B', prompt: `Context: ${parsedA.context}` }); + resultB = await Agent({ + subagent_type: 'B', + description: 'Handle delegated task from Agent A', + run_in_background: false, + prompt: `Context: ${parsedA.context}` + }); } ``` diff --git a/.claude/skills/spec-generator/SKILL.md b/.claude/skills/spec-generator/SKILL.md index 8b2282cd..06a44972 100644 --- a/.claude/skills/spec-generator/SKILL.md +++ b/.claude/skills/spec-generator/SKILL.md @@ -1,7 +1,7 @@ --- name: spec-generator description: Specification generator - 6 phase document chain producing product brief, PRD, architecture, and epics. Triggers on "generate spec", "create specification", "spec generator", "workflow:spec". -allowed-tools: Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill +allowed-tools: Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill --- # Spec Generator diff --git a/.claude/skills/spec-generator/phases/01-discovery.md b/.claude/skills/spec-generator/phases/01-discovery.md index 387e9345..e9056afa 100644 --- a/.claude/skills/spec-generator/phases/01-discovery.md +++ b/.claude/skills/spec-generator/phases/01-discovery.md @@ -117,7 +117,7 @@ const hasCodebase = Glob('**/*.{ts,js,py,java,go,rs}').length > 0 || Glob('Cargo.toml').length > 0; if (hasCodebase) { - Task({ + Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: `Explore codebase for spec: ${slug}`, diff --git a/.claude/skills/team-arch-opt/SKILL.md b/.claude/skills/team-arch-opt/SKILL.md index 950a3d1d..0921f9b1 100644 --- a/.claude/skills/team-arch-opt/SKILL.md +++ b/.claude/skills/team-arch-opt/SKILL.md @@ -1,7 +1,7 @@ --- name: team-arch-opt description: Unified team skill for architecture optimization. Uses team-worker agent architecture with role-spec files for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team arch-opt". -allowed-tools: Task, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context +allowed-tools: Agent, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context --- # Team Architecture Optimization @@ -137,7 +137,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 worker", team_name: , @@ -361,7 +361,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(arch-opt) -> 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-arch-opt", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-arch-opt/roles/coordinator/commands/dispatch.md b/.claude/skills/team-arch-opt/roles/coordinator/commands/dispatch.md index c68cf64f..83f1bd5e 100644 --- a/.claude/skills/team-arch-opt/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-arch-opt/roles/coordinator/commands/dispatch.md @@ -27,7 +27,6 @@ Every task description uses structured format for clarity: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -43,10 +42,9 @@ EXPECTED: + CONSTRAINTS: --- InnerLoop: -BranchId: ", - blockedBy: [], - status: "pending" +BranchId: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -81,9 +79,9 @@ CONTEXT: EXPECTED: /artifacts/architecture-baseline.json + /artifacts/architecture-report.md | Quantified metrics with evidence CONSTRAINTS: Focus on | Analyze before any changes --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "ANALYZE-001", owner: "analyzer" }) ``` **DESIGN-001** (designer, Stage 2): @@ -105,10 +103,9 @@ CONTEXT: EXPECTED: /artifacts/refactoring-plan.md | Priority-ordered with structural improvement targets, discrete REFACTOR-IDs CONSTRAINTS: Focus on highest-impact refactorings | Risk assessment required | Non-overlapping file targets per REFACTOR-ID --- -InnerLoop: false", - blockedBy: ["ANALYZE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "DESIGN-001", addBlockedBy: ["ANALYZE-001"], owner: "designer" }) ``` **REFACTOR-001** (refactorer, Stage 3): @@ -130,10 +127,9 @@ CONTEXT: EXPECTED: Modified source files + validation passing | Refactorings applied without regressions CONSTRAINTS: Preserve existing behavior | Update all references | Follow code conventions --- -InnerLoop: true", - blockedBy: ["DESIGN-001"], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "REFACTOR-001", addBlockedBy: ["DESIGN-001"], owner: "refactorer" }) ``` **VALIDATE-001** (validator, Stage 4 - parallel): @@ -156,10 +152,9 @@ CONTEXT: EXPECTED: /artifacts/validation-results.json | Per-dimension validation with verdicts CONSTRAINTS: Must compare against baseline | Flag any regressions or broken imports --- -InnerLoop: false", - blockedBy: ["REFACTOR-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "VALIDATE-001", addBlockedBy: ["REFACTOR-001"], owner: "validator" }) ``` **REVIEW-001** (reviewer, Stage 4 - parallel): @@ -180,10 +175,9 @@ CONTEXT: EXPECTED: /artifacts/review-report.md | Per-dimension findings with severity CONSTRAINTS: Focus on refactoring changes only | Provide specific file:line references --- -InnerLoop: false", - blockedBy: ["REFACTOR-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "REVIEW-001", addBlockedBy: ["REFACTOR-001"], owner: "reviewer" }) ``` --- @@ -210,11 +204,15 @@ For each target index `i` (0-based), with prefix char `P = pipeline_prefix_chars // Create session subdirectory for this pipeline Bash("mkdir -p /artifacts/pipelines/

") -TaskCreate({ subject: "ANALYZE-

01", ... }) // blockedBy: [] -TaskCreate({ subject: "DESIGN-

01", ... }) // blockedBy: ["ANALYZE-

01"] -TaskCreate({ subject: "REFACTOR-

01", ... }) // blockedBy: ["DESIGN-

01"] -TaskCreate({ subject: "VALIDATE-

01", ... }) // blockedBy: ["REFACTOR-

01"] -TaskCreate({ subject: "REVIEW-

01", ... }) // blockedBy: ["REFACTOR-

01"] +TaskCreate({ subject: "ANALYZE-

01", ... }) +TaskCreate({ subject: "DESIGN-

01", ... }) +TaskUpdate({ taskId: "DESIGN-

01", addBlockedBy: ["ANALYZE-

01"] }) +TaskCreate({ subject: "REFACTOR-

01", ... }) +TaskUpdate({ taskId: "REFACTOR-

01", addBlockedBy: ["DESIGN-

01"] }) +TaskCreate({ subject: "VALIDATE-

01", ... }) +TaskUpdate({ taskId: "VALIDATE-

01", addBlockedBy: ["REFACTOR-

01"] }) +TaskCreate({ subject: "REVIEW-

01", ... }) +TaskUpdate({ taskId: "REVIEW-

01", addBlockedBy: ["REFACTOR-

01"] }) ``` Task descriptions follow same template as single mode, with additions: @@ -241,9 +239,9 @@ EXPECTED: /artifacts/pipelines/A/architecture-baseline.json + architect CONSTRAINTS: Focus on auth module scope --- InnerLoop: false -PipelineId: A", - status: "pending" +PipelineId: A" }) +TaskUpdate({ taskId: "ANALYZE-A01", owner: "analyzer" }) ``` --- @@ -298,10 +296,9 @@ EXPECTED: Modified source files for REFACTOR-{NNN} only CONSTRAINTS: Only implement this branch's refactoring | Do not touch files outside REFACTOR-{NNN} scope --- InnerLoop: false -BranchId: B{NN}", - blockedBy: ["DESIGN-001"], - status: "pending" +BranchId: B{NN}" }) +TaskUpdate({ taskId: "REFACTOR-B{NN}", addBlockedBy: ["DESIGN-001"], owner: "refactorer" }) TaskCreate({ subject: "VALIDATE-B{NN}", @@ -319,10 +316,9 @@ EXPECTED: /artifacts/branches/B{NN}/validation-results.json CONSTRAINTS: Only validate this branch's changes --- InnerLoop: false -BranchId: B{NN}", - blockedBy: ["REFACTOR-B{NN}"], - status: "pending" +BranchId: B{NN}" }) +TaskUpdate({ taskId: "VALIDATE-B{NN}", addBlockedBy: ["REFACTOR-B{NN}"], owner: "validator" }) TaskCreate({ subject: "REVIEW-B{NN}", @@ -340,10 +336,9 @@ EXPECTED: /artifacts/branches/B{NN}/review-report.md CONSTRAINTS: Only review this branch's changes --- InnerLoop: false -BranchId: B{NN}", - blockedBy: ["REFACTOR-B{NN}"], - status: "pending" +BranchId: B{NN}" }) +TaskUpdate({ taskId: "REVIEW-B{NN}", addBlockedBy: ["REFACTOR-B{NN}"], owner: "reviewer" }) ``` 7. Update session.json: diff --git a/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md b/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md index cea2bf92..37239192 100644 --- a/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md @@ -65,7 +65,7 @@ Find and spawn the next ready tasks. 2. For each ready task, spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "arch-opt", @@ -171,10 +171,9 @@ EXPECTED: Fixed source files for B{NN} only CONSTRAINTS: Targeted fixes only | Do not touch other branches --- InnerLoop: false -BranchId: B{NN}", - blockedBy: [], - status: "pending" +BranchId: B{NN}" }) +TaskUpdate({ taskId: "FIX-B{NN}-{cycle}", owner: "refactorer" }) ``` Create new VALIDATE and REVIEW with retry suffix: @@ -186,9 +185,8 @@ Create new VALIDATE and REVIEW with retry suffix: TaskCreate({ subject: "FIX-{P}01-{cycle}", ...same pattern with pipeline prefix... - blockedBy: [], - status: "pending" }) +TaskUpdate({ taskId: "FIX-{P}01-{cycle}", owner: "refactorer" }) ``` Create `VALIDATE-{P}01-R{cycle}` and `REVIEW-{P}01-R{cycle}`. diff --git a/.claude/skills/team-arch-opt/roles/coordinator/role.md b/.claude/skills/team-arch-opt/roles/coordinator/role.md index c44f82d6..5772a8c3 100644 --- a/.claude/skills/team-arch-opt/roles/coordinator/role.md +++ b/.claude/skills/team-arch-opt/roles/coordinator/role.md @@ -229,7 +229,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 analyzer worker", team_name: "arch-opt", @@ -298,6 +298,6 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("arch-opt") -> 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-arch-opt', args='resume')" | | Export Results | AskUserQuestion for target directory -> copy all artifacts -> Archive & Clean flow | diff --git a/.claude/skills/team-arch-opt/subagents/discuss-subagent.md b/.claude/skills/team-arch-opt/subagents/discuss-subagent.md index 1e7a590f..71df3b1c 100644 --- a/.claude/skills/team-arch-opt/subagents/discuss-subagent.md +++ b/.claude/skills/team-arch-opt/subagents/discuss-subagent.md @@ -11,7 +11,7 @@ Complex refactoring decisions (e.g., choosing between dependency inversion vs me Called by designer, reviewer after their primary analysis when complexity warrants multi-perspective evaluation: ``` -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: "Discuss : for architecture optimization", diff --git a/.claude/skills/team-arch-opt/subagents/explore-subagent.md b/.claude/skills/team-arch-opt/subagents/explore-subagent.md index 87d8c79a..8ab89eac 100644 --- a/.claude/skills/team-arch-opt/subagents/explore-subagent.md +++ b/.claude/skills/team-arch-opt/subagents/explore-subagent.md @@ -11,7 +11,7 @@ Codebase exploration is a read-only operation shared between analyzer (mapping s Called by analyzer, refactorer after needing codebase context for architecture analysis or implementation: ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore codebase for architecture-critical structures in ", diff --git a/.claude/skills/team-brainstorm/SKILL.md b/.claude/skills/team-brainstorm/SKILL.md index 61345aa6..e4266cbf 100644 --- a/.claude/skills/team-brainstorm/SKILL.md +++ b/.claude/skills/team-brainstorm/SKILL.md @@ -1,7 +1,7 @@ --- name: team-brainstorm description: Unified team skill for brainstorming team. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team brainstorm". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Brainstorm @@ -306,7 +306,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 worker", team_name: "brainstorm", @@ -338,7 +338,7 @@ Execute built-in Phase 1 (task discovery) -> role-spec Phase 2-4 -> built-in Pha | Quick/Deep pipeline (single ideator) | Standard spawn: single `ideator` team-worker agent | ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn ideator- worker", team_name: "brainstorm", @@ -384,7 +384,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(brainstorm) -> 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-brainstorm", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-brainstorm/roles/coordinator/commands/dispatch.md b/.claude/skills/team-brainstorm/roles/coordinator/commands/dispatch.md index 844d248f..de31c584 100644 --- a/.claude/skills/team-brainstorm/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-brainstorm/roles/coordinator/commands/dispatch.md @@ -23,7 +23,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -37,10 +36,9 @@ CONTEXT: EXPECTED: + CONSTRAINTS: --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Pipeline Router @@ -59,7 +57,6 @@ InnerLoop: false", ``` TaskCreate({ subject: "IDEA-001", - owner: "ideator", description: "PURPOSE: Generate multi-angle ideas for brainstorm topic | Success: >= 6 unique ideas across all angles TASK: - Read topic and angles from session context @@ -72,17 +69,15 @@ CONTEXT: EXPECTED: /ideas/idea-001.md with >= 6 ideas CONSTRAINTS: Divergent thinking only, no evaluation --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "IDEA-001", owner: "ideator" }) ``` **CHALLENGE-001** (challenger): ``` TaskCreate({ subject: "CHALLENGE-001", - owner: "challenger", description: "PURPOSE: Challenge assumptions and assess feasibility of generated ideas | Success: Each idea rated by severity TASK: - Read all idea files from ideas/ directory @@ -95,17 +90,15 @@ CONTEXT: EXPECTED: /critiques/critique-001.md with severity table and GC signal CONSTRAINTS: Critical analysis only, do not generate alternative ideas --- -InnerLoop: false", - blockedBy: ["IDEA-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "CHALLENGE-001", addBlockedBy: ["IDEA-001"], owner: "challenger" }) ``` **SYNTH-001** (synthesizer): ``` TaskCreate({ subject: "SYNTH-001", - owner: "synthesizer", description: "PURPOSE: Synthesize ideas and critiques into integrated proposals | Success: >= 1 consolidated proposal TASK: - Read all ideas and critiques @@ -117,10 +110,9 @@ CONTEXT: EXPECTED: /synthesis/synthesis-001.md with proposals CONSTRAINTS: Integration and synthesis only, no new ideas --- -InnerLoop: false", - blockedBy: ["CHALLENGE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SYNTH-001", addBlockedBy: ["CHALLENGE-001"], owner: "synthesizer" }) ``` ### Deep Pipeline @@ -131,7 +123,6 @@ Creates all 6 tasks. First 2 same as Quick, then: ``` TaskCreate({ subject: "IDEA-002", - owner: "ideator", description: "PURPOSE: Revise ideas based on critique feedback (GC Round 1) | Success: HIGH/CRITICAL challenges addressed TASK: - Read critique feedback from critiques/ @@ -143,17 +134,15 @@ CONTEXT: EXPECTED: /ideas/idea-002.md with revised ideas CONSTRAINTS: Address critique only, focused revision --- -InnerLoop: false", - blockedBy: ["CHALLENGE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "IDEA-002", addBlockedBy: ["CHALLENGE-001"], owner: "ideator" }) ``` **CHALLENGE-002** (challenger, round 2): ``` TaskCreate({ subject: "CHALLENGE-002", - owner: "challenger", description: "PURPOSE: Validate revised ideas (GC Round 2) | Success: Severity assessment of revised ideas TASK: - Read revised idea files @@ -165,10 +154,9 @@ CONTEXT: EXPECTED: /critiques/critique-002.md CONSTRAINTS: Focus on revised/new ideas --- -InnerLoop: false", - blockedBy: ["IDEA-002"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "CHALLENGE-002", addBlockedBy: ["IDEA-002"], owner: "challenger" }) ``` **SYNTH-001** blocked by CHALLENGE-002. **EVAL-001** blocked by SYNTH-001: @@ -176,7 +164,6 @@ InnerLoop: false", ``` TaskCreate({ subject: "EVAL-001", - owner: "evaluator", description: "PURPOSE: Score and rank synthesized proposals | Success: Ranked list with weighted scores TASK: - Read synthesis results @@ -188,10 +175,9 @@ CONTEXT: EXPECTED: /evaluation/evaluation-001.md with scoring matrix CONSTRAINTS: Evaluation only, no new proposals --- -InnerLoop: false", - blockedBy: ["SYNTH-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "EVAL-001", addBlockedBy: ["SYNTH-001"], owner: "evaluator" }) ``` ### Full Pipeline diff --git a/.claude/skills/team-brainstorm/roles/coordinator/commands/monitor.md b/.claude/skills/team-brainstorm/roles/coordinator/commands/monitor.md index 9f4f25f0..6d93ecf8 100644 --- a/.claude/skills/team-brainstorm/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-brainstorm/roles/coordinator/commands/monitor.md @@ -74,7 +74,7 @@ Find and spawn the next ready tasks. 2. For each ready task, spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "brainstorm", diff --git a/.claude/skills/team-brainstorm/roles/coordinator/role.md b/.claude/skills/team-brainstorm/roles/coordinator/role.md index 2cada1cd..92daacc6 100644 --- a/.claude/skills/team-brainstorm/roles/coordinator/role.md +++ b/.claude/skills/team-brainstorm/roles/coordinator/role.md @@ -231,7 +231,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol): Find first unblocked task(s) and spawn worker(s): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn ideator worker", team_name: "brainstorm", @@ -255,7 +255,7 @@ For **Full pipeline** with parallel ideators, spawn N team-worker agents: ``` // For each parallel IDEA task (IDEA-001, IDEA-002, IDEA-003) -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn ideator worker for IDEA-", team_name: "brainstorm", @@ -316,6 +316,6 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("brainstorm") -> 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-brainstorm', args='resume')" | | Export Results | AskUserQuestion for target directory -> copy all artifacts -> Archive & Clean flow | diff --git a/.claude/skills/team-coordinate/SKILL.md b/.claude/skills/team-coordinate/SKILL.md index 9fae2d7c..aea69cb4 100644 --- a/.claude/skills/team-coordinate/SKILL.md +++ b/.claude/skills/team-coordinate/SKILL.md @@ -1,7 +1,7 @@ --- name: team-coordinate description: Universal team coordination skill with dynamic role generation. Uses team-worker agent architecture with role-spec files. Only coordinator is built-in -- all worker roles are generated at runtime as role-specs and spawned via team-worker agent. Beat/cadence model for orchestration. Triggers on "Team Coordinate ". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Coordinate @@ -93,7 +93,7 @@ User provides task description When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: , diff --git a/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md b/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md index e1cf4690..03829307 100644 --- a/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md @@ -25,7 +25,6 @@ Create task chains from dynamic dependency graphs. Builds pipelines from the tas ``` TaskCreate({ subject: "-", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -40,10 +39,9 @@ EXPECTED: + CONSTRAINTS: --- InnerLoop: -RoleSpec: /role-specs/.md", - blockedBy: [], - status: "pending" +RoleSpec: /role-specs/.md" }) +TaskUpdate({ taskId: "-", addBlockedBy: [], owner: "" }) ``` 5. **Update team-session.json** with pipeline and tasks_total diff --git a/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md b/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md index d8983e36..7df6b2d9 100644 --- a/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md @@ -141,7 +141,7 @@ Ready tasks found? **Spawn worker tool call** (one per ready task): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: , @@ -190,7 +190,7 @@ All tasks completed (no pending, no in_progress) | }) | +- "Archive & Clean": | | Update session status="completed" - | | TeamDelete() + | | TeamDelete() | | Output final summary with artifact paths | +- "Keep Active": | | Update session status="paused" diff --git a/.claude/skills/team-coordinate/subagents/discuss-subagent.md b/.claude/skills/team-coordinate/subagents/discuss-subagent.md index fff00818..e9bd026c 100644 --- a/.claude/skills/team-coordinate/subagents/discuss-subagent.md +++ b/.claude/skills/team-coordinate/subagents/discuss-subagent.md @@ -11,7 +11,7 @@ Unlike team-lifecycle-v4's fixed perspective definitions (product, technical, qu Called by roles after artifact creation: ``` -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: "Discuss ", diff --git a/.claude/skills/team-coordinate/subagents/explore-subagent.md b/.claude/skills/team-coordinate/subagents/explore-subagent.md index e934f7ed..a6daad2b 100644 --- a/.claude/skills/team-coordinate/subagents/explore-subagent.md +++ b/.claude/skills/team-coordinate/subagents/explore-subagent.md @@ -5,7 +5,7 @@ Shared codebase exploration utility with centralized caching. Callable by any ro ## Invocation ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore ", diff --git a/.claude/skills/team-executor/SKILL.md b/.claude/skills/team-executor/SKILL.md index ef000deb..e498e23d 100644 --- a/.claude/skills/team-executor/SKILL.md +++ b/.claude/skills/team-executor/SKILL.md @@ -1,7 +1,7 @@ --- name: team-executor description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Executor @@ -107,7 +107,7 @@ Validate session When executor spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: , diff --git a/.claude/skills/team-executor/roles/executor/commands/monitor.md b/.claude/skills/team-executor/roles/executor/commands/monitor.md index 31f42cc3..3c6e7bb1 100644 --- a/.claude/skills/team-executor/roles/executor/commands/monitor.md +++ b/.claude/skills/team-executor/roles/executor/commands/monitor.md @@ -135,7 +135,7 @@ Ready tasks found? **Spawn worker tool call**: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: , diff --git a/.claude/skills/team-executor/specs/session-schema.md b/.claude/skills/team-executor/specs/session-schema.md index 91d75e53..323b7925 100644 --- a/.claude/skills/team-executor/specs/session-schema.md +++ b/.claude/skills/team-executor/specs/session-schema.md @@ -121,7 +121,7 @@ team-executor validates the following before execution: | `session_id` | string | Unique session identifier | | `task_description` | string | Original task description from user | | `status` | string | One of: "active", "paused", "completed" | -| `team_name` | string | Team name for Task tool | +| `team_name` | string | Team name for Agent tool | | `roles` | array | List of role definitions | | `roles[].name` | string | Role name (must match .md filename) | | `roles[].prefix` | string | Task prefix for this role | diff --git a/.claude/skills/team-frontend/SKILL.md b/.claude/skills/team-frontend/SKILL.md index 1d3adbff..2be71a9a 100644 --- a/.claude/skills/team-frontend/SKILL.md +++ b/.claude/skills/team-frontend/SKILL.md @@ -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 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 | diff --git a/.claude/skills/team-frontend/roles/coordinator/commands/dispatch.md b/.claude/skills/team-frontend/roles/coordinator/commands/dispatch.md index 717f14e0..b0e1ba30 100644 --- a/.claude/skills/team-frontend/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-frontend/roles/coordinator/commands/dispatch.md @@ -25,7 +25,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -38,10 +37,9 @@ CONTEXT: - Upstream artifacts: , - Shared memory: /.msg/meta.json EXPECTED: + -CONSTRAINTS: ", - blockedBy: [], - status: "pending" +CONSTRAINTS: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -72,9 +70,9 @@ CONTEXT: - Scope: - Shared memory: /.msg/meta.json EXPECTED: /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: /.msg/meta.json EXPECTED: /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: /.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: /.msg/meta.json EXPECTED: /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" }) ``` --- diff --git a/.claude/skills/team-frontend/roles/coordinator/commands/monitor.md b/.claude/skills/team-frontend/roles/coordinator/commands/monitor.md index 854607de..cdb844ac 100644 --- a/.claude/skills/team-frontend/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-frontend/roles/coordinator/commands/monitor.md @@ -69,10 +69,9 @@ CONTEXT: - Upstream artifacts: /qa/audit-.md - Shared memory: /.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-", owner: "developer" }) TaskCreate({ subject: "QA-recheck-", @@ -86,10 +85,9 @@ CONTEXT: - Review type: code-review - Shared memory: /.msg/meta.json EXPECTED: /qa/audit-.md | Improved score -CONSTRAINTS: Read-only review", - blockedBy: ["DEV-fix-"], - status: "pending" +CONSTRAINTS: Read-only review" }) +TaskUpdate({ taskId: "QA-recheck-", addBlockedBy: ["DEV-fix-"], 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 worker for ", team_name: "frontend", diff --git a/.claude/skills/team-frontend/roles/coordinator/role.md b/.claude/skills/team-frontend/roles/coordinator/role.md index 33cad6b5..96a889fd 100644 --- a/.claude/skills/team-frontend/roles/coordinator/role.md +++ b/.claude/skills/team-frontend/roles/coordinator/role.md @@ -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 | diff --git a/.claude/skills/team-issue/SKILL.md b/.claude/skills/team-issue/SKILL.md index 1cf638c9..d29bd4b7 100644 --- a/.claude/skills/team-issue/SKILL.md +++ b/.claude/skills/team-issue/SKILL.md @@ -1,7 +1,7 @@ --- name: team-issue description: Unified team skill for issue resolution. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team issue". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Issue Resolution @@ -301,7 +301,7 @@ Beat 1 2 3 4 5 When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "issue", @@ -344,7 +344,7 @@ Execute built-in Phase 1 (task discovery) -> role-spec Phase 2-4 -> built-in Pha **Parallel spawn template**: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn - worker", team_name: "issue", @@ -390,7 +390,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(issue) -> 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-issue", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-issue/role-specs/explorer.md b/.claude/skills/team-issue/role-specs/explorer.md index 753975b5..18bd7934 100644 --- a/.claude/skills/team-issue/role-specs/explorer.md +++ b/.claude/skills/team-issue/role-specs/explorer.md @@ -53,7 +53,7 @@ Bash("ccw issue status --json") | Complexity | Execution | |------------|-----------| | Low | Direct ACE search: `mcp__ace-tool__search_context(project_root_path, query)` | -| Medium/High | Spawn cli-explore-agent: `Task({ subagent_type: "cli-explore-agent", run_in_background: false })` | +| Medium/High | Spawn cli-explore-agent: `Agent({ subagent_type: "cli-explore-agent", run_in_background: false })` | **cli-explore-agent prompt template**: diff --git a/.claude/skills/team-issue/role-specs/implementer.md b/.claude/skills/team-issue/role-specs/implementer.md index 79bef5d1..91d02fed 100644 --- a/.claude/skills/team-issue/role-specs/implementer.md +++ b/.claude/skills/team-issue/role-specs/implementer.md @@ -15,7 +15,7 @@ Load solution plan, route to execution backend (Agent/Codex/Gemini), run tests, | Backend | Condition | Method | |---------|-----------|--------| -| agent | task_count <= 3 or explicit | `Task({ subagent_type: "code-developer", run_in_background: false })` | +| agent | task_count <= 3 or explicit | `Agent({ subagent_type: "code-developer", run_in_background: false })` | | codex | task_count > 3 or explicit | `ccw cli --tool codex --mode write --id issue-` | | gemini | explicit | `ccw cli --tool gemini --mode write --id issue-` | @@ -69,7 +69,7 @@ Dependencies: ``` Route by executor: -- **agent**: `Task({ subagent_type: "code-developer", run_in_background: false, prompt: })` +- **agent**: `Agent({ subagent_type: "code-developer", run_in_background: false, prompt: })` - **codex**: `Bash("ccw cli -p \"\" --tool codex --mode write --id issue-")` - **gemini**: `Bash("ccw cli -p \"\" --tool gemini --mode write --id issue-")` diff --git a/.claude/skills/team-issue/role-specs/integrator.md b/.claude/skills/team-issue/role-specs/integrator.md index 8df37f30..8cf7c28f 100644 --- a/.claude/skills/team-issue/role-specs/integrator.md +++ b/.claude/skills/team-issue/role-specs/integrator.md @@ -39,7 +39,7 @@ Bash("ccw issue solutions --json") **Agent invocation**: ``` -Task({ +Agent({ subagent_type: "issue-queue-agent", run_in_background: false, description: "Form queue for issues", diff --git a/.claude/skills/team-issue/role-specs/planner.md b/.claude/skills/team-issue/role-specs/planner.md index b3588a70..b30fc5cc 100644 --- a/.claude/skills/team-issue/role-specs/planner.md +++ b/.claude/skills/team-issue/role-specs/planner.md @@ -40,7 +40,7 @@ Read("/explorations/context-.json") **Agent invocation**: ``` -Task({ +Agent({ subagent_type: "issue-plan-agent", run_in_background: false, description: "Plan solution for ", diff --git a/.claude/skills/team-issue/roles/coordinator/commands/dispatch.md b/.claude/skills/team-issue/roles/coordinator/commands/dispatch.md index 6672d7ec..1fb39d80 100644 --- a/.claude/skills/team-issue/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-issue/roles/coordinator/commands/dispatch.md @@ -25,7 +25,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -40,10 +39,9 @@ CONSTRAINTS: --- InnerLoop: false execution_method: -code_review: ", - blockedBy: [], - status: "pending" +code_review: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Pipeline Router @@ -62,7 +60,6 @@ code_review: ", ``` TaskCreate({ subject: "EXPLORE-001", - owner: "explorer", description: "PURPOSE: Analyze issue context and map codebase impact | Success: Context report with relevant files and dependencies TASK: - Load issue details via ccw issue status @@ -74,17 +71,15 @@ CONTEXT: EXPECTED: /explorations/context-.json with relevant files, dependencies, and impact assessment CONSTRAINTS: Exploration and analysis only, no solution design --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "EXPLORE-001", owner: "explorer" }) ``` **SOLVE-001** (planner): ``` TaskCreate({ subject: "SOLVE-001", - owner: "planner", description: "PURPOSE: Design solution and decompose into implementation tasks | Success: Bound solution with task decomposition TASK: - Load explorer context report @@ -97,17 +92,15 @@ CONTEXT: EXPECTED: /solutions/solution-.json with solution plan and task list CONSTRAINTS: Solution design only, no code implementation --- -InnerLoop: false", - blockedBy: ["EXPLORE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SOLVE-001", addBlockedBy: ["EXPLORE-001"], owner: "planner" }) ``` **MARSHAL-001** (integrator): ``` TaskCreate({ subject: "MARSHAL-001", - owner: "integrator", description: "PURPOSE: Form execution queue with conflict detection and ordering | Success: Execution queue file with resolved conflicts TASK: - Verify all issues have bound solutions @@ -120,17 +113,15 @@ CONTEXT: EXPECTED: .workflow/issues/queue/execution-queue.json with queue, conflicts, parallel groups CONSTRAINTS: Queue formation only, no implementation --- -InnerLoop: false", - blockedBy: ["SOLVE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "MARSHAL-001", addBlockedBy: ["SOLVE-001"], owner: "integrator" }) ``` **BUILD-001** (implementer): ``` TaskCreate({ subject: "BUILD-001", - owner: "implementer", description: "PURPOSE: Implement solution plan and verify with tests | Success: Code changes committed, tests pass TASK: - Load bound solution and explorer context @@ -146,10 +137,9 @@ CONSTRAINTS: Follow solution plan, no scope creep --- InnerLoop: false execution_method: -code_review: ", - blockedBy: ["MARSHAL-001"], - status: "pending" +code_review: " }) +TaskUpdate({ taskId: "BUILD-001", addBlockedBy: ["MARSHAL-001"], owner: "implementer" }) ``` ### Full Pipeline @@ -162,7 +152,6 @@ Creates 5 tasks. First 2 same as Quick, then AUDIT gate before MARSHAL and BUILD ``` TaskCreate({ subject: "AUDIT-001", - owner: "reviewer", description: "PURPOSE: Review solution for technical feasibility, risk, and completeness | Success: Clear verdict (approved/rejected/concerns) with scores TASK: - Load explorer context and bound solution @@ -175,10 +164,9 @@ CONTEXT: EXPECTED: /audits/audit-report.json with per-issue scores and overall verdict CONSTRAINTS: Review only, do not modify solutions --- -InnerLoop: false", - blockedBy: ["SOLVE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "AUDIT-001", addBlockedBy: ["SOLVE-001"], owner: "reviewer" }) ``` **MARSHAL-001** (integrator): Same as Quick, but `blockedBy: ["AUDIT-001"]`. @@ -201,7 +189,6 @@ For each issue in issue_ids, create an EXPLORE task. When N > 1, assign distinct ``` TaskCreate({ subject: "EXPLORE-", - owner: "explorer-", description: "PURPOSE: Analyze issue context and map codebase impact | Success: Context report for TASK: - Load issue details for @@ -213,20 +200,18 @@ CONTEXT: EXPECTED: /explorations/context-.json CONSTRAINTS: Single issue scope, exploration only --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "EXPLORE-", owner: "explorer-" }) ``` **SOLVE-001..N** (planner, sequential after all EXPLORE): -For each issue, create a SOLVE task blocked by all EXPLORE tasks: +For each issue, create a SOLVE task blocked by all EXPLORE tasks ``` TaskCreate({ subject: "SOLVE-", - owner: "planner", description: "PURPOSE: Design solution for | Success: Bound solution with tasks TASK: - Load explorer context for @@ -239,17 +224,15 @@ CONTEXT: EXPECTED: /solutions/solution-.json CONSTRAINTS: Solution design only --- -InnerLoop: false", - blockedBy: ["EXPLORE-001", ..., "EXPLORE-"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SOLVE-", addBlockedBy: ["EXPLORE-001", ..., "EXPLORE-"], owner: "planner" }) ``` **AUDIT-001** (reviewer, batch review): ``` TaskCreate({ subject: "AUDIT-001", - owner: "reviewer", description: "PURPOSE: Batch review all solutions | Success: Verdict for each solution TASK: - Load all explorer contexts and bound solutions @@ -262,10 +245,9 @@ CONTEXT: EXPECTED: /audits/audit-report.json with batch results CONSTRAINTS: Review only --- -InnerLoop: false", - blockedBy: ["SOLVE-001", ..., "SOLVE-"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "AUDIT-001", addBlockedBy: ["SOLVE-001", ..., "SOLVE-"], owner: "reviewer" }) ``` **MARSHAL-001** (integrator): `blockedBy: ["AUDIT-001"]`. @@ -282,7 +264,6 @@ After MARSHAL produces execution queue, create M BUILD tasks based on parallel g ``` TaskCreate({ subject: "BUILD-", - owner: "implementer-", description: "PURPOSE: Implement solution for | Success: Code committed, tests pass TASK: - Load bound solution and explorer context @@ -297,10 +278,9 @@ CONSTRAINTS: Follow solution plan --- InnerLoop: false execution_method: -code_review: ", - blockedBy: ["MARSHAL-001"], - status: "pending" +code_review: " }) +TaskUpdate({ taskId: "BUILD-", addBlockedBy: ["MARSHAL-001"], owner: "implementer-" }) ``` > **Note**: In Batch mode, BUILD task count M may not be known at dispatch time (depends on MARSHAL queue output). Create BUILD tasks with placeholder count, or defer BUILD task creation to handleCallback when MARSHAL completes. Coordinator should check for deferred BUILD task creation in monitor.md handleCallback for integrator. @@ -313,7 +293,6 @@ When AUDIT rejects a solution, coordinator creates fix tasks dynamically (NOT at ``` TaskCreate({ subject: "SOLVE-fix-001", - owner: "planner", description: "PURPOSE: Revise solution addressing reviewer feedback (fix cycle ) | Success: Revised solution addressing rejection reasons TASK: - Read reviewer feedback from audit report @@ -327,17 +306,15 @@ CONTEXT: EXPECTED: /solutions/solution-.json (revised) CONSTRAINTS: Address reviewer concerns specifically --- -InnerLoop: false", - blockedBy: ["AUDIT-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SOLVE-fix-001", addBlockedBy: ["AUDIT-001"], owner: "planner" }) ``` **AUDIT-002** (reviewer, re-review): ``` TaskCreate({ subject: "AUDIT-002", - owner: "reviewer", description: "PURPOSE: Re-review revised solution (fix cycle ) | Success: Verdict on revised solution TASK: - Load revised solution @@ -350,10 +327,9 @@ CONTEXT: EXPECTED: /audits/audit-report.json (updated) CONSTRAINTS: Focus on previously rejected dimensions --- -InnerLoop: false", - blockedBy: ["SOLVE-fix-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "AUDIT-002", addBlockedBy: ["SOLVE-fix-001"], owner: "reviewer" }) ``` These fix tasks are created dynamically by handleCallback in monitor.md when reviewer reports rejection, NOT during initial dispatch. diff --git a/.claude/skills/team-issue/roles/coordinator/commands/monitor.md b/.claude/skills/team-issue/roles/coordinator/commands/monitor.md index ff3d1ff5..38e0182c 100644 --- a/.claude/skills/team-issue/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-issue/roles/coordinator/commands/monitor.md @@ -83,7 +83,7 @@ Find and spawn the next ready tasks. 2. For each ready task, spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "issue", @@ -116,7 +116,7 @@ Execute built-in Phase 1 -> role-spec Phase 2-4 -> built-in Phase 5.` 4. **Parallel spawn** (Batch mode with multiple ready tasks for same role): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn - worker for ", team_name: "issue", diff --git a/.claude/skills/team-issue/roles/coordinator/role.md b/.claude/skills/team-issue/roles/coordinator/role.md index 430788b9..191ca38b 100644 --- a/.claude/skills/team-issue/roles/coordinator/role.md +++ b/.claude/skills/team-issue/roles/coordinator/role.md @@ -205,7 +205,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 explorer worker", team_name: "issue", @@ -273,6 +273,6 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("issue") -> 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-issue', args='resume')" | | New Batch | Return to Phase 1 | diff --git a/.claude/skills/team-iterdev/SKILL.md b/.claude/skills/team-iterdev/SKILL.md index cff37fe3..2071b4d6 100644 --- a/.claude/skills/team-iterdev/SKILL.md +++ b/.claude/skills/team-iterdev/SKILL.md @@ -1,7 +1,7 @@ --- name: team-iterdev description: Unified team skill for iterative development team. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team iterdev". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team IterDev @@ -412,7 +412,7 @@ Real-time tracking of all sprint task progress. Coordinator updates at each task When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "iterdev", @@ -459,7 +459,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(iterdev) -> 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-iterdev", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md b/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md index 0e969d8f..be4215fa 100644 --- a/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md @@ -24,7 +24,6 @@ Every task description uses structured format for clarity: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -38,10 +37,9 @@ CONTEXT: EXPECTED: + CONSTRAINTS: --- -InnerLoop: ", - blockedBy: [], - status: "pending" +InnerLoop: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -60,7 +58,6 @@ InnerLoop: ", ``` TaskCreate({ subject: "DEV-001", - owner: "developer", description: "PURPOSE: Implement fix | Success: Fix applied, syntax clean TASK: - Load target files and understand context @@ -73,16 +70,15 @@ CONTEXT: EXPECTED: Modified source files + /code/dev-log.md | Syntax clean CONSTRAINTS: Minimal changes | Preserve existing behavior --- -InnerLoop: true", - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "DEV-001", owner: "developer" }) ``` **VERIFY-001** (tester): ``` TaskCreate({ subject: "VERIFY-001", - owner: "tester", description: "PURPOSE: Verify fix correctness | Success: Tests pass, no regressions TASK: - Detect test framework @@ -96,10 +92,9 @@ CONTEXT: EXPECTED: /verify/verify-001.json | Pass rate >= 95% CONSTRAINTS: Focus on changed files | Report any regressions --- -InnerLoop: false", - blockedBy: ["DEV-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "VERIFY-001", addBlockedBy: ["DEV-001"], owner: "tester" }) ``` --- @@ -110,7 +105,6 @@ InnerLoop: false", ``` TaskCreate({ subject: "DESIGN-001", - owner: "architect", description: "PURPOSE: Technical design and task breakdown | Success: Design document + task breakdown ready TASK: - Explore codebase for patterns and dependencies @@ -123,16 +117,15 @@ CONTEXT: EXPECTED: /design/design-001.md + /design/task-breakdown.json | Components defined, tasks actionable CONSTRAINTS: Focus on | Risk assessment required --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "DESIGN-001", owner: "architect" }) ``` **DEV-001** (developer): ``` TaskCreate({ subject: "DEV-001", - owner: "developer", description: "PURPOSE: Implement design | Success: All design tasks implemented, syntax clean TASK: - Load design and task breakdown @@ -146,17 +139,15 @@ CONTEXT: EXPECTED: Modified source files + /code/dev-log.md | Syntax clean, all tasks done CONSTRAINTS: Follow design | Preserve existing behavior | Follow code conventions --- -InnerLoop: true", - blockedBy: ["DESIGN-001"], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "DEV-001", addBlockedBy: ["DESIGN-001"], owner: "developer" }) ``` **VERIFY-001** (tester, parallel with REVIEW-001): ``` TaskCreate({ subject: "VERIFY-001", - owner: "tester", description: "PURPOSE: Verify implementation | Success: Tests pass, no regressions TASK: - Detect test framework @@ -170,17 +161,15 @@ CONTEXT: EXPECTED: /verify/verify-001.json | Pass rate >= 95% CONSTRAINTS: Focus on changed files | Report regressions --- -InnerLoop: false", - blockedBy: ["DEV-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "VERIFY-001", addBlockedBy: ["DEV-001"], owner: "tester" }) ``` **REVIEW-001** (reviewer, parallel with VERIFY-001): ``` TaskCreate({ subject: "REVIEW-001", - owner: "reviewer", description: "PURPOSE: Code review for correctness and quality | Success: All dimensions reviewed, verdict issued TASK: - Load changed files and design document @@ -194,10 +183,9 @@ CONTEXT: EXPECTED: /review/review-001.md | Per-dimension findings with severity CONSTRAINTS: Focus on implementation changes | Provide file:line references --- -InnerLoop: false", - blockedBy: ["DEV-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "REVIEW-001", addBlockedBy: ["DEV-001"], owner: "reviewer" }) ``` --- @@ -212,7 +200,6 @@ Create Sprint 1 tasks using sprint templates above, plus: ``` TaskCreate({ subject: "DEV-002", - owner: "developer", description: "PURPOSE: Incremental implementation | Success: Remaining tasks implemented TASK: - Load remaining tasks from breakdown @@ -226,10 +213,9 @@ CONTEXT: EXPECTED: Modified source files + updated dev-log.md CONSTRAINTS: Incremental delivery | Follow existing patterns --- -InnerLoop: true", - blockedBy: ["DEV-001"], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "DEV-002", addBlockedBy: ["DEV-001"], owner: "developer" }) ``` Subsequent sprints created dynamically after Sprint N completes. diff --git a/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md b/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md index f1450d02..de8861fa 100644 --- a/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md @@ -83,7 +83,7 @@ Find and spawn the next ready tasks. 3. Spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "iterdev", diff --git a/.claude/skills/team-iterdev/roles/coordinator/role.md b/.claude/skills/team-iterdev/roles/coordinator/role.md index b0618d6a..2e301f0c 100644 --- a/.claude/skills/team-iterdev/roles/coordinator/role.md +++ b/.claude/skills/team-iterdev/roles/coordinator/role.md @@ -199,7 +199,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 worker", team_name: "iterdev", @@ -266,6 +266,6 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("iterdev") -> 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-iterdev', args='resume')" | | Export Results | AskUserQuestion for target directory -> copy all artifacts -> Archive & Clean flow | diff --git a/.claude/skills/team-lifecycle/SKILL.md b/.claude/skills/team-lifecycle/SKILL.md index 48682778..8b35d38c 100644 --- a/.claude/skills/team-lifecycle/SKILL.md +++ b/.claude/skills/team-lifecycle/SKILL.md @@ -1,7 +1,7 @@ --- name: team-lifecycle description: Unified team skill for full lifecycle - spec/impl/test. Uses team-worker agent architecture with role-spec files for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents loaded with role-specific Phase 2-4 specs. Triggers on "team lifecycle". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), TodoWrite(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Lifecycle @@ -110,7 +110,7 @@ User provides task description When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: , diff --git a/.claude/skills/team-lifecycle/role-specs/analyst.md b/.claude/skills/team-lifecycle/role-specs/analyst.md index 4da013a8..49ac0055 100644 --- a/.claude/skills/team-lifecycle/role-specs/analyst.md +++ b/.claude/skills/team-lifecycle/role-specs/analyst.md @@ -47,7 +47,7 @@ EXPECTED: JSON with: problem_statement, target_users[], domain, constraints[], e **When project detected**: Call explore subagent with `angle: general`, `keywords: `. ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore general context", diff --git a/.claude/skills/team-lifecycle/role-specs/executor.md b/.claude/skills/team-lifecycle/role-specs/executor.md index 8c70e6aa..bb5d74ad 100644 --- a/.claude/skills/team-lifecycle/role-specs/executor.md +++ b/.claude/skills/team-lifecycle/role-specs/executor.md @@ -42,7 +42,7 @@ message_types: | Backend | Invocation | Use Case | |---------|-----------|----------| -| agent | `Task({ subagent_type: "code-developer", run_in_background: false })` | Simple, direct edits | +| agent | `Agent({ subagent_type: "code-developer", run_in_background: false })` | Simple, direct edits | | codex | `ccw cli --tool codex --mode write` (background) | Complex, architecture | | gemini | `ccw cli --tool gemini --mode write` (background) | Analysis-heavy | diff --git a/.claude/skills/team-lifecycle/role-specs/fe-developer.md b/.claude/skills/team-lifecycle/role-specs/fe-developer.md index 1cdfeee5..96aa878c 100644 --- a/.claude/skills/team-lifecycle/role-specs/fe-developer.md +++ b/.claude/skills/team-lifecycle/role-specs/fe-developer.md @@ -42,7 +42,7 @@ message_types: | Task Size | Strategy | |-----------|----------| -| Simple (<= 3 files, single component) | `Task({ subagent_type: "code-developer", run_in_background: false })` | +| Simple (<= 3 files, single component) | `Agent({ subagent_type: "code-developer", run_in_background: false })` | | Complex (system, multi-component) | `ccw cli --tool gemini --mode write` (background) | **Coding standards** (include in agent/CLI prompt): diff --git a/.claude/skills/team-lifecycle/role-specs/planner.md b/.claude/skills/team-lifecycle/role-specs/planner.md index 0ae696fd..c3781321 100644 --- a/.claude/skills/team-lifecycle/role-specs/planner.md +++ b/.claude/skills/team-lifecycle/role-specs/planner.md @@ -33,7 +33,7 @@ If `/spec/` exists → load requirements/_index.md, architecture For each angle, call explore subagent (cache-aware — check cache-index.json before each call): ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore ", @@ -53,7 +53,7 @@ Task({ **Agent call** (Medium/High): ``` -Task({ +Agent({ subagent_type: "cli-lite-planning-agent", run_in_background: false, description: "Generate implementation plan", diff --git a/.claude/skills/team-lifecycle/role-specs/writer.md b/.claude/skills/team-lifecycle/role-specs/writer.md index 6e1975ad..51bd1fe6 100644 --- a/.claude/skills/team-lifecycle/role-specs/writer.md +++ b/.claude/skills/team-lifecycle/role-specs/writer.md @@ -61,7 +61,7 @@ message_types: Do NOT execute CLI calls in main agent. Delegate to subagent: ``` -Task({ +Agent({ subagent_type: "universal-executor", run_in_background: false, description: "Generate document", diff --git a/.claude/skills/team-lifecycle/roles/coordinator/commands/dispatch.md b/.claude/skills/team-lifecycle/roles/coordinator/commands/dispatch.md index 530336e1..dfbab431 100644 --- a/.claude/skills/team-lifecycle/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-lifecycle/roles/coordinator/commands/dispatch.md @@ -85,7 +85,7 @@ Every task description uses structured format for clarity: ``` TaskCreate({ subject: "", - owner: "", + description: "PURPOSE: | Success: TASK: - @@ -102,8 +102,8 @@ CONSTRAINTS: --- InlineDiscuss: InnerLoop: ", - blockedBy: [], - status: "pending" + addBlockedBy: [] + }) ``` @@ -186,7 +186,7 @@ EXPECTED: Improved artifacts + quality improvement summary CONSTRAINTS: Focus on only --- InnerLoop: true", - status: "pending" + }) ``` diff --git a/.claude/skills/team-lifecycle/roles/coordinator/commands/monitor.md b/.claude/skills/team-lifecycle/roles/coordinator/commands/monitor.md index c8f1fc9e..50034fe8 100644 --- a/.claude/skills/team-lifecycle/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-lifecycle/roles/coordinator/commands/monitor.md @@ -128,7 +128,7 @@ Collect task states from TaskList() +- TaskUpdate -> in_progress +- team_msg log -> task_unblocked +- Spawn team-worker: - Task({ + Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: , diff --git a/.claude/skills/team-lifecycle/subagents/discuss-subagent.md b/.claude/skills/team-lifecycle/subagents/discuss-subagent.md index d15c3395..9334a614 100644 --- a/.claude/skills/team-lifecycle/subagents/discuss-subagent.md +++ b/.claude/skills/team-lifecycle/subagents/discuss-subagent.md @@ -13,7 +13,7 @@ In v4, discuss is a **subagent call** from within the producing role, reducing e Called by produce roles after artifact creation: ``` -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: "Discuss ", diff --git a/.claude/skills/team-lifecycle/subagents/doc-generation-subagent.md b/.claude/skills/team-lifecycle/subagents/doc-generation-subagent.md index 3de40a8e..ed55ac33 100644 --- a/.claude/skills/team-lifecycle/subagents/doc-generation-subagent.md +++ b/.claude/skills/team-lifecycle/subagents/doc-generation-subagent.md @@ -12,7 +12,7 @@ writer 只拿到压缩摘要,可在多任务间保持上下文连续。 ## Invocation ``` -Task({ +Agent({ subagent_type: "universal-executor", run_in_background: false, description: "Generate ", diff --git a/.claude/skills/team-lifecycle/subagents/explore-subagent.md b/.claude/skills/team-lifecycle/subagents/explore-subagent.md index 2abbcab4..c3952cf3 100644 --- a/.claude/skills/team-lifecycle/subagents/explore-subagent.md +++ b/.claude/skills/team-lifecycle/subagents/explore-subagent.md @@ -14,7 +14,7 @@ Results were scattered across different directories and never shared. In v4, all ## Invocation ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore ", @@ -135,9 +135,10 @@ For complex queries, call cli-explore-agent per angle. The calling role determin ``` # After seed analysis, explore codebase context -Task({ +Agent({ subagent_type: "cli-explore-agent", description: "Explore general context", + run_in_background: false, prompt: "Explore codebase for: \nFocus angle: general\n..." }) # Result feeds into discovery-context.json @@ -148,9 +149,10 @@ Task({ ``` # Multi-angle exploration before plan generation for angle in selected_angles: - Task({ + Agent({ subagent_type: "cli-explore-agent", description: "Explore ", + run_in_background: false, prompt: "Explore codebase for: \nFocus angle: \n..." }) # Explorations manifest built from cache-index.json diff --git a/.claude/skills/team-perf-opt/SKILL.md b/.claude/skills/team-perf-opt/SKILL.md index 9acfe03c..8c02d557 100644 --- a/.claude/skills/team-perf-opt/SKILL.md +++ b/.claude/skills/team-perf-opt/SKILL.md @@ -1,7 +1,7 @@ --- name: team-perf-opt description: Unified team skill for performance optimization. Uses team-worker agent architecture with role-spec files for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team perf-opt". -allowed-tools: Task, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context +allowed-tools: Agent, TaskCreate, TaskList, TaskGet, TaskUpdate, TeamCreate, TeamDelete, SendMessage, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context --- # Team Performance Optimization @@ -137,7 +137,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 worker", team_name: , @@ -361,7 +361,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(perf-opt) -> 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-perf-opt", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md b/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md index 691f76cf..c474ca92 100644 --- a/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md @@ -65,7 +65,7 @@ Find and spawn the next ready tasks. 2. For each ready task, spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "perf-opt", diff --git a/.claude/skills/team-perf-opt/roles/coordinator/role.md b/.claude/skills/team-perf-opt/roles/coordinator/role.md index 2cc84f5f..3b072f3b 100644 --- a/.claude/skills/team-perf-opt/roles/coordinator/role.md +++ b/.claude/skills/team-perf-opt/roles/coordinator/role.md @@ -229,7 +229,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 profiler worker", team_name: "perf-opt", @@ -298,6 +298,6 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("perf-opt") -> 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-perf-opt', args='resume')" | | Export Results | AskUserQuestion for target directory -> copy all artifacts -> Archive & Clean flow | diff --git a/.claude/skills/team-perf-opt/subagents/discuss-subagent.md b/.claude/skills/team-perf-opt/subagents/discuss-subagent.md index cfc2e69d..10a8070c 100644 --- a/.claude/skills/team-perf-opt/subagents/discuss-subagent.md +++ b/.claude/skills/team-perf-opt/subagents/discuss-subagent.md @@ -11,7 +11,7 @@ Complex optimization decisions (e.g., choosing between algorithmic change vs cac Called by strategist, reviewer after their primary analysis when complexity warrants multi-perspective evaluation: ``` -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: "Discuss : for performance optimization", diff --git a/.claude/skills/team-perf-opt/subagents/explore-subagent.md b/.claude/skills/team-perf-opt/subagents/explore-subagent.md index 549dd16e..44347614 100644 --- a/.claude/skills/team-perf-opt/subagents/explore-subagent.md +++ b/.claude/skills/team-perf-opt/subagents/explore-subagent.md @@ -11,7 +11,7 @@ Codebase exploration is a read-only operation shared between profiler (mapping b Called by profiler, optimizer after needing codebase context for performance analysis or implementation: ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore codebase for performance-critical paths in ", diff --git a/.claude/skills/team-planex/SKILL.md b/.claude/skills/team-planex/SKILL.md index 1c537b1f..77bc9afe 100644 --- a/.claude/skills/team-planex/SKILL.md +++ b/.claude/skills/team-planex/SKILL.md @@ -1,7 +1,7 @@ --- name: team-planex description: Unified team skill for plan-and-execute pipeline. Uses team-worker agent architecture with role-spec files for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team planex". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team PlanEx @@ -128,7 +128,7 @@ When coordinator needs to execute a command (dispatch, monitor): When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: , diff --git a/.claude/skills/team-planex/role-specs/executor.md b/.claude/skills/team-planex/role-specs/executor.md index 14fd3f76..6305168e 100644 --- a/.claude/skills/team-planex/role-specs/executor.md +++ b/.claude/skills/team-planex/role-specs/executor.md @@ -39,7 +39,7 @@ Single-issue implementation agent. Loads solution from artifact file, routes to ### Agent Backend ``` -Task({ +Agent({ subagent_type: "code-developer", description: "Implement ", prompt: `Issue: diff --git a/.claude/skills/team-planex/role-specs/planner.md b/.claude/skills/team-planex/role-specs/planner.md index e2bca7e0..4ebfd40c 100644 --- a/.claude/skills/team-planex/role-specs/planner.md +++ b/.claude/skills/team-planex/role-specs/planner.md @@ -39,7 +39,7 @@ For each issue, execute in sequence: Delegate to `issue-plan-agent` subagent: ``` -Task({ +Agent({ subagent_type: "issue-plan-agent", description: "Plan issue ", prompt: `issue_ids: [""] diff --git a/.claude/skills/team-planex/roles/coordinator/commands/monitor.md b/.claude/skills/team-planex/roles/coordinator/commands/monitor.md index dd337b54..d00d3493 100644 --- a/.claude/skills/team-planex/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-planex/roles/coordinator/commands/monitor.md @@ -117,7 +117,7 @@ Collect task states from TaskList() | +- PLAN-* -> planner | +- EXEC-* -> executor +- Spawn team-worker: - Task({ + Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: , diff --git a/.claude/skills/team-quality-assurance/SKILL.md b/.claude/skills/team-quality-assurance/SKILL.md index ff5c241b..272b1ebf 100644 --- a/.claude/skills/team-quality-assurance/SKILL.md +++ b/.claude/skills/team-quality-assurance/SKILL.md @@ -1,7 +1,7 @@ --- name: team-quality-assurance description: Unified team skill for quality assurance team. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team quality-assurance", "team qa". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Quality Assurance @@ -359,7 +359,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 worker", team_name: "quality-assurance", @@ -397,7 +397,7 @@ Execute built-in Phase 1 (task discovery) -> role-spec Phase 2-4 -> built-in Pha **Parallel spawn template**: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn - worker", team_name: "quality-assurance", @@ -443,7 +443,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(quality-assurance) -> 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-quality-assurance", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md b/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md index 4b7e572d..af344221 100644 --- a/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md @@ -131,7 +131,7 @@ const STAGE_WORKER_MAP = { 5. Spawn team-worker (one at a time for sequential pipeline): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "quality-assurance", diff --git a/.claude/skills/team-review/SKILL.md b/.claude/skills/team-review/SKILL.md index 20986c5e..ab43148e 100644 --- a/.claude/skills/team-review/SKILL.md +++ b/.claude/skills/team-review/SKILL.md @@ -1,7 +1,7 @@ --- name: team-review description: "Unified team skill for code review. Uses team-worker agent architecture with role-spec files. 3-role pipeline: scanner, reviewer, fixer. Triggers on team-review." -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*) --- # Team Review @@ -224,7 +224,7 @@ Coordinator additional restrictions: Do not write/modify code directly, do not c When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "review", @@ -293,7 +293,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(review) -> 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-review", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-review/roles/coordinator/commands/monitor.md b/.claude/skills/team-review/roles/coordinator/commands/monitor.md index 3bb26547..d40a66f2 100644 --- a/.claude/skills/team-review/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-review/roles/coordinator/commands/monitor.md @@ -143,7 +143,7 @@ Ready tasks found? **Spawn worker tool call**: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "review", diff --git a/.claude/skills/team-roadmap-dev/SKILL.md b/.claude/skills/team-roadmap-dev/SKILL.md index a683a790..d61115e9 100644 --- a/.claude/skills/team-roadmap-dev/SKILL.md +++ b/.claude/skills/team-roadmap-dev/SKILL.md @@ -1,7 +1,7 @@ --- name: team-roadmap-dev description: Unified team skill for roadmap-driven development workflow. Coordinator discusses roadmap with user, then dispatches phased execution pipeline (plan -> execute -> verify). All roles invoke this skill with --role arg. Triggers on "team roadmap-dev". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Roadmap Dev @@ -313,7 +313,7 @@ Phase N: PLAN-N01 → EXEC-N01 → VERIFY-N01 → Complete When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "roadmap-dev", @@ -358,7 +358,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(roadmap-dev) -> 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-roadmap-dev", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md b/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md index 5940accd..7bed1275 100644 --- a/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md @@ -239,7 +239,7 @@ Ready tasks found? **Spawn worker tool call** (one per ready task): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "roadmap-dev", diff --git a/.claude/skills/team-tech-debt/SKILL.md b/.claude/skills/team-tech-debt/SKILL.md index 854e2d83..b91d8b29 100644 --- a/.claude/skills/team-tech-debt/SKILL.md +++ b/.claude/skills/team-tech-debt/SKILL.md @@ -1,7 +1,7 @@ --- name: team-tech-debt description: Unified team skill for tech debt identification and cleanup. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team tech-debt", "tech debt cleanup", "技术债务". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Tech Debt @@ -276,7 +276,7 @@ TDFIX -> TDVAL -> (if regression or quality drop) -> TDFIX-fix -> TDVAL-2 When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", prompt: `## Role Assignment @@ -331,7 +331,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(tech-debt) -> 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-tech-debt", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md b/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md index bbd0c4a2..d95b52da 100644 --- a/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md @@ -160,7 +160,7 @@ const STAGE_WORKER_MAP = { 5. Spawn team-worker (one at a time for sequential pipeline): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "tech-debt", diff --git a/.claude/skills/team-tech-debt/roles/coordinator/role.md b/.claude/skills/team-tech-debt/roles/coordinator/role.md index 5a7d8c1b..5b63b956 100644 --- a/.claude/skills/team-tech-debt/roles/coordinator/role.md +++ b/.claude/skills/team-tech-debt/roles/coordinator/role.md @@ -312,7 +312,7 @@ Delegate to `commands/dispatch.md` which creates the full task chain. **Worker Spawn Template**: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", prompt: `## Role Assignment diff --git a/.claude/skills/team-testing/SKILL.md b/.claude/skills/team-testing/SKILL.md index 2787c7ee..5705e713 100644 --- a/.claude/skills/team-testing/SKILL.md +++ b/.claude/skills/team-testing/SKILL.md @@ -1,7 +1,7 @@ --- name: team-testing description: Unified team skill for testing team. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team testing". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Testing @@ -305,7 +305,7 @@ Beat 1 2 3 4 5 When coordinator spawns workers, use `team-worker` agent with role-spec path: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "testing", @@ -352,7 +352,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(testing) -> 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-testing", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-testing/role-specs/executor.md b/.claude/skills/team-testing/role-specs/executor.md index a5daae5a..5209cf35 100644 --- a/.claude/skills/team-testing/role-specs/executor.md +++ b/.claude/skills/team-testing/role-specs/executor.md @@ -59,7 +59,7 @@ Bash(" 2>&1 || true") **Auto-fix delegation** (on failure): ``` -Task({ +Agent({ subagent_type: "code-developer", run_in_background: false, description: "Fix test failures (iteration )", diff --git a/.claude/skills/team-testing/role-specs/generator.md b/.claude/skills/team-testing/role-specs/generator.md index 2349a8b1..49665dbe 100644 --- a/.claude/skills/team-testing/role-specs/generator.md +++ b/.claude/skills/team-testing/role-specs/generator.md @@ -61,7 +61,7 @@ For revision mode: **Agent delegation** (medium/high complexity): ``` -Task({ +Agent({ subagent_type: "code-developer", run_in_background: false, description: "Generate tests", diff --git a/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md b/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md index 90e7cd4d..996b71bd 100644 --- a/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md @@ -24,7 +24,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -38,10 +37,9 @@ CONTEXT: EXPECTED: + CONSTRAINTS: --- -InnerLoop: ", - blockedBy: [], - status: "pending" +InnerLoop: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -71,10 +69,9 @@ CONTEXT: EXPECTED: /strategy/test-strategy.md CONSTRAINTS: Read-only analysis --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "STRATEGY-001", owner: "strategist" }) ``` **TESTGEN-001** (generator, L1): @@ -93,10 +90,9 @@ CONTEXT: EXPECTED: /tests/L1-unit/ CONSTRAINTS: Only generate test code, do not modify source --- -InnerLoop: true", - blockedBy: ["STRATEGY-001"], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "TESTGEN-001", addBlockedBy: ["STRATEGY-001"], owner: "generator" }) ``` **TESTRUN-001** (executor, L1): @@ -115,10 +111,9 @@ CONTEXT: EXPECTED: /results/run-001.json CONSTRAINTS: Only fix test files, not source code --- -InnerLoop: true", - blockedBy: ["TESTGEN-001"], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "TESTRUN-001", addBlockedBy: ["TESTGEN-001"], owner: "executor" }) ``` ### Standard Pipeline diff --git a/.claude/skills/team-testing/roles/coordinator/commands/monitor.md b/.claude/skills/team-testing/roles/coordinator/commands/monitor.md index 902987f1..65d98653 100644 --- a/.claude/skills/team-testing/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-testing/roles/coordinator/commands/monitor.md @@ -68,7 +68,6 @@ When executor reports test results: ``` TaskCreate({ subject: "TESTGEN--fix-", - owner: "generator", description: "PURPOSE: Revise tests to fix failures and improve coverage TASK: - Read previous test results and failure details @@ -80,10 +79,9 @@ CONTEXT: - Previous results: /results/run-.json EXPECTED: Revised test files in /tests// --- -InnerLoop: true", - blockedBy: [], - status: "pending" +InnerLoop: true" }) +TaskUpdate({ taskId: "TESTGEN--fix-", owner: "generator" }) ``` Create TESTRUN-fix blocked on TESTGEN-fix. @@ -108,7 +106,7 @@ Find and spawn the next ready tasks. 3. Spawn team-worker: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "testing", diff --git a/.claude/skills/team-testing/roles/coordinator/role.md b/.claude/skills/team-testing/roles/coordinator/role.md index 7cd2c727..0047634c 100644 --- a/.claude/skills/team-testing/roles/coordinator/role.md +++ b/.claude/skills/team-testing/roles/coordinator/role.md @@ -202,7 +202,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 strategist worker", team_name: "testing", @@ -269,7 +269,7 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("testing") -> 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-testing', args='resume')" | | Deepen Coverage | Create additional TESTGEN+TESTRUN tasks for next layer -> Phase 4 | diff --git a/.claude/skills/team-uidesign/SKILL.md b/.claude/skills/team-uidesign/SKILL.md index fa50cc60..ff34b43f 100644 --- a/.claude/skills/team-uidesign/SKILL.md +++ b/.claude/skills/team-uidesign/SKILL.md @@ -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 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 | diff --git a/.claude/skills/team-uidesign/roles/coordinator/commands/dispatch.md b/.claude/skills/team-uidesign/roles/coordinator/commands/dispatch.md index dc3fa09c..4f50f655 100644 --- a/.claude/skills/team-uidesign/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-uidesign/roles/coordinator/commands/dispatch.md @@ -24,7 +24,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -37,10 +36,9 @@ CONTEXT: - Upstream artifacts: , - Shared memory: /wisdom/.msg/meta.json EXPECTED: + -CONSTRAINTS: ", - blockedBy: [], - status: "pending" +CONSTRAINTS: " }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -71,9 +69,9 @@ CONTEXT: - Industry: - Shared memory: /wisdom/.msg/meta.json EXPECTED: /research/*.json | All 4 research files with valid JSON -CONSTRAINTS: Read-only analysis | Focus on ", - status: "pending" +CONSTRAINTS: Read-only analysis | Focus on " }) +TaskUpdate({ taskId: "RESEARCH-001", owner: "researcher" }) ``` **DESIGN-001** (designer): @@ -93,10 +91,9 @@ CONTEXT: - Upstream artifacts: research/*.json - Shared memory: /wisdom/.msg/meta.json EXPECTED: /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: /wisdom/.msg/meta.json EXPECTED: /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: /wisdom/.msg/meta.json EXPECTED: /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" }) ``` --- diff --git a/.claude/skills/team-uidesign/roles/coordinator/commands/monitor.md b/.claude/skills/team-uidesign/roles/coordinator/commands/monitor.md index a0e31cba..d782df2f 100644 --- a/.claude/skills/team-uidesign/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-uidesign/roles/coordinator/commands/monitor.md @@ -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 worker for ", team_name: "uidesign", @@ -126,10 +126,9 @@ CONTEXT: - Upstream artifacts: audit/audit-.md - Shared memory: /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-", owner: "designer" }) ``` After fix completes, create new AUDIT task blocked by the fix task. Increment gc_state.round. diff --git a/.claude/skills/team-uidesign/roles/coordinator/role.md b/.claude/skills/team-uidesign/roles/coordinator/role.md index 51bfb00c..dc347adf 100644 --- a/.claude/skills/team-uidesign/roles/coordinator/role.md +++ b/.claude/skills/team-uidesign/roles/coordinator/role.md @@ -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 | diff --git a/.claude/skills/team-ultra-analyze/SKILL.md b/.claude/skills/team-ultra-analyze/SKILL.md index 47b4e4d3..a9eef8f3 100644 --- a/.claude/skills/team-ultra-analyze/SKILL.md +++ b/.claude/skills/team-ultra-analyze/SKILL.md @@ -1,7 +1,7 @@ --- name: team-ultra-analyze description: Unified team skill for deep collaborative analysis. All roles invoke this skill with --role arg for role-specific execution. Triggers on "team ultra-analyze", "team analyze". -allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Task(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) +allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*) --- # Team Ultra Analyze @@ -359,7 +359,7 @@ When coordinator spawns workers, use `team-worker` agent with role-spec path. Th **Single spawn template** (worker template used for all roles): ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker", team_name: "ultra-analyze", @@ -434,7 +434,7 @@ AskUserQuestion({ | Choice | Action | |--------|--------| -| Archive & Clean | Update session status="completed" -> TeamDelete(ultra-analyze) -> 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-ultra-analyze", args="resume")` | | Export Results | AskUserQuestion for target path -> copy deliverables -> Archive & Clean | diff --git a/.claude/skills/team-ultra-analyze/role-specs/discussant.md b/.claude/skills/team-ultra-analyze/role-specs/discussant.md index 0e8d49fc..efd20c76 100644 --- a/.claude/skills/team-ultra-analyze/role-specs/discussant.md +++ b/.claude/skills/team-ultra-analyze/role-specs/discussant.md @@ -48,7 +48,7 @@ Select strategy by discussion type: **deepen**: Spawn cli-explore-agent focused on open questions and uncertain insights: ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, prompt: "Focus on open questions: . Find evidence for uncertain insights. Write to: /discussions/deepen-.json" @@ -62,7 +62,12 @@ ccw cli -p "Re-analyze '' with adjusted focus on ''" --tool **specific-questions**: Spawn cli-explore-agent targeting user's questions: ``` -Task({ subagent_type: "cli-explore-agent", prompt: "Answer: . Write to: /discussions/questions-.json" }) +Agent({ + subagent_type: "cli-explore-agent", + description: "Answer specific user questions", + run_in_background: false, + prompt: "Answer: . Write to: /discussions/questions-.json" +}) ``` ## Phase 4: Update Discussion Timeline diff --git a/.claude/skills/team-ultra-analyze/role-specs/explorer.md b/.claude/skills/team-ultra-analyze/role-specs/explorer.md index c9491867..bca28818 100644 --- a/.claude/skills/team-ultra-analyze/role-specs/explorer.md +++ b/.claude/skills/team-ultra-analyze/role-specs/explorer.md @@ -43,7 +43,7 @@ Explore codebase structure through cli-explore-agent, collecting structured cont Spawn `cli-explore-agent` subagent for actual exploration: ``` -Task({ +Agent({ subagent_type: "cli-explore-agent", run_in_background: false, description: "Explore codebase: ()", diff --git a/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md b/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md index 7e290edd..8248a1a7 100644 --- a/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md @@ -24,7 +24,6 @@ Every task description uses structured format: ``` TaskCreate({ subject: "", - owner: "", description: "PURPOSE: | Success: TASK: - @@ -39,10 +38,9 @@ CONTEXT: EXPECTED: + CONSTRAINTS: --- -InnerLoop: false", - blockedBy: [], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "", addBlockedBy: [], owner: "" }) ``` ### Mode Router @@ -75,9 +73,9 @@ CONTEXT: EXPECTED: /explorations/exploration-001.json | Structured exploration with files and findings CONSTRAINTS: Focus on scope --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "EXPLORE-001", owner: "explorer" }) ``` **ANALYZE-001** (analyst): @@ -99,10 +97,9 @@ CONTEXT: EXPECTED: /analyses/analysis-001.json | Structured analysis with evidence CONSTRAINTS: Focus on technical perspective | --- -InnerLoop: false", - blockedBy: ["EXPLORE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "ANALYZE-001", addBlockedBy: ["EXPLORE-001"], owner: "analyst" }) ``` **SYNTH-001** (synthesizer): @@ -122,10 +119,9 @@ CONTEXT: EXPECTED: /conclusions.json + discussion.md update | Final conclusions with confidence levels CONSTRAINTS: Pure integration, no new exploration --- -InnerLoop: false", - blockedBy: ["ANALYZE-001"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SYNTH-001", addBlockedBy: ["ANALYZE-001"], owner: "synthesizer" }) ``` --- @@ -140,7 +136,6 @@ Create tasks in dependency order with parallel exploration and analysis windows: // For each perspective[i]: TaskCreate({ subject: "EXPLORE-", - owner: "explorer-", description: "PURPOSE: Explore codebase from angle | Success: Perspective-specific files and patterns collected TASK: - Search codebase from perspective @@ -155,9 +150,9 @@ CONTEXT: EXPECTED: /explorations/exploration-.json CONSTRAINTS: Focus on angle --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "EXPLORE-", owner: "explorer-" }) ``` **ANALYZE-001..N** (analyst, parallel): One per perspective. Each blocked by its corresponding EXPLORE-N. @@ -165,7 +160,6 @@ InnerLoop: false", ``` TaskCreate({ subject: "ANALYZE-", - owner: "analyst-", description: "PURPOSE: Deep analysis from perspective | Success: Insights with confidence and evidence TASK: - Load exploration- results @@ -181,10 +175,9 @@ CONTEXT: EXPECTED: /analyses/analysis-.json CONSTRAINTS: perspective | --- -InnerLoop: false", - blockedBy: ["EXPLORE-"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "ANALYZE-", addBlockedBy: ["EXPLORE-"], owner: "analyst-" }) ``` **DISCUSS-001** (discussant): Blocked by all ANALYZE tasks. @@ -207,10 +200,9 @@ CONTEXT: EXPECTED: /discussions/discussion-round-001.json + discussion.md update CONSTRAINTS: Aggregate only, no new exploration --- -InnerLoop: false", - blockedBy: ["ANALYZE-001", ..., "ANALYZE-"], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "DISCUSS-001", addBlockedBy: ["ANALYZE-001", ..., "ANALYZE-"], owner: "discussant" }) ``` **SYNTH-001** (synthesizer): Blocked by DISCUSS-001. @@ -220,9 +212,8 @@ TaskCreate({ subject: "SYNTH-001", description: "PURPOSE: Cross-perspective integration into final conclusions | Success: Executive summary with prioritized recommendations ...same as Quick mode SYNTH-001 but blocked by DISCUSS-001..." - blockedBy: ["DISCUSS-001"], - status: "pending" }) +TaskUpdate({ taskId: "SYNTH-001", addBlockedBy: ["DISCUSS-001"], owner: "synthesizer" }) ``` --- @@ -255,9 +246,9 @@ CONTEXT: - Shared memory: /wisdom/.msg/meta.json EXPECTED: /discussions/discussion-round-.json --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "DISCUSS-", owner: "discussant" }) ``` **ANALYZE-fix-N** (direction adjustment): @@ -277,9 +268,9 @@ CONTEXT: - Shared memory: /wisdom/.msg/meta.json EXPECTED: /analyses/analysis-fix-.json --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "ANALYZE-fix-", owner: "analyst" }) ``` ## Phase 4: Validation diff --git a/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md b/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md index 58d69e7c..2be49e34 100644 --- a/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md @@ -133,9 +133,9 @@ CONTEXT: - Shared memory: /wisdom/.msg/meta.json EXPECTED: /discussions/discussion-round-.json --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "DISCUSS-", owner: "discussant" }) ``` ANALYZE-fix-N (direction adjustment): @@ -155,9 +155,9 @@ CONTEXT: - Shared memory: /wisdom/.msg/meta.json EXPECTED: /analyses/analysis-fix-.json --- -InnerLoop: false", - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "ANALYZE-fix-", owner: "analyst" }) ``` SYNTH-001 (created dynamically in deep mode): @@ -177,10 +177,9 @@ CONTEXT: EXPECTED: /conclusions.json + discussion.md update CONSTRAINTS: Pure integration, no new exploration --- -InnerLoop: false", - blockedBy: [""], - status: "pending" +InnerLoop: false" }) +TaskUpdate({ taskId: "SYNTH-001", addBlockedBy: [""], owner: "synthesizer" }) ``` 7. Record user feedback to decision_trail via team_msg: @@ -220,7 +219,7 @@ Find and spawn the next ready tasks. 3. Spawn team-worker for each ready task: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn worker for ", team_name: "ultra-analyze", diff --git a/.claude/skills/team-ultra-analyze/roles/coordinator/role.md b/.claude/skills/team-ultra-analyze/roles/coordinator/role.md index 6a34dde7..4e93c520 100644 --- a/.claude/skills/team-ultra-analyze/roles/coordinator/role.md +++ b/.claude/skills/team-ultra-analyze/roles/coordinator/role.md @@ -195,7 +195,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol): Find first unblocked tasks and spawn their workers: ``` -Task({ +Agent({ subagent_type: "team-worker", description: "Spawn explorer worker", team_name: "ultra-analyze", @@ -263,7 +263,7 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| -| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete("ultra-analyze") -> output final summary | +| Archive & Clean | TaskList -> verify all completed -> update session status="completed" -> TeamDelete() -> output final summary | | Keep Active | Update session status="paused" -> output resume instructions | | Export Results | AskUserQuestion for target directory -> copy artifacts -> Archive & Clean | diff --git a/.claude/skills/workflow-execute/SKILL.md b/.claude/skills/workflow-execute/SKILL.md index d1f09487..53e6747b 100644 --- a/.claude/skills/workflow-execute/SKILL.md +++ b/.claude/skills/workflow-execute/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-execute description: Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking. Triggers on "workflow-execute". -allowed-tools: Skill, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Skill, Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep --- # Workflow Execute @@ -500,7 +500,7 @@ TodoWrite({ **Path-Based Invocation**: Pass paths and trigger markers, let agent parse task JSON autonomously. ```bash -Task(subagent_type="{meta.agent}", +Agent(subagent_type="{meta.agent}", run_in_background=false, prompt="Implement task {task.id}: {task.title} diff --git a/.claude/skills/workflow-lite-planex/SKILL.md b/.claude/skills/workflow-lite-planex/SKILL.md index 77fcaf9b..8cab8b95 100644 --- a/.claude/skills/workflow-lite-planex/SKILL.md +++ b/.claude/skills/workflow-lite-planex/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-lite-planex description: Lightweight planning and execution skill (Phase 1: plan, Phase 2: execute). Triggers on "workflow-lite-planex". -allowed-tools: Skill, Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Skill, Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep --- # Workflow Lite-Planex diff --git a/.claude/skills/workflow-lite-planex/phases/02-lite-execute.md b/.claude/skills/workflow-lite-planex/phases/02-lite-execute.md index 38ccd57a..28d0875b 100644 --- a/.claude/skills/workflow-lite-planex/phases/02-lite-execute.md +++ b/.claude/skills/workflow-lite-planex/phases/02-lite-execute.md @@ -373,7 +373,7 @@ function executeBatch(batch) { if (executor === 'agent') { // Agent execution (synchronous) - return Task({ + return Agent({ subagent_type: "code-developer", run_in_background: false, description: batch.taskSummary, diff --git a/.claude/skills/workflow-multi-cli-plan/SKILL.md b/.claude/skills/workflow-multi-cli-plan/SKILL.md index 00affa0a..860ed442 100644 --- a/.claude/skills/workflow-multi-cli-plan/SKILL.md +++ b/.claude/skills/workflow-multi-cli-plan/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-multi-cli-plan description: Multi-CLI collaborative planning and execution skill with integrated execution phase. Triggers on "workflow-multi-cli-plan". -allowed-tools: Skill, Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context +allowed-tools: Skill, Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context --- # Workflow Multi-CLI Plan diff --git a/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md b/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md index 23f91dfd..92850270 100644 --- a/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md +++ b/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md @@ -132,7 +132,7 @@ const aceQueries = [ **Agent Invocation**: ```javascript -Task({ +Agent({ subagent_type: "cli-discuss-agent", run_in_background: false, description: `Discussion round ${currentRound}`, @@ -364,7 +364,7 @@ Write(`${sessionFolder}/context-package.json`, JSON.stringify(contextPackage, nu **Step 2: Invoke Planning Agent**: ```javascript -Task({ +Agent({ subagent_type: "cli-lite-planning-agent", run_in_background: false, description: "Generate implementation plan", diff --git a/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md b/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md index aec085fb..009445e2 100644 --- a/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md +++ b/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md @@ -369,7 +369,7 @@ function executeBatch(batch) { if (executor === 'agent') { // Agent execution (synchronous) - return Task({ + return Agent({ subagent_type: "code-developer", run_in_background: false, description: batch.taskSummary, diff --git a/.claude/skills/workflow-plan/SKILL.md b/.claude/skills/workflow-plan/SKILL.md index a2aec872..2d488669 100644 --- a/.claude/skills/workflow-plan/SKILL.md +++ b/.claude/skills/workflow-plan/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-plan description: Unified planning skill - 4-phase planning workflow, plan verification, and interactive replanning. Triggers on "workflow-plan", "workflow-plan-verify", "workflow:replan". -allowed-tools: Skill, Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Skill, Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep --- # Workflow Plan diff --git a/.claude/skills/workflow-plan/phases/03-conflict-resolution.md b/.claude/skills/workflow-plan/phases/03-conflict-resolution.md index 34847261..47b2c649 100644 --- a/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +++ b/.claude/skills/workflow-plan/phases/03-conflict-resolution.md @@ -194,7 +194,7 @@ FOR each conflict: } // 5. Agent re-analysis - reanalysisResult = Task({ + reanalysisResult = Agent({ subagent_type: "cli-execution-agent", run_in_background: false, prompt: `Conflict: ${conflict.id}, Strategy: ${selectedStrategy.name} diff --git a/.claude/skills/workflow-skill-designer/SKILL.md b/.claude/skills/workflow-skill-designer/SKILL.md index ee72d7fc..aef8d4f1 100644 --- a/.claude/skills/workflow-skill-designer/SKILL.md +++ b/.claude/skills/workflow-skill-designer/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-skill-designer description: Meta-skill for designing orchestrator+phases structured workflow skills. Creates SKILL.md coordinator with progressive phase loading, TodoWrite patterns, and data flow. Triggers on "design workflow skill", "create workflow skill", "workflow skill designer". -allowed-tools: Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep --- # Workflow Skill Designer diff --git a/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md b/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md index 1b472c68..662d0a4e 100644 --- a/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md +++ b/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md @@ -216,7 +216,7 @@ const workflowConfig = { title: "Workflow Plan", // Human-readable description: "5-phase planning...", // One-line description triggers: ["workflow-plan"], // Trigger phrases - allowedTools: ["Task", "AskUserQuestion", "TodoWrite", "Read", "Write", "Edit", "Bash", "Glob", "Grep", "Skill"], + allowedTools: ["Agent", "AskUserQuestion", "TodoWrite", "Read", "Write", "Edit", "Bash", "Glob", "Grep", "Skill"], // Source information source: { diff --git a/.claude/skills/workflow-skill-designer/phases/03-phase-design.md b/.claude/skills/workflow-skill-designer/phases/03-phase-design.md index c7866b42..1ded9b43 100644 --- a/.claude/skills/workflow-skill-designer/phases/03-phase-design.md +++ b/.claude/skills/workflow-skill-designer/phases/03-phase-design.md @@ -303,7 +303,7 @@ function generatePhaseFromRequirements(phase, config) { for (const agentType of phase.agentTypes) { phaseContent += `### Step: ${agentType} Delegation\n\n`; phaseContent += '```javascript\n'; - phaseContent += `const result = Task({\n`; + phaseContent += `const result = Agent({\n`; phaseContent += ` subagent_type: "${mapAgentType(agentType)}",\n`; phaseContent += ` prompt: \`\n`; phaseContent += ` [ROLE] ${agentType}\n`; diff --git a/.claude/skills/workflow-tdd-plan/SKILL.md b/.claude/skills/workflow-tdd-plan/SKILL.md index 6d15a732..5e8e9f08 100644 --- a/.claude/skills/workflow-tdd-plan/SKILL.md +++ b/.claude/skills/workflow-tdd-plan/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-tdd-plan-plan description: Unified TDD workflow skill combining 6-phase TDD planning with Red-Green-Refactor task chain generation, and 4-phase TDD verification with compliance reporting. Triggers on "workflow-tdd-plan", "workflow-tdd-verify". -allowed-tools: Skill, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Skill, Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep --- # Workflow TDD diff --git a/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md b/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md index 9375cb1e..4cada932 100644 --- a/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +++ b/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md @@ -194,7 +194,7 @@ FOR each conflict: } // 5. Agent re-analysis - reanalysisResult = Task({ + reanalysisResult = Agent({ subagent_type: "cli-execution-agent", run_in_background: false, prompt: `Conflict: ${conflict.id}, Strategy: ${selectedStrategy.name} diff --git a/.claude/skills/workflow-test-fix/SKILL.md b/.claude/skills/workflow-test-fix/SKILL.md index a194167a..e78ac972 100644 --- a/.claude/skills/workflow-test-fix/SKILL.md +++ b/.claude/skills/workflow-test-fix/SKILL.md @@ -1,7 +1,7 @@ --- name: workflow-test-fix description: Unified test-fix pipeline combining test generation (session, context, analysis, task gen) with iterative test-cycle execution (adaptive strategy, progressive testing, CLI fallback). Triggers on "workflow-test-fix", "workflow-test-fix", "test fix workflow". -allowed-tools: Skill, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep +allowed-tools: Skill, Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep --- # Workflow Test Fix diff --git a/ccw/frontend/src/components/ChunkErrorBoundary.tsx b/ccw/frontend/src/components/ChunkErrorBoundary.tsx index 2c65c8bb..6cf6bac2 100644 --- a/ccw/frontend/src/components/ChunkErrorBoundary.tsx +++ b/ccw/frontend/src/components/ChunkErrorBoundary.tsx @@ -22,6 +22,15 @@ interface ChunkErrorBoundaryState { * Error displayed when a chunk fails to load */ function ChunkLoadError({ error, onRetry }: { error: Error | null; onRetry: () => void }) { + const handleGoBack = () => { + // Try to go back in history, fallback to home if no history + if (window.history.length > 1) { + window.history.back(); + } else { + window.location.href = '/'; + } + }; + return (

@@ -46,11 +55,14 @@ function ChunkLoadError({ error, onRetry }: { error: Error | null; onRetry: () = ? 'A network error occurred while loading this page. Please check your connection and try again.' : 'An error occurred while loading this page. Please try refreshing.'}

-
+
- +
diff --git a/ccw/frontend/src/locales/en/team.json b/ccw/frontend/src/locales/en/team.json index 54102456..62592fcc 100644 --- a/ccw/frontend/src/locales/en/team.json +++ b/ccw/frontend/src/locales/en/team.json @@ -47,6 +47,9 @@ "artifacts": "Artifacts", "messages": "Messages" }, + "error": { + "loadFailed": "Failed to Load Team Data" + }, "artifacts": { "title": "Team Artifacts", "plan": "Plan", diff --git a/ccw/frontend/src/locales/zh/team.json b/ccw/frontend/src/locales/zh/team.json index c5a3c584..e6caa951 100644 --- a/ccw/frontend/src/locales/zh/team.json +++ b/ccw/frontend/src/locales/zh/team.json @@ -47,6 +47,9 @@ "artifacts": "产物", "messages": "消息" }, + "error": { + "loadFailed": "加载团队数据失败" + }, "artifacts": { "title": "团队产物", "plan": "计划", diff --git a/ccw/frontend/src/pages/TeamPage.tsx b/ccw/frontend/src/pages/TeamPage.tsx index e4cbd658..9af5af33 100644 --- a/ccw/frontend/src/pages/TeamPage.tsx +++ b/ccw/frontend/src/pages/TeamPage.tsx @@ -3,10 +3,11 @@ // ======================================== // Main page for team execution - list/detail dual view with tabbed detail -import { useMemo } from 'react'; +import { useMemo, useEffect } from 'react'; import { useIntl } from 'react-intl'; -import { Package, MessageSquare, Maximize2, Minimize2, GitBranch } from 'lucide-react'; +import { Package, MessageSquare, Maximize2, Minimize2, GitBranch, AlertTriangle } from 'lucide-react'; import { Card, CardContent } from '@/components/ui/Card'; +import { Button } from '@/components/ui/Button'; import { cn } from '@/lib/utils'; import { useAppStore, selectIsImmersiveMode } from '@/stores/appStore'; import { TabsNavigation, type TabItem } from '@/components/ui/TabsNavigation'; @@ -43,7 +44,7 @@ export function TeamPage() { const toggleImmersiveMode = useAppStore((s) => s.toggleImmersiveMode); // Data hooks - const { teams } = useTeams(locationFilter); + const { teams, error: teamsError, isLoading: teamsLoading } = useTeams(locationFilter); const { messages, total: messageTotal } = useTeamMessages( viewMode === 'detail' ? selectedTeam : null, messageFilter @@ -58,6 +59,14 @@ export function TeamPage() { [teams, selectedTeam] ); + // Auto-reset to list view when in detail mode but team data is missing after loading + useEffect(() => { + if (viewMode === 'detail' && selectedTeam && !teamsLoading && teams.length > 0 && !teamData) { + // Team no longer exists or is filtered out, return to list + backToList(); + } + }, [viewMode, selectedTeam, teamsLoading, teams.length, teamData, backToList]); + // Derive dynamic pipeline stages and multi-phase info const stages = useMemo( () => @@ -77,6 +86,36 @@ export function TeamPage() { [teamData?.role_state] ); + // Error state - show error page with back button when API fails + if (teamsError && viewMode === 'detail') { + return ( +
+
+
+ +
+

+ {formatMessage({ id: 'team.error.loadFailed' })} +

+

+ {teamsError instanceof Error ? teamsError.message : String(teamsError)} +

+
+ + +
+
+
+ ); + } + // List view (also fallback when selected team data is not available) if (viewMode === 'list' || !selectedTeam || (viewMode === 'detail' && teams.length > 0 && !teamData)) { return (