Theory Driven Development

Every product is a theory.

You build something for some people because you believe it will change something for them, and you know what would show it. Most teams keep that theory in their heads while the product keeps evolving around it. Artyfact writes it down as part of a multi-level model, builds against it, checks the work and watches what happens. A spec describes information; a theory carries meaning.

We build loyalty points for returning shoppers because we believe they come back to buy again, shown by repeat orders within 30 days.

unknownMeasurement in progress. Nothing measures the indicator yet.

A product theory, written as one claim. Sample data.

How a change moves.

Theory, build, check, ship, observe, then revise the theory. Open a step to see what Artyfact does there. See how work flows, phase by phase

  1. Write the theory down EvolutionPropose a change to the model and agree on it before any code.

    An Evolution is a proposed change to the model. Ask your agent for one, then review the purpose, the claims it touches and the criteria the work must meet. Accepting it records a new Genome revision.

  2. Build against it Realization · TasksSplit the accepted change into Tasks for one or more agents.

    A Realization is a build plan pinned to the accepted Genome revision. It breaks the work into Tasks. Each Task names its subjects, the paths it may read and write, and its dependencies. Each Task gets its own Git fork with one active writer.

  3. Check the work verdictsRun the checks bound to the model’s criteria.

    Each agent submits a candidate: one submitted version of its Task’s work. Checks bound to criteria give a verdict: pass, fail, unknown, stale or waived. Only a pass is green. A check that did not run stays unknown, and unknown blocks.

  4. Ship the combined result promoteReview the integrated implementation, then promote it.

    Select a candidate for each Task, integrate them and review the result against the accepted Genome. To promote is to make the reviewed result the System’s current state, and only if nothing changed since the review. It is a separate approval from accepting the Evolution. Deploying is a separate step again.

  5. Watch what happens PhenomeSee what each deployment did.

    The Phenome links runtime events and deployments to the commit that produced them. A deployment or an event alone does not prove an outcome. Measuring claim indicators is in progress.

  6. Revise the theory claim statusUpdate what you believe, then start the next change.

    Record whether the evidence supports or challenges the claim, or leaves it inconclusive. The next Evolution names the claims it affects, so the theory and the product move together. A product keeps evolving with the people who build and use it, so the theory does too.

What a theory is made of.

A purpose says why the product exists and for whom. Claims say how you expect to get there, in fields a check can read. This is the loyalty points claim from the card above, as it would sit in theory.yaml.

Loyalty points bring shoppers back

A claim
What we build mechanism
Shoppers earn points on every order and spend them on the next one.
For whom beneficiaries
Returning shopper
What should change outcome
More shoppers come back to buy again.
How we would see it indicator
Share of shoppers with a repeat order within 30 days.
How we would judge it evaluationMethod
Compare the 30-day repeat rate before and after launch.
What could fool us limitation
Seasonal sales also move repeat orders.
Where it stands status
unknown Measurement in progress.

Four honest answers

  • unknownNot tested yet. Every claim starts here.
  • inconclusiveTested; the evidence does not decide it.
  • supportedThe evidence agrees. Still a hypothesis.
  • challengedThe evidence disagrees. Time to revise.

None of them is green. Measuring indicators automatically is still being built, so today every claim on this page reads unknown.

Gaps get flagged

A Rule Pack is a set of automated checks over the model. The theory@1 pack reads every claim that is not deferred.

  • theory.indicatorNo indicator: nothing would show the claim works.
  • theory.methodNo evaluation method: no way to judge the indicator.
  • theory.beneficiaryNo one named who should benefit.
  • theory.outcomeUnlinkedNo criterion or requirement points at the claim.

Artyfact’s own model has claims like this. claim.evidence-gate, “Evidence before green”, says a promote that treats unknown as blocking keeps unverified changes off the System head. Its status is unknown.

The vocabulary: a multi-level model.

The ontology is the vocabulary. The theory is what you write in it. It defines the kinds, from a whole System down to one Affordance, plus the purposes and criteria that attach to them. Here they are filled in with this page.

System · the whole productArtyfact
Thing · one app you deployPublic site
Section · related partsPublic pages
Page · /modelA model that can explain itself.

Purpose: explain Artyfact and how its model works.

ComponentOntology explanation

This very explanation has expectations of its own.

  • Represent Artyfact accuratelyUse its real subjects, boundaries and relationships.
  • Communicate clearlyHelp a reader connect purpose, structure and evidence.
  • Make the visual compellingMake the nesting tangible, legible and usable at every size.
Affordance · something you can doInspect the parallel views

A Thing is one app or service you deploy. A Section groups related parts of it. An Affordance is something a person can do on screen.

These subjects and criteria are declared in the repository’s genome/ tree, and the component serves purpose.explain-artyfact. Declaring a criterion does not show that readers’ needs were met.

Three views of the same model.

Genome is what it should be: the theory and ontology. Proteome is what is being made: your agents and the code they write. Phenome is what it does: the running product you observe and measure. They are views you can open at any time, not stages one after another. The loop is how a change moves through them.

Declared in the Genome

Explain Artyfact clearly

Artyfact System
Same component in every viewOntology explanation on this model page

What it should be · Genome

What should this explanation achieve?

The canonical Genome names this page, its explanation component, its purpose and three criteria.

PurposeExplain Artyfact and how its model works.

Subjectcomponent.model-explanation inside page.model.

CriterionRepresent Artyfact accurately, communicate clearly and make the visual compelling.

These criteria are declared expectations. Clarity and visual quality still need human review.

What is being made · Proteome

Your agents do the making.

Agents can work on the words, illustration and controls, then check that version and submit it for review.

Acceptance checkGiven this model page, its named subjects and criteria agree with the canonical Genome; all three views remain readable without JavaScript.

WorkWrite, render and refine this explanation.

CheckRun content, accessibility and responsive checks.

ReviewAsk readers whether the words and visual help.

This describes the work and checks, not an agent running or a passing result.

What it does · Phenome

What do readers actually understand?

A future observation could connect a reader’s visit, exploration and feedback to this component and page version. The sequence below is illustrative, not live Artyfact telemetry. Example reference: example-model-01.

  1. Page read
  2. Views explored
  3. Reader feedback
  4. Understanding reviewed

Visits and clicks alone cannot establish clarity or visual quality. Reader feedback remains unmeasured here.

Three views of the same component at the same time, not steps one after another.

Why write the theory down?

People and agents work from the same reasons instead of guessing them.

Context agents can useEach Task arrives with its scope.

A Task Packet carries the pinned Genome version, the model nodes the Task reads and writes, the paths it may change, its steps, its checks and its dependencies. The agent does not have to rebuild that from source files. Once the model says where and what to change, the code is mostly translation, so a simple Task can go to a cheaper model.

Changes keep their reasonAn Evolution names the claims it affects.

A change moves from request to code to review with its reason attached. When the theory changes, you can see which work it touched.

Gaps show earlyRule Packs flag a claim with nothing to measure.

A claim with no indicator, no method or no beneficiary is flagged before anyone builds it. Every agent and reviewer checks against the same modeled rules.

Evidence stays honestUnknown is a real answer.

Checks give verdicts and claims carry a status. Only a pass is green. A deployment is not an outcome, and a passing check establishes only what that check measured.

Keep the answers separate.

  • Does it represent Artyfact?Compare the explanation with the canonical model and implementation.
  • Does the page work?Check this version for usable controls, accessibility and responsive layout.
  • Does the explanation help?Ask readers. That indicator is not measured yet.

Where it lives.

The model sits next to your code in Git. A Thing can start with its model alone, before any Parts or source code.

Cloudflare
Source can be versioned through Cloudflare Artifacts, its Git-compatible repository service. A Thing maps to one or more artifacts, such as a Worker with static assets. A logical subject is not a deployed resource; source, build output and running resources stay distinct. See how it runs on Cloudflare
Parts
Reusable model content, files and pinned dependencies that a Thing can compose. Composition records where each piece came from.
Rule Packs
Checks over the model, such as theory@1 for claims. The bundled authorization pack checks modeled policy coverage, not deployed security.

Write the theory. Hand it to your agents.

A Task Packet carries the pinned Genome version, the Task’s model nodes, paths, steps and checks into your agent’s workspace.