Repository navigation
feat(queue): show autonomy reason and split needs-you by cause - #66
Merged
Merged
Conversation
/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
… autonomy reasons
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
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
/queuenow always appends each item'sautonomy_reason(CSV-unescaped) in parentheses after the rendered autonomy verdict, replacing the narrow "(inferred)" suffix that only appeared forproject inferred from id prefix.hold_reasonwhen held (treating empty or-as absent), otherwise itsautonomy_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.--prioritystill renders the flat list with no sub-grouping./queuerow 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-gatedhad already passed; I additionally ran the targetedtests/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)
Evidence: Real fm-queue-snapshot.sh output the rendering was derived from
Source: Real fm-queue-snapshot.sh output the rendering was derived from
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.agents/skills/queue/SKILL.md:43- The cause-label rule treatshold_reasonas 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 forrepo= "no project" and the script handles forhold_until== "-"). A held, open-ended item with no recorded hold reason therefore lands under a sub-heading literally titled "-" instead of falling through to itsautonomy_reason. Smallest fix: treat "-" as empty in this rule, same as the repo field..agents/skills/queue/SKILL.md:43- Thefalling back to "no reason recorded" only if both are emptyfallback is an unrequired component: fm-queue-snapshot.sh setsreasonon every branch of the autonomy derivation (captain kind, no project, yolo off, yolo on, inferred), soautonomy_reasonis 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 withproject 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-gatedbash 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 ranbin/fm-queue-snapshot.shagainst itManual: 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.