split-tasks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

split-tasks — Task DAG Decomposition & Provenance Slicing

split-tasks — 任务 DAG 分解与溯源切片

Operating Invariants

运行约束

  • Zero-Persistence Boundary: Never write task files to disk or issues to remote trackers; produce only an in-memory or reviewable Task DAG manifest.
  • Vertical Slice Mandate: Partition work strictly into end-to-end vertical slices (1–4 files, 50–150 LOC) with observable acceptance criteria; forbid horizontal technical layering (DB-only or API-only slices).
  • Parent Provenance Rigor: Every slice must explicitly trace to its origin (
    Parent Trace
    : ADR ID, Feature Slug, or Frozen Contract coordinate); forbid orphan slices.
  • Acyclic Dependency Enforcement: Slices must form a directed acyclic graph (DAG); forbid circular dependencies.
  • Atomic Bypass: Retain a single unified slice when the input scope already fits within one verification turn (≤ 3 files, single criterion).
  • Adaptive Invocation Output: Render the full Markdown table for human review; output a compact JSON DAG when dispatched by an autonomous runner.
  • 零持久化边界:绝不将任务文件写入磁盘或将问题写入远程跟踪器;仅生成内存中或可供审查的 Task DAG 清单。
  • 垂直切片要求:严格按端到端垂直切片划分工作(1–4 个文件,50–150 LOC),每个切片均需具备可观察的验收标准;禁止采用横向技术分层(仅 DB 或仅 API 的切片)。
  • 父级溯源严谨性:每个切片都必须明确追溯到其来源(
    Parent Trace
    :ADR ID、Feature Slug 或 Frozen Contract 坐标);禁止出现孤立切片。
  • 无环依赖约束:切片必须构成有向无环图(DAG);禁止循环依赖。
  • 原子直通:如果输入范围已适合在一个验证轮次内完成(≤ 3 个文件、单一标准),则保留为单一统一切片。
  • 自适应调用输出:为人工审查渲染完整的 Markdown 表格;由自主 Runner 调度时输出紧凑的 JSON DAG。

Domain Rubric

领域评估准则

1. Slicing Sizing & Blast Radius

1. 切片规模与影响范围

A slice must be verifiable within one turn of
/forge
. If a slice spans more than 4 files or touches disparate domain contexts, split it further along independent caller or scenario boundaries.
切片必须能够在
/forge
的一轮执行内完成验证。如果切片跨越超过 4 个文件或涉及不同的领域上下文,应沿独立调用方或场景边界进一步拆分。

2. Topological Phasing

2. 拓扑分阶段

Sequence slices topologically:
  1. Contract / Seam Anchor: Type declarations, interfaces, characterization tests.
  2. Core Vertical Flow: Minimal end-to-end happy path.
  3. Edge / Resiliency Slices: Validations, error boundaries, concurrency safeguards.
  4. Pruning / Deprecation: Removal of obsolete shims, flags, or legacy paths.
按拓扑顺序排列切片:
  1. 契约 / Seam 锚点:类型声明、接口、特征测试。
  2. 核心垂直流程:最小端到端正常路径。
  3. 边缘 / 韧性切片:验证、错误边界、并发保护。
  4. 裁剪 / 弃用:移除过时兼容层、功能开关或旧版路径。

3. State & Dispatch Lifecycle

3. 状态与调度生命周期

  • READY
    : All predecessor dependencies are
    DONE
    ; ready for immediate
    /forge
    execution.
  • BLOCKED
    : Awaiting completion of prerequisite upstream slices.
  • READY
    :所有前置依赖均为
    DONE
    ;可立即执行
    /forge
    。
  • BLOCKED
    :正在等待上游前置切片完成。

Canonical Output Contract

标准输出契约

markdown
undefined
markdown
undefined

Task DAG: <Feature / Scope> · <STAGED | UNRESOLVED>

Task DAG: <Feature / Scope> · <STAGED | UNRESOLVED>

Basis: <Root intent, architecture anchor, or ADR link>
Slice IDTitle & ScopeDependenciesParent TraceAcceptance & Verification CriteriaDispatch State
S-01<Vertical deliverable>None<ADR / Spec Anchor><Automated test command or invariant>READY
S-02<Dependent deliverable>S-01<ADR / Spec Anchor><Automated test command or invariant>BLOCKED
Summary: <N> slices (Max depth <K>, <D> direct dependencies). (omit if clean) Gap: <Unresolved dependency or ambiguous boundary requiring decision.>

*Autonomous JSON Contract (for Model Runner)*:
```json
{
  "basis": "<anchor>",
  "slices": [
    {"id": "S-01", "scope": "<title>", "deps": [], "parent": "<trace>", "verify": "<cmd>", "state": "READY"},
    {"id": "S-02", "scope": "<title>", "deps": ["S-01"], "parent": "<trace>", "verify": "<cmd>", "state": "BLOCKED"}
  ]
}
Basis: <Root intent, architecture anchor, or ADR link>
Slice IDTitle & ScopeDependenciesParent TraceAcceptance & Verification CriteriaDispatch State
S-01<Vertical deliverable>None<ADR / Spec Anchor><Automated test command or invariant>READY
S-02<Dependent deliverable>S-01<ADR / Spec Anchor><Automated test command or invariant>BLOCKED
Summary: <N> slices (Max depth <K>, <D> direct dependencies). (omit if clean) Gap: <Unresolved dependency or ambiguous boundary requiring decision.>

*自主 JSON 契约(供 Model Runner 使用)*:
```json
{
  "basis": "<anchor>",
  "slices": [
    {"id": "S-01", "scope": "<title>", "deps": [], "parent": "<trace>", "verify": "<cmd>", "state": "READY"},
    {"id": "S-02", "scope": "<title>", "deps": ["S-01"], "parent": "<trace>", "verify": "<cmd>", "state": "BLOCKED"}
  ]
}

Routing

路由

  • Immediate in-session execution -> Take first READY slice to (via /changeset) -> (via /forge).
  • Deferred execution or team backlog tracking -> (via /tracking-tasks).
  • Long-running automated pipeline execution -> Autonomous Runner (/goal).
  • Ambiguous scope or conflicting dependencies -> (via /clarify).
  • 当前会话内立即执行 -> 通过 /changeset 获取第一个 READY 切片 -> 通过 /forge 执行。
  • 延迟执行或团队待办跟踪 -> 通过 /tracking-tasks 处理。
  • 长时间运行的自动化管道执行 -> 自主 Runner(/goal)。
  • 范围不明确或依赖冲突 -> 通过 /clarify 处理。

Execution Protocol

执行协议

  1. Ingest settled changeset, frozen contracts, or architectural directions.
  2. If scope is atomic (≤ 3 files), yield a single READY slice without partitioning.
  3. Otherwise, derive vertical slices, establish parent traces, and verify acyclic dependencies.
  4. Output Markdown DAG (for human caller) or JSON DAG (for autonomous runner).
  1. 接收已确定的 changeset、冻结契约或架构方向。
  2. 如果范围是原子的(≤ 3 个文件),则生成单个 READY 切片,不进行拆分。
  3. 否则,推导垂直切片、建立父级溯源,并验证依赖关系无环。
  4. 输出 Markdown DAG(供人工调用方使用)或 JSON DAG(供自主 Runner 使用)。