Skip to content

feat(queue): show autonomy reason and split needs-you by cause - #66

Merged
sKeLe100 merged 3 commits into
mainfrom
fm/queue-autonomy-reason-display
Sep 6, 2026
Merged

sKeLe100 merged 3 commits into
mainfrom
fm/queue-autonomy-reason-display

Conversation

@sKeLe100

@sKeLe100 sKeLe100 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Intent

Improve the /queue skill's display: surface each item's autonomy_reason field, and split the current single "needs-you" bucket into its distinct underlying causes so the captain can tell at a glance WHY an item needs their attention (e.g. captain hold vs. ambiguous scope vs. missing delivery-mode ruling) rather than one undifferentiated bucket.

What Changed

  • /queue now always appends each item's autonomy_reason (CSV-unescaped) in parentheses after the rendered autonomy verdict, replacing the narrow "(inferred)" suffix that only appeared for project inferred from id prefix.
  • The "Needs the captain" section is now split into cause sub-groups before project grouping: the cause label is the item's hold_reason when held (treating empty or - as absent), otherwise its autonomy_reason, with sub-headings sorted by descending item count then alphabetically, and the existing project grouping and >~5 collapse rule applied within each sub-group. --priority still renders the flat list with no sub-grouping.
  • Updated the /queue row in the README command table to describe the cause sub-groups and the per-item autonomy reason.

Risk Assessment

✅ Low: Documentation/prompt-only change to one skill file; both prior findings are correctly and minimally applied (hold_reason '-' treated as absent, unreachable fallback removed), and fm-queue-snapshot.sh sets autonomy_reason on every derivation branch so no label can be empty.

Testing

Baseline bin/fm-test-run.sh --changed --exclude-family real-herdr-gated had already passed; I additionally ran the targeted tests/fm-queue-snapshot.test.sh (pass) and, because this change only alters LLM-facing skill instructions with no executable code path, produced product-level evidence manually: a real fm-queue-snapshot.sh run over a purpose-built tasks-axi backlog covering all five autonomy causes, plus a side-by-side before/after rendering of the resulting /queue view. The after-view demonstrates the intent — autonomy_reason surfaced on every item and the single needs-you bucket split into distinct cause sub-groups — including the "-" hold_reason edge case from review-1. No screenshot applies; /queue is a terminal-text surface and the rendered transcript is the end-user artifact. Temp fixture home removed; worktree clean.

Evidence: Rendered /queue view: before vs. after (end-user surface)

Source: Rendered /queue view: before vs. after (end-user surface)

# /queue rendering, base commit rules vs. this change's rules

Same real `bin/fm-queue-snapshot.sh` output (see `queue-snapshot-fixture.txt`,
produced from a real tasks-axi backlog + data/projects.md registry with
firstmate at yolo=on and legacy-app at yolo=off). Both renderings below follow
`.agents/skills/queue/SKILL.md` steps 4/6/7 literally - the "before" per the
base commit's wording, the "after" per this change's wording. dispatch_config
is absent in the fixture, so the tier note is stated once as the skill requires.

Tier: dispatch config absent - no tier candidates available (stated once, applies to all items below).

## BEFORE (base commit 84f4d53) - one undifferentiated "Needs the captain" bucket

\### Dispatchable
**firstmate**
1. fm-1: ship the queue skill update
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself

\### Needs the captain
**firstmate**
2. fm-2: decide delivery mode for release
   project: firstmate - kind: captain - 0d - tier: config absent - needs you
3. fm-6: scope unclear: dashboard refresh
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself - gated: ambiguous scope
4. fm-8: held with no reason
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself - gated: held
**legacy-app**
5. fm-3: captain call on pricing copy
   project: legacy-app - kind: captain - 0d - tier: config absent - needs you
6. fm-4: upgrade auth library
   project: legacy-app - kind: ship - 0d - tier: config absent - needs you
7. fm-5: rewrite onboarding docs
   project: legacy-app - kind: docs - 0d - tier: config absent - needs you
**no project**
8. fm-7: orphan chore
   project: no project - kind: chore - 0d - tier: config absent - unclear - ask me about it

The captain cannot tell from this why any of ranks 2-8 need them: a captain-kind
decision, a yolo-off registry posture, and an ambiguous-scope hold all read the
same, and every "needs you" is bare.

## AFTER (this change, 941983a) - split by cause, autonomy_reason always shown

\### Dispatchable
**firstmate**
1. fm-1: ship the queue skill update
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself (project registry posture has yolo on)

\### Needs the captain

#### captain kind or captain-kind hold
**firstmate**
2. fm-2: decide delivery mode for release
   project: firstmate - kind: captain - 0d - tier: config absent - needs you (captain kind or captain-kind hold)
**legacy-app**
5. fm-3: captain call on pricing copy
   project: legacy-app - kind: captain - 0d - tier: config absent - needs you (captain kind or captain-kind hold)

#### project registry posture has yolo off
**legacy-app**
6. fm-4: upgrade auth library
   project: legacy-app - kind: ship - 0d - tier: config absent - needs you (project registry posture has yolo off)
7. fm-5: rewrite onboarding docs
   project: legacy-app - kind: docs - 0d - tier: config absent - needs you (project registry posture has yolo off)

#### ambiguous scope
**firstmate**
3. fm-6: scope unclear: dashboard refresh
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself (project registry posture has yolo on) - gated: ambiguous scope

#### no project recorded on this item
**no project**
8. fm-7: orphan chore
   project: no project - kind: chore - 0d - tier: config absent - unclear - ask me about it (no project recorded on this item)

#### project registry posture has yolo on
**firstmate**
4. fm-8: held with no reason
   project: firstmate - kind: ship - 0d - tier: config absent - clears itself (project registry posture has yolo on) - gated: held

Ask about any item by id or description for full detail (body, blockers, dependencies, links) via `tasks-axi show <id> --full`; everything else is deliberately omitted above.

## What this demonstrates

- Every item now carries its `autonomy_reason` in parentheses after the verdict (step 6).
- "Needs the captain" is split into five distinct cause sub-headings, sorted by
  descending item count then alphabetically for the ties (2,2,1,1,1).
- Ranks are still the snapshot's own `rank` values, unrenumbered, and all 8
  snapshot rows still appear exactly once.
- firstmate's items are now split across three cause sub-headings - the
  expected consequence of grouping by why before by project.
- fm-8 is the review-1 case: `held: yes` with `hold_reason` = the absent-field
  placeholder `-`. Under the fixed rule it falls through to its
  `autonomy_reason` instead of landing under a sub-heading literally titled "-".
Evidence: Real fm-queue-snapshot.sh output the rendering was derived from

Source: Real fm-queue-snapshot.sh output the rendering was derived from

count: 8
items[8]{rank,id,title,kind,repo,priority,blocked,blocked_by,held,hold_kind,hold_reason,hold_until,posture,autonomy,autonomy_reason,gate,created}:
  1,fm-1,ship the queue skill update,ship,firstmate,-,no,none,no,-,-,-,direct-PR on,autonomous-eligible,project registry posture has yolo on,dispatchable,2026-09-06
  2,fm-2,decide delivery mode for release,captain,firstmate,-,no,none,no,-,-,-,direct-PR on,captain-gated,captain kind or captain-kind hold,captain,2026-09-06
  3,fm-6,scope unclear: dashboard refresh,ship,firstmate,-,no,none,yes,-,ambiguous scope,-,direct-PR on,autonomous-eligible,project registry posture has yolo on,captain,2026-09-06
  4,fm-8,held with no reason,ship,firstmate,-,no,none,yes,-,-,-,direct-PR on,autonomous-eligible,project registry posture has yolo on,captain,2026-09-06
  5,fm-3,captain call on pricing copy,captain,legacy-app,-,no,none,no,-,-,-,no-mistakes off,captain-gated,captain kind or captain-kind hold,captain,2026-09-06
  6,fm-4,upgrade auth library,ship,legacy-app,-,no,none,no,-,-,-,no-mistakes off,captain-gated,project registry posture has yolo off,captain,2026-09-06
  7,fm-5,rewrite onboarding docs,docs,legacy-app,-,no,none,no,-,-,-,no-mistakes off,captain-gated,project registry posture has yolo off,captain,2026-09-06
  8,fm-7,orphan chore,chore,-,-,no,none,no,-,-,-,n/a,unclear,no project recorded on this item,captain,2026-09-06
priority_analysis: priority_meaningful: no (0/8 items have priority, 0%)
dispatch_config: absent
hierarchy_lanes: unavailable (dispatch_config: absent)
live_slots: 0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ .agents/skills/queue/SKILL.md:43 - The cause-label rule treats hold_reason as usable when "non-empty", but fm-queue-snapshot.sh carries tasks-axi's hold_reason through verbatim, and tasks-axi renders an absent field as the placeholder "-" (the same convention the skill already handles for repo = "no project" and the script handles for hold_until == "-"). A held, open-ended item with no recorded hold reason therefore lands under a sub-heading literally titled "-" instead of falling through to its autonomy_reason. Smallest fix: treat "-" as empty in this rule, same as the repo field.
  • ⚠️ .agents/skills/queue/SKILL.md:43 - The falling back to &#34;no reason recorded&#34; only if both are empty fallback is an unrequired component: fm-queue-snapshot.sh sets reason on every branch of the autonomy derivation (captain kind, no project, yolo off, yolo on, inferred), so autonomy_reason is never empty for any emitted row and the fallback label is unreachable. The intent requires splitting needs-you by cause, not a placeholder bucket. Remedy: remove the fallback clause.
  • ℹ️ .agents/skills/queue/SKILL.md:63 - For an item whose project was inferred from its id prefix, the snapshot overwrites the yolo verdict with project inferred from id prefix, so a captain-gated inferred item's cause sub-heading reads "project inferred from id prefix" and never says the posture had yolo off. That is pre-existing snapshot data, but this change is what promotes it to a section heading; making the heading explain the cause would require changing what fm-queue-snapshot.sh emits, beyond this change's stated scope.
  • ℹ️ .agents/skills/queue/SKILL.md:43 - The ">~5 collapse-to-count-line" rule is now stated twice - once inside the Needs-the-captain sub-group paragraph and again in the following line that already applies to every (sub-)group. The second statement subsumes the first; dropping the clause from the sub-group paragraph removes the duplicate rule definition.

🔧 Fix: treat hold_reason '-' as absent, drop unreachable fallback
1 info still open:

  • ℹ️ .agents/skills/queue/SKILL.md:63 - In the Needs-the-captain section, an item now carries its autonomy_reason twice: once as the cause sub-heading (step 4) and again in the parenthetical after "needs you" (step 6). Harmless redundancy, and suppressing it would add a conditional rule; noting only.
✅ **Test** - passed

✅ No issues found.

  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated
  • bash tests/fm-queue-snapshot.test.sh (PASS — confirms the autonomy_reason/hold_reason fields the skill now reads are emitted as specified)
  • Manual: built a temp FM home with a real tasks-axi backlog (firstmate yolo=on, legacy-app yolo=off, a held item, an item with no project, a held item with hold_reason -) and ran bin/fm-queue-snapshot.sh against it
  • Manual: rendered the /queue output from that snapshot under both the base-commit and the changed SKILL.md rules and diffed the reviewer-visible result
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

sKeLe100 and others added 3 commits September 6, 2026 04:57
/queue already had the autonomy_reason data from fm-queue-snapshot.sh
but never rendered it, and the "needs the captain" section lumped
every gated cause (captain-kind item, captain hold, ambiguous scope,
missing delivery-mode ruling, no project recorded) into one flat
list. Render the reason inline on every item's autonomy label, and
split the needs-the-captain section into cause sub-groups keyed by
each item's hold_reason (when held) or autonomy_reason, so the
captain can tell at a glance why an item needs them.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018NkQfh9r5UaSBLoFX8h9QT
@sKeLe100
sKeLe100 merged commit 4e4caf5 into main Sep 6, 2026
13 checks passed
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