dev_agent Skill Reference
dev_agent exposes a minimal tool surface so the orchestrator can drive Pantheon branches through MCP. A Go ToolHandler translates each skill into the appropriate MCP RPC, enforces branch lineage rules, and normalizes responses/error payloads.
Core Skill: execute_agent
Launches a specialist agent (codex or review_code) via parallel_explore. Every invocation creates a new branch rooted at parent_branch_id.
Arguments
| Field | Required | Description |
|---|---|---|
agent | ✓ | codex (builder), claude_code (builder), or review_code (critic). |
prompt | ✓ | Complete single-turn instruction (task, phase goals, local context). |
project_name | ✓ | Pantheon project to operate in. Defaults to CLI --project-name if omitted. |
parent_branch_id | ✓ | Branch UUID to fork from. Must be the previous step’s branch_id. |
Execution Flow
- •Call MCP
parallel_explorewith the suppliedagentand prompt. - •Poll
get_branch(check_status) until the branch reportssucceedorfailed, with exponential sleep bounded by CLI-configured durations. - •Record the resulting
branch_idin the lineage tracker only after the branch succeeds. - •Fetch the textual response via MCP
branch_output(full log). The string is returned asdata.response. - •For
review_code, attempt up to threebranch_read_filecalls to read<WORKSPACE_DIR>/code_review.log. If successful the contents are returned asdata.review_report. After three misses the handler raisesFINISHED_WITH_ERRORand includes diagnostic details.
Response Payload
{"status":"success","data":{ ... }} with:
- •
branch_id: UUID of the newly created branch (also echoed insidedata.branch.id). - •
status: branch status (e.g.,"succeed"). - •
branch: Full branch metadata from MCP. - •
parallel_explore: Originalparallel_exploreresponse for debugging. - •
response: Human-readable log assembled frombranch_output. - •
review_report: Only whenagent == "review_code"; contents ofcode_review.log.
Failures surface as {"status":"error","error":{"message": "...", "instruction": "FINISHED_WITH_ERROR", "details": {...}}} so the orchestrator can stop immediately.
Usage Notes
- •Always supply the full current context in
prompt; there is no shared agent memory. - •Because every call spawns a branch, respecting the
branch_id → parent_branch_idchain is mandatory. - •Treat
review_reportas the canonical review log; the fix-phase prompt is constructed from this artifact.
Helper Skills
read_artifact
- •Purpose: Fetch text artifacts created on a specific branch (e.g.,
code_review.log, custom reports, generated docs). - •Args:
branch_id(required),path(required). The path must match what the agent wrote—typically absolute insideWORKSPACE_DIR. - •Behavior: Proxies MCP
branch_read_file. Any MCP 404 or error string is passed back verbatim so the orchestrator/LLM knows whether to retry or fail the workflow.
branch_output
- •Purpose: Retrieve the textual STDOUT/stderr transcript from a branch run.
- •Args:
branch_id(required),full_output(optional bool, defaults tofalse). Whentrue, MCP returns the entire log; otherwise remote defaults may truncate. - •Behavior: Thin wrapper over MCP
branch_output. Responses are returned verbatim so the orchestrator can surface previews or feed context into subsequent prompts.
Error Handling & Best Practices
- •Single call per turn: The orchestrator intentionally exposes only
execute_agent,read_artifact, andbranch_output. Do not parallelizeexecute_agentbecause later steps must inherit the lineage. - •ToolExecutionError payloads**: Fatal errors (missing context, branch failure, absent
code_review.log) includeerror.instruction = "FINISHED_WITH_ERROR"so the orchestrator halts. Non-fatal issues rely solely on theerror.message. - •Artifacts drive fixes: Use
read_artifacton the critic’s branch whenever you need the exact wording ofcode_review.lograther than relying on summaries. This guarantees Codex sees the reviewer’s precise findings.