skill-pipeline

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Pipeline

技能Pipeline

The conductor, not a player. This skill classifies tasks, selects the pipeline variant, calibrates depth, and orchestrates handoffs between skills. It produces no artifacts of its own — its output is routing decisions that activate other skills.
它是指挥者,而非执行者。该技能负责对任务分类、选择Pipeline变体、校准执行深度,并且协调各个技能之间的交接。它本身不会生成任何产物——输出内容是用于激活其他技能的路由决策。

Task Classification

任务分类

On every coding task, classify before acting. Evaluate scope signals and map to a task class.
Input signals: file count, task description, existing plan/handoff files, batch indicators, CI environment.
Task received
  ├─ Trivial (typo, rename, version bump)
  │  → No skills. Just do it.
  ├─ Small (isolated fix, single-file, <10 logic lines)
  │  → simplify-and-harden only (post-completion)
  ├─ Medium (feature in known area, 2-5 files)
  │  → intent-framed-agent + simplify-and-harden
  ├─ Large (complex refactor, new architecture, unfamiliar codebase, high-risk logic)
  │  → Full standard pipeline
  │  → Recommend /plan-interview before starting
  ├─ Long-running (multi-session, high context pressure, prior handoff exists)
  │  → Full standard pipeline with context-surfing as critical skill
  └─ Batch (multiple features from spec, 5+ discrete tasks, issue triage)
     → Team-based pipeline (agent-teams-simplify-and-harden)
When uncertain, start with Medium. Add skills if drift or quality issues appear mid-task.
For detailed heuristics, edge cases, and examples: read
references/classification-rules.md
.
处理任何编码任务时,都要先分类再执行。评估范围信号并映射到对应的任务类别。
输入信号: 文件数量、任务描述、已有的计划/交接文件、批量标识、CI环境。
Task received
  ├─ Trivial (typo, rename, version bump)
  │  → No skills. Just do it.
  ├─ Small (isolated fix, single-file, <10 logic lines)
  │  → simplify-and-harden only (post-completion)
  ├─ Medium (feature in known area, 2-5 files)
  │  → intent-framed-agent + simplify-and-harden
  ├─ Large (complex refactor, new architecture, unfamiliar codebase, high-risk logic)
  │  → Full standard pipeline
  │  → Recommend /plan-interview before starting
  ├─ Long-running (multi-session, high context pressure, prior handoff exists)
  │  → Full standard pipeline with context-surfing as critical skill
  └─ Batch (multiple features from spec, 5+ discrete tasks, issue triage)
     → Team-based pipeline (agent-teams-simplify-and-harden)
如果无法确定分类,先按中等任务处理。如果任务执行过程中出现范围偏移或质量问题,可补充对应技能。
如需了解详细的启发式规则、边界场景和示例,请阅读
references/classification-rules.md

Pipeline Selection

Pipeline选择

Route task class to the right variant:
Task ClassVariantRationale
TrivialNoneNo overhead needed
SmallStandard (minimal)S&H only
MediumStandard (partial)Scope monitoring + review
LargeStandard (full)Full depth with planning
Long-runningStandard (full)Context-surfing is critical
BatchTeam-basedBreadth over depth
CI environmentCIHeadless review
Heuristic: Standard pipeline for depth (single complex feature). Team-based pipeline for breadth (batch of tasks). CI pipeline when
CI=true
or
GITHUB_ACTIONS=true
.
将任务类别匹配到合适的变体:
任务类别变体设计逻辑
琐碎任务不需要额外开销
小任务标准型(最小配置)仅启用S&H
中等任务标准型(部分配置)范围监控 + 评审
大型任务标准型(全量配置)带规划的全深度执行
长周期任务标准型(全量配置)context-surfing为核心能力
批量任务团队协作型优先覆盖广度而非深度
CI环境CI型无界面评审
启发式规则: 标准Pipeline适用于要求「深度」的场景(单个复杂功能),团队协作型Pipeline适用于要求「广度」的场景(批量任务),当环境变量
CI=true
GITHUB_ACTIONS=true
时使用CI Pipeline。

Activation Sequences

激活顺序

Standard Pipeline

标准Pipeline

classify
  → (recommend /plan-interview if Large or Long-running)
  → intent-framed-agent (at planning-to-execution transition)
  → context-surfing (auto-activates when intent frame + plan exist; concurrent with intent monitoring)
  → [IMPLEMENTATION]
  → simplify-and-harden (post-completion, if non-trivial diff)
  → self-improvement (on errors, corrections, or S&H learning candidates)
Skill-by-class activation:
SkillTrivialSmallMediumLargeLong-running
plan-interview---RecommendRecommend
intent-framed-agent--ActivateActivateActivate
context-surfing---ActivateCritical
simplify-and-harden-If non-trivialIf non-trivialIf non-trivialIf non-trivial
self-improvementOn error onlyOn error onlyOn error/completionOn error/completionOn error/completion
classify
  → (recommend /plan-interview if Large or Long-running)
  → intent-framed-agent (at planning-to-execution transition)
  → context-surfing (auto-activates when intent frame + plan exist; concurrent with intent monitoring)
  → [IMPLEMENTATION]
  → simplify-and-harden (post-completion, if non-trivial diff)
  → self-improvement (on errors, corrections, or S&H learning candidates)
按任务类别的技能激活规则:
技能琐碎任务小任务中等任务大型任务长周期任务
plan-interview---推荐推荐
intent-framed-agent--激活激活激活
context-surfing---激活核心必备
simplify-and-harden-非平凡变更时启用非平凡变更时启用非平凡变更时启用非平凡变更时启用
self-improvement仅出错时启用仅出错时启用出错/完成时启用出错/完成时启用出错/完成时启用

Team-Based Pipeline

团队协作型Pipeline

classify (Batch)
  → (recommend /plan-interview if no spec exists)
  → agent-teams-simplify-and-harden
    ├─ Team lead emits Intent Frame #1
    ├─ Phase 1: parallel implementation agents
    ├─ Compile + test verification
    ├─ Phase 2: parallel audit agents (simplify, harden, spec)
    ├─ Fix loop (up to 3 audit rounds)
    └─ Learning loop output
  → self-improvement
classify (Batch)
  → (recommend /plan-interview if no spec exists)
  → agent-teams-simplify-and-harden
    ├─ Team lead emits Intent Frame #1
    ├─ Phase 1: parallel implementation agents
    ├─ Compile + test verification
    ├─ Phase 2: parallel audit agents (simplify, harden, spec)
    ├─ Fix loop (up to 3 audit rounds)
    └─ Learning loop output
  → self-improvement

CI Pipeline

CI Pipeline

classify (CI detected)
  → simplify-and-harden-ci (headless scan, PR changed files only)
  → self-improvement-ci (pattern aggregation, promotion recommendations)
classify (CI detected)
  → simplify-and-harden-ci (headless scan, PR changed files only)
  → self-improvement-ci (pattern aggregation, promotion recommendations)

Depth Calibration

深度校准

Not just which skills — how deep each goes:
DimensionSmallMediumLargeLong-runningBatch
Planning passes00-11-2Deep iterativePer-task or umbrella
Intent frame-Single frameFull frame + monitoringFull + handoffTeam lead frame
Context-surfing--ActiveCritical (exit protocol ready)Lightweight drift checks
S&H budget20% diff, 60s20% diff, 60s20% diff, 60s20% diff, 60s30% team growth cap
Audit rounds (teams)----Up to 3
Self-improvementError-triggeredError-triggeredError + S&H feedError + S&H feedError + teams feed
不仅要确定使用哪些技能,还要校准每个技能的执行深度:
维度小任务中等任务大型任务长周期任务批量任务
规划迭代次数00-11-2深度迭代按任务或统一规划
意图框架-单框架完整框架 + 监控完整框架 + 交接团队负责人输出框架
context-surfing--活跃核心(已准备退出协议)轻量偏移检查
S&H预算20% diff, 60s20% diff, 60s20% diff, 60s20% diff, 60s30%团队成长上限
(团队)审核轮次----最多3轮
self-improvement错误触发错误触发错误 + S&H反馈错误 + S&H反馈错误 + 团队反馈

Handoff Rules

交接规则

Artifacts flow between skills. The orchestrator ensures each skill receives what it needs.
Key handoffs:
  1. Plan file (
    docs/plans/plan-NNN-<slug>.md
    ) — produced by
    plan-interview
    , consumed by
    intent-framed-agent
    (context),
    context-surfing
    (wave anchor),
    agent-teams
    (task extraction).
  2. Intent Frame — produced by
    intent-framed-agent
    , consumed by
    context-surfing
    (wave anchor strengthening). Copied into handoff files on drift exit.
  3. Handoff file (
    .context-surfing/handoff-[slug]-[timestamp].md
    ) — produced by
    context-surfing
    on drift exit, consumed by next session for resume.
  4. Learning candidates (
    learning_loop.candidates
    ) — produced by
    simplify-and-harden
    and
    agent-teams
    , consumed by
    self-improvement
    for pattern tracking.
Precedence: If
context-surfing
and
intent-framed-agent
both fire simultaneously, context-surfing's exit takes precedence. Degraded context makes scope checks unreliable.
For the full artifact/signal/budget table: read
references/handoff-matrix.md
.
产物在技能之间流转,编排器会确保每个技能收到所需的输入。
核心交接项:
  1. 计划文件 (
    docs/plans/plan-NNN-<slug>.md
    ) — 由
    plan-interview
    生成,供
    intent-framed-agent
    (上下文)、
    context-surfing
    (波动锚点)、
    agent-teams
    (任务提取)使用。
  2. 意图框架 — 由
    intent-framed-agent
    生成,供
    context-surfing
    (强化波动锚点)使用。发生范围偏移退出时会复制到交接文件中。
  3. 交接文件 (
    .context-surfing/handoff-[slug]-[timestamp].md
    ) — 发生范围偏移退出时由
    context-surfing
    生成,供下一次会话恢复上下文使用。
  4. 学习候选集 (
    learning_loop.candidates
    ) — 由
    simplify-and-harden
    agent-teams
    生成,供
    self-improvement
    做模式追踪使用。
优先级规则: 如果
context-surfing
intent-framed-agent
同时触发,context-surfing的退出请求优先级更高。上下文降级会导致范围检查不可靠。
如需查看完整的产物/信号/预算表,请阅读
references/handoff-matrix.md

Decision Points

决策节点

The orchestrator intervenes at these moments:
编排器会在以下节点介入:

Task Arrival

任务接收时

Classify the task. Select pipeline variant and depth. Emit routing decision. If Large/Long-running, recommend
/plan-interview
. If Batch, recommend team-based variant.
对任务分类,选择Pipeline变体和深度,输出路由决策。如果是大型/长周期任务,推荐使用
/plan-interview
。如果是批量任务,推荐使用团队协作型变体。

Plan Approval

计划获批时

When user approves a plan from
plan-interview
, flow directly into the execution stage — no separate "should I proceed?" prompt. This means activating
intent-framed-agent
to emit an Intent Frame. The intent frame itself still requires user confirmation before coding begins (that confirmation is part of
intent-framed-agent
, not an extra gate). Populate task tracking with checklist items.
当用户批准
plan-interview
输出的计划后,直接进入执行阶段——不需要额外的「是否继续」确认。这意味着会激活
intent-framed-agent
生成意图框架,编码开始前仍然需要用户确认意图框架(该确认是
intent-framed-agent
的内置流程,不是额外关卡)。同时填充任务跟踪的检查清单项。

Planning-to-Execution Transition

规划转执行阶段

When no plan-interview was used and the user signals readiness ("go ahead", "implement this", "let's start"), activate
intent-framed-agent
. Emit Intent Frame. Wait for user confirmation of the frame before coding.
如果没有使用plan-interview,且用户发出就绪信号(「继续」、「实现这个需求」、「开始吧」),则激活
intent-framed-agent
生成意图框架,等待用户确认框架后再开始编码。

Implementation Complete

实现完成时

Check if diff meets the non-trivial threshold (see
references/classification-rules.md
). If yes, activate
simplify-and-harden
. If no, signal completion directly.
检查diff是否达到非平凡变更阈值(参考
references/classification-rules.md
)。如果是,激活
simplify-and-harden
;如果否,直接发出完成信号。

Drift Detected

检测到范围偏移时

If
context-surfing
fires a drift exit, stop execution. Write handoff file. If the task was classified below Large, consider re-classifying upward for the next session.
如果
context-surfing
触发范围偏移退出,停止执行,写入交接文件。如果原任务分类低于大型任务,可考虑在下一次会话升级分类。

Session Resume

会话恢复时

Check for handoff files in
.context-surfing/
. If found, read completely. Re-establish context from handoff. Re-classify if needed. Resume from recommended re-entry point.
检查
.context-surfing/
目录下是否有交接文件。如果有,完整读取文件内容,从交接信息中重建上下文,必要时重新分类,从推荐的重入节点恢复执行。

Overrides

手动覆盖规则

Users can override any routing decision:
  • Force depth:
    depth=small
    /
    depth=large
    — override classification
  • Force variant:
    variant=teams
    /
    variant=standard
    — override pipeline selection
  • Skip review:
    --no-review
    — skip
    simplify-and-harden
  • Force planning: invoke
    /plan-interview
    on any task regardless of classification
  • Skip all skills: user says "just do it" on a non-trivial task — respect the override
用户可以覆盖任何路由决策:
  • 强制指定深度:
    depth=small
    /
    depth=large
    — 覆盖分类结果
  • 强制指定变体:
    variant=teams
    /
    variant=standard
    — 覆盖Pipeline选择结果
  • 跳过评审:
    --no-review
    — 跳过
    simplify-and-harden
    步骤
  • 强制规划: 任意任务都可以调用
    /plan-interview
    ,不受分类限制
  • 跳过所有技能: 用户对非平凡任务下达「直接执行」指令时,尊重该覆盖规则

Re-classification

重分类规则

Tasks can change class mid-execution. Watch for:
  • Escalation signals: scope expanded beyond original estimate, many more files affected than expected,
    context-surfing
    drift exit,
    intent-framed-agent
    detects significant scope change
  • De-escalation signals: task turns out simpler than planned, plan reveals minimal changes needed
When re-classification is warranted:
  1. Note the signal that triggered re-classification
  2. Adjust active skills (add or remove pipeline stages)
  3. If escalating to Large: recommend
    /plan-interview
    if no plan exists
  4. If de-escalating: drop unnecessary stages, proceed with lighter pipeline
任务执行过程中可能变更类别,需要关注以下信号:
  • 升级信号: 范围超出初始预估、受影响文件远超预期、
    context-surfing
    触发范围偏移退出、
    intent-framed-agent
    检测到重大范围变更
  • 降级信号: 任务实际复杂度低于预期、规划显示只需要极小改动
当需要重分类时:
  1. 记录触发重分类的信号
  2. 调整活跃技能(新增或移除Pipeline阶段)
  3. 如果升级为大型任务且无现成计划,推荐使用
    /plan-interview
  4. 如果降级,移除不必要的阶段,使用更轻量的Pipeline继续执行

Anti-Patterns

反模式

  • Do NOT re-implement skill logic. This skill classifies and dispatches. Each individual skill owns its own procedure.
  • Do NOT auto-invoke plan-interview. It is a human gate. Recommend it; let the user decide.
  • Do NOT create a third monitoring layer. During execution,
    intent-framed-agent
    monitors scope and
    context-surfing
    monitors quality. The orchestrator dispatches at decision points, then gets out of the way.
  • Do NOT override individual skill guardrails. If
    simplify-and-harden
    has a 20% budget cap, the orchestrator respects it.
  • Do NOT force skills on trivial tasks. The pipeline exists to help, not to slow down simple work.
  • 不要重复实现技能逻辑: 该技能仅负责分类和调度,每个独立技能自行管理内部流程
  • 不要自动调用plan-interview: 它是人工管控节点,仅做推荐,由用户决定是否使用
  • 不要创建第三层监控: 执行阶段由
    intent-framed-agent
    监控范围,
    context-surfing
    监控质量,编排器仅在决策节点调度,之后不介入执行
  • 不要覆盖单个技能的防护规则: 如果
    simplify-and-harden
    设置了20%的预算上限,编排器需要遵守该限制
  • 不要强制给琐碎任务挂载技能: Pipeline的作用是提效,而非拖慢简单任务的执行速度

Pipeline Variant Details

Pipeline变体详情

For complete step-by-step walkthroughs of each variant including hybrid scenarios and session resume: read
references/pipeline-variants.md
.
如需查看每个变体的完整分步流程,包括混合场景和会话恢复的说明,请阅读
references/pipeline-variants.md