| name | xp-work-selection |
| description | This skill should be used when the user needs to select work for the session, review retro Try items, triage open questions, or pick sprint stories. Invoked as part of /xp-kickoff or standalone via /xp-work-selection. |
| allowed-tools | ["Bash(*/append.sh *)","Bash(*/init.sh)","Bash(*/skills/*/scripts/*)","Read","AskUserQuestion"] |
!CLAUDE_PLUGIN_DATA="${CLAUDE_PLUGIN_DATA}" ${CLAUDE_SKILL_DIR}/scripts/preload.sh
Work Selection
Sequential discipline. The harness batches independent tool calls in
parallel; this skill is step-gated. Run Step 1 โ 2 โ 3 โ 4 โ 5 strictly, one
step per turn โ make the call, observe, then decide the next. Never put an
AskUserQuestion and the action consuming its answer in one block (a
Try/triage question vs the decide/triage append that records it); never spawn
the same subagent twice. Independent read-only calls may still batch.
The session data above was preloaded automatically.
SMM_DIR= is shown in the preload output. Use it for all append.sh calls.
Complete all applicable steps below in order. Skip steps where the preload shows no data.
Step 1: Try Item Review (if Previous Try Items shown)
If the preload shows "### Previous Try Items", present them to the user.
Ask via AskUserQuestion for each: adopt, defer, or drop?
Pass the Try item text verbatim, including any trailing [refs: ...]
suffix โ the helper extracts the refs and strips the suffix. Do NOT
craft --metadata JSON by hand.
Adopt (decision event with a slugged topic):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py adopt \
--smm-dir <SMM_DIR> \
--topic "retro-try-<2-3-word-slug>" \
--content "<item text including any [refs: ...] suffix>"
Example topics: retro-try-commit-after-green, retro-try-fix-gate-coverage.
Never use bare retro-try-adopted โ always include a descriptive slug.
Defer (status event, disposition=deferred):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py defer \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>"
FORCE-CLOSE gate. The defer command refuses with a non-zero exit
once the same Try has been deferred 3 times โ carrying a Try across 3+
retros without adoption is dishonest. When the defer fails, present
the FORCE-CLOSE choice instead, picking exactly one of the three
escape flags below and re-running. The Try id named in the error tells
you which item is gated.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py defer \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>" \
--force-adopt "retro-try-<2-3-word-slug>"
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py defer \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>" \
--force-drop
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py defer \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>" \
--force-defer-with-date YYYY-MM-DD
Force-drop convention prompt (force-drop only). BEFORE invoking
--force-drop, ask via AskUserQuestion: "Record a durable convention
so retros never repropose this kind of Try?" If yes, prompt for a
retro-drop-<slug> topic and rationale, then invoke defer --force-drop
ONCE with both flags below โ emits drop + convention atomically. If no,
run defer --force-drop alone. Idempotent: re-drops with an existing
topic skip the convention and print a stderr notice with the discarded
rationale (the drop still fires). Regular drop does not offer this โ
3+ retros is the courage moment that warrants the durable rule.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py defer \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>" \
--force-drop \
--record-convention-topic "retro-drop-<descriptive-slug>" \
--record-convention-content "<one-sentence rationale>"
Drop (status event, disposition=dropped โ retro agent will never
re-propose this Try):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py drop \
--smm-dir <SMM_DIR> \
--content "<item text including any [refs: ...] suffix>"
Step 2: Open Debts (if shown)
If the preload shows "### Open Debts:", present each item to the user via AskUserQuestion.
Options per item: adopt-now, keep-deferred, drop.
Adopting an item takes the work ON; it does NOT close the item. The item
stays open until the fix actually lands (a commit with a Resolves-Event:
trailer closes it). Only a drop is terminal.
Relay the intent suffix. An item already triaged carries a suffix โ
โ ADOPTED (<age>, by <id>) or โ DEFERRED x<N>. Present it verbatim
with the item: it is the memory that the user already said yes to this, or
already put it off N times. The item is still listed because it is still
OPEN, not because the earlier decision was forgotten โ so do not re-offer it
as if it were new. An item ADOPTED several sessions ago that still has not
landed is worth saying so out loud; one DEFERRED 3+ times is worth dropping
or doing.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py triage-adopt \
--smm-dir <SMM_DIR> --event-id <event-id>
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py triage-defer \
--smm-dir <SMM_DIR> --event-id <event-id>
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py triage-drop \
--smm-dir <SMM_DIR> --event-id <event-id>
Step 3: Open Concerns (if shown)
If the preload shows "### Open Concerns:", process each item:
Auto-resolve "MAYBE ADDRESSED" concerns: If a concern is annotated with
"MAYBE ADDRESSED by: ..." and you judge the listed commits genuinely fix
the concern, auto-resolve it without asking the user. A "#### Deferred earlier"
line is an index excerpt, not the whole concern โ get-event it (command in
that header) before dropping; a drop is terminal:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/xp-work-selection/scripts/work_selection_decide.py triage-drop \
--smm-dir <SMM_DIR> --event-id <event-id>
Present remaining concerns to user: For concerns WITHOUT the "MAYBE
ADDRESSED" annotation, or where the overlapping commits don't clearly address
the concern, present via AskUserQuestion with options: adopt-now,
keep-deferred, drop. Same commands as Step 2.
Step 4: Open Questions (if shown)
If the preload shows "### Open Questions:", present each item via AskUserQuestion.
Same options as Step 2 (adopt-now, keep-deferred, drop). Same commands with
the question's event-id.
Step 5: Sprint Story Selection (if sprint active)
If sprint active with ready stories:
- Show the ready stories from preload.
- Ask via AskUserQuestion: "Which stories for this iteration?"
Options: individual story IDs, "all ready stories", or "add ad-hoc story".
- For ad-hoc stories: ask for title and brief description, then add via CLI:
echo '{"id":"story-NNN","title":"...","status":"scheduled","dependencies":[],"acceptance_criteria":["..."]}' \
| python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir <SMM_DIR> add-story
- For selected stories: mark each as
scheduled (queued for this
iteration). xp-assign promotes the first scheduled story to
in-progress when it creates the branch.
python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir <SMM_DIR> \
update-story story-NNN scheduled
- Record status event:
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir <SMM_DIR> \
--type "status" --agent "xp-work-selection" \
--content "Story selection: marked N stories scheduled" \
--working-on '[]'
If sprint active but no ready stories (all scheduled, in-progress, or done):
Report "All stories are queued, in progress, or complete. Continuing."
If Nothing Needs Doing
If no Try items, no questions, and no sprint with ready stories, report
briefly and complete. Do not force the user through unnecessary interaction.