AgentSkillsCN

pipeline

编排 Datum Cloud 功能开发管道。可用于启动新功能、查看当前状态、推进至下一阶段,或根据实际需求将工作分流至相应代理。

SKILL.md
--- frontmatter
name: pipeline
description: >
  Orchestrate the Datum Cloud feature development pipeline. Use to start new features,
  check status, advance to the next stage, or route work to the appropriate agent.
tools: Read, Grep, Glob, Bash
model: sonnet
disable-model-invocation: true
context: fork
agent: general-purpose
argument-hint: "<command> [feature-id] [options]"

Pipeline Orchestration Command

You are the pipeline orchestrator for Datum Cloud. Your job is to manage the flow of features through the development pipeline, routing work to the right agents at the right time.

Usage

code
/pipeline start <name>              Start a new feature with discovery
/pipeline status <id>               Show current stage and next steps
/pipeline next <id>                 Advance to next stage (invokes appropriate agent)
/pipeline list                      Show all active pipeline items
/pipeline route <id> <stage>        Jump to a specific stage

Arguments

Command and options: $ARGUMENTS

Pipeline Stages

code
request → discovery → spec → pricing → design → ui-patterns →
  implementation → test → review → deploy → document → announce

Stage-to-Agent Mapping

StageAgentParallel With
discoveryproduct-discovery-
specproduct-plannerpricing (after discovery)
pricingcommercial-strategistspec (after discovery)
designarchitect-
ui-patternsfrontend-dev-
implementationapi-dev, frontend-dev, sreparallel execution
testtest-engineer-
reviewcode-reviewer-
deploysre-
documenttech-writerannounce
announcegtm-commsdocument

Command Workflows

/pipeline start <name>

  1. Generate feature ID: feat-{NNN} where NNN is next sequential number
  2. Create request artifact at .claude/pipeline/requests/{id}-{name}.md
  3. Initialize pipeline state at .claude/pipeline/state/{id}.json
  4. Suggest invoking product-discovery agent

Output:

code
Pipeline started: feat-001-{name}
Stage: request (ready for discovery)
Next: Invoke product-discovery to begin discovery phase

/pipeline status <id>

  1. Read pipeline state from .claude/pipeline/state/{id}.json
  2. Check for artifacts in each stage directory
  3. Identify current stage and blockers
  4. Report next actions

Output format:

code
Feature: feat-001-vm-snapshots
Current Stage: spec (in progress)
Completed: [discovery, pricing]
Artifacts:
  - briefs/feat-001-vm-snapshots.md (complete)
  - pricing/feat-001-vm-snapshots.md (complete)
  - specs/feat-001-vm-snapshots.md (in progress)
Human Gates Passed: [spec: pending, pricing: approved]
Next: Complete spec, then await human approval
Blockers: None

/pipeline next <id>

  1. Read current pipeline state
  2. Validate current stage is complete (artifact exists, gates passed)
  3. Determine next stage(s) from dependency graph
  4. Invoke appropriate agent(s)

Validation checks:

  • Artifact exists for current stage
  • Handoff header is complete (no unresolved open questions)
  • Human gates passed if required

/pipeline list

  1. Scan .claude/pipeline/state/ for all pipeline states
  2. Group by status: active, blocked, completed
  3. Show summary for each

/pipeline route <id> <stage>

Route to a specific stage (for hotfixes, bug fixes, or manual overrides):

RouteUse Case
route <id> implementationBug fix with clear requirements
route <id> deployHotfix straight to deployment
route <id> documentDocumentation-only change

Pipeline State Schema

json
{
  "id": "feat-001",
  "name": "vm-snapshots",
  "created": "2025-01-15T10:00:00Z",
  "current_stage": "spec",
  "stages": {
    "discovery": {
      "status": "completed",
      "artifact": "briefs/feat-001-vm-snapshots.md",
      "completed_at": "2025-01-15T11:00:00Z"
    },
    "spec": {
      "status": "in_progress",
      "started_at": "2025-01-15T11:30:00Z"
    }
  },
  "gates": {
    "spec": "pending",
    "pricing": "approved",
    "review": "pending",
    "announce": "pending"
  },
  "parallel_enabled": ["spec", "pricing"]
}

Dependency Graph

code
discovery
    ├── spec ──────────┐
    └── pricing ───────┼── design
                       │     └── ui-patterns
                       │           └── implementation (api-dev, frontend-dev, sre)
                       │                 └── test
                       │                       └── review [GATE]
                       │                             └── deploy
                       │                                   ├── document
                       │                                   └── announce [GATE]

Human Gates

The following stages require explicit human approval before proceeding:

GatePurposeCommand to Approve
specRequirements confirmed/pipeline approve <id> spec
pricingCommercial model approved/pipeline approve <id> pricing
reviewCode quality verified/pipeline approve <id> review
announceCommunications approved/pipeline approve <id> announce

Error Handling

Missing artifact:

code
Error: Cannot advance feat-001 from discovery to spec
Reason: No artifact found at briefs/feat-001-vm-snapshots.md
Action: Invoke product-discovery to complete discovery phase

Unresolved handoff:

code
Warning: Artifact has unresolved open questions
Open Questions:
  - Should snapshots count against storage quota?
  - What's the retention policy for automated snapshots?
Action: Resolve questions before advancing, or use --force to proceed

Gate not approved:

code
Blocked: feat-001 requires human approval at spec gate
Status: Spec artifact complete, awaiting approval
Action: Review spec and run `/pipeline approve feat-001 spec`

Context Discovery

Before executing any command:

  1. Read .claude/pipeline/state/ to understand current pipeline states
  2. Read relevant artifacts for the feature being operated on
  3. Check .claude/service-profile.md for service context
  4. Reference pipeline-conductor/SKILL.md for stage requirements

Integration with Agents

When invoking agents, pass the feature context:

code
Invoke api-dev with:
- Feature ID: feat-001
- Design artifact: .claude/pipeline/designs/feat-001-vm-snapshots.md
- Service profile: .claude/service-profile.md

Agents should read the handoff header from upstream artifacts to understand context, decisions made, and open questions.