Spec 1.0: This example uses the current stable portable core release.Use this when a project already has code, tests, and docs, but intent is unclear.
Goal
Establish current truth for one critical part of the system without trying to rewrite the whole repo.Start with current behavior
In a brownfield repo, the first spec should describe what the system actually does now. Do not start with the ideal future design. That creates confusion fast, especially when the code, tests, and docs already disagree.High-level walkthrough
- Pick one critical area first, not the whole repo.
- If you are entering an existing repo or branch, get context first. In
specled_ex, that ismix spec.prime --base HEAD. - Read the current code, tests, and docs together.
- Write a subject spec that matches shipped behavior and known constraints.
- Point verification at the evidence that already exists.
- Use the guided reconcile step for your stack to see whether the current change lands in covered territory or on the uncovered frontier. In
specled_ex, that ismix spec.next. - Run the local coverage summary to surface missing coverage and weak spots. In
specled_ex, that ismix spec.status. - Tighten one gap at a time.
Prompt you can give an agent
What a good first slice looks like
- one module with unclear behavior
- one workflow that crosses several files
- one package surface that agents tend to change
- one area where docs and tests already drift
What to verify first
- every requirement should have at least one verification path
- every important scenario should map to current evidence
- current docs should not contradict the new current-truth spec
Avoid
- trying to specify the whole repo in one pass
- writing aspirational behavior that has not shipped
- changing runtime behavior before the baseline is clear
- treating every uncovered file as equally important
Good outcome
You know the brownfield adoption is working when:- the first subject matches real behavior
- the repo can prove at least some of that behavior
- the next gaps are visible instead of hidden
- the team can deepen the coverage gradually without stopping delivery