About ln-222-story-replanner
A standalone-capable worker skill for replanning an Epic’s Stories by comparing intended plans with existing work. It classifies changes, applies them, updates kanban, and returns a structured summary.
Key features
- 01Compares ideal and existing Stories
- 02Classifies keep, update, obsolete, and create
- 03Supports confirmation or auto-approval
- 04Updates Stories and kanban
- 05Returns structured summary data
Use cases
- 01Replanning Stories after an Epic changes
- 02Preserving completed work during replanning
- 03Running as a standalone worker or managed child
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ levnikolaevich/ claude-code-skills --skill ln-222-story-replannerAfter installing, type/ln-222-story-replannerin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/agent_skill_roots_contract.mdcoordinator_summary_contract.mdenvironment_state_contract.mdplanning_worker_runtime_contract.mdreplan_algorithm_stories.mdreplan_algorithm.mdreplan_workflow.mdstorage_mode_detection.mdtemplate_loading_pattern.mdreferences/scripts/coordinator-runtime/lib/artifacts.mjscli-helpers.mjscore.mjsloop-health.mjsruntime-constants.mjsschemas.mjsvalidate.mjsworker-guards.mjsworker-runtime.mjsreferences/scripts/planning-worker-runtime/cli.mjsreferences/scripts/planning-worker-runtime/lib/guards.mjsphases.mjsstore.mjsDetails
From the project READMEPaths: File paths (
references/,../ln-*) are relative to this skill directory.
Story Replanner
Type: L3 Worker Category: 2XX Planning
Standalone-first worker for Story replanning. It compares ideal Story intent with existing Stories and applies the resulting operations.
MANDATORY READ
Load these before execution:
references/planning_worker_runtime_contract.mdreferences/coordinator_summary_contract.mdreferences/environment_state_contract.mdreferences/storage_mode_detection.mdreferences/template_loading_pattern.mdreferences/replan_algorithm_stories.md
Inputs
Core inputs:
epicDataidealPlanexistingStoryIdsstandardsResearchteamIdautoApprove
Optional transport inputs:
runIdsummaryArtifactPath
The worker must remain fully usable without caller-provided runId and without summaryArtifactPath. In standalone mode it generates its own run_id before emitting the summary envelope.
Runtime
Runtime family: planning-worker-runtime
Identifier:
epic-{epicId}
Phases:
PHASE_0_CONFIGPHASE_1_RESOLVE_CONTEXTPHASE_2_LOAD_EXISTING_STORIESPHASE_3_CLASSIFY_REPLANPHASE_4_CONFIRM_OR_AUTOAPPROVEPHASE_5_APPLY_REPLANPHASE_6_UPDATE_KANBANPHASE_7_WRITE_SUMMARYPHASE_8_SELF_CHECK
Managed child-run mode:
- caller starts the runtime with
--run-idand--summary-artifact-path - runtime writes the final summary artifact directly to the caller-provided path
- parent coordinator records the resulting
story-plan-workerartifact
Standalone mode:
- runtime generates its own
run_id - runtime still returns the same structured summary envelope
- artifact writing is optional unless
summaryArtifactPathis provided
Output Contract
Always build a structured summary envelope:
schema_versionsummary_kind=story-plan-workerrun_ididentifierproducer_skill=ln-222produced_atpayload
Payload fields:
modeepic_idstories_plannedstories_createdstories_updatedstories_canceledstory_urlswarningskanban_updatedresearch_path_used
If summaryArtifactPath is provided:
- write the same JSON summary to that path
If summaryArtifactPath is not provided:
- return the same summary in structured output only
Managed artifact path pattern:
.hex-skills/runtime-artifacts/runs/{parent_run_id}/story-plan-worker/ln-222--{identifier}.json
Workflow
- Resolve Epic context if not already provided.
- Load existing Stories one by one.
- Normalize ideal vs existing Story structures.
- Run the replan algorithm to classify
KEEP,UPDATE,OBSOLETE,CREATE. - Show operations summary unless
autoApprove=true. - Execute provider-specific updates.
- Update kanban.
- Return structured summary.
Critical Rules
- Prefer conservative updates when matching is ambiguous.
- Preserve finished work when replanning conflicts with completed Stories.
- Keep the worker standalone-capable.
- Never require coordinator runtime state to operate.
- Return machine-readable results, not prose-only outcomes.
- STOP before tracker createStory/updateBody: verify all 9 sections present in body: Story, Context, Acceptance Criteria, Implementation Tasks, Test Strategy, Technical Notes, Definition of Done, Dependencies, Assumptions. PreToolUse hook will BLOCK creation without them.
Definition of Done
- Existing Stories loaded and normalized
- Replan algorithm applied
- Required updates, cancellations, and creations executed
- kanban updated
- Structured summary returned
- Summary artifact written when
summaryArtifactPathis provided
Version: 3.0.0 Last Updated: 2025-12-23