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. If shared/ is missing, fetch files via WebFetch from https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/{path}.
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/tools_config_guide.md, shared/references/storage_mode_detection.md, and shared/references/input_resolution_pattern.md
Extract: task_provider = Task Management → Provider (linear | file).
Invocation (who/when)
- ln-300-task-coordinator: REPLAN mode when implementation tasks already exist.
- Orchestrators (other groups): Replan refactoring or test tasks as needed.
- Standalone: User invokes directly with storyId (resolved via Input Resolution Chain).
Inputs
| Input |
Required |
Source |
Description |
storyId |
Yes |
args, git branch, kanban, user |
Story whose tasks to replan |
Resolution: Story Resolution Chain.
Status filter: In Progress, To Review
Additional inputs (from orchestrator or Story context):
- 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. Load shared/references/destructive_operation_safety.md for destructive operation keywords and severity classification.
Template Selection by taskType:
implementation → task_template_implementation.md
refactoring → refactoring_task_template.md
test → test_task_template.md
Local copies: docs/templates/*.md (in target project)
Workflow (concise)
- Resolve storyId: Run Story Resolution Chain per guide (status filter: [In Progress, To Review]).
- 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.
- Inherited Assumptions (UPDATE): Preserve Inherited Assumptions from parent Story. If parent Story Assumptions changed, update Inherited Assumptions in affected tasks to match current Story registry (ID + text sync).
- Inherited Assumptions (CREATE): For new tasks, extract relevant assumptions from parent Story Assumptions table, add to Context > Inherited Assumptions using
A{N} ({CATEGORY}) format.
- Destructive Op Detection (UPDATE): After updating Implementation Plan, re-scan for keywords from destructive_operation_safety.md (loaded above). IF detected AND "Destructive Operation Safety" section missing → add section from shared reference template. IF section already present → preserve it.
- Destructive Op Detection (CREATE): For new tasks, scan Implementation Plan for keywords from destructive_operation_safety.md (loaded above). IF detected → include "Destructive Operation Safety" section from shared reference template (MANDATORY). Fill all 5 fields + severity.
- 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.
- Destructive Op Detection: Use keyword list from destructive_operation_safety.md (loaded above). If found after update/create → include Destructive Operation Safety section as MANDATORY.
- 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
Reference Files
- Tools config:
shared/references/tools_config_guide.md
- Storage mode operations:
shared/references/storage_mode_detection.md
- 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)
- 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
1---2name: ln-302-task-replanner-43description: Compares ideal plan vs existing tasks and applies KEEP/UPDATE/OBSOLETE/CREATE changes. Use when Story tasks need re-sync with updated requirements.4license: MIT5---6
7> **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. If `shared/` is missing, fetch files via WebFetch from `https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/{path}`.
8
9# Universal Task Replanner
10
11Worker that re-syncs existing tasks to the latest requirements for any task type.
12
13## Purpose & Scope
14- Load full existing task descriptions from Linear
15- Compare them with orchestrator-provided IDEAL plan (implementation/refactoring/test)
16- Decide operations (KEEP/UPDATE/OBSOLETE/CREATE) and execute
17- Drop NFR items; only functional scope remains
18- Update Linear issues and kanban_board.md accordingly
19
20## Task Storage Mode
21
22**MANDATORY READ:** Load `shared/references/tools_config_guide.md`, `shared/references/storage_mode_detection.md`, and `shared/references/input_resolution_pattern.md`
23
24Extract: `task_provider` = Task Management → Provider (`linear` | `file`).
25
26## Invocation (who/when)
27- **ln-300-task-coordinator:** REPLAN mode when implementation tasks already exist.
28- **Orchestrators (other groups):** Replan refactoring or test tasks as needed.
29- **Standalone:** User invokes directly with storyId (resolved via Input Resolution Chain).
30
31## Inputs
32
33| Input | Required | Source | Description |
34|-------|----------|--------|-------------|
35| `storyId` | Yes | args, git branch, kanban, user | Story whose tasks to replan |
36
37**Resolution:** Story Resolution Chain.
38**Status filter:** In Progress, To Review
39
40**Additional inputs (from orchestrator or Story context):**
41- Common: `taskType`, teamId, Story data (id/title/description with AC, Technical Notes, Context), existingTaskIds.
42- Implementation: idealPlan (1-8 tasks), guideLinks.
43- Refactoring: codeQualityIssues, refactoringPlan, affectedComponents.
44- Test: manualTestResults, testPlan (Priority ≥15, Usefulness Criteria), infra/doc/cleanup items.
45
46## Template Loading
47
48**MANDATORY READ:** Load `shared/references/template_loading_pattern.md` for template copy workflow. Load `shared/references/destructive_operation_safety.md` for destructive operation keywords and severity classification.
49
50**Template Selection by taskType:**
51- `implementation` → `task_template_implementation.md`
52- `refactoring` → `refactoring_task_template.md`
53- `test` → `test_task_template.md`
54
55**Local copies:** `docs/templates/*.md` (in target project)
56
57## Workflow (concise)
581) **Resolve storyId:** Run Story Resolution Chain per guide (status filter: [In Progress, To Review]).
592) Load templates per taskType (see Template Loading) and fetch full existing task descriptions.
603) Normalize both sides (IDEAL vs existing sections) and run replan algorithm to classify KEEP/UPDATE/OBSOLETE/CREATE.
61 - **Inherited Assumptions (UPDATE):** Preserve Inherited Assumptions from parent Story. If parent Story Assumptions changed, update Inherited Assumptions in affected tasks to match current Story registry (ID + text sync).
62 - **Inherited Assumptions (CREATE):** For new tasks, extract relevant assumptions from parent Story Assumptions table, add to Context > Inherited Assumptions using `A{N} ({CATEGORY})` format.
63 - **Destructive Op Detection (UPDATE):** After updating Implementation Plan, re-scan for keywords from destructive_operation_safety.md (loaded above). IF detected AND "Destructive Operation Safety" section missing → add section from shared reference template. IF section already present → preserve it.
64 - **Destructive Op Detection (CREATE):** For new tasks, scan Implementation Plan for keywords from destructive_operation_safety.md (loaded above). IF detected → include "Destructive Operation Safety" section from shared reference template (MANDATORY). Fill all 5 fields + severity.
654) Present summary (counts, titles, key diffs). Confirmation required if running interactively.
665) Execute operations in Linear: update descriptions, cancel obsolete, **create missing with state="Backlog"**, preserve parentId for updates.
676) Update kanban_board.md: remove canceled, add new tasks under Story in Backlog.
687) Return operations summary with URLs and warnings.
69
70## Type Rules (must hold after update)
71| taskType | Hard rule | What to enforce |
72|----------|-----------|-----------------|
73| implementation | No new test creation | Updated/created tasks must not introduce test creation text |
74| refactoring | Regression strategy required | Issues + severity, 3-phase plan, regression strategy, preserve functionality |
75| test | Risk-based limits | Priority ≥15 scenarios covered; each test passes Usefulness Criteria; no framework/library/DB tests |
76
77## Critical Notes
78- **MANDATORY:** Always pass `state: "Backlog"` when creating new tasks (CREATE operation). Linear defaults to team's default status (often "Postponed") if not specified.
79- **Destructive Op Detection:** Use keyword list from destructive_operation_safety.md (loaded above). If found after update/create → include Destructive Operation Safety section as MANDATORY.
80- Foundation-First ordering from IDEAL plan is preserved; do not reorder.
81- Language preservation: keep existing task language (EN/RU).
82- No code snippets; keep to approach/steps/AC/components.
83- If Story reality differs (component exists, column exists), propose Story correction to orchestrator.
84
85## Definition of Done
86- [ ] Existing tasks loaded and parsed with correct template.
87- [ ] IDEAL plan vs existing compared; operations classified.
88- [ ] Type validation passed for all updated/created tasks.
89- [ ] Operations executed in Linear (updates, cancels, creations) with parentId intact.
90- [ ] kanban_board.md updated (Backlog) with correct Epic/Story/indentation.
91- [ ] Summary returned (KEEP/UPDATE/OBSOLETE/CREATE counts, URLs, warnings).
92
93## Reference Files
94- **Tools config:** `shared/references/tools_config_guide.md`
95- **Storage mode operations:** `shared/references/storage_mode_detection.md`
96- **Kanban update algorithm:** `shared/references/kanban_update_algorithm.md`
97- **Template loading:** `shared/references/template_loading_pattern.md`
98- **Linear creation workflow:** `shared/references/linear_creation_workflow.md`
99- **Replan algorithm (universal):** `shared/references/replan_algorithm.md`
100- **Task-specific replan algorithm:** `references/replan_algorithm.md` (5 scenarios, comparison logic)
101- Templates (centralized): `shared/templates/task_template_implementation.md`, `shared/templates/refactoring_task_template.md`, `shared/templates/test_task_template.md`
102- Local copies: `docs/templates/*.md` (in target project)
103- Kanban format: `docs/tasks/kanban_board.md`
104
105---
106**Version:** 3.0.0
107**Last Updated:** 2025-12-23