mirror of
https://github.com/Heretek-AI/agency-control-plane.git
synced 2026-11-07 10:46:08 -10:00
Closes the readiness gaps tracked in #2: - G-1: APPROVE now calls landTask(): fleet/<task> is merged --no-ff into the mission integration branch in a throwaway worktree, serialized across approvals. Success records landedSha and moves the task to done; a conflict (or any landing failure) keeps it waitingHuman, answers 409 landing-failed, and lists the conflicting files. - G-2: done/failed/cancelled tasks release their worktree once no worker runs in it (also swept on startup); failed/cancelled branches are then anchored at refs/fleet-salvage/<task> via salvageWorktree(). - G-3: --roles-dir role packs (roles.ts). An expert task runs with XDG_CONFIG_HOME=<roles-dir>/<role>, the role opencode.json copied into the worktree .opencode/, the role prompt and SKILL.md paths in its task prompt, and role.json maxConcurrent as its per-expert cap. - G-4: --tier-models maps each tier to a provider/model passed as the v2 session.create model. Quota-shaped worker failures feed the tier failover and re-queue the task without spending an attempt; quota on the last tier pauses new launches until the retry time. - G-5: exact dependency pins in dispatcher/ and web/ (the versions the lockfile already resolved). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Pk7RD6oqBpDdpbWAYqj539