feat(pipeline): Add software lifecycle harness — requirements → design → spec#6
Open
ATMackay wants to merge 1 commit into
Open
feat(pipeline): Add software lifecycle harness — requirements → design → spec#6ATMackay wants to merge 1 commit into
ATMackay wants to merge 1 commit into
Conversation
…n → spec
Introduces a pipeline orchestration system that drives a software project
from natural language requirements through structured PRD, technical design,
and implementation task list, with human approval gates between each stage.
New packages:
- agents/requirements: RequirementsAnalyzer agent that transforms informal
requirements into an IEEE 830-style PRD (user stories, acceptance criteria,
NFRs, success metrics, open questions).
- agents/architect: Architect agent that produces a C4-inspired technical
design document (components, API contracts, data models, tech choices) and
a TDD-framed implementation task list. Runs as two distinct stages.
- pipeline: Sequential stage orchestrator with:
- YAML-driven pipeline spec (.pipeline.yaml) generated by 'pipeline init'
- File-persisted state (.pipeline-state/<name>.json) enabling resume after
failure or interruption via --from-stage
- Interactive human approval gates ([y]es/[e]dit/[n]o/[q]uit) with
artifact preview and $EDITOR support; skippable with --yes-all
New CLI commands under 'agent pipeline':
init Generate a pre-populated .pipeline.yaml spec from flags
run Execute the pipeline; supports --from-stage and --yes-all
status Tabular view of stage completion with timestamps and output paths
State constants for the two new agents are added to state/state.go.
go.yaml.in/yaml/v3 is promoted from indirect to direct dependency.
Architecture is forward-compatible: adding V2 (Claude Code subprocess for
implementation) or V3 (git commit + PR for delivery) requires only extending
the newAgentForKind() switch in pipeline/pipeline.go — no orchestration
changes needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
This PR introduces a software lifecycle harness to the agent CLI — a pipeline orchestration system that takes natural language requirements from a user and drives them through structured, AI-generated artefacts with human review gates between each stage.
The goal is to automate the front-end of the software delivery pipeline: from a raw idea to a production-ready technical specification that is immediately actionable by an implementation agent (or a human developer).
How it works
A pipeline is defined in a declarative YAML spec (
.pipeline.yaml) and executed stage-by-stage. Each stage runs a specialised LLM agent. After each stage completes, the user reviews the output and chooses to proceed, edit the artefact in$EDITOR, re-run the stage, or quit.Pipeline state is persisted to
.pipeline-state/<name>.jsonafter every stage, so interrupted runs can be resumed with--from-stage <id>without re-running completed work.New CLI commands
Example
pipeline statusoutput:New packages
agents/requirements— RequirementsAnalyzerTransforms informal requirements into a structured PRD containing:
If a
work_diris provided, the agent explores the existing codebase first to incorporate real constraints (tech stack, existing conventions, known limitations) into the document.agents/architect— ArchitectRuns twice in the default pipeline with different tasks:
Task
design— reads the PRD and produces a Technical Design Document:Task
tasks— reads the design doc and produces an Implementation Task List:pipeline— Stage Orchestratorconfig.goLoadConfig(),DefaultConfig(),Marshal()state.goPipelineState/StageState;LoadState(),Save()gate.go$EDITORintegrationpipeline.goPipeline.Run()— sequential executor, stage dispatch, resume logicDesign decisions
Persistent file-based state (
.pipeline-state/) rather than in-memory ADK session state — survives CLI restarts, gives users visibility into what ran, and enables--from-stageresumption without re-incurring LLM cost for completed stages.Stage outputs are plain markdown files on disk — human-readable, editable before the next stage consumes them, and naturally version-controlled alongside the project.
Human gates are first-class — the
[e]ditoption lets users correct the agent's output in their editor before the next stage reads it. This is the key mechanism for keeping humans in the loop without breaking the automation flow.Forward-compatible stage dispatch — adding V2 (Claude Code subprocess for implementation) or V3 (git commit + PR for delivery) requires only a new
caseinpipeline.Pipeline.runStage()and a new agent/runner package. No orchestration changes needed.Testing
pipeline/config_test.go— YAML round-trip, validation of required fieldspipeline/state_test.go— save/load, directory creation, data integrityagents/requirements/config_test.go— Config.Validate() table-driven testsagents/architect/config_test.go— Config.Validate() including invalid task valuesAll existing tests (
model,tools) continue to pass.