Deleting a Pipeline Step — Removal Workflow
Workflow Phases
PHASE 1: GAP ANALYSIS
- Analyze the impact of removal on predecessors and successors.
- If a Blocking-gap is found (no alternative input source), STOP. The user must provide an alternative source or cancel the deletion.
PHASE 2: MUTATION DESIGN (REWIRE)
- For through-gaps or entry-gaps, present a rewire plan to the user (e.g., "Wire A directly to C").
- Dispatch
pipeline-architectinSTEP-DELETEmode to stage all changes. - All mutations (file removals and topology updates) MUST be staged in
edit-{ts}/. NEVER delete directly from production paths during design. - Architect completion manifest gate: After the architect returns, read the STEP-DELETE completion manifest. It MUST cover every file the architect was tasked with touching and use only
edited,copied-unchanged, ordeleted.- If any expected markdown artifact (
*.md) is listed ascopied-unchanged, STOP before Phase 3. Emit a blocking error naming the file and explain that unchanged markdown in STEP-DELETE staging indicates an architect partial exit. - If any expected file is missing from the manifest, STOP before Phase 3. The staging set is incomplete and cannot be audited as a coherent delta.
- If any expected markdown artifact (
- Staged markdown modification guard: Independently diff every staged
*.mdfile against its production original before Phase 3. If the staged file has a production source and is byte-identical to that source, STOP before Phase 3 with a blocking error naming both paths. This guard is independent of the manifest and catches partial exits even when the manifest is wrong or missing detail. - Pre-audit residual-reference scan: Prefer the Phase 3 delta auditor as the authoritative gate. If a manual grep is run as an additional pre-audit smoke check, it MUST explicitly include markdown files (for example,
--include="*.md") so.mdartifacts cannot be silently skipped.
PHASE 3: DELTA AUDIT
- Dispatch
pipeline-auditorinDELTAmode on the staged topology, entry skill, and neighbor steps. - SEV-0 or SEV-1 findings block deletion. A fragmented pipeline is a critical failure. Re-audit until the delta is clear.
PHASE 4: HUMAN APPROVAL
- Present a "Deletion Manifest" showing exactly which files will be removed and which edges will be rewired.
- Wait for explicit
APPROVE. OnCANCEL, discard all staged changes and do NOT delete artifacts.
PHASE 5: ATOMIC PROMOTION
- Execute file removals (agents/skills) and write updated
topology.jsonandtasks.md. - Update the
registry.jsonto reflect the removal. - Version Stamp: Update
plugin_versionintopology.jsonand the registry entry to the current superpipelines version.
Red Flags — STOP
- "The pipeline will work without rewiring — it's obvious." → STOP. Obvious assumptions are the leading source of silent runtime failures.
- "I'll skip the human gate; deletion is a simple task." → STOP. Deletion is irreversible; the human gate is the final recovery point.
- "I'll delete the files first, then update the topology." → STOP. This results in a broken pipeline if the topology update fails.
Rationalization Table
Reference Files
sk-pipeline-paths/SKILL.md— Path resolution.sk-pipeline-state/SKILL.md— Run state tracking.adding-a-pipeline-step/SKILL.md— Insertion workflow.updating-a-pipeline-step/SKILL.md— Modification workflow.