SP

spec-code-pipeline

Runs a strict Spec-to-Code pipeline for specific modules with automated quality gate scoring.

Install

mkdir -p .claude/skills/spec-code-pipeline && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12902" && unzip -o skill.zip -d .claude/skills/spec-code-pipeline && rm skill.zip

Installs to .claude/skills/spec-code-pipeline

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run the repo-local Spec -> Matrix -> Tasks -> Plan -> Prompt -> Code workflow for one module, with stage gates and agent routing.
129 charsno explicit “when” trigger
Advanced

Key capabilities

  • Run a complete development workflow for one module
  • Enforce stage-gate scoring at every step
  • Generate traceability, tasks, implementation plan, task prompt, and code
  • Route failures back to the current stage executor for repair
  • Escalate failures to upstream stages if repeated

How it works

This skill executes a sequential workflow (Spec -> Matrix -> Tasks -> Plan -> Prompt -> Code) for a single module, where each stage is followed by a gate that requires a composite score of 98 or higher from multiple AI models and a rules engine.

Inputs & outputs

You give it
A module identifier, optionally with a starting stage
You get back
Implemented code for the module, with traceability and status updates, or a `pipeline_blocked` report

When to use spec-code-pipeline

  • Implementing a new module based on a spec
  • Running an end-to-end development pipeline
  • Ensuring consistent code quality through automated gating

About this skill

Spec Code Pipeline

Use this skill when the user asks for a complete development workflow, "开发工作流", "完整管线", or explicitly names:

Spec -> Matrix -> Tasks -> Plan -> Prompt -> Code

The workflow target is one module under module/{module}/. It turns an approved module spec into traceability, tasks, implementation plan, task prompt, and one bounded code execution.

Invocation

$spec-code-pipeline {module}
$spec-code-pipeline {module} --from matrix
$spec-code-pipeline {module} --stage prompt

Chinese trigger equivalents:

完整工作流 {module}
开发工作流 {module}
Spec 到 Code {module}

Canonical Flow

Spec -> Matrix -> Tasks -> Plan -> Prompt -> Code

Expanded repo gate sequence (每个 executor 后都接 四源团队评分 + 仲裁):

spec
  -> [spec-team-score: claude + codex + copilot + rules-engine]
  -> pipeline-arbiter  (gate: composite_score = min(claude.score, codex.score, copilot.score, rules.score) >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内)
  -> 自动翻转 Status: Approved
  -> matrix
  -> [matrix-team-score] -> pipeline-arbiter (gate)
  -> task-split
  -> [tasks-team-score] -> pipeline-arbiter (gate)
  -> task-planner
  -> [plan-team-score] -> pipeline-arbiter (gate)
  -> prompt-builder
  -> [prompt-team-score] -> pipeline-arbiter (gate)
  -> task-executor
  -> [code-team-score] -> pipeline-arbiter (gate)

每个阶段必须满足(唯一门禁):

  • composite_score = min(claude.score, codex.score, copilot.score, rules.score)
  • composite_score >= 98
  • 无任一评分源红线
  • 无任一 LLM 平台低置信度,且三 LLM 平台分差不超过阈值
  • rules.score 与三 LLM 中位数的异构分歧不超过阈值

Confidence 与分差属于 gate 条件,不能被忽略或人工豁免。失败一律自动路由回当前阶段 executor 或 scorer 修复;同阶段 3 次失败自动升级到上一阶段;上游再失败继续向上直到 spec。修复循环必须有界:默认 max_stage_attempts = 3max_total_gate_failures = 18。达到全链路上限后输出 pipeline_blocked 和 retrospective,不得无限循环。

Workflow self-improvement is allowed only as bounded RSI: create docs/governance/improvements/{YYYYMMDD}-{slug}/SPEC.md, run the same Spec -> Matrix -> Tasks -> Plan -> Prompt -> Code gates, and obey CONSTITUTION.md §14 for protected files.

详见 docs/governance/STRUCTURAL-SCORING.mddocs/governance/scoring/ARBITER-PROTOCOL.md

Stage Contract

StageExecutorTeam Scorers (并行)Gate(唯一)
Specspecclaude / codex / copilot spec-structural-score + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内
Matrixmatrixmatrix-structural-score × 3 + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内
Taskstask-splittasks-structural-score × 3 + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内
Plantask-plannerplan-structural-score × 3 + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内
Promptprompt-builderprompt-structural-score × 3 + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内
Codetask-executorcode-structural-score × 3 + rulescomposite_score >= 98 且无红线、无 LLM 低置信度、LLM 分差与 rules 异构分歧在阈值内

Arbiter agent:pipeline-arbiter(三运行时均有等价实现,结果等价)。 状态目录由运行时决定:

  • Claude:.omc/state/pipeline/{module}/{stage}/{scores/,verdict.json,attempts.json}
  • Codex:.omx/state/pipeline/{module}/{stage}/{scores/,verdict.json,attempts.json}
  • Copilot:.copilot/state/pipeline/{module}/{stage}/{scores/,verdict.json,attempts.json}

每个阶段在三 LLM 评分后、调用 arbiter 前,必须运行规则引擎评分:

python3 scripts/rule-scorer.py <stage> <module> --runtime <claude|codex|copilot>
# 默认读取 SPEC_PIPELINE_RUNTIME;未设置时写入 .omc/state/pipeline/<module>/<stage>/scores/rules.json

rules.json 是宪法 §14.4 要求的异构第 4 源;arbiter 期望 4 个 scores/*.json 文件齐全。

Execution Rules

  1. Work one module at a time.
  2. Do not code from a Draft spec.
  3. Every stage must pass team-scoring gate (composite_score = min(claude.score, codex.score, copilot.score, rules.score) >= 98, no redline, no LLM low confidence, bounded LLM score spread, heterogeneous divergence <= 15) before advancing. This is the only gate.
  4. Every stage uses an agent team: executor + 3 LLM scorers + rule-scorer.py + pipeline-arbiter.
  5. Do not skip Matrix or Tasks before Plan.
  6. Do not ask task-executor to implement more than one task unless the user explicitly requests a batch.
  7. When using --stage, verify upstream artifacts AND upstream verdicts (verdict.json gate=pass) exist first.
  8. When using --from, resume from that stage; downstream verdict.json and scores/ must be re-generated.
  9. Update TRACEABILITY.md and task status after each code task.
  10. Never bypass scoring gate by editing verdict.json manually. There is no human override path.
  11. Enforce bounded RSI: after 3 failed attempts in one stage, escalate upstream; after 18 total gate failures, write pipeline_blocked plus PIPELINE-RETROSPECTIVE.md and stop automatic advancement.
  12. Do not modify protected workflow/rubric/agent/arbiter files through normal repair routing. Open a workflow-improvement spec and apply CONSTITUTION.md §14.

Repair Routing

  • Missing or incomplete spec structure: route to spec.
  • Structural redline at any stage: route to that stage's executor.
  • Broken FR/AC/TC chain: route to matrix.
  • Overlarge or cross-module task: route to task-split.
  • Ambiguous execution order: route to task-planner.
  • Missing implementation context: route to prompt-builder.
  • Code/test failure: keep scope in current task and route to task-executor.

State

Per-stage state under:

{state_root}/pipeline/{module}/{stage}/
├── scores/
│   ├── claude.json   ├── claude.md
│   ├── codex.json    ├── codex.md
│   ├── copilot.json  ├── copilot.md
│   └── rules.json
├── verdict.json      # arbiter output (gate=pass|fail)
└── attempts.json     # retry counter & escalation chain

Top-level pipeline state:

{state_root}/pipeline/{module}.json
{state_root}/pipeline/{module}/repair-budget.json
{state_root}/pipeline/{module}/pipeline_blocked.json
module/{module}/PIPELINE-RETROSPECTIVE.md

Final Report

End with:

  • current stage and completed stages
  • created or updated artifacts
  • active task, if code started
  • validation evidence
  • blockers or remaining gates

When not to use it

  • When working on multiple modules simultaneously
  • When the user wants to code from a Draft spec
  • When the user wants to bypass scoring gates manually

Limitations

  • Works on one module at a time
  • Requires a `composite_score` of at least 98 for each stage to advance
  • Has bounded repair loops: `max_stage_attempts = 3`, `max_total_gate_failures = 18`

How it compares

This skill enforces a rigorous, automated stage-gate process with multiple AI scorers and a rules engine for quality assurance, which is more structured and less prone to manual errors than a typical development workflow.

Compared to similar skills

spec-code-pipeline side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
spec-code-pipeline (this skill)02moReviewAdvanced
agent-factory89moReviewAdvanced
subagent-driven-development147moNo flagsAdvanced
continuous-learning-v2102moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

agent-factory

alirezarezvani

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

8109

subagent-driven-development

davila7

Use when executing implementation plans with independent tasks in the current session

1493

continuous-learning-v2

affaan-m

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

1060

agent-skill-creator

FrancyJGLisboa

This enhanced skill should be used when the user asks to create an agent, automate a repetitive workflow, create a custom skill, or needs advanced agent creation capabilities. Activates with phrases like every day, daily I have to, I need to repeat, create agent for, automate workflow, create skill for, need to automate, turn process into agent. Supports single agents, multi-agent suites, transcript processing, template-based creation, and interactive configuration. Claude will use the enhanced protocol to research APIs, define analyses, structure everything, implement functional code, and create complete skills autonomously with optional user guidance.

441

vibe-build

KhazP

Build your MVP following the AGENTS.md plan. Use when the user wants to start building, implement features, or says "build my MVP", "start coding", or "implement the project".

45

swarm-coordination

joelhooks

Multi-agent coordination patterns for OpenCode swarm workflows. Use when work benefits from parallelization or coordination.

04

Search skills

Search the agent skills registry