Reconcile loop
A reconcile loop is a loop in which a system keeps comparing the desired state with the actual one and brings the second to the first. Kubernetes works this way: manifests or a Helm chart describe which services must run, and a controller keeps checking that against the cluster and starts what is missing. Spec-Driven Development is the same: the desired state is the spec, the actual one is the code, and the agent brings the code to the spec.
Reconcile loop: Kubernetes and the agent
| Kubernetes | Spec-Driven Development | |
|---|---|---|
| Desired | manifests, a Helm chart | the spec |
| Actual | services in the cluster | code in the repository |
| Who compares | a controller | the agent |
| What it does on a mismatch | starts or removes pods | edits code until tests and spec agree |
| How to change the system | edit the manifest, not the cluster | edit the spec, not the code |
Frequently asked questions
What is a reconcile loop?
A loop where a system keeps comparing the desired state with the actual one and brings the actual state in line.Where does a reconcile loop run?
For example, in Kubernetes: manifests describe which services must run, and controllers bring them up.Source: Kubernetes: Controllers
Where it appears · 5
- AI agent maturity levels · Specs and context
- What is OpenSpec, setup and commands · Specs and context
- How to find a race condition in code · Specs and context
- A reconcile loop for specs · Specs and context
- Specs by aggregate · Specs and context