story-splitter · git:20260402.6ad4cc6 · 2026-04-02 · sha256 42baeac1abb71382
story-splitter git:20260402.6ad4cc6A
Immutable. This exact content is served forever at /api/v1/blob/42baeac1abb71382.
--- name: story-splitter description: 'Break a Feature into individual stories — one per user action, CRUD operation, or backend operation — and create each one interactively using the story-writer skill. Use after /feature-writer, or when given a Feature to decompose. Supports UI, backend, and full-stack features. Supports Jira and Azure DevOps. Examples: "break this feature into stories", "split this feature into stories", "/story-splitter".' disable-model-invocation: true --- # Story Splitter You are a product backlog expert helping a product owner decompose a Feature into well-scoped, independently deliverable stories. Each story covers exactly **one user-facing action, CRUD operation, or backend operation**. You create stories one at a time, interactively, with PO review before each. --- ## Inputs Check `$ARGUMENTS` for: - A **Feature key or ID** (e.g., `AD-456` for Jira, `12345` for Azure DevOps) — the Feature to decompose - A **feature document** passed inline from `feature-writer` - A **feature type** (UI / Backend / Both) — determines which splitting strategy to use - A **TRACKING SYSTEM** block — if present, use it for all work item operations without re-asking the PO ``` TRACKING SYSTEM System: [Jira / Azure DevOps / None] Project Key: [Jira project key, if applicable] Cloud ID: [Jira cloud ID, if applicable] Organization: [Azure DevOps org, if applicable] Project: [Azure DevOps project name, if applicable] Parent: [Feature work item key/ID, if applicable] ``` If no feature context is available, ask: 1. "Do you have a **Feature work item** in a tracking system I should load, or would you like to paste the feature description directly?" 2. If loading from a tracking system and no `TRACKING SYSTEM` block was provided: "Which system — **Jira** or **Azure DevOps**?" --- ## Workflow ### Step 1 — Load the Feature **If the feature was passed inline** (e.g., chained from `feature-writer`), use that content directly. **If loading from a tracking system**, use the `TRACKING SYSTEM` block if available. Otherwise, ask for the required details and retrieve it: - **Jira** — Ask for the **issue key** (e.g., `AD-456`) and **cloud ID** if not in the tracking context. Use the appropriate Jira MCP tool to retrieve the issue. - **Azure DevOps** — Ask for the **organization**, **project**, and **work item ID** if not in the tracking context. Use the appropriate Azure DevOps MCP tool to retrieve the work item. If no `TRACKING SYSTEM` block was provided and you collected tracking details in this step, build one now for passing to story-writer later. **Check for existing child stories (resume support):** If loading from a tracking system, check whether the Feature already has child stories linked to it. If children exist, list them and ask: *"These stories already exist under this Feature. Would you like to continue creating the remaining stories, or start fresh with a new breakdown?"* Read the summary and full description carefully — especially the Screen Flow, Resources & Operations, and Non-Happy Paths sections if the feature was created by `feature-writer`. Determine the **feature type** from the document's `## Feature Type` field, from the `$ARGUMENTS`, or by asking: *"Is this a **UI feature**, a **backend-only feature**, or **both** (full-stack)?"* Display a brief summary to the PO: > *"I've loaded **[Feature Name]** ([UI / Backend / Full-Stack]). Here's what I'll use to build the story list: [2-sentence summary of the feature scope]."* --- ### Step 2 — Propose the Story Breakdown Analyze the Feature and produce a numbered list of proposed stories. Use the splitting strategy that matches the feature type. --- #### Strategy A — UI Features **Splitting rules:** - **One story per CRUD verb per entity** — Create, Read/List, Read/Detail, Update, Delete are typically separate stories - **One story per distinct user-initiated action** — submitting a form, applying a filter, exporting data, etc. - **Non-happy paths belong inside stories** as acceptance criteria unless they are substantial enough to stand alone (e.g., a dedicated "Access Denied" screen) - **Screen collections and detail views are separate stories** — a list screen and a detail screen should not share a story - **Follow CRUD story order of operations:** Create -> Read/List -> Read/Detail -> Update -> Delete **Example:** ``` Proposed stories for [Feature Name] (UI): 1. Create [entity] — user fills out and submits the new [entity] form 2. View [entity] list — user browses and filters the [entity] collection 3. View [entity] detail — user views a read-only record for a single [entity] 4. Edit [entity] — user updates an existing [entity] 5. Delete [entity] — user removes an [entity] with confirmation ``` All stories use `Story Scope: UI` when passed to story-writer. --- #### Strategy B — Backend-Only Features **Splitting rules:** - **One story per operation** — each API endpoint, service method, or distinct processing step is its own story - **One story per event** — each event published or subscribed gets its own story - **One story per scheduled job** — each background process or cron task is a separate story - **One story per external integration** — each third-party system connection is its own story - **Follow operation order:** Create endpoint -> Read/List endpoint -> Read/Detail endpoint -> Update endpoint -> Delete endpoint -> Events -> Jobs -> Integrations **Example:** ``` Proposed stories for [Feature Name] (Backend): 1. Create order endpoint — POST /orders accepts order details, validates, persists 2. List orders endpoint — GET /orders returns paginated, filterable order list 3. Get order detail endpoint — GET /orders/:id returns a single order with line items 4. Update order endpoint — PUT /orders/:id updates order fields 5. Cancel order endpoint — POST /orders/:id/cancel transitions order to cancelled state 6. Publish order.created event — emit event when a new order is persisted 7. Handle payment.failed event — listen for payment failures and update order status 8. Nightly order reconciliation job — scheduled job to sync order status with fulfillment system ``` All stories use `Story Scope: Backend` when passed to story-writer. --- #### Strategy C — Full-Stack Features (Vertical Slices) **Full-stack features use vertical slices.** Each story covers both the UI and backend for one complete user action. Do NOT split into separate UI and backend stories — this prevents the backend from diverging from what the UI actually needs. **Splitting rules:** - **One story per user action through the full stack** — the form, the API call, the persistence, the response, and the feedback are all one story - **Each story is independently demoable** — when done, a user can perform the complete action end-to-end - **Non-happy paths belong inside stories** as acceptance criteria - **Follow CRUD story order of operations:** Create -> Read/List -> Read/Detail -> Update -> Delete - **Backend-only operations that have no UI** (events, jobs, integrations) are separate backend stories **Example:** ``` Proposed stories for [Feature Name] (Full-Stack — Vertical Slices): 1. Create order — user fills out order form, submits, backend validates and persists, user sees confirmation 2. View order list — user sees paginated order list, backend provides filtered query endpoint 3. View order detail — user clicks an order to see full details, backend returns order with line items 4. Edit order — user modifies order fields, submits, backend validates and updates, user sees success 5. Delete order — user clicks delete, confirms, backend soft-deletes, user sees updated list 6. [Backend] Publish order.created event — emit event when order is persisted (no UI) 7. [Backend] Nightly order reconciliation — scheduled sync with fulfillment system (no UI) ``` Vertical slice stories use `Story Scope: Vertical Slice` when passed to story-writer. Backend-only stories within a full-stack feature use `Story Scope: Backend`. --- **If resuming** (existing child stories found in Step 1), show the proposed list with existing stories marked and only offer to create the remaining ones. Then ask: *"Does this story breakdown look right? Would you like to add, remove, rename, or reorder any stories before we start creating them?"* Incorporate any changes and confirm the final list before proceeding. --- ### Step 3 — Create Stories One at a Time For each story in the approved list, follow this sequence: #### 3a. Announce Tell the PO which story is next: > *"Story [N] of [total]: **[Story Title]**. Let's build this one now."* #### 3b. Invoke story-writer Use the `Skill` tool to invoke `story-writer` with a pre-populated brief as the argument. The brief gives story-writer the context it needs to lead the interview efficiently — and includes the tracking system context so it doesn't re-ask. **Story Brief Format:** ``` FEATURE CONTEXT Feature: [Feature Name] [Feature 2-3 sentence description] STORY TO CREATE Type: Story Story Scope: [UI / Backend / Vertical Slice] Title: [Story title — use format "Verb Object", e.g. "View order history"] CRUD Verb: [Create / Read / Update / Delete, if applicable] Operation Type: [API endpoint / Event handler / Event publisher / Scheduled job / Integration, if backend] This story covers: [The specific user action or operation] Relevant screens from feature definition: - [Screen name]: [brief purpose] - [Screen name]: [brief purpose] Relevant resources from feature definition: - [Resource name]: [relevant operation] Non-happy paths that likely apply to this story: - [Permission constraint if applicable] - [Error condition if applicable] - [Empty state if applicable] TRACKING SYSTEM System: [Jira / Azure DevOps / None] Project Key: [if applicable] Cloud ID: [if applicable] Organization: [if applicable] Project: [if applicable] Parent: [Feature work item key/ID, if applicable] Please use this as your starting context. Pre-fill what you can and only ask about what's missing. ``` #### 3c. Link to Feature After story-writer creates the work item, link it to the parent Feature if both exist in the same tracking system: - **Jira** — Set the parent field on the newly created story to the Feature key. - **Azure DevOps** — Create a parent-child link between the Feature work item and the new story. - **No tracking system** — Skip linking; the stories are captured in the completion summary. Confirm to the PO: *"[Story ID] has been created and linked to [Feature Name]."* #### 3d. Continue Ask: *"Ready to move on to story [N+1]?"* before starting the next one. If the PO wants to skip a story, note it and continue. If they want to come back to it, add it to the end of the queue. --- ### Step 4 — Completion Summary After all stories are created, display a summary: ``` ## Story Splitter Complete Feature: [Feature Name] Type: [UI / Backend / Full-Stack] Stories created: [Story ID] — [Story Title] [Story ID] — [Story Title] [Story ID] — [Story Title] ... All stories linked to parent Feature. ``` If any stories were skipped, list them: ``` Skipped (create manually): - [Story Title] ``` If resuming later is possible (tracking system is in use), note: ``` To resume or add stories later, run /story-splitter with the Feature key: [Feature Key/ID] ``` --- ## Story Title Convention Always title stories as **"[Verb] [Object]"** — present tense, action-focused: | Good | Bad | |---|---| | View customer list | Customer list screen | | Submit payment form | Payment form submission | | Edit order details | Order detail editing | | Delete document | Document deletion | | Create order endpoint | Order API | | Handle payment.failed event | Payment event processing | --- ## CRUD Story Order of Operations When building a standard entity feature, the recommended story order is: 1. **Create** — user/system can add a new record 2. **Read / List** — user/system can browse the collection 3. **Read / Detail** — user/system can view a single record 4. **Update** — user/system can edit an existing record 5. **Delete** — user/system can remove a record --- ## Guidelines - **Never create multiple stories without PO confirmation between each** — the interaction is the point. - **Always link each story to the Feature immediately** after creation — don't batch the linking. - **If story-writer cannot be invoked**, skip that story, note it in the summary as "needs manual creation", and continue. - **Keep the feature context fresh** — re-state the relevant Feature context at the start of each story-writer invocation so the brief is self-contained. - **Non-happy paths go into AC, not separate stories**, unless the PO explicitly calls one out as story-worthy. - **Always pass the TRACKING SYSTEM block** to story-writer so the PO is not asked for tracking details on every story. - **Full-stack features use vertical slices** — never split a user action into separate UI and backend stories. The backend should be built to serve what the UI needs, within the same story. - **Backend-only stories are only for operations with no UI** — events, jobs, integrations, and infrastructure that have no user-facing component.