ln-302-task-replanner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUniversal 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
- 从Linear加载所有现有任务的完整描述
- 将其与编排器提供的理想方案(实现/重构/测试)进行对比
- 确定操作类型(保留/更新/废弃/创建)并执行
- 移除非功能需求(NFR)项,仅保留功能范围
- 相应更新Linear中的问题和kanban_board.md文件
Task Storage Mode
任务存储模式
MANDATORY READ: Load for Linear vs File mode operations.
shared/references/storage_mode_detection.md必读: 加载以了解Linear与文件模式的操作方式。
shared/references/storage_mode_detection.mdInvocation (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.
- ln-300-task-coordinator: 当实现任务已存在时,使用REPLAN模式调用。
- 编排器(其他组): 根据需要重规划重构或测试任务。
- 不直接由用户调用。
Inputs
输入参数
- Common: , teamId, Story data (id/title/description with AC, Technical Notes, Context), existingTaskIds.
taskType - Implementation: idealPlan (1-6 tasks), guideLinks.
- Refactoring: codeQualityIssues, refactoringPlan, affectedComponents.
- Test: manualTestResults, testPlan (E2E 2-5, Integration 0-8, Unit 0-15, Priority ≤15), infra/doc/cleanup items.
- 通用参数:、teamId、Story数据(包含验收标准AC、技术说明、上下文的id/标题/描述)、existingTaskIds。
taskType - 实现任务参数:idealPlan(1-6个任务)、guideLinks。
- 重构任务参数:codeQualityIssues、refactoringPlan、affectedComponents。
- 测试任务参数:manualTestResults、testPlan(E2E测试2-5个、集成测试0-8个、单元测试0-15个、优先级≤15)、基础设施/文档/清理项。
Template Loading
模板加载
MANDATORY READ: Load for template copy workflow.
shared/references/template_loading_pattern.mdTemplate Selection by taskType:
- →
implementationtask_template_implementation.md - →
refactoringrefactoring_task_template.md - →
testtest_task_template.md
Local copies: (in target project)
docs/templates/*.md必读: 加载以了解模板复制流程。
shared/references/template_loading_pattern.md按taskType选择模板:
- →
implementationtask_template_implementation.md - →
refactoringrefactoring_task_template.md - →
testtest_task_template.md
本地副本: (位于目标项目中)
docs/templates/*.mdWorkflow (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.
- 根据taskType加载对应模板(参见模板加载部分),并获取所有现有任务的完整描述。
- 标准化双方内容(理想方案与现有任务的各个部分),运行重规划算法将任务分类为保留/更新/废弃/创建。
- 展示汇总信息(数量、标题、关键差异)。如果以交互方式运行,需要确认操作。
- 在Linear中执行操作:更新描述、废弃过时任务、创建缺失任务并设置state="Backlog",更新任务时保留parentId。
- 更新kanban_board.md:移除已取消的任务,在Backlog的对应Story下添加新任务。
- 返回包含URL和警告信息的操作汇总。
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; E2E 2-5, Integration 0-8, Unit 0-15, Total 10-28; no framework/library/DB tests |
| 任务类型 | 硬性规则 | 强制执行内容 |
|---|---|---|
| implementation | 不得创建新测试 | 更新/创建的任务中不得包含创建测试的内容 |
| refactoring | 必须包含回归策略 | 问题+严重程度、三阶段计划、回归策略、保留现有功能 |
| test | 基于风险的限制 | 优先级≤15的场景;E2E测试2-5个、集成测试0-8个、单元测试0-15个,总计10-28个;不得包含框架/库/数据库测试 |
Critical Notes
重要说明
- MANDATORY: Always pass when creating new tasks (CREATE operation). Linear defaults to team's default status (often "Postponed") if not specified.
state: "Backlog" - 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.
- 强制要求: 创建新任务(CREATE操作)时必须传入。如果未指定,Linear会默认使用团队的默认状态(通常为"Postponed")。
state: "Backlog" - 保留理想方案中的“基础优先”排序,不得重新排序。
- 语言保留:保留现有任务的语言(英文/俄文)。
- 不得包含代码片段;仅保留方法/步骤/验收标准AC/组件相关内容。
- 如果Story实际情况与描述不符(如组件已存在、列已存在),向编排器提出Story修正建议。
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).
- 已使用正确模板加载并解析现有任务。
- 已对比理想方案与现有任务,并完成操作分类。
- 所有更新/创建的任务均通过类型验证。
- 已在Linear中执行操作(更新、取消、创建),且parentId保持完整。
- 已更新kanban_board.md(Backlog部分),Epic/Story/缩进格式正确。
- 已返回汇总信息(保留/更新/废弃/创建的数量、URL、警告)。
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: (5 scenarios, comparison logic)
references/replan_algorithm.md - Storage mode detection:
shared/references/storage_mode_detection.md - Templates (centralized): ,
shared/templates/task_template_implementation.md,shared/templates/refactoring_task_template.mdshared/templates/test_task_template.md - Local copies: (in target project)
docs/templates/*.md - Kanban format:
docs/tasks/kanban_board.md
Version: 3.0.0
Last Updated: 2025-12-23
- 看板更新算法:
shared/references/kanban_update_algorithm.md - 模板加载:
shared/references/template_loading_pattern.md - Linear创建流程:
shared/references/linear_creation_workflow.md - 通用重规划算法:
shared/references/replan_algorithm.md - 任务专属重规划算法: (5种场景、对比逻辑)
references/replan_algorithm.md - 存储模式检测:
shared/references/storage_mode_detection.md - 集中式模板:,
shared/templates/task_template_implementation.md,shared/templates/refactoring_task_template.mdshared/templates/test_task_template.md - 本地副本:(位于目标项目中)
docs/templates/*.md - 看板格式:
docs/tasks/kanban_board.md
Version: 3.0.0
Last Updated: 2025-12-23