ln-300-task-coordinator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Linear Task Planner (Orchestrator)

Linear Task Planner (Orchestrator)

Coordinates creation or replanning of implementation tasks for a Story. Builds the ideal plan first, then routes to workers.
协调Story实施任务的创建或重新规划。先构建理想计划,再将任务分派给对应的执行组件(worker)。

Purpose & Scope

目的与范围

  • Auto-discover Team ID, load Story context (AC, Technical Notes, Context)
  • Build optimal implementation task plan (1-6 implementation tasks; NO test/refactoring tasks) in Foundation-First order
  • Detect mode and delegate: CREATE/ADD -> ln-301-task-creator, REPLAN -> ln-302-task-replanner
  • Strip any Non-Functional Requirements; only functional scope becomes tasks
  • Never creates/updates Linear or kanban directly (workers do)
  • 自动发现团队ID,加载Story上下文(验收标准AC、技术说明、上下文信息)
  • 按照Foundation-First顺序构建最优实施任务计划(仅1-6个实施任务;不包含测试/重构任务)
  • 检测模式并委托任务:CREATE/ADD模式 → ln-301-task-creator,REPLAN模式 → ln-302-task-replanner
  • 剔除所有非功能性需求;仅将功能性范围转化为任务
  • 绝不直接创建/更新Linear或看板内容(由执行组件完成)

Task Storage Mode

任务存储模式

MANDATORY READ: Load
shared/references/storage_mode_detection.md
for Linear vs File mode detection and operations.
Workers (ln-301, ln-302) handle the actual Linear/File operations based on detected mode.
必读内容: 加载
shared/references/storage_mode_detection.md
文档,了解Linear模式与文件模式的检测及操作方式。
执行组件(ln-301、ln-302)会根据检测到的模式处理实际的Linear/文件操作。

When to Use

使用场景

  • Need tasks for a Story with clear AC/Technical Notes
  • Story requirements changed and existing tasks must be updated
  • NOT for test tasks or refactoring tasks (created by other orchestrators)
  • 需要为具备明确AC/技术说明的Story创建任务
  • Story需求变更,需更新现有任务
  • 不适用于测试任务或重构任务(由其他编排器创建)

Workflow (concise)

工作流程(精简版)

  • Phase 1 Discovery: Auto-discover Team ID (docs/tasks/kanban_board.md); parse Story ID from request.
  • Phase 2 Decompose (always): Load Story (AC, Technical Notes, Context), assess complexity, build IDEAL plan (1-6 implementation tasks only), apply Foundation-First execution order, validate Task Independence, extract guide links.
  • Phase 3 Check & Detect Mode: Query Linear for existing tasks (metadata only). Detect mode by count + user keywords (add/replan).
  • Phase 4 Delegate: Call the right worker with Story data, IDEAL plan/append request, guide links, existing task IDs if any; autoApprove=true.
  • Phase 5 Verify: Ensure worker returns URLs/summary and updated kanban_board.md; report result.
  • 阶段1:发现:自动发现团队ID(参考docs/tasks/kanban_board.md);从请求中解析Story ID。
  • 阶段2:分解(必执行):加载Story(AC、技术说明、上下文),评估复杂度,构建理想计划(仅1-6个实施任务),采用Foundation-First执行顺序,验证任务独立性,提取指南链接。
  • 阶段3:检查与模式检测:查询Linear获取现有任务(仅元数据)。根据任务数量+用户关键词(add/replan)检测模式。
  • 阶段4:委托:调用对应的执行组件,传入Story数据、理想计划/追加请求、指南链接、现有任务ID(如有);设置autoApprove=true。
  • 阶段5:验证:确保执行组件返回URL/摘要,并更新kanban_board.md;报告结果。

Task Independence Validation

任务独立性验证

CRITICAL Check in Phase 2:
  • Each Task N can be completed using ONLY Tasks 1 to N-1
  • NO forward dependencies (Task N requires Task N+1, N+2)
  • Foundation-First order naturally prevents most issues
Validation:
  • Check that Task N does NOT depend on Task N+1, N+2, etc.
  • ❌ WRONG: "Task 2: Validate token (requires Task 3 to generate keys)"
  • ✅ RIGHT: "Task 1: Generate keys" → "Task 2: Validate token (uses Task 1 keys)"
If forward dependency detected:
  • Reorder Tasks to resolve dependency
  • OR refactor Task to remove dependency
  • OR split Task into sequential parts
阶段2的关键检查:
  • 每个任务N仅可通过完成任务1至N-1来实现
  • 无前置依赖(任务N依赖任务N+1、N+2)
  • Foundation-First顺序可自然避免大多数问题
验证规则:
  • 检查任务N是否不依赖任务N+1、N+2等。
  • ❌ 错误示例:"任务2:验证令牌(需任务3生成密钥)"
  • ✅ 正确示例:"任务1:生成密钥" → "任务2:验证令牌(使用任务1生成的密钥)"
若检测到前置依赖:
  • 重新排序任务以解决依赖问题
  • 或重构任务以移除依赖
  • 或将任务拆分为连续的子任务

Mode Matrix

模式矩阵

ConditionModeDelegatePayload
Count = 0CREATEln-301-task-creatortaskType=implementation, Story data, IDEAL plan, guideLinks
Count > 0 AND "add"/"append"ADDln-301-task-creatortaskType=implementation, appendMode=true, newTaskDescription, guideLinks
Count > 0 AND replan keywordsREPLANln-302-task-replannertaskType=implementation, Story data, IDEAL plan, guideLinks, existingTaskIds
Count > 0 AND ambiguousASKClarify with user
条件模式委托对象负载内容
任务数量 = 0CREATEln-301-task-creatortaskType=implementation, Story数据, 理想计划, 指南链接
任务数量 > 0 且包含"add"/"append"关键词ADDln-301-task-creatortaskType=implementation, appendMode=true, 新任务描述, 指南链接
任务数量 > 0 且包含replan关键词REPLANln-302-task-replannertaskType=implementation, Story数据, 理想计划, 指南链接, 现有任务ID
任务数量 > 0 且模式模糊ASK向用户确认

Plan Mode Behavior

计划模式行为

When invoked in Plan Mode (read-only):
  • Execute Phases 1-3 normally (Discovery, Decompose, Check Existing)
  • Phase 4: DO NOT delegate to workers — instead show IDEAL plan preview:
    • Task titles, goals, estimates, Foundation-First order
    • Mode detected (CREATE/ADD/REPLAN)
    • What worker WOULD be invoked (ln-301 or ln-302)
  • Phase 5: Write plan summary to plan file (not Linear)
  • NO Linear API calls, NO kanban updates, NO worker invocations
TodoWrite format (mandatory): Add phases to todos before starting:
- Phase 1: Discovery (in_progress)
- Phase 2: Decompose & Build IDEAL Plan (pending)
- Phase 3: Check Existing & Detect Mode (pending)
- Phase 4: Delegate to ln-301/ln-302 (pending)
- Phase 5: Verify worker result (pending)
Mark each as in_progress when starting, completed when done.
当以计划模式(只读)调用时:
  • 正常执行阶段1-3(发现、分解、检查现有任务)
  • 阶段4:委托给执行组件 — 而是显示理想计划预览:
    • 任务标题、目标、估算时长、Foundation-First顺序
    • 检测到的模式(CREATE/ADD/REPLAN)
    • 本应调用的执行组件(ln-301或ln-302)
  • 阶段5:将计划摘要写入计划文件(而非Linear)
  • 不调用Linear API,不更新看板,不调用执行组件
TodoWrite格式(必填): 开始前需将各阶段添加到待办事项中:
- Phase 1: Discovery (in_progress)
- Phase 2: Decompose & Build IDEAL Plan (pending)
- Phase 3: Check Existing & Detect Mode (pending)
- Phase 4: Delegate to ln-301/ln-302 (pending)
- Phase 5: Verify worker result (pending)
标记每个阶段为in_progress(开始执行时)或completed(完成后)。

Critical Rules

关键规则

  • Decompose-first: always build IDEAL plan before looking at existing tasks.
  • Foundation-First execution order: DB -> Repository -> Service -> API -> Frontend.
  • Task limits: 1-6 implementation tasks, 3-5h each; cap total at 6. Test task created later by test planner.
  • Linear creation must be sequential: create one task, confirm success, then create the next (no bulk) to catch errors early.
  • HARD CONSTRAINT: This skill creates ONLY implementation tasks (taskType=implementation). NEVER include test tasks, manual testing tasks, or refactoring tasks in the plan. Test tasks are created LATER by test planner (after manual testing passes). Refactoring tasks are created by quality gate when code quality issues found.
  • No code snippets in descriptions; workers own task documents and Linear/kanban updates.
  • Language preservation: keep Story language (EN/RU) in any generated content by workers.
  • 先分解:在查看现有任务前,始终先构建理想计划。
  • Foundation-First执行顺序:数据库 -> 仓储层 -> 服务层 -> API -> 前端。
  • 任务限制:1-6个实施任务,每个任务3-5小时;总任务数上限为6。测试任务后续由测试规划器创建。
  • Linear任务创建必须按顺序:创建一个任务,确认成功后再创建下一个(不批量创建),以便尽早发现错误。
  • 硬性约束:本技能仅创建实施任务(taskType=implementation)。计划中绝不能包含测试任务、手动测试任务或重构任务。测试任务需在手动测试通过后,由测试规划器创建。重构任务需在代码质量检查发现问题后,由质量网关创建。
  • 描述中不得包含代码片段;执行组件负责管理任务文档及Linear/看板更新。
  • 语言保留:执行组件生成的任何内容需保持Story的原始语言(英文/俄文)。

Definition of Done (orchestrator)

完成定义(编排器)

  • Team ID discovered; Story ID parsed.
  • Story loaded; IDEAL plan built (1-6 implementation tasks only) with Foundation-First order and guide links.
  • NO test or refactoring tasks in IDEAL plan (only taskType=implementation).
  • Existing tasks counted; mode selected (CREATE/ADD/REPLAN or ask).
  • Worker invoked with correct payload and autoApprove=true.
  • Worker summary received (Linear URLs/operations) and kanban update confirmed.
  • Next steps returned (ln-310-story-validator, then orchestrator continues).
  • 已发现团队ID;已解析Story ID。
  • 已加载Story;已构建理想计划(仅1-6个实施任务),采用Foundation-First顺序并附带指南链接。
  • 理想计划中测试或重构任务(仅包含taskType=implementation类型的任务)。
  • 已统计现有任务数量;已选定模式(CREATE/ADD/REPLAN或询问用户)。
  • 已使用正确的负载内容调用执行组件,并设置autoApprove=true。
  • 已收到执行组件的摘要(Linear URL/操作记录),并确认看板已更新。
  • 返回后续步骤(调用ln-310-story-validator,然后编排器继续执行)。

Reference Files

参考文件

  • [MANDATORY] Problem-solving approach:
    shared/references/problem_solving.md
  • Orchestrator lifecycle:
    shared/references/orchestrator_pattern.md
  • Auto-discovery patterns:
    shared/references/auto_discovery_pattern.md
  • Decompose-first pattern:
    shared/references/decompose_first_pattern.md
  • Plan mode behavior:
    shared/references/plan_mode_pattern.md
  • Numbering conventions:
    shared/references/numbering_conventions.md
    (Task per-Story numbering)
  • Storage mode detection:
    shared/references/storage_mode_detection.md
  • Templates (centralized):
    shared/templates/task_template_implementation.md
  • Local copies:
    docs/templates/task_template_implementation.md
    (in target project, created by workers)
  • Replan algorithm details:
    ln-302-task-replanner/references/replan_algorithm.md
  • Auto-discovery notes:
    CLAUDE.md
    ,
    docs/tasks/kanban_board.md

Version: 4.0.0 (BREAKING: Added Task Independence Validation in Phase 2 Decompose - checks that Task N does NOT depend on Task N+1/N+2. Works with Foundation-First order to ensure sequential task execution per BMAD Method best practices.) Last Updated: 2026-02-03
  • [必填] 问题解决方法:
    shared/references/problem_solving.md
  • 编排器生命周期:
    shared/references/orchestrator_pattern.md
  • 自动发现模式:
    shared/references/auto_discovery_pattern.md
  • 先分解模式:
    shared/references/decompose_first_pattern.md
  • 计划模式行为:
    shared/references/plan_mode_pattern.md
  • 编号规范:
    shared/references/numbering_conventions.md
    (Story内任务编号规则)
  • 存储模式检测:
    shared/references/storage_mode_detection.md
  • 模板(集中式):
    shared/templates/task_template_implementation.md
  • 本地副本:
    docs/templates/task_template_implementation.md
    (由执行组件在目标项目中创建)
  • 重新规划算法细节:
    ln-302-task-replanner/references/replan_algorithm.md
  • 自动发现说明:
    CLAUDE.md
    ,
    docs/tasks/kanban_board.md

版本: 4.0.0(重大更新:在阶段2分解步骤中新增任务独立性验证——检查任务N是否不依赖任务N+1/N+2。结合Foundation-First顺序,确保任务按BMAD方法最佳实践顺序执行。) 最后更新日期: 2026-02-03