agents/skills/magi-mode/SKILL.md
This skill acts as the high-level Orchestrator for the MAGI protocol, a consensus-driven multi-agent framework designed to resolve complex software engineering problems. It coordinates scoping, TDD implementation, consensus reviews, and deployment by aggregating specialized sub-skills.
The Orchestrator MUST select an execution path based on the task's complexity
and ambiguity (defined in project.magi.json):
All subagents invoked under the MAGI protocol MUST adhere to these invariants to ensure harness compatibility and workspace safety.
To eliminate conversational noise, conserve tokens, and maximize parsing stability, all agents (including the Orchestrator) MUST adopt a neutral, data-driven tone:
The protocol instructions MUST remain tool-agnostic. Do not assume specific tool
names (e.g. update_topic, read_file, write_file). Use generic terms like
"read from disk," "save to disk," or "report status."
All sub-agents MUST read project.magi.json#environment immediately upon
invocation to discover the active VCS (JJ or GIT) and Harness (JETSKI or
GENERIC_CLI). They MUST adjust their tool usage natively. All interim files
(drafts, reviews, logs) must be saved in the configured temp_directory to
prevent workspace pollution and minimize permission prompts.
project.magi.json to configure
the project (VCS, temp directories, target files) and define the goal.temp_directory and execution_path from the generated
project.magi.json.tdd_state.magi.json,
review_state.magi.json, constraints.magi.json) in the configured
temp_directory to ensure a clean start.constraints.magi.json if iterating).verdict and next_stage from
review_state.magi.json:
next_stage: COMPLETED): Transition to Stage 3.next_stage: SYNTHESIS): If oscillation_detected == false
and global iterations < 3, loop back to Stage 1. Else, escalate to the
user.next_stage: ESCALATION): Pause and present the conflict
report to the user.*.magi, *.magi.*) in
the configured temp_directory (e.g. agents/skills/magi-mode/.temp/).project.magi.json, review_state.magi.json, etc.).