ln-222-story-replanner
Replans Stories by comparing IDEAL vs existing (KEEP/UPDATE/OBSOLETE/CREATE). Use when Epic requirements changed and Stories need realignment.
What this skill does
> **Paths:** 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.md`
- `references/coordinator_summary_contract.md`
- `references/environment_state_contract.md`
- `references/storage_mode_detection.md`
- `references/template_loading_pattern.md`
- `references/replan_algorithm_stories.md`
## Inputs
Core inputs:
- `epicData`
- `idealPlan`
- `existingStoryIds`
- `standardsResearch`
- `teamId`
- `autoApprove`
Optional transport inputs:
- `runId`
- `summaryArtifactPath`
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:
1. `PHASE_0_CONFIG`
2. `PHASE_1_RESOLVE_CONTEXT`
3. `PHASE_2_LOAD_EXISTING_STORIES`
4. `PHASE_3_CLASSIFY_REPLAN`
5. `PHASE_4_CONFIRM_OR_AUTOAPPROVE`
6. `PHASE_5_APPLY_REPLAN`
7. `PHASE_6_UPDATE_KANBAN`
8. `PHASE_7_WRITE_SUMMARY`
9. `PHASE_8_SELF_CHECK`
Managed child-run mode:
- caller starts the runtime with `--run-id` and `--summary-artifact-path`
- runtime writes the final summary artifact directly to the caller-provided path
- parent coordinator records the resulting `story-plan-worker` artifact
Standalone mode:
- runtime generates its own `run_id`
- runtime still returns the same structured summary envelope
- artifact writing is optional unless `summaryArtifactPath` is provided
## Output Contract
Always build a structured summary envelope:
- `schema_version`
- `summary_kind=story-plan-worker`
- `run_id`
- `identifier`
- `producer_skill=ln-222`
- `produced_at`
- `payload`
Payload fields:
- `mode`
- `epic_id`
- `stories_planned`
- `stories_created`
- `stories_updated`
- `stories_canceled`
- `story_urls`
- `warnings`
- `kanban_updated`
- `research_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
1. Resolve Epic context if not already provided.
2. Load existing Stories one by one.
3. Normalize ideal vs existing Story structures.
4. Run the replan algorithm to classify `KEEP`, `UPDATE`, `OBSOLETE`, `CREATE`.
5. Show operations summary unless `autoApprove=true`.
6. Execute provider-specific updates.
7. Update kanban.
8. 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 `summaryArtifactPath` is provided
---
**Version:** 3.0.0
**Last Updated:** 2025-12-23
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.