---
type: Concept
title: The SDLC Loop
description: The closed agent-driven software development lifecycle PMOS orchestrates — spec, contract, build, evaluate, accept, learn — and how it loops.
tags: [sdlc, loop, orchestration, lifecycle]
timestamp: 2026-06-28
---

# The SDLC Loop

**Situating context:** PMOS is a control plane for an AI-driven SDLC, so it needs one shared picture
of the loop it controls. This concept defines that loop and names each stage, so skills, gates, and
AGENTS.md all refer to the same lifecycle. It informs how initiatives flow from
[OKR](/okf/core/concepts/okr-tree.md) to accepted work and back into knowledge.

## The loop

PMOS drives a closed lifecycle. Each turn of the loop moves one initiative through six stages:

```
            ┌──────────────────────────────────────────────────┐
            ▼                                                    │
   1. SPEC ──► 2. CONTRACT ──► 3. BUILD ──► 4. EVALUATE ──► 5. ACCEPT ──► 6. LEARN
   (PRD)       (pre-run        (agent       (3-tier         (PM,          (OKF +
               contract)        run)         gate)           Acceptance    discoveries)
                                                             Gate)
```

1. **Spec** — the initiative gets a PRD via the [prd skill](/skills/prd.skill). The PRD says
   what to build and why, anchored to a KR in the [OKR tree](/okf/core/concepts/okr-tree.md) —
   or, for maintenance work, a declared [health budget](/okf/core/concepts/health-anchors.md) (D59).
2. **Contract** — generator and evaluator agree a **pre-run contract**: testable done-criteria,
   before any work starts. The PM approves it. (P0: temp file + PM approval; P1+:
   `agent_runs.pre_run_contract`.)
3. **Build** — the agent executes the run against the contract. One execution = one agent run.
4. **Evaluate** — output passes through the [three-tier eval gate](/okf/core/concepts/output-eval.md):
   Quality Gate → Review Gate → Acceptance Gate.
5. **Accept** — the PM clears the **Acceptance Gate**: is this the *right* thing, strategically?
   This is a human decision, not a rubric re-check.
6. **Learn** — outcomes and friction are written back: agent run logged, discoveries captured,
   durable knowledge promoted into [OKF](/okf/core/concepts/okf-governance.md). The loop closes and
   the next initiative begins with more context than the last.

## Why it is a loop, not a pipeline

The sixth stage feeds the first. Each turn deposits knowledge (concepts, calibration data, friction
notes) that sharpens the next spec and tightens the next contract. A pipeline ends; this loop
compounds. The compounding is the point — it is how the harness gets better without the model
changing.

## The PM sits on the loop, not inside every step

PMOS automates stages 1–4 and 6 with agents; the PM's irreducible position is **stage 5**, the
Acceptance Gate. As autonomy rises (L2 → L3), more of the loop runs without per-step PM
intervention, but acceptance authority never leaves the human. Designing the loop so the PM can
always re-enter at stage 5 is what keeps autonomy safe.

## Failure mode the loop defends against

A loop that reports green at stages 3–4 while drifting from the stage-1 intent is **silent drift**
(see [watermelon-flag](/okf/core/concepts/watermelon-flag.md)). The Acceptance Gate and
[anti-optimism reporting](/okf/core/concepts/okr-anti-optimism.md) are the structural checks that
keep the loop honest turn over turn.

## Relationship to other concepts

- The loop is what the [control plane](/okf/core/concepts/control-plane.md) controls.
- Each run executes inside an [agent harness](/okf/core/concepts/agent-harness.md).
- The whole loop is run in an [eval-driven](/okf/core/concepts/eval-driven-pm.md) style: the eval
  is written before the build.
