| name | megacode-profile-author |
| description | Author or update `.megacode/profiles/*.json` agent profiles and generate a matching `.codex/agents/<name>.toml` sketch. Use when defining new MegaCode roles. |
| disable-model-invocation | true |
MegaCode Profile Author
Create role definitions that compile to Codex worker configuration.
Inputs
- Role name (lowercase,
[a-z][a-z0-9_-]*).
- Purpose, instructions, context policy, output contract.
- Model policy (default model, reasoning effort, allow list, cost class).
- Skills allow/deny lists, MCP servers, tool allowlist.
- Worktree and GitHub scope policies.
Outputs
.megacode/profiles/<name>.json validated against schemas/profile.schema.json.
.codex/agents/<name>.toml sketch (commented placeholders until profile compiler exists).
JSON profile checklist
Required fields: name, description, instructions, model_policy.default_model.
Recommended fields:
| Field | Guidance |
|---|
context_policy | isolated for workers; artifact_only for reviewers |
output_contract | Named contract id (implementation_result, review_findings, etc.) |
skills_allow | Product skills only (megacode-implementation, megacode-testing, …) |
mcp_servers | From .megacode/mcp/profile-mcp-matrix.yaml — no Linear |
worktree_policy | required for implementer; forbidden for read-only roles |
github_scope | read, branch_write, or none per role |
quality_gates | e.g. tests-run, diff-summary |
TOML sketch template
name = "<name>"
model = "<default_model>"
[instructions]
Validation (fail-closed)
- Name matches schema pattern
^[a-z][a-z0-9_-]*$.
reasoning_effort and cost_class enums are valid.
- MCP servers appear in the profile MCP matrix for that role.
- No Agents SDK runner references; app-server / exec-json only.
- Do not grant global MCP access — smallest surface per role.
Reference profiles
Study docs/codex_megacode_planning_pack/codex_megacode_planning_pack/examples/profiles/ for explorer, implementer, and reviewer patterns.