feat: make user address preference-aware instead of mandating a captain salutation#692
Open
s3-oz wants to merge 8 commits into
Open
feat: make user address preference-aware instead of mandating a captain salutation#692s3-oz wants to merge 8 commits into
s3-oz wants to merge 8 commits into
Conversation
…d add regression coverage
…t-nudge test The no-mistakes gate harness exports NO_MISTAKES_GATE=1, which correctly silences the nudge, so the genuine-primary assertions failed when the suite ran under the gate. Clear the variable at the top of the test; test_gate_env_is_silent still sets it explicitly to cover that path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…quickstart example
5 tasks
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
The developer wanted to remove Firstmate's mandatory rule requiring every response to address the user as "captain," replacing it with a preference-aware address contract: use the preferred name from data/captain.md when present (Oz, addressed only when useful), fall back to neutral prose with no required salutation, and keep nautical language strictly optional. They required preserving "captain" as the internal role name for authority and lifecycle concepts, not hardcoding "Oz" into shared tracked templates, updating any duplicate or contradictory salutation mandates in docs/tests/skills, and adding regression coverage that rejects a mandatory salutation while allowing the role vocabulary. They constrained the change to be minimal (one sentence per Markdown line, plain dashes, no unrelated cleanup) and to follow the firstmate coding guidelines skill. After committing, they directed the agent to ship the change through the no-mistakes validation pipeline without --yes, resolving gates along the way: authorizing a fix to a contradictory canned "Captain" message in the updatefirstmate skill, clearing a ShellCheck 0.11.0 lint blocker, and redirecting the push to a fork at s3-oz/firstmate after a 403 on the upstream repo.
What Changed
data/captain.md(or the shareddata/captain-shared.md) when present, otherwise fall back to neutral prose with no required salutation; nautical language stays optional and "captain" remains the internal role name for authority/lifecycle concepts.afk,fmx-respond, andupdatefirstmateskills, pointing address guidance at the AGENTS.md contract instead.tests/fm-captain-translation-contract.test.shthat rejects reintroduction of a mandatory captain salutation while allowing role vocabulary, and hardened related tests (sanitizing an inheritedNO_MISTAKES_GATEin the sessionstart-nudge test, skipping the shellcheck assertion when shellcheck is absent). The full test suite passed through the no-mistakes pipeline, including a negative check that re-adding the old mandate fails the contract test.Risk Assessment
✅ Low: The round's only change is a one-sentence documentation contract edit plus its matching test assertion, applied exactly as the user instructed with no runtime code touched.
Testing
Ran the full test suite baseline plus the four changed test files (all pass), proved the new regression test rejects a reintroduced mandatory "captain" salutation via a temporary negative mutation, and demonstrated the preference-aware contract end-to-end by running the real fm-session-start.sh with a data/captain.md preference and capturing it in the agent-facing context digest. No visual evidence applies — this is a CLI/prompt-contract change with no rendered UI surface; CLI transcripts are the end-user surface.
Evidence: New AGENTS.md address contract (agent-facing preamble)
Use the user's stated preferred name or form of address fromdata/captain.mdor inheriteddata/captain-shared.mdwhen present, and use direct address only when it is useful. When no preference exists, default to neutral direct prose with no required salutation or repeated form of address. Use light nautical seasoning only when it fits: the occasional "aye", "on deck", "shipshape", "under way", or "ahoy" may land naturally. Keep that seasoning optional, never let it override a stated address preference, and never let it obscure technical content...Evidence: End-to-end: fm-session-start.sh injects the captain.md address preference into the agent's context digest
data/captain.md -------------------------------------------------------------------------------- Preferred name: Oz. Address me as Oz only when direct address is actually useful; no salutation required. data/captain-shared.md (shared, main-authoritative, read-only in secondmate homes) -------------------------------------------------------------------------------- ABSENTEvidence: Regression test rejects a reintroduced mandatory salutation (negative mutation)
== Reintroducing old mandatory salutation lines into AGENTS.md == == Running tests/fm-captain-translation-contract.test.sh == not ok - AGENTS.md reintroduced a mandatory captain salutation exit=1Evidence: Targeted test transcript (4 changed test files, all passing)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
AGENTS.md:7- The new address contract in AGENTS.md names onlydata/captain.mdas the preference source, but AGENTS.md:111 also establishesdata/captain-shared.mdas the main-authoritative shared captain-preference file inherited by secondmates. A preferred name recorded only in captain-shared.md would fall outside the letter of the new rule. Likely acceptable because captain.md is documented as canonical and carries pointers to the shared file, but worth confirming the omission is intentional.tests/fm-captain-translation-contract.test.sh:28- test_chat_address_respects_private_preference asserts entire AGENTS.md sentences verbatim, so any future rewording of the address contract will break the test even when the semantics are preserved. This matches the file's existing assertion style and is deliberate regression coverage, so no change is needed.tests/fm-cd-pretool-check.test.sh:438- The shellcheck-absent guard reports the test as passing when shellcheck is not installed, which silently skips lint verification on machines without it. This mirrors the identical pre-existing pattern in tests/fm-arm-pretool-check.test.sh:531, so it is consistent repo style rather than a new weakening.🔧 Fix: accept captain-shared.md as address-preference source
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
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; exit "$rc"Full suite baselinefor t in tests/*.test.sh; do bash $t; done(ran successfully before this session)bash tests/fm-captain-translation-contract.test.shincluding the new test_chat_address_respects_private_preference (all ok)bash tests/fm-brief.test.sh,bash tests/fm-cd-pretool-check.test.sh,bash tests/fm-sessionstart-nudge.test.sh(all ok)Negative regression check: temporarily appended the old 'Address the user as "captain"' mandate to AGENTS.md and re-ran the contract test — it failed withnot ok - AGENTS.md reintroduced a mandatory captain salutation, then restored AGENTS.md (clean git status)Repo-wide grep for surviving mandatory-salutation language (Address the user as,Captain,,zero direct address) — only internal role-vocabulary mentions remainEnd-to-end: ran realbin/fm-session-start.shin a sandbox FM_HOME with data/captain.md stating a preferred name (Oz, no salutation) and captured the context digest showing the preference injected verbatim✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.