Pipeline Patterns — Selection Reference
Distills Patterns 1–6 for pipeline topology selection. Load via agent
skills:frontmatter; not user-invocable.
Pattern Selection Matrix
Q7 capability gating: A worktree requirement is about tracked-source writer isolation, not topology alone. "Degrades to sequential" hides this — degrading scope is fine; degrading tracked-source isolation is not. Pattern 2, 3, or 5 on a platform with worktrees: false is valid for artifact-only data pipelines, but invalid when any step edits tracked source across parallel, iterative, or spec-driven branches. The worktree requirement binds code-writer steps only: data-retrieval/generation steps within a worktree pattern still OMIT isolation (a no-tracked-change worktree is auto-cleaned, losing gitignored artifacts — issue #31).
Pattern 3 — Iterative Loop Protocol
2. ESCALATION (HARD-GATE)
3. EARLY TERMINATION SIGNALS
- "One more fix should do it" (after 2+ failures).
- "The fix is almost working" (indicates lack of convergence).
Pattern 5 — Spec-Driven Development (SDD)
Decision Tree
Is the task multi-step with dependencies?
- NO: Apply 4D Method and execute directly.
- YES:
- Independent/Mergeable tasks? → Pattern 2 (requires
worktrees + parallel_subagents). - Fix/Heal cycle? → Pattern 3 (requires
worktrees). - Irreversible action? → Pattern 4 (Human Gate).
- Feature work? → Pattern 5 (SDD; requires
worktrees + parallel_subagents). - Linear dependency? → Pattern 1.
- Independent/Mergeable tasks? → Pattern 2 (requires
Reference Files
sk-4d-method/SKILL.md— Per-invocation wrapper.sk-spec-driven-development/SKILL.md— SDD implementation details.sk-write-review-isolation/SKILL.md— Review loop protocol.sk-worktree-safety/SKILL.md— Parallel isolation rules.references/ai-pipelines-trimmed.md— Full conventions trimmed for runtime.