How ai-sdlc-framework/ai-sdlc works
1. Overall shape
This is a multi-package monorepo for an AI workflow governance/execution framework. The repository is organized around a normative specification layer, a runtime/orchestration layer, a Claude Code plugin surface, several language SDKs, a reference implementation, and supporting docs/CI. The central architectural idea is: spec-first contracts are admitted, executed by agents, reviewed, attested, and monitored.
2. Normative spec and schemas
spec/ is the source of truth for the domain model: pipelines, agent roles, quality gates, autonomy policy, adapter bindings, decisions, attestation envelopes, dispatch sessions, DOR config, embeddings, journeys, and related resources. spec/rfcs/ captures the architectural decisions and the evolution path; spec/schemas/ contains JSON Schemas that define the wire format and validation boundary for the rest of the system. Everything else in the repo is effectively an implementation, adapter, or operationalization of this spec.
3. Primary runtime: orchestrator
orchestrator/ is the main control-plane library/CLI for admission, dispatch, state, policy, and runtime coordination. It contains:
- task and backlog adapters
- admission/compliance/priority evaluation
- dependency and multi-repo analysis
- worktree and parallelism management
- runner registries for agent harnesses
- state store, telemetry, audit, and notification plumbing
- CLI commands for init/run/status/validate and related workflows
This is the place where “what should happen next?” is decided and where tasks are filtered before agent execution.
4. Pipeline execution engine
pipeline-cli/ is the stepwise execution engine for the task lifecycle. It exposes many CLI entrypoints, but its core flow is the Step 0–13 pipeline: sweep, validate, compute branch, create worktree, flip status, build prompts, parse agent return, collect reviewer verdicts, iterate, finalize, late rebase, push/PR, sibling PR handling, and cleanup. It also contains dedicated subsystems for:
- attestation signing/verifying
- definition-of-ready checks
- incremental review
- orchestrator loop and filters
- dispatch supervision and worker/session tracking
- terminal TUI and analytics
This package is the “execution plane” beneath the orchestrator.
5. Claude Code plugin and MCP integration
ai-sdlc-plugin/ is the user-facing integration layer for Claude Code. It provides slash commands, hooks, agent role definitions, and an MCP server. Its job is to connect the framework to the interactive assistant environment: enforce pre/post actions, route task edits/completions through the right MCP tools, and expose governance-aware commands like execute, triage, rebase, review, and init-signing-key. This is the main boundary between human/operator interaction and the framework’s internal control plane.
6. Agent harnesses and multi-runner support
The system is explicitly agent-agnostic. Runtime code in orchestrator/src/runners/ and pipeline-cli/src/runtime/spawners/ supports multiple execution harnesses such as Claude, Codex, Copilot, Cursor, and generic LLM backends. The architecture treats the agent harness as a pluggable execution substrate, while the framework itself owns admission, prompt construction, output parsing, and verification. Cross-harness review is a first-class boundary: different harnesses are intentionally used for implementation vs. review to preserve independence.
7. Worktree isolation and git-backed execution
Task execution is isolated through git worktrees and branch management. The pipeline/orchestrator create per-task workspaces, track active runs, manage parallelism, and clean up or recover interrupted work. This repo is heavily concerned with avoiding cross-task contamination, stale state, and branch/rebase failure modes. In diagrams, this is a critical boundary between the canonical repo checkout and ephemeral task-specific execution worktrees.
8. Proof, attestation, and security chain
DSSE attestations are a major architectural subsystem. The framework signs reviewer outcomes and execution results, and verification is enforced in CI and supporting scripts. The attestation flow is tied to PR gating and to “proof of execution” semantics: work is not just produced, it is cryptographically sealed and later validated. Security-related support includes secret redaction, trust-chain checks, reviewer independence, and GitHub workflow enforcement.
9. State, artifacts, and event streams
The system persists a mix of structured and semi-structured artifacts:
- JSONL event logs under .ai-sdlc/, pipeline-cli/_artifacts/, and related capture directories
- backlog tasks and decisions as markdown/YAML
- attestation envelopes as DSSE JSON
- TUI analytics and operator decision records
- state store and snapshot data inside runtime packages
The main data flow is from spec/backlog/task inputs → orchestration events/captures → agent outputs/reviews → attestation and state updates → dashboards/TUI/CI gates.
10. Operator-facing surfaces
There are two main operator surfaces: the Claude Code plugin commands/hooks and the operator TUI in pipeline-cli/src/tui/. The TUI aggregates live state from backlog files, orchestrator events, dependency snapshots, PR cache, and analytics readers into panes for decisions, blockers, PRs, critical path, configuration, and metrics. This is not just observability; it is the control surface for governance and triage.
11. SDKs and portability layer
sdk-typescript/, sdk-python/, and sdk-go/ provide portable API surfaces that mirror the same core concepts: adapters, agents, audit, builders, compliance, core validation, metrics, policy, reconciler, security, and telemetry. sdk-go/operator/ also includes Kubernetes-style CRDs and controller code, which makes the architecture deployable in operator-managed environments. These SDKs are the cross-language embodiment of the spec and are useful diagram nodes for consumers who embed the framework rather than use the monorepo directly.
12. Reference implementation and examples
reference/ is a large TypeScript reference implementation spanning adapters, agents, audit, policy, reconciler, security, metrics, and telemetry. It appears to serve as a canonical design playground and comparison layer for the spec. conformance/ contains language-agnostic behavioral tests and fixtures that validate implementations against the spec. Together, they define the compatibility boundary for any adapter, policy engine, or agent runtime.
13. External integrations and ecosystem
The repo integrates with GitHub Actions, Slack/Teams notifications, issue trackers, CI systems, and multiple developer tools. The contrib/adapters/ tree shows the framework’s intended adapter ecosystem for systems like Jira, GitLab, Bitbucket, HubSpot, Salesforce, Zendesk, SonarQube, and Semgrep. Operational scripts and workflows enforce branch protection, issue-link requirements, backlog drift checks, attestation verification, release signing, and auto-rebase behaviors.
14. How the main end-to-end flow fits together
The cleanest architecture diagram is a left-to-right flow:
- Spec and backlog inputs enter through schemas, RFCs, tasks, and DOR checks.
- Orchestrator admission filters work by readiness, dependency state, in-flight status, and policy.
- Pipeline execution creates an isolated worktree, dispatches a developer harness, runs reviewers, and iterates.
- Attestation and verification seal the result and gate merge/PR progression.
- Monitoring/analytics/TUI consume events, captures, and state snapshots for operator oversight.
- SDKs/reference/conformance define the portable contract and keep implementations aligned.
That is the core architecture this repository implements.
Main entry points: orchestrator.ts Orchestrator · spec.md Spec core · execute-pipeline.ts Pipeline CLI · schemas Schemas
Components 23
Spec
Normative contracts, schemas, and RFCs.
Runtime
Admission, orchestration, execution, attestation, and control loops.
- Orchestrator · Admissions, policy, dependency analysis, state, runners, notifications, and CLI coordination.
orchestrator/src/orchestrator.ts - Admission · Readiness, dependency, in-flight, blocked, and DOR-based filtering before dispatch.
orchestrator/src/admission.ts - Analysis · Diff, dependency, hotspot, pattern, and context analysis used by scoring and dispatch.
orchestrator/src/analysis - Runners · Pluggable execution harnesses for Claude, Codex, Copilot, Cursor, and generic LLM backends.
orchestrator/src/runners - Worktrees · Per-task worktree, branch, and parallelism management for isolated execution.
orchestrator/src/runtime/worktree-pool.ts - Pipeline CLI · Stepwise Step 0–13 task lifecycle engine for dispatch, review, attestation, and cleanup.
pipeline-cli/src/execute-pipeline.ts - Pipeline steps · Sweep, validate, branch, worktree, prompt, parse, review, iterate, finalize, rebase, push, sibling PRs, cleanup.
pipeline-cli/src/steps - Dispatch · Session tracking, worker recommendation, supervisor loop, and active run management.
pipeline-cli/src/dispatch - Attestation · DSSE signing, Merkle/transcript capture, envelope verification, and PR gating.
pipeline-cli/src/attestation - DoR gate · Entry checks that evaluate issue/task readiness, scope, references, done-state, and dependencies.
pipeline-cli/src/dor
Surfaces
Human and assistant-facing entry points.
- Operator TUI · Terminal dashboard for blockers, PRs, critical path, configuration, and analytics.
pipeline-cli/src/tui - Claude plugin · Slash commands, hooks, roles, and MCP server for Claude Code governance workflows.
ai-sdlc-plugin - Dashboard · Web-based analytics and operator pages for runs, DOR, audit, autonomy, codebase, and cost.
dashboard/src/app
SDKs
Portable language bindings and reference implementations.
- TypeScript SDK · Cross-language TypeScript surface mirroring adapters, agents, policy, compliance, reconciler, and telemetry.
sdk-typescript/src - Python SDK · Python bindings for the same core concepts and validation model.
sdk-python/src/ai_sdlc - Go SDK · Go bindings plus operator-oriented APIs and CRDs for deployment-managed environments.
sdk-go - Reference impl · Large TypeScript reference architecture spanning adapters, agents, policy, security, metrics, and reconciliation.
reference/src - Conformance · Language-agnostic behavioral fixtures and runner validating implementations against the spec.
conformance/tests
Ops
Governance, docs, CI, and supporting automation.
- Scripts & CI · Pre-push, attestation, drift, DOR, release, and workflow enforcement scripts plus GitHub Actions.
scripts - Backlog & state · Backlog tasks, decisions, captures, state artifacts, and attestation/event stores used by the runtime.
backlog
Connections 30
- Spec core → Schemas: defines · Spec materializes as JSON schemas and wire contracts.
- RFCs → Spec core: evolves · RFCs explain and extend the normative model.
- Spec core → Orchestrator: admitted by · Orchestrator consumes the spec to decide what can run.
- Schemas → Claude plugin: validates · Plugin/MCP payloads are shaped by schema contracts.
- Schemas → Pipeline CLI: validates · Pipeline artifacts and envelopes are validated against schemas.
- Backlog & state → DoR gate: feeds · Tasks and captured state are checked for readiness.
- DoR gate → Admission: primes · DoR output becomes an admission signal.
- Analysis → Admission: scores · Dependency and complexity analysis informs readiness and priority.
- Admission → Orchestrator: routes · Only admissible work enters orchestration.
- Orchestrator → Runners: dispatches · Orchestrator selects a harness and agent role.
- Orchestrator → Worktrees: isolates · Task execution is placed into worktree/branch sandboxes.
- Orchestrator → Pipeline CLI: invokes · Orchestrator can hand off to the stepwise execution engine.
- Pipeline CLI → Pipeline steps: executes · Core lifecycle is implemented as ordered pipeline steps.
- Pipeline CLI → Dispatch: supervises · Dispatch board, sessions, and worker coordination live here.
- Pipeline steps → Attestation: seals · Execution and reviewer outcomes are signed and verified.
- Attestation → Scripts & CI: gated by · CI and helper scripts enforce attestation verification.
- Pipeline CLI → Operator TUI: reports · Live state and analytics are surfaced to operators.
- Orchestrator → Operator TUI: observed by · Operator TUI consumes orchestrator events and snapshots.
- Claude plugin → Pipeline CLI: drives · Claude commands and MCP tools initiate execution workflows.
- Claude plugin → Orchestrator: queries · Plugin surfaces governance-aware status and triage context.
- Dashboard → Backlog & state: reads · Web UI aggregates backlog, run, and decision data.
- Dashboard → Attestation: shows · Dashboard exposes proof and audit state.
- TypeScript SDK → Spec core: mirrors · TypeScript SDK embodies the same core concepts.
- Python SDK → Spec core: mirrors · Python SDK embodies the same core concepts.
- Go SDK → Spec core: mirrors · Go SDK embodies the same core concepts.
- Reference impl → Spec core: implements · Reference code is a canonical implementation playground.
- Conformance → Schemas: checks · Fixtures validate implementations against schema and behavior.
- Conformance → Reference impl: compares · Reference implementation serves as a conformance target.
- Scripts & CI → RFCs: enforces · Repo automation checks RFC/docs and lifecycle rules.
- Scripts & CI → Backlog & state: maintains · Scripts manage drift, task movement, and release hygiene.