fix: strengthen goal fidelity and live-state freshness - #22
Merged
Conversation
…rvation contracts
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
Strengthen Firstmate's behavior guardrails so extensions remain faithful to the captain's actual goal and live operational surfaces always use fresh state. Require premise-checking before crews proceed, reinforce crew-steering around ownership, evidence, quality, goal fidelity, and directness, establish an always-serve-fresh rule for live surfaces, and require documenting a purpose before adding any bypass. Preserve legitimate crew stop and recovery behavior, keep proof contracts and tests aligned, and make these rules durable in the appropriate shared documentation and skills without weakening the requested behavior.
What Changed
Risk Assessment
✅ Low: Captain, the amended branch now satisfies the stated guardrails, resolves the prior contract conflicts, and protects each load-bearing crew-steering behavior with focused source-contract assertions.
Testing
The supplied full baseline had passed; focused guardrail, authoritative-state, bearings, and worktree-safety suites also passed, while the captured end-to-end CLI run proved fresh state supersedes stale events without losing legitimate stops or completion history; no screenshot was applicable because this changes instruction and CLI behavior rather than a rendered UI.
Evidence: End-to-end freshness and stop/recovery transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed (2) ✅
.agents/skills/operating-fundamentals/SKILL.md:56- The intent requires “documenting a purpose before adding any bypass,” but this rule only asks the operator to establish the target outcome mentally; it never requires recording the purpose or rationale before introducing a bypass. Amend the rule and its contract test, or confirm that undocumented bypasses are intentional.AGENTS.md:682- This universal rule requires every status or summary to remove completed items and show only pending/in-flight work, contradicting the existing/bearings“Recently Landed” contract and/reports, whose purpose is completed work. Scope removal to resolved actionable/decision items or explicitly exempt completion-oriented surfaces..agents/skills/lavish-decision-boards/SKILL.md:15- The new always-fresh board rule conflicts with the existing instruction never to edit a served board while the captain is answering because reload destroys in-progress input. When fleet state changes mid-answer, agents cannot both refresh immediately and preserve answers; define precedence or a safe refresh strategy.tests/operating-fundamentals.test.sh:65- The updated proof contract checks only operating-fundamentals phrases; it does not protect the new crew-steering skill/trigger or the AGENTS/Lavish serve-fresh contract. Because the intent explicitly requires keeping proof contracts and tests aligned, add focused assertions for those new durable rules or confirm that they are intentionally prose-only.🔧 Fix: Align guardrails with freshness and answer-preservation contracts
1 error still open:
tests/operating-fundamentals.test.sh:91- The requested proof contract remains incomplete: this test claims to retain all six crew-steering guardrails but checks only their headings. Every behavioral rule beneath them—including premise-checking before action, evidence requirements, and legitimate safety stops—could be deleted while the test stays green. Add focused assertions for each load-bearing rule so the test protects the actual contract, not just its outline.🔧 Fix: Protect crew-steering behavior in proof contracts
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed ✅
.agents/skills/operating-fundamentals/SKILL.md:57- The required “document a purpose before adding any bypass” rule is weakened to require written rationale only for consequential irreversible/high-stakes bypasses, while explicitly exempting trivial skips. The proof test at tests/operating-fundamentals.test.sh:69 requires that exemption, so both implementation and test contradict the authoritative “any bypass” criterion.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"Pre-supplied successful baseline: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"bash tests/operating-fundamentals.test.sh && bash tests/fm-tangle-guard.test.sh && bash tests/fm-bearings-snapshot.test.sh && bash tests/fm-secondmate-lifecycle-e2e.test.shTwo-statebin/fm-bearings-snapshot.sh --jsonscenario followed byjqassertions that resolution removes the open decision while retaining landed historyFM_GATE_REFUSE_BYPASS=1 FM_HOME=<temporary-evidence-home> bin/fm-brief.sh faithful-proof firstmate, verifying the isolation stop precedes branch creationManual authoritative-intent check rejectingtrivial skips do not require this written recordgit status --shortand evidence integrity checks🔧 Fix: Captain, require purpose documentation for every bypass
✅ Re-checked - no issues remain.
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"Configured full baseline command supplied as already successful: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"bash tests/operating-fundamentals.test.shbash tests/fm-crew-state.test.shbash tests/fm-bearings-snapshot.test.shbash tests/fm-tangle-guard.test.sh/var/folders/y_/bfdbj_vx20l9b9tw7crgkzwm0000gn/T/no-mistakes-evidence/01KY6JJEGD9NAK8Y5XYWMGXCQE/manual-e2e-smoke.sh "$PWD"git status --short✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix: Fix proportional bypass lint assertions, captain
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.