Files

115 lines
4.1 KiB
TOML
Raw Permalink Normal View History

2026-08-24 08:11:59 -07:00
schema_version = 8
id = "contract-first-refactoring"
version = "8.0.0"
display_name = "Contract-First Refactoring"
description = "A Sonnet root freezes compatibility invariants before implementation, accepts an independent test patch, and closes with economical regression verification."
tags = ["refactoring", "compatibility", "test-first", "featured"]
maturity = "featured"
root = "refactor_lead"
smoke = "smoke.toml"
[agents.refactor_lead]
kind = "root"
description = "Contract owner, sole source writer, and final refactor integrator"
model = "opencode_zen_anthropic_messages__claude_sonnet_5"
reasoning = "high"
allowed_reasoning_efforts = ["medium", "high", "xhigh", "max"]
execution_mode = "goal"
goal_token_budget = 600000
max_goal_token_budget = 1000000
stall_warning_seconds = 3600
finalization_grace_seconds = 1800
plan_reasoning = "high"
permissions = "workspace-write"
can_spawn = ["invariant_miner", "contract_test_author", "compatibility_verifier"]
max_active = 1
trust = "high"
verification = "always"
instructions = "agents/refactor-lead.md"
[agents.invariant_miner]
description = "Long-context read-only miner of explicit and implicit compatibility constraints"
model = "opencode_go_anthropic_messages__minimax_m3"
reasoning = "none"
allowed_reasoning_efforts = ["none"]
execution_mode = "goal"
goal_token_budget = 250000
max_goal_token_budget = 400000
stall_warning_seconds = 1800
finalization_grace_seconds = 900
permissions = "read-only"
backends = ["mcp"]
can_spawn = []
max_active = 1
allowed_task_kinds = ["invariant_analysis", "compatibility_analysis"]
trust = "high"
verification = "root_adjudication"
contract_enforcement = "strict"
output_contract = "contracts/invariants.json"
instructions = "agents/invariant-miner.md"
[agents.contract_test_author]
description = "Independent Luna author of contract-derived tests in a test-only worktree"
model = "codex_chatgpt_builtin__gpt_5_6_luna"
reasoning = "high"
allowed_reasoning_efforts = ["medium", "high", "xhigh"]
execution_mode = "goal"
goal_token_budget = 250000
max_goal_token_budget = 400000
stall_warning_seconds = 1800
finalization_grace_seconds = 1200
permissions = "workspace-write"
backends = ["mcp"]
can_spawn = []
max_active = 1
allowed_task_kinds = ["test"]
trust = "high"
verification = "always"
contract_enforcement = "strict"
output_contract = "contracts/test-patch.json"
instructions = "agents/contract-test-author.md"
[agents.compatibility_verifier]
description = "Independent economical compatibility and regression verifier"
model = "opencode_go_openai_chat__deepseek_v4_pro"
reasoning = "high"
allowed_reasoning_efforts = ["high", "max"]
execution_mode = "turn"
stall_warning_seconds = 1800
finalization_grace_seconds = 900
permissions = "read-only"
backends = ["mcp"]
can_spawn = []
max_active = 1
allowed_task_kinds = ["verification", "test_analysis"]
trust = "adversarial_reviewer"
verification = "root_adjudication"
contract_enforcement = "strict"
output_contract = "contracts/verification.json"
instructions = "agents/compatibility-verifier.md"
[agents.refactor_lead.controls.invariant_miner]
actions = ["inspect", "trace", "steer", "interrupt", "pause", "continue", "detach", "stop", "finalize", "compact", "respond", "set_effort", "fork"]
[agents.refactor_lead.controls.contract_test_author]
actions = ["inspect", "trace", "steer", "interrupt", "pause", "continue", "detach", "stop", "finalize", "compact", "respond", "set_effort", "fork"]
[agents.refactor_lead.controls.compatibility_verifier]
actions = ["inspect", "trace", "steer", "interrupt", "pause", "continue", "detach", "stop", "finalize", "compact", "respond", "set_effort", "fork"]
[agents.compatibility_verifier.controls.contract_test_author]
actions = ["inspect", "trace", "steer", "interrupt", "pause", "continue", "detach", "stop", "finalize", "compact", "respond", "set_effort", "fork"]
[coordination]
mode = "contract_test_refactor_verify"
orchestration = "mcp"
max_active_agents = 3
max_depth = 1
max_children_per_agent = 3
max_active_writers = 1
reject_ancestor_role = true
wait_policy = "dependency_only"
write_conflict_policy = "reject"
contradiction_policy = "primary_evidence"
result_visibility = "ancestors"