Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

workflow-plan

БесплатноБез исполняемых скриптовНе проверен

Unified planning skill - 4-phase planning workflow, plan verification, and interactive replanning. Triggers on "workflow-plan", "workflow-plan-verify"…

catlog22от catlog22★ 2 110 звёзд на GitHub

Об этом скилле

Unified planning skill combining 4-phase planning workflow, plan quality verification, and interactive replanning. Produces IMPL_PLAN.md, task JSONs, verification reports, and manages plan lifecycle through session-level artifact updates. Routes by mode (plan | verify | replan) and acts as a pure orchestrator: executes phases, parses outputs, and passes context.

1. Architecture Overview

┌──────────────────────────────────────────────────────────────────┐
│  Workflow Plan Orchestrator (SKILL.md)                            │
│  → Route by mode: plan | verify | replan                         │
│  → Pure coordinator: Execute phases, parse outputs, pass context │
└──────────────────────────────────┬───────────────────────────────┘
                                │
        ┌───────────────────────┼───────────────────────┐
        ↓                       ↓                       ↓
  ┌───────────┐          ┌───────────┐           ┌───────────┐
  │ Plan Mode │          │  Verify   │           │  Replan   │
  │ (default) │          │   Mode    │           │   Mode    │
  │ Phase 1-4 │          │  Phase 5  │           │  Phase 6  │
  └─────┬─────┘          └───────────┘           └───────────┘
        │
    ┌───┼───┬───┐
    ↓   ↓   ↓   ↓
  ┌───┐┌───┐┌───┐┌───┐
  │ 1 ││ 2 ││ 3 ││ 4 │
  │Ses││Ctx││Con││Gen│
  └───┘└───┘└───┘└─┬─┘
                    ↓
              ┌───────────┐
              │ Confirm   │─── Verify ──→ Phase 5
              │ (choice)  │─── Execute ─→ Skill("workflow-execute")
              └───────────┘─── Review ──→ Display session status inline

2. Key Design Principles

  1. Pure Orchestrator: SKILL.md routes and coordinates only; execution detail lives in phase files
  2. Progressive Phase Loading: Read phase docs ONLY when that phase is about to execute
  3. Multi-Mode Routing: Single skill handles plan/verify/replan via mode detection
  4. Task Attachment Model: Sub-command tasks are ATTACHED, executed sequentially, then COLLAPSED
  5. Auto-Continue: After each phase completes, automatically execute next pending phase
  6. Accumulated State: planning-notes.md carries context across phases for N+1 decisions

3. Interactive Preference Collection

Before dispatching to phase execution, collect workflow preferences via AskUserQuestion:

// ★ 统一 auto mode 检测:-y/--yes 从 $ARGUMENTS 或 ccw 传播
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)

if (autoYes) {
  // 自动模式:跳过所有询问,使用默认值
  workflowPreferences = { autoYes: true, interactive: false }
} else {
  const prefResponse = AskUserQuestion({
    questions: [
      {
        question: "是否跳过所有确认步骤(自动模式)?",
        header: "Auto Mode",
        multiSelect: false,
        options: [
          { label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" },
          { label: "Auto", description: "跳过所有确认,自动执行" }
        ]
      }
    ]
  })

  workflowPreferences = {
    autoYes: prefResponse.autoMode === 'Auto'
  }

  // For replan mode, also collect interactive preference
  if (mode === 'replan') {
    const replanPref = AskUserQuestion({
      questions: [
        {
          question: "是否使用交互式澄清模式?",
          header: "Replan Mode",
          multiSelect: false,
          options: [
            { label: "Standard (Recommended)", description: "使用安全默认值" },
            { label: "Interactive", description: "通过提问交互式澄清修改范围" }
          ]
        }
      ]
    })
    workflowPreferences.interactive = replanPref.replanMode === 'Interactive'
  }
}

workflowPreferences is passed to phase execution as context variable, referenced as workflowPreferences.autoYes, workflowPreferences.interactive within phases.

4. Mode Detection

const args = $ARGUMENTS
const mode = detectMode(args)

function detectMode(args) {
  // Skill trigger determines mode
  if (skillName === 'workflow-plan-verify') return 'verify'
  if (skillName === 'workflow:replan') return 'replan'
  return 'plan'  // default: workflow-plan
}

5. Compact Recovery (Phase Persistence)

Multi-phase planning (Phase 1-4/5/6) spans long conversations. Uses 双重保险: TodoWrite 跟踪 active phase 保护其不被压缩,sentinel 作为兜底。

⚠️ COMPACT DIRECTIVE: Context compression MUST check TodoWrite phase status. The phase currently marked in_progress is the active execution phase — preserve its FULL content. Only compress phases marked completed or pending.

6. Execution Flow

Plan Mode (default)

Input Parsing:
   └─ Convert user input to structured format (GOAL/SCOPE/CONTEXT)

Phase 1: Session Discovery
   └─ Ref: Read("phases/01-session-discovery.md")
      └─ Output: sessionId (WFS-xxx), planning-notes.md

Phase 2: Context Gathering
   └─ Ref: Read("phases/02-context-gathering.md")
      ├─ Tasks attached: Analyze structure → Identify integration → Generate package
      └─ Output: contextPath + conflictRisk

Phase 3: Conflict Resolution (conditional: conflictRisk ≥ medium)
   └─ Decision (conf
Полный SKILL.md на GitHub

Установить workflow-plan в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Skill
Agent
AskUserQuestion
TodoWrite
Read
Write
Edit
Bash
Glob
Grep

Вложенные файлы

phases/01-session-discovery.mdphases/02-context-gathering.mdphases/03-conflict-resolution.mdphases/04-task-generation.mdphases/05-plan-verify.mdphases/06-replan.md

FAQ

Что делает скилл workflow-plan?

Unified planning skill - 4-phase planning workflow, plan verification, and interactive replanning. Triggers on "workflow-plan", "workflow-plan-verify", "workflow:replan".

Как установить скилл workflow-plan?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл workflow-plan запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить workflow-plan с