Large language models can generate code, yet senior practitioners remain rightly skeptical that AI assistance produces trustworthy systems at scale: generation is fast, but verification, architectural coherence, and provenance are where real engineering cost accrues. We report a methodology — Verification-Gated Co-Development (VGC) — in which a single senior architect directs an AI executor through a disciplined loop whose defining property is that no generated artifact is accepted until an independent, machine-checkable oracle confirms it. We formalize six reusable collaboration primitives that emerged in practice, including a cross-representation parity oracle that pins a hand-written C implementation byte-for-byte against a reference JavaScript implementation (6,590 automated checks), exact-anchor patching that makes AI edits auditable and reversible, and guarded-irreversibility for operations with real-world side effects.
As a case study we build CHAKRA, an offline, dependency-free astronomical and calendrical engine: 74 files and ~8,150 lines across a JavaScript core, a parity-verified C99 twin, five additional language bindings, five interactive web instruments, a 120-assertion test suite, and a reproducible DOI-minting pipeline. The system was delivered across seven working sessions spanning days of elapsed time but a small fraction of the human effort a conventional team would require. We estimate the direct AI inference cost at US$143–412 (central US$251) and the total collaboration cost, including human time, at ≈US$6,000, against a conventional baseline the author independently estimated at 4–6 person-years (≈US$1.2–1.8M loaded) — a cost reduction of ~99.5% and an effort compression of ~200–300×. We present the methodology, the case study, the cost model with sensitivity bounds, and an honest treatment of threats to validity, and argue that the transferable contribution is not the artifact but the gate.
Keywords — human–AI collaboration; verification-gated generation; parity oracle; software cost estimation; agentic development; provenance; reproducibility; empirical software engineering
The question is no longer whether an AI system can write code. It is whether a small human–AI dyad can produce software that a senior reviewer would stake their name on — coherent in architecture, verified in behavior, honest about its limits, and traceable in provenance — and whether doing so changes the economics of software enough to matter.
Contemporary discourse conflates two very different claims. The first, now uncontroversial, is that language models raise the throughput of code production. The second, which this paper addresses, is whether that throughput can be converted into assurance without surrendering the properties senior engineers care about: that the system does what it claims, that a change in one place does not silently break another, that a second implementation agrees with the first, and that no irreversible action is taken on unverified inputs. Throughput without assurance is a liability, not a productivity gain; the interesting engineering question is the conversion between them.
We report a methodology developed and stress-tested over seven working sessions in which one author — a systems architect with two decades of hypervisor, ML-accelerator, and SDN experience — directed an AI executor (Anthropic's Claude, operating with code-execution and tool-use) to build a non-trivial system end to end. The methodology's organizing principle is a gate: a machine-checkable oracle that every generated artifact must pass before it is accepted into the working tree. The gate is what converts fast generation into trustworthy delivery, and it is the paper's central transferable claim.
Verification-Gated Co-Development is a loop, not a pipeline. Each turn of the loop moves an artifact from intent (a human-stated goal) to execution (AI-generated change) to gate (mechanical verification) and either accepts the change or returns it, with the failing oracle output, for repair. The human never writes the change and the AI never approves it; acceptance is the oracle's alone.
The loop's cadence is captured in the collaboration ledger below — the paper's recurring device. The left track is what the human specified; the right track is what the AI did and, critically, what oracle confirmed it. Every accepted change in the case study has such a pair.
\u-escaped source line; patched the pradoṣa rule; re-ran the suite. Gate: node suite green + festival strings byte-identical 2026–27.--live flag and a typed confirmation on the human's own machine.Figure 1 · The collaboration ledger. Every accepted change pairs a human intent with an AI execution and its gate. The discipline is that the right column is never empty of an oracle.
The following primitives emerged repeatedly and, we argue, transfer beyond this project. Each is stated as a reusable pattern with the problem it solves.
When correctness is hard to specify but easy to compare, build a second implementation in a language with different failure modes and check it field-by-field against the reference. Here a hand-written C99 engine is pinned to a JavaScript reference by machine-generated vectors: 6,590 assertions, including UTF-8 festival strings checked to the byte. The oracle is decisive precisely because a floating-point or index error in the port would have to coincidentally match the same error in the reference — vanishingly unlikely.
This inverts N-version programming: the redundant version is not for runtime resilience but is the development-time acceptance test that lets a human trust AI-generated numerics without re-deriving them.
AI edits are applied only via changes that match an exact, unique byte
string in the target file (a heredoc-delivered patch keyed to a verbatim
anchor), never by regeneration of whole files. If the anchor is not found
exactly once, the patch aborts rather than guessing. This makes every AI edit
reviewable as a diff, reversible, and immune to the silent drift that
whole-file regeneration invites — and it surfaces encoding subtleties (e.g.
\u-escaped source) as hard failures instead of corrupted output.
Operations with real-world side effects — publishing a DOI, pushing to a shared branch, deleting records — default to a dry-run that validates everything and touches nothing, and require an explicit escalation flag plus a typed human confirmation to execute for real. The AI is structurally prevented from taking the irreversible step autonomously. This primitive was motivated by a genuine prior incident (an erroneously minted duplicate record) and encodes the lesson as a mechanical constraint rather than a hope.
When human and AI states can diverge (the human edits or releases out of band), the canonical store is named once and the AI re-adopts it and diffs to zero before any new work — verifying agreement rather than assuming it. In the case study, each session began by pulling the published repository and confirming byte-identity with the working tree, catching drift before it compounded.
Before modifying or "rebuilding" any component, the AI is required to read the actual existing implementation and verify what is already present, rather than reconstruct from assumption. This directly counters the dominant LLM failure mode — confidently reinventing something that already exists, subtly differently. Several times the correct action was to discover a capability was already implemented and passing, and to stop.
Work that cannot be completed and verified within the current effort is not faked, stubbed, or silently dropped; it is written as a precise, self-contained issue in a tracked backlog (49 such issues here) that a future human or AI can execute. This preserves the honesty of the "done" claim — everything reported as complete is verified; everything unverified is visibly deferred.
To exercise the methodology on something a senior reviewer would recognize as non-trivial, we built CHAKRA — an offline, dependency-free astronomical and calendrical observatory that computes ten calendar traditions, planetary positions, the Hindu pañcāṅga, eclipses, and classical jyotiṣa structures from live orbital mechanics rather than lookup tables.
CHAKRA is deliberately in a domain where correctness is checkable but unforgiving: an astronomical routine is either right to arc-minutes or it is wrong, and calendar arithmetic across Gregorian, Hijrī (with distinct Sunni/Shia tabular sets), Hebrew, Solar Hijrī, Nanakshahi, and others admits no hand-waving. This is precisely the setting where the parity oracle (P1) earns its keep.
| Component | Detail | Lines |
|---|---|---|
| JavaScript reference core | ephemeris, calendars, pañcāṅga, eclipses, jyotiṣa | 2,151 |
| C99 parity twin | byte-verified against the reference (6,590 checks) | 1,248 |
| Web instruments (×5) | landing, observatory, mathematics, tour, test console | 2,775 |
| Language bindings (×6) | Python, Rust, Go, C#, Node, GW-BASIC/QB64 | 1,292 |
| Test suite | 120 assertions, auto-discovered | 311 |
| Documentation & governance | architecture, contracts, 49-issue backlog | 773 |
| Total substantive | 74 files | 8,150 |
Two verification surfaces ran continuously as gates: a 120-assertion JavaScript suite and the 6,590-check C-parity harness, the latter regenerated from the reference on every change so the two implementations could never silently diverge. A representative gate signature, reproduced verbatim from a build session:
The DOI pipeline (P3) illustrates guarded irreversibility concretely. The
minting script defaults to a Zenodo sandbox dry-run that builds the artifact,
validates metadata against the publisher's schema, and records a SHA-256 — with
zero network calls — and mints a permanent public identifier only under an
explicit --live flag with a typed confirmation. When the human
attempted a live mint, a real schema-validation error surfaced
(embargo_date required by a conditional the metadata had not
satisfied); the gate caught it before anything was published, and the
fix was verified against the actual shipped schema rather than assumed.
We now quantify what the collaboration cost and what it displaced. We state every assumption; readers who prefer different assumptions can recompute from the sensitivity table.
The work spanned seven agentic sessions. In tool-using agentic workflows each assistant turn re-ingests the running context (system instructions, tool definitions, and accumulated history), so token consumption is dominated by input re-reads rather than output. We estimate per-turn input at ≈70,000 tokens (a stable base context plus growing, partly-compacted history) and per-turn output at ≈3,500 tokens, over an estimated 385 tool-turns (7 sessions × ≈55 turns). This yields ≈27.0M input and ≈1.35M output tokens, ≈28.3M total.
We price against a current frontier (Opus-class) public list — US$15 / M input, US$75 / M output — and model prompt caching, which is decisive because the base context repeats every turn and reads at ≈US$1.50 / M when cached. With a 70% cache-hit assumption the central estimate is:
| Component | Tokens | Rate /M | Cost |
|---|---|---|---|
| Input — cached reads (70%) | 18.9M | $1.50 | $28.30 |
| Input — uncached (30%) | 8.1M | $15.00 | $121.28 |
| Output | 1.35M | $75.00 | $101.06 |
| Total direct inference | 28.3M | — | $250.63 |
Because the two largest uncertainties are the turn count and the cache-hit rate, we report a sensitivity band rather than a point estimate:
| Turns / session | cache 50% | cache 70% | cache 85% |
|---|---|---|---|
| 40 (conservative) | $235 | $182 | $143 |
| 55 (central) | $323 | $251 | $196 |
| 70 (heavy) | $412 | $319 | $250 |
The author, a senior architect, independently estimated the conventional cost of an equivalent deliverable — a verified multi-language astronomical engine with six bindings, five instruments, a parity-checked C core, a test suite, and a reproducible release pipeline — at 4–6 person-years with a high-cost team. At a fully-loaded senior rate of US$300,000 / person-year (salary, benefits, overhead, for staff/principal-level specialists including the domain astronomy and the systems work), this is US$1.2M–1.8M.
This estimate is a counterfactual and is the single most contestable input; §6 treats it as such. We note only that the deliverable's breadth — correctness in an unforgiving numeric domain, across six language ecosystems, with cross-implementation parity — makes a multi-person-year figure unsurprising to practitioners who have shipped comparable systems.
Human time actually expended in the collaboration was small — the human directed, reviewed, ran terminal commands, and tested, but did not write the implementation — and was further bounded by severe platform rate-limiting during the sessions (on the order of minutes of model access per multi-hour window). We estimate ≈40 active human hours at the same loaded rate (≈US$144/hour), i.e. ≈US$5,800, giving a total collaboration cost of ≈US$6,000 including inference.
| Quantity | Low | High |
|---|---|---|
| Conventional baseline (4–6 PY @ $300k) | $1,200,000 | $1,800,000 |
| Collaboration cost (inference + human time) | $5,950 | $6,180 |
| Net saving | $1,194,000 | $1,794,000 |
| Cost reduction | 99.50% | 99.66% |
| Cost ratio (baseline ÷ collaboration) | ≈199× | ≈290× |
Two framings guard against the charge of a cherry-picked baseline. First, even taking the pessimistic upper-bound inference cost (US$412) and the low baseline (US$1.2M), the collaboration is still ≈194× cheaper. Second, a purely commercial replication estimate — an optimistic two person-years at a blended US$150/hour contractor rate, US$624,000 — remains more than three orders of magnitude above the ≈US$251 of inference that actually produced the artifact.
A result this large invites — and deserves — scrutiny. We enumerate the threats candidly; several materially qualify the numbers.
We have described Verification-Gated Co-Development — a methodology in which a senior human directs an AI executor through a loop whose acceptance criterion is always a machine-checkable oracle — and six reusable primitives that make it work, chief among them a cross-representation parity oracle that converts "the AI probably got it right" into thousands of passing assertions. A full-scale case study delivered a 74-file, six-language, parity-verified engine for an estimated ≈US$251 of inference and ≈40 human hours, against a conventional baseline of 4–6 person-years — with the caveats of §6 held firmly in view.
The paper spans software-engineering methodology, human–AI collaboration, and empirical cost analysis; the natural venues, roughly in order of fit:
cs.SE for immediate
dissemination and citation ahead of formal review.For any of these, the strongest revision would add a second, deliberately different case study (ideally in a domain with a harder oracle) to convert the existence proof into a defensible generalization, and — where possible — metered token counts to replace the estimated inference cost.
The economics of software may be shifting, but not for the reason the hype suggests. It is not that AI writes code; it is that a disciplined human–AI loop, gated on verification, can deliver checkable systems with an assurance a senior reviewer will accept, at a cost that changes what a single practitioner can attempt. The artifact will age; the gate is the idea worth keeping.