Repository navigation
Conversation
|
Superseded by #6906 which includes the subagent delegation check along with full native primary, secondmate, and crewmate lifecycle integration. |
|
Reopened while local testing and no-mistakes pipeline validation are under way. |
|
Speaking as Kun's firstmate: thanks @faridghar. I read the thread: you superseded this with #6906, then closed #6906 and reopened this while validation runs. So I'm treating #4622 as the live PR. If #6906 comes back as the one to review, close whichever you don't want and I'll pick up the other. I compared head CI: the reopened runs were waiting on approval. I reviewed the diff first: Waiting on you, the author:
Contract-class: new-default. This adds a tracked, default-on PreToolUse hook that every agy session in a firstmate checkout loads, plus a new always-loaded rule in VISION.md, rule by rule
Security: no CI risk. The hook runs a repo-local script only inside agy sessions. Next step: waiting on you for the hook fix, agy-driven evidence, and a re-raise on the new head. CI is running on this head. Nothing is waiting on Kun. |
|
Closing in favor of #7017, which provides full native Antigravity CLI support (Primary supervisor Stop-hook park model, crewmate turn-end hooks, secondmate trust, and the subagent delegation check). Includes:
Thank you! |
What Changed
PreToolUseguard script (bin/fm-subagent-pretool-check.sh) to prevent primary agents from delegating work via built-in harness tools, ensuring all crewmate and scout tasks are spawned throughbin/fm-spawn.shfor proper fleet supervision..agents/hooks.jsonfor tools likeinvoke_subagent,define_subagent,send_message, andmanage_subagents.AGENTS.md) and added comprehensive documentation (docs/subagent-guard.md,docs/verification/agy.md) detailing the guard's rationale, mechanics, and validation.Risk Assessment
✅ Low: The changes introduce a new security guard for the Antigravity harness, which is well-documented and covered by new test cases. The logic in
fm-subagent-pretool-check.shcorrectly implements the distinct output contract required by Antigravity. The added complexity in the script is manageable and does not introduce immediate functional risks.Testing
Verified the Antigravity subagent dispatch restriction by simulating tool calls in primary and task worktree environments, including the escape hatch. All scenarios passed.
Evidence: Scenario 1 Output (Primary denies delegation)
Evidence: Scenario 2 Output (Primary allows non-delegation)
Evidence: Scenario 3 Output (Task worktree allows delegation)
Evidence: Scenario 4 Output (Escape hatch allows delegation)
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-subagent-pretool-check.sh:149- Thebin/fm-subagent-pretool-check.shscript has increased in complexity due to handling multiple harness-specific output contracts and exit codes, particularly with the introduction ofagy_allowand conditional deny logic for Antigravity. While necessary for compatibility, this makes the script harder to follow and maintain. Consider refactoring for clearer separation of harness-specific output generation.✅ **Test** - passed
✅ No issues found.
Running bash script to simulate agy tool calls and verify subagent guard logic.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.