ln-302-task-replanner
Scannednpx machina-cli add skill levnikolaevich/claude-code-skills/ln-302-task-replanner --openclawPaths: 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 Task Replanner
Worker that re-syncs existing tasks to the latest requirements for any task type.
Purpose & Scope
- Load full existing task descriptions from Linear
- Compare them with orchestrator-provided IDEAL plan (implementation/refactoring/test)
- Decide operations (KEEP/UPDATE/OBSOLETE/CREATE) and execute
- Drop NFR items; only functional scope remains
- Update Linear issues and kanban_board.md accordingly
Task Storage Mode
MANDATORY READ: Load shared/references/storage_mode_detection.md for Linear vs File mode operations.
Invocation (who/when)
- ln-300-task-coordinator: REPLAN mode when implementation tasks already exist.
- Orchestrators (other groups): Replan refactoring or test tasks as needed.
- Not user-invoked directly.
Inputs
- Common:
taskType, teamId, Story data (id/title/description with AC, Technical Notes, Context), existingTaskIds. - Implementation: idealPlan (1-8 tasks), guideLinks.
- Refactoring: codeQualityIssues, refactoringPlan, affectedComponents.
- Test: manualTestResults, testPlan (Priority ≥15, Usefulness Criteria), infra/doc/cleanup items.
Template Loading
MANDATORY READ: Load shared/references/template_loading_pattern.md for template copy workflow.
Template Selection by taskType:
implementation→task_template_implementation.mdrefactoring→refactoring_task_template.mdtest→test_task_template.md
Local copies: docs/templates/*.md (in target project)
Workflow (concise)
- Load templates per taskType (see Template Loading) and fetch full existing task descriptions.
- Normalize both sides (IDEAL vs existing sections) and run replan algorithm to classify KEEP/UPDATE/OBSOLETE/CREATE.
- Present summary (counts, titles, key diffs). Confirmation required if running interactively.
- Execute operations in Linear: update descriptions, cancel obsolete, create missing with state="Backlog", preserve parentId for updates.
- Update kanban_board.md: remove canceled, add new tasks under Story in Backlog.
- Return operations summary with URLs and warnings.
Type Rules (must hold after update)
| taskType | Hard rule | What to enforce |
|---|---|---|
| implementation | No new test creation | Updated/created tasks must not introduce test creation text |
| refactoring | Regression strategy required | Issues + severity, 3-phase plan, regression strategy, preserve functionality |
| test | Risk-based limits | Priority ≥15 scenarios covered; each test passes Usefulness Criteria; no framework/library/DB tests |
Critical Notes
- MANDATORY: Always pass
state: "Backlog"when creating new tasks (CREATE operation). Linear defaults to team's default status (often "Postponed") if not specified. - Foundation-First ordering from IDEAL plan is preserved; do not reorder.
- Language preservation: keep existing task language (EN/RU).
- No code snippets; keep to approach/steps/AC/components.
- If Story reality differs (component exists, column exists), propose Story correction to orchestrator.
Definition of Done
- Existing tasks loaded and parsed with correct template.
- IDEAL plan vs existing compared; operations classified.
- Type validation passed for all updated/created tasks.
- Operations executed in Linear (updates, cancels, creations) with parentId intact.
- kanban_board.md updated (Backlog) with correct Epic/Story/indentation.
- Summary returned (KEEP/UPDATE/OBSOLETE/CREATE counts, URLs, warnings).
Reference Files
- Kanban update algorithm:
shared/references/kanban_update_algorithm.md - Template loading:
shared/references/template_loading_pattern.md - Linear creation workflow:
shared/references/linear_creation_workflow.md - Replan algorithm (universal):
shared/references/replan_algorithm.md - Task-specific replan algorithm:
references/replan_algorithm.md(5 scenarios, comparison logic) - Storage mode detection:
shared/references/storage_mode_detection.md - Templates (centralized):
shared/templates/task_template_implementation.md,shared/templates/refactoring_task_template.md,shared/templates/test_task_template.md - Local copies:
docs/templates/*.md(in target project) - Kanban format:
docs/tasks/kanban_board.md
Version: 3.0.0 Last Updated: 2025-12-23
Source
git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-302-task-replanner/SKILL.mdView on GitHub Overview
Universal Task Replanner re-syncs all task types by comparing the IDEAL plan with existing Linear tasks. It classifies actions into KEEP, UPDATE, OBSOLETE, CREATE and applies changes to Linear and the kanban_board.md, dropping nonfunctional items.
How This Skill Works
It loads full existing task descriptions from Linear and loads task templates based on taskType. Then it normalizes IDEAL and existing sections and runs a replan algorithm to classify tasks as KEEP/UPDATE/OBSOLETE/CREATE. Finally it executes the operations in Linear, creating new tasks with state Backlog, preserving parentId, canceling obsolete items, and updating kanban_board.md accordingly.
When to Use It
- When you have a defined IDEAL plan for implementation, refactoring, or tests and want to align current tasks to it
- When plan changes require re-syncing existing Linear tasks and updating kanban_board.md
- When you need to drop nonfunctional items and keep only the functional scope
- When orchestrators require replan of tasks across multiple task types using templates
- When you need a summarized operations report with counts and URLs after replan
Quick Start
- Step 1: Load templates per taskType and fetch full existing task descriptions from Linear
- Step 2: Normalize IDEAL vs existing sections and run the replan classification (KEEP/UPDATE/OBSOLETE/CREATE)
- Step 3: Execute updates in Linear, cancel obsolete tasks, create missing ones with state Backlog, and update kanban_board.md
Best Practices
- Load the correct per taskType template before replan using the Template Loading pattern
- Normalize IDEAL vs existing sections prior to classification to ensure accurate KEEP/UPDATE/OBSOLETE/CREATE results
- Always pass state: Backlog when creating new tasks
- Preserve parentId for updates and avoid reordering the IDEAL plan
- Update kanban_board.md and include correct Epic/Story indentation after operations
Example Use Cases
- Replan implementation tasks when IDEAL plan adds a new subtask; obsolete others; create missing tasks in Linear
- Replan refactoring tasks after a code-quality issue changes plan
- Drop NFR items and transplant only functional tasks into Linear and kanban
- Update kanban_board.md to reflect new backlog items under the Story
- Coordinate replan via ln-300-task-coordinator REPLAN mode