CREATE/REPLAN Stories for Epic (5-10 Stories). Delegates ln-001-standards-researcher for standards research. Decompose-First Pattern. Auto-discovers team/Epic.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Universal Story management coordinator that delegates CREATE/REPLAN operations to specialized workers after building IDEAL Story plan.
Coordinates Story creation (CREATE), replanning (REPLAN), and appending (ADD) for a given Epic, producing 5-10 User Stories with standards research, Decompose-First Pattern, and delegation to ln-221/ln-222 workers.
Use when:
Key principle: Build IDEAL Story plan FIRST, THEN check existing Stories to determine mode:
Rationale: Ensures consistent Story decomposition based on current Epic requirements, independent of existing Story structure (may be outdated).
MANDATORY READ: Load shared/references/numbering_conventions.md for Story numbering rules (US001 sequential across Epics, no Story 0).
MANDATORY READ: Load shared/references/creation_quality_checklist.md §Story Creation Checklist for validation criteria that ln-310 will enforce.
Objective: Gather context for Story planning (Epic details, planning questions, frontend context, fallback docs, user input)
Step 1: Discovery (Automated)
Auto-discovers from docs/tasks/kanban_board.md:
get_project(query="Epic N") → Fetch full Epic documentStep 2: Extract Planning Information (Automated)
Parses Epic structure for Story planning questions:
| Question | Extraction Source |
|---|---|
| Q1 - User/Persona | Epic Goal ("Enable [persona]...") + Scope In (user roles) |
| Q2 - What they want | Epic Scope In (capabilities) + functional requirements |
| Q3 - Why it matters | Epic Success Criteria (metrics) + Goal (business value) |
| Q4 - Which Epic | Already from Step 1 |
| Q5 - Main AC | Derive from Epic Scope In features → testable scenarios |
| Q6 - Application type | Epic Technical Notes (UI/API mentioned) → Default: API |
Step 3: Frontend Research (Optional)
Trigger: If Q2 (capabilities) OR Q5 (AC) missing after Step 2
Process:
Glob **/*.html, src/**/*.html<form id="login"> → "Given valid credentials, When submit, Then login success")<button id="register"> → "User registration")minlength="8" → "Given password <8 chars, Then error")Fallback: If no HTML → Skip to Step 4
Step 4: Fallback Search Chain
Objective: Fill missing Q1-Q6 BEFORE asking user.
For each question with no answer from Step 2-3:
| Question | Fallback Search |
|---|---|
| Q1 (User/Persona) | Search requirements.md for "User personas", "Actors" → Default "User" if not found |
| Q3 (Why it matters) | Search requirements.md for "Business objectives", "Goals" → Infer from Epic Success Criteria |
| Q6 (Application type) | Search tech_stack.md for "Frontend", "Backend", "API" → Default "API" |
Skip: Q2, Q5 (Epic + HTML are sources of truth), Q4 (already known)
Step 5: User Input (Only if Missing)
If still missing after Step 2 + 3 + 4:
If all questions answered from Epic OR HTML OR fallback: Skip user prompts, proceed to Phase 2
Output: Complete context (Epic details, next Story number, Q1-Q6 answers)
Objective: Research industry standards/patterns BEFORE Story generation to ensure implementation follows best practices.
Why: Prevents outdated patterns or RFC violations (e.g., OAuth without PKCE).
Process:
Skill(skill: "ln-001-standards-researcher", epic_description="[Epic full description]", story_domain="[domain]")Output: Standards Research stored for ALL Stories in Epic
Skip conditions:
Time-box: 15-20 minutes (handled by ln-001)
Note: Research done ONCE per Epic, results reused for all Stories (5-10 Stories benefit from single research)
Objective: Build IDEAL Story plan, determine execution mode
Story Grouping Guidelines:
Each Story = ONE vertical slice of user capability (end-to-end: UI → API → Service → DB).
✅ GOOD Story Grouping (1 Story = 1 user journey):
❌ BAD Story Grouping (horizontal slices):
Rule: 1 Story = 1 user capability (size limits per creation_quality_checklist.md #9)
Database Creation Principle (Incremental Schema Evolution):
Each Story creates ONLY the tables it needs (not all tables upfront).
✅ GOOD (Incremental):
❌ BAD (Big-Bang):
Rationale: Big-bang database setup violates incremental delivery. Each Story should deliver user value, not technical infrastructure.
Build IDEAL Plan (Automated):
Articulate REAL GOAL: MANDATORY READ: shared/references/goal_articulation_gate.md — State REAL GOAL of this Epic in one sentence (the user capability being enabled, not "create Stories"). Verify: does the decomposition serve THIS goal?
Analyze Epic Scope: Review features in Epic Scope In, identify user capabilities
Determine Story Count:
Story Size: Limits per creation_quality_checklist.md #9. Outside range → split or merge.
Each Story must pass these checks:
Build IDEAL Plan "in mind":
orchestratorBrief for ln-1000 pipeline lead:
orchestratorBrief: {
tech: "<languages, frameworks, key libraries from Epic context>",
keyFiles: "<2-5 files/dirs most affected>",
approach: "<1-line implementation strategy>",
complexity: "Low|Medium|High (<reason>)"
}
AC Quality Validation: Rules per creation_quality_checklist.md #4. Workers (ln-221, ln-222) must validate.
Examples:
INVEST Score (0-6 per Story):
| # | Criterion | Check | +1 if PASS |
|---|---|---|---|
| 1 | Independent | No forward dependencies (Story N uses only 1..N-1) | ✅ |
| 2 | Negotiable | AC focus on WHAT, not HOW (no library versions, no implementation details) | ✅ |
| 3 | Valuable | Clear "So that [business value]" — not purely technical | ✅ |
| 4 | Estimable | Size within checklist #9 range, known patterns | ✅ |
| 5 | Small | 3-5 AC, 6-20 hours, vertical slice | ✅ |
| 6 | Testable | AC measurable with Given/When/Then and specific values | ✅ |
Gate: Score ≥ 4 → proceed. Score < 4 → rework Story before creation.
Examples:
Output: IDEAL Story plan (5-10 Stories) with titles, statements, core AC, ordering
Objective: Determine execution mode based on existing Stories AND user intent
Process:
Query Linear for existing Stories in Epic:
list_issues(project=Epic.id, label="user-story")
Mode Detection:
Analyze user request for keywords:
Decision matrix:
| Condition | Mode | Delegate To |
|---|---|---|
| Count = 0 | CREATE | Phase 5a: ln-221-story-creator |
| Count ≥ 1 AND ADD keywords | ADD | Phase 5c: ln-221-story-creator (appendMode) |
| Count ≥ 1 AND REPLAN keywords | REPLAN | Phase 5b: ln-222-story-replanner |
| Count ≥ 1 AND ambiguous | ASK USER | "Add new Story or revise the plan?" |
Important: Orchestrator loads metadata ONLY (ID, title, status). Workers load FULL descriptions (token efficiency).
Output: Execution mode determined + existingCount for workers
Trigger: Epic has no Stories yet (first decomposition)
Delegation:
Call ln-221-story-creator via Skill tool:
Skill(
skill: "ln-221-story-creator",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false // or true for automation
)
Worker handles:
Output: Created Story URLs + summary from worker
Trigger: Epic already has Stories (requirements changed)
Delegation:
Call ln-222-story-replanner via Skill tool:
Skill(
skill: "ln-222-story-replanner",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
existingCount: N,
teamId: "team-id",
autoApprove: false // or true for automation
)
Worker handles:
Output: Operation results + warnings + affected Story URLs from worker
Trigger: Epic has Stories, user wants to ADD more (not replan existing)
Delegation:
Call ln-221-story-creator via Skill tool with appendMode:
Skill(
skill: "ln-221-story-creator",
appendMode: true, // ADD to existing, don't replace
epicData: {id, title, description},
newStoryDescription: userRequestedStory, // Single Story from user request
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false
)
Key differences from CREATE MODE:
appendMode: true → Skip full IDEAL plan, create only requested StorynewStoryDescription → User's specific request (e.g., "add authorization Story")Worker handles:
Output: Created Story URL + summary from worker
After worker completes (any mode: CREATE/REPLAN/ADD):
git add docs/tasks/kanban_board.md (updated by worker)git commit -m "ln-220: {MODE} Stories for Epic {N}"
"ln-220: create Stories US{first}-US{last} for Epic {N}""ln-220: replan Stories for Epic {N}""ln-220: add Story US{num} to Epic {N}"TodoWrite format (mandatory): Add phases to todos before starting:
- Phase 1: Context Assembly (in_progress)
- Phase 2: Standards Research via ln-221 (pending)
- Phase 3: Build IDEAL Story Plan (pending)
- Phase 4: Check Existing Stories (pending)
- Phase 5: Delegate to ln-221/ln-222 (pending)
- Wait for worker result (pending)
- Phase 6: Commit kanban changes (pending)
Mark each as in_progress when starting, completed when done.
Calls:
Called by:
Upstream:
Downstream:
✅ Phase 1: Context Assembly Complete:
✅ Phase 2: Standards Research Complete:
✅ Phase 3: Planning Complete:
✅ Phase 4: Check Existing Complete:
✅ Phase 5: Delegation Complete:
✅ Phase 6: Commit Complete:
CREATE MODE (First Time):
"Create stories for Epic 7: OAuth Authentication"
Process:
REPLAN MODE (Requirements Changed):
"Replan stories for Epic 7 - removed custom token formats, added scope management"
Process:
shared/references/problem_solving.mdshared/references/orchestrator_pattern.mdshared/references/auto_discovery_pattern.mdshared/references/decompose_first_pattern.mdshared/references/numbering_conventions.md (Story sequential across Epics)Story Content:
Story Decomposition:
User Interaction:
Delegation:
Version: 5.0.0 Last Updated: 2026-02-03