Repository navigation
feat(bin): render bearings as a six-column Kanban board - #3
Merged
Merged
Conversation
added 19 commits
August 10, 2026 20:03
…enamed Bearings test
…ail, PR review items
…le merge-ready, PR artifact
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
Pretty Bearings: Kanban view of Ready/Held/Blocked/Under way/Waiting on you/Done. Extend /bearings and /bearings file with Kanban columns derived from live fleet state, not a second task system. Chat digest default; dated markdown under data/status-report-YYYY-MM-DD.md in file mode. Lavish/HTML board out of scope for v1. Columns always render: Ready, Held, Blocked, Under way, Waiting on you, Done. tasks-axi plus live worker state remain the only writers; board is a read-only renderer. No drag second database, no Orca Workspace board sync. Captain-facing prose only; full PR URLs when present. After captain hands-on board walk, implement only this punch-list: Under way truth must not show failed/cancelled needs-a-look wording for live or deliberately paused workers; shield false run failed/cancelled readouts with honest parked/paused progress language. Open PRs must stay visible: an open PR like #2 with failing CI and no approval must appear under Under way as PR open - CI failing or similar, not vanish from all columns and not wait on the captain unless the captain actually needs to review or merge now. Leave Ready and Done alone this pass. Defer secondmate/home id collision polish until there is a secondmate or second repo to inspect. One validation pass after these changes; no more abstract FIX-ALL review loops about placement feel. Acceptance already locally checked against FM_HOME=/Users/zabi/VibeCoding/Firstmate with --include-prs: the two parked/paused ships show parked validation language, PR #2 appears under Under way, and Ready/Done still look sane.
What Changed
bin/fm-bearings-snapshot.shnow projects aboard_columns+board_itemssurface onto the existing bounded fleet arrays: the six columns (Ready, Held, Blocked, Under way, Waiting on you, Done) are always declared with their own empty-state sentences, queued gates are classified as ready/hold/blocked from live blocker and hold state, gate bounds are shared round-robin across those columns with per-columnomitted[]disclosure, and the main-inventory integrity gate is pinned so it cannot be crowded off the board. The legacyin_flight/decisions_open/landed/gatesarrays are retained unchanged as compatibility surfaces.failed/cancelledcrew state whose source is the run step reads as "parked after validation stop" (genuine failures from any other source keep their needs-a-look cue), and under--include-prsevery open PR reaches exactly one column — Waiting on you only when the captain must review or merge now, otherwise Under way with its blocking state (CI failing, checks still running, changes requested, needs an author update), carrying the PR title, full URL, and repo-qualified id.fm-fleet-snapshot.shtitle fix), unavailable homes board under Blocked, andactive_child_workis derived from all holds rather than backlog-only holds. The bearings skill contract, README, and decision-hold docs were rewritten from the old four sections to the six columns, andtests/fm-bearings-snapshot.test.shgrew board-classification, column-bound, PR-routing, and id-collision cases (CI expected count 41 → 51).Risk Assessment
✅ Low: The final fix round is two small, correctly targeted changes (state re-derivation that removes a false "home unavailable" claim, and a dead
.backlog.titlefallback replaced with the real backlog title), both traced to their sources and both covered by a new test that genuinely fails before and passes after; the surrounding board projection satisfies every source-verifiable acceptance criterion in the intent and I found no reachable defect.Testing
Validated the focused Bearings behavior suite plus an end-user CLI projection using live-style fleet fixtures and PR enrichment. No source changes were made;
/bearings filemarkdown persistence remains unexercised because it is skill-level behavior without a local executable renderer.Evidence: Pretty Bearings CLI projection
Evidence: Default TOON projection
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-bearings-snapshot.sh:339-under_way_detailmaps everyfailed/cancelledstate to "parked after validation stop" unconditionally, whileunder_way_summary(line 344) only applies the shield whendoingmatchesrun (failed|cancelled). Statefailedis also reachable from the status-log fallback (bin/fm-crew-state.sh:139viaemit "$LOG_STATE" status-log ...at line 583), where the detail is free text. Failing sequence: a crewmate appendsfailed: worktree gone, work lost, no run is live, so the board renders summaryworktree gone, work lostwith detailparked after validation stop- a genuine failure is described to the captain as a deliberate park, and the priorfailed, needs a lookcue is gone (AGENTS.md hard rule 5 and section 9's "a real blocker or failure" escalation). The intent authorized shielding false run failed/cancelled readouts; gatingdetailon the same condition already used byunder_way_summarywould keep that shield without covering real failures.bin/fm-bearings-snapshot.sh:320-pr_captain_actiononly yields "ready to merge" whenmergeable == "MERGEABLE", andpr_under_way_detailhas no branch for an approved PR, so an APPROVED PR with passing checks whosemergeableisUNKNOWNfalls through every elif to a bare "PR open" under Under way.gh pr list --json mergeablecommonly returnsUNKNOWNbecause GitHub computes mergeability lazily for list queries, so a genuinely merge-ready PR can silently never reach Waiting on you and its board row does not even say it is approved. Consider treating APPROVED + passing + UNKNOWN mergeability as an explicit state (either merge-ready, or an Under way detail that names the approval) rather than the generic "PR open".bin/fm-bearings-snapshot.sh:337-pausednow renders as "paused for walk".pausedis the declared-external-wait verb (bin/fm-crew-state.shmap_log_state / status_is_paused), so the row asserts a walk-related cause for any declared external wait - e.g. the repo's own fixture task whose reason is "declared external-wait for upstream release" boards as "paused for walk". The replaced wording ("paused on a declared external wait") matched the data; if the captain asked for plainer language, something cause-neutral like "paused, waiting on something outside the fleet" keeps it honest.bin/fm-bearings-snapshot.sh:505- Under way rows projected from$in_flightalways setartifact:"-", even when the task's meta records a PR (.tasks[].pr.url, still surfaced separately inrecorded_prs). The intent requires "full PR URLs when present" and the rewritten skill now tells the renderer to render fromboard_columns/board_itemswith the legacy arrays as supporting detail, so on the default local-only path (no--include-prs) the board alone carries no URL for a live task that already has a PR. Carrying.pr.urlinto the Under way row'sartifactwould close this without touching Ready or Done..agents/skills/bearings/SKILL.md:87- The new contract states the six buckets are mutually exclusive and every board item lands in exactly one column, but a task that finished and had its backlog row moved to Done while its meta still exists appears in both Under way (statedone-> "finished, awaiting pickup") and Done ($main_donefrom the backlog record) under the same id. This overlap predates the change (it existed betweenin_flightandlanded); flagging only because the change newly asserts it cannot happen. The intent defers Done polish this pass, so no action is expected now.🔧 Fix: honest Under way failure detail, unknown-mergeable merge-ready, PR artifact
2 issues (1 warning, 1 info) still open:
bin/fm-bearings-snapshot.sh:336-validation_parkstill decides "deliberate park vs real wreck" from a substring of free text (.doing | test("run (failed|cancelled)")) rather than from the canonical origin of the state.bin/fm-crew-state.shonly ever emits the literal detailrun failed/run cancelledfrom the run-step path (lines 449-450, 466-467, 490-491, emitted withsource: run-stepat line 545); a crew-authored failure arrives through the status-log fallback (line 583,emit "$LOG_STATE" status-log ...) with free-form text thatbin/fm-brief.sh:257explicitly instructs crews to write asfailed: {why}. Reachable path: a crew appendsfailed: the validation run failed and the worktree is gone-> statefailed, sourcestatus-log, detail matches the regex -> the board renders summary AND detail as "parked after validation stop", i.e. exactly the wreck-as-orderly-park masking this round was opened to fix, now in both fields. The canonical snapshot already exposes the exact discriminator:.current_state.source(bin/fm-fleet-snapshot.sh:227-228, used at :471 and :705). Carryingsource: .current_state.sourceinto the$in_flight_allrow (alongside the newprkey, deleted before output the same way) and requiringsource == "run-step"invalidation_parkwould make the shield exact and would not change the captain's already-validated FM_HOME readout, since those parks originate from the run-step path. Note this is a product-semantics call: the fix round's own new test (tests/fm-bearings-snapshot.test.sh:975,printf 'failed: run failed' > parked-task.status) asserts that a status-log line saying "run failed" IS a deliberate park, so tightening the predicate requires deciding that expectation is wrong. No test in the suite exercises the real run-step park (the fakebinno-mistakesstub returns nothing, so every fixture state comes from the status log)..agents/skills/bearings/SKILL.md:67- The SKILL rewrite deletes the pre-existing file-mode line "For a richer review surface, optionally offer a Lavish board withlavish-axiwhen the report has enough structure to deserve one, but only after the required digest is ready." The intent says "Lavish/HTML board out of scope for v1", which scopes what this change should BUILD; it does not ask to remove an existing optional affordance that is unrelated to the Kanban projection. Every other line in this hunk is a four-section -> six-column rename, so the removal reads as incidental rather than deliberate. If dropping the Lavish offer is intended, it is a separate product decision worth stating; otherwise restore the sentence with the six-column wording.🔧 Fix: key validation-park shield on run-step source, not prose
2 issues (1 warning, 1 info) still open:
.agents/skills/bearings/SKILL.md:89- The rewritten contract says "held or unavailable structured-home state is represented through the board's queued or held items", replacing the prior explicit rule that a secondmate'sunknownown row "belongs there [Charted Next] as an unavailable-state gate". That claim is false for the unavailable case, and no board item covers it. Concrete path: a registered secondmate whose home cannot be read getsprovenance.selected=parent-event-fallback/unknownwithqueued:[],holds:[],decisions_open:[](bin/fm-fleet-snapshot.sh:1288-1297); the same forsecondmate_current.registry.available == false, which only produces the synthetic(registry)row.board_itemsis built solely from$gates(which filtersselect($m.provenance.selected == "structured-home"), bin/fm-bearings-snapshot.sh:461),$in_flight(secondmates only whenbearings_state == "active_child_work", line 428),$candidate_prs,$decisions, and$landed— thesecondmatesarray itself is never projected. Since step 2 now tells the renderer to "Render fromboard_columnsandboard_items" with the legacy arrays as "supporting detail" (SKILL.md:50) and the contract permits "nothing else structural" (SKILL.md:72), an unreachable secondmate home vanishes from all six columns; only anomitted[]line remains, which is not a column. This is the same failure mode as the captain's "open PRs must not vanish from all columns" punch-list item, applied to secondmate homes. Cheapest fix consistent with the intent: project the non-active_child_worksecondmate rows whose state isunknown/externally_heldinto Blocked (or Held) as board items, or restore the explicit renderer instruction for thesecondmatesarray. Note the intent defers secondmate polish ("Defer secondmate/home id collision polish until there is a secondmate or second repo to inspect") and the captain's FM_HOME currently registers no secondmate, so this may be a deliberate defer — but the contract sentence asserting coverage is wrong either way.bin/fm-bearings-snapshot.sh:481- The(main-inventory)integrity gate is prepended first in$gates_all(line 440-446) and the file header states the disclosure exists "so the six-column chat cannot claim an empty fleet while main current state is broken". Previously the bound was head truncation ($gates_all[:$gates_n]), so element 0 always survived any bound >= 1. The new per-column share interleaves[ready, held, blocked]viaround_robin($gates_n), so the main-inventory item isblocked[0]and is only picked at position 3. WithFM_BEARINGS_GATESset to 1 or 2 and at least one Ready and one Held item present, an invalid main inventory now produces no Blocked board item at all — the warning survives only inomitted[]. Not reachable at the default bound of 20, but the suite already exercisesFM_BEARINGS_GATES=2(tests/fm-bearings-snapshot.test.sh:1308), so the low-bound path is a real operating mode. Pinning the(main-inventory)row into$gatesahead of the round-robin share (and excluding it from the Blocked share arithmetic) restores the prior guarantee without changing default output.🔧 Fix: pin integrity gates so broken-state items never vanish
2 issues (1 warning, 1 info) still open:
.agents/skills/bearings/SKILL.md:89- The rewritten contract line claims "held structured-home state is represented through the board's queued or held items", and the fix round deleted the prior explicit renderer rule ("externally_heldbelongs in Charted Next"). That claim is false for the child-state half ofexternally_held, and no board item covers it. Concrete path: a registered secondmate whose structured home has an in-flight backlog row with NOhold:/hold-kind:marker and whose child crew isparked/paused/blockedproduces asource:"child-state"entry inholds_all(bin/fm-fleet-snapshot.sh:717-723) and therefore home stateexternally_held(bin/fm-fleet-snapshot.sh:740). That record is by construction absent fromqueued_all(bin/fm-fleet-snapshot.sh:654-659 requirescurrent_role == "held", while the child-state branch requires hold metadata to be absent), so it never reaches$m.queued[]. In bin/fm-bearings-snapshot.sh the home then matches nothing:$in_flight_alltakes secondmates only atactive_child_work(line 428),$integrity_allonly atstate == "unknown"(line 449),$queued_gatesonly from$m.queued[](line 474), and there are no decisions or landed rows. The home appears in no column at all - only in the legacysecondmatesarray, which SKILL.md:50 now demotes to "supporting detail" while SKILL.md:72 permits "nothing else structural". This is the same vanish-from-every-column failure the captain's punch list and the round-3 fix were opened for; round 3 fixed only theunknownhalf of the finding it was given. A secondmate whose ship is parked at a validation gate is an ordinary state, not an exotic one. Either project non-active_child_worksecondmate rows withstate == "externally_held"into Held as board items (mirroring theunknown-> Blocked projection at lines 448-459), or restore an explicit renderer instruction for thesecondmatesarray; the contract sentence is wrong either way. Note the intent defers "secondmate/home id collision polish", which is a different concern than board visibility, and the captain's FM_HOME currently registers no secondmate.bin/fm-bearings-snapshot.sh:494- Round 3 pinned the whole$integrity_allprefix ahead of the round-robin share, not just(main-inventory):$integrity = $integrity_all[:$gates_n]and$share_n = max($gates_n - |$integrity|, 0)(lines 494-497).$integrity_allnow also holds one row perunknownsecondmate home, and that set is bounded only byFM_SNAPSHOT_SECONDMATES(default 20, bin/fm-fleet-snapshot.sh:80), which equals the defaultFM_BEARINGS_GATESof 20 (line 76). Failing sequence: 20 registered secondmate homes are unreachable at once (a shared host/network outage makes every home read time out ->current.state == "unknown"), so$integrity_allhas 21 rows,$integritytruncates to 20,$share_nbecomes 0, and Ready, Held and Blocked render zero queued items even though the backlog is full - the exact starvationtest_gate_columns_keep_their_share_of_the_boundwas written to prevent, and one integrity row is silently dropped too. Only theomitted[]lines disclose it. Pinning just(main-inventory)and folding the secondmate integrity rows into the Blocked group of the round-robin share keeps the round-3 guarantee while leaving Ready/Held/Blocked a share at any bound.🔧 Fix: board held secondmate homes, unpin non-inventory gates
2 issues (1 warning, 1 info) still open:
bin/fm-bearings-snapshot.sh:472- The round-4 held-home projection suppresses on owner instead of on whether the hold is actually represented, so the vanish-from-every-column failure it was opened to fix is still reachable. Concrete path: a secondmate home with an in-flight row carrying NOhold:/hold-kind:marker whose child status ispaused: ...gets asource:"child-state"hold (bin/fm-fleet-snapshot.sh:717-723) and home stateexternally_held(:740). If that same home also has one ordinary queued row, that row reaches$queued_gateswithowner= the mate id (bin/fm-bearings-snapshot.sh:460-467), so$gate_owners(:468) suppresses the$secondmate_gatesrow at :472-473. The board then shows the unrelated queued item under Ready and the parked ship in no column at all - only in the legacysecondmatesarray, which SKILL.md:50 demotes to supporting detail while SKILL.md:72 permits "nothing else structural". The new test only builds the zero-queue case (tests/fm-bearings-snapshot.test.sh:1120 leaves## Queuedempty), and a mate with both a parked child and queued work is the ordinary configuration. SKILL.md:90 states the invariant that is violated ("a home held on its own work boards under Held whenever its queued items do not already represent it") - an unrelated Ready item does not represent the hold. Earliest exact boundary: the canonical snapshot already labels hold origin, so project$m.holds[] | select(.source == "child-state")as Held gates (id$m.id + "/" + .id) and drop the$gate_ownersheuristic - backlog-source holds already reach the board through$m.queued[]with gatehold, so there is no duplication; that changes the id asserted at tests/fm-bearings-snapshot.test.sh:1148 from the home id to the held task id. The intent defers secondmate polish and the captain's FM_HOME registers no secondmate, so deferring is a legitimate call - but then SKILL.md:90 should stop asserting the coverage.bin/fm-bearings-snapshot.sh:496- Folding secondmate integrity rows into the shared round-robin narrows round 3's "an unavailable home never vanishes" guarantee to(main-inventory)alone. WithFM_BEARINGS_GATESat 1 or 2 and Ready/Held items present,round_robin($share_n)(line 503) picksready[0]/held[0]before the Blocked group, so an unreachable home again produces no Blocked board item and survives only in theboard Blocked showing 0 of Nomitted[] line. This is the deliberate trade that stops a home flood from zeroing the queued share, it is honestly disclosed, and the default bound of 20 is unaffected - noted so the narrowed guarantee is a recorded decision rather than an assumed one.🔧 Fix: board child-state secondmate holds by hold origin
3 issues (1 warning, 2 infos) still open:
bin/fm-bearings-snapshot.sh:479- The new$secondmate_gatesprojection boards everystate == "unknown"home under Blocked with the hardcoded detail "secondmate home unavailable", butbearings_statereaches"unknown"for a fully readable, fresh home. Concrete path: a registered secondmate home has an in-flight backlog rowxwith nohold:/hold-kind:marker, and childxappendsneeds-decision [key=k]: pick the order.map_log_statemaps that toparked(bin/fm-crew-state.sh:136), and the parked/status-log state keeps the keyed decision inhints.open_decisions(bin/fm-fleet-snapshot.sh:469-475).secondmate_home_summary_jsonfolds that status-source decision into$decisions_all(bin/fm-fleet-snapshot.sh:707-709) so homestatebecomescaptain_decision, whileholdsgets only asource:"child-state"entry. In bin/fm-bearings-snapshot.sh:383-395 the captain_decision re-derivation then finds$captain_holdsempty (it requiressource == "backlog" and verb == "captain-hold"),active_childrenempty, and$backlog_holdsempty (the only hold is child-state), so it falls through toelse "unknown"at line 394.$secondmates_allrendersdoingas.current.reason // "Current home state unavailable", and.current.reasonis null because the summary is valid - so the board shows a Blocked item titled "Current home state unavailable" with detail "secondmate home unavailable" for a home whose ownsecondmatesrow simultaneously reportsprovenance: structured-home, freshness: fresh, and whose parked ship now also (correctly) boards under Held via the round-6 hold-origin branch. That is a false claim of unreadability on a captain-facing column, the same honesty class as the failed/cancelled shielding this punch list was opened for. The snapshot already carries the exact discriminator: a genuinely unavailable or partial-structured home hascurrent.reasonset (bin/fm-fleet-snapshot.sh:1244, 1293) and/orprovenance.selected != "structured-home", whereas this derived fallback hasreason == "-". Keying the Blocked unavailable-state gate on that (rather than onbearings_state == "unknown") keeps round 3's guarantee for real unreachable homes without inventing unavailability. This is a captain-facing classification/wording call, so it needs your decision rather than an automatic rewrite.bin/fm-bearings-snapshot.sh:473- The new child-state hold board row usestitle:((.title // .id) | trunc(60))as its Held summary, but the upstreamtitleis always the raw task id, never the human title.bin/fm-fleet-snapshot.sh:721builds it as((.backlog.title // .id) | trunc(90))where.is an element of the$tasksargument - andsecondmate_home_summary_jsonis invoked with the rawTASKS_JSON(bin/fm-fleet-snapshot.sh:1349, 1352).task_json_linesemits no.backlogkey; that merge happens only in the top-level assembly at bin/fm-fleet-snapshot.sh:1388, which the summary path never reaches. So.backlog.titleis always null and the fallback.idalways wins. Failing sequence: the round-6 fixture's held ship has backlog title "Ship the mate thing", but its Held board row readssummary: "mate-ship"- a bare id in a column the intent requires to be "Captain-facing prose only". The round-6 test codifies this outcome (tests/fm-bearings-snapshot.test.sh:1160asserts.summary | contains("mate-ship")), so it is the fix round's claim rather than independent proof. Resolving the title against$backlog.records[] | select(.id == $work.id) | .titlein the child-state hold branch makes the dead fallback live and gives the new Held row real prose; the test assertion would then need to check the backlog title.bin/fm-bearings-snapshot.sh:608- The change adds explicitboard <Ready|Held|Blocked> showing X of Ydisclosures for the three gate-fed columns only. Under way, Waiting on you, and Done are bounded too ($in_flight_n,$decisions_n,$landed_n, plus the PR row cap), and their truncation is disclosed only under the legacy array names ("in_flight showing 5 of 9", "decisions_open showing ...", "landed showing ...", "candidate_prs showing ..."). Nothing is silently dropped, so this is honest; noting it because SKILL.md:50 now demotes those arrays to "supporting detail" while the disclosure still speaks in their vocabulary, which makes the naming asymmetric rather than incomplete. Recorded as a decision, not an ask.🔧 Fix: honest secondmate home state, real held-task titles
1 info still open:
bin/fm-bearings-snapshot.sh:391- The newelse "no_active_work"fallback correctly stops the false unavailable claim, and its residual gap is narrow and consistent. Reachable path: a registered home has an in-flight row withcurrent_role == "program"(excluded from$active_allat bin/fm-fleet-snapshot.sh:702) whose child's last status line isworking:from the status-log source, plus an earlierneeds-decision [key=x]. The keyed fold is not cleared (bin/fm-fleet-snapshot.sh:470-475 only clears on run-step/pane or terminal state), so canonical state iscaptain_decision; in bearings$captain_holdsis empty,active_childrenis empty, andholdsis empty (working is not parked/paused/blocked), so$bearings_stateisno_active_work, the home's row reads "No active child work" (line 412) and no board item covers the open decision. This matches how bearings already treats main-home status-source decisions - onlydecision-hold-lifecycle-promoted backlog captain holds reachdecisions_open(lines 433-440) - so it is the existing durable-decision boundary rather than a new gap, and the common shape (child parked on a needs-decision) now boards correctly under Held via the round-6 hold-origin branch. Recorded as a decision, not an ask; the intent defers secondmate polish and calls for one validation pass..agents/skills/bearings/SKILL.md:23- The executable snapshot and chat projection are validated end-to-end, but/bearings filereport creation/replacement is defined only in the agent skill and has no executable renderer in this phase, so dated markdown writing was not directly demonstrated.bash tests/fm-bearings-snapshot.test.shIsolated fixture throughfm-bearings-snapshot.sh --include-prs --jsonwith machine assertionsIsolated fixture throughfm-bearings-snapshot.sh --include-prswith captured TOON output✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.