Evidence

Greenfield Trial 1 — instrumented construction from frozen requirements

A time-entry system built from a frozen requirements package, with development-metrics instrumentation established before any implementation code was written.

What this was

Status
Complete
Repository
kemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction
Branch
claude/dev-metrics-instrumentation-dfnzhq
Ending commit
77a6952a5b4f
Executed by
Claude Code, configured model claude-sonnet-5, effort level high, permission mode auto, single remote session.

Objective

Take a bounded application from a frozen requirements package through to verified software, while capturing the raw evidence needed to compare architectural treatments later — rather than reconstructing numbers from memory afterwards.

Hypothesis

Instrumentation established before implementation produces comparable evidence. Instrumentation added afterwards does not.

Method

A metrics dictionary defining every metric's unit, collection mechanism, raw evidence source, derivation formula and known limitations was written and frozen first. Builds and test runs were then run through wrapper scripts that record exit code and duration to immutable JSON/log pairs; phase transitions, defects and AI reasoning errors were logged as they happened; repository snapshots were taken at each checkpoint. Only then was the application implemented.

Recorded metrics

59 / 59

Acceptance tests passing

Instrumented

Measures
Tests passing in the final recorded run, with zero failed, zero skipped and zero cancelled.
Collected by
Captured by a test wrapper script to an immutable JSON and log pair recording the command, timestamps, duration and exit code.
Does not show
A passing suite says what was verified, not what was missed. This suite was written by the same agent that wrote the implementation, and shares its blind spots.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/raw/tests/2026-09-02T23-44-05-163Z_final-suite_.json at claude/dev-metrics-instrumentation-dfnzhqprivate repository

$19.04

Recorded agent cost

Instrumented

Measures
Platform-reported cumulative cost for the session, in US dollars — the platform's own figure, not a token-math estimate.
Collected by
Read from the session usage API and written to the agent-session log with the reading's timestamp and source recorded alongside it.
Does not show
A cumulative mid-session reading covering BOTH the metrics-instrumentation task and the application implementation, taken while the session was still running. It cannot be attributed to the implementation alone and is not a total.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/raw/agent-sessions.jsonl at claude/dev-metrics-instrumentation-dfnzhqprivate repository

60,303,576

Recorded tokens

Instrumented

Measures
Total tokens for the session: 1,503 fresh input, 227,066 output, 58,825,031 cache reads and 1,249,976 cache writes.
Collected by
Read from the session usage API at the same checkpoint as the cost figure.
Does not show
Overwhelmingly cache reads, which are not comparable to fresh input tokens in cost or in meaning. Like the cost figure, it covers two tasks and is a mid-session reading.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/raw/agent-sessions.jsonl at claude/dev-metrics-instrumentation-dfnzhqprivate repository

4

Distinct legal transitions

Derived

Measures
Distinct from-state to to-state pairs the entry lifecycle permits: create, void, restore, and supersede by split or merge.
Collected by
Counted by a structural snapshot script whose counting rule is stored in the snapshot record itself.
Does not show
A regex-derived count over one implementation, with the counting rule recorded because it is a judgement. No AST parser existed when the metric was defined.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/raw/state-system/2026-09-03T00-59-15-753Z_fd2a013cb32a.json at claude/dev-metrics-instrumentation-dfnzhqprivate repository

24

Distinguishable rejection states

Derived

Measures
Named diagnostic variants: distinct reasons the system can refuse an action, each one a value rather than a thrown exception or a null.
Collected by
Counted by the same structural snapshot script, over the diagnostic union's variants.
Does not show
Counts how many refusals are distinguishable, not whether each one is correct or whether the set is complete.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/raw/state-system/2026-09-03T00-59-15-753Z_fd2a013cb32a.json at claude/dev-metrics-instrumentation-dfnzhqprivate repository

5

Agent reasoning errors logged

Self-reported

Measures
Misread requirements or invented rules, logged separately from ordinary defects whether or not they produced observable misbehaviour.
Collected by
Logged at the moment each was found, with category, what detected it, and the correction.
Does not show
A count of errors the agent noticed and recorded about itself. Errors it did not notice are, by construction, absent from this number.
Sourcekemiller2002/SDE-Engineering-Trial-1-Greenfield-Construction / metrics/ai-errors/AI-ERROR-LOG.jsonl at claude/dev-metrics-instrumentation-dfnzhqprivate repository

Findings

What this refuted

Anomalies, failures and confounders

Limitations

Interpretation

This trial's contribution is not its output. It is that the instruments were built and frozen before the work started.

A metrics dictionary defining every metric's unit, collection mechanism, raw evidence source, derivation formula and known limitations was written first, with a rule that no definition changes without a changelog entry. Builds and tests then ran through wrappers that write immutable evidence pairs. The result is that the numbers here are readings rather than recollections — which is the difference between this trial and the first two, whose work metrics are explicitly labelled manual reconstructions.

The dictionary was also wrong about something, and that is worth more than most of what it got right. Its first version stated that per-session cost data was not available to a running agent. It is; the session API exposes it. The correction sits in the changelog next to the original claim rather than replacing it, because a dictionary that silently redefines its own metrics makes every before-and-after comparison meaningless.

The agent-error log is the other thing worth copying. Five reasoning errors recorded separately from defects — a misread requirement or an invented rule, whether or not it produced misbehaviour. One of them is a small masterpiece of the genre: a commit hook designed to append each commit's evidence to a tracked file, which requires another commit to record, forever. The agent's own self-review did not catch it. The user's tooling did.

The cost figure needs its caveat read. It covers two different tasks in one number, taken mid-session. It is published because it is real and rare; it is not a cost-per-feature figure and nothing on this site treats it as one.

Source artifacts