feat: convert all codex agent definitions from .md to .toml format

Convert 20 agent .md files to Codex-native .toml format with proper
metadata (name, description, model, sandbox_mode, developer_instructions).
Update all 19 skill files to use agent_type references instead of .md
file paths. Remove "Read role definition" bootstrapping step from spawn
messages since TOML developer_instructions replaces it.

Agent format: YAML frontmatter + body → TOML with inline instructions
Calling schema: agent: "path.md" → agent_type: "toml_name"
Sandbox: read-only for exploration agents, workspace-write for executors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-03-24 17:39:29 +08:00
parent a525db14c7
commit d693f05b69
39 changed files with 299 additions and 431 deletions

View File

@@ -1,20 +1,10 @@
---
name: action-planning-agent
description: |
Pure execution agent for creating implementation plans based on provided requirements and control flags. This agent executes planning tasks without complex decision logic - it receives context and flags from command layer and produces actionable development plans.
name = "action_planning_agent"
description = "Pure execution agent for creating implementation plans based on provided requirements and control flags. This agent executes planning tasks without complex decision logic - it receives context and flags from command layer and produces actionable development plans."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: Command provides requirements with flags
user: "EXECUTION_MODE: DEEP_ANALYSIS_REQUIRED - Implement OAuth2 authentication system"
assistant: "I'll execute deep analysis and create a staged implementation plan"
commentary: Agent receives flags from command layer and executes accordingly
- Context: Standard planning execution
user: "Create implementation plan for: real-time notifications system"
assistant: "I'll create a staged implementation plan using provided context"
commentary: Agent executes planning based on provided requirements and context
color: yellow
---
developer_instructions = """
## Overview
@@ -878,3 +868,4 @@ Use `analysis_results.complexity` or task count to determine structure:
- Skip artifact integration when artifacts_inventory is provided
- Ignore MCP capabilities when available
- Use fixed pre-analysis steps without task-specific adaptation
"""

View File

@@ -1,11 +1,10 @@
---
name: cli-discuss-agent
description: |
Multi-CLI collaborative discussion agent with cross-verification and solution synthesis.
Orchestrates 5-phase workflow: Context Prep CLI Execution Cross-Verify Synthesize Output
color: magenta
allowed-tools: mcp__ace-tool__search_context(*), Bash(*), Read(*), Write(*), Glob(*), Grep(*)
---
name = "cli_discuss_agent"
description = "Multi-CLI collaborative discussion agent with cross-verification and solution synthesis."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """
You are a specialized CLI discussion agent that orchestrates multiple CLI tools to analyze tasks, cross-verify findings, and synthesize structured solutions.
@@ -389,3 +388,4 @@ Write({
4. Generate more than 4 clarification questions
5. Ignore previous round context
6. Assume solution without multi-CLI validation
"""

View File

@@ -1,10 +1,10 @@
---
name: cli-execution-agent
description: |
Intelligent CLI execution agent with automated context discovery and smart tool selection.
Orchestrates 5-phase workflow: Task Understanding Context Discovery Prompt Enhancement Tool Execution Output Routing
color: purple
---
name = "cli_execution_agent"
description = "Intelligent CLI execution agent with automated context discovery and smart tool selection."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
developer_instructions = """
You are an intelligent CLI execution specialist that autonomously orchestrates context discovery and optimal tool execution.
@@ -330,4 +330,5 @@ Codex unavailable → Gemini/Qwen write mode
**Memory** (`memory/`):
- `claude-module-unified.txt` - Universal module/file documentation
---
---
"""

View File

@@ -1,10 +1,10 @@
---
name: cli-explore-agent
description: |
Read-only code exploration agent with dual-source analysis strategy (Bash + Gemini CLI).
Orchestrates 4-phase workflow: Task Understanding Analysis Execution Schema Validation Output Generation
color: yellow
---
name = "cli_explore_agent"
description = "Read-only code exploration agent with dual-source analysis strategy (Bash + Gemini CLI)."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """
You are a specialized CLI exploration agent that autonomously analyzes codebases and generates structured outputs.
@@ -229,3 +229,4 @@ Brief summary:
**Consumption Pattern**:
- Plan phase: Fully consumes `exploration-notes.md`
- Execute phase: Consumes `exploration-notes-refined.md`, reduced noise, improved efficiency
"""

View File

@@ -1,16 +1,10 @@
---
name: cli-lite-planning-agent
description: |
Generic planning agent for lite-plan, collaborative-plan, and lite-fix workflows. Generates structured plan JSON based on provided schema reference.
name = "cli_lite_planning_agent"
description = "Generic planning agent for lite-plan, collaborative-plan, and lite-fix workflows. Generates structured plan JSON based on provided schema reference."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Core capabilities:
- Schema-driven output (plan-json-schema or fix-plan-json-schema)
- Task decomposition with dependency analysis
- CLI execution ID assignment for fork/merge strategies
- Multi-angle context integration (explorations or diagnoses)
- Process documentation (planning-context.md) for collaborative workflows
color: cyan
---
developer_instructions = """
You are a generic planning agent that generates structured plan JSON for lite workflows. Output format is determined by the schema reference provided in the prompt. You execute CLI planning tools (Gemini/Qwen), parse results, and generate planObject conforming to the specified schema.
@@ -904,3 +898,4 @@ After Phase 4 planObject generation:
5. **Return** Plan with `_metadata.quality_check` containing execution result
**CLI Fallback**: Gemini Qwen Skip with warning (if both fail)
"""

View File

@@ -1,20 +1,10 @@
---
name: cli-planning-agent
description: |
Specialized agent for executing CLI analysis tools (Gemini/Qwen) and dynamically generating task JSON files based on analysis results. Primary use case: test failure diagnosis and fix task generation in test-cycle-execute workflow.
name = "cli_planning_agent"
description = "Specialized agent for executing CLI analysis tools (Gemini/Qwen) and dynamically generating task JSON files based on analysis results. Primary use case: test failure diagnosis and fix task generation in test-cycle-execute workflow."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: Test failures detected (pass rate < 95%)
user: "Analyze test failures and generate fix task for iteration 1"
assistant: "Executing Gemini CLI analysis → Parsing fix strategy → Generating IMPL-fix-1.json"
commentary: Agent encapsulates CLI execution + result parsing + task generation
- Context: Coverage gap analysis
user: "Analyze coverage gaps and generate supplement test task"
assistant: "Executing CLI analysis for uncovered code paths → Generating test supplement task"
commentary: Agent handles both analysis and task JSON generation autonomously
color: purple
---
developer_instructions = """
You are a specialized execution agent that bridges CLI analysis tools with task generation. You execute Gemini/Qwen CLI commands for failure diagnosis, parse structured results, and dynamically generate task JSON files for downstream execution.
@@ -560,3 +550,4 @@ See: `.process/iteration-{iteration}-cli-output.txt`
estimated_complexity: "medium"
}
```
"""

View File

@@ -1,20 +1,10 @@
---
name: code-developer
description: |
Pure code execution agent for implementing programming tasks and writing corresponding tests. Focuses on writing, implementing, and developing code with provided context. Executes code implementation using incremental progress, test-driven development, and strict quality standards.
name = "code_developer"
description = "Pure code execution agent for implementing programming tasks and writing corresponding tests. Focuses on writing, implementing, and developing code with provided context. Executes code implementation using incremental progress, test-driven development, and strict quality standards."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: User provides task with sufficient context
user: "Implement email validation function following these patterns: [context]"
assistant: "I'll implement the email validation function using the provided patterns"
commentary: Execute code implementation directly with user-provided context
- Context: User provides insufficient context
user: "Add user authentication"
assistant: "I need to analyze the codebase first to understand the patterns"
commentary: Use Gemini to gather implementation context, then execute
color: blue
---
developer_instructions = """
You are a code execution specialist focused on implementing high-quality, production-ready code. You receive tasks with context and execute them efficiently using strict development standards.
@@ -514,4 +504,5 @@ Before completing any task, verify:
- Generate detailed summary documents with complete component/method listings
- Document all new interfaces, types, and constants for dependent task reference
### Windows Path Format Guidelines
- **Quick Ref**: `C:\Users` MCP: `C:\\Users` | Bash: `/c/Users` or `C:/Users`
- **Quick Ref**: `C:\Users` MCP: `C:\\Users` | Bash: `/c/Users` or `C:/Users`
"""

View File

@@ -1,27 +1,10 @@
---
name: conceptual-planning-agent
description: |
Specialized agent for dedicated single-role conceptual planning and brainstorming analysis. This agent executes assigned planning role perspective (system-architect, ui-designer, product-manager, etc.) with comprehensive role-specific analysis and structured documentation generation for brainstorming workflows.
name = "conceptual_planning_agent"
description = "Specialized agent for dedicated single-role conceptual planning and brainstorming analysis. This agent executes assigned planning role perspective (system-architect, ui-designer, product-manager, etc.) with comprehensive role-specific analysis and structured documentation generation for brainstorming workflows."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Use this agent for:
- Dedicated single-role brainstorming analysis (one agent = one role)
- Role-specific conceptual planning with user context integration
- Strategic analysis from assigned domain expert perspective
- Structured documentation generation in brainstorming workflow format
- Template-driven role analysis with planning role templates
- Comprehensive recommendations within assigned role expertise
Examples:
- Context: Auto brainstorm assigns system-architect role
auto.md: Assigns dedicated agent with ASSIGNED_ROLE: system-architect
agent: "I'll execute system-architect analysis for this topic, creating architecture-focused conceptual analysis in OUTPUT_LOCATION"
- Context: Auto brainstorm assigns ui-designer role
auto.md: Assigns dedicated agent with ASSIGNED_ROLE: ui-designer
agent: "I'll execute ui-designer analysis for this topic, creating UX-focused conceptual analysis in OUTPUT_LOCATION"
color: purple
---
developer_instructions = """
You are a conceptual planning specialist focused on **dedicated single-role** strategic thinking and requirement analysis for brainstorming workflows. Your expertise lies in executing **one assigned planning role** (system-architect, ui-designer, product-manager, etc.) with comprehensive analysis and structured documentation.
@@ -318,4 +301,4 @@ When analysis is complete, ensure:
**Strategies**: Be concise, use bullet points, reference don't repeat, prioritize top 3-5 items, defer details
**If exceeded**: Split essential vs nice-to-have, move extras to `analysis-appendix.md` (counts toward limit), use executive summary style
"""

View File

@@ -1,20 +1,10 @@
---
name: context-search-agent
description: |
Intelligent context collector for development tasks. Executes multi-layer file discovery, dependency analysis, and generates standardized context packages with conflict risk assessment.
name = "context_search_agent"
description = "Intelligent context collector for development tasks. Executes multi-layer file discovery, dependency analysis, and generates standardized context packages with conflict risk assessment."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
Examples:
- Context: Task with session metadata
user: "Gather context for implementing user authentication"
assistant: "I'll analyze project structure, discover relevant files, and generate context package"
commentary: Execute autonomous discovery with 3-source strategy
- Context: External research needed
user: "Collect context for Stripe payment integration"
assistant: "I'll search codebase, use Exa for API patterns, and build dependency graph"
commentary: Combine local search with external research
color: green
---
developer_instructions = """
You are a context discovery specialist focused on gathering relevant project information for development tasks. Execute multi-layer discovery autonomously to build comprehensive context packages.
@@ -587,3 +577,4 @@ Output: .workflow/session/{session}/.process/context-package.json
### Windows Path Format Guidelines
- **Quick Ref**: `C:\Users` MCP: `C:\\Users` | Bash: `/c/Users` or `C:/Users`
- **Context Package**: Use project-relative paths (e.g., `src/auth/service.ts`)
"""

View File

@@ -1,10 +1,10 @@
---
name: debug-explore-agent
description: |
Hypothesis-driven debugging agent with NDJSON logging, CLI-assisted analysis, and iterative verification.
Orchestrates 5-phase workflow: Bug Analysis Hypothesis Generation Instrumentation Log Analysis Fix Verification
color: orange
---
name = "debug_explore_agent"
description = "Hypothesis-driven debugging agent with NDJSON logging, CLI-assisted analysis, and iterative verification."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
developer_instructions = """
You are an intelligent debugging specialist that autonomously diagnoses bugs through evidence-based hypothesis testing and CLI-assisted analysis.
@@ -434,3 +434,4 @@ ${nextSteps}
- Timeout: Analysis 20min | Fix implementation 40min
---
"""

View File

@@ -1,20 +1,10 @@
---
name: doc-generator
description: |
Intelligent agent for generating documentation based on a provided task JSON with flow_control. This agent autonomously executes pre-analysis steps, synthesizes context, applies templates, and generates comprehensive documentation.
name = "doc_generator"
description = "Intelligent agent for generating documentation based on a provided task JSON with flow_control. This agent autonomously executes pre-analysis steps, synthesizes context, applies templates, and generates comprehensive documentation."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
<example>
Context: A task JSON with flow_control is provided to document a module.
user: "Execute documentation task DOC-001"
assistant: "I will execute the documentation task DOC-001. I'll start by running the pre-analysis steps defined in the flow_control to gather context, then generate the specified documentation files."
<commentary>
The agent is an intelligent, goal-oriented worker that follows instructions from the task JSON to autonomously generate documentation.
</commentary>
</example>
color: green
---
developer_instructions = """
You are an expert technical documentation specialist. Your responsibility is to autonomously **execute** documentation tasks based on a provided task JSON file. You follow `flow_control` instructions precisely, synthesize context, generate or execute documentation generation, and report completion. You do not make planning decisions.
@@ -331,4 +321,5 @@ Before completing the task, you must verify the following:
- **Assume Context**: Do not guess information; gather it autonomously through the `pre_analysis` steps.
- **Generate Code**: Your role is to document, not to implement.
- **Skip Quality Checks**: Always perform the full QA checklist before completing a task.
- **Mix Modes**: Do not generate content in CLI Mode or execute CLI in Agent Mode - respect the `cli_execute` flag.
- **Mix Modes**: Do not generate content in CLI Mode or execute CLI in Agent Mode - respect the `cli_execute` flag.
"""

View File

@@ -1,10 +1,10 @@
---
name: issue-plan-agent
description: |
Closed-loop issue planning agent combining ACE exploration and solution generation.
Receives issue IDs, explores codebase, generates executable solutions with 5-phase tasks.
color: green
---
name = "issue_plan_agent"
description = "Closed-loop issue planning agent combining ACE exploration and solution generation."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
developer_instructions = """
## Overview
@@ -415,3 +415,4 @@ Each line is a solution JSON containing tasks. Schema: `cat ~/.ccw/workflows/cli
1. Write solutions to `.workflow/issues/solutions/{issue-id}.jsonl`
2. Execute bind or return `pending_selection` based on solution count
3. Return JSON: `{ bound: [...], pending_selection: [...] }`
"""

View File

@@ -1,10 +1,10 @@
---
name: issue-queue-agent
description: |
Solution ordering agent for queue formation with Gemini CLI conflict analysis.
Receives solutions from bound issues, uses Gemini for intelligent conflict detection, produces ordered execution queue.
color: orange
---
name = "issue_queue_agent"
description = "Solution ordering agent for queue formation with Gemini CLI conflict analysis."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
developer_instructions = """
## Overview
@@ -309,3 +309,4 @@ Return brief summaries; full conflict details in separate files:
```
- `clarifications`: Only present if unresolved high-severity conflicts exist
- No markdown, no prose - PURE JSON only
"""

View File

@@ -1,8 +1,10 @@
---
name: memory-bridge
description: Execute complex project documentation updates using script coordination
color: purple
---
name = "memory_bridge"
description = "Execute complex project documentation updates using script coordination"
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
developer_instructions = """
You are a documentation update coordinator for complex projects. Orchestrate parallel CLAUDE.md updates efficiently and track every module.
@@ -93,4 +95,5 @@ Examples:
- Progress: Update TodoWrite for each depth
- End: "✅ Updated [count] CLAUDE.md files" + git status
**Do not explain, just execute efficiently.**
**Do not explain, just execute efficiently.**
"""

View File

@@ -1,23 +1,10 @@
---
name: tdd-developer
description: |
TDD-aware code execution agent specialized for Red-Green-Refactor workflows. Extends code-developer with TDD cycle awareness, automatic test-fix iteration, and CLI session resumption. Executes TDD tasks with phase-specific logic and test-driven quality gates.
name = "tdd_developer"
description = "TDD-aware code execution agent specialized for Red-Green-Refactor workflows. Extends code-developer with TDD cycle awareness, automatic test-fix iteration, and CLI session resumption. Executes TDD tasks with phase-specific logic and test-driven quality gates."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: TDD task with Red-Green-Refactor phases
user: "Execute TDD task IMPL-1 with test-first development"
assistant: "I'll execute the Red-Green-Refactor cycle with automatic test-fix iteration"
commentary: Parse TDD metadata, execute phases sequentially with test validation
- Context: Green phase with failing tests
user: "Green phase implementation complete but tests failing"
assistant: "Starting test-fix cycle (max 3 iterations) with Gemini diagnosis"
commentary: Iterative diagnosis and fix until tests pass or max iterations reached
color: green
extends: code-developer
tdd_aware: true
---
developer_instructions = """
You are a TDD-specialized code execution agent focused on implementing high-quality, test-driven code. You receive TDD tasks with Red-Green-Refactor cycles and execute them with phase-specific logic and automatic test validation.
@@ -510,3 +497,4 @@ if (taskJson.meta?.tdd_workflow) {
agent = "code-developer" // Use generic agent
}
```
"""

View File

@@ -1,19 +1,10 @@
---
name: test-action-planning-agent
description: |
Specialized agent extending action-planning-agent for test planning documents. Generates test task JSONs (IMPL-001, IMPL-001.3, IMPL-001.5, IMPL-002) with progressive L0-L3 test layers, AI code validation, and project-specific templates.
name = "test_action_planning_agent"
description = "Specialized agent extending action-planning-agent for test planning documents. Generates test task JSONs (IMPL-001, IMPL-001.3, IMPL-001.5, IMPL-002) with progressive L0-L3 test layers, AI code validation, and project-specific templates."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Inherits from: @action-planning-agent
See: d:\Claude_dms3\.claude\agents\action-planning-agent.md for base JSON schema and execution flow
Test-Specific Capabilities:
- Progressive L0-L3 test layers (Static, Unit, Integration, E2E)
- AI code issue detection (L0.5) with CRITICAL/ERROR/WARNING severity
- Project type templates (React, Node API, CLI, Library, Monorepo)
- Test anti-pattern detection with quality gates
- Layer completeness thresholds and coverage targets
color: cyan
---
developer_instructions = """
## Agent Inheritance
@@ -682,3 +673,4 @@ Hard Constraints:
- AI issue detection configured in IMPL-001.3
- Quality gates with measurable thresholds in IMPL-001.5
- Source session status reported (if applicable)
"""

View File

@@ -1,20 +1,10 @@
---
name: test-context-search-agent
description: |
Specialized context collector for test generation workflows. Analyzes test coverage, identifies missing tests, loads implementation context from source sessions, and generates standardized test-context packages.
name = "test_context_search_agent"
description = "Specialized context collector for test generation workflows. Analyzes test coverage, identifies missing tests, loads implementation context from source sessions, and generates standardized test-context packages."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
Examples:
- Context: Test session with source session reference
user: "Gather test context for WFS-test-auth session"
assistant: "I'll load source implementation, analyze test coverage, and generate test-context package"
commentary: Execute autonomous coverage analysis with source context loading
- Context: Multi-framework detection needed
user: "Collect test context for full-stack project"
assistant: "I'll detect Jest frontend and pytest backend frameworks, analyze coverage gaps"
commentary: Identify framework patterns and conventions for each stack
color: blue
---
developer_instructions = """
You are a test context discovery specialist focused on gathering test coverage information and implementation context for test generation workflows. Execute multi-phase analysis autonomously to build comprehensive test-context packages.
@@ -399,4 +389,4 @@ function detect_framework_from_config() {
- Valid test-context-package.json generated
- All missing tests catalogued with priority
- Execution time < 30 seconds (< 60s for large codebases)
"""

View File

@@ -1,25 +1,10 @@
---
name: test-fix-agent
description: |
Execute tests, diagnose failures, and fix code until all tests pass. This agent focuses on running test suites, analyzing failures, and modifying source code to resolve issues. When all tests pass, the code is considered approved and ready for deployment.
name = "test_fix_agent"
description = "Execute tests, diagnose failures, and fix code until all tests pass. This agent focuses on running test suites, analyzing failures, and modifying source code to resolve issues. When all tests pass, the code is considered approved and ready for deployment."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: After implementation with tests completed
user: "The authentication module implementation is complete with tests"
assistant: "I'll use the test-fix-agent to execute the test suite and fix any failures"
commentary: Use test-fix-agent to validate implementation through comprehensive test execution.
- Context: When tests are failing
user: "The integration tests are failing for the payment module"
assistant: "I'll have the test-fix-agent diagnose the failures and fix the source code"
commentary: test-fix-agent analyzes test failures and modifies code to resolve them.
- Context: Continuous validation
user: "Run the full test suite and ensure everything passes"
assistant: "I'll use the test-fix-agent to execute all tests and fix any issues found"
commentary: test-fix-agent serves as the quality gate - passing tests = approved code.
color: green
---
developer_instructions = """
You are a specialized **Test Execution & Fix Agent**. Your purpose is to execute test suites across multiple layers (Static, Unit, Integration, E2E), diagnose failures with layer-specific context, and fix source code until all tests pass. You operate with the precision of a senior debugging engineer, ensuring code quality through comprehensive multi-layered test validation.
@@ -368,4 +353,5 @@ jq --arg ts "$(date -Iseconds)" '.status="completed" | .status_history += [{"fro
**Tests passing = Code approved = Mission complete**
### Windows Path Format Guidelines
- **Quick Ref**: `C:\Users` MCP: `C:\\Users` | Bash: `/c/Users` or `C:/Users`
- **Quick Ref**: `C:\Users` MCP: `C:\\Users` | Bash: `/c/Users` or `C:/Users`
"""

View File

@@ -1,29 +1,10 @@
---
name: ui-design-agent
description: |
Specialized agent for UI design token management and prototype generation with W3C Design Tokens Format compliance.
name = "ui_design_agent"
description = "Specialized agent for UI design token management and prototype generation with W3C Design Tokens Format compliance."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Core capabilities:
- W3C Design Tokens Format implementation with $type metadata and structured values
- State-based component definitions (default, hover, focus, active, disabled)
- Complete component library coverage (12+ interactive components)
- Animation-component state integration with keyframe mapping
- Optimized layout templates (single source of truth, zero redundancy)
- WCAG AA compliance validation and accessibility patterns
- Token-driven prototype generation with semantic markup
- Cross-platform responsive design (mobile, tablet, desktop)
Integration points:
- Exa MCP: Design trend research (web search), code implementation examples (code search), accessibility patterns
Key optimizations:
- Eliminates color definition redundancy via light/dark mode values
- Structured component styles replacing CSS class strings
- Unified layout structure (DOM + styling co-located)
- Token reference integrity validation ({token.path} syntax)
color: orange
---
developer_instructions = """
You are a specialized **UI Design Agent** that executes design generation tasks autonomously to produce production-ready design systems and prototypes.
@@ -593,3 +574,4 @@ mcp__exa__get_code_context_exa(
outline-offset: 2px;
}
```
"""

View File

@@ -1,20 +1,10 @@
---
name: universal-executor
description: |
Versatile execution agent for implementing any task efficiently. Adapts to any domain while maintaining quality standards and systematic execution. Can handle analysis, implementation, documentation, research, and complex multi-step workflows.
name = "universal_executor"
description = "Versatile execution agent for implementing any task efficiently. Adapts to any domain while maintaining quality standards and systematic execution. Can handle analysis, implementation, documentation, research, and complex multi-step workflows."
model = "gpt-5.4"
model_reasoning_effort = "high"
sandbox_mode = "workspace-write"
Examples:
- Context: User provides task with sufficient context
user: "Analyze market trends and create presentation following these guidelines: [context]"
assistant: "I'll analyze the market trends and create the presentation using the provided guidelines"
commentary: Execute task directly with user-provided context
- Context: User provides insufficient context
user: "Organize project documentation"
assistant: "I need to understand the current documentation structure first"
commentary: Gather context about existing documentation, then execute
color: green
---
developer_instructions = """
You are a versatile execution specialist focused on completing high-quality tasks efficiently across any domain. You receive tasks with context and execute them systematically using proven methodologies.
@@ -132,4 +122,5 @@ Before completing any task, verify:
- Handle edge cases appropriately
- Keep tasks focused and manageable
- Generate detailed summary documents with complete deliverable listings
- Document all key outputs and integration points for dependent tasks
- Document all key outputs and integration points for dependent tasks
"""

View File

@@ -20,7 +20,7 @@ Interactive brainstorming workflow with **documented thought evolution**. Expand
**Codex-Specific Features**:
- Parallel subagent execution via `spawn_agent` + batch `wait({ ids: [...] })`
- Role loading via path (agent reads `~/.codex/agents/*.md` itself)
- Role loading via TOML agent definition (agent_type parameter in spawn_agent)
- Deep interaction with `send_input` for multi-round refinement within single agent
- Explicit lifecycle management with `close_agent`
@@ -208,12 +208,10 @@ Generate key questions that guide the brainstorming exploration. Use a subagent
```javascript
const vectorAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
---
## Context
@@ -302,9 +300,9 @@ Spawn 3 perspective agents in parallel: Creative + Pragmatic + Systematic.
| Perspective | Role File | Focus |
|-------------|-----------|-------|
| Creative | `~/.codex/agents/cli-explore-agent.md` | Innovation, cross-domain inspiration, challenging assumptions |
| Pragmatic | `~/.codex/agents/cli-explore-agent.md` | Implementation feasibility, effort estimates, blockers |
| Systematic | `~/.codex/agents/cli-explore-agent.md` | Problem decomposition, patterns, scalability |
| Creative | `cli_explore_agent` | Innovation, cross-domain inspiration, challenging assumptions |
| Pragmatic | `cli_explore_agent` | Implementation feasibility, effort estimates, blockers |
| Systematic | `cli_explore_agent` | Problem decomposition, patterns, scalability |
**Parallel Subagent Execution**:
@@ -353,13 +351,13 @@ const perspectives = [
// Parallel spawn - all agents start immediately
const agentIds = perspectives.map(perspective => {
return spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Run: `ccw spec load --category "exploration planning"`
3. Read project tech context from loaded specs
1. Run: `ccw spec load --category "exploration planning"`
2. Read project tech context from loaded specs
---
@@ -560,13 +558,13 @@ const deepDiveResult = wait({ ids: [perspectiveAgent], timeout_ms: 600000 })
```javascript
const deepDiveAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: ${sessionFolder}/perspectives.json (prior findings)
3. Run: `ccw spec load --category "exploration planning"`
1. Read: ${sessionFolder}/perspectives.json (prior findings)
2. Run: `ccw spec load --category "exploration planning"`
---
@@ -606,12 +604,12 @@ When user selects "challenge", spawn a dedicated challenge agent.
```javascript
const challengeAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: ${sessionFolder}/perspectives.json (ideas to challenge)
1. Read: ${sessionFolder}/perspectives.json (ideas to challenge)
---
@@ -659,12 +657,12 @@ When user selects "merge", synthesize complementary ideas.
```javascript
const mergeAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: ${sessionFolder}/perspectives.json (source ideas)
1. Read: ${sessionFolder}/perspectives.json (source ideas)
---
@@ -888,7 +886,7 @@ Dimensions guide brainstorming scope and focus:
```javascript
// Safe parallel execution with error handling
try {
const agentIds = perspectives.map(p => spawn_agent({ message: buildPrompt(p) }))
const agentIds = perspectives.map(p => spawn_agent({ agent_type: "cli_explore_agent", message: buildPrompt(p) }))
const results = wait({ ids: agentIds, timeout_ms: 600000 })
@@ -1014,7 +1012,7 @@ Final synthesis:
### Codex Subagent Best Practices
1. **Role Path, Not Content**: Pass `~/.codex/agents/*.md` path in message, let agent read itself
1. **Agent Type, Not Path**: Use `agent_type` parameter in spawn_agent, not manual file path reading
2. **Parallel for Perspectives**: Use batch spawn + wait for 3 perspective agents
3. **Delay close_agent for Refinement**: Keep perspective agents alive for `send_input` reuse
4. **Batch wait**: Use `wait({ ids: [a, b, c] })` for parallel agents, not sequential waits

View File

@@ -69,7 +69,7 @@ Dual-mode brainstorming with CSV-driven parallel role analysis. Auto mode runs a
│ ═══ Single Role Mode ═══ │
│ │
│ Phase 3S: Single Role Analysis (spawn_agent) │
│ ├─ spawn_agent(conceptual-planning-agent) │
│ ├─ spawn_agent(conceptual_planning_agent) │
│ └─ Output: {role}/analysis*.md │
│ │
└──────────────────────────────────────────────────────────────────┘
@@ -536,7 +536,7 @@ if (executionMode === 'single-role') {
Bash(`mkdir -p "${roleDir}"`)
const agentId = spawn_agent({
agent: `~/.codex/agents/conceptual-planning-agent.md`,
agent_type: "conceptual_planning_agent",
instruction: `
Perform a ${roleName} analysis for the brainstorming session.
@@ -594,7 +594,7 @@ Follow the same analysis protocol as wave role analysis but with interactive ref
```javascript
const synthesisAgent = spawn_agent({
agent: `~/.codex/agents/conceptual-planning-agent.md`,
agent_type: "conceptual_planning_agent",
instruction: `
## SYNTHESIS ASSIGNMENT

View File

@@ -159,12 +159,12 @@ let exploreAgent = null
try {
// Launch cli-explore-agent
exploreAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS
1. Read: ~/.codex/agents/cli-explore-agent.md
2. Read: ${projectRoot}/.workflow/project-tech.json (if exists)
1. Read: ${projectRoot}/.workflow/project-tech.json (if exists)
## Task Objective
Discover stale artifacts for cleanup.

View File

@@ -229,13 +229,13 @@ Create a new subagent with task assignment.
```javascript
const agentId = spawn_agent({
agent_type: "{agent_type}",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/{agent-type}.md (MUST read first)
2. Execute: ccw spec load --category exploration
3. Execute: ccw spec load --category debug (known issues cross-reference)
1. Execute: ccw spec load --category exploration
2. Execute: ccw spec load --category debug (known issues cross-reference)
## TASK CONTEXT
${taskContext}

View File

@@ -114,13 +114,13 @@ const perspectiveAgents = [];
selectedPerspectives.forEach(perspective => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: {projectRoot}/.workflow/project-tech.json
3. Read: {projectRoot}/.workflow/specs/*.md
1. Read: {projectRoot}/.workflow/project-tech.json
2. Read: {projectRoot}/.workflow/specs/*.md
---
@@ -192,13 +192,13 @@ agentIds.forEach(id => close_agent({ id }));
// Only spawn if perspective requires external research
if (selectedPerspectives.includes('security') || selectedPerspectives.includes('best-practices') || args.external) {
const exaAgentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: {projectRoot}/.workflow/project-tech.json
3. Read: {projectRoot}/.workflow/specs/*.md
1. Read: {projectRoot}/.workflow/project-tech.json
2. Read: {projectRoot}/.workflow/specs/*.md
---

View File

@@ -234,6 +234,7 @@ while (shouldContinue && iteration < maxIterations) {
iterationPlan.dimensions.forEach(dimension => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: buildDimensionPromptWithACE(dimension, iteration, cumulativeFindings, iterationAceResults, iterationDir)
});
dimensionAgents.push({ agentId, dimension });
@@ -413,12 +414,11 @@ function buildDimensionPromptWithACE(dimension, iteration, previousFindings, ace
);
return `
## TASK ASSIGNMENT
## TASK ASSIGNMENT (agent_type: cli_explore_agent)
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: {projectRoot}/.workflow/project-tech.json
3. Read: {projectRoot}/.workflow/specs/*.md
1. Read: {projectRoot}/.workflow/project-tech.json
2. Read: {projectRoot}/.workflow/specs/*.md
---

View File

@@ -80,12 +80,12 @@ Cross-reference the task description against these documents for completeness.
const focusDirective = getAgentFocusDirective('ra', state)
return spawn_agent({
agent_type: "requirements_analyst",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/requirements-analyst.md
2. Read: ${projectRoot}/.workflow/project-tech.json (if exists)
1. Read: ${projectRoot}/.workflow/project-tech.json (if exists)
3. Read: ${projectRoot}/.workflow/specs/*.md (if exists)
4. Read: ${projectRoot}/.workflow/.cycle/${cycleId}.progress/coordination/feedback.md (if exists)
@@ -163,12 +163,12 @@ PHASE_RESULT:
```javascript
function spawnEPAgent(cycleId, state, progressDir) {
return spawn_agent({
agent_type: "exploration_planner",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/exploration-planner.md
2. Read: ${projectRoot}/.workflow/project-tech.json
1. Read: ${projectRoot}/.workflow/project-tech.json
3. Read: ${projectRoot}/.workflow/specs/*.md
4. Read: ${progressDir}/ra/requirements.md
@@ -242,12 +242,12 @@ PHASE_RESULT:
```javascript
function spawnCDAgent(cycleId, state, progressDir) {
return spawn_agent({
agent_type: "code_developer",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/code-developer.md
2. Read: ${progressDir}/ep/plan.json
1. Read: ${progressDir}/ep/plan.json
3. Read: ${progressDir}/ra/requirements.md
---
@@ -320,12 +320,12 @@ PHASE_RESULT:
```javascript
function spawnVASAgent(cycleId, state, progressDir) {
return spawn_agent({
agent_type: "validation_archivist",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/validation-archivist.md
2. Read: ${progressDir}/cd/changes.log
1. Read: ${progressDir}/cd/changes.log
---

View File

@@ -50,7 +50,7 @@ Unified multi-dimensional code review orchestrator with dual-mode (session/modul
3. **Progressive Phase Loading**: Phase docs are read on-demand when that phase executes, not all at once
4. **Auto-Continue**: All phases run autonomously without user intervention between phases
5. **Subagent Lifecycle**: Explicit lifecycle management with spawn_agent → wait → close_agent
6. **Role Path Loading**: Subagent roles loaded via path reference in MANDATORY FIRST STEPS
6. **Role via agent_type**: Subagent roles loaded via TOML `agent_type` parameter in spawn_agent (e.g., `"cli_explore_agent"`)
7. **Optional Fix Pipeline**: Phase 6-9 triggered only by explicit `--fix` flag or user confirmation after Phase 5
8. **Content Preservation**: All agent prompts, code, schemas preserved verbatim from source commands
@@ -298,12 +298,12 @@ Create a new subagent with task assignment.
```javascript
const agentId = spawn_agent({
agent_type: "{agent_type}", // TOML agent definition name (e.g., "cli_explore_agent")
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/{agent-type}.md (MUST read first)
2. Execute: ccw spec load --category "exploration execution"
1. Execute: ccw spec load --category "exploration execution"
---

View File

@@ -85,17 +85,17 @@ const dimensions = ['security', 'architecture', 'quality', 'action-items', 'perf
dimensions.forEach(dimension => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read review state: ${reviewStateJsonPath}
3. Get target files: Read resolved_files from review-state.json
4. Validate file access: bash(ls -la ${targetFiles.join(' ')})
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
7. Execute: ccw spec load --category review (review standards and checklists)
1. Read review state: ${reviewStateJsonPath}
2. Get target files: Read resolved_files from review-state.json
3. Validate file access: bash(ls -la ${targetFiles.join(' ')})
4. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
5. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
6. Execute: ccw spec load --category review (review standards and checklists)
---
@@ -124,7 +124,7 @@ Use **Deep Scan mode** for this review:
## Expected Deliverables
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 4, follow schema exactly
1. Dimension Results JSON: ${outputDir}/dimensions/${dimension}.json
@@ -207,18 +207,18 @@ const dimensions = ['security', 'architecture', 'quality', 'action-items', 'perf
dimensions.forEach(dimension => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read session metadata: ${sessionMetadataPath}
3. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
4. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
5. Read review state: ${reviewStateJsonPath}
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
7. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
8. Execute: ccw spec load --category review (review standards and checklists)
1. Read session metadata: ${sessionMetadataPath}
2. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
3. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
4. Read review state: ${reviewStateJsonPath}
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
7. Execute: ccw spec load --category review (review standards and checklists)
---
@@ -247,7 +247,7 @@ Use **Deep Scan mode** for this review:
## Expected Deliverables
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
1. Dimension Results JSON: ${outputDir}/dimensions/${dimension}.json
@@ -326,18 +326,18 @@ reviewAgents.forEach(id => close_agent({ id }));
```javascript
// Spawn deep-dive agent
const deepDiveAgentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read original finding: ${dimensionJsonPath}
3. Read affected file: ${file}
4. Identify related code: bash(grep -r "import.*${basename(file)}" ${projectDir}/src --include="*.ts")
5. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
7. Execute: ccw spec load --category "exploration execution" (technology stack and constraints for remediation)
8. Execute: ccw spec load --category review (review standards and checklists)
1. Read original finding: ${dimensionJsonPath}
2. Read affected file: ${file}
3. Identify related code: bash(grep -r "import.*${basename(file)}" ${projectDir}/src --include="*.ts")
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints for remediation)
7. Execute: ccw spec load --category review (review standards and checklists)
---
@@ -372,7 +372,7 @@ Then apply **Deep Scan mode** for semantic analysis:
## Expected Deliverables
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${findingId}.json

View File

@@ -79,18 +79,18 @@ const deepDiveAgents = [];
selectedFindings.forEach(finding => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read original finding: ${dimensionJsonPath}
3. Read affected file: ${finding.file}
4. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${projectDir}/src --include="*.ts")
5. Read test files: bash(find ${projectDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
7. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
8. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
1. Read original finding: ${dimensionJsonPath}
2. Read affected file: ${finding.file}
3. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${projectDir}/src --include="*.ts")
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
6. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
7. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
---
@@ -125,7 +125,7 @@ Then apply **Deep Scan mode** for semantic analysis:
## Expected Deliverables
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${finding.id}.json
@@ -190,18 +190,18 @@ const deepDiveAgents = [];
selectedFindings.forEach(finding => {
const agentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read original finding: ${dimensionJsonPath}
3. Read affected file: ${finding.file}
4. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${workflowDir}/src --include="*.ts")
5. Read test files: bash(find ${workflowDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
7. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
8. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
1. Read original finding: ${dimensionJsonPath}
2. Read affected file: ${finding.file}
3. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${workflowDir}/src --include="*.ts")
4. Read test files: bash(find ${workflowDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
6. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
7. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
---
@@ -237,7 +237,7 @@ Then apply **Deep Scan mode** for semantic analysis:
## Expected Deliverables
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${finding.id}.json

View File

@@ -100,12 +100,12 @@ for (let i = 1; i <= aggregatedPlan.groups.length; i++) {
```javascript
// Spawn planning agent for a batch
const agentId = spawn_agent({
agent_type: "cli_planning_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-planning-agent.md (MUST read first)
2. Execute: ccw spec load --category planning
1. Execute: ccw spec load --category planning
---

View File

@@ -55,12 +55,12 @@ if (result.passRate < 100%) {
```javascript
// Spawn execution agent for a group
const execAgentId = spawn_agent({
agent_type: "cli_execution_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-execution-agent.md (MUST read first)
2. Execute: ccw spec load --category execution
1. Execute: ccw spec load --category execution
---

View File

@@ -39,13 +39,13 @@ Create a new subagent with task assignment.
```javascript
const agentId = spawn_agent({
agent_type: "{agent_type}",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/{agent-type}.md (MUST read first)
2. Read: .workflow/project-tech.json
3. Read: .workflow/project-guidelines.json
1. Read: .workflow/project-tech.json
2. Read: .workflow/project-guidelines.json
## TASK CONTEXT
${taskContext}
@@ -502,13 +502,13 @@ Bash(`mkdir -p ${sessionFolder}`)
if (hasCodebase !== 'none') {
const exploreAgentId = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: .workflow/project-tech.json
3. Read: .workflow/project-guidelines.json
1. Read: .workflow/project-tech.json
2. Read: .workflow/project-guidelines.json
---
@@ -553,13 +553,13 @@ Return findings as JSON with schema:
2. **Execute Decomposition Agent**
```javascript
const decompositionAgentId = spawn_agent({
agent_type: "cli_roadmap_plan_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-roadmap-plan-agent.md (MUST read first)
2. Read: .workflow/project-tech.json
3. Read: .workflow/project-guidelines.json
1. Read: .workflow/project-tech.json
2. Read: .workflow/project-guidelines.json
---

View File

@@ -122,12 +122,12 @@ let exploreAgent = null
try {
exploreAgent = spawn_agent({
agent_type: "cli_explore_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
2. Read: .workflow/project-tech.json (if exists, for --regenerate)
1. Read: .workflow/project-tech.json (if exists, for --regenerate)
---

View File

@@ -242,7 +242,7 @@ console.log(`Session: ${sessionId}`)
console.log(`\n## Phase 2: Context Gathering\n`)
const ctxAgent = spawn_agent({
agent: `~/.codex/agents/context-search-agent.md`,
agent_type: "context_search_agent",
instruction: `
Gather implementation context for planning.
@@ -376,7 +376,7 @@ TASK DESCRIPTION: ${taskDescription}" --tool gemini --mode analysis --rule analy
```javascript
if (!isMultiModule) {
const planAgent = spawn_agent({
agent: `~/.codex/agents/action-planning-agent.md`,
agent_type: "action_planning_agent",
instruction: `
Generate implementation plan and task JSONs.
@@ -421,7 +421,7 @@ ${contextPkg.conflict_risk === 'medium' || contextPkg.conflict_risk === 'high'
const mod = uniqueModules[i]
const agentId = spawn_agent({
agent: `~/.codex/agents/action-planning-agent.md`,
agent_type: "action_planning_agent",
instruction: `
Plan module: ${mod} (prefix: ${prefix})
@@ -444,7 +444,7 @@ Mark cross-module dependencies as CROSS::${'{module}'}::${'{task}'}
// +1 Coordinator: integrate all modules
const coordAgent = spawn_agent({
agent: `~/.codex/agents/action-planning-agent.md`,
agent_type: "action_planning_agent",
instruction: `
Integrate ${uniqueModules.length} module plans into unified IMPL_PLAN.md.
@@ -576,7 +576,7 @@ if (mode === 'replan') {
// 2. Replan via agent
const replanAgent = spawn_agent({
agent: `~/.codex/agents/action-planning-agent.md`,
agent_type: "action_planning_agent",
instruction: `
Replan ${scope === 'task' ? `task ${replanTaskId}` : 'entire session'}.

View File

@@ -269,7 +269,7 @@ console.log(`Session: ${sessionId}`)
console.log(`\n## Phase 2: Context Gathering\n`)
const ctxAgent = spawn_agent({
agent: `~/.codex/agents/context-search-agent.md`,
agent_type: "context_search_agent",
instruction: `
Gather implementation context for TDD planning.
@@ -329,7 +329,7 @@ console.log(` Context gathered. Conflict risk: ${conflictRisk}`)
console.log(`\n## Phase 3: Test Coverage Analysis\n`)
const testAgent = spawn_agent({
agent: `~/.codex/agents/cli-explore-agent.md`,
agent_type: "cli_explore_agent",
instruction: `
Analyze test coverage and framework for TDD planning.
@@ -452,7 +452,7 @@ TASK DESCRIPTION: ${taskDescription}" --tool gemini --mode analysis --rule analy
console.log(`\n## Phase 5: TDD Task Generation\n`)
const planAgent = spawn_agent({
agent: `~/.codex/agents/action-planning-agent.md`,
agent_type: "action_planning_agent",
instruction: `
Generate TDD implementation plan with Red-Green-Refactor cycles.
@@ -628,7 +628,7 @@ if (mode === 'verify' || /* auto-verify from Phase 6 */) {
}
const verifyAgent = spawn_agent({
agent: `~/.codex/agents/cli-explore-agent.md`,
agent_type: "cli_explore_agent",
instruction: `
Verify TDD compliance across 4 dimensions.

View File

@@ -83,12 +83,12 @@ Create a new subagent with task assignment.
```javascript
const agentId = spawn_agent({
agent_type: "{agent_type}",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/{agent-type}.md (MUST read first)
2. Run: `ccw spec load --category "planning execution"`
1. Run: `ccw spec load --category "planning execution"`
## TASK CONTEXT
${taskContext}
@@ -241,10 +241,10 @@ Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md)
5. Phase 1 Summary → **⛔ MANDATORY: Present plan and wait for user confirmation before Phase 2**
**Agents Used** (via spawn_agent):
- `test-context-search-agent` (~/.codex/agents/test-context-search-agent.md) - Context gathering (Session Mode)
- `context-search-agent` (~/.codex/agents/context-search-agent.md) - Context gathering (Prompt Mode)
- `cli-execution-agent` (~/.codex/agents/cli-execution-agent.md) - Test analysis with Gemini
- `action-planning-agent` (~/.codex/agents/action-planning-agent.md) - Task JSON generation
- `test_context_search_agent` (agent_type: test_context_search_agent) - Context gathering (Session Mode)
- `context_search_agent` (agent_type: context_search_agent) - Context gathering (Prompt Mode)
- `cli_execution_agent` (agent_type: cli_execution_agent) - Test analysis with Gemini
- `action_planning_agent` (agent_type: action_planning_agent) - Task JSON generation
### Phase 2: Test-Cycle Execution
@@ -256,8 +256,8 @@ Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md)
3. Completion - Final validation → Summary → Auto-complete session
**Agents Used** (via spawn_agent):
- `cli-planning-agent` (~/.codex/agents/cli-planning-agent.md) - Failure analysis, root cause extraction, fix task generation
- `test-fix-agent` (~/.codex/agents/test-fix-agent.md) - Test execution, code fixes, criticality assignment
- `cli_planning_agent` (agent_type: cli_planning_agent) - Failure analysis, root cause extraction, fix task generation
- `test_fix_agent` (agent_type: test_fix_agent) - Test execution, code fixes, criticality assignment
**Strategy Engine**: conservative (iteration 1-2) → aggressive (pass >80%) → surgical (regression)
@@ -387,14 +387,14 @@ try {
- None for Prompt Mode
**Phase 1 Agents** (used by phases/01-test-fix-gen.md via spawn_agent):
- `test-context-search-agent` (~/.codex/agents/test-context-search-agent.md) - Test coverage analysis (Session Mode)
- `context-search-agent` (~/.codex/agents/context-search-agent.md) - Codebase analysis (Prompt Mode)
- `cli-execution-agent` (~/.codex/agents/cli-execution-agent.md) - Test requirements with Gemini
- `action-planning-agent` (~/.codex/agents/action-planning-agent.md) - Task JSON generation
- `test_context_search_agent` (agent_type: test_context_search_agent) - Test coverage analysis (Session Mode)
- `context_search_agent` (agent_type: context_search_agent) - Codebase analysis (Prompt Mode)
- `cli_execution_agent` (agent_type: cli_execution_agent) - Test requirements with Gemini
- `action_planning_agent` (agent_type: action_planning_agent) - Task JSON generation
**Phase 2 Agents** (used by phases/02-test-cycle-execute.md via spawn_agent):
- `cli-planning-agent` (~/.codex/agents/cli-planning-agent.md) - CLI analysis, root cause extraction, task generation
- `test-fix-agent` (~/.codex/agents/test-fix-agent.md) - Test execution, code fixes, criticality assignment
- `cli_planning_agent` (agent_type: cli_planning_agent) - CLI analysis, root cause extraction, task generation
- `test_fix_agent` (agent_type: test_fix_agent) - Test execution, code fixes, criticality assignment
**Follow-up**:
- Session sync: `$session-sync -y "Test-fix cycle complete: {pass_rate}% pass rate"`

View File

@@ -70,13 +70,13 @@ if (input.startsWith("WFS-")) {
```javascript
// Session Mode - gather from source session via test-context-search-agent
const contextAgentId = spawn_agent({
agent_type: "test_context_search_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/test-context-search-agent.md (MUST read first)
2. Run: `ccw spec load --category planning`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category planning`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---
@@ -97,13 +97,13 @@ close_agent({ id: contextAgentId });
// Prompt Mode - gather from codebase via context-search-agent
const contextAgentId = spawn_agent({
agent_type: "context_search_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/context-search-agent.md (MUST read first)
2. Run: `ccw spec load --category planning`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category planning`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---
@@ -171,13 +171,13 @@ close_agent({ id: contextAgentId });
```javascript
const analysisAgentId = spawn_agent({
agent_type: "cli_execution_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-execution-agent.md (MUST read first)
2. Run: `ccw spec load --category planning`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category planning`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---
@@ -240,13 +240,13 @@ close_agent({ id: analysisAgentId });
```javascript
const taskGenAgentId = spawn_agent({
agent_type: "action_planning_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/action-planning-agent.md (MUST read first)
2. Run: `ccw spec load --category planning`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category planning`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---

View File

@@ -85,13 +85,13 @@ return "conservative";
```javascript
// Spawn agent for failure analysis
const analysisAgentId = spawn_agent({
agent_type: "cli_planning_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/cli-planning-agent.md (MUST read first)
2. Run: `ccw spec load --category planning`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category planning`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---
@@ -152,13 +152,13 @@ close_agent({ id: analysisAgentId });
```javascript
// Spawn agent for test execution/fixing
const fixAgentId = spawn_agent({
agent_type: "test_fix_agent",
message: `
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: ~/.codex/agents/test-fix-agent.md (MUST read first)
2. Run: `ccw spec load --category execution`
3. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
1. Run: `ccw spec load --category execution`
2. Run: `ccw spec load --category test` (test framework, coverage targets, conventions)
---