feat: gate structured captain decisions through Lavish - #64
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Ship a durable, tracked gate in the firstmate repo that makes Lavish the only path for captain-facing structured decisions, replacing the session-local Claude AskUserQuestion stopgap. Deny exact structured-question tool identities unconditionally, with no payload scanning, option thresholds, bypass flags, environment escapes, or agent opt-outs; plain chat remains the route for yes/no and lavish-axi create remains the route for multi-option decisions. Fail open on malformed transport or missing dependencies, fail closed only on a confident tool-identity match, and teach both legitimate routes plus Run: lavish answer . Register the gate in tracked harness configuration for every empirically verified primary harness that exposes such a tool, document bounded evidence for harnesses that do not, retain one documentation owner, and add pure stdin/stdout behavioral tests for deny, allow, fail-open, and tracked registration without touching live agent, herdr, tmux, or worktree lifecycle state. Keep all deliverables in tracked repo files so deleting operational-home scripts and settings.local.json leaves the gate functional.
What Changed
Risk Assessment
✅ Low: Captain, the change is well-bounded and satisfies the exact-identity, fail-open transport, tracked-registration, durable guidance, and documentation ownership requirements without a source-verifiable defect.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
⏭️ **Test** - skipped
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.