Spec-Driven Development Pipeline

Automated software development lifecycle powered by 5 AI agents

11
Pipeline Stages
5
AI Agents
3
Manual Gates
100%
Traceable

Executive Summary

The Spec-Driven Development Pipeline transforms how software gets built. Instead of manual coding, you create a GitLab issue describing what you need. The pipeline automatically triages, clarifies requirements, generates formal specifications, creates implementation plans, breaks them into tasks, implements code, runs security checks, executes tests, and deploys - all with human approval gates at critical points.

How it works: Create an issue with acceptance criteria. The pipeline uses 5 specialized AI agents (PM, Architect, Security, Developer, QA) to process it through 11 stages. You review and approve at key checkpoints. Artifacts are stored in specs/issue-{ID}/ for full traceability.

Human Workflow: Creating Cards

Before cards enter the pipeline, humans run these 5 sequential steps to shape, define, plan, and create work items.

Step Purpose Output
Step 0: Shape Requirements Turn a rough idea into clear, structured requirement text ready for /createsolution Clean requirement description (the "ask")
/createsolution AI Review Board brainstorms and produces a consolidated solution design Solution document with executive presentation
/createplan AI Review Board creates implementation plan with agent assignments Phased plan with tasks, dependencies, deliverables
/executeplan Creates GitLab project/board from solution and plan artifacts Trackable issue cards on Kanban board
/gitlab-board Processes board columns, executes work on ready cards Completed work with AI self-validation

Step 0: Three Ways to Shape Requirements

Before running /createsolution, you need clear requirement text. Choose the approach that fits your starting point:

Approach Best When What It Does
/feature-forge You have a new idea but haven't written it down yet Interactive CLI skill that interviews you to extract requirements, user stories, and acceptance criteria
/spec-miner You have existing code that needs documentation or a rewrite spec Analyzes existing implementations to extract specifications from running systems
Spec Review (Open WebUI) You have a draft spec and want conversational refinement Chat with the "Spec Review" agent in Open WebUI to iteratively sharpen requirements through dialogue

All three produce requirement text that feeds directly into /createsolution as the input "ask".

Human Controls Priority

You run any combination of steps 0-3 depending on the work — small tasks may skip straight to /executeplan, while larger efforts benefit from the full sequence. You move cards to ready to prioritize. AI picks up ready cards via step 4, executes autonomously, and stages completed work in done for your final review.

Pipeline Flow (Per Card)

1 Triage PM
2 Clarify PM
3 Specify Architect
4 Checklist QA
5 Plan Architect
6 Tasks Developer
7 Analyze QA
8 Implement Developer
9 Security Security
10 Testing QA
11 Deploy Developer

Manual Gates (Yellow Stages)

Three stages require human approval before proceeding: Specification (approve the spec), Implementation (approve the plan), and Deployment (approve for production). This ensures human oversight at critical decision points.

AI Agents

PM
PM Agent
Triage & Clarification
AR
Architect
Specs & Planning
SC
Security
Security Review
DV
Developer
Implementation
QA
QA Agent
Testing & Validation

Each agent specializes in specific stages and uses Claude Code CLI for execution.

Documentation

Operations

Day-to-day procedures for running and troubleshooting the pipeline.

Architecture

System design, component interactions, and technical decisions.

Getting Started

Guides for developers using the pipeline.

Monitoring

Dashboards and alerts for pipeline observability.

Quick Reference

Trigger a Pipeline

Via CLI:

glab ci run --branch main --variables "ISSUE_IID:123"

Via API:

curl -X POST "https://gitlab.ai-servicers.com/api/v4/projects/18/trigger/pipeline" -F "token=$GL_TRIGGER_TOKEN" -F "ref=main" -F "variables[ISSUE_IID]=123"

Key Resources

Resource URL
GitLab Project gitlab.ai-servicers.com/administrators/cicd
Kanban Board Board #2
Pipelines CI/CD Pipelines
Grafana Dashboard grafana.ai-servicers.com/d/cicd/
Matrix Room #cicd-notifications

Labels

Board columns

Agent assignment

Type & priority

Complexity & phase

Board Workflow Enforcement

Approval Section Required: A Claude Code hook enforces that all cards must have the standard approval section before being moved to review.

Required card footer:

### Approval
- [ ] **Read comment** ← Check if you have feedback for AI
- [ ] Work complete and verified

Why? Without the approval checkbox, humans have no way to signal they've reviewed. Cards get stuck in review with no clear next step.

If blocked: Add the approval section to the issue description, or move directly to done (skip review).

System Architecture

flowchart TB subgraph Visibility["Layer 4: Visibility"] Board["GitLab Kanban Board"] end subgraph Orchestration["Layer 3: Orchestration"] Pipeline["GitLab CI/CD Pipeline
(11 stages)"] end subgraph Methodology["Layer 2: Methodology"] SpecKit["Spec-Kit: clarify → specify → plan → implement"] end subgraph Execution["Layer 1: Execution"] Agents["Claude Code CLI
5 AI Agents"] end subgraph Infrastructure["Layer 0: Infrastructure"] GitLab["GitLab"] MCP["MCP Proxy"] Postgres["PostgreSQL"] Matrix["Matrix"] Grafana["Grafana"] end Board --> Pipeline Pipeline --> SpecKit SpecKit --> Agents Agents --> Infrastructure style Visibility fill:#21262d,stroke:#58a6ff style Orchestration fill:#21262d,stroke:#a371f7 style Methodology fill:#21262d,stroke:#3fb950 style Execution fill:#21262d,stroke:#d29922 style Infrastructure fill:#21262d,stroke:#8b949e