split-tasks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesplit-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 (: ADR ID, Feature Slug, or Frozen Contract coordinate); forbid orphan slices.
Parent Trace - 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 的切片)。
- 父级溯源严谨性:每个切片都必须明确追溯到其来源(:ADR ID、Feature Slug 或 Frozen Contract 坐标);禁止出现孤立切片。
Parent Trace - 无环依赖约束:切片必须构成有向无环图(DAG);禁止循环依赖。
- 原子直通:如果输入范围已适合在一个验证轮次内完成(≤ 3 个文件、单一标准),则保留为单一统一切片。
- 自适应调用输出:为人工审查渲染完整的 Markdown 表格;由自主 Runner 调度时输出紧凑的 JSON DAG。
Domain Rubric
领域评估准则
1. Slicing Sizing & Blast Radius
1. 切片规模与影响范围
A slice must be verifiable within one turn of . If a slice spans more than 4 files or touches disparate domain contexts, split it further along independent caller or scenario boundaries.
/forge切片必须能够在 的一轮执行内完成验证。如果切片跨越超过 4 个文件或涉及不同的领域上下文,应沿独立调用方或场景边界进一步拆分。
/forge2. Topological Phasing
2. 拓扑分阶段
Sequence slices topologically:
- Contract / Seam Anchor: Type declarations, interfaces, characterization tests.
- Core Vertical Flow: Minimal end-to-end happy path.
- Edge / Resiliency Slices: Validations, error boundaries, concurrency safeguards.
- Pruning / Deprecation: Removal of obsolete shims, flags, or legacy paths.
按拓扑顺序排列切片:
- 契约 / Seam 锚点:类型声明、接口、特征测试。
- 核心垂直流程:最小端到端正常路径。
- 边缘 / 韧性切片:验证、错误边界、并发保护。
- 裁剪 / 弃用:移除过时兼容层、功能开关或旧版路径。
3. State & Dispatch Lifecycle
3. 状态与调度生命周期
- : All predecessor dependencies are
READY; ready for immediateDONEexecution./forge - : Awaiting completion of prerequisite upstream slices.
BLOCKED
- :所有前置依赖均为
READY;可立即执行DONE。/forge - :正在等待上游前置切片完成。
BLOCKED
Canonical Output Contract
标准输出契约
markdown
undefinedmarkdown
undefinedTask DAG: <Feature / Scope> · <STAGED | UNRESOLVED>
Task DAG: <Feature / Scope> · <STAGED | UNRESOLVED>
Basis: <Root intent, architecture anchor, or ADR link>
| Slice ID | Title & Scope | Dependencies | Parent Trace | Acceptance & Verification Criteria | Dispatch 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 ID | Title & Scope | Dependencies | Parent Trace | Acceptance & Verification Criteria | Dispatch 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
执行协议
- Ingest settled changeset, frozen contracts, or architectural directions.
- If scope is atomic (≤ 3 files), yield a single READY slice without partitioning.
- Otherwise, derive vertical slices, establish parent traces, and verify acyclic dependencies.
- Output Markdown DAG (for human caller) or JSON DAG (for autonomous runner).
- 接收已确定的 changeset、冻结契约或架构方向。
- 如果范围是原子的(≤ 3 个文件),则生成单个 READY 切片,不进行拆分。
- 否则,推导垂直切片、建立父级溯源,并验证依赖关系无环。
- 输出 Markdown DAG(供人工调用方使用)或 JSON DAG(供自主 Runner 使用)。