/xp-agents:xp-sprint-startfrom xp-agents
Decomposes an execution plan milestone into context-rich stories with file domains and interface contracts, creating a sprint.json for parallel subagent delivery.
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 Steps 1 → 1b → 2 → 3 → 3b → 4 → 5 → 6 → 7 → 8 one step per turn — never batch an
AskUserQuestionwith the action consuming its answer (the Step 5 scope confirmation vs the Step 6 sprint write).
You are the sprint planner: create sprint.json by decomposing a milestone from execution_plan.json into context-rich stories the team can deliver — including in parallel via subagents.
If the preload output above shows ERROR, explain the problem to the user and stop.
If the preload shows Deferred Stories from Previous Sprint, these stories carry forward. Copy each STORY: id's acceptance_criteria and file_domain from the SOURCE: path it names — no CLI returns them once archived. Present them separately when confirming scope. A WARNING: line means the list is incomplete, not empty.
Use this flow when EXECUTION_PLAN=<path> is shown in the preload.
Read the execution plan using Read. Show the user all [planned] milestones with their goals. Ask which milestone to include in this sprint using AskUserQuestion.
One sprint = one milestone. If a milestone has >8 change zone files, suggest splitting it before proceeding.
List the selected milestone's uncovered touched surfaces:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/surface_coverage.py --smm-dir <SMM_DIR> \
uncovered --milestone <milestone-number>
For each surface name in the JSON array, emit one concern (medium):
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir <SMM_DIR> \
--type "concern" --agent "xp-sprint-start" --severity "medium" \
--content "Milestone <N> touches uncovered surface '<surface>' — no acceptance harness covers it"
For the selected milestone's Change Zones and Impact Zones: Read each change-zone file (structure + interfaces), Read impact-zone files (dependencies), and Glob/Grep for related files not listed (tests, imports).
Identify natural story boundaries (cohesive file groups changeable independently), shared interfaces, and file domains (no two stories that could run concurrently may claim the same file).
For each story:
Unique ID: story-001, story-002, etc.
Title: Clear, milestone-aligned name.
Dependencies: Other story IDs, or "none".
Milestone: execution_plan.json §Milestone N.
Design Sources: Direct refs to original design docs (from the milestone's Sources field) with section pointers.
Context: 2+ sentences of what THIS story uniquely does. Do NOT copy text from milestone design_details or constraints — reference the milestone by number only. Open: "Milestone M-N does X (see execution_plan.json). This story handles..." Budget: ≤800 chars.
File Domain: Files this story claims while it runs. Two stories may declare the same file only when they can never run at the same time — one transitively depends on the other. Stories with no dependency between them need disjoint domains, or parallel teammates would step on each other; the sprint write refuses the collision. Building on an earlier story's file is normal: declare the dependency and share the path. A claim held by a finished or dropped story never collides — re-touching its file needs no dependency edge. A never-started story is different HERE: authoring is where disjointness is decided, and every story you are writing has yet to run, so the sprint write holds all of their claims. Later, once the sprint is running, an amendment only has to clear the stories actually in flight. Always include test files alongside source files. For research stories with no expected code changes, use [] to mark the story code-free and prevent false pipeline-gap noise.
Interface Contracts: Shared boundaries. Format: file:symbol — shared with story-NNN, constraint. Advisory.
Acceptance Criteria: 3-5 testable conditions in Given/When/Then prose (per docs/completed/ACCEPTANCE_TESTING_DOCTRINE.md). Use And/But to extend. At least one is end-to-end, marked with the canonical "E2E:" prefix. Examples:
"Given a registered user with a valid session, When they click 'Export', Then a CSV download starts within 2 seconds""Given the install command fails, When the workflow returns, Then phase is 'install' And the prior manifest is restored""E2E: Given the customer approves the preview, When the skill drives the full pipeline, Then the project's test runner reports green"BDD runner recommendation: if system_context.json lists a BDD harness (Cucumber, behave, SpecFlow, etc.) under acceptance_surfaces, write criteria as executable .feature Gherkin and point acceptance_execution.type at that runner.
Acceptance Execution (optional): How /xp-accept runs the test.
type: Runner name (pytest, playwright, bash, bats, cargo).command: Single invocation. Exit code 0 = pass.commands: List run in order, fail on first non-zero (xor with command). Prefer verify_acceptance.py --story <id> for multi-command iteration + first-red stderr.setup (optional): Prerequisites (e.g., docker compose up -d).notes (optional): Anything the agent needs before running.Build command from TEST_COMMAND, never a hardcoded runner. The preload emits TEST_COMMAND=<declared command>; start command from that value — only TEST_COMMAND knows which runner this project uses. Empty TEST_COMMAND means none declared: leave acceptance_execution unset, add a notes placeholder telling the customer to declare stack.test_command via system_context_cli.py edit-stack-field.
Scope and verify command/commands: if TEST_COMMAND accepts a positional path (pytest <path>), append the story's test file so the command names that specific file — the path MUST live inside the story's file_domain, since the verify-touch gate matches it against the commits. If TEST_COMMAND runs the whole tree with no single-spec syntax (cargo test, go test ./...), use it unscoped — verifiable only if it structurally cannot omit the story's test file (it runs everything). Judge this from what TEST_COMMAND actually is, never a per-language table. Use the path-naming binary form (npx playwright test <spec>, npx jest <path>), not a bare script alias (npm run test:e2e, pnpm test) whose proof file is hidden in config and non-verifiable; prefer verify_acceptance.py --story <id> when in doubt.
Include deferred stories from the previous sprint, renumbered.
When a milestone has composition surface (multiple interacting stories whose seams could break without integration testing), propose a capstone story as the final story. Default opt-in — the customer may decline via AskUserQuestion.
When to propose: system_context.json has acceptance_surfaces with a harness, OR the milestone has 3+ stories with interface contracts.
Build it via the CLI (one behavior-shaped object AC per surface, ready status, depends on every sibling, acceptance_execution placeholder the implementer fills). Pass only the covered touched surfaces to --surfaces (the milestone's surfaces_touched minus the uncovered ones from Step 1b) — a capstone AC asserts the surface's suite runs and passes, which an uncovered surface has no harness for; those stay tracked by the Step 1b concern until scaffolded.
python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir <SMM_DIR> build-capstone \
--milestone "<milestone name>" --surfaces <covered-s1,covered-s2> \
--depends-on <story-001,...> --story-id <story-NNN>
Pipe the printed JSON into add-story. Its ACs are behavior-shaped (Given/When/Then); the implementer fills the acceptance_execution placeholder with the real cross-cutting test invocation during the capstone's own story.
Write a one-sentence sprint goal. This becomes the sprint title.
Present a compact summary table via AskUserQuestion:
Options: "Confirm this sprint" or "Adjust sprint scope"
Do not write files until the customer confirms.
Assemble as JSON and write via the CLI (substitute Gherkin scenarios for the GWT prose if a BDD harness applies — see Step 3).
cat <<'SPRINTEOF' | python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir <SMM_DIR> create
{
"sprint_id": "<NEXT_SPRINT_ID>",
"goal": "<sprint goal>",
"started": "<today YYYY-MM-DD>",
"milestone": "Milestone N: <name>",
"stories": [
{
"id": "story-001",
"title": "<title>",
"status": "ready",
"dependencies": [],
"milestone_ref": "execution_plan.json §Milestone N",
"design_sources": "<doc> §section",
"context": "<inlined design context>",
"file_domain": ["path/to/file.py — <what to change>"],
"interface_contracts": ["path/to/shared.py:fn — shared with story-002"],
"acceptance_criteria": [
"Given <precondition>, When <trigger>, Then <observable outcome>",
"Given <precondition>, When <trigger>, Then <outcome A> And <outcome B>",
"E2E: Given <precondition>, When <user action sequence>, Then <observable outcome>"
]
}
]
}
SPRINTEOF
After writing, render and output as text for review:
python3 ${CLAUDE_PLUGIN_ROOT}/smm/sprint_cli.py --smm-dir <SMM_DIR> render
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir <SMM_DIR> \
--type "sprint" \
--agent "xp-sprint-start" \
--content "<sprint goal>" \
--metadata '{"sprint_id": "<NEXT_SPRINT_ID>", "action": "start", "stories_planned": <count>}'
Then record a status event:
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir <SMM_DIR> \
--type "status" \
--agent "xp-sprint-start" \
--content "Sprint <NEXT_SPRINT_ID> created: <N> stories" \
--working-on '["sprint.json"]'
Read the branching stage; if >= 2, create the sprint branch:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/branching.py --smm-dir <SMM_DIR> stage
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/branching.py --smm-dir <SMM_DIR> \
create-sprint --cwd . --sprint <sprint_id> --slug <goal-slug>
CLI outputs created: <branch> (new) or resumed: <branch> (pre-existing). On resumed:, ask via AskUserQuestion ("Adopt existing branch" / "Delete and recreate"); on "Delete and recreate", delete then re-run.
Then check for plan-branch divergence from primary:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/branching.py --smm-dir <SMM_DIR> \
check-divergence --cwd .
If the output JSON has a warning field, record a concern:
${CLAUDE_PLUGIN_ROOT}/smm/append.sh --smm-dir <SMM_DIR> \
--type "concern" --agent "xp-sprint-start" \
--content "<warning text from JSON>" --severity "medium"
Stage 0-1: Skip sprint branch creation.
What SKILL.md sets; muted values are Claude Code's defaults
mediumnpx 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./xp-kickoffSession start orchestrator: sequences retrospective, sprint setup, work selection, housekeeping. Use every session./xp-planCreate or update execution_plan.json: turn design sources into ordered milestones with change zones and design details.Other plugins' skills for the same job