Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ Before deciding any ask-user finding, load `ask-user-authority`; the implementat
Never merge a red PR.
Without a current explicit captain instruction that states the concrete merge, that default stands, and standing `yolo` cannot authorize a red merge; section 1 owns when such an instruction overrides a Firstmate-written standing rule within its exact scope.
Use `bin/fm-pr-merge.sh` for every task PR merge so merge metadata is recorded, and use `bin/fm-merge-local.sh` for approved local-only landing; never call a lower-level merge command around their guards.
`bin/fm-pr-merge.sh` also refuses a merge while an inline review comment's thread is unresolved or a review still requests changes, and it prints that feedback in full; clearing it is a human decision, recorded by rerunning with `--review-comments-override <reason>`, and standing `yolo` never authorizes that override.
After an autonomous merge, give the captain a one-line full-URL or local-main outcome.

### Validate
Expand Down
18 changes: 11 additions & 7 deletions bin/fm-classify-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ FM_CREW_STATE_BIN="${FM_CREW_STATE_BIN:-$_FM_CLASSIFY_LIB_DIR/fm-crew-state.sh}"
#
# Free-text tokens (PR ready, checks green, ready in branch, merged) exist only for
# legacy lines that lack a standard terminal verb. status_is_captain_relevant is
# verb-aware: a nonterminal working: or paused: line never becomes captain-relevant
# merely because its prose contains one of those tokens (for example
# "working: rebased onto merged #76").
# verb-aware: a nonterminal working:, note:, or paused: line never becomes
# captain-relevant merely because its prose contains one of those tokens (for
# example "working: rebased onto merged #76", or a note: audit record quoting a
# human's free-text reason).
FM_CLASSIFY_CAPTAIN_RE_DEFAULT='done:|needs-decision:|blocked:|failed:|PR ready|checks green|ready in branch|merged'

# The deliberate-external-wait verb. A crew (or firstmate steering it) appends
Expand Down Expand Up @@ -99,16 +100,19 @@ status_is_terminal_verb() {

# 0 if the given (last) status line matches a captain-relevant verb.
# Verb-aware by default: terminal verbs always match; nonterminal progress verbs
# (working, resolved, captain-held) and paused never match from free-text prose;
# only lines without those leading verbs may still match free-text tokens for
# legacy bare lines such as "merged" or "PR ready".
# (working, resolved, captain-held), the informational note verb, and paused
# never match from free-text prose; only lines without those leading verbs may
# still match free-text tokens for legacy bare lines such as "merged" or
# "PR ready". note: is informational by contract - it is carried by the unread
# status surface and never enters the OPEN DECISIONS fold - so a human's
# free-text reason quoted into a note: audit record cannot fake a decision.
status_is_captain_relevant() {
local line=$1 verb
[ -n "$line" ] || return 1
status_is_paused "$line" && return 1
verb=$(status_line_verb "$line")
case "$verb" in
working|resolved|captain-held|"${FM_CLASSIFY_PAUSED_VERB:-$FM_CLASSIFY_PAUSED_VERB_DEFAULT}")
working|resolved|captain-held|note|"${FM_CLASSIFY_PAUSED_VERB:-$FM_CLASSIFY_PAUSED_VERB_DEFAULT}")
return 1
;;
esac
Expand Down
Loading