Development with agents

How MediFlow is made.

MediFlow is designed and directed by Leonardo Pegollo. Most of the code is written by coding agents, Codex and Claude Code, working to his instructions. Intent, planning and choices are his, while agents write the code.

No decision is implicitly delegated. When Leonardo authorises a coordinating agent to merge during a work session, he sets written conditions: required checks must pass, no review comments may remain open, and local verification must be complete. Outside these conditions, the merge remains his.

Canonical disclosure in the repository ↗

01 · Responsibilities

Who does what.

Development stages and responsibilities
StageWho does itWhere to see it
Intent: which problem to solve, and for whomLeonardoIssues, PRODUCT.md ↗
Planning and architecture: boundaries, data, security, contractsLeonardo, with agents proposing alternativesADRs ↗, ARCHITECTURE.md ↗
Writing code and testsCoding agentsCo-Authored-By trailers, model and tool in PRs
Evidence required to accept a changeLeonardo sets it, agents and CI run itEvidence and Not verified sections in PRs, CI workflows
Acceptance and mergeLeonardoGitHub PR history
Releases and communicationLeonardoRelease notes ↗, website

“Assisted” does not mean a person has read every line. It means a person decided what to build, how it should work and which evidence would make it acceptable.

Author’s principles and attribution
  • Intent before code.
  • Evidence of observable behaviour. Unverified work is declared.
  • One problem per PR, with a recognisable purpose.
  • Local first, without real patient data in the repository.
  • Physicians must understand actions and consequences.
  • Of two correct solutions, choose the simpler one.

Since 6 November 2026, commits written with agents name the model in Co-Authored-By, while PRs name the model and tool. Earlier commits do not always do this. Others’ ideas and code retain their sources and licenses. Automated tests and reviews do not replace Leonardo’s decisions or establish clinical validation.

02 · Development usage

The context processed by models.

Snapshot 2026-11-06

39,835,292,569recorded tokens

Context processed to develop MediFlow, including cache. Partial coverage in both recording environments.

Monthly tokens by inferred providerFebruary to November 2026, November is partial. Exact values are in the table below.036912Billions of tokens2026-02 · OpenAI: 392,724,5532026-02 · Anthropic: 0Feb2026-03 · OpenAI: 1,143,437,7232026-03 · Anthropic: 0Mar2026-04 · OpenAI: 1,300,702,1472026-04 · Anthropic: 0Apr2026-05 · OpenAI: 1,650,113,9932026-05 · Anthropic: 0May2026-06 · OpenAI: 327,263,5942026-06 · Anthropic: 0Jun2026-07 · OpenAI: 4,848,219,9082026-07 · Anthropic: 713,927,967Jul2026-08 · OpenAI: 10,701,770,8672026-08 · Anthropic: 15,445,581Aug2026-09 · OpenAI: 8,317,602,7022026-09 · Anthropic: 0Sept2026-10 · OpenAI: 4,706,851,2502026-10 · Anthropic: 2,435,537,918Oct2026-11 · OpenAI: 1,208,873,4222026-11 · Anthropic: 2,072,820,944Nov
OpenAIAnthropic2026 · November partial · provider inferred from the model name
Exact values by month and provider
Recorded tokens, cache included
MonthOpenAIAnthropic
2026-02392,724,5530
2026-031,143,437,7230
2026-041,300,702,1470
2026-051,650,113,9930
2026-06327,263,5940
2026-074,848,219,908713,927,967
2026-0810,701,770,86715,445,581
2026-098,317,602,7020
2026-104,706,851,2502,435,537,918
2026-111,208,873,4222,072,820,944

These records belong to verified MediFlow checkouts: other projects and uncertain attribution are excluded. A mixed conversation can include ancillary work. Records are not allocated to releases, PRs or commits.

Tokens do not measure spending, subscription quota, code produced or quality. Reused context can be counted repeatedly. The provider is inferred from the identifier: it does not verify endpoints, billing or the actual model behind an alias.

Sources, coverage and models
Recording environments, separate from providers
Environment and sourcePeriodTokenCache read, included
CodexCodex local token records + historical CodexBar 0.60.32026-02-02 → 2026-11-06Partial coverage34,535,287,18733,279,168,239
Claude CodeClaude Code local response records2026-07-02 → 2026-11-06Partial coverage5,300,005,3825,193,631,015

Collection stopped on 27 September 2026 at 14:38:12 UTC. Sums reconcile but do not establish complete history. Days without records do not prove inactivity. Accounting exclusivity between delegating environments is not established: the total describes records, not billed consumption.

Main history by model identifier
Recorded modelToken
gpt-5.6-sol12,211,328,660
gpt-6.1-sol4,855,747,622
gpt-5.6-luna4,619,511,014
claude-opus-5-54,486,046,993
gpt-6-astra3,717,615,402
gpt-5.6-terra2,795,376,702
gpt-5.52,633,091,591
gpt-5.42,216,054,201
claude-fable-5682,998,672
gpt-6-sol537,845,199
gpt-5.3-codex364,611,684
gpt-daybreak-blue-latest218,213,893
gpt-6.1-terra212,047,937
gpt-6-luna126,448,014
gpt-5.2-codex78,566,024
claude-sonnet-5-521,384,143
claude-opus-4-821,305,602
claude-sonnet-518,485,147
gpt-5.210,892,125
claude-opus-56,584,127
claude-haiku-5-5927,726
gpt-5.3-codex-spark210,091
Recorded effort: separate, partial series

2026-09-03 to 2026-11-06: 9,822,318,975 tokens in 67,091 Codex responses. 130 indexed files were missing. Do not add this series to the main history or use it to subdivide that history.

Effort is the reasoning level recorded in the response context, not actual work or quality. Levels from different models are not equivalent. “Not recorded” means missing data. No effort is reconstructed for Claude Code or other records.

Provider, model and effort in the separate series
ProviderModelEffortToken
OpenAIgpt-6-astraultra2,191,566,524
OpenAIgpt-6.1-solhigh1,301,952,626
OpenAIgpt-6.1-solxhigh1,129,553,499
OpenAIgpt-5.6-solultra982,521,161
OpenAIgpt-6-astramedium771,521,299
OpenAIgpt-5.6-solmedium611,967,864
OpenAIgpt-6-solmedium558,849,533
OpenAIgpt-6-astramax484,405,483
OpenAIgpt-5.6-terramedium436,645,403
OpenAIgpt-5.6-lunamax175,251,858
OpenAIgpt-6-astralow175,076,068
OpenAIgpt-5.6-solxhigh162,693,375
OpenAIgpt-6-astraxhigh143,338,807
OpenAIgpt-6-lunamedium136,135,783
OpenAIgpt-6.1-solmax124,015,193
Non determinatochatgpt-web/proultra106,373,221
OpenAIgpt-daybreak-blue-latestxhigh90,476,076
OpenAIgpt-6.1-terraxhigh79,001,283
OpenAIgpt-daybreak-blue-latesthigh48,609,639
OpenAIgpt-5.6-lunamedium38,184,213
OpenAIgpt-6.1-solmedium23,980,438
OpenAIgpt-6.1-terrahigh18,897,014
OpenAIgpt-6-astrahigh15,802,168
OpenAIcodex-auto-reviewlow12,512,044
Non determinatounknownNot recorded1,647,964
OpenAIgpt-5.6-sollow1,340,439

Public JSON dataset ↗ · Method, tables and limits in the repository ↗

03 · Inside the code

A map to find your way.

Open the full-page map ↗

Read what a structure does, explore its steps and compare descriptions with the source code and documented limits.

Twelve structures, one local system
Read details ↓

The path of data12 / 12

Opens the record for the physician and receives requests from other applications.01Pages and entry pointsMakes data, actions and the state of work readable.02Shared interfaceExtracts text and references to the original document passages.03Document readingCoordinates intelligent functions and returns proposals to assess.04AI FabricLets the physician compare the proposal with its source and choose data.05Physician reviewApplies operation rules and boundaries between proposal and recording.06Clinical rulesStores data and checks the archive structure when opening it.07Archive and migrationsChecks who can see or change data and under which conditions.08Access and protectionOffers external tools named operations under MediFlow’s control.09Headless and MCPAdapts the record to native environments through shared contracts.10Native clientsMakes catalogues available with identifiable sources and versions.11Catalogues and sourcesMakes behaviour and code-boundary checks repeatable.12Tests and evidence

Hover to read. Click to enter.

Conceptual path: extraction → proposal → review → explicit write operation. A proposal alone does not record diagnoses or therapies. Availability and permissions depend on the individual workflow.

Keyboard: Tab through structures, Enter to go inside, ← or Esc to return. Arrow keys switch tabs. On a phone, use the index and steps.

Descriptions written by an agent (GPT-6.1 Sol). Approved by Leonardo Pegollo on 2026-11-06. Map data (JSON) ↗

04 · Credits

Credits and sources.

T3 Code inspired the agent-assisted development disclosure, the PR template and the practice of evaluating evidence. T3 Code ↗ · Canonical MediFlow credits ↗

The map’s visual grammar draws on “Rivers of Empire” by FleetingBits and System Atlas by Harshyt Goel. Isometric geometry and structures adapted from System Atlas (MIT). License and copyright ↗