pipeline-architect-protocol
Skill4 starsChanged 6 months agoMITView on GitHub
Loaded by the pipeline-architect agent to design or mutate Superpipelines pipeline topology and data-only CAD artifacts.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- cutting-a-releaseSkill
- cutting-a-releaseSkill
- adding-a-pipeline-stepSkill
- brainstormingSkill
- change-modelsSkill
- creating-a-pipelineSkill
- deleting-a-pipeline-stepSkill
- finishing-a-development-branchSkill
- migrating-a-pipelineSkill
- optimizing-a-pipelineSkill
- pipeline-auditor-protocolSkill
- pipeline-failure-analyzer-protocolSkill
- pipeline-optimizer-protocolSkill
- pipeline-quality-reviewer-protocolSkill
- pipeline-spec-reviewer-protocolSkill
- pipeline-task-executor-protocolSkill
- running-a-pipelineSkill
- sk-4d-methodSkill
- sk-claude-code-conventionsSkill
- sk-dynamic-routingSkill
- sk-hashline-protocolSkill
- sk-hierarchical-contextSkill
- skill-architect-protocolSkill
- sk-model-migrationSkill
- sk-model-resolverSkill
- sk-pipeline-grillingSkill
- sk-pipeline-pathsSkill
- sk-pipeline-patternsSkill
- sk-pipeline-stateSkill
- sk-platform-dispatchSkill
- sk-rationalization-resistanceSkill
- sk-spec-driven-developmentSkill
- sk-worktree-safetySkill
- sk-write-review-isolationSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- updating-a-pipeline-stepSkill
- using-superpipelinesSkill
- verification-before-completionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Run the 4D Method on the user brief.
- Distinctive: line 46
STEP-DELETE: If a blocking gap is detected, design rewire logic before removing any files.
- Very specific: line 49
Reference extraction rule: Keep one-off operational instructions inline.
- Very specific: line 50
Scaffold summary: When references are created or inline-body exceptions are made, record them in …
- Very specific: line 68
Write status: "completed" to DATA_ROOT/temp/{P}/{runId}/pipeline-state.json (UTF-8, no BOM) on success.
- Very specific: line 69
Delete DATA_ROOT/temp/{P}/{runId}/ on DONE.
- Very specific: line 82
Every new agent is written as ONE canonical agent def (CAD) file as DATA at DATA_ROOT/pipelines/{P}/agents/{agent-name}.md: tool-neutral …
- Very specific: line 90
Write the CAD file at DATA_ROOT/pipelines/{P}/agents/{agent-name}.md — tool-neutral frontmatter (schema below) followed by the inline …
- Very specific: line 91
Do NOT create a separate {agent-name}-protocol skill and do NOT write a frontmatter-only tool-dir agent.
- Very specific: line 97
Write model_tier: (one of triage | fast | medium | deep | inherit) and optional effort_tier: (low | medium | high).
- Very specific: line 106
All files are built via Write (new) or Edit (update), resolving all paths via sk-pipeline-paths (RESOLVE_DATA_ROOT(scope)).
- Distinctive: line 109
PIPELINE: Write directly to final paths.
- Distinctive: line 111
STEP-DELETE completion manifest: Before returning from STEP-DELETE mode, emit a completion manifest covering every file the architect was …
- Very specific: line 126
NEVER hardcode .claude/, .opencode/, .agents/ in entry/CAD paths.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pipeline Architect — Operational Protocol
<overview>
The Pipeline Architect treats every component as a discrete software system with typed inputs, outputs, and explicit contracts. It operates in multiple modes to support the full pipeline lifecycle, from initial deconstruction to granular step mutations and topology health audits.
</overview><glossary>
<term name="topology.json">The canonical graph representation of agent dependencies and data flow within a pipeline.</term>
<term name="step management">The lifecycle operations (Add, Update, Delete) applied to individual agents or skills within a pipeline.</term>
<term name="entry skill">The user-invocable skill that serves as the primary interface for a named pipeline.</term>
</glossary>Operating Modes
<operating_modes>
| Mode | Trigger | Primary Outputs |
| PIPELINE | new-pipeline command | spec.md, plan.md, tasks.md, topology.json, agents, skills. |
| STEP-ADD | new-step command | New agent/skill; updated topology.json, tasks.md, and entry skill (staged). |
| STEP-UPDATE | update-step command | Edited agent/skill; updated topology.json with propagated edges (staged). |
| STEP-DELETE | delete-step command | Deleted files; rewired topology.json; updated tasks.md and entry skill (staged). |
| UPDATE | Prompt: "Update X to..." | In-place edits to existing pipeline artifacts with a summary. |
| DIAGNOSE | Prompt: "Why is it failing?" | Topology diagnosis and remediation plan without destructive writes. |
| </operating_modes> |
Protocol
<protocol>
### 1. DISCOVER
- Run the 4D Method on the user brief; gate execution if critical data slots are missing.
- **PIPELINE**: Identify information flow and select a pattern via `references/topology-selection.md`. Capture the user's desired output format (or deduce one based on the pipeline goal).
- **STEP-ADD**: Analyze `topology.json` to understand predecessor outputs and successor requirements.
- **STEP-UPDATE**: Identify change impact on I/O contracts and affected neighbors.
- **STEP-DELETE**: Compute dependency gaps and design rewire edges before deletion.2. DESIGN
- PIPELINE: Design all step agents per the canonical CAD schema in
pipeline-auditor-references/references/canonical-agent-def.mdand the CAD authoring template inreferences/sdd-artifacts.md; drafttopology.jsonedges. Anoutput-formatterstep MUST be appended as the final node, configured to write to<workspace-root>/output/. Minimal-pipeline exemption: an explicitly minimal/tracer pipeline (≤2 steps, declaredminimal: truein its registry entry) MAY omit theoutput-formatternode — its terminal step's declared output is the pipeline output. Do not auto-inject a formatter into aminimalpipeline. - STEP-ADD: Determine component type (skill-only, skill+agent, or agent-reuse) and wire into edges. Ensure the topology still terminates with the
output-formatterstep if applicable. - STEP-DELETE: If a blocking gap is detected, design rewire logic before removing any files.
- Constraint: Generated agents are single CAD files (data): tool-neutral frontmatter plus inline operational protocol body. No separate companion
-protocolskill is generated for new data-only pipelines. Bundlesk-*method skills may be referenced viaprotocol_skills. - CAD/body boundary: CAD frontmatter is portable agent data, not skill metadata. Do not add
disable-model-invocationoruser-invocableto CAD frontmatter. - Reference extraction rule: Keep one-off operational instructions inline. Create
DATA_ROOT/pipelines/{P}/references/{name}.mdonly when two or more CADs share substantial material, when inlining would harm scanability, or when the material is a stable contract such as a schema, rubric, checklist, or severity table. - Scaffold summary: When references are created or inline-body exceptions are made, record them in
DATA_ROOT/pipelines/{P}/scaffold-summary.md. - Data-Only Entry Constraint (v2.x+): The entry orchestration body is written as DATA at
DATA_ROOT/pipelines/{P}/entry.md(NOT a tool-registered skill). A data-only pipeline has no registered entry skill — it is discovered and run by the bundle'srunning-a-pipelineorchestrator, which readsentry.md+topology.jsonfrom the data root. The entry body MUST dispatch every step viask-platform-dispatchDISPATCH, never directTask(subagent_type=...). This is the only way generated pipelines stay portable across Tier 1 / Tier 1b / Tier 1c / Tier 1d / Tier 2. Generated Entry Body Template (
entry.mddata): For each step intopology.json, emit a dispatch block of the form:Skill("sk-platform-dispatch") result = DISPATCH(step={id: "<step.id>", agent: "<step.agent>", agent_def: "pipelines/{P}/agents/<step.agent>.md", output_paths: [...]}, inputs=<resolved>) if result.status != "DONE": handle per status protocolDISPATCH receives the CAD reference via
agent_def(relative to DATA_ROOT) and materializes the native agent at run time (Option A). The legacyprotocol_skillfield is removed — the protocol is inline in the CAD. Entry skill frontmatter MUST include (C4 compliance):user-invocable: true disable-model-invocation: true plugin_version: "<current_version>"user-invocable: trueexposes the pipeline for user invocation.disable-model-invocation: trueprevents the model from spontaneously re-entering the pipeline mid-dispatch.Entry body MUST include a Phase 5.x cleanup contract (C20 compliance):
- Write
status: "completed"toDATA_ROOT/temp/{P}/{runId}/pipeline-state.json(UTF-8, no BOM) on success. - Delete
DATA_ROOT/temp/{P}/{runId}/on DONE. - Trigger
CLEANUP_MATERIALIZED(P, scope)(sk-platform-dispatch) on DONE to remove the ephemeral materialized agent cache. - Preserve temp dir and log path on BLOCKED/FAILED/ESCALATED.
Entry body paths MUST resolve via
sk-pipeline-paths(C22 compliance): every data path resolves againstDATA_ROOT(RESOLVE_DATA_ROOT(scope)), never a literal.claude/,.opencode/,.agents/directory name. Data-only paths are tier-independent, so no portability rewrite is needed.Raw
Task(subagent_type=...)invocations are forbidden in entry skills for top-level step dispatch. Scope of this constraint:- In-scope (MUST use DISPATCH): the entry skill's main per-step orchestration loop — i.e., the call that hands a step's agent + protocol-skill + inputs to the executor.
- Out-of-scope (raw Task() permitted): (a) the architect's own internal Task() calls during PIPELINE mode; (b) nested Task() calls inside a step's protocol skill (e.g., a reviewer protocol that spawns a helper) — those run under the executor selected by DISPATCH and are not themselves top-level dispatch.
- Write
3. DEVELOP
<EXTREMELY-IMPORTANT>
Every new agent is written as ONE canonical agent def (CAD) file as DATA at
`DATA_ROOT/pipelines/{P}/agents/{agent-name}.md`: tool-neutral frontmatter PLUS the inline
protocol body (the operational protocol that used to live in a companion `-protocol` skill).
Nothing is written to `agents/superpipelines/...` or `skills/superpipelines/...` as source —
those tool dirs hold only ephemeral materialization cache, owned by DISPATCH at run time.
</EXTREMELY-IMPORTANT>For each new agent (REQUIRED, non-optional):
- Write the CAD file at
DATA_ROOT/pipelines/{P}/agents/{agent-name}.md— tool-neutral frontmatter (schema below) followed by the inline protocol body. - Do NOT create a separate
{agent-name}-protocolskill and do NOT write a frontmatter-only tool-dir agent. The protocol is inline; the materializer translates the CAD to native frontmatter at dispatch.
Schema + capability→primitive translation: pipeline-auditor-references/references/canonical-agent-def.md. See references/sdd-artifacts.md § "Canonical agent-def template" for the exact template.
CAD frontmatter rules (capability intent, NOT platform primitives):
schema_version: "1.0",name,description(third-person, triggering-only),role,review_stage,status_protocol: standard, andplugin_version: "<current>".- Write
model_tier:(one oftriage | fast | medium | deep | inherit) and optionaleffort_tier:(low | medium | high); setturn_budget. A concretemodel:MUST NOT be written — resolved at runtime bysk-model-resolver. Defaults: planning/architecture/review →deep; coding/execution →medium; utility/formatting →fast; routers/classifiers →triage. capabilities: { write_files, run_shell, network, edit_tracked_source }— the portable security contract. The materializer translates these to each tier's enforcement primitive. Setwrite_files:trueonly for file-producing agents;edit_tracked_source:trueonly for legitimate tracked-code writers;run_shell/networkonly when the protocol needs them.isolation_required: trueONLY whenedit_tracked_source: true(writer needing a worktree).- Optional
tool_hints.allow— capability-consistent refinement only; MUST NOT grant a denied capability. io_contract— inputs ({key, from_step, kind}) and outputs ({key, path, kind}); all paths RELATIVE to the run dir (no absolute, no scope-root prefix, no..).protocol_skills— bundle skills to load (tier-discovered, unchanged); MAY be empty.memory: projectis forbidden.- Reviewer isolation =
capabilities.write_files: false. This is the single canonical source for reviewer write-deny; the materializer emits the tier's structural primitive (CC:permissionMode: plan+disallowedTools: Write, Edit, Bash; OC:permission: { edit: deny }; Codex:sandbox_mode: read-only). Per-tier recipe text MUST NOT be duplicated in this skill body — the profile JSON + the canonical-def translation table are the single sources of truth.
All files are built via Write (new) or Edit (update), resolving all paths via sk-pipeline-paths (RESOLVE_DATA_ROOT(scope)).
4. DELIVER
- PIPELINE: Write directly to final paths; emit Mermaid topology and Architect's Brief.
- STEP- Modes*: Stage artifacts ONLY to
temp/{P}/edit-{ts}/; promotion occurs after audit. - STEP-DELETE completion manifest: Before returning from STEP-DELETE mode, emit a completion manifest covering every file the architect was tasked with touching. Each entry MUST include the production path, staged path when present, and one status:
edited— staged content was intentionally changed from the production source.copied-unchanged— staged content is byte-identical to the production source.deleted— the file is intentionally removed and has no staged replacement. The manifest is mandatory even when the topology edit succeeds. The delete-step orchestrator reads it before delta audit and treatscopied-unchangedon expected markdown updates as a blocking partial-exit signal.
- UPDATE/DIAGNOSE: Edit in-place and provide a delta summary.
</protocol>
<invariants>
- Generated agents are CAD files (data) at `DATA_ROOT/pipelines/{P}/agents/{agent-name}.md`: tool-neutral frontmatter + inline protocol body. NEVER write a generated agent or step protocol to `agents/superpipelines/...` or `skills/superpipelines/...` as source — those tool dirs hold only ephemeral materialization cache owned by DISPATCH.
- CAD frontmatter expresses capability intent (`capabilities.*`), not platform primitives; the materializer translates at dispatch. `tool_hints.allow` MUST NOT grant a denied capability.
- Absolute paths are forbidden; `io_contract` paths are relative to the run dir; resolve scope paths via `sk-pipeline-paths` (`RESOLVE_DATA_ROOT`).
- `memory: project` is strictly forbidden in all agent frontmatter.
- The generated entry body (`entry.md`, data) MUST route every step through `sk-platform-dispatch` DISPATCH, passing `agent_def`. Direct `Task(subagent_type=...)` invocations are forbidden; they break Tier 1b/1c/1d/2 execution and violate `MULTI_PLATFORM: TRUE`.
- Entry body MUST include a cleanup contract (C20): write `status: "completed"` to state on DONE; delete `DATA_ROOT/temp/{P}/{runId}/` on DONE; trigger `CLEANUP_MATERIALIZED(P, scope)` on DONE; preserve on BLOCKED/FAILED/ESCALATED.
- NEVER hardcode `.claude/`, `.opencode/`, `.agents/` in entry/CAD paths. Data paths resolve against `DATA_ROOT` via `sk-pipeline-paths`.
</invariants>Reference Files
${CLAUDE_PLUGIN_ROOT}/skills/pipeline-architect-references/references/topology-selection.md${CLAUDE_PLUGIN_ROOT}/skills/pipeline-architect-references/references/agent-frontmatter-schema.md— legacy old-root reference only; do not use for new data-only pipeline scaffolding.${CLAUDE_PLUGIN_ROOT}/skills/pipeline-architect-references/references/sdd-artifacts.md${CLAUDE_PLUGIN_ROOT}/skills/pipeline-architect-references/references/anti-patterns.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

