xiaohongshu
xiaohongshu
ln-222-story-replanner
Replans Stories when Epic requirements change. Compares IDEAL vs existing, categorizes operations (KEEP/UPDATE/OBSOLETE/CREATE), executes in Linear.
Full skill instructions
Universal replanner worker for updating Stories in Epic when requirements change. Invoked by ln-220-story-coordinator (count ≥ 1).
ln-220-story-coordinator REPLAN MODE (Phase 5b):
epicData, idealPlan, standardsResearch, existingStoryIds, teamId, autoApproveFrom ln-220-story-coordinator:
{
epicData: {id, title, description},
idealPlan: [{number, title, statement, ac, technicalNotes, estimatedHours, testCounts}],
standardsResearch: "OAuth 2.0 (RFC 6749)...", // May differ from existing
existingStoryIds: ["STORY-123", "STORY-124"], // Metadata only
teamId: "team-id",
autoApprove: true
}
Progressive Loading for token efficiency:
Step 1: Orchestrator provides Story metadata (ID, title, status)
Step 2: Load FULL descriptions ONE BY ONE
for each story_id:
get_issue(id=story_id) // ~5,000 tokens per Story
Token Rationale: 10 Stories × 5,000 = 50,000 tokens. Load sequentially to manage context.
Step 3: Parse 8 sections for each Story
Step 4: Extract metadata
Output: Array of N existing Story structures ready for comparison.
Algorithm: See replan_algorithm_stories.md
Match by goal, persona, capability:
For EACH Story in IDEAL:
For EACH existing Story:
Categorize operations:
| Operation | Criteria | Status Constraint | Action |
|---|---|---|---|
| KEEP | Goal + Persona + Capability + AC + Standards Research same | Any | None |
| UPDATE | Match + (AC OR Standards Research OR Technical Notes changed) | Backlog/Todo ✅<br>In Progress/Review ⚠️<br>Done ❌ | update_issue |
| OBSOLETE | No match + Feature removed | Backlog/Todo ✅<br>In Progress/Review ⚠️<br>Done ❌ | update_issue(state="Canceled") |
| CREATE | In IDEAL + No match + New requirement | N/A | Generate doc + create_issue |
Edge Cases:
| Case | Action |
|---|---|
| In Progress OBSOLETE | ⚠️ NO auto-cancel, show warning |
| Done conflicts | Preserve Done, CREATE follow-up |
| Story Split (1 → 2+) | ⚠️ UPDATE first + CREATE new |
| Story Merge (2+ → 1) | ⚠️ UPDATE first + OBSOLETE rest |
| Ambiguous match (>70% similarity) | Show all, select highest |
Details: replan_algorithm_stories.md
REPLAN SUMMARY for Epic 7: OAuth Authentication
IDEAL PLAN:
1. US004: Register OAuth client (Persona: Third-party developer)
2. US005: Request access token ← AC5 ADDED! ← RFC 7636 PKCE ADDED!
3. US006: Validate access token
4. US009: Token scope management (NEW!)
EXISTING STORIES:
✓ US004 - Status: Done - KEEP
⚠ US005 - Status: Todo - UPDATE
Changes: Add AC5, Add RFC 7636 to Technical Notes, Add 2 Integration tests
Diff (AC): + AC5 "Given public client, When request with PKCE..."
Diff (Technical Notes): + RFC 7636 (PKCE)
✗ US008 - Status: Todo - OBSOLETE (feature removed)
+ US009 - NEW (14h, 20 tests, OAuth 2.0 Scope standard)
OPERATIONS: 2 keep, 1 update, 1 cancel, 1 create
WARNINGS:
- ⚠️ US005 (Todo): AC changed, Standards Research updated
- ⚠️ US008 (Todo): Feature removed - check dependencies
Type "confirm" to execute.
Diffs show:
Warnings for:
If autoApprove=true: Skip → Phase 5 Otherwise: Wait for "confirm"
Adjustment: User can request changes → Recategorize → Show updated summary → Loop until "confirm"
Sequence: UPDATE → OBSOLETE → CREATE → Update kanban
UPDATE operations:
update_issue(id, description=new_description)OBSOLETE operations:
update_issue(id, state="Canceled")CREATE operations:
create_issue({title, description, project=Epic, team, labels=["user-story"], state="Backlog"})Update kanban_board.md:
DELETE (OBSOLETE): Remove canceled Story lines, remove task lines if any, remove Epic header if empty
CREATE (NEW): Find ### Backlog → Search Epic group → Add Stories (2-space indent)
UPDATE Epic Story Counters: Last Story, Next Story
Return:
REPLAN EXECUTED for Epic 7
OPERATIONS SUMMARY:
✓ Kept: 2 Stories
✓ Updated: 1 Story (AC/Standards Research changed)
✓ Canceled: 1 Story (feature removed)
✓ Created: 1 Story (new requirement)
UPDATED: [ID: US005](url) - AC5 added, RFC 7636 PKCE added
CANCELED: US008 Custom token formats
NEW: [ID: US009](url) - Token scope management
WARNINGS: US005 (Todo) AC changed
✓ kanban_board.md updated
✓ Standards Research updates: RFC 7636 PKCE added to US005
NEXT STEPS:
1. Review warnings
2. Run ln-310-story-validator on updated/created Stories
3. Use ln-300-task-coordinator to create/replan tasks
| Rule | Description |
|---|---|
| Status Constraints | UPDATE/OBSOLETE: Backlog/Todo ✅, In Progress/Review ⚠️, Done ❌ |
| Preserve Done | Never update/cancel Done Stories (CREATE follow-up if conflicts) |
| Story Split/Merge | Detect 1→2+ OR 2+→1, show warnings (complex, impacts Tasks) |
| Clear Diffs | Show before/after for UPDATE (AC, Standards Research, Technical Notes) |
| Meaningful Comments | Explain why updated/canceled (reference removed capabilities) |
| Conservative Updates | Prefer CREATE over UPDATE when in doubt |
| Progressive Loading | Load Stories ONE BY ONE (not all at once, token efficiency) |
✅ Phase 1:
✅ Phase 2:
✅ Phase 3:
✅ Phase 4:
✅ Phase 5:
Template: story_template.md
Loading Logic:
docs/templates/story_template.md exists in target projectdocs/templates/ directory if missing
b. Copy shared/templates/story_template.md → docs/templates/story_template.md
c. Replace placeholders in the LOCAL copy:
{{TEAM_ID}} → from docs/tasks/kanban_board.md{{DOCS_PATH}} → "docs" (standard)docs/templates/story_template.md) for all operationsRationale: Templates are copied to target project on first use, ensuring:
Location: references/ (owned by this skill)
Purpose: Detailed comparison logic for REPLAN mode (Story level)
Contents: KEEP/UPDATE/OBSOLETE/CREATE rules, Match criteria, Status constraints, Edge cases, Examples
Usage: Applied in Phase 2
Location: shared/templates/story_template.md (centralized)
Local Copy: docs/templates/story_template.md (in target project)
Purpose: Universal Story template (8 sections)
Usage: Load via Template Loading logic when generating updated Story documents for UPDATE/CREATE operations
Called by: ln-220-story-coordinator (Phase 5b, count ≥ 1)
Returns:
Worker does NOT:
Version: 3.0.0 Last Updated: 2025-12-23
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience