Repository navigation
Conversation
AGENTS.md section 10 has prescribed `tasks-axi hold <id> --kind captain` for a captain-gated thread since holds were documented, but firstmate's own rules and tooling never caught up, so a held item has been mishandled ever since: - The standing queue rule and its three restatements said a queued item gets dispatched once its blocker is gone and its date gate has arrived, with no mention of holds. The tasks-axi path is saved by `tasks-axi ready`, which excludes held work, but the manual hand-edit path had nothing to save it. - fm-teardown.sh's manual-backend reminder is what firstmate reads at the exact moment it re-scans Queued, and it was hold-blind for the same reason. - fm-fleet-snapshot.sh stripped only repo/kind/priority/since/merged/reported/ done, so a held item baked its hold markers into its title. Because the strip is anchored at end of line, the trailing hold paren also blocked the since and repo parens, and no held field was exposed at all. fm-fleet-view could not tell a held item from dispatchable work. - Section 10's verb map had no hold/unhold entry and no hand-edit marker form. `tasks-axi start` moves a held item anyway and carries its marker into In flight, so the checks are stated where the reader acts rather than left to the verb to refuse. Also corrects the tasks-axi compatibility contract at its declared owner. docs/configuration.md said the floor was 0.1.1 while, in the same sentence, requiring the multi-ID `mv` probe introduced in 0.2.2. That probe is mandatory, so the effective floor has always been 0.2.2. AGENTS.md and fm-tasks-axi-lib.sh now point at the owner instead of restating a number that can drift, and fm-bootstrap.sh's header drops the same stale claim. Probe behavior is unchanged; the fail-closed version-parse precondition is now documented rather than dropped. Snapshot behavior is covered by a test that fails without the parser fix.
Three defects in the hold parsing, two of them introduced by this branch's own earlier rounds. The dedicated comma-preserving hold_reason capture only matched the paren form, so a hand-written comma-form hold parsed as held: false and rendered a Gate of "-", i.e. dispatchable. That is the one direction this must never fail, and it regressed a case that worked earlier on the branch. Hold detection is now separate from reason extraction and keys on the hold: key in either form, so an unreadable reason can no longer downgrade an item to dispatchable. The reason still prefers the paren form, which carries commas verbatim because tasks-axi forbids ")" in --reason; the comma form is hand-written only and inherently ambiguous for free text, so it truncates at the first comma rather than guessing. tasks-axi hold also accepts --until, whose (hold-until: DATE) marker was unhandled: because the metadata strip is end-anchored, an unstripped trailing marker also stranded the earlier repo and since parens in the title. Known gap, deliberately not fixed here: --until means "inactive on and after that date", but an expired hold is still reported held. That fails closed, so it over-reports rather than dispatching held work.
Adds the idea-sharpening step missing between a fuzzy request and a crewmate brief. /grill interviews the captain one question at a time and writes a short spec to data/spec-<project>-<slug>.md: problem, solution shape, vocabulary, scope boundary, open questions, constraints. It is a planning front-end and nothing more. It creates no branch, dispatches nothing, and writes only its spec file under data/. The spec feeds the existing brief and dispatch path rather than becoming a parallel record of work, so the backlog stays the only tracker. Deliberately small: a skill file, a conversation, and a doc in data/, the same shape /bearings and /stow already use. It files no backlog item and needs no new state, because the sharpen-then-decompose path is meant to run inside one context window. The spec filename carries the project because two projects can easily want the same slug, and an unnamespaced spec would silently overwrite another project's, unrecoverably, since data/ is gitignored. The trigger offers rather than auto-starts: an interview nobody asked for is the main way this would become annoying, so it loads on an explicit invocation and otherwise proposes in one line. It also names when it must NOT fire - already-sharp requests, bugs, scout questions, trivial changes. The interview stays with firstmate. Prime directive 4 makes firstmate the captain's only point of contact, so grilling never routes to a secondmate even when one's scope covers the work; the resulting work routes normally. AGENTS.md section 7 gains the optional sharpening path before dispatch.
This fleet runs a customized fork, so advancing a home straight from origin would strip the fleet's private adaptations. Upstream now enters only by being merged into fork/main, and homes advance from the fork. bin/fm-update.sh: - Ingest upstream first: merge origin/<default> into fork/<default> and push it to the fork. The merge is built with merge-tree/commit-tree plumbing rather than a checkout, so no working tree is touched and a conflicting upstream can never leave a home stranded mid-merge. - A conflicting ingest STOPS the run: it names each conflicted path, pushes nothing, advances nothing, and exits 1. Never forced. - Advance every home (main home's branch + live secondmate homes) to fork/<default> instead of origin/<default>. - Secondmate discovery, the reread nudge, the projects/ boundary, and fast-forward-only safety for the advances are unchanged. bin/fm-ff-lib.sh: - Add the "fork" base mode alongside "origin" and <commit-ish>. The remote base modes are now named after the remote they track, so one case arm serves both and the contract is stated once. - A target without a fork remote is skipped, never advanced from origin as a fallback. - Generalize fetch_once to take a remote, deduping per (object store, remote) so worktrees still share a single fetch. Docs (AGENTS.md section 12, the updatefirstmate skill, README, docs/architecture.md, docs/scripts.md) describe the two-hop model and carry the conflict-stop as a captain-facing decision. tests/fm-update.test.sh: the fixture is now a real fork world (origin, fork carrying a private adaptation, and a home tracking the fork). Covers the ingest, the fork-based advance with adaptations intact, the conflict stop, fork-history preservation, and the no-fork-remote skip.
Secondmate sessions launch with Claude Code's native predicted-next-prompt suggestion enabled, so the operator sees the soft-text next-prompt hint in a secondmate window exactly as in their own session. Ship/scout crewmates keep it disabled: an autonomous worker has no reader to help, so the ghost text is pure classifier risk. Safety for the enabled path rests on the existing fleet-wide fm_composer_strip_ghost extractor, which every secondmate-reachable composer read already routes through. Refuse --secondmate on the plain-screen backends (orca, cmux, zellij) that cannot strip ghost styling, collapsing the three refusals into one guard, so no secondmate can land on a backend without the extractor. Docs and tests updated.
Fork ingest: resolved 8 conflicts (AGENTS.md, ci.yml, fm-bootstrap.sh, fm-bearings-snapshot.sh, fm-fleet-snapshot.sh, bearings/SKILL.md, configuration.md, zellij-backend.md). Preserved fork adaptations (dispatch holds, /grill, origin->fork->homes self-update, secondmate native prompt suggestions + zellij secondmate refusal) while adopting upstream's instruction-ownership compression and #593/#640 changes. See data/fm-fork-ingest-r3/report.md for per-file rationale.
…nded (#1) * fix(teardown): refuse when a task's worktree slot was re-handed after an outage fm-teardown.sh read worktree= straight from a task's meta and then killed the recorded processes and returned that worktree to treehouse. That pointer goes stale after an outage: treehouse frees a dead task's interactive pool slot and re-hands it to a NEW task, but the dead task's meta still records the old slot path, so tearing the dead task down would kill and return the live new owner's worktree. Add assert_treehouse_worktree_owner, layered before every destructive action. Using treehouse's own status, it refuses on positive evidence that the recorded slot was re-handed: the slot is now leased to a different holder, or it is in-use by a live process while this task's own backend endpoint is gone. It names the recorded path, this task id, and the current owner. The guard is scoped to interactive treehouse worktrees; Orca, secondmate homes (leased durably, so immune), and paths treehouse does not list pass through unchanged, and it refuses only on positive foreign-owner evidence so it never breaks a legitimate teardown. The guard is intentionally not bypassed by --force: --force authorizes discarding this task's own unlanded work, never destroying a different task's live worktree. Add regression cases covering a slot re-leased to another task, a slot in-use by a live owner after this task's session is gone, --force not bypassing the guard, and a still-owned slot proceeding as before. * no-mistakes(review): fail closed on unrecognized treehouse slot states in teardown guard * no-mistakes(review): align teardown treehouse guard docs and pin status contract * test(fm-backend): expect teardown's treehouse status guard in conformance log The reboot-hazard guard (assert_treehouse_worktree_owner) reads treehouse status once before any destructive action, so the old-vs-new command-log conformance check saw one extra leading status probe and failed. Filter that single intended probe line out of the new log, still require the destructive treehouse return --force + tmux kill-window sequence to be byte-identical old vs new, and positively assert the guard ran. * no-mistakes(review): harden teardown treehouse guard: confident liveness, exact lease, spaced paths * no-mistakes(review): split treehouse guard state vs liveness so zellij/cmux teardowns proceed * no-mistakes(document): document teardown re-handed treehouse slot guard in architecture and zellij docs
…r, bearings trigger, five-sweeps delegation, check.sh contract, orca date) (#2) * docs(conformance): close firstmate-coding-guidelines drift findings Apply the recommended low-cost subset from the fm-cg-review-r1 self-review, all within firstmate's own shared tracked material: - Add the missing bearings skill load trigger in section 9 (trigger hygiene). - Trim the state/<id>.meta field enumeration to a pointer at bin/fm-spawn.sh --help and docs/configuration.md (kills schema drift). - Delegate the mutating-sweeps roster to bin/fm-session-start.sh while keeping the lock-gated safety invariant inline (one-owner rule). - Move the custom check.sh authoring contract into fm-check-register.sh's header and --help, leaving only the trigger and bind-before-run invariant inline; reduce the secondmate-liveness narrative to its invariant. - Add the derived smoke-run date (2026-07-03) to docs/orca-backend.md. - Reflow .agents/skills/afk/SKILL.md to one sentence per line (wording unchanged, line breaks only). Relocations and restyles only; no contract meaning changed. fm-lint.sh clean. * no-mistakes(review): document state meta fields in fm-spawn header and help * no-mistakes(document): sync docs with fork-update and zellij secondmate-refusal changes
…o ship briefs (#3) Complete the Matt Pocock planning-pipeline adoption (back half of the grill -> spec -> decompose flow). /decompose: new captain-invocable, internal skill that turns a grill spec at data/spec-<project>-<slug>.md into dependency-ordered, independently shippable vertical-slice backlog items via tasks-axi, wiring blocked-by edges between slices (add upstream-first, since --blocked-by requires the blocker to exist). Plans only: no branch, dispatch, or code, matching /grill. Owns the decomposition procedure and defers backlog syntax to section 10. Ship-brief contract: fold the tdd seam-agreement discipline (agree the test seam first, named anti-patterns) into fm-brief.sh's ship scaffold so every ship brief carries it; not a standalone skill, per the plan. Scout and secondmate briefs stay unaffected. Wiring: AGENTS.md section 7 intake gains the optional grill -> decompose path before dispatch; README lists /decompose beside /grill. Colocated fm-brief tests assert the test-discipline section renders in all three ship modes and is absent from scout and secondmate briefs.
…conformance The fm-teardown old-vs-new conformance test filtered the treehouse status re-handed-slot guard probe out of only the NEW command log, assuming BASE_REF (merge-base with main) always pre-dates the guard commit. Once the guard landed on main, the old teardown emits the same probe and the one-sided filter misreports it as a one-line regression, turning the Behavior tests job red on every subsequent main build. Filter the non-destructive probe from both logs symmetrically. Slot-occupancy safety stays proven: the assert_contains directly above still requires the new teardown to run the treehouse status guard before any destructive action, and bin/fm-teardown.sh still calls assert_treehouse_worktree_owner before treehouse return --force.
Author
|
Mis-targeted: this fork branch PR defaulted to the upstream base and bundled fork-only commits. Retargeted as https://github.com/LuckyB-UF/firstmate/pull/6 against LuckyB-UF:main. |
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
Make fork/main (LuckyB-UF/firstmate) CI green: the Behavior tests job has been red for 6+ days on the single test 'fm-teardown.sh: post-guard tmux+treehouse command log differs old vs new'. Diagnosis (reproduced locally in a CI-like clone): the old-vs-new teardown conformance test in tests/fm-backend.test.sh filtered the treehouse status re-handed-slot guard probe out of only the NEW command log, assuming BASE_REF (merge-base of HEAD with main) always pre-dates the guard commit d85795d. On fork/main, main == HEAD, so the 'old' baseline is also post-guard and emits the same probe, making the one-sided filter misreport it as a one-line regression on every main build. The deliberate fix is to the TEST, not the code: filter the non-destructive probe from BOTH logs symmetrically so the conformance holds whether BASE_REF pre-dates or includes the guard. Slot-occupancy safety was verified intact and is still proven: bin/fm-teardown.sh still calls assert_treehouse_worktree_owner before treehouse return --force, and the test's assert_contains still requires the status probe in the new log - deleting the assertion or weakening the guard was explicitly ruled out. Verified: test passes in both pre-guard-baseline (this worktree) and post-guard-baseline (CI-like clone with main==HEAD) shapes, full fm-backend.test.sh green, bin/fm-lint.sh clean. The PR must target fork/main (LuckyB-UF:main), NOT the upstream parent repo. Known pre-existing local-only failures unrelated to this change (they pass in GitHub CI): fm-backend-orca (absent orca binary), fm-dispatch-select (missing quota tool), fm-tangle-guard (local isolation error).
What Changed
tests/fm-backend.test.shto filter the non-destructive treehouse status guard probe from both the old and new command logs, instead of only the new one — the one-sided filter misreported the probe as a one-line regression whenever the baseline (merge-base with main) already included the re-handed-slot guard, which is exactly the fork/main shape where main == HEAD. The slot-occupancy guard itself is untouched:bin/fm-teardown.shstill asserts worktree ownership beforetreehouse return --force, and the test still requires the probe in the new log. Verified green in both pre-guard and post-guard baseline shapes./grilland/decomposeplanning skills (interview-to-spec and spec-to-backlog decomposition, with TDD seam discipline folded into ship briefs), real dispatch holds enforced across snapshot/fleet-view/spawn (fail-closed on holds,hold-untilsupport), and a reworked origin→fork→homes self-update model inbin/fm-update.shwith expanded tests.Risk Assessment
✅ Low: The only new change versus fork/main is a 19-line test-only fix that symmetrizes a log filter; it cannot mask destructive-action regressions, keeps the guard-presence assertion intact, and the production guard ordering in bin/fm-teardown.sh was verified unchanged.
Testing
Ran the full fm-backend behavior suite in both baseline shapes — the pre-guard shape in this worktree and a CI-like clone with main==HEAD — reproducing the exact one-line CI failure with the pre-fix test in the main==HEAD shape and confirming the fixed test goes green there, while verifying the re-handed-slot guard call in fm-teardown.sh and the test's status-probe assertion remain intact; all tests passed.
Evidence: CI red reproduced: pre-fix test fails in main==HEAD clone (one-line treehouse status diff)
not ok - fm-teardown.sh: post-guard tmux+treehouse command log differs old vs new --- teardown-old.log +++ teardown-new-postguard.log @@ -1,3 +1,2 @@ -treehouse\x1fstatus treehouse\x1freturn\x1f--force\x1f<worktree> tmux\x1fkill-window\x1f-t\x1ffirstmate:fm-teardownconform1Evidence: Fixed test green in the CI-red shape (main==HEAD clone, exit 0, 28/28 ok)
ok - fm-teardown.sh: aside from the treehouse status guard probe, the treehouse return + tmux kill-window command log is byte-identical old vs new for a scout taskEvidence: Fixed test green in the pre-guard baseline shape (this worktree, 28/28 ok)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
.agents/skills/afk/SKILL.md- branch carries 11 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (97 file(s)) into the PR:Push main to origin, or rebase your branch onto origin/main, before gating.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/fm-backend.test.shin this worktree (pre-guard baseline shape, merge-base 4ab61fa) — all 28 tests green including the teardown conformance testBuilt a CI-like clone at /tmp/fm-ci-shape-clone withmain == HEAD(post-guard baseline,git merge-base --is-ancestor d85795d HEADconfirmed) to replicate the fork/main CI shapeRan the pre-fix test file (git show 4f25d0b~1:tests/fm-backend.test.sh) in the main==HEAD clone — reproduced the exact CI failure: one-line-treehouse␟statusdiff infm-teardown.sh: post-guard tmux+treehouse command log differs old vs newRan the fixedtests/fm-backend.test.shin the same main==HEAD clone — exit 0, all 28 tests green including the teardown conformance testgrep assert_treehouse_worktree_owner bin/fm-teardown.sh— guard still invoked at line 1224 beforetreehouse return --force; test still asserts the status probe in the new log at tests/fm-backend.test.sh:953Removed the temp clone and confirmedgit status --porcelainclean✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.