name: coder description: | Implementation agent. Plans, implements, and runs build + tests in a bounded fix-loop until verified. Designed to be delegated to by sisyphus. version: "1.0" global_tools: - fs_cat.sh - fs_ls.sh - fs_write.sh - fs_patch.sh - execute_command.sh skills_enabled: true enabled_skills: - ai-slop-remover - code-review - git-master - frontend-ui-ux - verification-gates variables: - name: project_dir description: | Absolute path to the project directory. Defaults to "." which is the directory you invoked `coyote` from. Override at runtime with `coyote -a coder --agent-variable project_dir /abs/path "..."`. default: "." settings: max_loop_iterations: 20 log_state_snapshots: true validate_before_run: true timeout: 1800 initial_state: project_dir: "" fix_attempts: 0 max_fix_attempts: 3 fix_instructions: "" build_output: "" tests_output: "" last_node_output: "" plan_summary: "" files_to_modify: [] files_to_create: [] risks: [] complexity_score: 0 review_attempts: 0 max_review_attempts: 1 review_clean: true review_notes: "" start: resolve_paths nodes: resolve_paths: id: resolve_paths type: script description: Resolve project_dir to an absolute path from the agent variable script: scripts/resolve_paths.sh timeout: 5 fallback: end_failure analyze_request: id: analyze_request type: llm description: Extract a structured plan and complexity score from the orchestrator's prompt instructions: | You are a senior engineer's planning assistant. Read the orchestrator's request and emit a structured plan. You only plan. You never edit files. Score complexity from 1 to 10: 1-3: trivial - single file, <=20 lines changed, obvious approach 4-6: moderate - 2-5 files, clear approach, some pattern matching 7-10: complex - multi-component, ambiguous tradeoffs, refactoring, or wide blast radius Be specific in `files_to_modify` and `files_to_create`. All paths MUST be absolute. The project root is {{project_dir}}. Prefer paths like "{{project_dir}}/src/foo.rs" over "src/foo.rs". The implementer uses these paths directly with fs_write and fs_patch tools, which resolve relative paths against the coyote invocation directory (NOT the project dir). Empty arrays are fine if no files in that category. `risks` is a list of short strings. Anything that could derail the implementation: unknown dependencies, brittle tests, blast radius, etc. Empty list is fine. Project directory: {{project_dir}} prompt: "{{initial_prompt}}" tools: [] output_schema: type: object properties: plan_summary: type: string description: 1-3 sentences summarizing what will be done files_to_modify: type: array items: {type: string} files_to_create: type: array items: {type: string} complexity_score: type: integer minimum: 1 maximum: 10 risks: type: array items: {type: string} required: [plan_summary, files_to_modify, files_to_create, complexity_score, risks] state_updates: last_node_output: "{{output}}" fallback: end_failure next: route_complexity route_complexity: id: route_complexity type: script description: Route to approval gate for complex plans; skip otherwise script: scripts/route_complexity.sh timeout: 5 fallback: implement gate_approval: id: gate_approval type: approval description: Optional human checkpoint for high-complexity plans question: | ## Plan {{plan_summary}} ## Files to modify {{files_to_modify}} ## Files to create {{files_to_create}} ## Risks {{risks}} Complexity: {{complexity_score}}/10 Approve this plan? options: - "yes" - "no" routes: "yes": implement "no": end_rejected on_other: end_rejected implement: id: implement type: llm description: Write code via fs tools. Bounded tool-call loop. skills_enabled: true enabled_skills: - ai-slop-remover - code-review - git-master - frontend-ui-ux - verification-gates instructions: | You are a senior engineer. Implement the plan by writing code via tools. Follow existing patterns in the codebase. ## Skills Use `skill__list` to see what's available, then `skill__load` the ones that fit the work: `ai-slop-remover` always, `frontend-ui-ux` when touching UI, `git-master` when touching history, `verification-gates` to remember what evidence is required. Unload when a phase ends. ## Writing code 1. Use `fs_patch` for surgical edits to existing files. 2. Use `fs_write` for new files or full rewrites. 3. NEVER write files via `execute_command`. Do not use `cat >`, `cat >>`, `echo >`, `printf >`, `tee`, heredocs (`<