/xp-agents:xp-schedulefrom xp-agents
Schedules the next frontier of XP stories by deciding solo vs parallel execution, promoting stories, and setting execution_mode. Runs before planning to scope work.
Ships in xp-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Sequential discipline. Run Read-frontier → Mode → Promote → Next strictly, one step per turn — make the call, observe, then decide the next. Never batch the mode
AskUserQuestionwith the promote/branch it gates.
Decide solo vs parallel for the ready frontier — the dep-satisfied
scheduled stories the preload computes — then promote it. This precedes
planning because the choice sets the planning scope: solo plans one story;
parallel locks per-story file-domain disjointness up front, then the lead
per-story plans→reviews→spawns each teammate in turn. execution_mode is a
durable story field (solo/teammate) read later by the plan-review gate
(subagent_stop) and retro analysis.
The preload emits FRONTIER_IDS (space-separated), FRONTIER_COUNT, and
PARALLELIZABLE (true only when the frontier has >=2 stories that form an
antichain — no story depends on another, directly or transitively — with
disjoint file domains). If FRONTIER_COUNT is 0, nothing is ready to
schedule — report that and stop.
OVERLAP_DETAIL/GLOB_FORCED/UNSCOPED_IDS explain a false PARALLELIZABLE
when set; a false verdict with all three empty means these stories cannot
run concurrently for a different reason — a dependency edge within the
frontier.
Teammate support gate: When TEAMMATE_ENABLED == false, auto-solo
silently: skip the mode decision tree below and go to Step 3.
Otherwise:
FRONTIER_COUNT == 1 → solo, no question.FRONTIER_COUNT >= 2 and PARALLELIZABLE == false → solo, no question
(teammates would collide, or one would be branched without the other's
commits) — but report why instead of downgrading silently: name
OVERLAP_DETAIL's colliding stories/path when set; if GLOB_FORCED, note a
glob domain blocks proving disjointness; if UNSCOPED_IDS is set, name those
stories — each declared no file domain, so disjointness can't be proven
either;
if none of the three is set, the frontier carries a dependency edge between
two of its members.FRONTIER_COUNT >= 2 and PARALLELIZABLE == true → ask via AskUserQuestion:
"Solo (sequential) or CLI teammates (parallel)?" Present the rationale
(the disjoint frontier ids).Read the story base branch. Solo cuts the branch FROM $BASE, so --required
refuses to degrade to the release branch. No set -e here: without the ||
guard an empty $BASE reaches create --base "".
BASE=$(python3 ${CLAUDE_PLUGIN_ROOT}/scripts/branching.py --smm-dir ${SMM_DIR} \
get-base --cwd . --required) \
|| { echo "HALT: story base unresolved" >&2; exit 1; }
On HALT, stop. Do not promote and do not branch. Report the stderr reason:
re-cut the sprint branch (branching.py create-sprint) or fix sprint.json's
branch_name.
Solo — promote the lowest-id frontier story, mark its mode, JIT its branch:
FIRST=$(python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir ${SMM_DIR} next-scheduled)
echo '{"execution_mode":"solo"}' | python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py \
--smm-dir ${SMM_DIR} edit-story "$FIRST"
python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir ${SMM_DIR} \
update-story "$FIRST" in-progress
git checkout "$BASE"
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/branching.py --smm-dir ${SMM_DIR} \
create --cwd . --story "$FIRST" --slug <title-slug> --base "$BASE"
The rest of the frontier stays scheduled — the next frontier is re-assessed at
the following /xp-schedule run.
Parallel — for each FRONTIER_IDS story, set execution_mode=teammate and
promote to in-progress. Do not create branches — /xp-assign creates each
teammate branch at spawn time, per story, after that story's plan is reviewed.
update-story can refuse a promotion (a file_domain claim held by a live
story), so check its status — an unchecked loop leaves the story
execution_mode=teammate but still scheduled, and /xp-assign then skips it
silently. Report every PROMOTE-REFUSED line to the user and do not spawn that
story; the batch is the promoted set, not FRONTIER_IDS.
for sid in $FRONTIER_IDS; do
echo '{"execution_mode":"teammate"}' | python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py \
--smm-dir ${SMM_DIR} edit-story "$sid"
python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir ${SMM_DIR} \
update-story "$sid" in-progress || echo "PROMOTE-REFUSED: $sid"
done
Stage 0-1: skip branch creation; promotion + execution_mode still apply.
Per-story executor_model (optional). Each story's executor_model schema slot (sonnet/opus/haiku/fable/null) drives /xp-assign's --model flag. Default null = inherit orchestrator. Set per story before /xp-assign runs when tier matters (mechanical refactor = haiku, architecture-heavy = opus). Substitute the literal story id — the $sid from the promotion loop is bound to the LAST iteration's id by this point (bash has no block scope), which is rarely the story you want:
echo '{"executor_model":"haiku"}' | python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py \
--smm-dir ${SMM_DIR} edit-story story-NNN
Record the decision:
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir ${SMM_DIR} \
--type "decision" --agent "xp-schedule" --topic "execution-mode" \
--content "Frontier mode: <Solo|CLI teammates> — <rationale>"
Then emit the next step:
$FIRST — after /xp-review-plan, run /xp-assign
to pick the execution shape: continue in-agent (default), or delegate the work
to a cheaper in-place teammate (runs in the main checkout at a lower tier)."What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub paulingalls/xp-agents --plugin xp-agents19 skills in this plugin
/xp-acceptVerify acceptance criteria for in-progress stories and mark each done or deferred. Use when a story is ready to accept./xp-assignPer-story execution-shape decision: continue in-agent, or spawn one teammate at the chosen tier. Runs once per story after its plan is reviewed./xp-end-sessionEnd-of-session cleanup: drafts a session summary, force-closes open questions, and triages maybe-addressed concerns and debts./xp-free-closeClose ad-hoc work done outside a sprint or plan: review the free branch diff and merge it into the integration branch.Other plugins' skills for the same job