Agent skill
pipeline
Modular development pipeline orchestrator. Use for "/pipeline", "pipeline init", "pipeline resume", "pipeline status", or phased triage → align → execute workflows.
Install this agent skill to your Project
npx add-skill https://github.com/petekp/claude-code-setup/tree/main/skills/pipeline
SKILL.md
Pipeline
Orchestrate triage → align → execute phases with machine-validated gates and artifact-based resume. Each phase narrows scope until a constraint contract is tight enough for autonomous execution.
Principles
- Forward-only phase progression: triage → align → execute. No phase type can repeat in the same position without superseding the prior one.
state.jsonis a thin cached projection (<2KB).events.ndjsonis the authoritative ledger.- All paths are repo-root-relative. Never store absolute paths.
- The pipeline orchestrator owns
.pipeline/state. manage-codex owns relay child state. - Execute output artifacts are owned by the pipeline orchestrator, not the child workflow.
Filesystem Contract
.pipeline/
state.json # thin active index (<2KB)
events.ndjson # append-only mutation ledger
mission/ # mission documents
constraints/sets/ # promoted constraint sets
phases/
<phase-id>/
artifacts/ # phase output artifacts + resume.md
runtime/ # execute phases only
relay/ # child workflow state (manage-codex relay root)
adapter-status.json
adapter-lock.json
Setup & Resume
# Initialize a new pipeline
./scripts/pipeline/update-pipeline.sh --event init_pipeline --mission-id <id>
# Resume: read state.json, then check adapter-status.json for active execute phases
cat .pipeline/state.json | python3 -c "import json,sys; print(json.dumps(json.load(sys.stdin), indent=2))"
Resume protocol:
- Read
state.json— checkstatus,current_phase_id,latest_resume - If an execute phase has
child_workflow, readadapter-status.jsonat the phase'sadapter.status_path - If adapter-status is fresher, run
child_checkpointto reconcile forward - If adapter-status is stale (>30min) and non-terminal, surface to user
- If
automatic_resume.blockedis true, surface the drift to user before continuing - Never dispatch a new child workflow if
adapter-lock.jsonexists and status is non-terminal
Triage
Interactive phase. The orchestrator explores the problem space with the user.
./scripts/pipeline/update-pipeline.sh --event phase_added --phase-id phase-001-triage --phase-type triage --skill-version v1
./scripts/pipeline/update-pipeline.sh --event phase_started --phase-id phase-001-triage
# ... interactive work produces mission document ...
./scripts/pipeline/update-pipeline.sh --event mission_activated --mission-path .pipeline/mission/mission-v001.md
./scripts/pipeline/update-pipeline.sh --event phase_completed --phase-id phase-001-triage
Align
Interactive phase. Narrows scope into a machine-checkable constraint contract.
Required output artifacts (gate-checked): execution-spec.md, constraints.json,
verification-plan.md. Recommended (not gate-checked in v1): decision-log.md for traceability.
./scripts/pipeline/update-pipeline.sh --event phase_added --phase-id phase-002-align --phase-type align --skill-version v1
./scripts/pipeline/update-pipeline.sh --event phase_started --phase-id phase-002-align
# ... interactive work produces artifacts ...
./scripts/pipeline/update-pipeline.sh --event artifact_recorded --phase-id phase-002-align --artifact-id execution-spec --artifact-path .pipeline/phases/phase-002-align/artifacts/execution-spec.md --artifact-role output
./scripts/pipeline/update-pipeline.sh --event artifact_recorded --phase-id phase-002-align --artifact-id constraints --artifact-path .pipeline/phases/phase-002-align/artifacts/constraints.json --artifact-role output
./scripts/pipeline/update-pipeline.sh --event constraint_set_activated --constraint-path .pipeline/phases/phase-002-align/artifacts/constraints.json
./scripts/pipeline/update-pipeline.sh --event phase_completed --phase-id phase-002-align
Execution Readiness Gate
Machine-validated gate between align and execute. Cannot be bypassed by prose.
./scripts/pipeline/update-pipeline.sh --event gate_passed --phase-id phase-002-align --summary "Execution readiness confirmed"
./scripts/pipeline/update-pipeline.sh --event gate_failed --phase-id phase-002-align --summary "open_questions nonzero"
Gate checks (all must pass):
constraints.jsonexists and is valid JSONallowed_pathsis a non-empty array with no wildcardsinterface_changesfield existsverification_commandsis non-emptynon_goalsis non-emptyopen_questionsis empty ([])
A failed gate blocks execute. Add a new align phase to address the gaps.
Execute
Autonomous phase. Dispatches manage-codex with an explicit --root pointing at the
phase's relay directory.
# Add execute phase (requires adapter metadata)
./scripts/pipeline/update-pipeline.sh --event phase_added --phase-id phase-003-execute --phase-type execute --skill-version v1 --adapter-id manage-codex-relay --adapter-version v1
# Start (blocked unless predecessor gate passed)
./scripts/pipeline/update-pipeline.sh --event phase_started --phase-id phase-003-execute
# Pipeline orchestrator creates the task header before dispatch
# artifacts/manage-codex-header.md — owned by pipeline orchestrator
# Dispatch manage-codex with explicit relay root
cat .pipeline/phases/phase-003-execute/runtime/relay/prompt.md | codex exec --full-auto -o .pipeline/phases/phase-003-execute/runtime/relay/last-messages/last-message-{slice_id}.txt -
# Monitor child workflow
./scripts/pipeline/update-pipeline.sh --event child_checkpoint --phase-id phase-003-execute
# After child workflow completes, orchestrator creates output artifacts:
# artifacts/output.md — owned by pipeline orchestrator
# artifacts/gate-report.json — owned by pipeline orchestrator
./scripts/pipeline/update-pipeline.sh --event phase_completed --phase-id phase-003-execute
./scripts/pipeline/update-pipeline.sh --event pipeline_completed
Execute output artifact ownership:
artifacts/manage-codex-header.md— created by pipeline orchestrator before dispatchartifacts/output.md— created by pipeline orchestrator after child completesartifacts/gate-report.json— created by pipeline orchestrator after child completes
Forward-Only Rule
Phase progression is forward-only. If a gate fails or constraints change:
- Supersede the current phase:
--event superseded --phase-id <id> --summary <reason> - Add a new phase of the same or earlier type
active_epoch_idincrements on supersession
Circuit Breakers
Escalate to the user when:
- Adapter-status is stale (>30 minutes, non-terminal)
- Artifact drift detected on a locked phase
automatic_resume.blockedis true in state
User Briefing
pipeline status: read-only view ofstate.json— current phase, child workflow status, resume pointer, automatic resume statepipeline resume: start fromstate.json, reconcile adapter-status, then continuepipeline init: create.pipeline/, write initialstate.json, prompt for mission
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ubiquitous-language
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
every-style-editor
This skill should be used when reviewing or editing copy to ensure adherence to Every's style guide. It provides a systematic line-by-line review process for grammar, punctuation, mechanics, and style guide compliance.
manage-codex
Autonomous Codex batch orchestrator. Use for "/manage-codex", "manage codex", "use codex", "dispatch to codex", or long-running Codex work.
seo-audit
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," or "indexing issues." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. For AI search optimization, see ai-seo.
capture-learning
Analyze recent conversation context and capture learnings to project knowledge files (for project-specific insights) or skills/commands/subagents (for cross-project patterns). Use when the user asks to "capture this learning", "update the docs with this", "remember this for next time", "document this issue", "add this to CLAUDE.md", "save this knowledge", or "update project knowledge". Also triggers after resolving build/setup issues, discovering non-obvious patterns, or completing debugging sessions with valuable insights.
agent-changelog
Compile an agent-optimized changelog by cross-referencing git history with plans and documentation. Use when asked to "update changelog", "compile history", "document project evolution", or proactively after major milestones, architectural changes, or when stale/deprecated information is detected that could confuse coding agents.
Didn't find tool you were looking for?