Skip to content

feat: expose a deterministic captain attention feed - #23

Merged
ryannmicua merged 8 commits into
mainfrom
fm/captain-attention-build
Oct 24, 2026
Merged

ryannmicua merged 8 commits into
mainfrom
fm/captain-attention-build

Conversation

@ryannmicua

@ryannmicua ryannmicua commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Intent

Build option 1 of the attention feed: open decisions, newest first, made fully deterministic rather than depending on an agent remembering to update a board.

Context: an investigation (report at ~/firstmate/data/captain-board-deterministic/report.md, sections "The external read" and "Recommended build plan") asked how an external system such as Quarterdeck or Cadence can know which decisions are waiting on the captain and which were raised most recently. The captain asked that this be built in deterministically, not as an instruction to update a board. The report offered three scopes: (1) open decisions newest first only, (2) all three slices (plus recently discussed and Quarterdeck reading from it), (3) don't build. The captain chose option 1. Recently discussed (slice 2) and the Quarterdeck change (slice 3) are not part of this ask.

What Changed

  • Add fm-attention.sh --json to list current captain holds and open keyed decisions newest first, derived from local records without a separate board.
  • Record hold, deferral, and answer transitions in the optional fleet ledger; preserve opening dates across repeated holds and expired deferrals.
  • Add local snapshot support for configured backlog adapters and decision timestamps, with regression coverage and documentation for the feed contract.

Risk Assessment

✅ Low: The change is bounded to the accepted attention feed behavior, and source tracing found no remaining material defects in ordering, hold projection, or read-only collection.

Testing

Focused regressions and isolated real CLI checks passed for ordering, lifecycle, retries, legacy dates, keyed folding, large malformed ledgers, read-only behavior, and argument guards. JSON transcripts provide evidence for this CLI-only surface. Beads requires an unavailable adapter-capable tasks-axi; all disposable files were cleaned up.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Create captain holds, read newest first, then answer or release them and observe their removal ✅ pass live 01-held-a-b.json through 05-release-clears-feed.json; live-cli-transcript.json
Retry an unchanged older hold without moving recency; change its reason and deferral to update recency ✅ pass live 02-unchanged-retry.json; 03-changed-deferral.json; captain-events.jsonl
Read legacy holds using day precision and retry an unstamped hold without changing its order, with ledger enabled or disabled ✅ pass live 06-legacy-before-False.json through 07-legacy-retry-True.json
Read keyed decisions by emission time despite rejected openings, continuation prose, delayed capture, a large ledger, and malformed ledger lines ✅ pass live 08-large-delayed-ledger.json; 10-resolved-key.json
Read repeatedly with a registered remote secondmate without changing persisted files or creating cache directories ✅ pass live read-only-inventory.json; 09-repeat-read.json
Request CLI help and reject missing or extra attention arguments ✅ pass live live-cli-transcript.json
Read holds and blocker classifications from a real configured Beads backend ⏸️ untested no Downloaded bd v1.3.2 inside the worktree and initialized a disposable embedded database. The real attention command could not proceed because installed tasks-axi 0.2.6 rejects Beads. Checked the lates…
Evidence: Live CLI transcript

Source: Live CLI transcript

[
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "a",
      "--title",
      "a",
      "--reason",
      "choose A",
      "--repo",
      "sample"
    ],
    "exit": 0,
    "stdout": "a\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "b",
      "--title",
      "b",
      "--reason",
      "choose B",
      "--repo",
      "sample"
    ],
    "exit": 0,
    "stdout": "b\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:38Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"b\",\n      \"home\": \"main\",\n      \"title\": \"b\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose B\",\n      \"bucket\": \"live\",\n      \"opened_at\": \"2026-10-24T07:27:35Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:37Z\"\n    },\n    {\n      \"task\": \"a\",\n      \"home\": \"main\",\n      \"title\": \"a\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose A\",\n      \"bucket\": \"live\",\n      \"opened_at\": \"2026-10-24T07:27:32Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:34Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "a",
      "--title",
      "a",
      "--reason",
      "choose A",
      "--repo",
      "sample"
    ],
    "exit": 0,
    "stdout": "a\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:40Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"b\",\n      \"home\": \"main\",\n      \"title\": \"b\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose B\",\n      \"bucket\": \"live\",\n      \"opened_at\": \"2026-10-24T07:27:35Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:37Z\"\n    },\n    {\n      \"task\": \"a\",\n      \"home\": \"main\",\n      \"title\": \"a\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose A\",\n      \"bucket\": \"live\",\n      \"opened_at\": \"2026-10-24T07:27:32Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:34Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "a",
      "--title",
      "a",
      "--reason",
      "choose revised A",
      "--repo",
      "sample",
      "--until",
      "2027-01-01"
    ],
    "exit": 0,
    "stdout": "a\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:43Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"a\",\n      \"home\": \"main\",\n      \"title\": \"a\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose revised A\",\n      \"bucket\": \"dated\",\n      \"opened_at\": \"2026-10-24T07:27:32Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:43Z\"\n    },\n    {\n      \"task\": \"b\",\n      \"home\": \"main\",\n      \"title\": \"b\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose B\",\n      \"bucket\": \"live\",\n      \"opened_at\": \"2026-10-24T07:27:35Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:37Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "answer",
      "b",
      "--decision-file",
      "~/.no-mistakes/worktrees/ff5e17b6f5de/01M5PAAQRNW77M8AQJJP4MDZYA/.validation-tmp/attention-live-igu_t17l/lifecycle/answer.txt"
    ],
    "exit": 0,
    "stdout": "answered: b\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:45Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"a\",\n      \"home\": \"main\",\n      \"title\": \"a\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose revised A\",\n      \"bucket\": \"dated\",\n      \"opened_at\": \"2026-10-24T07:27:32Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-10-24T07:27:43Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-captain-hold.sh",
      "answer",
      "a",
      "--decision-file",
      "~/.no-mistakes/worktrees/ff5e17b6f5de/01M5PAAQRNW77M8AQJJP4MDZYA/.validation-tmp/attention-live-igu_t17l/lifecycle/answer.txt",
      "--release"
    ],
    "exit": 0,
    "stdout": "released: a\n",
    "stderr": ""
  },
  {
    "home": "lifecycle",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:47Z\",\n  \"open_decisions\": []\n}\n",
    "stderr": ""
  },
  {
    "home": "legacy-False",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:47Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"day\",\n      \"home\": \"main\",\n      \"title\": \"day\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose day\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-07-03T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-07-03T00:00:00Z\"\n    },\n    {\n      \"task\": \"legacy\",\n      \"home\": \"main\",\n      \"title\": \"legacy\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose legacy\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-01-01T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-01-01T00:00:00Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "legacy-False",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "legacy",
      "--title",
      "legacy",
      "--reason",
      "choose legacy",
      "--repo",
      "sample"
    ],
    "exit": 0,
    "stdout": "legacy\n",
    "stderr": ""
  },
  {
    "home": "legacy-False",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:50Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"day\",\n      \"home\": \"main\",\n      \"title\": \"day\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose day\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-07-03T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-07-03T00:00:00Z\"\n    },\n    {\n      \"task\": \"legacy\",\n      \"home\": \"main\",\n      \"title\": \"legacy\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose legacy\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-01-01T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-01-01T00:00:00Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "legacy-True",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:50Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"day\",\n      \"home\": \"main\",\n      \"title\": \"day\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose day\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-07-03T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-07-03T00:00:00Z\"\n    },\n    {\n      \"task\": \"legacy\",\n      \"home\": \"main\",\n      \"title\": \"legacy\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose legacy\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-01-01T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-01-01T00:00:00Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "legacy-True",
    "command": [
      "fm-captain-hold.sh",
      "hold",
      "legacy",
      "--title",
      "legacy",
      "--reason",
      "choose legacy",
      "--repo",
      "sample"
    ],
    "exit": 0,
    "stdout": "legacy\n",
    "stderr": ""
  },
  {
    "home": "legacy-True",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:52Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"day\",\n      \"home\": \"main\",\n      \"title\": \"day\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose day\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-07-03T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-07-03T00:00:00Z\"\n    },\n    {\n      \"task\": \"legacy\",\n      \"home\": \"main\",\n      \"title\": \"legacy\",\n      \"kind\": \"captain_hold\",\n      \"reason\": \"choose legacy\",\n      \"bucket\": \"aged\",\n      \"opened_at\": \"2026-01-01T00:00:00Z\",\n      \"opened_precision\": \"day\",\n      \"last_touched_at\": \"2026-01-01T00:00:00Z\"\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "status-feed",
    "command": [
      "fm-fleet-ledger.sh",
      "capture"
    ],
    "exit": 0,
    "stdout": "",
    "stderr": ""
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:53Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"new\",\n      \"reason\": \"choose new\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T11:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T11:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"pending-reply-old\",\n      \"reason\": \"pending-reply-missed: choose old\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T10:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T10:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"default\",\n      \"reason\": \"default decision\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T09:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T09:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"undated\",\n      \"reason\": \"no timestamp\",\n      \"bucket\": null,\n      \"opened_at\": null,\n      \"opened_precision\": null,\n      \"last_touched_at\": null\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:54Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"new\",\n      \"reason\": \"choose new\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T11:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T11:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"pending-reply-old\",\n      \"reason\": \"pending-reply-missed: choose old\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T10:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T10:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"default\",\n      \"reason\": \"default decision\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T09:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T09:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"undated\",\n      \"reason\": \"no timestamp\",\n      \"bucket\": null,\n      \"opened_at\": null,\n      \"opened_precision\": null,\n      \"last_touched_at\": null\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh",
      "--json"
    ],
    "exit": 0,
    "stdout": "{\n  \"schema\": \"fm-attention.v1\",\n  \"generated\": \"2026-10-24T07:27:54Z\",\n  \"open_decisions\": [\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"pending-reply-old\",\n      \"reason\": \"pending-reply-missed: choose old\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T10:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T10:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"default\",\n      \"reason\": \"default decision\",\n      \"bucket\": null,\n      \"opened_at\": \"2026-07-03T09:00:00Z\",\n      \"opened_precision\": \"second\",\n      \"last_touched_at\": \"2026-07-03T09:00:00Z\"\n    },\n    {\n      \"task\": \"remote\",\n      \"home\": \"main\",\n      \"title\": \"remote\",\n      \"kind\": \"keyed\",\n      \"key\": \"undated\",\n      \"reason\": \"no timestamp\",\n      \"bucket\": null,\n      \"opened_at\": null,\n      \"opened_precision\": null,\n      \"last_touched_at\": null\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh"
    ],
    "exit": 2,
    "stdout": "",
    "stderr": "usage: fm-attention.sh --json\n\nPrint the decisions waiting on the captain, newest first, as JSON\n(schema fm-attention.v1). Read-only: nothing is stored.\n"
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh",
      "--json",
      "extra"
    ],
    "exit": 2,
    "stdout": "",
    "stderr": "usage: fm-attention.sh --json\n\nPrint the decisions waiting on the captain, newest first, as JSON\n(schema fm-attention.v1). Read-only: nothing is stored.\n"
  },
  {
    "home": "status-feed",
    "command": [
      "fm-attention.sh",
      "--help"
    ],
    "exit": 0,
    "stdout": "usage: fm-attention.sh --json\n\nPrint the decisions waiting on the captain, newest first, as JSON\n(schema fm-attention.v1). Read-only: nothing is stored.\n",
    "stderr": ""
  }
]
Evidence: Large-ledger attention output

Source: Large-ledger attention output

{
  "schema": "fm-attention.v1",
  "generated": "2026-10-24T07:27:53Z",
  "open_decisions": [
    {
      "task": "remote",
      "home": "main",
      "title": "remote",
      "kind": "keyed",
      "key": "new",
      "reason": "choose new",
      "bucket": null,
      "opened_at": "2026-07-03T11:00:00Z",
      "opened_precision": "second",
      "last_touched_at": "2026-07-03T11:00:00Z"
    },
    {
      "task": "remote",
      "home": "main",
      "title": "remote",
      "kind": "keyed",
      "key": "pending-reply-old",
      "reason": "pending-reply-missed: choose old",
      "bucket": null,
      "opened_at": "2026-07-03T10:00:00Z",
      "opened_precision": "second",
      "last_touched_at": "2026-07-03T10:00:00Z"
    },
    {
      "task": "remote",
      "home": "main",
      "title": "remote",
      "kind": "keyed",
      "key": "default",
      "reason": "default decision",
      "bucket": null,
      "opened_at": "2026-07-03T09:00:00Z",
      "opened_precision": "second",
      "last_touched_at": "2026-07-03T09:00:00Z"
    },
    {
      "task": "remote",
      "home": "main",
      "title": "remote",
      "kind": "keyed",
      "key": "undated",
      "reason": "no timestamp",
      "bucket": null,
      "opened_at": null,
      "opened_precision": null,
      "last_touched_at": null
    }
  ]
}
Evidence: Read-only state comparison

Source: Read-only state comparison

{
  "unchanged": true,
  "before": {
    "projects": "dir",
    "state": "dir",
    "config": "dir",
    ".tasks.toml": "3b39c93a90b25e940f5a4972c1c286c914c19f496268a217231645f9f3a0ef20",
    "data": "dir",
    "state/remote.status": "b8774ff4f10533b74a772e1ab57ffaba5b77638f8a898728740575352541770a",
    "state/remote.meta": "2d62fdc0e2accb5bc55cda821e2733d4fc7430e5a246998cc5b2e1d3dd74b574",
    "state/fleet-ledger.jsonl": "b29a51493722c81692574ff6b46b2ef66ef08bfb225745b366694e089a976f9e",
    "state/.remote.fleet-ledger-offset": "30a8d3c2e53e919d84c8897de417a5bf168e0803915482f1b956f68c44ce1cfd",
    "config/fleet-ledger": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "data/backlog.md": "fc7cfb341b1c7627e953dcca21ee8f90a02fb1e30d8ef38f3a3ba576acbe6bc8",
    "data/secondmates.md": "eb574d2bba48cd3da887bdb8a2bbec4b2ed9a89469be5180d10d133022164e56"
  },
  "after": {
    "projects": "dir",
    "state": "dir",
    "config": "dir",
    ".tasks.toml": "3b39c93a90b25e940f5a4972c1c286c914c19f496268a217231645f9f3a0ef20",
    "data": "dir",
    "state/remote.status": "b8774ff4f10533b74a772e1ab57ffaba5b77638f8a898728740575352541770a",
    "state/remote.meta": "2d62fdc0e2accb5bc55cda821e2733d4fc7430e5a246998cc5b2e1d3dd74b574",
    "state/fleet-ledger.jsonl": "b29a51493722c81692574ff6b46b2ef66ef08bfb225745b366694e089a976f9e",
    "state/.remote.fleet-ledger-offset": "30a8d3c2e53e919d84c8897de417a5bf168e0803915482f1b956f68c44ce1cfd",
    "config/fleet-ledger": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "data/backlog.md": "fc7cfb341b1c7627e953dcca21ee8f90a02fb1e30d8ef38f3a3ba576acbe6bc8",
    "data/secondmates.md": "eb574d2bba48cd3da887bdb8a2bbec4b2ed9a89469be5180d10d133022164e56"
  }
}
Evidence: Beads capability limitation

Source: Beads capability limitation

[
  {
    "command": [
      "git",
      "init",
      "-q"
    ],
    "exit": 0,
    "stdout": "",
    "stderr": ""
  },
  {
    "command": [
      "bd",
      "init",
      "--prefix",
      "att",
      "--skip-agents",
      "--skip-hooks",
      "--non-interactive"
    ],
    "exit": 0,
    "stdout": "  Repository ID: 5381c844\n  Clone ID: 1ed9fe620de3b698\n\n\u2713 bd initialized successfully!\n\n  Backend: dolt\n  Mode: embedded\n  Database: att\n  Issue prefix: att\n  Issues will be named: att-<hash> (e.g., att-a3f2dd)\n\nRun bd quickstart to get started.\n\n",
    "stderr": "Thanks for using bd! Quick heads-up: bd shares anonymous usage metrics \u2014\n   just which commands get run (plus the bd version and OS platform), never your\n   issues, paths, remotes, identity, or anything you type. Seeing how people use\n   bd is how we decide what to improve next, so it genuinely makes bd better for\n   everyone.\n      Curious what's sent?   bd metrics example\n      Prefer to opt out?     bd metrics off    (one command, no restart needed)\n\nWarning: failed to commit beads files: exit status 128\n\n\u26a0 No Dolt remote configured\n  Issues are stored in local Dolt. .beads/issues.jsonl is an export,\n  not cross-machine sync or the source of truth.\n  To enable durable sync, add a git origin and then run:\n    bd dolt push\n"
  },
  {
    "command": [
      "bash",
      "~/.no-mistakes/worktrees/ff5e17b6f5de/01M5PAAQRNW77M8AQJJP4MDZYA/bin/fm-attention.sh",
      "--json"
    ],
    "exit": 1,
    "stdout": "",
    "stderr": "error: \"Unsupported backend \\\"beads\\\" \u2014 P1 ships the markdown backend only\"\ncode: UNSUPPORTED\nhelp[1]: \"Set `backend = \\\"markdown\\\"` in .tasks.toml, or omit --backend\"\nfm-fleet-snapshot: backlog read failed\n"
  }
]
Evidence: Repeatable verification recipe

Source: Repeatable verification recipe

# Attention feed verification

Last tested: 2026-10-24.

From the run worktree, create .validation-tmp and run the evidence script drive_attention.py with Python 3.
It requires Bash, jq, and tasks-axi on PATH, clears inherited fleet/backlog overrides, and creates only disposable isolated homes inside .validation-tmp.
It invokes the real product CLI and saves JSON outputs plus a full command transcript here.
It verifies lifecycle, retries, deferral, legacy dates, keyed opening/resolution, delayed large ledgers, invalid continuations, argument guards, and unchanged files/directories with a registered remote secondmate.
The drivers clean up their own homes in finally blocks.
No primary launch, worker launch, or operator data is needed.

Run the focused regression with TMPDIR set to the worktree's .validation-tmp directory: bash tests/fm-attention.test.sh.
The suite uses stand-ins for fleet tools and for the adapter and does not establish live Beads integration.

For Beads, provide a Beads-capable tasks-axi plus real bd and run drive_beads.py (update its disposable bd binary path as needed).
This run downloaded bd v1.3.2 locally and initialized an embedded database successfully; installed and latest upstream tasks-axi 0.2.6 reject the beads backend.
See beads-cli-transcript.json and adapter-capability.json.
Remove the disposable .validation-tmp directory when finished; preserve evidence here.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 5 issues found → auto-fixed (3) ✅
  • 🚨 bin/fm-attention.sh:63 - The entire append-only ledger is passed as one argument. Once its compact JSON exceeds Linux's approximately 128 KiB per-argument limit, jq cannot start and the attention feed returns no output. About 70 maximum-length status records suffice. Transport the ledger through stdin or a file instead, as fm-fleet-snapshot.sh already does for large JSON documents.
  • 🚨 bin/fm-attention.sh:95 - Ledger ts records capture time, not decision emission time. For example, a secondmate decision raised at 10:00 but captured at 11:01 sorts ahead of a worker decision raised and immediately recorded at 11:00. Backfill and interrupted-capture retries produce the same error. Preserve source emission ordering instead of letting capture time override it. Relevant sites: bin/fm-attention.sh:75-78 selects capture timestamps, :95 applies them to keyed decisions, and :100 sorts them.
  • ⚠️ bin/fm-attention.sh:82 - Supported legacy date-only hold stamps are discarded. A task filed in January with 'Captain hold set: 2026-07-03' gets January's since date, incorrectly sorting behind a July 2 decision. fm-captain-hold.sh explicitly recognizes and preserves date-only stamps. Parse hold_set at day precision before falling back to since; update the precision selection at bin/fm-attention.sh:87 accordingly.
  • ⚠️ bin/fm-classify-lib.sh:938 - Membership after folding does not prove that the current line opened the decision. After a valid pending-reply opening, a later same-key blocked line with an unrelated note is rejected by the reserved-key rule, but this code still replaces the original timestamp, potentially erasing it when the rejected line is unstamped. Record timestamps only for accepted opening transitions. The same invariant must hold at bin/fm-attention.sh:75-78 and :95, where raw ledger status events currently bypass transition acceptance too.
  • ⚠️ bin/fm-fleet-snapshot.sh:1019 - Simplification: the added timestamp projection into secondmate home summaries is unnecessary for the requested option 1 feed. fm-attention.sh consumes backlog.records and tasks[].hints directly, never secondmate summaries' decisions_open. Remove the added hold_set/since projection here and opened_epoch projection at bin/fm-fleet-snapshot.sh:1073, plus their header claim at :69. Retain opened_epoch in task hints, which the feed uses.

🔧 Fix applied.
6 issues (3 errors, 3 warnings) still open:

  • 🚨 bin/fm-attention.sh:63 - The entire append-only ledger is passed as one argument. Once its compact JSON exceeds Linux's approximately 128 KiB per-argument limit, jq cannot start and the attention feed returns no output. About 70 maximum-length status records suffice. Transport the ledger through stdin or a file instead, as fm-fleet-snapshot.sh already does for large JSON documents.
  • 🚨 bin/fm-attention.sh:95 - Ledger ts records capture time, not decision emission time. For example, a secondmate decision raised at 10:00 but captured at 11:01 sorts ahead of a worker decision raised and immediately recorded at 11:00. Backfill and interrupted-capture retries produce the same error. Preserve source emission ordering instead of letting capture time override it. Relevant sites: bin/fm-attention.sh:75-78 selects capture timestamps, :95 applies them to keyed decisions, and :100 sorts them.
  • ⚠️ bin/fm-attention.sh:82 - Supported legacy date-only hold stamps are discarded. A task filed in January with 'Captain hold set: 2026-07-03' gets January's since date, incorrectly sorting behind a July 2 decision. fm-captain-hold.sh explicitly recognizes and preserves date-only stamps. Parse hold_set at day precision before falling back to since; update the precision selection at bin/fm-attention.sh:87 accordingly.
  • ⚠️ bin/fm-classify-lib.sh:938 - Membership after folding does not prove that the current line opened the decision. After a valid pending-reply opening, a later same-key blocked line with an unrelated note is rejected by the reserved-key rule, but this code still replaces the original timestamp, potentially erasing it when the rejected line is unstamped. Record timestamps only for accepted opening transitions. The same invariant must hold at bin/fm-attention.sh:75-78 and :95, where raw ledger status events currently bypass transition acceptance too.
  • 🚨 bin/fm-attention.sh:89 - The ledger-based recency extension exceeds the required “open decisions, newest first” feed and misorders retries. Hold A at 10:00, hold B at 11:00, then retry A at 12:00: A retains its 10:00 hold-set stamp but sorts ahead of B because touched uses the new ledger timestamp. Round 1's R2 fix left this hold sibling behind. Remove ledger-based ranking and the added captain.* event machinery; existing hold-set and status timestamps supply the required ordering. Related sites: bin/fm-attention.sh:56-78 reads ledger history, :89 selects hold capture time, :101 sorts it; bin/fm-captain-hold.sh:252-280 emits events on retries; bin/fm-fleet-ledger.sh:244-251 adds held/deferred/answered events. Removing this deliberate extension needs authorization.
  • ⚠️ bin/fm-classify-lib.sh:939 - Round 1's R4 fix still misses the fold's declaration guard. After blocked [at=100]: need access, append continuation prose containing only blocked. The authoritative fold ignores that line, but this wrapper finds the existing default key and replaces its timestamp with an empty value, moving the decision to the undated tail. This affects both blocked and needs-decision continuations. Record timestamps only when the shared fold accepts an opening transition, including its colon-or-key declaration guard. Related consumers: bin/fm-fleet-snapshot.sh:821 projects the erased timestamp; bin/fm-attention.sh:91-101 uses it for ordering.

🔧 Fix applied.
7 issues (4 errors, 3 warnings) still open:

  • 🚨 bin/fm-attention.sh:63 - The entire append-only ledger is passed as one argument. Once its compact JSON exceeds Linux's approximately 128 KiB per-argument limit, jq cannot start and the attention feed returns no output. About 70 maximum-length status records suffice. Transport the ledger through stdin or a file instead, as fm-fleet-snapshot.sh already does for large JSON documents.
  • 🚨 bin/fm-attention.sh:95 - Ledger ts records capture time, not decision emission time. For example, a secondmate decision raised at 10:00 but captured at 11:01 sorts ahead of a worker decision raised and immediately recorded at 11:00. Backfill and interrupted-capture retries produce the same error. Preserve source emission ordering instead of letting capture time override it. Relevant sites: bin/fm-attention.sh:75-78 selects capture timestamps, :95 applies them to keyed decisions, and :100 sorts them.
  • ⚠️ bin/fm-attention.sh:82 - Supported legacy date-only hold stamps are discarded. A task filed in January with 'Captain hold set: 2026-07-03' gets January's since date, incorrectly sorting behind a July 2 decision. fm-captain-hold.sh explicitly recognizes and preserves date-only stamps. Parse hold_set at day precision before falling back to since; update the precision selection at bin/fm-attention.sh:87 accordingly.
  • 🚨 bin/fm-attention.sh:89 - The ledger-based recency extension exceeds the required “open decisions, newest first” feed and misorders retries. Hold A at 10:00, hold B at 11:00, then retry A at 12:00: A retains its 10:00 hold-set stamp but sorts ahead of B because touched uses the new ledger timestamp. Round 1's R2 fix left this hold sibling behind. Remove ledger-based ranking and the added captain.* event machinery; existing hold-set and status timestamps supply the required ordering. Related sites: bin/fm-attention.sh:56-78 reads ledger history, :89 selects hold capture time, :101 sorts it; bin/fm-captain-hold.sh:252-280 emits events on retries; bin/fm-fleet-ledger.sh:244-251 adds held/deferred/answered events. Removing this deliberate extension needs authorization.
  • 🚨 bin/fm-attention.sh:79 - Supported Beads homes silently lose their captain holds. fm-captain-hold.sh addresses the configured adapter, which can operate without data/backlog.md (docs/configuration.md:345-353), but this projection enumerates only the snapshot's Markdown records. Hold a task on such a home, then read attention: the captain.held event exists, yet open_decisions omits the task because ledger events supply timestamps only. Obtain hold inventory through the configured backlog boundary before projecting it. Related changed sites: bin/fm-attention.sh:54 imports the Markdown inventory; :79-89 enumerates and ranks holds.
  • ⚠️ bin/fm-captain-hold.sh:982 - The Round 2 re-hold fix leaves unstamped legacy holds behind. With ledger disabled, let legacy hold A have since=January and hold B have a February stamp. Retry A in March with identical reason and until: hold_changed becomes 0, but write_hold_set_stamp still writes March because A has no existing stamp. A now sorts ahead of B despite the explicitly required unchanged-retry behavior. Preserve the legacy effective opening date when preserving an existing hold. Related sites: bin/fm-captain-hold.sh:982-986 detects the unchanged hold; :1019 writes the new stamp; bin/fm-attention.sh:83 and :89 turn it into new recency.
  • ⚠️ bin/fm-attention.sh:54 - Simplification: the full snapshot call unnecessarily collects secondmate home summaries, although attention consumes only this home's backlog and task hints. With a registered secondmate, snapshot_cache_prepare creates state/secondmate-summary-cache; successful remote reads also replace cached summary files (bin/fm-fleet-snapshot.sh:1398 and :1831). Thus the new read stores data despite docs/fleet-ledger.md:74 promising otherwise. No option 1 requirement needs this discarded cross-home aggregation. Remove that collection from the attention path by using a local snapshot projection; retain the required captain events and ledger read.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Create captain holds, read newest first, then answer or release them and observe their removal ✅ pass live 01-held-a-b.json through 05-release-clears-feed.json; live-cli-transcript.json
Retry an unchanged older hold without moving recency; change its reason and deferral to update recency ✅ pass live 02-unchanged-retry.json; 03-changed-deferral.json; captain-events.jsonl
Read legacy holds using day precision and retry an unstamped hold without changing its order, with ledger enabled or disabled ✅ pass live 06-legacy-before-False.json through 07-legacy-retry-True.json
Read keyed decisions by emission time despite rejected openings, continuation prose, delayed capture, a large ledger, and malformed ledger lines ✅ pass live 08-large-delayed-ledger.json; 10-resolved-key.json
Read repeatedly with a registered remote secondmate without changing persisted files or creating cache directories ✅ pass live read-only-inventory.json; 09-repeat-read.json
Request CLI help and reject missing or extra attention arguments ✅ pass live live-cli-transcript.json
Read holds and blocker classifications from a real configured Beads backend ⏸️ untested no Downloaded bd v1.3.2 inside the worktree and initialized a disposable embedded database. The real attention command could not proceed because installed tasks-axi 0.2.6 rejects Beads. Checked the lates…
  • TMPDIR=&#34;$PWD/.validation-tmp&#34; bash tests/fm-attention.test.sh — passed
  • python3 ~/.no-mistakes/evidence/01M5PAAQRNW77M8AQJJP4MDZYA/drive_attention.py — real CLI scenarios passed
  • python3 ~/.no-mistakes/evidence/01M5PAAQRNW77M8AQJJP4MDZYA/drive_beads.py — database initialized; tasks-axi backend capability blocked further validation
  • Compared persisted file hashes and directory inventory across repeated attention reads
  • Checked published and upstream tasks-axi availability; removed disposable tools, fixtures, and downloads; confirmed clean worktree
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

…date and added an assertion that legacy holds preserve their opening date. The regression failed before and passes after. Attention, ledger, checkpoint, focused failure cases, lint, and documentation checks pass locally. Remaining CI failures involve missing tsc or unchanged paths that pass locally; no unrelated fixes were made
…repeated its failure. Pinned Linux CI to Ubuntu 24.04, matching passing main, after confirming ubuntu-latest moved to 26.04/Bash 5.3. Local checkpoint, ledger, contribution, closed-output tests, and workflow lint pass. Ruby contract testing is blocked by missing Ruby. Three old-head retries remain running; updated workflow needs fresh CI
@ryannmicua
ryannmicua merged commit c95edd3 into main Oct 24, 2026
19 checks passed
@ryannmicua
ryannmicua deleted the fm/captain-attention-build branch October 24, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant