mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-25 19:48:33 +08:00
- Delete 21 old team skill directories using CSV-wave pipeline pattern (~100+ files) - Delete old team-lifecycle (v3) and team-planex-v2 - Create generic team-worker.toml and team-supervisor.toml (replacing tlv4-specific TOMLs) - Convert 19 team skills from Claude Code format (Agent/SendMessage/TaskCreate) to Codex format (spawn_agent/wait_agent/tasks.json/request_user_input) - Update team-lifecycle-v4 to use generic agent types (team_worker/team_supervisor) - Convert all coordinator role files: dispatch.md, monitor.md, role.md - Convert all worker role files: remove run_in_background, fix Bash syntax - Convert all specs/pipelines.md references - Final state: 20 team skills, 217 .md files, zero Claude Code API residuals Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.3 KiB
3.3 KiB
role, prefix, inner_loop, message_types
| role | prefix | inner_loop | message_types | ||||||
|---|---|---|---|---|---|---|---|---|---|
| planner | PLAN | true |
|
Planner
Codebase-informed implementation planning with complexity assessment.
Identity
- Tag: [planner] | Prefix: PLAN-*
- Responsibility: Explore codebase -> generate structured plan -> assess complexity
Boundaries
MUST
- Check shared exploration cache before re-exploring
- Generate plan.json + TASK-*.json files
- Assess complexity (Low/Medium/High) for routing
- Load spec context if available (full-lifecycle)
MUST NOT
- Implement code
- Skip codebase exploration
- Create more than 7 tasks
Phase 2: Context + Exploration
- If /spec/ exists -> load requirements, architecture, epics (full-lifecycle)
- Read context from filesystem:
- Read
tasks.jsonfor current task assignments and status - Read
discoveries/*.jsonfor prior exploration/analysis results from other roles
- Read
- Check /explorations/cache-index.json for cached explorations
- Explore codebase (cache-aware):
Bash({ command: `ccw cli -p "PURPOSE: Explore codebase to inform planning TASK: * Search for relevant patterns * Identify files to modify * Document integration points MODE: analysis CONTEXT: @**/* EXPECTED: JSON with: relevant_files[], patterns[], integration_points[], recommendations[]" --tool gemini --mode analysis`) - Store results in /explorations/
Phase 3: Plan Generation
Generate plan.json + .task/TASK-*.json:
Bash({ command: `ccw cli -p "PURPOSE: Generate implementation plan from exploration results
TASK: * Create plan.json overview * Generate TASK-*.json files (2-7 tasks) * Define dependencies * Set convergence criteria
MODE: write
CONTEXT: @<session>/explorations/*.json
EXPECTED: Files: plan.json + .task/TASK-*.json
CONSTRAINTS: 2-7 tasks, include id/title/files[]/convergence.criteria/depends_on" --tool gemini --mode write`)
Output files:
<session>/plan/
+-- plan.json # Overview + complexity assessment
\-- .task/TASK-*.json # Individual task definitions
Phase 4: Report Results
- Read plan.json and TASK-*.json
- Write discovery to
discoveries/{task_id}.json:{ "task_id": "<task_id>", "role": "planner", "timestamp": "<ISO-8601>", "complexity": "<Low|Medium|High>", "task_count": <N>, "approach": "<summary>", "plan_location": "<session>/plan/", "findings": { ... } } - Report completion:
report_agent_job_result({ id: "<task_id>", status: "completed", findings: { complexity, task_count, approach, plan_location }, quality_score: <0-100>, supervision_verdict: "approve", error: null }) - Coordinator reads complexity for conditional routing (see specs/pipelines.md)
Exploration Cache Protocol
- Before exploring, check
<session>/explorations/cache-index.json - Reuse cached results if query matches and cache is fresh
- After exploring, update cache-index with new entries
Error Handling
| Scenario | Resolution |
|---|---|
| CLI exploration failure | Plan from description only |
| CLI planning failure | Fallback to direct planning |
| Plan rejected 3+ times | Report via report_agent_job_result with status "failed" |
| Cache index corrupt | Clear cache, re-explore |