AI-First Development
Two implementation lines from one spec, and the contracts each keeps
Florete is built by two permanent implementation lines from one spec — everything people write down for its code to be built from. On the decision-driven line (DD) people decide, and agents generate code under their supervision. On the spec-driven line (SD) agents decide whatever the spec leaves open, in three roles: one generates the code, one reviews every change before it merges, and one keeps the contracts people delegate — the interfaces code is held to — so that the system stays evolvable while its code is regenerated. Neither replaces the other: we release first and build afterwards, SD holding the leading edge and DD following behind it, so the frontier between them — how much of the product DD holds — moves and never closes.
If you are proposing a change, Working on Florete says where it goes and what it carries — all most contributors need. Whoever changes or implements the process reads the Shape, a map of how it runs, and the Decision Log, which records each rule with its reasons and the alternatives it rejected. Neither is written as an argument; to read the process as one, give this page to an agent with a prompt such as this:
I am <who you are, and what you need this for>. Write the design on this page out for me
as one argued text, built from its Shape and Decision Log alone. Order it by the questions
I would ask, not by the page's order. Introduce each term before you use it, give each rule
with its reason, and state each claim once. Add nothing the page does not say, and mark
anything you have to infer.Working on Florete
Contributions go to two repositories: design and documentation to florete, where the spec's prose lives, and code to flor, where DD's code lives. SD's repositories, flor-dist and flor-bounds, are public, so that anyone running Florete can read what they run and the contracts it is built on, but read-only, their trackers the team's: their code is generated by agents and generated whole again whenever what it is built from changes, so a patch to it would be thrown away. Report a defect you hit in a release as a failing test against flor instead.
Use AI throughout, and understand what you propose. Every change to flor is reviewed by a person and has to be defensible line by line: an agent generating it is expected, and what makes it defensible is that it was generated from settled decisions you can answer for. Fully automated work is not accepted there: that is what SD is for. Before you propose a change, have an agent review it from a clean session.
Start a feature at Design, not at the code: that page runs the workflow by which decisions are settled and recorded before any prose is written. Behaviour starts in the spec, never in a pull request, because behaviour that lands only in code leaves the two lines describing different products.
A bugfix carries its failing test first wherever a test can show the defect: write the test, watch it fail, then fix the code.
Shape
STRUCTURE
motto release first, build afterwards
lines SD spec-driven: agents decide within the spec; agent-generated, agent-reviewed,
released, maintained, regenerated
DD decision-driven: people decide; generated under human supervision,
grows behind the frontier
the spec is DD; a contract and a body each have a line
only an internal contract, every party inside one build, can be SD
a DD body implements a DD contract
a DD contract or body depends on DD contracts alone
a unit is named by its contract's line, then its body's: DD/DD, DD/SD, SD/SD
process two permanent implementation lines of one spec, one product
release then build: SD holds the leading edge, DD follows behind it
the frontier moves, never closes
roles agents on SD, each with its own context, instructions and identity, each writing
only what it owns
developer generates flor-dist's code, its human-owned paths apart
architect keeps the SD contracts
reviewer reads every change by the developer or the architect; writes only findings
a further role is a goal that needs a context of its own
repos flor DD contracts and bodies, every test but an SD contract's;
one crate per unit
flor-bounds SD contracts and their tests
flor-dist SD bodies and the integration; assembles the graph and packages
every executable
spec everything people maintain as input for generation: the architect generates the
SD contracts from it, the developer flor-dist's code from both
prose florete/src/content/docs/
a milestone's scope, its design and decomposition, and the guides
APIs every DD contract, as code in flor
fixtures golden examples, in flor; run as tests as well
every external contract is in it
unit a crate whose public API is a contract, DD or SD, either line supplies its body
it depends only on units and third-party crates a human declared
a binary may be one; flor-dist still assembles and packages it
code drawn into no unit is bound by the spec, the contracts it calls and the suite
SD crate shared code each part of whose API has a single consumer, in a crate of its own
in flor-dist, its API and body the developer's, the API no contract; no unit, and
no obligation rests on it
inventory per milestone, in its decomposition.mdx
crates its units and its SD crates, each with the calls that drew it
obligations what must hold across the milestone's code, each with the units
owning the check it rests on
the decomposition designs no API
assembly flor-dist's workspace root alone says which line supplies each unit's body,
whether it declares the unit itself or a DD crate does
each unit resolves to exactly one package, enforced mechanically
suite every test of ours: append-only, black-box over a contract, owned with that contract
edge tests what the product promises, over its edge
API tests what an API promises, over the body under it; beside its contract
golden fixtures exact examples of other kinds of contract; generation reads them
an edge or API test is a conformance test, stating a promise, or a regression
test, one per defect, saying in a line what the product once got wrong
hidden from generation and review, the fixtures aside, by instruction
rather than isolation
a gate at generation; a failing test is an input to the fix
run by flor-dist's CI, which alone builds the product; a DD contract's API tests
also by flor's CI, on a DD bodyFLOW
milestone
its scope and design in the spec
→ decomposition: crates and units drawn, lines set, obligations stated
→ each unit's API authored by its keeper against generated consumers;
how it keeps each obligation recorded; its lines confirmed or changed by people
→ generation, against tagged APIs whether their bodies exist or not
feature
├─ designed in the spec, always, before either line has it
├─ DD → human-supervised implementation
└─ SD → every crate it reaches regenerated whole by agent from the same spec
change on SD
the developer generates a crate
→ the reviewer reads it; the developer patches or regenerates it
→ merged once the reviewer agrees
a loop that does not settle goes to the architect, then to people
SD contract change
licensed by a finding or a decision in the spec
→ the architect regenerates the SD contracts, the diff holding only the licence's intent
→ the reviewer reads it against the licence; merged once it agrees, and tagged
→ reported, and report read by people as produced
→ the crates it reaches regenerated
bugfix
├─ a failing suite test is written first, human-supervised, wherever a test can
show the defect; otherwise a reviewer's finding
├─ DD → human-supervised fix, new tag, re-pinned by flor-dist
└─ SD → fixed as in change on SD
contract move
either way, people's call
→ the contract taken into its new line's repository and tagged, reviewed by people
when it becomes DD, its tests going with it
→ whatever reads the contract takes it from there
→ the old copy deleted last
substitution (DD-ward)
a body to DD, triggered by a security finding that escaped review, an obligation not even
review can hold, or people's weighing — never by a pace; each trigger decided on the record
→ contract frozen
→ flor-dist builds a second configuration: the DD crate by git tag
→ suite green in BOTH configurations
→ the assembly move lands; SD implementation deleted last
reverse substitution (SD-ward)
churn reaches a DD unit
→ SD implements the new contract, the assembly redirecting the unit to it
→ released on SD, recorded in the decomposition
→ DD writes the new body itself, in the gap after the release
→ substituted back by the same sequence
people may make the contract SD while the churn lasts, and DD again after
a deferral, not a reclassificationRULES
direction the spec flows to both lines; DD crates flow to SD
contracts flow from their keeper to the bodies held to them
nothing flows out of SD except findings, each to whoever keeps what it is against
both consume all of it; DD requires its decisions, SD its
scope and the contracts, and takes decisions if available
generation codes against interfaces, never against DD bodies;
a reliance on what a contract leaves unsaid is a finding, and
so is a read of the suite's hidden part, with its reason
a contract changes only by its keeper's process — a design pass for DD, a licence
for SD — never in the course of writing a body
human loop people do the open-context work and write it down; agents work closed over
what is written
both the spec: scope, acceptance, failure modes, the security boundary,
the guides, every DD contract and its tests; the delegations; the
reading of the architect's reports
DD also structure, naming, impl details, change review
SD none of those; no person reviews code
a change people make is best read first by an agent in a fresh context,
with the review skill that fits it
drawing a human makes three calls on each concern, each recorded with its reason
crate a crate of its own wherever more than one consumer uses it, on either line
unit an API where more than one consumer relies on a part of it, a unit
depends on the crate, an obligation rests on its API, or its body is to
be DD's, SD taking DD's code only as units; otherwise an SD crate, and one
drawn for its body alone is no unit while it stays on SD
line the line that supplies a unit's body when the milestone ships: the cost of an
error in it — an adversary picking its input, harm outliving a release —
weighed against the cost of DD, its time and the release it delays, which
working code lowers; and its contract's: SD where people's keeping buys less
than the people it takes, for good while that holds; the API's author may ask
for the decomposition to change; people confirm the lines or change them
granularity concerns share a crate unless one can move between lines on
its own, an executable or a unit uses one but not the others,
sharing would close a cycle, or one session could not generate
them whole; otherwise, a few large crates
a split drawn to hold SD accountable to DD is provisional while every side is SD
layering units form layers, every edge pointing down; a data unit
never depends on a lifecycle unit
obligations stated by the decomposition, on units only: a crate whose API must keep one is a
unit; kept as each API's author decides, recorded beside the obligation: by the API
itself where it can, by tests at the API where the input is the unit's own state, by
review only where neither can
an SD body, however reached, holds where every obligation it touches is kept, review
counting; one not even review can hold is recorded unkept, its unit due on DD
contracts whatever something outside a unit reads; designed before
generation by its keeper
kind API, protocol, format, command line
only an API is drawn as a unit; a unit may own
contracts of the other kinds
party internal: another component, in the same build
external: another release, a peer, a person,
another program
statement prose, in a design page, a guide or an ADR; an
API in code; or both
enforcement compiler an API's shape, for every caller
public-API diff an API's shape, across revisions and against each body
golden fixtures any other kind's shape, exactly,
for the examples they hold
suite meaning, for the inputs it uses
version gates skew between releases: a reader
refuses what it cannot read
review all of it, for every input: a person's on DD,
an agent's on SD, for what its rules name
architect a change answers a finding or a decision in the spec
its own observations go into its report as proposals
designs over every current consumer of what it keeps and the futures the spec's
evolution sketches name, judging an API through consumers it generates and
throws away
a report says what changed, the findings answered, the crates touched and any
obligation reached; read at the latest when the work that asked for it is accepted,
no release carrying an unread one
a dispute is a finding
review every change read whole before it merges, for code and for security, each in a
fresh context, security by another model where one is available
code read against what binds the crate, failure paths first, never against the
previous body; code the reviewer cannot follow is a finding
a test of an SD contract still failing once its body has regenerated is settled
against what it names
conventions how code is written: DD's rules of thumb, on both lines, held by
review and by lints where a rule is mechanical
change unit DD the diff or a refactored piece of a unit as a whole
SD the crate, generated whole in one session
a local fix patched, one changing what the rest relies on regenerated
evolution DD sheds erosion by refactoring: controlled regeneration
of a piece of the unit: a function, a design section;
a person pins what the piece carries beyond its fixed points, and what must not
return, as meaning; the context holding the meaning regenerates, another traces
the result to its fixed points and pins, and the person reads what traces to
nothing, then the whole, as its reader
SD regenerates a crate when the spec or a contract it reads changes
an SD contract changes as the SD contracts regenerate whole against the kept version,
its documentation with them
the suite is never regenerated, so a regeneration inherits every fix
findings a pair's own are consumed in its loop; any other is tracked where its answer is
written, until answered
a lesson that must last goes where generation or review reads anyway: the spec,
the suite, a contract's tests, the conventions, the reviewer's guidance
milestones design-decomposition units and release points
a decomposition states what its milestone ships: each unit's lines and their
reasons, and any obligation an SD body cannot keep
the frontier reads off the assembly as the DD contracts and the DD bodies
public flor and florete open to contribution; flor-dist and flor-bounds read-only,
their trackers the team's; every repository tracks the work that changes it
a defect in SD is reported as a suite test against florDecision Log
Entries are grouped by what a future change would be touching, not by the order they were settled.
The model
AIFIRST-01. Run two permanent implementation lines over one spec. The spec-driven line (SD) is agent-generated, released and maintained. The decision-driven line (DD) is agent-generated under human supervision, and takes a contract or a body where a trigger or people's weighing moves it (AIFIRST-45). The lines name who decides: on DD people do, on SD agents do, within the spec. Both are built from the same spec (AIFIRST-48), and neither converges away. Full SD — every body and every internal contract on SD, DD holding the spec alone — is a state the doctrine allows, a product's start included where its owner's weighing puts it (AIFIRST-38). DD requires an explicit decision in the spec for each feature, while SD needs only scope and contracts, with the suite as its gate; SD consumes decisions when they're available, otherwise generating agents make their own. Because agents produce on either line, so what DD spends is people's attention, a person reading every change (AIFIRST-49), and DD alone cannot reach a sellable product inside any relevant funding window. Because a person reviews generated code only against intent, so on DD the decisions come first: where nobody decided, there is nothing to read the code against. Because full SD stays evolvable by three means together: change enters through the spec, where external contracts and requirements change (AIFIRST-48); a change is applied by regeneration, within a crate (AIFIRST-43) and between crates, the architect regenerating a contract with every consumer of it (AIFIRST-40, AIFIRST-41); and coupling between crates is barred by contracts an agent of their own keeps (AIFIRST-38) — the last a bet (AIFIRST-37). Because full SD forgoes a person's reading: agents read every change, but only for what their rules name (AIFIRST-49), so a sign of erosion no rule names goes uncaught where a person reading would infer it; no person could diagnose a live defect in code no person has read, no implementation experience feeds back into the spec, and a contribution to the code lands only as a test. So DD stays, where a unit goes when the bet fails for it, when an error there would cost more than DD does (AIFIRST-31), or when people's reading is wanted. Accepting permanent maintenance of two lines, DD holding no more than the spec while nothing moves a unit to it, and that some units stay SD-authored indefinitely. Rejected SD with no DD line at all — nowhere to move a unit when the bet fails there or an error would cost more than DD, and no person's reading anywhere in the code. Rejected full SD only as a start, DD taking units as soon as people can afford them — a pace by another name (AIFIRST-45). Rejected replacing SD wholesale once DD reaches parity — parity is not a state that arrives, since features keep being added ahead of it, and DD is needed only where an agent's reading and the suite are not enough. Rebuilding the rest by hand would buy nothing.
AIFIRST-49. Rest the doctrine on agents' closedness and formalism, and on people's attention. The model is high-level and qualitative: a way to use agents' strengths and avoid their weaknesses, not a description of how they work. Closedness: an agent works well on a task closed over its inputs — closed inputs, a closed transform, a closed output — and the future is no input: it solves for now, and a future it was not given it cannot infer, and could only invent. Formalism: for any task an agent derives explicit rules and follows them, so what no rule names slips through — a sign of erosion among it, and much of design and architecture with it — where an experienced person infers a fuzzy rule from what they see; and a task's rules are a closed, limited set. People's attention, reading above all, is what the doctrine spends sparingly: generated content is hard to read, no person's intent standing behind it unless a person decided first. So people take what is open and close it into inputs agents can take — the spec, the use cases and futures a design names, the pins of a regeneration — and read only as far as maintainable software needs. The consequences each have their answer in the log: an edit is an open task, where a change must reach not being among its inputs, while a generation is closed over them — so an agent's edits erode, a copy or a hard-coded value that works now being the closed solution, better prompting moves where erosion starts rather than how fast, and a crate is regenerated (AIFIRST-43); what the inputs leave open the agent decides — so what must not be its decision is written before generation (AIFIRST-01, AIFIRST-04); rules are derived per task, and mixed tasks each come out worse — so review runs in a context of its own with its scope named (AIFIRST-44), and the roles stay apart (AIFIRST-37); evolution between components is closed only over every consumer and the written futures, which no session generating one crate holds — so an architect keeps the contracts (AIFIRST-40); open context reaches an agent only as people write it down — so the spec is people's (AIFIRST-48). Because the lines, the roles, what review reaches and what people keep each follow from the model, and naming it once lets every rule resting on it be weighed again when it moves. Because erosion follows from the two properties rather than standing beside them — a formal output states every relation explicitly, and an edit's reach is not among its inputs — which is also why a regeneration, closed over its inputs, answers it; and two properties can be tested on one's own agents, where a list is only remembered. Revisit as agents change, whatever rests on a property that moves — closedness first, which would let parts of the spec be delegated. Rejected continuation as a third property, the agent continuing a series — explicitness is what a formal transform writes out, and copying instead of abstracting is closedness, the future being no input; non-reproducibility as a property — a regeneration coming back different is what the doctrine uses, not a limit; people's limit as slow production — on either line, agents produce. Rejected an agent reviewer's misses running with the generator's where the two share a model — a reviewer in a context of its own finds what the generator missed, which is why a change is made by a pair.
AIFIRST-02. Treat milestones as design-decomposition units and as release points, each decomposed into what it ships. A milestone divides a design too large to settle whole. Each is also a release, and further milestones may be added to divide the work more finely. Its decomposition states what it ships: each unit's lines — its contract's and its body's — with the reasons, and any obligation an SD body cannot keep. Either line may supply a unit's body before the milestone ships; it ships on the lines written, or the decomposition is amended first. Which line supplies a body now is the assembly's (AIFIRST-11). Because the dual process exists to release more often, and a milestone that cannot be released makes releasing harder. Because a decomposition is drawn before its code exists, so what it can state is the target, which the code converges to by the release. Accepting more scope pages; the design content does not grow, only its division. Rejected the decomposition as a live record of the lines' current state, a status page beside the assembly that already holds it.
AIFIRST-03. Obsolete: when generation starts is a product's decision, not the doctrine's.
AIFIRST-26. Superseded by AIFIRST-48.
AIFIRST-48. Define the spec as everything people maintain as input for generation.
The spec holds a milestone's scope and design, its decomposition, the operator and user guides — which bind as input rather than following the code — every external contract with its golden fixtures (AIFIRST-38), and every DD contract. Prose lives in florete; the DD contracts live as code in flor, because a Rust API is not prose and belongs where it compiles, and flor also holds the fixtures, exact examples that generation reads and the suite runs as tests. The spec is DD. Generation runs from it in two steps: the architect produces the SD contracts from the spec, and the developer flor-dist's code from the spec and the contracts. Delegating a contract takes it out of the spec into the architect's keep, and taking it back puts it in. A DD implementation is not spec: SD depends on DD crates, but generation codes against their interfaces only (AIFIRST-27). Nor is the rest of the suite (AIFIRST-28).
Because open context reaches an agent only as people write it down (AIFIRST-49), and the spec is where they write it; to generation, a page stating external behaviour and one stating how things work inside are the same input, so one word names both.
Because the guides define the use cases that must work, which is a stronger input than the design pages and the reason they are written before either line implements anything: the main-line tests can be generated from them, and a formal suite would add mostly transcription.
Because an exact shape is best stated by an example, and generation must see it to reproduce it — so a fixture is at once a statement in the spec and a test in the suite.
Accepting that the spec mixes internal decisions with external promises, as design pages do; where a product owner and a system architect are different people, the two may want splitting.
Rejected the corpus as everything SD generates from, the SD contracts in it — which puts the architect's output in what is people's by definition; the spec as what people keep by rule, the DD contracts beside it — which splits people's input by whether it is prose or code; the fixtures as statements alone, checked by hidden tests, which puts an example and its check under two rules.
AIFIRST-37. Run SD by agents in roles, each with a goal and a context of its own, each writing only what it owns.
The developer generates flor-dist's code, its human-owned paths apart; the architect keeps the SD contracts (AIFIRST-38); the reviewer reads every change the developer and the architect make, and writes only findings. Each is its own agent — its own context, instructions and identity — and a change merges once the reviewer agrees with its author. The architect is there for the system's erosion, which regenerating a crate at a time does not reach: a concept stated in several crates, an API fitted to the consumers in view (AIFIRST-40). A further role is added where a goal needs a context of its own, when the need arises. DD stays generation under a person's supervision, its agents — the one reviewing a change among them — that person's tools.
Because each task has its own rules, a closed and limited set, and mixed tasks each come out worse (AIFIRST-49): making a working body and finding how it breaks are goals that contradict — for people too — and keeping boundaries across many changes needs every consumer in view, which no session generating one crate can hold, nor should.
Because a session reviewing its own output shares the blind spots that produced it: for an agent, finding a defect and not writing one correlate poorly.
Because writing only what each owns makes two rules mechanical rather than instructed: no body's author changes the contract it is held to (AIFIRST-46), and a review that can only file findings cannot quietly fix what it judges.
Accepting that the architect is a bet: what it does, an agent can do working closed, and nobody has measured whether that keeps a system from eroding — though a person in that seat is known to win it, and the agent's task is closed, every consumer in view and a new one regenerating the contract with its consumers.
Revisit after a few milestones run with the architect, judged by erosion's signs — a contract that keeps moving, a loop that does not settle, findings that recur, a change that costs more each milestone — and by metrics over their products, defined with its skills.
Rejected one generating agent reviewing its own output and keeping its own contracts; roles left to the harness, the doctrine naming no agent; the roles reaching DD, whose review is a person's.
AIFIRST-38. Give a contract a line, as a body has: DD kept by people, SD by the architect, by the owner's delegation. A contract is DD or SD, as a body is: a DD contract is people's, an SD contract the architect's. Only an internal contract can be SD (AIFIRST-04); an external one is part of the spec (AIFIRST-48), and people keep it. A DD body implements a DD contract, and DD code — a DD contract as well as a DD body — depends on DD contracts alone, so a unit is named by its two lines, contract first: DD/DD, DD/SD or SD/SD. An SD crate's API is no contract at all (AIFIRST-06). Which internal contracts are SD is the product owner's call, contract by contract, recorded with the reason: what people's keeping buys, weighed against the people available and the contract's churn — an early product delegating most and accepting APIs short of the best, a mature one keeping its important APIs, the stable ones above all — and for good wherever that weighing holds, revisited either way when it changes. Because the lines already say who decides a thing and how it is checked — agents generating and reviewing on SD, people deciding and reviewing on DD — which is exactly what tells the architect's contract from people's. Because the weighing is the one a body's line makes (AIFIRST-31), and it lands at different points for different products and stages; a doctrine fixing the point fits one company at one moment. Because DD code depending on a contract the architect may change — a DD body under it or calling it, a DD contract naming its types — would put people's review at the mercy of an agent's licence; the architect is SD's own, and nothing flows out of SD except findings (AIFIRST-46). Because an internal contract's parties are all ours and in view — every consumer, the futures the spec names — so a mistake in it costs a regeneration of the contract and its consumers, the trade SD runs on; an external contract's parties are outside the build, their needs never all written down, and what has shipped to them cannot be regenerated away. Accepting that a line names a contract's keeper as well as a body's maker, that a unit has three states, and that contracts become DD from the bottom of the layers up, DD code needing every contract it depends on to be DD. Rejected contract kind as the cut, only an API delegable — a proxy for parties that fails both ways, an SDK being an API and external, a cache tied to its build a format and internal; every unit's API the architect's until people take it over, which makes a takeover the goal — a quota by another name; external contracts delegable, their past kept by people and their future by the architect — deferred rather than refused, since it needs the open context only people hold today (AIFIRST-49); keeper words — people's, the architect's, delegated — three words for one fact; an SD contract binding DD code that depends on it, directly or through a wrapper, an exception to the direction rule; the architect's changes to such a contract waiting on people, a gate by another name.
What gets contracted
AIFIRST-04. Design before generation only what a regeneration cannot undo. A contract is authored first when something outside the unit reads it: another component, a unit or the integration calling its public API; another release, earlier or later, reading on-disk state or an artifact format; a peer, reading a wire format; a person, reading the command line or an error message; or another program, such as a service manager reading an exit code or a script reading output or a log line's framing. Another component is an internal party, shipping in the same build; the others are external. What lives inside a unit is the agent's to decide. Because a decision SD makes that later constrains DD is one taken without gates and cannot be regenerated away, while everything else costs a single unit's regeneration. Rejected closing each milestone's design fully first — most of what remains is regenerable detail. Rejected letting the agent decide every gap — it would freeze a wire protocol and a user-facing surface with no review.
AIFIRST-30. Describe every contract by its kind, its parties, its statement and its enforcement. A contract's kind is an API, a protocol, a format or a command line; only an API is drawn as a unit. Its parties are whoever reads it, internal or external (AIFIRST-04). Its statement is prose saying what it promises — in a design page, a guide or an ADR — or an API, code with its documentation, or both; a page that states no contract is no statement of one. Its enforcement is every means its kind admits, each holding a part of it: the compiler an API's shape, for every caller, and the public-API diff across revisions and against each body; golden fixtures any other kind's shape, exactly, for the examples they hold; the suite its meaning, for the inputs it uses; version gates the skew between releases, a reader refusing what it cannot read; a person's review all of it, for every input, on DD; an agent's review all of it, for every input, for what its rules name, on SD. A contract is designed before generation by its keeper; behaviour is held by tests only where nothing cheaper holds it, and detail follows consequence: a surface whose misuse costs a support question is described, one whose misuse costs a breach is specified. Because the dimensions vary apart: one kind serves several parties, one party relies on several kinds, and one contract is stated in several places — a command line in a guide for the person who types it, and in a design page for those who implement it — so a list keyed on any one of them hides the gaps in the others. Because a page holds many things — decisions, reasons, internals — and the statement is the part that says what is promised, so a gap between a promise and its checks shows. Because the means differ in what they reach rather than by degree: the compiler reaches every caller but only a shape, the suite reaches meaning but only for its inputs, and review reaches every input but only as far as its reader does — an agent's what its rules name, a person's also what none names (AIFIRST-49) — so naming the part each holds is what makes a gap visible, and the two readings are named apart. Because the suite captures bugs that were found rather than everything that was promised, so it cannot be the only gate. Accepting that a suite grown past what it must carry becomes the constraint a fresh implementation cannot satisfy, so over-contracting behaviour costs the regenerability the model runs on. Accepting that a version gate is designed into each format and protocol that crosses releases, contract by contract. Revisit the kinds and the means once contracts are authored against them. Rejected contracts listed by how they are enforced, which hides who relies on each; a list keyed on parties alone, or a table keyed on kinds, where a contract with two parties takes two rows and an empty cell goes unseen; the statement as a place — a design page, an ADR — which makes a whole page the contract; one ladder of strength, which ranks means that do not compare; enforcement told by how mechanical it is, which leaves a contract checked wholly by machine with its meaning unchecked; fixtures as a statement, where they are a statement's examples and a means; one review for both readers, which hides which reading a contract rests on; a style as a kind (AIFIRST-39).
AIFIRST-08. Superseded by AIFIRST-39.
AIFIRST-39. Contract the error report, and hold DD's conventions on both lines. The error report is command-line output, a contract on both lines: golden fixtures hold its shape and the suite its meaning. Errors in a unit's API are part of that API, authored by its keeper like the rest of it. How code is written — how errors are wrapped, what each boundary attaches, how a log line is built — is a convention: DD's rules of thumb, held by review on both lines and by lints where a rule is mechanical. Because the error report is what an operator reads during an incident, which makes it a person's surface under AIFIRST-04, whatever the code behind it looks like. Because SD's code has readers too — the reviewer at every generation, and the agents who diagnose a defect from what it logs — and some conventions prevent defects outright: a cause dropped from a report, a stack per occurrence on a path a peer can trigger, context lost under a log level, a check placed off the trust boundary. Because a written rule costs generation nothing to follow. Rejected SD keeping conventions of its own and taking DD's as advice, which calls a dropped cause or a flooded log a style; a style as a contract form of its own, rules plus golden output, which mixes what is read outside a unit with what is not; error handling left out of the doctrine, when its report is what an operator reads during an incident.
The architect
AIFIRST-40. Change an SD contract only on a recorded need, reviewed before it merges and reported to people. Each change the architect makes answers a finding — the developer's, the reviewer's, a person's — or a decision in the spec, a decomposition drawing a unit licensing its first authoring, and cites it; a script checks that the citation exists. The architect never licenses itself: an incoherence it sees goes into its report as a proposal, a licence once a person files it as a finding. It designs over every current consumer of what it keeps and the futures the spec's evolution sketches name, never for an unwritten need, judging an API through consumers it generates and throws away. The reviewer reads each change against its licence before it merges. Every change is reported — what changed, the findings it answers, the crates it touched, any obligation it reaches — and read by people as it is produced, at the latest when the work that asked for it is accepted; no release carries a change whose report nobody has read. A dispute is a finding the architect answers like any other; people decide which release its answer must reach, and it blocks nothing on its own. Nobody but the architect writes its repository: people who want a contract made DD move it (AIFIRST-13). Because an architect licensing itself is free to redesign, and a goal of coherence with no outside demand drifts toward generality nobody asked for. Because a script can tell that a licence exists and never that a change answers it: relevance is judged by whoever reads the change — the reviewer before the merge, people after it. Because inside the product a wrong boundary costs the regenerations built on it, so a report read as it is produced catches what a gate would, without a person's latency in every loop that needs a contract change; a gate passed routinely approves nothing. Because given the developer's context the architect would shape the developer's API, so what makes the role is its context: every consumer at once, where the developer meets one per session, and the futures people wrote down, the open part of the design being theirs (AIFIRST-49). A consumer nobody wrote down is met when churn comes, by regenerating the contract with its consumers. Accepting that coherence work the architect sees waits for a person to agree, and that a boundary read late costs the regenerations built on it. Rejected a person's approval on every change, which puts people back into each loop; reports read whenever someone chooses, which hold nothing; findings alone as licences, a designed feature reaching the architect only through a generation that fails first; evolution sketches as licences, a contract shaped for a need nobody has met; an architect designing for any consumer, written or not — open-context work no agent can do.
AIFIRST-41. Regenerate the SD contracts whole at every change, checked by a diff against the kept version. Each change regenerates what the architect keeps, whole, in a fresh session, from the spec, the licence, the kept version and every current consumer's use of it. A diff against the kept version lists every difference — the public-API diff for an API, a text diff for its documentation — and each must be the licence's intent; the reviewer judges the list against the licence, and anything else that moved is a defect. The documentation regenerates with the contract; its tests, part of the suite, are never regenerated (AIFIRST-14). A contract whose changes do not settle, or undo earlier ones, goes to people. Because an edit reaches fewer places than its change does (AIFIRST-49), while a regeneration writes every relation its inputs imply and the diff lists every difference, a drop included: closed over its inputs, it misses only what they miss. Because a contract, unlike a body, compares mechanically: a body's diff from its regeneration is mostly noise (AIFIRST-29), while an API's, its wording being its meaning, is exact. Accepting a regeneration's tokens at every change, small beside a body's, and that documentation diffs as text, judged by the reviewer rather than by a tool. Revisit when what the architect keeps, with the uses of it, outgrows a session: then a change regenerates the contracts it reaches, each whole. Rejected contracts edited in a fresh session with the whole in view — still an edit, finding some of the places a change reaches; a comparison with contracts derived afresh each milestone, which detects late what this prevents; regeneration without the diff, nothing telling an intended change from drift; a cap on changes per contract, a count that is noise.
Decomposition
AIFIRST-05. Decompose the product into units, drawing each at an API.
A page implementation/<milestone>/decomposition.mdx holds the decomposition and grows with the milestone. A unit is a crate whose public API is authored before either implementation (code with no contract is not a unit, bound by the spec, the contracts it calls and the suite, and by nothing else). Only an API is drawn as a unit, though a unit may own contracts of other kinds. Either line supplies a crate satisfying the API as its body, and substitution swaps which one the assembly selects. The contract is kept by people or by the architect (AIFIRST-38); on SD, agents review the implementation (AIFIRST-44).
Because a milestone's design states behaviour but draws no code boundaries, and a boundary retrofitted into generated code is an evolution step on that code.
Because a crate boundary is compiler-enforced where a module boundary is advisory, and in code nobody reads, an unenforced boundary erodes unnoticed.
Because a unit costs a kept API — people's time where people keep it, a boundary's friction where the architect does — while a contract of any other kind is stated in prose and checked by fixtures and the suite without one.
Accepting that this concentrates the risk where nothing checks it: the diff enforces conformance to a contract, never the fitness of one, so a wrong boundary produces a clean and well-tested system that is expensive to correct and slow to notice. The available signal is late — a unit that resists substitution, or whose contract will not settle, is reporting a boundary drawn in the wrong place.
Rejected deriving the boundaries from whatever structure SD arrives at; a unit to hold a contract of another kind, an API authored where a file needs none.
AIFIRST-31. Let people make three calls on each concern: its crate, its unit and its lines. A decomposition weighs every concern that might stand as a crate, finer than a unit so that nothing is merged before it is weighed, and people make three calls on each, recording each with its reason. The crate: one of its own wherever more than one consumer uses it (AIFIRST-06). The unit: an API kept as a contract where more than one consumer relies on a part of it (AIFIRST-06), a unit depends on the crate, an obligation rests on its API (AIFIRST-34), or its body is to be DD's; otherwise it is an SD crate. A concern drawn for its body alone, for review or for working code worth keeping (AIFIRST-12), is a unit on DD or none: on SD it stays integration, bound by its contract, and is drawn as a unit when it moves DD-ward. The lines, each the one that holds when the milestone ships: the contract's, SD where what people's keeping buys is worth less than the people it takes, for good while that weighing holds (AIFIRST-38); the body's, weighing the cost of an error in it — an adversary picking its input (AIFIRST-07), harm outliving a release (AIFIRST-33) — against the cost of DD, its time and the release it delays, which working code lowers. The API's author reports whether the API keeps the unit's obligations, and may ask for the decomposition to change; people confirm the lines or change them. Because the calls turn on different things — a crate on how many consumers share the code, a unit on whether its boundary must hold across regenerations, a line on who keeps the contract and who writes the body — so a unit whose error costs much may ship on SD where its API keeps the obligations, and one with working code on DD where nothing else argues for it. Because a crate on SD protects only what its API keeps: a format's bytes, or a body worth reviewing, are kept by review alone, so a unit drawn for them on SD buys a seam at the price of an API. Because review reduces the risk an error carries and never removes it, so DD is bought where an error would cost more than the time and the release DD takes. Because an obligation can be the decomposition's own artefact — one unit's check and another's write, set apart by the split itself — and the API's author meets its cost first: an API that keeps an obligation only convolutedly is reporting a boundary in the wrong place (AIFIRST-05). Revisit once the cost of an error, and of DD, has a measure. Rejected rating every concern strong, some or none on fan-out, adversarial input and irreversibility, which fed the wrong calls — fan-out decides a crate rather than a unit, and irreversibility moved no line; a record of every concern on the decomposition page, stale once units split or merge; one call fixing both unit and line, which puts every risky unit on DD before anyone knows whether an API can keep its obligations; lines left to API authoring alone, which generates and plans nothing until every API exists; a line confirmed by the API's author, a judgement of risk and cost that belongs to people.
AIFIRST-06. Give code several consumers share a crate of its own, an SD crate where no unit needs it.
A concern more than one consumer uses — an executable or a unit, this milestone's or the next's — gets a crate of its own, on either line. Where each part of its API has a single consumer, and nothing else draws a unit (AIFIRST-31), it is an SD crate: no unit, in flor-dist, its API and body the developer's, the API no contract. A milestone's crates and units are recorded in its decomposition.mdx.
Because one implementation of what several consumers share keeps it from drifting between copies — a format one executable writes and another reads above all — and a boundary costs more to add later the more call sites it has.
Because the developer meets one consumer per session, so an API several consumers share, left to it, accretes a path per consumer, and regenerating it fits the same consumers again; a part with one consumer has nothing to erode across.
Because a kept API costs people's time or a boundary's friction (AIFIRST-38), spent only where a unit needs one.
Accepting that code left in one consumer and later found to need DD costs a regeneration of its area.
Rejected a contract for every shared crate, a licence and a report spent on parts each serving one consumer; integration counted as one party, which leaves an API several executables share to the developer's fitting; integration left unstructured, which lets generation copy what several executables share.
AIFIRST-07. Weigh what a suite cannot evidence. The question weighs in an error's cost, for a unit's line (AIFIRST-31). Does the obligation quantify over all inputs? A suite shows that the inputs it uses produce the promised result. Where the promise is that no input produces some result — no unauthenticated peer is accepted, no secret reaches a log, no data crosses between tenants — the input that matters is chosen by an adversary after we chose our tests, so a green suite says nothing about the gap and only reading the code does. The domains are not comparable either: we define what valid means, so a suite can cover the shape of that space and property tests can extend it, while its complement would need the adversary modelled to be generated at all. Code where authentication terminates answers yes. Because a test is evidence about the input it uses, so any universal claim is beyond a suite whichever way it points. What singles out the negative one is discovery: a universal positive fails toward the user, who notices and reports, and the field generates inputs at a scale no suite matches; a universal negative fails toward an adversary, who is the only party that learns. Field discovery is what stands in for proof everywhere else in this model — the suite, and its users reporting what it missed — and this is the class where it is blind, so a check the generating agent drops is caught before the merge, by review or by a test that thought of it, and by nothing in the field afterwards. The universal positive that lacks field discovery too — every valid rollback succeeds, learnt during an incident — falls to AIFIRST-33's question rather than to this one. Accepting that such a unit may be lifecycle-shaped, and so the harder contract to author this early. Rejected code that only sets what a check admits, its input crafted by nobody, counted with the check — a suite with an oracle evidences it. Rejected "the defect would be silent" as the criterion — a specific silent failure is exactly what a conformance test catches, since one can feed the input that must be refused and watch the result, so visibility separates nothing. What defeats a suite is the quantifier, not the noise a failure makes.
AIFIRST-33. Weigh what being wrong leaves past any release. The question weighs in an error's cost, for a unit's line (AIFIRST-31): can being wrong be taken back? The model trades on a defect costing one unit's regeneration. Where being wrong instead leaves what outlives any release — state written to a disk, which a later release has to read, or state destroyed there; a node left unreachable — or disables the path by which everything else is repaired, that is no longer the trade being made, and review reduces the risk without removing it. A breach is AIFIRST-07's question. Because the model's economics assume that being wrong costs a regeneration. Where the cost lands on someone else and cannot be reversed, the cheapness of regenerating is not the question being asked. Because a breach is irreversible through its adversary, which AIFIRST-07 already weighs, while the repair path belongs here, a defect there making every later defect unrepairable. Because a format another release reads is state its writer leaves behind: fixtures pin it only for the examples they carry, so a regenerated writer can drift outside them, and the drift persists in what it wrote. Accepting that the question has no bright line — how far a consequence reaches is judged per unit, and recorded with its line's reason. Rejected a breach counted here as well, one failure as two reasons; the repair path folded into fan-out, a repair path being no matter of call sites; a contract across releases as a question of its own — beyond the state a writer leaves, what it caught is output another program reads live, which the next release can fix.
AIFIRST-12. Keep reviewed code by contracting it; generate SD from the spec. Reviewed code worth keeping is drawn as a unit on DD, since SD takes nothing from DD but units — or, where DD's cost would delay the release, tagged as a quarry for a later DD body, the decomposition saying which and why. A unit's API opens the loop in AIFIRST-09, and its CLI surface is reused. Churn that reaches it goes to SD first, by reverse substitution (AIFIRST-36). SD is generated from the spec, taking reviewed code only as units. Because SD can take a DD body only as a unit, so reviewed code is contracted, kept as a quarry, or thrown away — and throwing working code away buys a regeneration and nothing else. Because generating SD over existing code would make its first act an evolution step over code that does not match the design — the operation the model concedes agents cannot do — and would give SD an agent-mutated descendant of DD's own history. Accepting more units than the other reasons would draw, each an API to keep. Rejected working code as a weight on the line alone, or as no reason at all — each regenerates working code nothing else draws; a seed alone, at the moment the lines start — reviewed code worth keeping is not confined to that moment, and a rule tied to it is a milestone's plan; an existing API alone as a reason to contract — a signature with no body worth keeping says nothing about whether the boundary must exist before generation.
AIFIRST-32. Give a concern a crate of its own only where it can part from the rest, and keep the unit graph closed and layered. Concerns share a crate unless one of them can move between lines without the others — its line differs now, or the churn or risk ahead will part them — or an executable or a unit, of this milestone or a later one, uses it but not them, or sharing one crate would close a cycle through another, or one session could not generate them whole (AIFIRST-43); otherwise a few large crates hold. A split drawn to hold SD accountable to DD is provisional while every side is SD, and may be reverted. A unit depends only on units and on third-party crates a human declared. Units form layers, every edge pointing down, and a data unit never depends on a lifecycle unit. Because a unit is swapped whole and supplied by one line, so the crate is the grain of every substitution: a crate mixing concerns on two lines could be supplied by neither, and one holding concerns that will part must be split under churn, when a split costs most. Because a data unit depending on a lifecycle unit hands every consumer a runtime, which is what a unit's shape weighs when it moves (AIFIRST-45). Accepting that whether two concerns will part is a forecast, judged pair by pair, and that a line changed later may split or merge crates; and that a session's size, a fact about today's models, draws crate boundaries, though never units. Rejected a crate per concern, which authors APIs for boundaries nothing crosses; a crate per line, which mixes units that start on different lines; users counted as executables alone, which merges concerns a later unit will use apart; layering discovered unit by unit.
AIFIRST-34. State what must hold across units, and let each API's author keep it. Beside its units, a decomposition states the obligations that must hold across the milestone's code, each with the units owning the check it rests on, and each unit's lines; it designs no API. An obligation rests on units only: a crate whose API must keep one is a unit, never an SD crate. Whoever authors a unit's API decides how each obligation the unit touches is kept, and the decision is recorded beside the obligation: by the API itself where it can be, its types and its checks leaving generated code around it no way past; by tests at the API where the input is the unit's own state (AIFIRST-14); by review only where neither can, the security review reading every generation with the obligation among its items (AIFIRST-44). Where the architect authors the API, the decision travels in its report and people record it. An SD body holds where every obligation it touches is kept, review counting; one not even review can hold is recorded unkept, and its unit is due on DD (AIFIRST-45). The obligations kept by review alone are what people weigh first when calling lines and moves. Because an obligation that spans units — one unit's check, another's write, generated code between them — belongs to no single API, and the decomposition is the one page that sees them all. Because an API is designed as code, through its consumers (AIFIRST-09): a mechanism sketched in prose can be checked against nothing, while an obligation can be checked against the API once one exists. Because a suite is evidence for the inputs it uses, so where an adversary picks the input after the tests, only the API's own construction keeps the promise; a unit's own state is deterministic, and tests at its API reach it. Because a universal negative is evidenced only by reading the code (AIFIRST-07), and the security review reads it: whether an agent's reading is enough is people's weighing, which the record of what rests on review lets them make. Because an API its body's author owns changes with every regeneration, so neither its types nor tests written against it can hold an obligation. Accepting that a decomposition's lines may change until its milestone ships, and that an obligation not even review can hold is rare, the weighing of review-kept obligations doing most of the work. Rejected a mechanism sketched for each obligation — a type only the check can construct, say — which designs APIs before anyone works on them and settles less than it seems, evidence that a check ran not being evidence of what it compared against; an obligation counted kept only where the API's types rule its breach out, which counts every way code can go wrong rather than the inputs an adversary chooses; units and lines alone, which leave an obligation spanning units to whichever author notices it; obligations held by the security design, when not every obligation is a security one and their checks live in units; review keeping nothing, which labels every obligation of an all-SD milestone unkept whatever was done to keep it; review as the default, which skips the strongest keeping for the weakest.
AIFIRST-09. Arrive at a unit's API by generating consumers and judging the result. An agent proposes an API and generates consumers against it; the API's keeper judges and iterates, the architect doing both for an SD contract. A concern a third-party standard already defines needs no interface of ours — an event stream or a counter mechanism, say — though what the product emits through it is a surface of its own. Because consumers are what reveal a bad API, and generating throwaway consumers is cheap. This recreates the practice loop that normally makes APIs good. Because API churn is cheapest at the start, while DD has no call sites and SD is small, and grows more expensive on both sides afterwards. Front-load it. Rejected authoring APIs cold. Rejected extracting them from a generated implementation, which lets its accidents harden into the contract.
AIFIRST-35. Run a milestone as its design, its decomposition, its units' APIs, then generation. A milestone's code is generated after three steps, each depending on the one before: its scope and design in the spec; its decomposition — crates and units drawn, lines set, obligations stated; and each unit's API, authored by its keeper through generated consumers, how it keeps its obligations recorded and its lines confirmed by people. Generation then runs against the tagged APIs, whether their bodies exist yet or not (AIFIRST-27). Because the steps are dependencies, not dates: generation needs the contracts (AIFIRST-04), the contracts need units drawn (AIFIRST-31), and the units need the milestone's design — an order that holds for any milestone, which makes it the doctrine's rather than a plan. Rejected the order told in prose alone, where nobody checks a milestone against it; the order left to each milestone's tracker, which holds dates and owners, not what must precede what.
Repositories and code flow
AIFIRST-10. Superseded by AIFIRST-42.
AIFIRST-42. Keep the lines in three repositories: flor, flor-bounds and flor-dist.
flor holds the DD contracts and the DD bodies, a crate for every unit people keep, since a contract exists as compilable code before a body fills it (AIFIRST-27). flor-bounds holds the SD contracts with their tests, an API as a crate whose bodies are unimplemented; the architect alone writes it, and tags a contract at every change. flor-dist holds the SD bodies and the integration, assembles the graph, and packages every executable. They share no history. Binaries live in flor-dist because they are integration, not because a unit may not be one: where a binary's own logic has to be reviewed it becomes a unit like any other, with its crate in flor. A build produces its own workspace's executables and not a dependency's, so the executable is produced in flor-dist by a one-line main over that unit's entry point — assembly rather than implementation, and human-owned like the manifest around it.
Because the review regimes are incompatible: DD requires a person's review of every change, while SD is reviewed by agents alone, so one repository would mean one CI, one CODEOWNERS and one set of protections covering opposite rules, with misclassification silent.
Because write access is granted per repository: an agent's identity can be narrowed to one, while a path inside a public repository has no restriction short of review — so the architect's contracts and the developer's bodies are kept apart by where they live.
Because SD's history is regeneration-shaped, and wholesale rewrites in the same log would degrade blame and bisect for the line that depends on them.
Accepting that an SD contract and its body sit in different repositories, so an API's churn crosses two; and that a DD binary runs in flor only against whatever bodies exist there, its real exercise the suite at the product's edge, which only flor-dist can run.
Rejected two repositories, the SD contracts in one of them: in flor every change waits on a person's review, and in flor-dist the body's author and the contract's keeper share a repository, kept apart only by a guard inside it. Rejected branches or directories in one repository — a boundary held by discipline breaks on one inattentive command. Rejected naming the SD repository for the product — it is read mainly by agents and is not a front door; and flor-seams for the architect's — a seam is the wider term, and only the seams guarded by delegation sit there.
Rejected forbidding a binary-shaped unit: what a unit names is a contract and the assembly decides which line supplies it (AIFIRST-11), so a DD binary needs no dependency running from flor into flor-dist, and its logic can be reviewed while it sits above generated units.
AIFIRST-11. Move DD code to SD as git-tagged crates, and publish nothing.
Each unit is its own crate. A DD contract is tagged on demand — when it is set for generation, when its unit becomes substitutable, or when a fix must reach SD — and an SD contract at every change (AIFIRST-42). flor-dist's workspace root is the single place that says which line supplies each unit's body — a dependency it declares itself by source, a path for an SD body and a git tag for a DD one; a dependency declared inside a DD crate by an override of the source it names, which reaches through the whole graph. Contracts take no part in the assembly: CI checks each body against its contract, by the public-API diff and by the contract's tests. Substitution is an edit to the root alone either way, and the root is a standing inventory of which bodies are generated now. Nothing is published to a registry.
Because a copy would make every fix a two-site change, and duplication in the security core is the worst case of it.
Because publishing internal APIs creates an accidental SDK the real one would have to disambiguate — and a unit crate on a registry would have no user, since nothing but our own assembly builds against it.
Because the graph will otherwise carry a unit twice and say nothing about it: the build resolves two revisions of one unit without complaint, and the compiler objects only where a type crosses between the copies — otherwise the product ships two of the unit and of whatever state it holds. So the assembly carries an invariant of its own: each unit resolves to exactly one package in every build configuration, enforced mechanically, and scoped to our own units so that ordinary third-party duplicates cannot mute it.
Because that check is also what keeps pins per unit rather than repository-wide: units that depend on one another are forced to a common revision by it, and units that do not are left independent — which is the constraint the dependency graph actually imposes, rather than a coarser one declared over the whole repository and paid for by dragging every unit's unreleased work along with each bump.
Accepting that flor and florete may be taken by someone else; the binary name, the crate names and the brand do not depend on the registry.
Accepting one more mechanical check in flor-dist's CI, and that a duplicate unit is diagnosed rather than prevented.
Revisit when a third-party SDK is designed.
Rejected vendoring a copy.
AIFIRST-27. Generate against contracts, and turn every reliance on a body into a finding.
Generating agents build against the real flor and flor-bounds — a git dependency checks out its whole tree, bodies and tests included — and are instructed to code against each unit's public API and documentation. Reading a body is not forbidden; relying on what a contract does not state is reported instead: wherever generated code depends on behaviour the contract leaves unsaid, however the agent learned it, the agent files a finding. A contract may still be tagged before its body exists — a crate whose functions are unimplemented still yields a complete interface — so SD generates against a frozen contract while DD fills it in, and only the assembly move waits for a working implementation.
Because an agent that relies on a body codes against observed behaviour rather than against the contract, and the invariants it picks up that way become load-bearing without being written down — the coupling the contracts exist to prevent, and one that surfaces as a silent break the next time DD refactors.
Because that coupling forms where a contract is silent: an agent reads a body exactly when the interface does not answer its question, so what does the damage is less the reading than the gap it closes without anyone learning of it. Reported, the reliance is a finding (AIFIRST-46) and the contract improves; unreported, a gap in the contract is papered over.
Because keeping bodies out mechanically is not a boundary worth holding. flor is public and every build of flor-dist checks it out, so an environment airtight against it must also give up the web, local runs against the reviewed crates, and the upstream material generation draws on — and the gain would stay partial even then, since an agent that runs the product observes behaviour through the interface whether or not it reads a body.
Accepting that the boundary is held by instruction and audited after the fact rather than prevented: what an agent opened is in its transcript.
Accepting that the suite is reachable the same way, since it sits in the same tree, so AIFIRST-28 is held by the same instruction and the same audit.
Rejected building generation against interface-only stand-ins of flor, in an environment with no route to it — mechanical, at the price of an extractor to maintain, no local run of any reviewed path, and an environment cut off from the web, for a gain black-box observation erodes anyway.
Rejected a separate repository for the contracts people keep — it splits a DD contract from its DD body across repositories, multiplying the cost of API churn, which is heaviest while APIs are first authored. Rejected <unit>-api interface crates — the standard Rust shape, but it re-expresses a contract as traits and forces indirection at every call site, to buy a mechanical isolation this model has chosen not to pay for.
Change and substitution
AIFIRST-13. Move a contract or a body by a fixed sequence, deleting the old copy last.
A body moves to DD by substitution: freeze its contract, which people keep; have flor-dist build a second configuration taking the DD crate by git tag; require the suite green in both configurations; land the assembly move; then delete the SD implementation. A contract moves either way by people's call: the receiving keeper takes it into its repository and tags it — people reviewing it when it comes to them — its tests going with it; whatever reads the contract takes it from there; then the old copy is deleted.
Because deleting last keeps every earlier step reversible by the same edit to the root, and running both configurations catches a DD crate that passes on its own terms while changing behaviour the product depends on.
Because a contract coming to people is reviewed at the move, which is what makes it theirs.
Rejected substituting automatically on a DD release — it couples a release decision to a product decision and removes the human from a change that reaches customers. Rejected a contract taken by copy, both keepers holding it until the body moves — the architect could change what people took.
AIFIRST-14. Hold every test in one append-only suite, black-box over a contract and owned with it.
The suite is every test of ours, never regenerated, and black-box over a contract — the product's edge or an API, never a body. Edge tests say what the product promises at its edge; API tests what an API promises, over the body under it, kept beside their contract, in flor or flor-bounds; golden fixtures are exact examples of the other kinds of contract, which generation reads as well (AIFIRST-48). An edge or API test is a conformance test, stating a promise, or a regression test, one per defect, with a line saying what went wrong. Each test is owned with the contract it tests, and goes with it when the contract moves (AIFIRST-13). An API test of an SD contract still failing once its body has regenerated is settled by the reviewer against what the test names: the body regenerated, the test returned to the architect, or a gap in the spec taken to people. flor-dist's CI runs all of it, since only it builds the product, in both configurations during a substitution window; flor's CI also runs a DD contract's API tests against its DD body. A component's own unit tests are not part of the suite and are regenerated with the component.
Because a regenerated component returns with different bugs, and the accumulated capture of every bug already found is the only thing between that and a customer.
Because the same suite must be green on both sides of a substitution, so it can belong to neither implementation.
Because an obligation over a unit's own state is reached cheaply at its API and only partly through the product's edge, and a test kept with its contract changes only as that contract does, by whoever keeps it.
Because a test and a body are two readings, made apart, of the spec and the contracts, so a failure between them carries information: one of them misread, or what they read does not decide.
Accepting that it grows monotonically and gets slow, and that each API test constrains every later regeneration of the body behind it — held in check because a conformance test's obligation must be derivable from the spec or the contract it tests.
Revisit if reports show the architect weakening its tests to fit its changes: then people own the assertions, written over a driver the architect binds to each API.
Rejected pruning it — a test is amended, or where a design deliberately drops the behaviour it covers removed outright, but either way traceably to the decision that did it, since append-only decays one undocumented exception at a time. What is refused is deletion because a test is inconvenient, slow or failing.
Rejected an SD contract's tests kept outside the suite, joining it when people take the contract — two homes for one kind of test, one of them unnamed; a conformance kit per unit beside the suite, a second artifact doing the suite's job under other rules.
AIFIRST-28. Keep the suite a gate at generation and an input once a test fails.
The generating agent does not read the suite beyond its golden fixtures, which are input. It reads the spec and the contracts, and afterwards the suite judges what it produced; only once a test fails does that test become input — a regression test with its line saying what went wrong — entering the fix as any finding does (AIFIRST-43). The rest of the suite sits in flor and flor-bounds, in the trees generation builds against, so it is hidden by instruction rather than by isolation: generation and review are told not to read it, and records each read it makes anyway with its reason — which test, and what the spec failed to say. Each record is a finding against the spec (AIFIRST-46); transcripts are the audit for a read left unrecorded.
Because an implementation generated to satisfy an append-only suite converges toward the implementations whose defects filled it, which is the opposite of coming back different — and where the suite is silent the agent fills the gap arbitrarily, while a wrong test simply becomes the specification with nothing pushing back.
Because a failure then carries information: either the agent misread the spec, or the spec and the suite disagree. Read as a finding, that is the reality check SD exists to provide.
Because a conformance test's obligation belongs in the spec, or in the contract it tests, in any case — the test is the executable form of a promise, not a new requirement — so a test whose obligation cannot be derived from either is a gap in them rather than a rule hidden from the line that has to satisfy it.
Because a read the agent records names the gap that forced it, and a gap named is one the spec can close; a read nobody records leaves it open.
Because nothing else needs to be visible before generation: a defect that shows a gap in the spec is closed in the spec, where every later generation reads it, and a failing test reaches the agent whole when it fails.
Accepting a fixing phase after every generation, paid in tokens and wall-clock, where showing the suite would have bought a faster first green.
Revisit once one generation can compare the two costs for real. The recorded fallback is to expose the suite at generation and accept the convergence.
Revisit when regenerations keep reintroducing defects the suite already catches: then publish the regression tests' lines before generation.
Rejected a defect ledger visible before generation, a mechanism designed ahead of any need for it; a suite run's output in its place, whose failure messages carry the assertions; a list of known traps in the spec, lessons written before anyone knows they are needed; the fixtures hidden with the rest, which leaves generation reproducing a shape written out in prose, drifting from the fixture that checks it.
AIFIRST-15. Split the human loop by property and by contract. People own the spec — scope, acceptance criteria, failure-mode enumeration, the security boundary, the guides, every DD contract and its tests — the delegation of the rest (AIFIRST-38), and the reading of every report the architect writes (AIFIRST-40). On DD they also own structure, naming, implementation detail and the review of every change. Each change people make — to the spec, most of them, or to DD's code — is best read first by an agent in a context of its own, with the review skill that fits what changed. On SD no person reviews code: agents review every change before it merges (AIFIRST-44). Because an agent reading a change from a clean context, its scope named, finds what the change's author and a person reading generated content miss, at the cost of tokens rather than attention (AIFIRST-49), while the change stays its author's to judge. Because people do the open-context work and agents work closed over what is written (AIFIRST-49), so people keep what no agent can be handed in writing: the spec itself, the delegation, and a judgement of the architect's changes by rules nobody wrote down. Because the weakness is the generating agent's: generating, it is weak at failure paths and security — open work while its goal is a working body — and the reviewer covers both by comparing the code with the spec and the contracts that bind it, which is closed work. Happy-path correctness is good, and evolvability is attempted on SD by the architect in the contracts — a bet (AIFIRST-37) — and by regeneration in the bodies (AIFIRST-41, AIFIRST-43). Because what an edit drops is what no test catches: an agent can delete the line that verifies something and leave every test passing. Reading the change catches it, since what binds the code states the check the code lacks — the diff, or for a piece regenerated whole, a trace against its fixed points and pins (AIFIRST-29) — on DD a person's reading, on SD an agent's. Accepting that this is the model's largest recurring human cost. Rejected a unit weighed toward DD because its omissions would be a breach — review catches omissions, and what weighs a unit toward DD is evidence that review did not hold it, or the cost of an error (AIFIRST-31, AIFIRST-45); a person's reading ranked above an agent's for security, where reviewing agents are strong at the flaws rules name and what none names is people's already; an agent's review in place of a person's on DD, even for what rules name — DD is a person reading every change.
AIFIRST-16. Superseded by AIFIRST-43.
AIFIRST-17. Superseded by AIFIRST-43.
AIFIRST-43. Change SD a crate at a time: generate it whole, patch a local fix, regenerate for the rest. The unit of change on SD is the crate — unit, SD crate or integration — generated whole in one session, never grown feature by feature, from the spec, its contracts and the findings and never from its previous body, the agent gathering its context from them itself: no page map. A crate regenerates whole when the spec or a contract it reads changes. A fix is patched where it is local — in one place, changing nothing the rest of the crate relies on — in the session that generated the crate, or in a fresh one that reads the crate whole first; a fix that changes something the rest relies on — a concept, a type, a data flow, an error path — regenerates the crate with the findings in context. The reviewer says which with the finding, and reads the result whole (AIFIRST-44). A defect found after the merge enters as a failing suite test wherever a test can show it, otherwise as the reviewer's finding with the lasting lesson it needs (AIFIRST-46). A loop that does not settle — a pair that cannot agree, or rounds past a number the harness sets — goes to the architect where the contract may be what makes it hard, and to people otherwise. A crate one session cannot hold is split by a change of the decomposition (AIFIRST-32). Because a fix's spread is the symptom, not its measure: a change that must be repeated in many places is a concept stated in many places, and patching each copy keeps it so, while a regeneration states the concept once and re-expresses what relies on it. Because a local fix kept as a patch spares a regeneration that comes back different and reopens what the last round settled. Because a generation is closed over its inputs only while one session holds the whole crate: parts generated in separate sessions are edits by another name. Because a regeneration that reads its previous body is pulled toward that body's accidents, as a review comparing with it would be (AIFIRST-44). Because a fix survives regeneration only if its lesson is held where regeneration reads or checks — a suite test, the spec — since a body's own tests go with the body. Accepting that "local" is the reviewer's judgement, and that a long loop of patches fills its session, at which point the next round regenerates. Accepting that a regeneration is no guarantee: closed over its inputs, it misses whatever they miss, so every change, patched or regenerated, is a risk for an agent. Revisit once generation has run: a crate may span sessions, its erosion admitted, where a split costs more than the erosion it avoids. Rejected a patch admitted only behind a failing suite test — admission had to be decidable without reading the code on a line nobody read, and SD is read at every generation; a fix against a component's own tests, discarded with the body; a defect ceiling as the trigger to regenerate, a valve for patches that locality keeps from piling up; a fix judged by whether every place it reaches can be named, which says nothing of whether those places should exist; every fix a regeneration, which may never let a loop close.
AIFIRST-44. Review every change on SD whole before it merges, in contexts apart from its author's. The reviewer reads every generation, and every change to an SD contract, whole before it merges — once for code and once for security, each with a skill and a fresh context of its own, the security review by another model where one is available — and the change's author and the reviewer work it until the reviewer agrees. Code review reads correctness against what binds the crate — the spec, its contract, the contracts it calls — failure paths first, and what the code leaves out against the same, never against the previous body; code the reviewer cannot follow is a finding. The reviewer is held from the suite as generation is (AIFIRST-28). A security finding the loop resolves triggers nothing; one that escapes it names its unit for DD (AIFIRST-45). Because a regeneration's diff from the last one is mostly noise, so the review reads the crate whole, which is also how a drop is seen. Because whatever merges is built on, so a finding after the merge costs regenerating more than one crate, where the loop costs one. Because code review and security review look for different things, each with rules of its own, and mixed in one context each comes out worse (AIFIRST-49); and another model derives rules of its own, so where a miss costs a breach its review reaches what the first model's rules leave unnamed. Because behaviour the spec does not state is not owed: comparing with the previous body pulls each generation toward the last one's accidents, and a behaviour that should be owed is a gap in the spec, filed as a finding. Accepting two reviews' tokens on every change. Rejected review after the merge; one review for code and security in one context; review sampled; review of the diff from the previous generation; structure and evolvability reviewed in a body the next regeneration rewrites.
AIFIRST-18. Superseded by AIFIRST-45.
AIFIRST-45. Move a contract or a body on a trigger or on people's weighing, never by a pace, each call on the record. A contract moves either way and a body moves either way (AIFIRST-13), each by people's call, a body to DD only under a contract people keep. A trigger moves a unit ahead of any weighing: a security finding that escaped review (AIFIRST-44), or an obligation not even review can hold (AIFIRST-34); severity decides among triggered units. Beyond them a move is people's weighing — the obligations kept by review alone first, then the defects that escaped and the findings that recur — and shape breaks ties: a data-shaped unit drops into any consumer, a lifecycle-shaped one brings a runtime. No pace is set: each trigger is weighed and decided on the record, the move or the reason for none, and a gap after a release in which nothing triggered says so. A contract or a body may move to DD once every contract it depends on is DD (AIFIRST-38). The frontier is read at any time as two shares — the DD contracts and the DD bodies, and the security-relevant surface each covers — with the moves either way named: a body's line off the assembly, a contract's off where it lives. Because a finding the review catches is the review working, while one that escaped it is the evidence that SD's reading did not hold a unit — the case AIFIRST-07 warns of. Because the failure mode is a frontier that stops advancing because new work always outranks a move, and a decision on the record shows that as a decision rather than as drift, without a pace no doctrine can know a product needs. Because a bare share would not show it either, since we define the units it counts; naming what moved does. Rejected a fixed effort split, which turns judgement into arithmetic that whoever is behind will game; one unit per gap after a release by default, a pace by another name; every security finding a trigger, which fires at every generation once review reads each one; the defect ceiling as a trigger (AIFIRST-43); a score summing severity, review-kept obligations, escapes and shape; an unkept obligation as a blocker on the release, which paces releasing by DD's body.
AIFIRST-36. Take churn reaching a DD unit on SD first, and bring the unit back after the release. When a milestone's churn reaches a DD unit, SD implements its new contract first: the assembly redirects the unit to SD's crate, and generation supplies the body. The milestone ships the unit on SD, and its decomposition says so, with the reason (AIFIRST-02). That SD body is held to the test any SD body is (AIFIRST-34), an obligation it cannot keep recorded as unkept. The move defers the unit's review rather than reclassifying it: in the gap after the release DD writes the new contract's body itself (AIFIRST-25) and substitutes it back by the fixed sequence (AIFIRST-13), and keeping the unit on SD past that milestone takes a later decomposition saying so, with the reason. People may also make the unit's contract SD while the churn lasts, taking it back by a contract move afterwards (AIFIRST-13). Because releasing first applies to churn as much as to new units. Because a deferral that needs a fresh trigger to end becomes a reclassification by default, the frontier slipping back with nobody deciding it. Because nothing flows out of SD except findings: adopting SD's body would give DD code its review did not produce. Accepting that the unit's review lapses for a milestone, the suite again its only evidence; and that catching up competes with the next milestone's work for the gap. Rejected DD drawn only around stable cores, when churn arrives where it arrives — often where working code was kept; a stricter test for a reverse-substituted line, which reinstates a mandate where a human's call stands; the line left DD while the unit ships on SD, under which a decomposition states what its milestone does not ship.
AIFIRST-29. On DD, shed erosion by controlled regeneration below the unit. Regeneration is how generated text sheds the erosion edits accumulate, and DD uses it too — below the unit. A smaller scope of regeneration buys human control: a function or a section of design prose may be regenerated, a whole contract implementation or design doc shouldn't. It is refactoring with generation as its engine. Before the step a person makes or reviews the pins: what the previous version carries beyond its fixed points — the decisions and contracts it is held to — and what must not return, stated as meaning, never as wording or placement; in code the component's own tests are such pins, held fixed through the step. The context that holds the meaning regenerates. Another traces the result to its fixed points and pins and compares it with the previous version, listing what traces to nothing, what contradicts them, what is stated twice, what must not return and what is gone with no decision removing it, so that no context checks its own output; the person's review starts from that list, then reads the new version whole, as its reader, never the diff. A change that stays where its concept lives is patched instead, as on SD (AIFIRST-43). Because DD exists to be read — for evidence, for diagnosis, for feedback into the spec — and erosion accumulated edit by edit would cost it exactly that. Because a regeneration is closed over its inputs and misses what its pins miss, so choosing them is the open part, and a person's (AIFIRST-49). The fixed points are reviewed already, so a pin restating them is a second copy to review again; a pin holds what lives nowhere else. Pinned wording or placement holds the old structure in place, breaking the result where the step must change it. Because a context that regenerates from the pins alone carries only what they carry, while the blind spot to guard against is the check's: a context apart from the regenerating one catches what it shares with its pins, as the reviewer does for the developer (AIFIRST-44). Because tracing a new version to accepted decisions is closed work an agent does by rule, while what traces to nothing — where new meaning or erosion entered — and how the result reads are judged by fuzzy rules, a person's (AIFIRST-49); a diff between a piece and its regeneration is mostly noise either way. Because the fixed points are what make the rest safe to regenerate, so they change only against their kept version: a decision log entry by entry, a contract regenerated with a mechanical diff its check (AIFIRST-41). Accepting that pins carry the omission risk they exist to contain, and that no formal process chooses them; and that the regenerating context has read the previous version, so its wording may leak — the pins carry none, and the trace reads for it. Accepting that pinning tests are the component's own, not the suite (AIFIRST-14): they hold for one step and are not spec. Revisit the techniques themselves: pinning, tracing and comparison are what we use now, they are expected to change, and their design belongs to the workflows that run them rather than to this page. Rejected regenerating in a fresh context from the pins alone, which squeezes the meaning through its narrowest channel; pins restating what the fixed points hold, a second copy reviewed twice; a person auditing the whole new version against the decisions, work an agent does by rule.
Findings and public posture
AIFIRST-19. Superseded by AIFIRST-46.
AIFIRST-46. Route each finding to whoever keeps what it is against, and let it live as long as its answer. Nothing flows out of SD except findings, and no body's author changes the contract it is held to: a finding against the spec, a DD contract included, or the suite goes to people, through a design pass; one against an SD contract goes to the architect, as a licence (AIFIRST-40). Where SD's working behaviour contradicts a decision in the spec, neither side wins automatically: the conflict is such a finding, carrying the deployed behaviour as a fact rather than a proposal. Wanting a different contract is one of the more useful things generation can report, and it is still not a licence for generation to write one. A finding inside a pair's loop is the loop's, consumed there and tracked nowhere; one that leaves a loop is tracked where its answer is written until answered, then closes. A lesson that must outlast its answer goes where generation or review reads anyway — the spec, the suite, a contract's tests, the conventions, the reviewer's guidance — chosen by whoever answers it. Because an amendment made under release pressure is a design decision taken without the gates, and that is how the spec stops being the shared upstream; the architect, though SD's, writes no body and meets no release, so its changes come from where that danger is absent. Because a decision in the spec may be wrong — the reality check SD exists to provide — and SD may simply have improvised. Nothing about the conflict itself says which. Because a ledger every generation reads would be a second spec written by whoever filed findings, with no design pass behind it. Rejected every finding through a design pass with people, the architect's contracts included — a person in each loop that needs an API change; a findings ledger; every finding tracked, the loop's own included.
AIFIRST-20. Superseded by AIFIRST-47.
AIFIRST-47. Publish every repository, take contributions in flor and florete, and track each repository's work in it.
flor and florete are open to contribution. flor-dist and flor-bounds are public — for customer due diligence, and so that anyone running the product can read the contracts it is built on — but read-only, their trackers open to the team alone, people and agents. Every repository tracks the work that changes it; a contributor's door for code is flor, where a defect in SD is reported as a failing suite test, and an issue filed elsewhere by mistake moves to its repository at triage.
Because a patch to generated code would be discarded at the next regeneration, wasting the contributor's work, while a test survives every future implementation of that unit.
Because a finding filed where its answer is written is in its answerer's queue the moment it is filed.
Accepting that a public repository refusing patches must say so plainly, or every drive-by pull request is a small betrayal; and that whoever can write where an agent reads can put a prompt in front of it, which the harness has to answer.
Rejected one tracker in flor for all code work, every agent's queue a filter over everyone's; trackers open to everyone in repositories that take no patches, which invites the misfiled report.
AIFIRST-21. State provenance as the engineering model, not as an AI disclosure. The repositories and the product documentation describe the model and its current state: which contracts people keep and which the architect does, and which bodies DD writes. Version output and release notes carry none of it. Because "parts of this are AI-generated" is the sentence a slop project also writes, so as a disclosure it carries no information. The discriminating claim is accountability that can be read: every boundary has a keeper — people, or an architect whose every change answers a recorded need, passes another agent's review and is read by people; every change to the code is reviewed by someone other than its author before it merges; every defect found is pinned where no regeneration rewrites it; and the split between people and agents is stated with its reasons for each milestone and readable at any time. Rejected claiming that the boundaries are human-owned and the units being replaced by reviewed implementations — false of any product whose owner keeps boundaries with the architect for good (AIFIRST-38); the shares alone, which invite reading a low one as weakness when it may be an early product's right weighing.
Cadence
AIFIRST-22. Obsolete: what a release promises is a product's decision, not the doctrine's.
AIFIRST-23. Obsolete: how releases are versioned is a product's decision, not the doctrine's
AIFIRST-24. Obsolete: how security is assured is a product's decision, not the doctrine's.
AIFIRST-25. Do DD work in the gap after a release. Because scheduling DD alongside SD puts them in competition for the core team, which SD wins every time — it has customers where DD has principles. Accepting that a release with a long defect tail eats its own gap, which is exactly when a unit most needs moving.