mission-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Table of Contents

目录

Mission Orchestrator

任务编排器

Overview

概述

Wraps the entire attune development lifecycle (brainstorm → specify → plan → execute) into a single mission with automatic state detection, type selection, and phase routing. Follows the "persistent presence lens" pattern from
spec-kit:speckit-orchestrator
— delegates entirely to existing skills via
Skill()
calls, never re-implements phase logic.
将完整的attune开发生命周期(头脑风暴 → 需求定义 → 规划 → 执行)封装为一个任务,具备自动状态检测、类型选择和阶段路由功能。遵循
spec-kit:speckit-orchestrator
中的「持久存在视角」模式——完全通过
Skill()
调用委托给现有技能,绝不重复实现阶段逻辑。

When To Use

适用场景

  • Starting a new project from scratch (full lifecycle)
  • Resuming an interrupted project workflow
  • Running a focused tactical implementation from existing specs
  • Quick-fixing from an existing implementation plan
  • 从零开始启动新项目(完整生命周期)
  • 恢复中断的项目工作流
  • 根据现有需求定义执行聚焦的战术实现
  • 基于现有实施计划进行快速修复

When NOT To Use

不适用场景

  • Running a single phase directly (use
    /attune:brainstorm
    ,
    /attune:specify
    , etc.)
  • Non-project work (code review, debugging, research)
  • When you need fine-grained control over phase transitions
  • 直接运行单个阶段(使用
    /attune:brainstorm
    /attune:specify
    等命令)
  • 非项目类工作(代码审查、调试、研究)
  • 需要对阶段过渡进行细粒度控制的场景

Mission Lifecycle

任务生命周期

1. State Detection
   Scan for existing artifacts (project-brief.md, specification.md, etc.)
       |
2. Mission Type Selection
   Auto-detect type based on artifacts, or accept user override
       |
3. Phase Routing Loop
   For each phase in the mission type:
       a. Pre-phase validation (check prerequisites)
       b. Invoke Skill(attune:{phase-skill})
       c. Post-phase artifact check (verify output exists)
       d. Update mission state
       e. User checkpoint (skippable with --auto)
       f. Error handling via leyline:damage-control
       |
4. Completion
   All phases complete, final state saved
1. 状态检测
   扫描现有工件(project-brief.md、specification.md等)
       |
2. 任务类型选择
   根据工件自动检测类型,或接受用户覆盖选择
       |
3. 阶段路由循环
   针对任务类型中的每个阶段:
       a. 阶段前验证(检查前置条件)
       b. 调用Skill(attune:{phase-skill})
       c. 阶段后工件检查(验证输出是否存在)
       d. 更新任务状态
       e. 用户检查点(使用--auto参数可跳过)
       f. 通过leyline:damage-control处理错误
       |
4. 完成
   所有阶段完成,保存最终状态

Mission Types

任务类型

TypePhasesAuto-detected When
full
brainstorm → specify → plan → executeNo artifacts exist
standard
specify → plan → execute
docs/project-brief.md
exists
tactical
plan → execute
docs/specification.md
exists
quickfix
execute
docs/implementation-plan.md
exists
See
modules/mission-types.md
for full type definitions and custom type support.
类型阶段自动检测条件
full
头脑风暴 → 需求定义 → 规划 → 执行无现有工件
standard
需求定义 → 规划 → 执行
docs/project-brief.md
存在
tactical
规划 → 执行
docs/specification.md
存在
quickfix
执行
docs/implementation-plan.md
存在
查看
modules/mission-types.md
获取完整类型定义和自定义类型支持。

Phase-to-Skill Mapping

阶段与Skill映射

PhaseSkill InvokedArtifact Produced
brainstorm
Skill(attune:project-brainstorming)
docs/project-brief.md
specify
Skill(attune:project-specification)
docs/specification.md
plan
Skill(attune:project-planning)
docs/implementation-plan.md
execute
Skill(attune:project-execution)
Implemented code + tests
The orchestrator never re-implements phase logic. Each phase is a complete
Skill()
invocation that handles its own workflow.
阶段调用的Skill生成的工件
头脑风暴
Skill(attune:project-brainstorming)
docs/project-brief.md
需求定义
Skill(attune:project-specification)
docs/specification.md
规划
Skill(attune:project-planning)
docs/implementation-plan.md
执行
Skill(attune:project-execution)
已实现的代码 + 测试用例
编排器绝不重复实现阶段逻辑。每个阶段都是一次完整的
Skill()
调用,由其自行处理工作流。

Session Recovery

会话恢复

Missions persist state to
.attune/mission-state.json
. On resume:
  1. Load mission state file
  2. Validate referenced artifacts still exist on disk
  3. Identify last completed phase
  4. Continue from next phase in sequence
See
modules/mission-state.md
for the state schema and recovery protocol.
任务会将状态持久化到
.attune/mission-state.json
。恢复时:
  1. 加载任务状态文件
  2. 验证引用的工件仍存在于磁盘上
  3. 识别最后完成的阶段
  4. 从序列中的下一个阶段继续执行
查看
modules/mission-state.md
获取状态 schema 和恢复协议。

Module Reference

模块参考

  • mission-types.md: Type definitions, auto-detection logic, custom types
  • state-detection.md: Artifact existence checks, quality validation, staleness
  • phase-routing.md: Phase execution protocol, transition hooks, error handling
  • mission-state.md: State schema, persistence, recovery protocol
  • mission-types.md:类型定义、自动检测逻辑、自定义类型
  • state-detection.md:工件存在性检查、质量验证、过期检测
  • phase-routing.md:阶段执行协议、过渡钩子、错误处理
  • mission-state.md:状态 schema、持久化、恢复协议

Related Skills

相关技能

  • Skill(attune:project-brainstorming)
    - Brainstorm phase
  • Skill(attune:project-specification)
    - Specify phase
  • Skill(attune:project-planning)
    - Plan phase
  • Skill(attune:project-execution)
    - Execute phase
  • Skill(attune:war-room-checkpoint)
    - Risk assessment for RED/CRITICAL tasks
  • Skill(leyline:risk-classification)
    - Task risk classification
  • Skill(leyline:damage-control)
    - Error recovery during phases
  • Skill(attune:project-brainstorming)
    - 头脑风暴阶段
  • Skill(attune:project-specification)
    - 需求定义阶段
  • Skill(attune:project-planning)
    - 规划阶段
  • Skill(attune:project-execution)
    - 执行阶段
  • Skill(attune:war-room-checkpoint)
    - 针对RED/CRITICAL任务的风险评估
  • Skill(leyline:risk-classification)
    - 任务风险分类
  • Skill(leyline:damage-control)
    - 阶段中的错误恢复

Related Commands

相关命令

  • /attune:mission
    - Invoke this skill
  • /attune:mission --resume
    - Resume from saved state
  • /attune:mission --type tactical
    - Override mission type
  • /attune:mission
    - 调用此技能
  • /attune:mission --resume
    - 从保存的状态恢复
  • /attune:mission --type tactical
    - 覆盖任务类型

Exit Criteria

退出标准

  • All phases in mission type completed successfully
  • Artifacts exist for each completed phase
  • Mission state saved to
    .attune/mission-state.json
  • Risk summary generated (tier counts across all tasks)
  • No unresolved errors or blockers
  • 任务类型中的所有阶段成功完成
  • 每个已完成的阶段都对应存在工件
  • 任务状态已保存到
    .attune/mission-state.json
  • 生成风险摘要(所有任务的等级统计)
  • 无未解决的错误或阻塞问题