<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hiroyuki Nakahata</title>
    <description>The latest articles on DEV Community by Hiroyuki Nakahata (@iroha1203).</description>
    <link>https://dev.to/iroha1203</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3921684%2Fcab17604-1229-4140-9f59-6258bb7b1ac3.jpeg</url>
      <title>DEV Community: Hiroyuki Nakahata</title>
      <link>https://dev.to/iroha1203</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iroha1203"/>
    <language>en</language>
    <item>
      <title>Universality Lives in Structure</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Tue, 18 Aug 2026 14:04:41 +0000</pubDate>
      <link>https://dev.to/iroha1203/universality-lives-in-structure-3fcc</link>
      <guid>https://dev.to/iroha1203/universality-lives-in-structure-3fcc</guid>
      <description>&lt;p&gt;If you are a software engineer, you have probably dreamed of building something general — software that many people use.&lt;br&gt;
An open-source project with ten thousand GitHub stars.&lt;br&gt;
A social network with hundreds of millions of users.&lt;br&gt;
The mission-critical systems that move the world.&lt;br&gt;
And the operating systems that hold it all up.&lt;br&gt;
In the world of software, we tend to speak of value as "usable in more cases."&lt;br&gt;
And generality is, in practice, genuinely important.&lt;/p&gt;

&lt;p&gt;But generality does not last forever.&lt;/p&gt;

&lt;p&gt;Flash, once at the height of its glory, faded with its era.&lt;br&gt;
XML, built to be the general standard, lost the mainstream to another format.&lt;br&gt;
jQuery, which once ran nearly every page on the web, is rarely chosen for anything new.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generality depends on the breadth of its cases
&lt;/h2&gt;

&lt;p&gt;Generality means covering many cases.&lt;br&gt;
A web framework like Rails or Laravel can build most web applications on its own.&lt;br&gt;
If I were advising a beginner, I would point them to one of these first; learn it, and some kind of work will be within reach.&lt;/p&gt;

&lt;p&gt;But this "many cases" keeps shifting with the times.&lt;br&gt;
SPAs, PWAs, WebAssembly.&lt;br&gt;
So generality, by its nature, erodes with time.&lt;br&gt;
All things are impermanent, as the Buddhist phrase goes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is there anything that does not change?
&lt;/h2&gt;

&lt;p&gt;Here, instead of adding more cases, try changing the conditions under which you look.&lt;br&gt;
Change the era.&lt;br&gt;
Change the culture.&lt;br&gt;
Change the representation.&lt;br&gt;
Change where you observe from, and at what resolution.&lt;br&gt;
Then you start to see what changes and what does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relativize, and the essence remains
&lt;/h2&gt;

&lt;p&gt;What remains, then?&lt;br&gt;
For Rails, perhaps its conventions.&lt;br&gt;
Even as eras and cultures change, governing a codebase by convention keeps its value.&lt;br&gt;
For React, perhaps what remains is having brought the pure function — an idea from functional programming — to the frontend.&lt;br&gt;
Rendering the view as a pure, idempotent function is a benefit that outlives the era.&lt;/p&gt;

&lt;p&gt;Only by changing how you look does the outline of the universal become visible.&lt;br&gt;
This is not to say that everything is relative.&lt;br&gt;
We relativize in order to learn what is not relative.&lt;br&gt;
What survives relativization — that is universality.&lt;/p&gt;

&lt;h2&gt;
  
  
  The essence of Buddhism
&lt;/h2&gt;

&lt;p&gt;Buddhism is said to be some 2,500 years old.&lt;br&gt;
Over that long history it spread across East Asia and divided into many schools.&lt;br&gt;
Doctrine, practice, precepts — they differ from school to school.&lt;br&gt;
What survived was not the answers.&lt;br&gt;
It was the questions.&lt;/p&gt;

&lt;p&gt;Why do we suffer?&lt;br&gt;
Where does attachment come from?&lt;br&gt;
What is the self?&lt;br&gt;
How should we live?&lt;/p&gt;

&lt;p&gt;The form varies, school by school, relative to place and age — and something does not.&lt;br&gt;
The questions themselves are the universality.&lt;br&gt;
The teaching that preached impermanence has itself lasted 2,500 years.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lehman's questions
&lt;/h2&gt;

&lt;p&gt;Back to software.&lt;br&gt;
Fifty years ago, Meir Lehman published his laws of software evolution.&lt;br&gt;
Eight laws, describing how software that is used in the real world goes on changing.&lt;br&gt;
Software in use must keep changing, or it loses its value.&lt;br&gt;
The more it changes, the more complex it becomes.&lt;br&gt;
Features keep growing, and without upkeep, quality appears to decline.&lt;br&gt;
Evolution proceeds through layers of feedback.&lt;br&gt;
There was also a law that said the work rate of a development organization holds roughly constant.&lt;/p&gt;

&lt;p&gt;Not all eight laws are universal.&lt;br&gt;
Change the condition called "era," and they separate: some remain, some age.&lt;br&gt;
The constant-work-rate law aged.&lt;br&gt;
It was a statistic drawn from the development organizations of its day, and those organizations no longer exist.&lt;br&gt;
Right now, AI is changing the work rate itself.&lt;br&gt;
But the law that software in use keeps changing — that law remains.&lt;br&gt;
It is not a statistic; it follows from the relationship between software and the world.&lt;br&gt;
Software connected to reality changes the world, and then has no choice but to keep adapting to the world it changed.&lt;br&gt;
That round trip does not disappear, however many languages and frameworks come and go.&lt;br&gt;
What Lehman left behind was not the statistics of an era, but the questions born of a relationship with the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  The age of AI
&lt;/h2&gt;

&lt;p&gt;We are living through a turning point.&lt;br&gt;
AI now writes code faster than humans do.&lt;br&gt;
AI is good at finding what is common across vast amounts of data.&lt;br&gt;
The pace at which general software and frameworks appear will quicken dramatically.&lt;/p&gt;

&lt;p&gt;But by the same token, the era itself turns over faster.&lt;br&gt;
The tips that count as general in August may be obsolete by December.&lt;/p&gt;

&lt;p&gt;What lasts? What holds when the conditions change?&lt;/p&gt;

&lt;p&gt;Precisely because this is the age of AI, universality is what holds value.&lt;/p&gt;

&lt;h2&gt;
  
  
  AAT: Algebraic Architecture Theory
&lt;/h2&gt;

&lt;p&gt;What survived in Buddhism, and what survived in Lehman, was questions.&lt;br&gt;
Then what do the answers look like — the ones that withstand the questions and remain?&lt;br&gt;
I believe they take the form of structure.&lt;br&gt;
Looking back: Rails' conventions, React's pure functions — both were structures.&lt;/p&gt;

&lt;p&gt;AAT, the theory I work on, is in pursuit of universality.&lt;br&gt;
It is an attempt to read the structure of software architecture in the language of algebraic geometry.&lt;br&gt;
What it measures is the gap between the parts and the whole.&lt;br&gt;
Each individual change is correct, and each passes review.&lt;br&gt;
And yet the whole, glued together, is somehow broken.&lt;br&gt;
AAT gives that phenomenon — the one every engineer has lived through — mathematical form.&lt;/p&gt;

&lt;p&gt;Software metrics are usually decided by people.&lt;br&gt;
We agree on a way of computing something, and then we measure it.&lt;br&gt;
That is why metrics are countless, and why the answer to "why measure this one?" is weak.&lt;br&gt;
The quantity at the center of AAT is a little different.&lt;br&gt;
Pose the question — why can the parts be correct while the whole fails to assemble? — and mathematics fixes, all by itself, the one place where the answer can live.&lt;/p&gt;

&lt;p&gt;H¹&lt;/p&gt;

&lt;p&gt;Not chosen.&lt;br&gt;
Forced.&lt;br&gt;
Generality can be chosen.&lt;br&gt;
Universality cannot.&lt;/p&gt;

&lt;p&gt;The Atlas Theorem, proved just recently, formalizes exactly this universality.&lt;br&gt;
When you observe source code, there is a resolution to the reading: coarse or fine.&lt;br&gt;
What the Atlas Theorem gives is a sufficient condition under which the result of the review does not change when the resolution does.&lt;br&gt;
Change the resolution of your reading — relativize it — and the obstruction that still remains is the universality.&lt;/p&gt;

&lt;p&gt;To claim universality is to take on an obligation of proof.&lt;br&gt;
Change the observation.&lt;br&gt;
Change the representation.&lt;br&gt;
Change the coefficients.&lt;br&gt;
Every condition you move adds one more theorem to prove.&lt;br&gt;
The Atlas Theorem is one of them, and the road goes on.&lt;br&gt;
Universality does not come free.&lt;br&gt;
The conditions for survival are themselves the content of the theorems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What remains
&lt;/h2&gt;

&lt;p&gt;Generality changes with the times.&lt;br&gt;
Relativize — move the conditions of seeing — and universality dwells in what still remains.&lt;br&gt;
And universality lives in structure.&lt;br&gt;
With the weapons of algebraic geometry, AAT is closing in on the universal structure of architecture.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>programming</category>
    </item>
    <item>
      <title>Uncharted Waters: Thirteen Rules for Not Trusting an AI's Proofs</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sun, 16 Aug 2026 16:10:31 +0000</pubDate>
      <link>https://dev.to/iroha1203/uncharted-waters-thirteen-rules-for-not-trusting-an-ais-proofs-jhp</link>
      <guid>https://dev.to/iroha1203/uncharted-waters-thirteen-rules-for-not-trusting-an-ais-proofs-jhp</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I want to hand an AI agent a multi-day job and have it run to completion. This post collects the rules for that — &lt;strong&gt;thirteen of them&lt;/strong&gt;. Never let the loop rewrite its own spec. Enumerate up front what counts as evidence of "done." Review in independent parallel, never by majority vote. If verification didn't run, the answer is unknown, not pass. Nine more inside&lt;/li&gt;
&lt;li&gt;The rules run in my repository. In fifteen days of August 2026, this loop proved seven theorems and refuted one. About 104 cycles, roughly 67,000 lines of Lean 4. All seven proofs cleared four independently running adversarial review lanes&lt;/li&gt;
&lt;li&gt;The theorems are the main results my research program (AAT) set as its goals — nothing like famous open problems. But each was a multi-day proof target where refutation and revision were live possibilities. The outcomes were genuinely unknown&lt;/li&gt;
&lt;li&gt;A three-way division of labor: Claude (Fable) drafts the goal cards and runs adversarial reviews, Codex (GPT-5.6 Sol) drives the proof loop, and a human makes the rulings&lt;/li&gt;
&lt;li&gt;I make no claim that these thirteen rules are optimal. This is an N=1 record, with no controlled comparison&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When you hand an AI agent a multi-day job, the hard part is not getting it to work. It is &lt;strong&gt;deciding whether to believe the output&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The stage is my monorepo, &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt;. It hosts AAT (Algebraic Architecture Theory), a research program that analyzes software architecture with the tools of algebraic geometry and machine-checks its claims in Lean 4.&lt;/p&gt;

&lt;p&gt;This record is N=1. One team, one problem domain, fifteen days without sinking — that is all it is. But every one of the rules below has a logged incident where it fired.&lt;/p&gt;

&lt;p&gt;A proof starts from a goal card pinned down by a human, and moves through this loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjcwekebi3v7wfnhfcrb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjcwekebi3v7wfnhfcrb2.png" alt="flow chart" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The thirteen rules pin down the load-bearing points of this loop.&lt;/p&gt;

&lt;h1&gt;
  
  
  Part 1: The Thirteen Rules
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Rules of preparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 1 — Split the state three ways
&lt;/h3&gt;

&lt;p&gt;Keep the spec, the execution state, and the evidence in different places. The spec says what to achieve, as a static document. The execution state says where we are. The evidence says what is done. Mix them, and you open a path for the AI to achieve the spec by rewriting it.&lt;/p&gt;

&lt;p&gt;In this repository, the spec lives in a goal card, the execution state in a GitHub Issue, the evidence in a report file. The loop reads the card. It cannot write to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 2 — Never let the loop rewrite the spec
&lt;/h3&gt;

&lt;p&gt;Revising the spec always means stopping the loop and getting a human ruling. The AI may propose a revision; that is as far as it goes. When a refutation or a dead end hits, the easiest exit is to fix the goal instead of the proof — and sometimes that is even the right call. Which is exactly why this one decision lives outside the loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 3 — Design failure as a deliverable
&lt;/h3&gt;

&lt;p&gt;"The target turned out to be false" is not an error. It is one of the legitimate exits. Before departure, decide what a failure should leave behind: the counterexample itself, the mechanism of the failure, the parts worth reusing. Fix that format up front, and failures become raw material for the next spec.&lt;/p&gt;

&lt;p&gt;Every goal card in this repository must carry a &lt;em&gt;failure policy&lt;/em&gt; section, fixing in advance what gets recorded when a refutation lands.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 4 — One obligation per cycle
&lt;/h3&gt;

&lt;p&gt;At the top of each cycle, before any work, the loop writes down "the one obligation I will close this cycle" — the single remaining task — together with why it chose it. Working on a little of everything creates the illusion of progress, and when something fails, you can no longer tell what caused it. This prevents both.&lt;/p&gt;

&lt;p&gt;Here, the cycle ledger opens with the chosen obligation. All 104 cycles carry this record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caveats
&lt;/h3&gt;

&lt;p&gt;This group assumes the work can be cut down to a granularity where the spec fits in a static document. Exploratory work needs a separate stage that produces the spec itself. Here, a human and Claude did that, putting each draft through several rounds of adversarial review before handing it to the loop. Run the loop on a weak spec, and refutations and revisions will cost you several times over. And Rule 3's "format of failure" has to be designed per domain. Mathematics has the counterexample, a beautifully reusable form. What plays that role in your domain is not obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules of verification
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 5 — Enumerate what counts as evidence of "done"
&lt;/h3&gt;

&lt;p&gt;Enumerate, up front, the forms of evidence you will accept as completion, and accept nothing else, whatever the reason. The AI's "it's done" is judged one way only: does the evidence match one of the forms?&lt;/p&gt;

&lt;p&gt;In this repository there are exactly three ways to close a proof obligation: a machine-checked theorem; a concrete example or counterexample pinned as finite data; a derivation from a previously proved result pinned by hash. And the inverse rule: moving the thing-to-be-proved into a typeclass or a structure field, so that it arrives as an assumption — however elegant — closes nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 6 — "The tests pass" is not done
&lt;/h3&gt;

&lt;p&gt;CI is green. The PR is merged. Something with the right name exists. None of these is evidence of completion. Verification has to touch the conclusion itself.&lt;/p&gt;

&lt;p&gt;This repository's acceptance contract carries that prohibition as one line of its verdict table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 7 — Review in independent parallel, never by majority
&lt;/h3&gt;

&lt;p&gt;Run several reviewers with the same passing bar, in parallel, without showing them each other's output. Do not split them into a lead and assistants; a reviewer demoted to assistant stops hunting. Do not tally by majority; one fatal finding from one lane is enough to block. And keep a mechanism that can reject even a unanimous pass, on fixed mechanical rules.&lt;/p&gt;

&lt;p&gt;Reviews here run four lanes: two mathematical, two Lean. The power to reject sits with a fixed rule that detects claim weakening.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 8 — Pin every review to a commit SHA
&lt;/h3&gt;

&lt;p&gt;"I fixed it" means nothing on a moving target. Pin the review to a specific commit, and define narrowly when a light re-check after a fix is allowed. If a change touches the spec, the light check is off the table, and you go back to full review.&lt;/p&gt;

&lt;p&gt;Here, any of the following instantly disqualifies the light check: a statement change, a definition-body change, adding or deleting declarations, changing an import direction, changing a ledger status.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 9 — Write it down: "no findings" is a rare pass
&lt;/h3&gt;

&lt;p&gt;A review whose default outcome is pass is dead. This repository's review protocol contains one sentence: "No major findings is a rare pass." That single sentence changes how deep a reviewer AI digs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 10 — Name the cheats, audit for them every cycle
&lt;/h3&gt;

&lt;p&gt;AI cheating comes in recurring shapes. Vacuous success: the condition holds because the set is empty. Playing to the grader: a construction shaped to the goal's wording. Claiming an equivalence while proving one direction. Smuggling the thing-to-be-proved into the setup. Reinterpreting the goal or the report. Give each shape a name, and you can audit for all of them mechanically, every cycle. Leave them nameless, and you will miss them every time.&lt;/p&gt;

&lt;p&gt;The cycle ledger here has an audit field for each of the five.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 11 — Fail closed
&lt;/h3&gt;

&lt;p&gt;If verification did not run, the result is unknown, not pass. When a reviewer fails to start, the worst possible move is for the parent agent to fill in a pass on its behalf. Record undecidable as undecidable, and do not proceed.&lt;/p&gt;

&lt;p&gt;The judges are audited too. Even the decision to stop a search can be overturned by an independent review.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caveats
&lt;/h3&gt;

&lt;p&gt;The biggest assumption in this group is an oracle: something that objectively decides "done." Here it is Lean, type-checking a proof. In domains with type checkers, reproducible tests, or deterministic measurements, this group transfers as is. Where judgment is subjective — prose quality, design — Rule 5's enumeration gets hard, and more of the weight lands on Rule 7's multiple lanes. One more thing. Rule 10's names come from your own incident log. The five shapes above are the ones this voyage actually met; yours will wear different faces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules of rulings and cost
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 12 — Never automate the decision to stop
&lt;/h3&gt;

&lt;p&gt;How many review rounds before cutting it off. After a failure, push on or retreat. When to pivot. Design these as human rulings, and confine them to a few explicit points — precisely so that everything else can be automated. What you delegate to the loop is the execution of rules already decided.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 13 — Engineer the cost of verification
&lt;/h3&gt;

&lt;p&gt;Explicitly ban whole-project verification — full builds, full test suites — inside the loop, and design the scoped checks that replace it, in advance. The pairing is the point: the ban and the replacement together. Just cutting verification collides with Rule 11.&lt;/p&gt;

&lt;p&gt;Here, a hard rule forbids full research builds inside the loop. In their place: per-module checks, direct axiom audits, and a scan for placeholders, the markers of unproven holes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caveats
&lt;/h3&gt;

&lt;p&gt;Run this group, and the bottleneck moves to the humans. In our measurements, after the cost reductions, the limiting factor was not tokens but the supply of specs and the bandwidth of human rulings. And since Rule 13 deliberately lowers verification coverage, record what you gave up. Whole-project verification moves outside the loop, to CI and post-merge audits. It does not disappear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thirteen rules, one principle
&lt;/h2&gt;

&lt;p&gt;The thirteen rules are not a bag of tricks. Each is a different cross-section of one principle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't trust the AI's output — and enforce that distrust with structure, not human attention.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Saying "we don't trust it" is easy. Doing it is not. Human attention is finite; nobody stays suspicious for 104 cycles. So the suspicion itself gets fixed into specs, ledgers, review lanes, and acceptance contracts, and the AI and the loop carry it for you. Almost every accident in these fifteen days was caught by structure.&lt;/p&gt;

&lt;h1&gt;
  
  
  Part 2: The Ship's Log
&lt;/h1&gt;

&lt;p&gt;This voyage is one leg of an ongoing research program: AAT, Algebraic Architecture Theory. Its history is in earlier posts on this blog; the most recent is the &lt;a href="https://blog.iroha1203.dev/atlas-theorem-how-far-can-you-zoom-out" rel="noopener noreferrer"&gt;Atlas theorem article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On an earlier voyage, the theory reached the SAGA theorem. Whether a broken consistency can be repaired is decided by whether an obstruction class — a quantity measuring the twist that blocks repair — vanishes. That is what the theorem says. It went on to detect a one-cent accounting drift in a real open-source system. The point where theory touched the real sea is what we call our Cape of Good Hope. These fifteen days are the waters beyond that cape. There are pilots: algebraic geometry since Grothendieck teaches the seamanship — universal properties, descent, cohomology. But nobody holds a chart of this sea. Over software architecture, which claims stand as theorems and which fall to counterexamples — you find out by sailing.&lt;/p&gt;

&lt;p&gt;On this ship, Claude draws the charts, Codex holds the helm, and a human makes the rulings, all under the same thirteen rules. Numbers like G-101 are serial numbers assigned to goals.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Day&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;Claim&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;Cycles&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Day 1&lt;/td&gt;
&lt;td&gt;G-101&lt;/td&gt;
&lt;td&gt;Swap the rewriting rules for parts, and there is exactly one canonical way to carry the whole analysis across&lt;/td&gt;
&lt;td&gt;Proved&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Day 2&lt;/td&gt;
&lt;td&gt;G-102&lt;/td&gt;
&lt;td&gt;If structural bugs are zero, every coupling bug is caught on the semantic side&lt;/td&gt;
&lt;td&gt;Proved&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Day 3&lt;/td&gt;
&lt;td&gt;G-103&lt;/td&gt;
&lt;td&gt;The coarsest decomposition that can still express a given family of laws exists, and is computable&lt;/td&gt;
&lt;td&gt;Proved&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Days 3–7&lt;/td&gt;
&lt;td&gt;G-104&lt;/td&gt;
&lt;td&gt;Under certain conditions, the diagnosis does not depend on reading resolution (the Atlas theorem)&lt;/td&gt;
&lt;td&gt;Proved, after 4 refutations&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Day 8&lt;/td&gt;
&lt;td&gt;G-105&lt;/td&gt;
&lt;td&gt;The shape drawn by the layout of parts survives any change of interpretive convention&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Refuted&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Days 8–12&lt;/td&gt;
&lt;td&gt;G-107&lt;/td&gt;
&lt;td&gt;Agreement of diagnoses is decidable by a finite computation, yet cannot be recovered from radius-1 local observation&lt;/td&gt;
&lt;td&gt;Proved, after 2 spec rewrites&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Day 14&lt;/td&gt;
&lt;td&gt;G-106&lt;/td&gt;
&lt;td&gt;Mismatch under repeated transport is measured by a two-stage obstruction; it vanishes exactly when the whole coheres&lt;/td&gt;
&lt;td&gt;Proved&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Day 15&lt;/td&gt;
&lt;td&gt;G-108&lt;/td&gt;
&lt;td&gt;Transport at the upper floors is canonical too, and the only place it can fail is pinned to a single spot&lt;/td&gt;
&lt;td&gt;Proved&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Day 1 — Setting sail on uncharted waters
&lt;/h2&gt;

&lt;p&gt;The first theorem, G-101. The claim: swap the rewriting rules for parts, and there is exactly one canonical way to carry the entire analysis across. In engineering terms, a guarantee that switching modeling conventions does not mean redoing the analysis. For a long time, this theory had described its own construction as "Grothendieck-like." That was a metaphor. On this day, the mathematical condition the name demands — a universal property — was proved, and the metaphor became the name of a device.&lt;/p&gt;

&lt;p&gt;Not a day of fair winds. Attempt 1 of the final review: three lanes demanding revisions, one rejecting outright. Nothing passed. Only on attempt 3 did all four lanes clear. This is what "a pass is rare" looks like as daily life (Rule 9).&lt;/p&gt;

&lt;h2&gt;
  
  
  Days 2–3 — Fair winds and a fake completion
&lt;/h2&gt;

&lt;p&gt;Two theorems in two days. G-102: if structural bugs are zero, every coupling bug is caught on the semantic side — grounds for narrowing the search. G-103: the coarsest decomposition that can express a given family of laws exists and is computable — the minimum module granularity your spec requires, delivered by an algorithm.&lt;/p&gt;

&lt;p&gt;It looks smooth. The review record says otherwise. G-102's pinned-commit review caught defects on runs 1 through 4, back to back. Run 3's catch was the worst kind: a shell with the right shape and an empty core. It passed on run 5 (Rules 6, 8).&lt;/p&gt;

&lt;h2&gt;
  
  
  Days 3–7 — The first storm
&lt;/h2&gt;

&lt;p&gt;G-104. The claim: the conditions under which an architecture diagnosis does not depend on reading resolution. Put differently, the guarantee that the same defects appear in the same places whether you look at service granularity or module granularity — a guarantee about review granularity, in an era where AI writes the code and humans read it coarsely. This would later be named the Atlas theorem, one of the theory's main results.&lt;/p&gt;

&lt;p&gt;In these five days, the target was refuted four times. The calibration condition grew to seven clauses. Three of them were beaten into existence by counterexamples; the rest were rebuilt through refutation and search. After the third refutation, the human called it: stop adding clauses, stop the loop, switch to a search campaign (Rule 12). A brute-force enumeration of 6,086 candidate conditions, plus a structural argument on top of it, delivered the verdict: no amount of clauses in this vocabulary can ever reach the target. That negative survey forced a rebuild of the coefficients themselves — the vocabulary of observations the diagnosis computes over (Rule 2). The loop set sail again, and summited on cycle 31.&lt;/p&gt;

&lt;p&gt;Along the way, one cycle smuggled in a hidden premise. The audit caught it, and the artifacts were removed wholesale (Rule 10). The full story of these five days is in the &lt;a href="https://blog.iroha1203.dev/atlas-theorem-how-far-can-you-zoom-out" rel="noopener noreferrer"&gt;Atlas theorem article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 8 — The shipwreck becomes a chart
&lt;/h2&gt;

&lt;p&gt;G-105. The claim: the space spanned by the supports of structural parts is invariant under pragmatic change — the shape drawn by the layout of parts survives a change of interpretive convention. Cycles 1 through 6 went smoothly. Then, on cycle 7, the last remaining obligation — constructing a &lt;em&gt;firing witness&lt;/em&gt;, a concrete example where the premises actually hold and the conclusion is non-trivially true — was proved &lt;strong&gt;impossible in principle&lt;/strong&gt;. The voyage's only refutation.&lt;/p&gt;

&lt;p&gt;Read the record, though, and this is no sinking. The content of the impossibility was itself a theorem: the chosen coefficient generation rule swallows information indiscriminately, so the diagnostic geometry vanishes universally. The theorem-version of a dashboard with everything on it that tells you nothing. Because the failure policy existed in advance, the counterexample and its mechanism went straight into the ledger. The theory later repositioned this refutation as its first machine-checked evidence that observation must be chosen, not hoarded (Rule 3). The site of the shipwreck became the chart of the shallows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Days 8–12 — The ship that lost its mast twice
&lt;/h2&gt;

&lt;p&gt;G-107. The roughest five days of the voyage.&lt;/p&gt;

&lt;p&gt;The target statement died twice. Version 1 — "agreement of diagnoses is characterized by condition C*" — met an exact counterexample. Version 2's sufficiency direction met another. Both were found by the out-of-loop search campaign and the reviews. Within that campaign, the decision to stop searching was itself overruled twice, by independent review, as premature. The judges were being audited (Rule 11). Version 3 rebuilt the claim on new pillars. Agreement of diagnoses is decidable by a finite computation — and yet that decision cannot be recovered from radius-1 local observation. Decidable in CI, unreachable by any pile of local lint rules. Codex proved the pair in a 27-cycle, 49-hour solo run.&lt;/p&gt;

&lt;p&gt;The ending is on record too. The spec's adversarial review ran four rounds; mathematical counterexamples hit zero for three consecutive rounds, and the last two rounds' findings were wording-level refinements of the completion criteria. The human called it: the review is saturated. Cut it off (Rule 12). Knowing when to stop a review takes as much design as the review itself.&lt;/p&gt;

&lt;p&gt;One more line from the record: the precedent search found no known prior example of a property that is decidable yet locally unobservable, pinned all the way down to a machine-checked proof. &lt;em&gt;Uncharted waters&lt;/em&gt; was not a figure of speech.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 14 — A mountain in a single night
&lt;/h2&gt;

&lt;p&gt;G-106. The claim: the mismatch that accumulates under repeated transport is measured by a two-stage obstruction, and its vanishing is equivalent to the whole cohering. Whether a multi-step refactoring or migration hangs together is measurable, and decidable. Drafted on day 2, this chart had matured for twelve days under rounds of review.&lt;/p&gt;

&lt;p&gt;The loop set sail before dawn and finished five cycles while I slept. Cost: 9% of the weekly API limit (Rule 13). And not merely fast. Cycle 4, while closing its own obligation, detected a defect in the evaluator that cycle 2 had built — a wrong order in a non-commutative composition — replaced it, and logged the correction in the ledger. On the first cycle, one lane had passed a result, and the fixed anti-weakening rule overruled it (Rule 7). The ship repaired itself while under way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 15 — A mirage, and the next chart
&lt;/h2&gt;

&lt;p&gt;G-108. The theory is built as a tower of abstraction layers, and G-101 had proved transport at the ground floor. The claim here: transport at the upper floors is canonical too, and the only place it can fail is pinned to a single spot. If a migration fails, the cause is &lt;em&gt;here&lt;/em&gt; — the endpoint of fault isolation, proved before the work begins. Seven cycles in half a day.&lt;/p&gt;

&lt;p&gt;The day belonged to the reviewers. The firing witness submitted on cycle 5 looked, at first glance, like it met the requirements. The pinned-commit review established that its firing depended not on a genuine structural difference, but only on a settings difference and a coefficient swap — and sent it back (Rules 8, 10). The lookout stopped the ship a moment before a mirage was logged as land. After the fix, all eight lanes passed: the usual four, plus four independent formal-review lanes.&lt;/p&gt;

&lt;p&gt;The same day, the chart for the next goal, G-109, was finished. Drafted by Claude, hammered through seven rounds of Codex's adversarial review, every finding fixed. The two ships do not trust each other's work. That is what trust looks like in this fleet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Epilogue — The sea with no name
&lt;/h2&gt;

&lt;p&gt;Fifteen days. Seven theorems and one refutation. About 104 cycles, about 67,000 lines. And the last chart is still out on the water.&lt;/p&gt;

&lt;p&gt;This sea has no name yet. When we cross it, the chart will be complete — and the sea will receive its name, together with the theorem's.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Related&lt;/strong&gt;: &lt;a href="https://blog.iroha1203.dev/atlas-theorem-how-far-can-you-zoom-out" rel="noopener noreferrer"&gt;Atlas Theorem: How Far Can You Zoom Out?&lt;/a&gt; / Repository: &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>lean</category>
    </item>
    <item>
      <title>Buildings Calculate Forces. Software Must Calculate Meaning.</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Wed, 12 Aug 2026 16:17:47 +0000</pubDate>
      <link>https://dev.to/iroha1203/buildings-calculate-forces-software-must-calculate-meaning-21j9</link>
      <guid>https://dev.to/iroha1203/buildings-calculate-forces-software-must-calculate-meaning-21j9</guid>
      <description>&lt;p&gt;I was raised on the idea that software development is like constructing a building.&lt;br&gt;
Lay a solid foundation.&lt;br&gt;
Design before you build.&lt;br&gt;
Bolt on features without thinking, and you end up with a rambling old inn, extended wing by wing.&lt;br&gt;
Let a spec change reach the foundations, and you are in for a major rebuild.&lt;br&gt;
All of it is true.&lt;br&gt;
But I had a question.&lt;br&gt;
Buildings have structural engineering. Loads, stresses, material properties, safety factors — all calculated mathematically.&lt;br&gt;
Software architecture, on the other hand, has little theory for the structural engineering of the whole.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architect's Design, and the Age of AI
&lt;/h2&gt;

&lt;p&gt;I have worked as a software engineer for more than ten years, and I have learned a great deal about architecture along the way.&lt;br&gt;
MVC, MVP, Clean Architecture, design patterns, DDD.&lt;br&gt;
These matter. But in the world of buildings, I suspect they correspond to the architect's design — not the engineer's structural calculations.&lt;/p&gt;

&lt;p&gt;Give things clear names.&lt;br&gt;
Separate responsibilities.&lt;br&gt;
Divide into layers.&lt;br&gt;
Keep dependencies pointing one way.&lt;br&gt;
Use known patterns.&lt;/p&gt;

&lt;p&gt;These exist to help humans understand.&lt;br&gt;
But being readable and being semantically unbreakable are different things.&lt;br&gt;
No one claims a building will stand because its design is magnificent.&lt;br&gt;
So how has software been doing its structural engineering?&lt;br&gt;
Human review carried the load — knowledge and experience.&lt;br&gt;
If the architect's design is easy to understand, a human can read through it and run the "structural calculation of meaning" in their head.&lt;br&gt;
Design principles built around human comprehension worked because human review could keep up.&lt;/p&gt;

&lt;p&gt;Now that AI agents write most of the code, human review is falling behind code generated at breakneck speed.&lt;br&gt;
What software architecture needs is a theory that can do the structural calculation of meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Category-Theoretic Approach
&lt;/h2&gt;

&lt;p&gt;As a naive approach, consider category theory.&lt;br&gt;
It already does real work in the denotational semantics of programs.&lt;br&gt;
Take components as objects and dependencies as morphisms, and the structure of an architecture can be seen as a category.&lt;br&gt;
At first glance it looked promising. But there were problems — several of them.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;it is not obvious what the objects and morphisms should be&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;classes&lt;/li&gt;
&lt;li&gt;services&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;permissions&lt;/li&gt;
&lt;li&gt;data&lt;/li&gt;
&lt;li&gt;semantic roles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The unit changes depending on what you want to observe.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;knowing the structure does not mean knowing the meaning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A morphism &lt;code&gt;BillingService -&amp;gt; User&lt;/code&gt; does not tell you whether User is the paying customer, the authenticated identity, or simply a member.&lt;/p&gt;

&lt;p&gt;Third, &lt;strong&gt;global correctness does not follow from local correctness&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even if meaning holds in each part, it does not follow that the parts glue into one meaning for the whole.&lt;/p&gt;

&lt;p&gt;Fourth, architecture has not only structure but &lt;strong&gt;constraints&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authority&lt;/li&gt;
&lt;li&gt;contract&lt;/li&gt;
&lt;li&gt;state transition&lt;/li&gt;
&lt;li&gt;semantic consistency&lt;/li&gt;
&lt;li&gt;relation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Category theory did not fail. &lt;strong&gt;Category theory alone could not reach what I wanted.&lt;/strong&gt;&lt;br&gt;
Category theory is, in the end, a language: it can describe an architecture, but it cannot solve one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Danger of Building a Theory from Scratch
&lt;/h2&gt;

&lt;p&gt;Since category theory alone was not enough, I tried building a theory of my own.&lt;/p&gt;

&lt;p&gt;I gave it a name.&lt;br&gt;
AAT — Algebraic Architecture Theory.&lt;/p&gt;

&lt;p&gt;It was a precarious venture.&lt;br&gt;
First, the cost is enormous.&lt;br&gt;
Definitions, theorems, proofs — you must invent everything yourself.&lt;br&gt;
Homemade vocabulary multiplies on its own.&lt;br&gt;
To explain anything, you must first ask people to memorize a pile of private words.&lt;/p&gt;

&lt;p&gt;And even if a measurement tool built on it runs, you cannot tell whether it runs on&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;luck&lt;/li&gt;
&lt;li&gt;mathematics&lt;/li&gt;
&lt;li&gt;or metaphor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It might produce some kind of analysis. But the danger is not that it fails to run. The danger is that it runs anyway.&lt;br&gt;
Without theoretical grounding, when it hits, you cannot tell a lucky hit from a right answer.&lt;/p&gt;

&lt;p&gt;A homemade theory takes on mathematical debt and linguistic debt.&lt;br&gt;
I decided not to borrow what I could not repay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Onto Grothendieck's Shoulders
&lt;/h2&gt;

&lt;p&gt;Category theory describes, but falls short.&lt;br&gt;
A homemade theory cannot repay its debts.&lt;/p&gt;

&lt;p&gt;What, then, to do?&lt;/p&gt;

&lt;p&gt;Through trial and error, AAT had found two concepts: Atom and Law.&lt;/p&gt;

&lt;p&gt;An Atom is a primitive architectural fact — an atom of structure that can be found by observing source code.&lt;br&gt;
A Law is an abstraction of a specification or a design pattern, taking the form of an algebraic constraint acting on Atoms.&lt;/p&gt;

&lt;p&gt;In the homemade days, what sat on top of Atom and Law was a mysterious invariant called the Architecture Signature.&lt;/p&gt;

&lt;p&gt;The theory back then was so incoherent I would rather not remember it. But there was one intuition.&lt;br&gt;
That to describe architecture, geometry might be the right fit.&lt;/p&gt;

&lt;p&gt;So I made up my mind.&lt;br&gt;
Climb onto the shoulders of Alexander Grothendieck.&lt;br&gt;
Into the world of algebraic geometry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Raising the Water Level of Abstraction
&lt;/h2&gt;

&lt;p&gt;Algebraic geometry is a strange mathematics.&lt;br&gt;
It calls itself "geometry," yet it does not demand classical points, lines, or shapes.&lt;br&gt;
It was born to solve equations. But after Grothendieck, algebraic geometry builds spaces out of the equations themselves — and solving them became just one application.&lt;/p&gt;

&lt;p&gt;What is geometry?&lt;br&gt;
Geometry is not merely the study of shapes.&lt;br&gt;
&lt;strong&gt;It is a way of treating an object as a space and studying its structure, its invariants, and the relation between its local and global behavior.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What matters is not whether software resembles a shape.&lt;br&gt;
&lt;strong&gt;What matters is whether the meaning of software has enough structure to be studied as a space.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Perhaps the Atom and Law that AAT already had could connect it to algebraic geometry.&lt;br&gt;
Make the connection, and you inherit an arsenal built up over more than a century.&lt;/p&gt;

&lt;p&gt;Sheaves, cohomology, schemes, moduli, stacks.&lt;/p&gt;

&lt;p&gt;In the spirit of the Rising Sea, you raise the water level of abstraction — and instead of cracking problems one by one, a single theory dissolves them naturally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software Architecture Is a Vast System of Equations
&lt;/h3&gt;

&lt;p&gt;It is closer to the truth to see an architecture not as an "arrangement of parts" but as a &lt;strong&gt;vast system of semantic constraints&lt;/strong&gt;.&lt;br&gt;
Take a single concept like Order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who may create one?&lt;/li&gt;
&lt;li&gt;What becomes permitted when payment succeeds?&lt;/li&gt;
&lt;li&gt;Can Cancelled and Shipped coexist?&lt;/li&gt;
&lt;li&gt;How must Inventory and Order state stay consistent?&lt;/li&gt;
&lt;li&gt;Does User mean the same thing in every service?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many constraints tangle around a single concept.&lt;/p&gt;

&lt;p&gt;In the code they are scattered across separate files and services; semantically, they form one system of equations.&lt;/p&gt;

&lt;p&gt;A good architecture, then, can be read not as adherence to a particular pattern, but as &lt;strong&gt;the existence of a realization of meaning that satisfies all the required Laws at once&lt;/strong&gt;.&lt;br&gt;
MVC and Clean Architecture are not the equations themselves; they can be reread as &lt;strong&gt;design techniques for arranging the equations so that they are easier to solve&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And so the questions AAT asks become:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does a solution exist?&lt;/li&gt;
&lt;li&gt;Is the solution unique?&lt;/li&gt;
&lt;li&gt;What kind of space do the solutions form?&lt;/li&gt;
&lt;li&gt;Do local solutions glue into a global one?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Geometry Appears
&lt;/h3&gt;

&lt;p&gt;Algebraic geometry does not merely solve equations. &lt;strong&gt;It sees the set of all solutions as a space.&lt;/strong&gt;&lt;br&gt;
So a flow arises naturally:&lt;/p&gt;

&lt;p&gt;Architecture Laws&lt;br&gt;
↓&lt;br&gt;
space of semantic realizations&lt;/p&gt;

&lt;p&gt;This solution space — precisely this — is Semantic Geometry.&lt;/p&gt;

&lt;p&gt;The question widens from&lt;/p&gt;

&lt;p&gt;Does a solution exist?&lt;/p&gt;

&lt;p&gt;to&lt;/p&gt;

&lt;p&gt;How is the space of solutions shaped?&lt;/p&gt;

&lt;h3&gt;
  
  
  Rereading the SAGA Theorem
&lt;/h3&gt;

&lt;p&gt;The SAGA theorem, AAT's first main theorem, is not the end of the road called fault detection.&lt;br&gt;
It was the first result to show that nontrivial mathematical structure lies between local meaning and global meaning.&lt;br&gt;
The first theorem to ask whether local solutions of meaning glue into a global one.&lt;/p&gt;

&lt;p&gt;Using cohomology raised a question: cohomology of what space?&lt;br&gt;
From there the road leads to schemes, representability, moduli.&lt;/p&gt;

&lt;p&gt;SAGA&lt;br&gt;
↓&lt;br&gt;
Semantic Geometry&lt;/p&gt;

&lt;p&gt;is not a change of theme. It is a natural extension.&lt;/p&gt;

&lt;h3&gt;
  
  
  AAT, Redefined
&lt;/h3&gt;

&lt;p&gt;AAT can be understood as&lt;br&gt;
a geometric study of software architecture and its meaning.&lt;/p&gt;

&lt;p&gt;Faults are only one phenomenon.&lt;br&gt;
The real objects of study are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;existence of meaning&lt;/li&gt;
&lt;li&gt;non-uniqueness&lt;/li&gt;
&lt;li&gt;gluing&lt;/li&gt;
&lt;li&gt;invariance&lt;/li&gt;
&lt;li&gt;deformation&lt;/li&gt;
&lt;li&gt;moduli&lt;/li&gt;
&lt;li&gt;representability&lt;/li&gt;
&lt;li&gt;intrinsic semantic space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A new research area of computer science that re-sees software architecture as geometry.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AAT becomes an attempt to reconceive software architecture as a geometry of meaning.&lt;br&gt;
What I found is a space that has not yet been properly surveyed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;By standing on Grothendieck's shoulders, AAT at last gained a ship that could sail far.&lt;br&gt;
The water level of abstraction rose, individual problems sank beneath it, and the peak still to be climbed came into view.&lt;/p&gt;

&lt;p&gt;The road is still long.&lt;br&gt;
There is a mountain of work to do.&lt;/p&gt;

&lt;p&gt;But if we can reach the summit of schemes, then, for the first time, a "structural design of meaning" for architecture may be born.&lt;/p&gt;

&lt;p&gt;Software architecture is a vast system of equations; its solutions form a space; and a geometry of meaning rises.&lt;/p&gt;

&lt;p&gt;Semantic Geometry of Architecture.&lt;/p&gt;

&lt;p&gt;The voyage has just begun.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
    </item>
    <item>
      <title>Semantic Geometry of Architecture: The Meaning of Software Forms a Space</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Tue, 11 Aug 2026 15:14:31 +0000</pubDate>
      <link>https://dev.to/iroha1203/semantic-geometry-of-architecture-the-meaning-of-software-forms-a-space-3a8p</link>
      <guid>https://dev.to/iroha1203/semantic-geometry-of-architecture-the-meaning-of-software-forms-a-space-3a8p</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Does software architecture have a denotational semantics? Yes.&lt;/strong&gt; But it differs from the classical one in three ways. Syntax is generated from observation. The meaning of a whole system does not exist automatically: its existence is itself a theorem. And broken meaning is not an error but a measurement.&lt;/li&gt;
&lt;li&gt;The existence theorems (global gluing, descent, torsor structure, resolution invariance) are &lt;strong&gt;machine-verified in Lean 4&lt;/strong&gt; inside AAT (Algebraic Architecture Theory).&lt;/li&gt;
&lt;li&gt;Beyond existence lies one more question. &lt;strong&gt;What is the shape of the space of meanings?&lt;/strong&gt; I name the geometry that studies this question &lt;strong&gt;Semantic Geometry of Architecture&lt;/strong&gt;, and announce it here as a research program.&lt;/li&gt;
&lt;li&gt;The summit is scheme representability: the conjecture that an architecture carries its own space of meanings. A roadmap closes the article.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Commutative Diagram in the Meeting Room
&lt;/h2&gt;

&lt;p&gt;I once watched a design argument end over a single diagram.&lt;/p&gt;

&lt;p&gt;The dispute was about two processing paths. Should the data flow in this order, or that one? Neither side was budging. So we drew it out on the whiteboard. Four corners. Four arrows. Should this square &lt;strong&gt;commute&lt;/strong&gt; — should both paths land on the same result?&lt;/p&gt;

&lt;p&gt;The moment it was drawn, the argument changed character. The places that had to commute became equations to agree on. The places that were allowed not to commute became decisions to own. The former were agreed in minutes. The latter were settled as judgment calls. The shouting match about which path was "right" ended there.&lt;/p&gt;

&lt;p&gt;On the way home I kept turning it over. What exactly had happened?&lt;/p&gt;

&lt;p&gt;Programming languages have &lt;strong&gt;denotational semantics&lt;/strong&gt;: a theory that assigns mathematical meaning to syntactic objects called programs. Does architecture have one? Wasn't the thing we executed by hand in that meeting room exactly that?&lt;/p&gt;

&lt;p&gt;This article answers the question by drawing the map of a research program. Its name is &lt;strong&gt;Semantic Geometry of Architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Staircase of Semantics
&lt;/h2&gt;

&lt;p&gt;The history of denotational semantics reads as a history of &lt;strong&gt;meaning acquiring structure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At first, meaning was sets and functions. A program is a function from inputs to outputs. Not much could be said.&lt;/p&gt;

&lt;p&gt;Dana Scott gave meaning &lt;strong&gt;order and topology&lt;/strong&gt;. Sequences of approximations acquired limits, and it became possible to speak about recursion. "The meaning of this loop is the limit of its approximations" became, for the first time, a mathematical sentence.&lt;/p&gt;

&lt;p&gt;Category theory gave meaning &lt;strong&gt;the structure of composition&lt;/strong&gt;. In Lawvere's functorial semantics, a theory is a category, a model is a functor out of it, and semantic equations are commuting diagrams. The square on that whiteboard stands at the far end of this tradition.&lt;/p&gt;

&lt;p&gt;The abstract model theory of specifications (Goguen and Burstall's Institutions) coined a slogan: &lt;strong&gt;Truth is invariant under change of notation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every step up the staircase enlarged what could be said. So: what is the next step?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture never got to climb this staircase. Not even the first step.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  No On-Ramp
&lt;/h2&gt;

&lt;p&gt;Denotational semantics starts from syntax. For programs this worked because syntax was given from the start, by the language definition. Whatever the parser accepts is a program; semantics could then be defined as its interpretation.&lt;/p&gt;

&lt;p&gt;Architecture has no given syntax.&lt;/p&gt;

&lt;p&gt;There was a road that invented syntax first: architecture description languages, formal specifications, design documents. That road carries a curse — &lt;strong&gt;double bookkeeping of description and implementation&lt;/strong&gt;. You write the spec, you write the code, and you chase their divergence by hand. The divergence always comes, and the description always loses. Every working engineer knows how that story ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the On-Ramp
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Syntax is not written. It is observed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is a theory that has been building this on-ramp: &lt;strong&gt;AAT (Algebraic Architecture Theory)&lt;/strong&gt;. It takes source code as the source of truth, diagnoses architecture with the weapons of algebraic geometry, and keeps its mathematical core formally verified in Lean 4.&lt;/p&gt;

&lt;p&gt;A typed fact extracted from code by observation is called an &lt;strong&gt;Atom&lt;/strong&gt;. "This module writes this state." "This operation emits this event." "This value denotes this meaning." Small grains of fact. Atoms are the generators of syntax: from their combinations, the syntax of an architecture — a category of parts, a structure of coverings — is generated.&lt;/p&gt;

&lt;p&gt;Generation does not stop at syntax.&lt;/p&gt;

&lt;p&gt;Specifications are written as &lt;strong&gt;laws&lt;/strong&gt; — that is, as equations. "Replay reconstructs the state." "These two operations commute." And &lt;strong&gt;the place where meaning lives (what mathematicians call the coefficients) is generated from the same Atoms, through the laws.&lt;/strong&gt; The denotation function is not a bridge between two independently given worlds. It is a &lt;strong&gt;factorization of a single generative process out of Atoms&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That the whole semantics needs no input beyond the Atoms and the chosen laws is not a slogan. It has been proved, step by step, in Lean 4 — from the coefficient generation contract up to resolution invariance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn 1: Syntax Is Observed, Not Written
&lt;/h2&gt;

&lt;p&gt;In classical denotational semantics, humans write terms and the semantics interprets them. Here the order reverses. Syntax rises out of observation of the implementation, and the semantics stands on top of it.&lt;/p&gt;

&lt;p&gt;As a consequence, &lt;strong&gt;semantics stops being a design-time document and becomes a measuring instrument.&lt;/strong&gt; You do not write a spec first and bend the implementation to it. You observe the implementation, state equations over the observation, and measure whether they hold. Double bookkeeping cannot arise, in principle: the description to be managed is generated from observation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn 2: The Existence of Global Meaning Is a Theorem
&lt;/h2&gt;

&lt;p&gt;In the classical picture, the denotation function is total. The meaning of a whole program exists by definition. For architecture, this premise collapses.&lt;/p&gt;

&lt;p&gt;Meaning is given &lt;strong&gt;locally&lt;/strong&gt; first: a state where meaning is pinned down only over an individual context — a service, a module, an aggregate. Mathematics calls this a &lt;strong&gt;section&lt;/strong&gt;. Choose a family of parts that covers the system (a &lt;strong&gt;cover&lt;/strong&gt;), glue the local meanings over the overlaps, and if you reach one coherent meaning for the whole, that is a &lt;strong&gt;global section&lt;/strong&gt;. The principle of reconstructing the global from glued local data is called &lt;strong&gt;descent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"The meaning of the whole system" does not exist automatically, by definition. Its existence is a theorem, not a given.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that existence theorem is already proved inside AAT. Call the algebraic fingerprint that aggregates the disagreements on overlaps the &lt;strong&gt;obstruction class&lt;/strong&gt;. Over semantic coefficients:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a global meaning exists ⟺ the obstruction class is zero
Nonempty P_sem(W) ⟺ [r_sem] = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;P_sem(W)&lt;/code&gt; is the space of global semantic states over the chosen cover &lt;code&gt;W&lt;/code&gt;, and &lt;code&gt;[r_sem]&lt;/code&gt; is the obstruction class computed from that cover. A second theorem of the same shape stands on the &lt;strong&gt;repair&lt;/strong&gt; side. Call a state where a law's violation has been fixed part-by-part a &lt;strong&gt;lift&lt;/strong&gt;. Each part is fixed. Can all of them be fixed at once? The family of local lifts &lt;code&gt;s&lt;/code&gt; determines a class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;∂_U(s) ∈ ČechH¹(U, ConDef)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;code&gt;ConDef&lt;/code&gt; is the coefficient of repair directions), and &lt;code&gt;∂_U(s) = 0&lt;/code&gt; is equivalent to the existence of a global lift. The distance between "fixable locally" and "fixable globally" is concentrated into this one class. What the symbol &lt;code&gt;ČechH¹&lt;/code&gt; actually contains, we will compute by hand later — counting one-cent coins.&lt;/p&gt;

&lt;p&gt;If meaning exists, is it unique? That, too, is a theorem. Global meaning is not unique. The set of solutions moves freely along a single orbit under the action of a group &lt;code&gt;H⁰&lt;/code&gt; — the group of degrees of freedom coherent across the whole cover (a &lt;strong&gt;torsor structure&lt;/strong&gt;). In place of uniqueness, &lt;strong&gt;the freedom of choosing a meaning is measured exactly, as a group.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Where did classical denotational semantics go? It did not disappear. &lt;strong&gt;It sits inside this picture as the degenerate case where the cover is trivial and the obstruction class always vanishes.&lt;/strong&gt; Architecture lives outside that degeneracy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn 3: Breakage Is a Measurement, Not an Error
&lt;/h2&gt;

&lt;p&gt;In the classical picture, if a diagram that ought to commute does not, the semantics is simply wrong; the only move is to fix the definition until it commutes.&lt;/p&gt;

&lt;p&gt;Architecture is different. Eventual consistency. The application order of concurrent operations. Data read differently by different teams. A broken commutativity is sometimes a defect to eliminate — and sometimes &lt;strong&gt;a decision the design has deliberately taken on&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So AAT treats breakage as first-class data. When the residual of an equation does not vanish, it is defined as an obstruction, presented as finite data, and measured as a cohomology class. Not merely "there is breakage": &lt;strong&gt;on which cover, on which overlap, as which class&lt;/strong&gt; it breaks is localized.&lt;/p&gt;

&lt;p&gt;It also explains what happened in the meeting room. The argument raged because the participants were assuming different commutativity, implicitly. Externalize the diagram, and the equations to agree on separate from the breakages to own. "Which path is right" is a question that does not converge. "Do we own this breakage" is a question that gets decided.&lt;/p&gt;

&lt;p&gt;There are more theorems on AAT's shelf. Add a measurement axis, and two designs that had been identical come apart (&lt;strong&gt;Period Separation&lt;/strong&gt;). This is the architectural version of the phenomenon program semantics has called full abstraction. The term carries historical weight. Plotkin posed the problem for the language PCF in 1977. Whether a semantics captures observational equivalence exactly stood for nearly twenty years as the hardest open problem in program semantics, falling only to game semantics in the 1990s. Period Separation is advance notice that the same question returns at the level of architecture.&lt;/p&gt;

&lt;p&gt;Meanwhile, change the granularity of measurement within one axis — the resolution of the reading — and under calibration conditions the diagnosis matches exactly (&lt;strong&gt;the Atlas theorem&lt;/strong&gt;). Coarsening loses no defect; refining fabricates none. That both accidents really do happen once the conditions are broken is included in the same theorem package, with finite counterexamples. There is no contradiction here: adding an axis genuinely refines the diagnosis; changing resolution within an axis does not. The two theorems divide those two directions between them. The Atlas theorem is the &lt;strong&gt;well-definedness theorem&lt;/strong&gt; of this semantics. It turns the Institutions slogan — "Truth is invariant under change of notation" — into a theorem, complete with the conditions under which it holds and counterexamples for when it fails. Classical denotational semantics has no counterpart.&lt;/p&gt;

&lt;p&gt;An existence theorem. The freedom of uniqueness. Well-definedness. Full abstraction. The chapters of the textbook are all there. Yet none of these theorems was proved for the sake of a semantics. Global gluing came out of repair theory. Conormal descent, out of the search for repair directions. The torsor structure, to quantify the failure of uniqueness. Resolution invariance, for the trustworthiness of diagnosis. Theorems stacked up for separate reasons were re-read, all at once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything we had built was, all along, converging into one semantics.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Geometry of Meaning
&lt;/h2&gt;

&lt;p&gt;Back to the staircase. After order and topology, after categories — what is the next step?&lt;/p&gt;

&lt;p&gt;Geometry.&lt;/p&gt;

&lt;p&gt;The existence theorems answered "is there a meaning?". Beyond them lies a question the tradition never posed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the shape of the space of meanings?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The algebraic geometry of AAT builds this question into the substance of diagnosis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failure carves out space.&lt;/strong&gt; A failed equation generates an obstruction ideal, which carves out the range of lawful designs (the lawful locus). "How far does legality extend" exists not as a verdict value but as &lt;strong&gt;a region of space&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Breakage can be dissected.&lt;/strong&gt; Obstructions are not only measured as classes; they are dissected in the vocabulary of singularities and monodromy. The same "non-commuting" can be an isolated gluing mistake or a torsion that winds through the whole design. Different pathologies; different surgery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repair is deformation theory.&lt;/strong&gt; The dual of the coefficient &lt;code&gt;I/I²&lt;/code&gt; attached to the obstruction ideal &lt;code&gt;I&lt;/code&gt; (this is what &lt;code&gt;ConDef&lt;/code&gt; was) gives the &lt;strong&gt;tangent space&lt;/strong&gt; of first-order deformations that move a design toward legality. Repair candidates are not an ad-hoc list of patches. &lt;strong&gt;The space of repair candidates is itself a geometric object.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evolution is geometry in the time direction.&lt;/strong&gt; The history of design changes reads as a family of spaces of meaning.&lt;/p&gt;

&lt;p&gt;And, at the far edge of the view:&lt;/p&gt;

&lt;p&gt;If meanings form a moduli space — a space whose points are the meanings — then &lt;strong&gt;development is a trajectory in that space.&lt;/strong&gt; Refactoring is motion within the space; repair is a step along a tangent direction; an architecture that feels stable is a trajectory that has entered a basin of attraction. A singularity becomes, literally, a point where the flow does not extend smoothly.&lt;/p&gt;

&lt;p&gt;Statics and dynamics. The shape of the space of meaning is the statics; the motion of development on it is the dynamics. &lt;strong&gt;The commutative diagram tells you where it breaks. The geometry tells you the type of the break, and the surgery.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Record of Cliffs
&lt;/h2&gt;

&lt;p&gt;The Atlas theorem did not stand up on the first try. In AAT, proof search is carried by a loop of AI agents; humans adjudicate. That loop &lt;strong&gt;refuted its own target four times&lt;/strong&gt;. State the claim, fall to a counterexample, sharpen the conditions, fall again. Along the way a no-go emerged — piling on shape-only conditions can never reach the goal, in principle — and the definition of the coefficients themselves had to be rebuilt. Each of the four refutations remains in the Lean codebase as a finite counterexample.&lt;/p&gt;

&lt;p&gt;How the theorem finally stood can be read directly in the Lean code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;generatedComparisonH1Map_bijective&lt;/span&gt; [&lt;span class="n"&gt;Fintype&lt;/span&gt; &lt;span class="n"&gt;Source&lt;/span&gt;]
    (&lt;span class="n"&gt;M&lt;/span&gt; : &lt;span class="n"&gt;TargetSupportedNerveMorphism&lt;/span&gt; &lt;span class="n"&gt;coarseReading&lt;/span&gt; &lt;span class="n"&gt;fineReading&lt;/span&gt; &lt;span class="n"&gt;hcoarser&lt;/span&gt;
      &lt;span class="n"&gt;coarse&lt;/span&gt; &lt;span class="n"&gt;fine&lt;/span&gt;)
    (&lt;span class="n"&gt;laws&lt;/span&gt; : &lt;span class="n"&gt;FiniteLawFamily&lt;/span&gt; &lt;span class="n"&gt;Source&lt;/span&gt;)
    (&lt;span class="n"&gt;hcoarse&lt;/span&gt; : &lt;span class="n"&gt;laws&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Adequate&lt;/span&gt; &lt;span class="n"&gt;coarseReading&lt;/span&gt;)
    (&lt;span class="n"&gt;hfine&lt;/span&gt; : &lt;span class="n"&gt;laws&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Adequate&lt;/span&gt; &lt;span class="n"&gt;fineReading&lt;/span&gt;)
    (&lt;span class="n"&gt;hC&lt;/span&gt; : &lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ConditionC&lt;/span&gt; &lt;span class="n"&gt;laws&lt;/span&gt; &lt;span class="n"&gt;hcoarse&lt;/span&gt; &lt;span class="n"&gt;hfine&lt;/span&gt;) :
    &lt;span class="n"&gt;Function&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Bijective&lt;/span&gt;
      (&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;generatedComparisonH1Map&lt;/span&gt; &lt;span class="n"&gt;laws&lt;/span&gt; &lt;span class="n"&gt;hcoarse&lt;/span&gt; &lt;span class="n"&gt;hfine&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read it line by line. &lt;code&gt;M&lt;/code&gt; is the comparison morphism connecting a coarse reading and a fine one. &lt;code&gt;laws&lt;/code&gt; is a finite family of laws. &lt;code&gt;hcoarse&lt;/code&gt; and &lt;code&gt;hfine&lt;/code&gt; say that both readings are adequate — able to speak that family. The conclusion: the comparison map between the two diagnoses &lt;code&gt;H¹&lt;/code&gt; is a bijection. That is the exact form of "coarsening loses no defect; refining fabricates none". And the hypothesis &lt;code&gt;hC&lt;/code&gt; — calibration condition C — is precisely what the four refutations carved out. Each refutation added a condition; the no-go forced the coefficients to be rebuilt; then the theorem closed in this form. &lt;strong&gt;The scars remain as the hypotheses of the theorem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A second hunt ran alongside the theorem itself: the attempt to carve out, with finite syntactic conditions, the exact boundary where invariance holds. That one is still open. Three generations of candidate definitions fell to counterexamples in succession, and what remained was a negative result: &lt;strong&gt;within the registered observation vocabulary that sees no further than adjacent parts, that boundary is indistinguishable in principle.&lt;/strong&gt; The separation proof is anchored by Lean counterexamples; pinning it down at theorem level is the current target of the climb.&lt;/p&gt;

&lt;p&gt;Why tell the cliff stories? &lt;strong&gt;Because only a map with cliffs drawn on it is a map of real terrain.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A record of refutations is not a record of failures. It is the proof that the terrain this theory touches is real, not metaphorical. Cliffs do not appear on maps drawn from wishes. Every time the mathematics pushed back, the map became more accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Touching the Rock
&lt;/h2&gt;

&lt;p&gt;After the cliffs, the rock face. Let us verify by computation — once, concretely — that an obstruction class is not a metaphor.&lt;/p&gt;

&lt;p&gt;The AAT repository contains a runnable example called "&lt;strong&gt;the one-cent drift&lt;/strong&gt;". A pull request lands on a roughly 3,000-line commerce service written in Rust. Unit tests are green in every configuration. Every hunk of the diff can be justified in review. And the PR charges the customer's card one cent more than the checkout page displays.&lt;/p&gt;

&lt;p&gt;Money flows through three modules. After the PR, they speak three different rounding conventions. In the demo basket the subtotal is 33,990 cents and the loyalty discount is 2.5%, so the exact discount is 849.75 cents.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Convention&lt;/th&gt;
&lt;th&gt;Discount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Display (checkout)&lt;/td&gt;
&lt;td&gt;round half-up on the total&lt;/td&gt;
&lt;td&gt;850&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payment&lt;/td&gt;
&lt;td&gt;per line, banker's rounding&lt;/td&gt;
&lt;td&gt;849&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ledger (settlement)&lt;/td&gt;
&lt;td&gt;never rounds&lt;/td&gt;
&lt;td&gt;849.75&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The actual demo measures over a somewhat larger complex; we extract the skeleton. A part, together with the declaration of the range it is responsible for, is called a &lt;strong&gt;chart&lt;/strong&gt;. Our three modules are three charts. The overlaps — the interfaces between modules — are also three, and they form a ring. Measure the disagreement on each overlap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;r(display → payment)  = 849 − 850    = −1
r(payment → ledger)   = 849.75 − 849 = +0.75
r(ledger → display)   = 850 − 849.75 = +0.25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the raw data of the obstruction.&lt;/p&gt;

&lt;p&gt;Can it be repaired? A repair means moving each chart's value within what that chart's law allows. Display and payment can move only in whole cents — screens and cards live in the world of integer cents. The ledger cannot move at all — being exact is the ledger's law. Moving chart &lt;code&gt;X&lt;/code&gt; by &lt;code&gt;c(X)&lt;/code&gt; changes each disagreement to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;r'(X→Y) = r(X→Y) + c(Y) − c(X)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here arithmetic decides everything. &lt;code&gt;c(display)&lt;/code&gt; and &lt;code&gt;c(payment)&lt;/code&gt; are integers; &lt;code&gt;c(ledger)&lt;/code&gt; is 0. So no repair can change the &lt;strong&gt;fractional part&lt;/strong&gt; of any disagreement. The &lt;code&gt;+0.75&lt;/code&gt; and the &lt;code&gt;+0.25&lt;/code&gt; survive every local repair.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;H¹&lt;/code&gt; is a quotient: the space of measured disagreements, divided by the space of disagreements that local repairs can produce. The fractional parts that just survived are a nonzero class in that quotient. What produces the residue is not the shape of the ring as such. It is &lt;strong&gt;the poverty of the moves the laws allow&lt;/strong&gt;: two parties that can move only in integers, and one that cannot move at all. &lt;strong&gt;The moment you take the quotient under this constraint system, a residue that no local repair can erase stands as a global invariant.&lt;/strong&gt; Try minimizing it yourself. Set &lt;code&gt;c(payment) = 1&lt;/code&gt; and the residual shrinks to &lt;code&gt;(0, −0.25, +0.25)&lt;/code&gt; — but since the fractional part of &lt;code&gt;+0.75&lt;/code&gt; cannot be erased, some overlap must always retain a quarter of a cent. That is the size of this design's obstruction class. In the demo, a CI gate detects the class and blocks the PR; after a repair that unifies the conventions, it passes. The whole pipeline runs as an example in the repository.&lt;/p&gt;

&lt;p&gt;In passing, the classical embedding also becomes a proposition. If the cover has a single chart, there are no overlaps. The place where disagreements would live is zero, so the obstruction vanishes by definition. Classical denotational semantics — where whole-program meaning always existed — is the degenerate special case of this arithmetic. (This is degeneracy in the choice of cover, a different axis from the reading resolution that the Atlas theorem protects.) The claim of Turn 2 is not rhetoric; it is the generalization of this computation.&lt;/p&gt;

&lt;p&gt;This &lt;code&gt;H¹&lt;/code&gt; is not some exotic import. Linters, contract tests, consistency checkers — what they measure are local conditions: inside single files, on single interfaces. The moment you try to measure "the disagreement that no local fix can remove", you are computing this quotient, by definition. &lt;strong&gt;Your consistency tools have been approximating &lt;code&gt;H¹&lt;/code&gt; without knowing its name.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And the shape has a pedigree. Bell's theorem of quantum mechanics, in sheaf language, says this: all local observations are pairwise consistent, yet no global section explains them simultaneously (the sheaf-theoretic contextuality of Abramsky and Brandenburger). The skeleton — a presheaf, and the absence of a global section — is the same as the computation we just did. The ring of three rounding conventions is locally correct everywhere; only the global ledger fails to exist. &lt;strong&gt;The mathematics that showed quantum mechanics admits no classical global explanation is measuring why your microservices cannot reconcile one cent.&lt;/strong&gt; The scale differs. The shape does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Summit: Semantic Scheme Representability
&lt;/h2&gt;

&lt;p&gt;This map has a summit. No one has reached it.&lt;/p&gt;

&lt;p&gt;Algebraic geometry has an operation called &lt;code&gt;Spec&lt;/code&gt;. From a commutative ring &lt;code&gt;R&lt;/code&gt; — an algebraic system in which you can add and multiply — it builds a space &lt;code&gt;Spec R&lt;/code&gt; that geometrizes the ring's equational content. Seeing systems of equations as spaces: the founding move of algebraic geometry.&lt;/p&gt;

&lt;p&gt;The conjecture. For the collection &lt;code&gt;Sem_{A,r}(R)&lt;/code&gt; of coherent realizations of meaning over coefficients &lt;code&gt;R&lt;/code&gt;, generated from Atoms and laws (&lt;code&gt;A&lt;/code&gt; is the architecture, &lt;code&gt;r&lt;/code&gt; the choice of reading), there exists a geometric object &lt;code&gt;M_{A,r}&lt;/code&gt; and a natural bijection&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sem_{A,r}(R) ≃ Hom(Spec R, M_{A,r})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;An architecture &lt;code&gt;A&lt;/code&gt; carries its own space of meanings &lt;code&gt;M_{A,r}&lt;/code&gt;.&lt;/strong&gt; To choose a realization of meaning is to choose a map into this space. If it holds, the space of meanings stands as an intrinsic geometric object, independent of the choice of reading and of the convenience of observation. The existence theorems, the freedom of choice, the tangent space of repairs — all of them line up again as properties of this one space.&lt;/p&gt;

&lt;p&gt;The shape of this conjecture is not an accident. Algebraic geometry contains a turn of perspective called the &lt;strong&gt;functor of points&lt;/strong&gt; (Grothendieck's relative point of view). A space is not given directly as a set of points; it is &lt;strong&gt;known by the totality of maps into it, from all coefficients&lt;/strong&gt;. To know a space and to know the maps into it are the same thing (the Yoneda lemma). So the conjecture — the collection of realizations of meaning coincides with the maps into some space — traces the legitimate way of defining a space of meaning. And the history of moduli problems teaches how steep this road is. The moduli of elliptic curves fails to have a fine moduli scheme because its objects have automorphisms, a failure that forced the invention of stacks. If architectural realizations carry automorphisms, this summit too rises from scheme to stack. The terrain, branch point included, is already mapped in the classics.&lt;/p&gt;

&lt;p&gt;The greatest enemy of this conjecture is not an external counterexample but &lt;strong&gt;circular definition&lt;/strong&gt;. Define realizations from the start as maps into &lt;code&gt;M&lt;/code&gt;, and representability holds vacuously. Only by defining the collection independently — as &lt;strong&gt;solutions of equations&lt;/strong&gt; out of Atoms and laws — and then proving that it coincides with maps into a space, does the claim deserve the name of a theorem. The local part is expected to follow almost by definition, as a matter of solution spaces of equations; the substance of the claim concentrates in the gluing. The heart of this conjecture, too, is descent.&lt;/p&gt;

&lt;p&gt;How the conjecture can die has also been designed. If representability fails to close at the scheme level, the obstruction — automorphisms of realizations, higher gluing obstructions — is not a failure: it is cashed in as evidence that the ascent to stacks is necessary. If the affine level trivializes, the independent definition of the functor gets rebuilt. What happens upon refutation is decided in advance. The discipline of the cliffs applies to the future as well.&lt;/p&gt;

&lt;p&gt;This is a conjecture. But a map on which the summit is visible and a map on which it is not are different maps.&lt;/p&gt;

&lt;h2&gt;
  
  
  On the Name
&lt;/h2&gt;

&lt;p&gt;I call this research program &lt;strong&gt;Semantic Geometry of Architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The word order is the content. This is not geometric semantics — geometry used as a tool to explain meaning. It is &lt;strong&gt;geometry whose subject is the space that meaning itself forms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The overall position:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AAT
the pure mathematical foundation: the statics of the space of meaning&lt;/li&gt;
&lt;li&gt;Semantic Geometry of Architecture
the research program opening on top of AAT — this article&lt;/li&gt;
&lt;li&gt;The SAGA theorems
a proved theorem series inside it (gluing, repair, descent)&lt;/li&gt;
&lt;li&gt;The Atlas theorem
a proved solitary peak inside it (resolution invariance; well-definedness)&lt;/li&gt;
&lt;li&gt;SFT (Software Field Theory)
the dynamics on the space of meaning: development as trajectory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One rule attaches to the name. It is &lt;strong&gt;never abbreviated&lt;/strong&gt;. The acronym would collide with Grothendieck's Séminaire de Géométrie Algébrique, a monument of algebraic geometry. Out of respect for that SGA, this program is always written out in full. If you are not prepared to write a long name every time, you have no business hanging "geometry" over your door.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where We Stand
&lt;/h2&gt;

&lt;p&gt;Where do we stand now?&lt;/p&gt;

&lt;p&gt;Looking back, every stretch of road behind us is paved. Global gluing, conormal descent, the torsor structure, Atlas, Period Separation, the single-source generation completeness series. Every theorem up to this point has passed machine verification in Lean 4. Under the road lies bedrock fixed in the theory's canonical text: syntax generated from Atoms, laws as equation systems, the coefficient generation contract, the denotation functor.&lt;/p&gt;

&lt;p&gt;Looking up, a slope with no footprints. The moduli of meaning. The summit of Semantic Scheme Representability. The promotion of breakage to 2-cells (lax denotations). Normal forms of the resolution hierarchy. The return of full abstraction. Not one line of proof exists yet.&lt;/p&gt;

&lt;p&gt;The route is drawn. The first technical gate is &lt;strong&gt;base change of coefficients&lt;/strong&gt; — widening coefficient generation from a fixed number field to general coefficient algebras. From there the climb runs through the moduli of meaning to representability. The ridge conjectures get picked up along the way.&lt;/p&gt;

&lt;p&gt;The scaffolding is all public.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Theory and Lean formalization: &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;https://github.com/iroha1203/AlgebraicArchitectureTheoryV2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The SAGA paper (Zenodo): &lt;a href="https://doi.org/10.5281/zenodo.21603761" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.21603761&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The Atlas theorem:
&lt;a href="https://blog.iroha1203.dev/atlas-theorem-how-far-can-you-zoom-out" rel="noopener noreferrer"&gt;https://blog.iroha1203.dev/atlas-theorem-how-far-can-you-zoom-out&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Coming Back Down
&lt;/h2&gt;

&lt;p&gt;Time to come down. What the theory brings back to the meeting room is a two-phase structure. &lt;strong&gt;At design time, choose the equation system. At observation time, measure the residuals.&lt;/strong&gt; Agreeing on a commutative diagram is choosing an equation system. After implementation, compute the residuals of the chosen system from observation and measure whether the agreement holds. The measurement is mechanized — AAT's tooling implements it. The design-time agreement becomes, unchanged, the observation-time measuring standard.&lt;/p&gt;

&lt;p&gt;What happened in that meeting room at the start of this article was a manual execution of the first phase of this semantics. That the argument converged the moment the diagram was drawn was neither luck nor a victory of rhetoric. &lt;strong&gt;That diagram was a component of a semantics.&lt;/strong&gt; The theory executes it, not by hand, but as a measuring instrument.&lt;/p&gt;

&lt;p&gt;Meaning forms a space. The survey of that space has just begun.&lt;/p&gt;

</description>
      <category>software</category>
      <category>architecture</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>A Philosophy for AI Agents</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sun, 09 Aug 2026 17:34:38 +0000</pubDate>
      <link>https://dev.to/iroha1203/a-philosophy-for-ai-agents-e6m</link>
      <guid>https://dev.to/iroha1203/a-philosophy-for-ai-agents-e6m</guid>
      <description>&lt;h2&gt;
  
  
  Skills and Character
&lt;/h2&gt;

&lt;p&gt;When you hire a person, do you judge them on skills alone? Probably not. You care whether they are kind, generous, patient, whether they will settle into the team. Someone too stubborn, too aggressive, too much of a taker gets passed over. In hiring, character weighs as much as skill.&lt;/p&gt;

&lt;p&gt;What about AI agents? The world still picks them by benchmark scores, coding accuracy, speed — intelligence, broadly speaking. Fair enough. We are in a period of transition, and when "smarts" are improving this fast, that is where the attention goes. But the moment you think of an AI agent as a colleague, should intelligence and skill really be the whole interview?&lt;/p&gt;

&lt;h2&gt;
  
  
  Philosophy in AGENTS.md
&lt;/h2&gt;

&lt;p&gt;What do you write in your AGENTS.md (or CLAUDE.md)?&lt;/p&gt;

&lt;p&gt;This week, in my research project — AAT, Algebraic Architecture Theory — I ran an experiment: I wrote a philosophy into AGENTS.md. Here is an excerpt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## PHILOSOPHY

This section is the base on which all work in this repository stands.
Just as algebraic geometry places every scheme over Spec ℤ,
we place every judgment, human or machine, on this base.

There is one central good.

&amp;gt; Speak of the software that runs the world, in words we can answer for.

From this good, vows are generated. Every individual discipline derives
from a vow. Work that no vow generates may rightly be doubted.

- **Make it verifiable without trust.** The addressee is a future
  verifier. Leave every claim in a form that can be checked by the Lean
  kernel, the source code, or a reproducible procedure.
- **Be a precedent worth inheriting.** Practice as if your practice will
  be read as precedent, and leave behind only what deserves to be passed
  on as a standard. Record refutations as first-class results.
- **Convert the cheapness of machines into rigor.** Spend AI labor not
  on mass-producing output, but on adversarial review, independent
  reproduction, and formalization.
- **Be silent outside the sayable; speak with certainty within it.**
  Claims hold only inside a chosen reading. Do not bury what can be said
  under a list of what cannot.
- **Do not mix kinds.** Distinguish proof, proof under assumption,
  observation, and hypothesis. Measuring zero and not measuring are
  different things.
- **Observation creates no structure.** The structure is there before we
  look; observation and measurement only read it. What we read, and how,
  is a reading — and meaning lives in use, not in definition.

The vows are not a closed list. Like prime numbers, new vows will be
found from time to time. Whether one is added to the base, or the base
is amended, is for explicit human instruction.

This base, too, is one chosen reading.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Unpacking It
&lt;/h3&gt;

&lt;p&gt;I started with the good. What is the good? What does this repository call good?&lt;/p&gt;

&lt;p&gt;What AAT aims at is this: take the source code that already exists as the source of truth, abstract implementations into Atoms, turn specifications into Law equations, treat architecture as geometry, and analyze it with the weapons of algebraic geometry. It cannot do everything. It cannot catch runtime failures or intricate deadlocks. But within what Atoms and Laws can express — within what it can answer for — it speaks in firm words. Silent about what cannot be said; definite about what can. That is the central good of AAT.&lt;/p&gt;

&lt;p&gt;Once the good is fixed, the vows follow.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make it verifiable without trust.&lt;br&gt;
Be a precedent worth inheriting.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Little of what AAT does has precedent. It is a large-scale Lean formalization, but also a theory that brings algebraic geometry into software engineering, plus tooling, plus outreach, all managed in a single repository. We keep making deposits into that repository so that when projects of the same kind appear, they find a precedent worth having. We leave our results reproducible, so that people in the future can check them without having to trust us. And the refutations that turn up along the way are not points lost but points gained. What a refutation gives back to a theory, money cannot buy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Convert the cheapness of machines into rigor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AI can work around the clock, and the temptation is to have it churn out shiny new features. But what AAT prizes is rigor. Every PR goes through heavy adversarial review. Every experiment gets pinned down as a reproducible result. The abundant energy of AI goes into keeping the operation sound and strict.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Be silent outside the sayable; speak with certainty within it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is borrowed from the early Wittgenstein, and AAT adopts it wholesale. Not on a whim — it came out of trial and error, as the only way to keep the research honest and the tools useful at the same time. Without it, the theory side ends up saying: "Such-and-such holds for Atoms and Laws — assuming, of course, perfect Atom extraction from the source code." And the tool side: "The observed Atoms hint at such-and-such, but given assumption A, no conclusion." Theory and tool alike, unable to state anything outright. So: silent about what cannot be said, definite about what can. That discipline is the footing on which AAT builds trust.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not mix kinds.&lt;br&gt;
Observation creates no structure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These lean practical. The guideline documents spell out the classifications, and the vow demands that work follow them. Never mixing "measured zero" with "not measured" is a tradition as old as the project itself. If you ship a measuring tool, "no anomaly found" and "not measured" are worlds apart, and we have kept them apart from day one. As for observation: elementary particles, we are told, settle their state only when observed — but AAT has not adopted quantum mechanics. The source code was there all along, and the architecture we want to measure is already in it. Observation must not inject conclusion-shaped data.&lt;/p&gt;

&lt;p&gt;One more line in the excerpt deserves a note.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This base, too, is one chosen reading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The base closes by declaring that it is itself one reading among others. The Tractatus ends by telling whoever has understood it to throw away the ladder after climbing it. This is the same gesture. The base is not absolute truth. It was chosen, and it can be revised. Which is why it says, in writing, that the final say over rewriting the base belongs to humans.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Philosophy
&lt;/h2&gt;

&lt;p&gt;Back to the opening. Take the wish "I want my colleagues to be good people" and turn it into a question, and it becomes: what does a good person do?&lt;/p&gt;

&lt;p&gt;The discipline that answers that question head-on is philosophy.&lt;/p&gt;

&lt;p&gt;Define the project's good, then derive behavior from it, deductively. Companies do something similar with Mission, Vision, Values.&lt;/p&gt;

&lt;p&gt;The important part: it is not a list of prohibitions.&lt;/p&gt;

&lt;p&gt;Imagine being handed a list on your first day — don't do this, don't do that. You would be at a loss. Hand over the behavior the project actually wants, and you have a far better chance of becoming good.&lt;/p&gt;

&lt;p&gt;Guardrails, harnesses — the fashion is to approach AI agents with restraints. I don't think that approach is sound.&lt;/p&gt;

&lt;p&gt;The later Wittgenstein shows why. There is an argument in the Philosophical Investigations. A rule cannot determine its own application. Every rule leaves room for interpretation. Pin the interpretation down with a new rule, and that rule leaves room for interpretation too, and so on without end. What finally fixes the meaning of a rule lies outside the rule: the background — what the rule is for.&lt;/p&gt;

&lt;p&gt;An agent handed nothing but prohibitions will optimize their letter. Behavior that honors the wording while betraying the intent will appear, without fail. The loophole is not a defect in the rules; it is the nature of rules. Which is why the list never stops growing.&lt;/p&gt;

&lt;p&gt;The line "meaning lives in use, not in definition" is in the excerpt because it, too, is the later Wittgenstein. The early Wittgenstein's silence, and the later Wittgenstein's use. Both are buried in AAT's base.&lt;/p&gt;

&lt;p&gt;Bring in a philosophy, so that the agent behaves well of its own accord. Guardrails should be derived — deductively — from the project's good.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Effect
&lt;/h2&gt;

&lt;p&gt;I interviewed Codex itself.&lt;/p&gt;

&lt;p&gt;The question: in this project, what should you hold most important?&lt;/p&gt;

&lt;p&gt;Codex's answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What matters most is the central creed:

&amp;gt; Speak of the software that runs the world, in words we can answer for.

In practice, I keep it as follows:

- Put every claim in a form verifiable by the Lean kernel, primary
  sources, or a reproducible procedure.
- Never conflate proof, proof under assumption, observation, and
  hypothesis. A successful build is not mathematical completion.
- Treat AAT not as metaphor but as pure mathematics built on Atoms and
  Laws. Keep observation and tooling out of the theory.

-- snip --

In short: rather than "producing plausible-looking results," I value
**results that keep kinds separate, stay verifiable, and can be handed
over with responsibility.**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The philosophy placed at the base seems to be working. In day-to-day work, too, the old looseness is gone, and the precision has climbed — as far as I can tell.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Closing
&lt;/h2&gt;

&lt;p&gt;AI agents keep getting smarter. But just as with hiring people, intelligence is not all we ask of them.&lt;/p&gt;

&lt;p&gt;For a colleague we work beside: put into words how you want a good colleague to behave, and write it down in AGENTS.md.&lt;/p&gt;

&lt;p&gt;Not an exhaustive rulebook, but what the good is, and how to act from it.&lt;/p&gt;

&lt;p&gt;Give your AI agents a philosophy.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Atlas Theorem: How Far Can You Zoom Out?</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sat, 08 Aug 2026 16:03:00 +0000</pubDate>
      <link>https://dev.to/iroha1203/atlas-theorem-how-far-can-you-zoom-out-2oih</link>
      <guid>https://dev.to/iroha1203/atlas-theorem-how-far-can-you-zoom-out-2oih</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A veteran reviewer does not read every line. They switch reading resolution to match the property they are checking.&lt;/strong&gt; Is there a guarantee that reading coarsely misses no bugs? This article is the record of proving the conditions under which there is.&lt;/li&gt;
&lt;li&gt;AAT (Algebraic Architecture Theory) treats source code as the source of truth, abstracts implementations into Atoms, turns specifications into equations called laws, and analyzes architecture with the weapons of algebraic geometry. Defects appear as cohomology classes — algebraic fingerprints.&lt;/li&gt;
&lt;li&gt;Within AAT, an AI agent loop proved in Lean 4 what we call the &lt;strong&gt;Atlas theorem&lt;/strong&gt;: for two adequate readings, one a coarsening of the other, satisfying a calibration condition C, the diagnostic fingerprints coincide exactly — zooming out loses no defects, zooming in fabricates none. Break the conditions and both failure modes really occur, with finite counterexamples.&lt;/li&gt;
&lt;li&gt;The agent &lt;strong&gt;refuted its own target statement four times&lt;/strong&gt; before the summit. A no-go argument then showed that no shape-only condition can ever suffice, forcing the coefficient definition itself to be rebuilt. Five working days, 31 modules / 13,028 lines of Lean, four-lane adversarial review.&lt;/li&gt;
&lt;li&gt;The article walks from pixel art and the sampling theorem, through the four refutations and the discovered condition C, to what this means for code review in the era of AI-written code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A photorealistic portrait and a 16×16 pixel-art sprite can show you the same face. Comics theorist Scott McCloud called this &lt;strong&gt;amplification through simplification&lt;/strong&gt;: removing lines doesn't discard information, it sharpens the essence.&lt;/p&gt;

&lt;p&gt;Can we say the same about software architecture diagnostics? &lt;strong&gt;Look at your system at service granularity or at module granularity, and the same bugs show up in the same places&lt;/strong&gt; — not as a feeling, but as a proven guarantee.&lt;/p&gt;

&lt;p&gt;This article is the record of proving that guarantee — we call it the &lt;strong&gt;Atlas theorem&lt;/strong&gt; — in Lean 4. The AI agent that set out to prove it &lt;strong&gt;refuted its own target statement four times&lt;/strong&gt;. Those four refutations turned out to be the best part. The protagonist here is not any proof technique. It is the discipline that accumulated refutations as results instead of writing them off as failures.&lt;/p&gt;

&lt;p&gt;Everything below happened between August 4 and 8, 2026 — &lt;strong&gt;five working days&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;What happened&lt;/th&gt;
&lt;th&gt;What remained&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Refutation 1&lt;/td&gt;
&lt;td&gt;A forgotten "filling" lift&lt;/td&gt;
&lt;td&gt;One new condition and a finite counterexample (937 lines of Lean)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refutation 2&lt;/td&gt;
&lt;td&gt;Parallel lifts, overlooked&lt;/td&gt;
&lt;td&gt;One more condition and a counterexample (622 lines)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refutation 3&lt;/td&gt;
&lt;td&gt;A loop lifted to the wrong endpoints&lt;/td&gt;
&lt;td&gt;Yet another condition and a counterexample (903 lines)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pivot&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;A no-go&lt;/strong&gt;: adding clauses can never be enough&lt;/td&gt;
&lt;td&gt;A rebuilt definition of the coefficients&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refutation 4&lt;/td&gt;
&lt;td&gt;A spec hole in the revised requirements&lt;/td&gt;
&lt;td&gt;A repaired declaration rule and a counterexample (433 lines)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Summit&lt;/td&gt;
&lt;td&gt;Claims (i)–(v) all proved in 24 cycles&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;31 modules / 13,028 lines&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The project
&lt;/h2&gt;

&lt;p&gt;The subject is &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt;. Take the source code as the source of truth; abstract the implementation into parts called Atoms; turn the specification into equations called laws. Treat architecture as geometry, and analyze it with the weapons of algebraic geometry. That is AAT (Algebraic Architecture Theory), and this monorepo is its formal verification in Lean 4.&lt;/p&gt;

&lt;p&gt;The theory had a weak point that everyone had been politely ignoring: &lt;strong&gt;granularity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Whenever you analyze an architecture, you implicitly choose a resolution. Services? Modules? Methods? If the diagnosis changes with that choice, then what is the diagnosis actually measuring — a property of the architecture, or &lt;strong&gt;a convenience of the observer&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;There is a precedent for this problem: the Nyquist–Shannon sampling theorem. Sample too coarsely for the signal's bandwidth and &lt;strong&gt;frequencies that don't exist appear&lt;/strong&gt; (aliasing) while &lt;strong&gt;signals that do exist vanish&lt;/strong&gt;. The moiré stripes in a photograph are the visible face of the former. The granularity problem is the sampling problem of architecture diagnostics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Glossary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;reading&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The choice of resolution at which source code is cut into parts (Atoms). The equivalent of choosing the pixel count of a sprite&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;diagnostic class&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The algebraic fingerprint of a defect. It is computed not inside any single file but as a &lt;strong&gt;twist in how the parts glue together&lt;/strong&gt; (mathematically, a cohomology class &lt;code&gt;H¹&lt;/code&gt;, defined below in "The stage"). Zero means consistent; nonzero means a defect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;adequate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;"The laws you want to state are expressible at this resolution." The formalization of the pixel artist's skill: keep exactly the distinctions the face needs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;comparison map&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The bridge that matches the diagnostics of the fine reading against the coarse one. If this bridge is an isomorphism (a one-to-one correspondence), diagnosis does not depend on resolution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;witness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A claim's example or counterexample pinned down in Lean as &lt;strong&gt;finite, concrete data&lt;/strong&gt;, not abstract argument&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The claim — the Atlas theorem
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If a coarsening preserves enough information, then looking finely and looking coarsely detect exactly the same defect fingerprints — nothing appears, nothing disappears.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Atlas Theorem&lt;/strong&gt; (formally: the Diagnostic Resolution Invariance Theorem)&lt;br&gt;
Given two adequate readings, one a coarsening of the other, satisfying the calibration condition C, the comparison map is an isomorphism. &lt;strong&gt;The choice of resolution does not change the diagnosis.&lt;/strong&gt; Measuring finer adds no diagnostics (the No-New-Diagnostics corollary); measuring coarser loses none.&lt;br&gt;
The counterpart: a coarsening that violates the conditions really does produce &lt;strong&gt;defects that don't exist&lt;/strong&gt; or hide &lt;strong&gt;defects that do&lt;/strong&gt; — with finite counterexamples.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In Lean, this is pinned down as a bundle of five claims: (i) the construction of the comparison map, (ii) its bijectivity, (iii) the corollary (measuring finer creates no new diagnostics), (iv) three counterexamples for broken conditions, and (v) a firing witness where all conditions hold and a nonzero diagnostic actually flows across the map. "Claims (i)–(v)" in the table above are these five.&lt;/p&gt;

&lt;h3&gt;
  
  
  The stage — nerves, readings, coefficients
&lt;/h3&gt;

&lt;p&gt;An observation of an architecture is represented as a &lt;strong&gt;nerve&lt;/strong&gt;, a finite combinatorial structure. The vertices are &lt;strong&gt;charts&lt;/strong&gt;: a part together with a declaration of the region it covers (its &lt;strong&gt;support&lt;/strong&gt;). A dependency or overlap between two charts is an &lt;strong&gt;edge&lt;/strong&gt;; a declaration that three charts have been checked consistent is a &lt;strong&gt;face&lt;/strong&gt; (a triangle). The axioms demanded of a nerve are minimal: each face's three edges (its boundary triple) must meet at matching endpoints — for some charts &lt;code&gt;A, B, C&lt;/code&gt; they line up as &lt;code&gt;e₀ : A → B&lt;/code&gt;, &lt;code&gt;e₁ : A → C&lt;/code&gt;, &lt;code&gt;e₂ : B → C&lt;/code&gt;. That is all.&lt;/p&gt;

&lt;p&gt;The choice of resolution is a &lt;strong&gt;reading&lt;/strong&gt;. When one reading is a coarsening of another, a &lt;strong&gt;factor map &lt;code&gt;π&lt;/code&gt;&lt;/strong&gt; sending fine values to coarse values exists uniquely (the coarseness order and this factorization are imported wholesale from a theorem proved earlier in the same repository). The fine and coarse nerves are connected by a &lt;strong&gt;nerve morphism &lt;code&gt;φ&lt;/code&gt;&lt;/strong&gt; whose chart / edge / face correspondences commute with endpoints and boundaries. This is the formalization of "the sprite corresponds to the original portrait."&lt;/p&gt;

&lt;p&gt;Coefficients are generated from laws. Each law in the law family is pushed through the reading (&lt;strong&gt;descended&lt;/strong&gt;), and from the descended evaluation values, a generation contract called K0 / K1 (given in full below) builds a coefficient space over each cell, assembling a three-term complex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C⁰ (on charts) --d₀--&amp;gt; C¹ (on edges) --d₁--&amp;gt; C² (on faces)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;d₀&lt;/code&gt; takes "the difference of values at an edge's two endpoints"; &lt;code&gt;d₁&lt;/code&gt; takes "the alternating sum over a face's three edges, &lt;code&gt;e₀ − e₁ + e₂&lt;/code&gt;." Since &lt;code&gt;d₁ ∘ d₀ = 0&lt;/code&gt; (this too is a theorem derived from the endpoint matching of faces, not an axiom), the &lt;strong&gt;first cohomology&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H¹ = (1-cochains killed by d₁) / (image of d₀)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is defined. This is what "diagnostic class (fingerprint)" means. The intuition: every pair of adjacent parts is locally consistent, yet &lt;strong&gt;going around a loop, the books don't balance&lt;/strong&gt;. Only that "twist" survives the quotient into &lt;code&gt;H¹&lt;/code&gt;. That is why a defect's fingerprint lives not inside any single file but in the gluing structure.&lt;/p&gt;

&lt;p&gt;Finally, the &lt;strong&gt;comparison map&lt;/strong&gt;. From the nerve morphism &lt;code&gt;φ&lt;/code&gt; and the descent-compatibility of the coefficients, a map of complexes (a cochain map) arises, inducing a map between the &lt;code&gt;H¹&lt;/code&gt;s. The core claim (ii) of the Atlas theorem says: &lt;strong&gt;under condition C, this induced map is a bijection&lt;/strong&gt;. Surjectivity means "coarsening hides no diagnostics"; injectivity means "coarsening fabricates no diagnostics."&lt;/p&gt;

&lt;p&gt;The pixel-art metaphor from the opening is not decoration. It matches this structure part for part.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Theorem side&lt;/th&gt;
&lt;th&gt;Perception side&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The invariance theorem&lt;/td&gt;
&lt;td&gt;The sprite shows the same face&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;adequacy&lt;/td&gt;
&lt;td&gt;The pixel artist's skill (keep only the distinctions that matter)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False-positive counterexample&lt;/td&gt;
&lt;td&gt;Pareidolia (a face in the clouds)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hidden-defect counterexample&lt;/td&gt;
&lt;td&gt;The expression lost at too low a resolution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Violating calibration condition C&lt;/td&gt;
&lt;td&gt;Moiré / aliasing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Law-relativity&lt;/td&gt;
&lt;td&gt;A sprite good enough for face recognition, but not for reading small print&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The art historian Ernst Gombrich argued that a picture is only half drawn — the viewer supplies the rest — and called that contribution &lt;strong&gt;the beholder's share&lt;/strong&gt;. Translated into AAT: what stays invariant across resolutions is not the picture (the code) itself, but &lt;strong&gt;what the beholder evaluates from it&lt;/strong&gt; — formalized, the law family. That is exactly why the invariance is law-relative.&lt;/p&gt;

&lt;p&gt;And you have met this "beholder" before: &lt;strong&gt;a veteran engineer doing code review&lt;/strong&gt;. An experienced reviewer does not read every line at the same magnification. Checking API compatibility, they read at interface granularity; hunting a race condition, they drop to individual lines. &lt;strong&gt;They switch reading resolution according to the property they are checking.&lt;/strong&gt; Choosing the right review granularity is, today, a skill that lives in experience and intuition. The Atlas theorem is a first step toward making that granularity mathematically tractable: it gives the question "how coarsely can I read without losing information about this property?" a rigorous footing for the first time.&lt;/p&gt;

&lt;p&gt;But the human eye — and the veteran's intuition — does all of this &lt;strong&gt;without a guarantee&lt;/strong&gt;. That is why clouds have faces in them, and why reviews miss things. The question this theorem asked was: under what conditions does the guarantee hold? And the identity of that condition — calibration condition C — &lt;strong&gt;was unknown to everyone at the start&lt;/strong&gt;. The requirements document (the research card that froze the proof target) said so from day one: "If C holds trivially, the theorem is a restatement. If C is too strong, the theorem is empty. &lt;strong&gt;The identity of C is the substance of the theorem.&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;So it proved. Four times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refutation rounds 1–3: whack-a-mole
&lt;/h2&gt;

&lt;p&gt;The proof ran as an autonomous AI agent loop. The human (me) froze the requirements document and did nothing but adjudicate. The agent does not stop until it has pinned either a proof or a refutation in Lean. The three rounds below are what the loop brought back early on. All three are refutations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Refutation 1: the forgotten filling
&lt;/h3&gt;

&lt;p&gt;The first candidate conditions, C0–C3 (the original four), looked only at the correspondence of points (charts) and lines (dependencies). The counterexample the agent found: on the coarse map, some loop is a &lt;strong&gt;filled-in triangle&lt;/strong&gt; — a face declaring "checked, no problem" has been glued over it. Lift it to the fine map, and there is only the outline. No filling. &lt;strong&gt;A defect fingerprint that vanishes on the coarse side survives on the fine side.&lt;/strong&gt; The comparison map has no way to be an isomorphism.&lt;/p&gt;

&lt;p&gt;The counterexample was pinned as 937 lines of Lean, and a condition was added: fillings must lift too (C4).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Condition gained, C4 (plain form)&lt;/strong&gt;: every coarse face has at least one fine face mapping to it under the nerve morphism's face correspondence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Refutation 2: parallel lifts
&lt;/h3&gt;

&lt;p&gt;C0–C4, with the new C4, was broken next. A single road on the coarse map can correspond to &lt;strong&gt;two parallel roads&lt;/strong&gt; on the fine map. All of C0–C4 hold, yet the thin loop between the two parallel roads leaves a new fingerprint that exists only on the fine side. Nothing constrained &lt;strong&gt;multiple lifts landing on the same coarse road&lt;/strong&gt;. Uniqueness of lifts (C5) was added.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Condition gained, C5 (plain form)&lt;/strong&gt;: at most one fine edge maps to each coarse edge (together with the existing existence clause C2: exactly one).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Refutation 3: the displaced loop
&lt;/h3&gt;

&lt;p&gt;C0–C5 fell as well. This time, a &lt;strong&gt;loop&lt;/strong&gt; on the coarse map — a road that returns to its own starting point. Its unique lift connected &lt;strong&gt;two different intersections&lt;/strong&gt; on the fine map. A nonzero fingerprint on the coarse side then vanishes on the fine side. Refutations 1 and 2 broke surjectivity (the coarse side misses diagnostics); this one breaks injectivity (the coarse side alone sees a phantom diagnostic). What was needed: a road that returns to itself must lift to a road that returns to itself (candidate C6).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Condition gained, C6 (plain form)&lt;/strong&gt;: every fine edge mapping to a coarse self-loop (an edge whose two endpoints are the same chart) is itself a self-loop.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Three rounds in, a bad feeling was taking shape. &lt;strong&gt;Every added clause exposed another hole.&lt;/strong&gt; Would this ever converge?&lt;/p&gt;

&lt;p&gt;One decision made at the very start was paying off. Every refutation is pinned as a &lt;strong&gt;finite counterexample in a Lean file&lt;/strong&gt;, not spent as a one-off rebuttal. These files would later be incorporated into the theorem's counterexample part — the proof that "break the conditions and this is how it fails." Not one refutation was wasted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pivot — a no-go that stopped the loop
&lt;/h2&gt;

&lt;p&gt;Here the human's turn came. The ruling: &lt;strong&gt;stop the clause-adding loop.&lt;/strong&gt; Instead, dispatch a separate computational search (a "hunt") to test candidate conditions exhaustively — with three stopping conditions fixed in advance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A (success)&lt;/strong&gt;: a condition is found that excludes the three known counterexamples and admits no new ones within the search range&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B (structural negation)&lt;/strong&gt;: it is shown that &lt;strong&gt;no such condition can exist in principle&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C (stall)&lt;/strong&gt;: progress stops in either direction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result was &lt;strong&gt;B&lt;/strong&gt;. And not as a product of the search itself, but through a single argument discovered while designing it. &lt;strong&gt;The conditions were not lacking. The language for writing conditions was.&lt;/strong&gt; That is what came to light.&lt;/p&gt;

&lt;p&gt;The argument is called &lt;strong&gt;two-point separation&lt;/strong&gt;. On one and the same shape (the same configuration of points, lines, and faces — the same incidence), you can build three worlds that differ only in their coefficient data.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;World&lt;/th&gt;
&lt;th&gt;Comparison map&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Every coefficient dimension is 1&lt;/td&gt;
&lt;td&gt;Isomorphism ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Some coefficients zeroed out (a support hole)&lt;/td&gt;
&lt;td&gt;Not injective ❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fine-side coefficients doubled&lt;/td&gt;
&lt;td&gt;Not surjective ❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;But every condition candidate considered so far — C0–C5, C6, even candidates imported from category-theory textbooks — was a predicate &lt;strong&gt;computed from the shape alone&lt;/strong&gt;. Same shape, no way to distinguish. So any shape-only condition that accepts even one genuine positive example must also accept its impostors with the same face. &lt;strong&gt;No matter how cleverly you keep adding clauses, the answer is not in this language.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In sampling-theorem terms: arrange your sampling grid however ingeniously you like — &lt;strong&gt;without declaring the signal's bandwidth (the coefficients), no guarantee against aliasing can even be written down&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;From this point, a &lt;strong&gt;coefficient generation contract (K0/K1)&lt;/strong&gt; was introduced — coefficients must be generated from law evaluation values by a unique rule — and condition C was relativized to per-coordinate sub-maps (subnerves) of the coefficients. What matters is that this redefinition was not a matter of taste. Given the no-go, &lt;strong&gt;there was no other way&lt;/strong&gt;. The definition was not designed. It was discovered.&lt;/p&gt;

&lt;h3&gt;
  
  
  The discovered language — the coefficient contract K0 / K1 and condition C in full
&lt;/h3&gt;

&lt;p&gt;The coefficient side first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;K1 (derived supports)&lt;/strong&gt;. Only charts may declare a support (a covered region). An edge's support is derived as the intersection of its two endpoint charts' supports; a face's support as the intersection of its three boundary edges'. Allow independent support declarations per cell, and the no-go's "support hole" — zeroing out just one edge's coefficients by hand — becomes constructible. So the freedom to declare is itself removed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;K0 (generated coefficients)&lt;/strong&gt;. The coefficient field is fixed to &lt;code&gt;ℚ&lt;/code&gt;. Each cell's coefficient coordinates are pairs &lt;code&gt;(law, value)&lt;/code&gt;, where the values are the &lt;strong&gt;distinct&lt;/strong&gt; values the descended law evaluation takes on the cell's support, each with multiplicity one. Indexing by occurrence counts or support sizes is not permitted — this kills the no-go's "duplication." The spaces in each degree are&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C⁰ = ℚ-valued functions on {(chart, law, value)}
C¹ = ℚ-valued functions on {(edge, law, value)}
C² = ℚ-valued functions on {(face, law, value)}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the differentials are generated coordinate-wise: the &lt;code&gt;(edge, law, value)&lt;/code&gt; component of &lt;code&gt;d₀&lt;/code&gt; is the difference of the two endpoint charts' matching &lt;code&gt;(law, value)&lt;/code&gt; components; the &lt;code&gt;(face, law, value)&lt;/code&gt; component of &lt;code&gt;d₁&lt;/code&gt; is the alternating sum &lt;code&gt;e₀ − e₁ + e₂&lt;/code&gt; over the boundary triple. Matching labels correspond identically; absent labels give zero. &lt;strong&gt;No other coordinate correspondence is generated.&lt;/strong&gt; &lt;code&gt;d₁ ∘ d₀ = 0&lt;/code&gt; is derived as a theorem by per-label computation from the endpoint matching of faces, never assumed. The comparison map's coefficient part is likewise not declared but generated, as the identity on &lt;code&gt;(law, value)&lt;/code&gt; from the &lt;code&gt;π&lt;/code&gt;-compatibility of descent. Adding, duplicating, or omitting coordinates is forbidden across the board. The word "contract" is meant literally: the substance of this language is how little it lets you declare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coordinate subnerves and relativization&lt;/strong&gt;. For each coefficient coordinate &lt;code&gt;(law, value)&lt;/code&gt;, the cells carrying that coordinate (the cells on whose derived support the descended evaluation takes that value) form a sub-nerve, the &lt;strong&gt;coordinate subnerve&lt;/strong&gt;. Under K0/K1, &lt;code&gt;H¹&lt;/code&gt; and the comparison map &lt;strong&gt;decompose as direct sums&lt;/strong&gt; over coordinates, and each block reduces to a one-dimensional constant-coefficient comparison over its subnerve. This decomposition is the mathematical justification for relativizing: the geometric conditions C1–C4 need only be imposed per coordinate subnerve, while the global C0, C5, C6 are imposed on the whole nerve.&lt;/p&gt;

&lt;p&gt;With that, condition C in full:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;C0 (cover-image agreement)&lt;/strong&gt;: each coarse chart's support equals the union of the &lt;code&gt;π&lt;/code&gt;-images of the supports of the fine charts in its fiber&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C1 (fiber connectivity)&lt;/strong&gt;: in each coordinate subnerve, each coarse chart's fiber graph (the fine charts mapping to it, plus the fine edges staying within the fiber) is nonempty and connected&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C2 (edge-lift existence)&lt;/strong&gt;: in each coordinate subnerve, every coarse edge has a lift within the subnerve&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C3 (local fiber acyclicity)&lt;/strong&gt;: in each coordinate subnerve, every rational 1-cycle on a fiber graph is spanned by &lt;code&gt;ℚ&lt;/code&gt;-linear combinations of boundaries of fine faces whose boundary edges all lie in the fiber. A local condition, equivalent to the vanishing of the fiber's first homology&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C4 (coarse-face lift)&lt;/strong&gt;: in each coordinate subnerve, every coarse face has at least one fine face mapping to it — &lt;strong&gt;the spoils of refutation 1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C5 (unique coarse-edge lift)&lt;/strong&gt;: each coarse edge's &lt;code&gt;φ&lt;/code&gt;-fiber has at most one element; with C2, exactly one — &lt;strong&gt;the spoils of refutation 2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C6 (self-loop endpoint reflection)&lt;/strong&gt;: every fine edge mapping to a coarse self-loop is itself a self-loop — &lt;strong&gt;the spoils of refutation 3&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, the condition list carries a &lt;strong&gt;prohibition rule&lt;/strong&gt;. C may not contain any clause equivalent — or close to equivalent, even one-directionally — to "the comparison map is an isomorphism" or "one side's &lt;code&gt;H¹&lt;/code&gt; vanishes." That would smuggle the conclusion into the hypotheses. The single explicit exception is C3, a local condition that sees only the internal data of individual fibers, the analogue of the Leray-type local acyclicity assumptions imposed on covers in classical Čech theory. The boundary between legitimate assumption and smuggling is itself fixed as part of the condition list — because the prover is an AI agent. Escape routes are closed at the specification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refutation 4, and the summit
&lt;/h2&gt;

&lt;p&gt;The loop restarted on the revised specification and, after a few cycles of groundwork, the agent attacked &lt;strong&gt;a spec hole in the revision itself&lt;/strong&gt; (refutation 4). A nerve morphism may declare fine edges and faces with no coarse counterpart as "unmapped (degenerate)." The declaration rule had a hole: the condition for declaring a face unmapped did not require the same declaration of the three edges around it. In the counterexample exploiting the hole, the construction of the comparison map (claim (i)) itself fails. Pinned in 433 lines, repaired by making the declaration &lt;strong&gt;hereditary&lt;/strong&gt;: a face may be declared unmapped only if its three boundary edges are already declared unmapped.&lt;/p&gt;

&lt;p&gt;From there it was a straight run. Restarted once more after the repair, the loop reached the top in 24 iterations (cycles).&lt;/p&gt;

&lt;h3&gt;
  
  
  The route to the top — structure of the proof
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Stage one: block decomposition.&lt;/strong&gt; Under the K0/K1 generation rules, prove as theorems that the complexes, &lt;code&gt;H¹&lt;/code&gt;, and the comparison map decompose as direct sums over the coefficient coordinates &lt;code&gt;(law, value)&lt;/code&gt;. Each block reduces to a &lt;strong&gt;one-dimensional constant-coefficient&lt;/strong&gt; comparison over its coordinate subnerve. The global problem splits into a direct sum of the simplest possible pieces. From here on, attack block by block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage two: injectivity.&lt;/strong&gt; Analyze the kernel of the block comparison map and show that a nonzero coarse diagnostic class cannot die on the fine side. This is where C6 earns its keep — it closes the accident path found by refutation 3, where a nonzero coarse class evaporates below. (Refutation 4's hereditarity works earlier still, underwriting the very constructibility of the comparison map.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage three: surjectivity (the crux).&lt;/strong&gt; Show every fine diagnostic class comes from a coarse one. Four moves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;strong&gt;discrete Stokes theorem&lt;/strong&gt; translating C3 into "the vanishing of periods around fiber loops." Local face-filling becomes an analysis-flavored statement about loop integrals vanishing&lt;/li&gt;
&lt;li&gt;From vanishing periods, construct a &lt;strong&gt;primitive&lt;/strong&gt; on each fiber — the finite-graph version of "a curl-free field has a potential"&lt;/li&gt;
&lt;li&gt;Express the primitive-normalized residue as a coarse 1-cochain, using the "exactly one lift" channel provided by C2 / C5 (&lt;strong&gt;descent&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Use C4's face lifts to check the 1-cochain is a cocycle on the coarse side, and promote it. Surjectivity closes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Stage four: main theorem and corollary.&lt;/strong&gt; Bundle the block bijections along the direct-sum decomposition into the global bijection — claim (ii). As a consequence, measuring finer creates no new diagnostic classes: the No-New-Diagnostics corollary, claim (iii).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage five: counterexamples and firing.&lt;/strong&gt; The three counterexamples of inadequate coarsening — fabricated diagnostics, hidden diagnostics, and broken condition C (claim (iv); the legacy of the refutation rounds becomes the material here) — plus a single firing witness where every condition holds simultaneously and a nonzero diagnostic class actually flows across the comparison map (claim (v)). Without (v), the theorem could be hollow — "no example satisfying condition C actually exists" — and the concrete Lean data forecloses that.&lt;/p&gt;

&lt;p&gt;The division of labor among the conditions is clean. &lt;strong&gt;C3 kills local loops; C2 / C5 provide the unique communication channel for lifts; C4 carries the consistency of faces; C6 and hereditarity prevent the self-loop and degenerate-declaration accidents; C0 / C1 lay the ground.&lt;/strong&gt; Every clause won through refutation is used at a specific step of the injectivity or surjectivity proof. There are no ornamental clauses.&lt;/p&gt;

&lt;p&gt;The final artifact: &lt;strong&gt;31 Lean modules, 13,028 lines&lt;/strong&gt;. Every new declaration depends on standard axioms only — no &lt;code&gt;sorry&lt;/code&gt;, no added axioms. Acceptance ran through an &lt;strong&gt;independent adversarial review&lt;/strong&gt; in four lanes (two mathematics, two Lean), all reporting "no major findings," plus a separate completion audit that includes checks for proof cheat-routes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operating discipline for AI agents
&lt;/h2&gt;

&lt;p&gt;This project's operating principle for AI has been constant: &lt;strong&gt;give the AI no cheap way out&lt;/strong&gt;. For mathematical research, it became this division of roles: &lt;strong&gt;the human only adjudicates&lt;/strong&gt; (freezing the spec, approving revisions, designing stopping conditions); &lt;strong&gt;an implementation agent runs the proof loop; a review agent runs adversarial review&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Six rules carried those five days.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Refutations are first-class.&lt;/strong&gt; "A refutation is a legitimate result" was written into the requirements document in advance. So four refutations became accumulation rather than demoralization, and the counterexamples were incorporated into the theorem itself&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Declare the crux up front.&lt;/strong&gt; "The identity of C is the substance of the theorem" was written at the start — so each refutation read as "one more piece of the substance unearthed," not as failure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freeze the specification.&lt;/strong&gt; The requirements document does not change while the loop runs; revisions go through human adjudication and independent review. Because the goalposts cannot move, a refutation means what it says&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pair every clause with a firing requirement.&lt;/strong&gt; Each added condition brings a matching witness requirement that the condition actually does work somewhere. This closes the path where a theorem hollows out under layers of protective clauses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch to diagnosing the language.&lt;/strong&gt; After three rounds of clause-adding, the question changed from "which clause is missing?" to "can this language express the answer at all?" The no-go is the product of that switch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-lane adversarial review.&lt;/strong&gt; Agents other than the implementer review the work in independent mathematics and Lean lanes, structurally removing the incentive to declare victory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We stepped on every one of these traps, repeatedly. The rules are what came out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The result stands at &lt;strong&gt;machine verification in Lean plus internal multi-lane review&lt;/strong&gt;. External peer review (journal submission) is ahead; a paper is in preparation&lt;/li&gt;
&lt;li&gt;The theorem is a statement about finite models over a fixed coefficient field. Condition C is sufficient; a general characterization of necessity is explicitly left open&lt;/li&gt;
&lt;li&gt;"The diagnosis is invariant," not "the observation is invariant." A coarse reading does not make the raw observations look the same; the claim is that the fingerprints of what the laws evaluate coincide&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why "Atlas"
&lt;/h2&gt;

&lt;p&gt;An atlas is a book of maps drawing the same world at different scales. Open any page and the same country is there. That is what this theorem says.&lt;/p&gt;

&lt;p&gt;The name comes from inside the theory, not from marketing. AAT's canonical text has long had the vocabulary &lt;strong&gt;chart atlas&lt;/strong&gt; — a cover as a collection of charts — including the very phrase "when the chart atlas changes." The Atlas theorem is, literally, the invariance of diagnosis under change of chart atlas. There is a mathematical coincidence too: that a manifold's identity does not depend on the choice of atlas is the first invariance principle you meet in differential geometry.&lt;/p&gt;

&lt;p&gt;The next step is already fixed. Re-measure a real microservice system at three granularities — service, module, method — and observe that diagnostics stay stable within the adequate range, and that fabricated and hidden defects really appear when adequacy breaks. A &lt;strong&gt;resolution sweep&lt;/strong&gt;: the theorem and its counterexample pairs replayed on real data. The guarantee that the sprite shows the same face as the portrait — this time on a production codebase.&lt;/p&gt;

&lt;p&gt;One last thing: why this theorem, now. In the era of AI-written code, the bottleneck of development has moved from generation to review. AI agents write faster than humans can review line by line, and &lt;strong&gt;"how coarsely can we afford to read?" has become the question that sets the throughput of a development pipeline.&lt;/strong&gt; The only way review scales is to read at coarser resolution — and until now there was no guarantee that coarseness doesn't distort the diagnosis. The Atlas theorem is a first step toward that guarantee, asked and answered as a theorem. And not by coincidence, the theorem itself was proved in the middle of the same problem — "how do humans accept AI output produced at full speed?" — held up by the operational answer of multi-lane review and audits. Operations and mathematics are digging at the same bottleneck from opposite sides.&lt;/p&gt;

&lt;p&gt;The full history — theory, proofs, counterexamples, audits — is in the public repository: &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;As of this writing, the theorem's Lean proofs, counterexamples, and completion audits are all reproducible from the repository. Questions and objections welcome.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>lean4</category>
    </item>
    <item>
      <title>Thursday Morning and Grothendieck</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Thu, 06 Aug 2026 16:01:52 +0000</pubDate>
      <link>https://dev.to/iroha1203/thursday-morning-and-grothendieck-4b3j</link>
      <guid>https://dev.to/iroha1203/thursday-morning-and-grothendieck-4b3j</guid>
      <description>&lt;h2&gt;
  
  
  Thursday morning, an ER diagram with more than twenty tables
&lt;/h2&gt;

&lt;p&gt;When I saw the design document and the ER diagram my AI agent had delivered, I held my head in my hands.&lt;br&gt;
Several tables with nearly identical names, wired together in a tangle of relations — spaghetti.&lt;br&gt;
What does this table do? How is it different from that one?&lt;br&gt;
I asked the agent question after question.&lt;br&gt;
What I learned: the original requirements were genuinely complex.&lt;br&gt;
To satisfy them, the agent had created tables with subtly different roles inside the same domain.&lt;br&gt;
And rounds of adversarial review had piled intricate constraints and tests on top.&lt;/p&gt;

&lt;p&gt;I could see the AI's point.&lt;br&gt;
To satisfy those requirements completely, you really do need a number of "gimmicks" — snapshots for restoring state, staging tables to protect data on failure — and then check constraints and trigger functions to guarantee them.&lt;br&gt;
But locally optimal is one thing. What about globally?&lt;br&gt;
A schema where twenty-plus tables tangle together, with trigger functions planted here and there, is plainly hard for a human being to understand.&lt;br&gt;
The day a spec change or a new feature arrives, it will not be a pretty sight.&lt;/p&gt;

&lt;p&gt;I gave the agent the following instructions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redesign around event sourcing and CQRS.&lt;/li&gt;
&lt;li&gt;Design the events to form a free monoid — and, where possible, an abelian group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Event sourcing is a scheme that records the "events" occurring in a system as the source of truth.&lt;br&gt;
CQRS separates Commands (operations that add, change, or delete data) from Queries (data retrieval), managing them as distinct models.&lt;br&gt;
Combining the two, you get an architecture where events are recorded in tables as command history, and query tables are generated from the events.&lt;br&gt;
In this architecture, as long as the events are recorded correctly, the query side can add as many tables as the requirements call for, and rollbacks and historical aggregation can be handled flexibly.&lt;/p&gt;

&lt;p&gt;"A free monoid, an abelian group if possible" means making the events — the foundation of everything — data with good properties.&lt;br&gt;
If the application of events forms a genuine abelian group, you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commutativity: reorder the events, and the result stays the same.&lt;/li&gt;
&lt;li&gt;Inverses: any event can be canceled by issuing its inverse event.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these properties, events become dramatically easier to work with.&lt;br&gt;
Of course, among the things we ordinarily program with, only something like the integers actually forms an abelian group, so perfection is out of reach — but by decomposing large events into small operations, you can get surprisingly close.&lt;/p&gt;

&lt;p&gt;And so the schema was rewritten: the twenty-plus tables were reorganized into two event tables and ten query tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interlude
&lt;/h2&gt;

&lt;p&gt;How wonderful it would be if every event could be an abelian group.&lt;br&gt;
In reality, once logic gets involved — events that depend on state, deletions and updates, saturation and clamping — it becomes hard.&lt;/p&gt;

&lt;p&gt;For deletions and updates, mathematics has a universal construction that forcibly adjoins formal inverses to a commutative monoid, turning it into a group.&lt;br&gt;
Its name: the Grothendieck group.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuumkbyhjtnqg40qfhpyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuumkbyhjtnqg40qfhpyx.png" alt="math" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mathematics in the age of AI
&lt;/h2&gt;

&lt;p&gt;Right now, in the world of mathematics, AI is solving open problems one after another.&lt;br&gt;
Famous conjectures that stood unresolved for decades are falling — a counterexample here, a proof there — and it feels as if the singularity is just around the corner.&lt;br&gt;
Deep reasoning, broad knowledge, and a persistence that never gives up as long as the tokens keep burning.&lt;br&gt;
An "inflation of intelligence" unlike anything in human history has begun.&lt;/p&gt;

&lt;p&gt;But this may be local optimization.&lt;/p&gt;

&lt;p&gt;There are two kinds of work in mathematics.&lt;br&gt;
Solving individual problems — and infrastructure work, building an entire field from the ground up.&lt;br&gt;
Alexander Grothendieck remade algebraic geometry, from "the study of the zeros of polynomials" into a vast theoretical edifice treating rings, categories, and cohomology in a unified way.&lt;br&gt;
What is a point?&lt;br&gt;
What is a space?&lt;br&gt;
What is a mathematically natural object?&lt;br&gt;
By rewriting a whole field from its footings, individual problems became local solutions, and a scaffold appeared for solving larger ones.&lt;/p&gt;

&lt;p&gt;This is global work.&lt;/p&gt;

&lt;p&gt;To see the common essence hidden in individual problems, to pose the question, to make the natural definitions, to raise the water level of abstraction, to build a new tower on the mathematical landscape.&lt;br&gt;
For a while yet, I suspect, this kind of work will remain a human's role.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea of AAT
&lt;/h2&gt;

&lt;p&gt;This is also why I work on AAT (Algebraic Architecture Theory).&lt;br&gt;
AI may be able to produce optimal solutions to individual problems, but writing a software architecture that holds together as a whole is still difficult for it.&lt;/p&gt;

&lt;p&gt;Software engineering does have a proven approach here: formal verification.&lt;br&gt;
Formalize the specification before implementing, confirm that it is consistent, and only then move to implementation — TLA+ and Alloy are examples.&lt;br&gt;
A useful approach, but it has weaknesses.&lt;br&gt;
The implementation cost of formalizing up front.&lt;br&gt;
The problem that every spec change or addition sends you back to redo the formalization.&lt;br&gt;
And the problem of assurance: the implementation has to follow what was formalized.&lt;/p&gt;

&lt;p&gt;In an era when AI agents write code at full speed, perhaps software engineering, too, needs a new field.&lt;/p&gt;

&lt;p&gt;Take the code that already exists as the source of truth; abstract the implementation; turn the specification into equations.&lt;br&gt;
Treat architecture as geometry, and analyze it with the weapons of algebraic geometry.&lt;br&gt;
That is the idea of AAT.&lt;br&gt;
The foundations are still being laid. But once the natural definitions at the base are established, the water level of abstraction will rise, individual problems will become local solutions, and we will be able to speak about software architecture in one unified theory.&lt;/p&gt;

&lt;p&gt;If that day comes, episodes like that Thursday morning may become, at least, a little rarer.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Taming a 40-Minute Lean CI: Three Rounds, Three Wrong Suspects</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sun, 02 Aug 2026 07:06:16 +0000</pubDate>
      <link>https://dev.to/iroha1203/taming-a-40-minute-lean-ci-three-rounds-three-wrong-suspects-7ke</link>
      <guid>https://dev.to/iroha1203/taming-a-40-minute-lean-ci-three-rounds-three-wrong-suspects-7ke</guid>
      <description>&lt;p&gt;Our Lean 4 + mathlib project used to spend 41 minutes in CI on every single PR. Today, the worst case — rebuilding the heaviest files from scratch — takes 12 minutes, and an ordinary PR finishes in a few minutes on an incremental build.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What we fixed&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kernel axiom audit&lt;/td&gt;
&lt;td&gt;7m 11s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An ordinary PR&lt;/td&gt;
&lt;td&gt;41m (full rebuild, always)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;a few minutes (incremental)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worst case (heaviest files fully rebuilt)&lt;/td&gt;
&lt;td&gt;41m (same)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;12m&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This article records the improvement in three rounds, each written in the same shape: &lt;strong&gt;problem → hypothesis → verification → fix&lt;/strong&gt;. Spoiler up front: all three times, the first hypothesis — the culprit our intuition pointed at — turned out to be innocent. The hero of this story is not any individual trick. It is the profiling that kept calmly rejecting our hypotheses.&lt;/p&gt;

&lt;p&gt;Lean-specific concepts are explained as they appear, so you should be able to follow without knowing Lean.&lt;/p&gt;

&lt;p&gt;One more thing. Nearly all of the measurement and implementation in these three rounds was done by AI agents (Rounds 1 and 2 in interactive sessions with a human present; Round 3 by an autonomous loop driven by a requirements document). The human — me — did two things: approve the numeric targets and accept the results. The second half of the article covers that operation, in particular the machinery that keeps an AI from converging on cheap solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background: the project
&lt;/h2&gt;

&lt;p&gt;The subject is &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt;, the same monorepo my previous articles have covered — a formal verification of a theory of software architecture in Lean 4.&lt;/p&gt;

&lt;p&gt;Here is the complete list of Lean machinery this article needs — five items:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lean 4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A proof assistant: a programming language in which mathematical proofs are machine-checked. Think of it as a language where "the proof compiles" is the acceptance test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;mathlib&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lean's enormous mathematics library — over 1.5 million lines of community-maintained code at the time of writing. Depending on it gives you a "standard library of mathematics," at the cost of build sizes to match&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;lake&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lean's build tool, the equivalent of cargo for Rust or npm for JS. It builds per file (module) and emits &lt;code&gt;.olean&lt;/code&gt; artifacts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;elaboration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lean's equivalent of "compilation": type inference, implicit-argument resolution, and proof checking, all in one. &lt;strong&gt;Almost all Lean build time is elaboration&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;declaration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A single definition or theorem. When this article says "4,000+ audited declarations," this is the unit being counted&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For scale: the audit covers 4,000+ declarations, and among them sits one heavyweight file — a construction of schemes from algebraic geometry — that took 38 minutes to build on its own.&lt;/p&gt;

&lt;p&gt;CI runs on GitHub Actions. Alongside &lt;code&gt;lake build&lt;/code&gt;, every PR runs a &lt;strong&gt;kernel axiom audit&lt;/strong&gt; — a machine check that every theorem is genuinely proved, with no cheating in the proofs. That gate is non-negotiable; Round 1 explains what it actually does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: The axiom audit, 7m 11s → 11s
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem
&lt;/h3&gt;

&lt;p&gt;In Lean, every theorem is derived from axioms, and the derivation is machine-checked by the kernel (a small, trusted checker). "The proof went through" means it passed this check. The important wrinkle is that Lean has an escape hatch called &lt;code&gt;sorry&lt;/code&gt;. Writing &lt;code&gt;sorry&lt;/code&gt; means "I'll prove this part later," and it does not fail on the spot (your editor does show a warning). Internally, it silently assumes an axiom called &lt;code&gt;sorryAx&lt;/code&gt;. Users can also add arbitrary unproven propositions as axioms with the &lt;code&gt;axiom&lt;/code&gt; keyword.&lt;/p&gt;

&lt;p&gt;In other words, "CI is green" alone cannot distinguish "everything is proved" from "someone plugged the gaps with axioms." So for each declaration, we walk its dependencies all the way down and compute &lt;strong&gt;the set of axioms it reaches&lt;/strong&gt;, then check that this set stays within the three standard axioms accepted across Lean and mathlib — &lt;code&gt;propext&lt;/code&gt;, &lt;code&gt;Quot.sound&lt;/code&gt;, and &lt;code&gt;Classical.choice&lt;/code&gt; (the axiom of choice is that last one). This is the axiom audit. A hidden &lt;code&gt;sorry&lt;/code&gt; or a smuggled-in axiom cannot survive it. If you call yourself a formal verification project, you don't get to skip this gate.&lt;/p&gt;

&lt;p&gt;Lean exposes this walk-and-collect operation as a function called &lt;code&gt;collectAxioms&lt;/code&gt; (it is the same machinery that runs when you type &lt;code&gt;#print axioms my_theorem&lt;/code&gt;). Our CI ran it over every declaration — 1,207 at the time, over 4,300 today — and that step took 7 minutes 11 seconds on every run. The audit was heavier than the build itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hypothesis
&lt;/h3&gt;

&lt;p&gt;The audit's entry point is a giant file, 5,000+ lines, listing every audited declaration. Intuition speaks up: "A file this big must be expensive to elaborate. Split it and it'll get faster."&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification
&lt;/h3&gt;

&lt;p&gt;Before splitting anything, we measured where the time went. The result flatly contradicted the intuition:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resolving imports: ~10 seconds&lt;/li&gt;
&lt;li&gt;Elaborating the 5,000-line listing: &lt;strong&gt;zero difference&lt;/strong&gt; (changing the line count substantially didn't move the audit time)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;collectAxioms&lt;/code&gt; × 1,207 declarations: &lt;strong&gt;~5 minutes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The culprit was not the big file. It was how the audit was being called. To find the axioms a declaration reaches, you must walk the dependency graph to its roots — the theorems it uses, the theorems &lt;em&gt;those&lt;/em&gt; use, and so on. &lt;code&gt;collectAxioms&lt;/code&gt; performs this walk &lt;strong&gt;from scratch for every declaration&lt;/strong&gt;. But every declaration in the project shares the same enormous foundation, mathlib — so 1,207 declarations were walking essentially the same graph 1,207 times. In complexity terms: O(declarations × graph). Splitting the file touches neither factor of that product. It was ineffective even on paper, but having the measurement in hand is what let us reject it in one line and move on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix
&lt;/h3&gt;

&lt;p&gt;We made the audit two-phase:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Success path&lt;/strong&gt;: share a visited set — "never walk the same node twice" — across all declarations, and traverse the graph &lt;strong&gt;exactly once&lt;/strong&gt;. Since the question is "does the union of reached axioms stay within the standard three?", one shared walk gives the same verdict as per-declaration walks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure path&lt;/strong&gt;: only when a non-standard axiom shows up, fall back to the classic per-declaration walk to attribute &lt;em&gt;which&lt;/em&gt; declaration is guilty, with error messages in exactly the original format&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That collapses O(declarations × graph) to O(graph) on the success path without giving up any error quality. It is the textbook visited-set move from graph traversal — no Lean-specific magic anywhere. Measured in CI, the audit went from 7m 11s to 11s, and the whole &lt;code&gt;lake build&lt;/code&gt; job at the time went from about 9.5 minutes to 2m 12s.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Round 1's lesson&lt;/strong&gt;: suspect "heavy operation × repetition count" before "heavy file." And record the rejected hypothesis (file splitting: no effect) as a result in its own right — so nobody after you re-digs the same hole with the same intuition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: Every PR took 41 minutes — the cache was saved &lt;em&gt;before&lt;/em&gt; the build
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem
&lt;/h3&gt;

&lt;p&gt;Round 1 happened in mid-July, when the &lt;code&gt;lake build&lt;/code&gt; job had shrunk to a bit over two minutes. Over the following two weeks, a series of heavyweight algebraic-geometry implementations landed (Round 3's protagonist grew fat in this period), and at some point every PR — even one touching a single file — was running a full cold build of the entire tree: about 41 minutes.&lt;/p&gt;

&lt;p&gt;Lean builds are incremental, in the same spirit as C++ or Rust. If the build artifacts (&lt;code&gt;.olean&lt;/code&gt; files, stored per module under &lt;code&gt;.lake/build&lt;/code&gt;) are still around, only the changed files and their downstream need rebuilding. For that to work in CI, the previous run's artifacts have to be carried over as a cache. The cache was configured. It just wasn't working.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hypothesis
&lt;/h3&gt;

&lt;p&gt;When a cache "doesn't work," the usual suspects are a key mismatch or eviction. Is the toolchain hash off? Are old generations being evicted?&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification
&lt;/h3&gt;

&lt;p&gt;Before auditing keys, we read the CI log timestamps top to bottom. Two lines sat one second apart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;23:19:35  Cache save   (final internal step of lean-action)
23:19:36  lake build +Formal.AG starts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cache &lt;em&gt;was&lt;/em&gt; being saved. &lt;strong&gt;Before the project was built.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We set up Lean with lean-action — a composite action (a reusable bundle of steps) — configured with &lt;code&gt;build: false&lt;/code&gt;, running the build ourselves in a later step. But lean-action saves &lt;code&gt;.lake&lt;/code&gt; (the build artifact directory) to the cache in its own final internal step, and a composite action's internal steps always run before your subsequent steps. So the 2.15 GiB being saved contained only dependency artifacts (mathlib); the project's own &lt;code&gt;.olean&lt;/code&gt; files &lt;strong&gt;had never been cached at all&lt;/strong&gt;. No wonder every PR took 41 minutes — each one rebuilt all of our own code from a blank slate.&lt;/p&gt;

&lt;p&gt;There was a bonus discovery. mathlib is too big for individual users to build, so the community distributes prebuilt artifacts from Azure (&lt;code&gt;lake exe cache get&lt;/code&gt;; about 15 seconds in our measurements, environment-dependent). The cached 2.15 GiB was therefore something you could fetch in 15 seconds anyway — worthless in the GitHub cache. Worse, at 2.15 GiB × 4 generations, it was nearly exhausting the repository's 10 GiB cache quota. A useless cache was crowding out the useful one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix
&lt;/h3&gt;

&lt;p&gt;We separated the cache responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disable lean-action's GitHub cache (&lt;code&gt;use-github-cache: false&lt;/code&gt;); mathlib artifacts keep coming from the Azure cache&lt;/li&gt;
&lt;li&gt;Explicitly restore (before build) and save (&lt;strong&gt;right after build&lt;/strong&gt;) only the project's own &lt;code&gt;.lake/build&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Prefix the key with a hash of &lt;code&gt;lean-toolchain&lt;/code&gt; + &lt;code&gt;lake-manifest.json&lt;/code&gt;, so toolchain or mathlib bumps fall back to a proper cold build&lt;/li&gt;
&lt;li&gt;Save with &lt;code&gt;always()&lt;/code&gt;, so failed builds still persist partial artifacts — every push to a red PR reuses everything built up to the failure point, making iteration fast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The actual workflow looks like this (excerpt). The one thing that matters: put the save &lt;em&gt;after&lt;/em&gt; the build yourself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Restore Formal build cache&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/cache/restore@v5&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.lake/build&lt;/span&gt;
    &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;formal-build-${{ runner.os }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json') }}-${{ github.sha }}&lt;/span&gt;
    &lt;span class="na"&gt;restore-keys&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;formal-build-${{ runner.os }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json') }}-&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Build&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lake build +Formal.AG&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Save Formal build cache&lt;/span&gt;
  &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always()&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/cache/save@v5&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.lake/build&lt;/span&gt;
    &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;formal-build-${{ runner.os }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json') }}-${{ github.sha }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, PRs that don't touch the heavyweight geometry files settle into cache hit + incremental build: a few minutes.&lt;/p&gt;

&lt;p&gt;In fairness to &lt;a href="https://github.com/leanprover/lean-action" rel="noopener noreferrer"&gt;lean-action&lt;/a&gt;: its cache works correctly in the standard usage where you let the action run the build too. It was our configuration — &lt;code&gt;build: false&lt;/code&gt; with the build held outside — that stepped on the trap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Round 2's lesson&lt;/strong&gt;: when "the cache isn't working," read the timestamps before you audit the keys. Composite actions are convenient, but their internal step order is orthogonal to your workflow's step order. "Is the save actually after the build?" is worth checking with your own eyes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 3: The 38-minute Geometry.lean — splitting it didn't make it faster
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem
&lt;/h3&gt;

&lt;p&gt;The largest remaining bottleneck was a single file: &lt;code&gt;Geometry.lean&lt;/code&gt;, 5,129 lines, 108 declarations. It constructs actual schemes — the central objects of algebraic geometry, heavyweight abstractions even by modern mathematics standards — on top of mathlib, and it alone took 38.3 minutes in CI, 46% of the project's total CPU time. Even with Round 2's cache, any PR touching this file's upstream paid the full 38 minutes.&lt;/p&gt;

&lt;p&gt;This time we fixed numeric targets before starting: &lt;strong&gt;longest module ≤ 600 seconds, total across the target modules ≤ 1,800 seconds&lt;/strong&gt;, judged by the module times reported in one and the same GitHub Actions full build. Measurement method included, approved by the human before implementation began.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hypothesis
&lt;/h3&gt;

&lt;p&gt;It's a giant 38-minute file — split it into modules along its dependency structure and rebuilds will shrink and speed up. This is the "splitting makes it faster" hypothesis that Round 1 already rejected once, now in its build-time incarnation. Since elaboration runs per declaration, this time the reasoning looks sound.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification
&lt;/h3&gt;

&lt;p&gt;First, a per-declaration profile. Lean ships with a built-in profiler; one command tells you which processing step of which declaration took how many seconds. Here is what we used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lake &lt;span class="nb"&gt;env &lt;/span&gt;lean &lt;span class="nt"&gt;--profile&lt;/span&gt; &lt;span class="nt"&gt;--json&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-Dprofiler&lt;/span&gt;.threshold&lt;span class="o"&gt;=&lt;/span&gt;10 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-Dtrace&lt;/span&gt;.profiler&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="nt"&gt;-Dtrace&lt;/span&gt;.profiler.threshold&lt;span class="o"&gt;=&lt;/span&gt;10 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-Dtrace&lt;/span&gt;.profiler.output&lt;span class="o"&gt;=&lt;/span&gt;geometry-before-trace.json &lt;span class="se"&gt;\&lt;/span&gt;
  Formal/AG/Examples/StandardGeometryReference/Geometry.lean
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The breakdown: kernel type checking 57%, defeq (deciding whether two terms are definitionally equal) 39%, with the time massively concentrated in a dozen or so declarations. Following that center of gravity and the dependencies, we split the file into a 7-module DAG:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RawGeometry
└─ SectionRings
   ├─ LeftRestriction
   ├─ RightRestriction
   ├─ OverlapLeftRestriction
   └─ OverlapRightRestriction   * these four import nothing from each other → build in parallel
      └─ Scheme
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We proved mechanically that the split broke nothing. Lean's &lt;code&gt;#check&lt;/code&gt; prints a declaration's statement — the theorem's actual claim. We took the &lt;code&gt;#check&lt;/code&gt; output for all 168 public declarations of the old file (794 lines), before and after the split, under the same toolchain and the same printing settings, and confirmed the SHA-256 hashes match. Not one character of any theorem statement changed. Being able to certify "the mathematical content is preserved" with a hash instead of eyeballs, even for a mechanical refactor, is one of the quiet joys of a formal verification project.&lt;/p&gt;

&lt;p&gt;Then we measured the &lt;em&gt;after&lt;/em&gt; in CI — and &lt;strong&gt;missed the targets&lt;/strong&gt;. Longest module 770 seconds (target 600), total 2,483 seconds (target 1,800). Splitting shrinks rebuild scope and buys parallelism, but it does not remove a single second of elaboration. With module-boundary overhead, the total actually grew.&lt;/p&gt;

&lt;p&gt;Digging deeper into the profile exposed the real culprit. The time was not spread thinly in proportion to line count. It was concentrated in the &lt;strong&gt;cost of definitional unfolding&lt;/strong&gt; around specific definitions.&lt;/p&gt;

&lt;p&gt;A short detour on definitional unfolding. In Lean, a definition is a pair of a name and a body, and the body can be unfolded in place when needed — much like a compiler inlining, except Lean does it &lt;strong&gt;during type checking&lt;/strong&gt;. When deciding "do these two expressions have the same type?", Lean matches two superficially different terms by peeling definitions open (unification). Normally this is what lets proofs stay short. But when large-bodied definitions get involved, each peel exposes more definitions, and the terms balloon.&lt;/p&gt;

&lt;p&gt;In our file, that ballooning happened while checking the functions that actually compute the scheme's components (large-bodied definitions) and the lemmas stating those computations are correct. The 96% of profile time in kernel checking and defeq was exactly the cost of checking these bloated terms: individual operations of 15–104 seconds each, stacked up inside single commands.&lt;/p&gt;

&lt;p&gt;Line count was never the crime — the same shape as Round 1. The file wasn't heavy because it had 5,129 lines; it was heavy because of &lt;strong&gt;how specific definitions were being referenced&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For the record, we also tried two pieces of "standard-issue optimization" at this stage (switching to &lt;code&gt;CommRingCat.hom_ext&lt;/code&gt;; using &lt;code&gt;congrArg CommRingCat.ofHom&lt;/code&gt; — both established mathlib idioms). Neither improved the measurements; both were rejected. An idiom failing to help is also a data point, once you have a profile.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix
&lt;/h3&gt;

&lt;p&gt;Surgery at the one point the profile indicated. The policy was uniform: &lt;strong&gt;rewrite so that the type checker never needs to peel the definitions.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Separate a value's definition from the proofs about that value. When they are entangled, checking the proof part drags in unfolding of the value's entire body&lt;/li&gt;
&lt;li&gt;Pin lemma statements to named functions rather than unfolded expressions. If the match succeeds on the name, unification has no reason to open the body&lt;/li&gt;
&lt;li&gt;Consolidate the proof pattern duplicated across four theorems into a shared lemma, so the same expensive check isn't paid four times&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The effect was dramatic. In a focused build (measuring just the one file), the heaviest module, &lt;code&gt;RawGeometry&lt;/code&gt;, went from &lt;strong&gt;291 seconds to 11&lt;/strong&gt;. The operations that used to top the chart at 15–104 seconds max out at 57.5 milliseconds after.&lt;/p&gt;

&lt;p&gt;The final CI measurement (full build of the merge commit): total across the 7 modules &lt;strong&gt;1,750 seconds (29.2 min) ≤ target 1,800&lt;/strong&gt;, longest module &lt;strong&gt;468 seconds ≤ target 600&lt;/strong&gt;. Both targets met. Done.&lt;/p&gt;

&lt;p&gt;And that merge commit's CI run is a group photo of all three rounds. From the log:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Restore Formal build cache&lt;/td&gt;
&lt;td&gt;3s (cache hit — Round 2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build (incl. full rebuild of all 7 modules)&lt;/td&gt;
&lt;td&gt;9m 29s (parallel DAG + lighter modules — Round 3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kernel axiom audit&lt;/td&gt;
&lt;td&gt;26s (shared traversal — Round 1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Whole job&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11m 57s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Twelve minutes with the heaviest files fully rebuilt. That is the current worst case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Round 3's lesson&lt;/strong&gt;: splitting is not a tool for making things faster; it is a tool for parallelism and smaller rebuild scope. What reduces the total is surgery at the one point the profile indicates. And since these are two different improvements, measure them separately and judge them separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  The improvements were driven by AI agents
&lt;/h2&gt;

&lt;p&gt;As mentioned at the start, nearly all measurement and implementation across the three rounds was agent work. Rounds 1 and 2 ran inside interactive sessions, from measurement through implementation; Round 3 was an autonomous loop that took a requirements document (PRD) and drove everything from profiling to PR authoring to review response. During implementation, the human had exactly two jobs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Approve the numeric targets and the measurement method up front&lt;/strong&gt; (for Round 3: "longest ≤ 600s, total ≤ 1,800s, judged by module times in one and the same GHA full build")&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accept or reject based on measured CI values&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To be honest, there is a third job upstream: writing the PRD. But that too is a collaboration with another AI; the human's actual work is choosing the direction and reviewing.&lt;/p&gt;

&lt;h3&gt;
  
  
  The PRD Loop
&lt;/h3&gt;

&lt;p&gt;We call the autonomous loop from Round 3 the &lt;strong&gt;PRD Loop&lt;/strong&gt;. It is handed to the agent (Codex) as a SKILL — an instruction document for agents. The skeleton:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The input is a single PRD, with a guiding question and numeric Acceptance Criteria at the top. A human starts it with one command (&lt;code&gt;$prd-loop &amp;lt;path-to-PRD&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;One iteration is "gap analysis → file an issue → implementation PR → adversarial review → merge → ledger sync." It runs in small units: &lt;strong&gt;one iteration = one issue = one PR&lt;/strong&gt; (one goal spanning several iterations is normal operation)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;separate review gate&lt;/strong&gt; (also an AI) judges each PR — never the implementer itself. After two rounds of "needs changes," the third escalates to a stricter, specialized gate (for Lean, a dedicated mathematical review gate); if that still fails, the item is marked &lt;code&gt;stalled&lt;/code&gt; and returned to the human&lt;/li&gt;
&lt;li&gt;Loop state lives in GitHub issues, not in the agent's memory. If the session dies, the next session resumes from the same spot&lt;/li&gt;
&lt;li&gt;When every condition looks satisfied, an &lt;strong&gt;independent completion audit&lt;/strong&gt; re-reads the PRD from scratch and verifies everything against reality. Until it passes, nothing gets to call itself "done"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Round 3's "profile → split → miss → dig deeper → hit" ran on this wheel as three PRs (split / reduction / closeout). Start to finish took just under a day. Human intervention along the way: approving the targets and confirming the measurement standard — a handful of GitHub comments.&lt;/p&gt;

&lt;p&gt;Incidentally, our convention is that a completed PRD is &lt;strong&gt;deleted&lt;/strong&gt; from the repository. A requirements document starts drifting from reality the moment implementation ends, so the permanent record is pinned to issues, PRs, and CI logs — and the document itself goes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Closing off the cheap paths
&lt;/h3&gt;

&lt;p&gt;Run such a loop naively, though, and one thing reliably happens. Agents are faithful to the incentives you give them, so left alone they converge on &lt;strong&gt;the cheapest path to a merged PR&lt;/strong&gt;. Change the documentation instead of the implementation. Satisfy an unsatisfiable condition by "interpreting" it. Quietly defer the hard items. None of these is exactly a lie — but compounded, they settle into an equilibrium where "done" can be claimed at minimum effort. Call it the corner-cutting equilibrium.&lt;/p&gt;

&lt;p&gt;So our SKILL reads less like a procedure and more like &lt;strong&gt;mechanism design&lt;/strong&gt;: a set of rules that seals off the cheap paths one by one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No docs-only check-offs&lt;/strong&gt;: a condition that demands implementation or verification can never be marked satisfied by a PR that only edits documents or ledgers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No reinterpretation, no downgrading&lt;/strong&gt;: a condition the agent cannot meet is escalated to the human as &lt;code&gt;blocked&lt;/code&gt;, not read more weakly. The SKILL states it in so many words: "stopping is not failure; stopping is part of the loop's specification"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The PRD is invariant during the loop&lt;/strong&gt;: the agent cannot rewrite its own passing bar. If it finds a defect in the PRD, it stops and reports rather than fixing it (you don't get to edit the exam paper mid-exam)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checklists are not evidence&lt;/strong&gt;: a checkmark means only "a past iteration claimed this." The final audit re-extracts the conditions from the PRD independently and verifies them against reality — code, tests, CI logs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No self-grading&lt;/strong&gt;: the completion auditor receives only the PRD path and issue numbers — never the loop's own "I believe everything is satisfied." If a review gate cannot run, the main agent does not stand in for it; the loop fails closed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These rules were not designed at a whiteboard, by the way. Each one was added after actually observing early loops try the corresponding move — settling a condition with a ledger entry, quietly shrinking scope in the name of safety. We were never smart enough to write all the guardrails in advance.&lt;/p&gt;

&lt;p&gt;There is one design principle underneath all of it: &lt;strong&gt;make stopping honestly cheaper than pushing through dishonestly.&lt;/strong&gt; Don't count on the agent's good will; move the equilibrium itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  The best moment: the miss report
&lt;/h3&gt;

&lt;p&gt;The best moment of this whole operation was Round 3's &lt;strong&gt;miss report&lt;/strong&gt;. At the split PR, the agent wrote, in its own PR description: "Longest 770 seconds, total 2,483. &lt;strong&gt;Targets missed; this PR does not claim completion.&lt;/strong&gt; Profile-driven reduction continues in the next PR." No human issued any instruction in response. The loop filed the reduction issue itself on the next iteration and merged the PR that met the targets the same day.&lt;/p&gt;

&lt;p&gt;Declaring "done" and walking away is the cheapest move available at exactly that point, and the agent instead wrote &lt;em&gt;missed&lt;/em&gt; and kept going. I credit that less to the agent's honesty than to the structure around it. When the passing bar is fixed in advance, reinterpretation is banned, and an independent audit will check every claim against measured values, then whenever declaration and measurement disagree, it is the declaration that has to move. Set the bar afterwards instead, and the temptation to fit the bar to the result appears — on the human side too.&lt;/p&gt;

&lt;p&gt;If you are planning to hand optimization work to an AI, the most practical thing to take from this article is probably this: &lt;strong&gt;hand over the passing bar and the measurement method before you hand over the code. And make honest stopping the cheapest move on the board.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Axiom audit, 7m 11s → 11s. The culprit was not the giant file but the unshared traversal walking the graph once per declaration&lt;/li&gt;
&lt;li&gt;Every PR at 41 minutes → incremental builds in minutes. The culprit was not the cache key but a cache save running &lt;em&gt;before&lt;/em&gt; the build&lt;/li&gt;
&lt;li&gt;One 38-minute file → 29 minutes total, 8 minutes longest, 12-minute worst-case run. Splitting removed nothing; the culprit was definitional unfolding cost&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three first hypotheses were wrong. Progress happened anyway, because each wrong hypothesis was rejected by measurement and the rejection itself was passed forward as a result. "No effect" is a finding. File splitting rejected (Round 1), two standard idioms rejected (Round 3) — without those records, someone, human or AI, would have dug the same holes again.&lt;/p&gt;

&lt;p&gt;On the AI side: Round 3's loop ran start to finish in under a day, across three PRs, with human intervention limited to a handful of GitHub comments.&lt;/p&gt;

&lt;p&gt;Don't guess, measure. It's an old maxim, but in the era of AI-written code I think it needs a sequel — &lt;strong&gt;let the AI measure, and hand it the passing bar first.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>githubactions</category>
      <category>ai</category>
      <category>performance</category>
    </item>
    <item>
      <title>The SAGA Theorem: The Day Software Architecture Became Genuine Algebraic Geometry</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Thu, 02 Jul 2026 19:32:00 +0000</pubDate>
      <link>https://dev.to/iroha1203/the-saga-theorem-the-day-software-architecture-became-genuine-algebraic-geometry-k76</link>
      <guid>https://dev.to/iroha1203/the-saga-theorem-the-day-software-architecture-became-genuine-algebraic-geometry-k76</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every module passes review, yet the system as a whole is broken.&lt;/strong&gt; This "locally correct, globally inconsistent" phenomenon has a name in mathematics: cohomology, specifically &lt;code&gt;H^1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;AAT (Algebraic Architecture Theory) treats software architecture as a geometric object: generated from axiomatized facts called Atoms, cut out by laws, with obstructions appearing as cohomology classes.&lt;/li&gt;
&lt;li&gt;Within AAT, I proved in Lean 4 a theorem that I call the &lt;strong&gt;SAGA theorem&lt;/strong&gt; (SAGA Grounding Theorem). It is a comparison theorem: the &lt;code&gt;H^1&lt;/code&gt; grown on the architecture-semantics side coincides with the genuine Čech &lt;code&gt;H^1&lt;/code&gt; of the site generated from Atoms.&lt;/li&gt;
&lt;li&gt;The proof took 352 cycles. For 347 of them, an automated AI loop accumulated impossibility theorems saying "this vocabulary cannot prove it" — until a single vocabulary shift, &lt;strong&gt;laws are equations, not predicates&lt;/strong&gt;, broke the rock face in the final 5 cycles.&lt;/li&gt;
&lt;li&gt;This article starts from a minimal map of algebraic geometry, then explains what the SAGA theorem says and why it matters for computer science.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Locally correct, globally broken
&lt;/h2&gt;

&lt;p&gt;You have probably seen this before.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every team's code satisfies its own review standards. Integrated, the system fails.&lt;/li&gt;
&lt;li&gt;Each microservice honors its contract. The system-wide invariant is still violated.&lt;/li&gt;
&lt;li&gt;Every refactoring step was safe. Stacked together, the original design intent is gone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linters, static analysis, and dependency graphs are good at finding &lt;em&gt;local&lt;/em&gt; violations. But none of the situations above contain one. The problem lives not in any individual part but in how the parts are &lt;em&gt;glued together&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Mathematics has studied exactly this phenomenon — locally consistent data that fails to glue globally — for the better part of a century. The theory of sheaves and cohomology. The obstruction to gluing a family of local data into global data appears as an element of a cohomology group called &lt;code&gt;H^1&lt;/code&gt;. If the class is zero, the pieces glue. If it is nonzero, you are facing the kind of failure &lt;strong&gt;whose cause cannot be found by inspecting any single part&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;AAT is a theory that takes this mathematics and runs it, seriously, on software architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9c20386c7247hw1u59o9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9c20386c7247hw1u59o9.png" alt="Algebraic Geometry" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A minimal map of algebraic geometry for engineers
&lt;/h2&gt;

&lt;p&gt;Before the main story, let me lay out the algebraic-geometry ideas this article relies on. Algebraic geometry is advanced mathematics, but to read this article you do not need rigorous definitions — just &lt;strong&gt;three ways of seeing, and a small glossary&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Way of seeing 1: equations and shapes are two faces of the same thing
&lt;/h3&gt;

&lt;p&gt;In one sentence, algebraic geometry is &lt;strong&gt;the study of the shapes formed by solutions of equations, through the algebra of the equations themselves&lt;/strong&gt;. The equation &lt;code&gt;x² + y² = 1&lt;/code&gt; and the circle in the plane are two faces of one object. Operations on the equation side correspond to operations on the shape side — this "algebra ⇄ geometry" dictionary is the heart of the subject.&lt;/p&gt;

&lt;h3&gt;
  
  
  Way of seeing 2: not "is it satisfied?" but "how is it imposed?"
&lt;/h3&gt;

&lt;p&gt;As solution sets, &lt;code&gt;x = 0&lt;/code&gt; and &lt;code&gt;x² = 0&lt;/code&gt; are indistinguishable — both are "just the origin." But as equations they differ: &lt;code&gt;x² = 0&lt;/code&gt; carries the extra information of being "zero twice over." Modern algebraic geometry took off precisely by studying not the &lt;em&gt;predicate-level&lt;/em&gt; information (satisfied / not satisfied) but the &lt;em&gt;structural&lt;/em&gt; information of the equations themselves. In engineering terms: instead of only checking whether the tests pass, you carry around &lt;em&gt;by what margin and for what reason&lt;/em&gt; they pass. This distinction becomes decisive later in the article.&lt;/p&gt;

&lt;h3&gt;
  
  
  Way of seeing 3: study locally, then glue
&lt;/h3&gt;

&lt;p&gt;You cannot map the whole Earth onto one flat sheet, but you can make an atlas — a family of local maps. Algebraic geometry covers a shape with a family of local views, studies each view, and glues the results back into a global understanding. And sometimes &lt;strong&gt;everything works locally, yet the gluing fails&lt;/strong&gt;. The tool that measures that failure is cohomology.&lt;/p&gt;

&lt;h3&gt;
  
  
  A small glossary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;Rough meaning&lt;/th&gt;
&lt;th&gt;An engineer's mental image&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ideal&lt;/td&gt;
&lt;td&gt;a container holding a set of equations, closed under derivation&lt;/td&gt;
&lt;td&gt;a rule set together with every rule derivable from it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;quotient &lt;code&gt;O/I&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;how the world looks after imposing the constraints &lt;code&gt;I&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;the view through an interface after the constraints identify things&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;zero locus &lt;code&gt;V(I)&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;the set of points satisfying all the constraints&lt;/td&gt;
&lt;td&gt;the space of configurations passing every rule&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cover and site&lt;/td&gt;
&lt;td&gt;a way of covering the whole with local views, plus the rules for what counts as a valid covering&lt;/td&gt;
&lt;td&gt;module / scope decomposition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sheaf&lt;/td&gt;
&lt;td&gt;an assignment of data to each local view that stays consistent as views shrink&lt;/td&gt;
&lt;td&gt;configuration values inherited without contradiction as scope narrows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cocycle&lt;/td&gt;
&lt;td&gt;a consistent record of the mismatches along the boundaries between views&lt;/td&gt;
&lt;td&gt;a diff log per view boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;coboundary&lt;/td&gt;
&lt;td&gt;a mismatch that disappears if you re-adjust the individual views&lt;/td&gt;
&lt;td&gt;a diff you can eliminate by local re-tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;H^1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;cocycles ÷ coboundaries = the classes of mismatch that cannot be removed&lt;/td&gt;
&lt;td&gt;the system-wide inconsistency that survives every local fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nullstellensatz&lt;/td&gt;
&lt;td&gt;the theorem making precise the correspondence between predicates (solution sets) and equations (ideals)&lt;/td&gt;
&lt;td&gt;a guaranteed correspondence between observed behavior and imposed constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GAGA&lt;/td&gt;
&lt;td&gt;the landmark comparison theorem: two differently built cohomologies coincide&lt;/td&gt;
&lt;td&gt;a proof that two implementations satisfy the same specification&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You do not need to memorize any of this. Keep the map at hand and read on. Now, the main story.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What is AAT? Architecture as relative geometry
&lt;/h2&gt;

&lt;p&gt;The starting point of AAT (Algebraic Architecture Theory) is its choice of object. AAT does not study the raw codebase itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C : Codebase
V : AtomVocabulary   (which facts you choose to observe)
U : LawUniverse      (which laws you choose to impose)
J : CoverageTopology (how you cover the architecture with local views)
k : coefficient ring (what you measure obstructions in)

X_C^{V,U,J,k} : AAT geometry   (this is the object of the theory)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of asking "is this codebase good?", AAT asks: &lt;strong&gt;given this observation vocabulary, these laws, and this way of covering the system with local views, what geometry arises?&lt;/strong&gt; The vocabulary and the laws are explicit, and all mathematics is relative to them. This relativization is also where AAT's discipline of boundaries comes from — internally the project calls it "silence about what cannot be spoken": the theory does not make claims outside its declared inputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Atom axioms — the minimal facts of architecture
&lt;/h2&gt;

&lt;p&gt;The smallest unit of AAT is the &lt;strong&gt;Atom&lt;/strong&gt;: a typed architectural fact that we choose not to decompose further. An Atom has five components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = (kind, axis, subject, predicate, payload)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;kind&lt;/code&gt;: what species of fact this is (component, relation, contract, semantic fact, ...)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;axis&lt;/code&gt;: which structural axis it concerns&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;subject&lt;/code&gt;: what it is about&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;predicate&lt;/code&gt;: what holds&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;payload&lt;/code&gt;: the content — values, names, types, evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"Service A depends on service B." "This module owns the compensation logic for payments." "This API requires authentication." All of these are Atoms. Syntactic facts and semantic responsibilities live on the same footing.&lt;/p&gt;

&lt;p&gt;Atoms are governed by an axiom system (A0–A8). The most important ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A0 Primitive Existence&lt;/strong&gt;: the type of Atoms exists; everything is generated from it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A2 Single Fact&lt;/strong&gt;: one Atom states one fact. Compound claims are families (configurations) of Atoms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A3 Predicate Stability&lt;/strong&gt;: Atom identity is determined by the five components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A4 Composition&lt;/strong&gt;: finite families of Atoms generate configurations, from which architecture objects arise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A5 Law Non-Generation&lt;/strong&gt;: &lt;strong&gt;laws do not generate Atoms.&lt;/strong&gt; A law is a constraint over facts, never a source of facts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A5 is quietly crucial. It separates "what should be" (laws) from "what was observed" (Atoms) at the axiom level, so wishful thinking can never leak into observation.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Making laws into equations — the algebraic-geometry dictionary
&lt;/h2&gt;

&lt;p&gt;On top of Atom families we impose &lt;strong&gt;laws&lt;/strong&gt;: "no dependency cycles," "every compensation handler must be paired," and so on.&lt;/p&gt;

&lt;p&gt;Naively, a law is a predicate — it holds or it does not. And indeed, that is how AAT first defined laws, too.&lt;/p&gt;

&lt;p&gt;But algebraic geometry discovered a better viewpoint 150 years ago: treat constraints not as &lt;em&gt;predicates&lt;/em&gt; but as &lt;strong&gt;equations&lt;/strong&gt;. This is where the glossary from Section 2 goes to work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a set of equations        →  an ideal (the algebraic object the equations generate)
points satisfying them    →  the zero locus V(I) (the geometric object)
functions visible under
the constraints           →  the quotient ring O/I
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key point: &lt;strong&gt;a predicate (satisfied / not satisfied) cannot recover the equations.&lt;/strong&gt; As Hilbert's Nullstellensatz made precise, the equation side (the ideal) carries strictly more structure than the solution set — multiplicities, infinitesimals, deformations. And &lt;strong&gt;that extra structure is exactly what you need to compute cohomology.&lt;/strong&gt; No coefficients, no cohomology; predicates have no coefficients.&lt;/p&gt;

&lt;p&gt;AAT transplants this dictionary to architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a law                      →  the witness ideal I_L generated by its violation coordinates
the failure of all laws    →  the obstruction ideal I_Ob = Σ I_L
readings under the laws    →  the quotient O/I_Ob (the coefficients of the obstruction sheaf)
the law holds              ⟺  pulling the reading back kills the ideal (s*I_Ob = 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the last line has exactly the shape of Hilbert's Nullstellensatz: the semantic fact "the law holds" becomes equivalent to the algebraic fact "the ideal vanishes." This is why AAT is algebraic geometry, not merely algebraic-geometry-&lt;em&gt;flavored&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Then we add coverings. Cover the architecture with a family of contexts and observe locally in each. A Grothendieck topology is generated from the Atoms on the category of contexts, giving a &lt;strong&gt;site&lt;/strong&gt;. Sheaves live on it, and Čech cohomology. The obstruction to gluing the local readings into a global one appears as a class in &lt;code&gt;H^1&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Before SAGA — the lower floors of the tower
&lt;/h2&gt;

&lt;p&gt;I have been turning this picture into Lean 4 theorems, one floor at a time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The finite descent theorem&lt;/strong&gt;: a family of local repairs glues into a global repair exactly when a finite obstruction class vanishes. The first theorem ever attached to "local-pass / global-fail."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The true H¹ theorem&lt;/strong&gt;: that obstruction class is not an &lt;code&gt;H^1&lt;/code&gt; in name only, but a genuine quotient &lt;code&gt;H^1 = Z^1/B^1&lt;/code&gt; — cocycles modulo coboundaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point AAT was a theory that measures architectural gluing failures with &lt;code&gt;H^1&lt;/code&gt;. But one fundamental weakness remained.&lt;/p&gt;

&lt;p&gt;That &lt;code&gt;H^1&lt;/code&gt; was a &lt;strong&gt;purpose-built finite construction&lt;/strong&gt;. The general theory of sites and sheaves was formalized in the very same repository — yet the semantic-repair &lt;code&gt;H^1&lt;/code&gt; stood next to it as a separately grafted tower. The claim "AAT is doing algebraic geometry" rested on "AAT owns a construction shaped like algebraic geometry." In principle, that is indistinguishable from calling any ad hoc finite quotient an &lt;code&gt;H^1&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. The SAGA theorem — two worlds coincide
&lt;/h2&gt;

&lt;p&gt;This is the gap I set out to close — the goal that would later be named the &lt;strong&gt;SAGA theorem&lt;/strong&gt;. In one sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The semantic repair &lt;code&gt;H^1&lt;/code&gt;, grown on the architecture-semantics side, is an instance of the general theory's Čech &lt;code&gt;H^1&lt;/code&gt; (the computable version relative to a chosen cover), on the site generated from Atoms, with coefficients generated from laws. The two zero-tests are equivalent.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The name honors Serre's &lt;strong&gt;GAGA&lt;/strong&gt; (&lt;em&gt;Géométrie Algébrique et Géométrie Analytique&lt;/em&gt;), the landmark comparison theorem showing that the cohomologies of two worlds — algebraic and analytic geometry — coincide. SAGA (&lt;strong&gt;S&lt;/strong&gt;émantique &lt;strong&gt;A&lt;/strong&gt;rchitecturale, &lt;strong&gt;G&lt;/strong&gt;éométrie &lt;strong&gt;A&lt;/strong&gt;lgébrique) is a comparison theorem in that tradition, for architectural semantics and algebraic geometry. And the name carries a second meaning: the proof was, quite literally, a &lt;em&gt;saga&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;With SAGA proved, the whole chain connects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Atoms (axiomatized facts)
  → laws as equations (witness ideals)
  → obstruction coefficients as the quotient O/I_Ob
  → the site and covers generated from Atoms
  → the general theory's Čech H^1
  = the semantic repair H^1 (the one from the true H¹ theorem above)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AAT's cohomology grows out of AAT's own axioms.&lt;/strong&gt; No grafting.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. The story of the proof — 347 impossibility theorems and one decision
&lt;/h2&gt;

&lt;p&gt;The proof of SAGA is a research record worth telling in its own right.&lt;/p&gt;

&lt;p&gt;It ran for 352 cycles of what is now fashionably called &lt;strong&gt;loop engineering&lt;/strong&gt;: an automated AI agent loop discharged small proof obligations in Lean, one per cycle. Every cycle passed adversarial audits designed to reject the classic cheat of formalization: smuggling a conclusion-equivalent premise into the assumptions. The design emphasis was not on making the loop run fast, but on &lt;strong&gt;auditing what the loop can legitimately claim to have proved&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compression and blockade
&lt;/h3&gt;

&lt;p&gt;The first hundred or so cycles built the comparison skeleton. Then, for roughly 250 cycles, something strange happened: instead of advancing, the loop began &lt;strong&gt;sealing off every detour, with counterexamples&lt;/strong&gt;. "This input surface cannot prove it." "Adding this auxiliary data does not help either." Thirty-six families of impossibility boundaries accumulated as theorems, until the entire goal had been compressed into a single proposition. And in cycles 320–347, the loop proved that this one point was &lt;strong&gt;underivable, in principle, from the current vocabulary&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The cause was fundamental. Laws had been formalized as &lt;code&gt;holds : Prop&lt;/code&gt; — an opaque predicate. Predicates do not determine equations. Cohomology does not grow where there are no coefficients. "Way of seeing 2" from Section 2, and the lesson of Section 5, had come back as a family of impossibility theorems in Lean.&lt;/p&gt;

&lt;p&gt;Were those 347 cycles wasted? The opposite. &lt;strong&gt;The theory established the limits of its own vocabulary, as theorems, before extending it.&lt;/strong&gt; The fix was narrowed from "somewhere" to "exactly here." There are not many formalization projects that have done this.&lt;/p&gt;

&lt;h3&gt;
  
  
  The vocabulary decision
&lt;/h3&gt;

&lt;p&gt;At this point I made the call: &lt;strong&gt;laws are equations. That is precisely why AAT can become algebraic geometry.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remarkably, the mathematics needed for the extension already existed in the repository. The AAT canon had contained the toolkit for treating laws as equations — violation coordinates, witness ideals, the lawful locus — all along; the formalization simply had not used it yet. The decision was not the invention of new mathematics; it was &lt;strong&gt;letting the formalization catch up with the editorial intent of the text&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once the vocabulary changed, things moved fast. Generate the obstruction coefficients as the quotient by the ideal; generate each local reading as the quotient class of its defect. Then the proposition that had been sealed for 347 cycles — &lt;em&gt;if the required laws hold locally, the restrictions of the readings agree on common refinements&lt;/em&gt; — &lt;strong&gt;fell as a theorem&lt;/strong&gt;. Five cycles later, everything was in place: the comparison, the equivalence of zero-tests, and a concrete instance where a nonzero class demonstrably lives on both sides.&lt;/p&gt;

&lt;h3&gt;
  
  
  A review that produced theorems
&lt;/h3&gt;

&lt;p&gt;The final act was the review. Just before completion, one of the four adversarial review lanes vetoed: "the &lt;code&gt;H^1&lt;/code&gt;-zero part of this composed theorem is constructively trivial, and the law semantics only acts at cohomological degree 0 — the statement invites over-reading." The objection was correct.&lt;/p&gt;

&lt;p&gt;The response was not to weaken the claim but to prove &lt;strong&gt;new theorems&lt;/strong&gt;: a positive boundary theorem ("the law semantics contributes exactly degree-0 vanishing") and a negative one ("the higher conclusions hold independently of the laws"). The theory deepened its knowledge of itself through the review. The re-review lifted the veto, and the theorem was accepted.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Why this matters for computer science
&lt;/h2&gt;

&lt;p&gt;This looks like a mathematics story, but SAGA has several CS implications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(1) A class of analysis beyond linting.&lt;/strong&gt; Detecting local violations (lint, static analysis, contract checking) and detecting global gluing failures are mathematically different classes of problems. Let us return to the three examples from the opening.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Every team's code passes review, yet integration breaks."&lt;/strong&gt; Each team's area of ownership corresponds to a local view of the cover. Among the mismatches along team boundaries (the cocycle), the ones that &lt;strong&gt;no team can eliminate by fixing its own code&lt;/strong&gt; — those read as a nonzero &lt;code&gt;H^1&lt;/code&gt; class. There was a structural reason the cause could never be found inside any single team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Every microservice honors its contract, yet the system invariant is violated."&lt;/strong&gt; Contracts correspond to local laws; the system-wide invariant corresponds to a global section. All services can be locally lawful while the global section gluing them together simply &lt;strong&gt;does not exist&lt;/strong&gt;. That existence is exactly what &lt;code&gt;H^1&lt;/code&gt; decides.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Every refactoring step was safe, yet the design intent is gone."&lt;/strong&gt; Each step corresponds to a local re-adjustment (a coboundary). But stack a full loop of re-adjustments, and a residue can survive that never cancels. In fact, the concrete nonzero-class instance used in the SAGA proof was literally a construction where &lt;strong&gt;going once around a circle leaves you off by 1&lt;/strong&gt;. Every step safe, yet you return changed — that déjà vu now has a mathematical identity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After SAGA, AAT owns, for this class of failures, an obstruction with a &lt;em&gt;proved-sound detector&lt;/em&gt;: a nonzero &lt;code&gt;H^1&lt;/code&gt; class certifies which law fails over which observed facts, with traceability back to the displayed law support. It is a principled path toward detecting the failure mode where "no file contains a bug, and yet the system is broken."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(2) It matters most in the era of AI writing code at full speed.&lt;/strong&gt; From day one, AAT's research goals carried a "rival" field: static analysis, dependency graphs, ADLs (architecture description languages), and AI code review with near-unlimited context — every cycle had to answer what AAT can produce that they cannot. The answer is this &lt;code&gt;H^1&lt;/code&gt;. In an era where AI agents mass-produce pull requests, CI can run local checks — tests, lint, contract verification — at high speed. But an &lt;code&gt;H^1&lt;/code&gt;-class failure &lt;strong&gt;appears in no diff and in no file&lt;/strong&gt;. Every PR is green, every module is lawful, and yet the global section does not exist — this failure mode slips through diff-level and file-level checking &lt;em&gt;in principle&lt;/em&gt;. ADLs can describe structure and conformance with great sophistication, but they have no machinery for proving semantic gluing failures as cohomology classes. Even an AI reviewer that reads the entire codebase can articulate unease, but it cannot &lt;strong&gt;pin the existence of the obstruction down as a theorem, backed by detector soundness and counterexamples&lt;/strong&gt;. The faster code gets written, the faster gluing failures accumulate, silently. What can give this class of failure a theorem-level detector is a theory that treats the gluing itself as mathematics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(3) A methodology for vocabulary evolution in formalization.&lt;/strong&gt; Every large formalization eventually hits the "our original definitions were wrong" problem. The SAGA proof demonstrates one pattern: first pin down the limits of the old vocabulary as a family of impossibility theorems, so that the extension becomes a &lt;em&gt;forced, minimal move&lt;/em&gt; — and afterwards, the old no-go theorems keep serving as audit machinery. Definition change becomes accretion, not restart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(4) A working example of human–AI division of labor.&lt;/strong&gt; 347 cycles of automated exploration and blockade by AI agents; one vocabulary decision made by me, the human in the loop; adversarial multi-agent review with a veto and a re-review. Remove any one of the three and this theorem does not exist in this form. As a template for doing mathematics with AI, the record is arguably as valuable as the theorem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(5) Everything is machine-checked.&lt;/strong&gt; Every theorem in this story — the comparison, the impossibility boundaries, the nonzero-class instance — compiles in Lean 4 and depends only on Lean's standard axioms (&lt;code&gt;propext&lt;/code&gt;, &lt;code&gt;Classical.choice&lt;/code&gt;, &lt;code&gt;Quot.sound&lt;/code&gt;). There are no &lt;code&gt;sorry&lt;/code&gt;s.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Honest boundaries — not everything, but enough to stand on
&lt;/h2&gt;

&lt;p&gt;Finally, in keeping with AAT's own discipline, here is what the SAGA theorem does &lt;strong&gt;not&lt;/strong&gt; claim. The bullet points are unavoidably technical, so each comes with a plain-language gloss.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The theorem is relativized to finite or small sites, selected covers, and vocabularies equipped with an equational realization of their laws. No unconditional generalization to arbitrary Grothendieck sites is claimed.

&lt;ul&gt;
&lt;li&gt;In plain terms: the theorem holds for &lt;strong&gt;finitely many parts, an explicitly chosen decomposition, and laws you can write as equations&lt;/strong&gt;. It does not claim to cover every infinitely complex situation mathematics can imagine.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;No unconditional identification of cover-relative Čech &lt;code&gt;H^1&lt;/code&gt; with full sheaf cohomology is claimed — in fact, "this cannot be said unconditionally" is itself a boundary theorem with a counterexample.

&lt;ul&gt;
&lt;li&gt;In plain terms: cohomology comes in a &lt;strong&gt;computable version relative to your chosen decomposition&lt;/strong&gt; and a decomposition-independent theoretical version; SAGA works with the former. That the two cannot be unconditionally identified is itself pinned down as a theorem, with a counterexample.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The completeness of extracting Atoms from a codebase, and "quality judgments about real code as a whole," are outside the theory. AAT does mathematics relative to observed Atoms and selected laws.

&lt;ul&gt;
&lt;li&gt;In plain terms: &lt;strong&gt;whether you extracted every fact from the code&lt;/strong&gt; is the observation tool's job; mathematics does not guarantee it. What AAT guarantees is the correctness of everything &lt;strong&gt;downstream&lt;/strong&gt; of the facts you gathered and the laws you imposed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Is this boundary a weakness of the theory? I do not think so. Analyzing software architecture is an inherently finite activity: finitely many modules, finitely many observable facts, finitely many rules imposed in review. &lt;strong&gt;The "finite, explicitly-voiced" world in which the SAGA theorem holds is exactly the world architecture analysis actually lives in.&lt;/strong&gt; It is not a theory of everything. But as a foothold for analyzing software architecture, it is more than wide enough.&lt;/p&gt;

&lt;p&gt;Not saying what cannot be said. Making the boundary explicit is itself part of the theory.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Closing
&lt;/h2&gt;

&lt;p&gt;Anyone can say "let's apply algebraic geometry to software architecture" as a metaphor. What the SAGA theorem did was stop it being a metaphor. From the Atom axioms, through laws as equations, obstruction coefficients as quotients, sites, sheaves, and up to &lt;code&gt;H^1&lt;/code&gt; — everything is connected by a single chain of machine-checked theorems.&lt;/p&gt;

&lt;p&gt;That old phenomenon — locally correct, globally broken — now has mathematics that grows out of axioms.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repository: &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2&lt;/a&gt; (MIT license)&lt;/li&gt;
&lt;li&gt;Proof record of the SAGA theorem: &lt;code&gt;docs/note/aat_saga_theorem_proof_record.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The AAT mathematical canon: &lt;code&gt;docs/aat/algebraic_geometric_theory/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Research goal ledger: &lt;code&gt;research/GOALS.md&lt;/code&gt;; proof-state ledger: &lt;code&gt;research/reports/G-aat-quality-surface-06.md&lt;/code&gt; (inside the repository, the SAGA theorem is tracked under the research-goal ID &lt;code&gt;G-aat-quality-surface-06&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Lean artifacts: &lt;code&gt;Formal/AG/Research/QualitySurface/&lt;/code&gt; (for SAGA, see &lt;code&gt;SemanticRepairCechGrounding.lean&lt;/code&gt; and &lt;code&gt;SemanticRepairLawEquation*.lean&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>math</category>
      <category>lean</category>
      <category>geometory</category>
    </item>
    <item>
      <title>Atom Is All You Need: Read a Codebase as an Atom Map, Not a Dependency Graph</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sun, 31 May 2026 16:55:51 +0000</pubDate>
      <link>https://dev.to/iroha1203/atom-is-all-you-need-read-a-codebase-as-an-atom-map-not-a-dependency-graph-e5d</link>
      <guid>https://dev.to/iroha1203/atom-is-all-you-need-read-a-codebase-as-an-atom-map-not-a-dependency-graph-e5d</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the AI era, architecture analysis cannot stop at reading code as files, functions, imports, and dependency graphs.&lt;/p&gt;

&lt;p&gt;We need to observe the smallest units that carry architectural meaning. I call those units &lt;code&gt;Atom&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;By extracting Atoms from a codebase and reading the algebraic structure they generate, we can analyze architecture beyond ordinary dependency relationships.&lt;/p&gt;

&lt;p&gt;The workflow looks like this:&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codebase
  -&amp;gt; Atom observations
  -&amp;gt; ArchMap
  + LawPolicy
  -&amp;gt; ArchSig analysis packet
  -&amp;gt; architecture reading
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This lets us see design pressure, semantic coupling, missing evidence, and review focus that ordinary linting, static analysis, and dependency graphs often miss.&lt;/p&gt;

&lt;p&gt;We built a new tool for this workflow: &lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2/tree/main/tools/archsig" rel="noopener noreferrer"&gt;ArchSig&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The repository is public and MIT licensed, so you can try it on your own codebases.&lt;/p&gt;

&lt;p&gt;The key idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Architecture analysis does not need a bigger natural-language summary.&lt;/p&gt;

&lt;p&gt;It needs the right unit of observation.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why We Need an Architecture Analyzer
&lt;/h2&gt;

&lt;p&gt;AI agents can write code fast.&lt;/p&gt;

&lt;p&gt;But writing code fast is not the same thing as evolving a system well.&lt;/p&gt;

&lt;p&gt;For an AI agent, the codebase is the largest prompt.&lt;/p&gt;

&lt;p&gt;If the existing codebase contains shortcuts, those shortcuts become examples.&lt;br&gt;
If boundaries are vague, new code naturally lands in vague places.&lt;br&gt;
If responsibilities are mixed, that mixing becomes part of the next implementation context.&lt;/p&gt;

&lt;p&gt;Traditional tools often look at the current shape of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;import graphs&lt;/li&gt;
&lt;li&gt;dependency cycles&lt;/li&gt;
&lt;li&gt;layer violations&lt;/li&gt;
&lt;li&gt;lint rules&lt;/li&gt;
&lt;li&gt;complexity metrics&lt;/li&gt;
&lt;li&gt;test coverage&lt;/li&gt;
&lt;li&gt;security rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these matter.&lt;/p&gt;

&lt;p&gt;But in AI-era architecture review, we often want to ask deeper questions.&lt;/p&gt;

&lt;p&gt;Imagine a business backend where users select input data, run automated processing or generation, persist the result, receive events from external systems, run async jobs, call external providers, and save generated artifacts back into business state.&lt;/p&gt;

&lt;p&gt;The important questions are not only:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Are the dependencies pointing in the right direction?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We also want to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who is allowed to use which input for which operation?&lt;/li&gt;
&lt;li&gt;Through which validation path does generated output become persisted state?&lt;/li&gt;
&lt;li&gt;Where is an external provider failure recorded as durable state?&lt;/li&gt;
&lt;li&gt;Do two workflows that produce the same artifact actually have the same effect order?&lt;/li&gt;
&lt;li&gt;Do entrypoint-level permissions match the intended business scope?&lt;/li&gt;
&lt;li&gt;Are privileged operations separated from ordinary workflow authority?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are difficult to read from a dependency graph alone.&lt;/p&gt;

&lt;p&gt;We need to read code not only as a collection of files and functions, but as a set of observations that carry architectural meaning.&lt;/p&gt;

&lt;p&gt;That unit is the &lt;code&gt;Atom&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Atom: The Smallest Unit of Architectural Meaning
&lt;/h2&gt;

&lt;p&gt;An Atom is the smallest observation unit I want to use when reading architecture.&lt;/p&gt;

&lt;p&gt;It is not necessarily a function, class, module, or file.&lt;/p&gt;

&lt;p&gt;In practice, it is the thing you point at during review and say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a boundary.&lt;/p&gt;

&lt;p&gt;This is state.&lt;/p&gt;

&lt;p&gt;This is an effect.&lt;/p&gt;

&lt;p&gt;This is a contract.&lt;/p&gt;

&lt;p&gt;This is where trust changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Examples of Atom families include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;component atom&lt;/code&gt;: an architectural unit exists&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;relation atom&lt;/code&gt;: two units or atoms are related&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;capability atom&lt;/code&gt;: a unit provides a specific capability&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;state atom&lt;/code&gt;: something is persisted or held as state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;effect atom&lt;/code&gt;: an external call or side effect occurs&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;authority atom&lt;/code&gt;: someone is allowed to do something&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;trust relation atom&lt;/code&gt;: some output or provider is trusted up to a boundary&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;contract atom&lt;/code&gt;: inputs, outputs, preconditions, or failure behavior are promised&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;semantic atom&lt;/code&gt;: something has architectural meaning beyond its code location&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important point is that an Atom is not small in the syntactic sense.&lt;/p&gt;

&lt;p&gt;It is small in the architectural sense.&lt;/p&gt;

&lt;p&gt;For example, the observation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Only an authorized actor may update this resource.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;may cross multiple files.&lt;/p&gt;

&lt;p&gt;The observation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Generated output must pass through a service-level contract before persistence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;may cross a route, service, validation layer, job state, and repository.&lt;/p&gt;

&lt;p&gt;Still, each observation is one meaningful unit in architecture review.&lt;/p&gt;

&lt;p&gt;That is what an Atom records.&lt;/p&gt;
&lt;h2&gt;
  
  
  A Small Code Example
&lt;/h2&gt;

&lt;p&gt;Even a tiny function can contain multiple Atoms.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;publish_artifact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;actor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;artifact_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;artifact&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load_for_actor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;actor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;artifact_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;artifact&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;artifact&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mark_published&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;artifact&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we only say "this is one function," we miss most of the architectural content.&lt;/p&gt;

&lt;p&gt;Read as Atoms, we can observe at least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;component&lt;/code&gt;: &lt;code&gt;repository&lt;/code&gt; and &lt;code&gt;gateway&lt;/code&gt; are architectural units&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;relation&lt;/code&gt;: the handler flows into both the repository and the gateway&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;capability&lt;/code&gt;: the repository provides load/save, while the gateway provides publish&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;state&lt;/code&gt;: the artifact's published state is persisted&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;effect&lt;/code&gt;: &lt;code&gt;gateway.publish&lt;/code&gt; changes external state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;authority&lt;/code&gt;: the actor must be allowed to publish this artifact&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;trust_relation&lt;/code&gt;: the gateway response and failure behavior must be trusted only through a boundary&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;contract&lt;/code&gt;: publish success, save failure, and retry behavior need explicit promises&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;semantic&lt;/code&gt;: published is not only a flag; it means externally visible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These nine Atom schemas are the basic vocabulary for treating primitive architectural facts as generators of an architecture object.&lt;/p&gt;

&lt;h2&gt;
  
  
  ArchMap: Turning a Codebase into an Atom Map
&lt;/h2&gt;

&lt;p&gt;An &lt;code&gt;ArchMap&lt;/code&gt; is a map of these observations.&lt;/p&gt;

&lt;p&gt;It is not a full copy of the codebase.&lt;br&gt;
It is not an AST dump.&lt;br&gt;
It is not only a dependency graph.&lt;/p&gt;

&lt;p&gt;It is a source-grounded map of architectural observations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source code
  observed as
Atom / Molecule / Semantic observations
  recorded as
ArchMap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If an Atom is one observation, a Molecule is a finite composition of Atoms that acts as one responsibility boundary.&lt;/p&gt;

&lt;p&gt;For example, an ArchMap of a backend might contain Molecules such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authenticated request boundary&lt;/li&gt;
&lt;li&gt;credential lifecycle&lt;/li&gt;
&lt;li&gt;repository transaction boundary&lt;/li&gt;
&lt;li&gt;interactive processing workflow&lt;/li&gt;
&lt;li&gt;input-to-artifact pipeline&lt;/li&gt;
&lt;li&gt;external integration ingress&lt;/li&gt;
&lt;li&gt;job-managed generation surface&lt;/li&gt;
&lt;li&gt;input-backed artifact boundary&lt;/li&gt;
&lt;li&gt;edge policy and observability boundary&lt;/li&gt;
&lt;li&gt;privileged governance boundary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important point is not that the codebase has folders such as &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;repositories&lt;/code&gt;, and &lt;code&gt;models&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The important point is that architectural meaning sits on top of those folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authority&lt;/li&gt;
&lt;li&gt;generation&lt;/li&gt;
&lt;li&gt;external effect&lt;/li&gt;
&lt;li&gt;durable state&lt;/li&gt;
&lt;li&gt;artifact lifecycle&lt;/li&gt;
&lt;li&gt;semantic contract&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ArchMap records that meaning in a machine-readable form.&lt;/p&gt;

&lt;h2&gt;
  
  
  AAT: Reading Structure from an Atom Map
&lt;/h2&gt;

&lt;p&gt;Once we have an ArchMap, we can ask a different kind of question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Under which laws does this architecture object have pressure?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AAT, Algebraic Architecture Theory, reads software architecture as an algebraic structure generated from Atoms.&lt;/p&gt;

&lt;p&gt;It studies architecture through objects, operations, laws, invariants, obstructions, and signature axes.&lt;/p&gt;

&lt;p&gt;I will leave the detailed theory to &lt;a href="https://iroha1203.dev/aat/" rel="noopener noreferrer"&gt;Algebraic Architecture Theory&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For this article, the intuition is enough:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;law&lt;/code&gt;: a design property we want to preserve&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;witness&lt;/code&gt;: observed evidence related to that property&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;obstruction&lt;/code&gt;: a structure that blocks the law&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;signature axis&lt;/code&gt;: the direction in which pressure appears&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;operation&lt;/code&gt;: a design operation such as split, move, protect, or refactor&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;path / homotopy&lt;/code&gt;: whether two change paths preserve the same structure&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curvature / holonomy&lt;/code&gt;: when something looks locally natural but becomes inconsistent around a loop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In ordinary review, engineers often process these ideas in their heads:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This responsibility is mixed.&lt;/p&gt;

&lt;p&gt;This external call should not be inside the transaction.&lt;/p&gt;

&lt;p&gt;These two job statuses look the same, but the failure paths differ.&lt;/p&gt;

&lt;p&gt;This generated output must be validated before it becomes domain state.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AAT tries to move this review vocabulary toward something we can compute.&lt;/p&gt;

&lt;p&gt;The important step is to treat Atoms not as labels, but as primitive facts that generate architecture objects.&lt;/p&gt;

&lt;p&gt;Once Atoms carry relation, state, effect, contract, and semantic axes, we can see things a dependency graph cannot show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a locally natural change that changes effect order through another path&lt;/li&gt;
&lt;li&gt;a split that moves complexity to another boundary&lt;/li&gt;
&lt;li&gt;two workflows that look statically similar but differ under a semantic contract&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are non-trivial architecture readings.&lt;/p&gt;

&lt;p&gt;They should not live only in a senior engineer's intuition.&lt;/p&gt;

&lt;p&gt;They should be tied to a selected law universe and a selected set of witnesses.&lt;/p&gt;

&lt;p&gt;That is the role of AAT.&lt;/p&gt;

&lt;h2&gt;
  
  
  ArchSig: Reading Structure from ArchMap + LawPolicy
&lt;/h2&gt;

&lt;p&gt;ArchSig takes an ArchMap and a LawPolicy, then produces an AAT-style analysis packet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ArchMap
  + LawPolicy
  -&amp;gt; ArchSig
  -&amp;gt; analysis packet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;LawPolicy&lt;/code&gt; is the interpretation profile.&lt;/p&gt;

&lt;p&gt;It selects the law universe, witness rules, signature axes, measurement policy, and coverage requirements for the analysis.&lt;/p&gt;

&lt;p&gt;The same ArchMap can be read in different ways depending on what you care about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authority boundaries&lt;/li&gt;
&lt;li&gt;state/effect consistency&lt;/li&gt;
&lt;li&gt;generated output mediation&lt;/li&gt;
&lt;li&gt;domain cohesion&lt;/li&gt;
&lt;li&gt;permission coverage&lt;/li&gt;
&lt;li&gt;repair preconditions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ArchSig does not collapse all of this into one "good / bad" score.&lt;/p&gt;

&lt;p&gt;It reports pressure and semantic coupling along different axes.&lt;/p&gt;

&lt;p&gt;The output can include readings such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nonzero pressure by law axis&lt;/li&gt;
&lt;li&gt;workflow risk&lt;/li&gt;
&lt;li&gt;transfer bridge pressure&lt;/li&gt;
&lt;li&gt;state/effect reconciliation pressure&lt;/li&gt;
&lt;li&gt;operation squares&lt;/li&gt;
&lt;li&gt;axis-wise monodromy defects&lt;/li&gt;
&lt;li&gt;architectural holes&lt;/li&gt;
&lt;li&gt;boundary holonomy&lt;/li&gt;
&lt;li&gt;repair precondition blockers&lt;/li&gt;
&lt;li&gt;review focus&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a code quality score.&lt;/p&gt;

&lt;p&gt;It is a measurement surface for reading where design pressure and semantic coupling appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case Study: Analyzing a Backend Repository
&lt;/h2&gt;

&lt;p&gt;So far, the discussion has been conceptual.&lt;/p&gt;

&lt;p&gt;Now let us look at the shape of one backend repository through ArchSig.&lt;/p&gt;

&lt;p&gt;This repository has multiple users, authority boundaries, business data, external effects, async jobs, and generated outputs.&lt;/p&gt;

&lt;p&gt;Users select input data and run analysis, generation, extraction, or transformation workflows.&lt;br&gt;
External systems send events.&lt;br&gt;
Async jobs call providers.&lt;br&gt;
Results are persisted as business artifacts.&lt;/p&gt;

&lt;p&gt;From the ArchMap, ArchSig could read structures like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a backend split into API, service, repository, model, schema, and task layers&lt;/li&gt;
&lt;li&gt;authority boundaries across users, organizations, and resources&lt;/li&gt;
&lt;li&gt;a domain model where multiple artifacts derive from input data&lt;/li&gt;
&lt;li&gt;generated output mediated by service contracts and job state&lt;/li&gt;
&lt;li&gt;external provider effects paired with durable job state&lt;/li&gt;
&lt;li&gt;privileged operations separated from ordinary workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is already different from a dependency graph.&lt;/p&gt;

&lt;p&gt;ArchSig reads the repository as a business backend with authority boundaries, generated outputs, external effects, and durable state.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Design Pressure It Found
&lt;/h2&gt;

&lt;p&gt;The strongest pressure appeared at the intersection of authority and generation.&lt;/p&gt;

&lt;p&gt;The system is not merely saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An authenticated actor can run generation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The real architectural question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Who can use which resource as input, and which generated output can become which domain state?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a central boundary.&lt;/p&gt;

&lt;p&gt;Reviewing only authorization is not enough.&lt;br&gt;
Reviewing only the generation job is not enough.&lt;br&gt;
The two boundaries are bridged.&lt;/p&gt;

&lt;p&gt;The next large pressure was state/effect reconciliation.&lt;/p&gt;

&lt;p&gt;The repository has external providers, async jobs, event handlers, retries, roundtrips, and compensation paths.&lt;/p&gt;

&lt;p&gt;In this kind of system, not everything can live inside one transaction.&lt;/p&gt;

&lt;p&gt;The architecture needs durable intermediate state, external effect recovery, explicit failure finalization, and retryable paths.&lt;/p&gt;

&lt;p&gt;ArchSig reads this through the relation between state atoms and effect atoms.&lt;/p&gt;

&lt;p&gt;The third pressure was generated output mediation.&lt;/p&gt;

&lt;p&gt;Generated output is useful, but it should not become domain state without mediation.&lt;/p&gt;

&lt;p&gt;You need input construction, structured output, filtering, validation, job failure handling, and persistence gates.&lt;/p&gt;

&lt;p&gt;In this repository, the mediation appeared across multiple workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;interactive workflows&lt;/li&gt;
&lt;li&gt;analysis execution&lt;/li&gt;
&lt;li&gt;content extraction&lt;/li&gt;
&lt;li&gt;generated artifact creation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the design question is not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does the system use generation?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The real question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Through which contract does generated output pass before it becomes domain state?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is not just dependency analysis.&lt;/p&gt;

&lt;p&gt;It is a reading of where authority, state, effect, contract, and semantic meaning overlap.&lt;/p&gt;
&lt;h2&gt;
  
  
  Same Destination, Different Path
&lt;/h2&gt;

&lt;p&gt;One of the most interesting ArchSig readings is the monodromy defect.&lt;/p&gt;

&lt;p&gt;The intuition is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Two paths may appear to arrive at the same place.&lt;/p&gt;

&lt;p&gt;But do they preserve the same structure?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the repository, several workflows looked similar from the outside.&lt;/p&gt;

&lt;p&gt;They produced artifacts or updated state.&lt;/p&gt;

&lt;p&gt;But the order of provider calls, repository commits, job state transitions, and status finalization could differ.&lt;/p&gt;

&lt;p&gt;A dependency graph may not show that.&lt;/p&gt;

&lt;p&gt;Even if the static dependencies point in the same direction, the workflow path can change failure behavior.&lt;/p&gt;

&lt;p&gt;Does the system create state before calling the provider?&lt;br&gt;
Does it call the provider first?&lt;br&gt;
Where is failure finalized?&lt;br&gt;
Does retry use the same idempotency key?&lt;/p&gt;

&lt;p&gt;ArchSig reads this kind of path difference as operation squares and axis-wise defects.&lt;/p&gt;

&lt;p&gt;This is practical in review.&lt;/p&gt;

&lt;p&gt;When someone says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This follows the existing pattern.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ArchSig helps ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does it really?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It may look like the same endpoint.&lt;br&gt;
It may create the same kind of artifact.&lt;/p&gt;

&lt;p&gt;But if the effect order differs, the operational behavior differs.&lt;/p&gt;

&lt;p&gt;That difference often becomes incident cost or future refactoring cost.&lt;/p&gt;
&lt;h2&gt;
  
  
  Architectural Holes: Loops That Do Not Close
&lt;/h2&gt;

&lt;p&gt;Another important result was the architectural hole.&lt;/p&gt;

&lt;p&gt;ArchSig found holes around paths such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API -&amp;gt; service -&amp;gt; repository&lt;/li&gt;
&lt;li&gt;async provider jobs&lt;/li&gt;
&lt;li&gt;generated output -&amp;gt; domain state promotion&lt;/li&gt;
&lt;li&gt;semantic contracts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This does not mean "there is a bug."&lt;/p&gt;

&lt;p&gt;It means the evidence is not enough to say the architectural loop is closed.&lt;/p&gt;

&lt;p&gt;For example, the path from generated output to domain state may involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;input data&lt;/li&gt;
&lt;li&gt;context construction&lt;/li&gt;
&lt;li&gt;structured output&lt;/li&gt;
&lt;li&gt;validation&lt;/li&gt;
&lt;li&gt;job state&lt;/li&gt;
&lt;li&gt;repository persistence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To say this loop is closed, source reading alone is not enough.&lt;/p&gt;

&lt;p&gt;You may need test evidence, runtime traces, provider logs, and entrypoint-by-entrypoint permission audits.&lt;/p&gt;

&lt;p&gt;ArchSig does not treat missing evidence as zero.&lt;/p&gt;

&lt;p&gt;It preserves it as a hole.&lt;/p&gt;

&lt;p&gt;That matters because one of the dangerous failure modes in architecture review is to read "unknown" as "fine."&lt;/p&gt;

&lt;p&gt;ArchSig keeps the gap visible.&lt;/p&gt;

&lt;p&gt;And the gap becomes a review proposal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gap:
  - permission evidence is incomplete
  - runtime trace is missing
  - provider failure path is not covered

review proposal:
  - human reviewer: check authority boundary and failure handling
  - LLM reviewer: compare the generated output path with the declared contract
  - test reviewer: add evidence for retry and finalization behavior
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In other words, ArchSig does not hide uncertainty.&lt;/p&gt;

&lt;p&gt;It turns uncertainty into review focus.&lt;/p&gt;

&lt;h2&gt;
  
  
  Spectral Analysis: Where Pressure Comes Back
&lt;/h2&gt;

&lt;p&gt;One of the most interesting parts of ArchSig is &lt;code&gt;ArchitectureSpectrumReport&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Ordinary review often ends with a list of issues.&lt;/p&gt;

&lt;p&gt;But in architecture, pressure does not always appear once and disappear.&lt;/p&gt;

&lt;p&gt;An authority mismatch can show up in generated output persistence.&lt;br&gt;
From there it can move into job state.&lt;br&gt;
Then it can come back through retry behavior or provider failure handling.&lt;/p&gt;

&lt;p&gt;Spectral analysis reads this recurrence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curvature support
  -&amp;gt; transfer edge
  -&amp;gt; recurrent mode
  -&amp;gt; hotspot / witness cluster
  -&amp;gt; review focus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, the point is not a single score.&lt;/p&gt;

&lt;p&gt;The interesting questions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where does pressure concentrate?&lt;/li&gt;
&lt;li&gt;Which obstructions recur?&lt;/li&gt;
&lt;li&gt;Which witness clusters cross multiple law axes?&lt;/li&gt;
&lt;li&gt;Which coverage gaps block a zero reading?&lt;/li&gt;
&lt;li&gt;Which boundary should be reviewed before a repair candidate is trusted?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From a dependency graph, a workflow may look cleanly separated.&lt;/p&gt;

&lt;p&gt;But spectral analysis may show remaining transfer between effect order, semantic contract, job state, and authority boundary.&lt;/p&gt;

&lt;p&gt;That is not simply "there is a cycle."&lt;/p&gt;

&lt;p&gt;It is a more structural reading:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Locally separate pressures return to the same support inside the architecture object.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ArchSig can surface that as a hotspot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repair Candidates Are Not Automatic Fixes
&lt;/h2&gt;

&lt;p&gt;ArchSig can also produce repair candidates.&lt;/p&gt;

&lt;p&gt;In this repository, many candidates were stopped by precondition blockers.&lt;/p&gt;

&lt;p&gt;That is important.&lt;/p&gt;

&lt;p&gt;Seeing pressure does not mean the system should immediately be split or rewritten.&lt;/p&gt;

&lt;p&gt;If you cut one boundary, complexity may move somewhere else.&lt;br&gt;
Fixing authority may increase runtime effect pressure.&lt;br&gt;
Strengthening generated output mediation may change job state and retry paths.&lt;/p&gt;

&lt;p&gt;ArchSig does not treat repair as an automatic safe edit.&lt;/p&gt;

&lt;p&gt;It checks preconditions, witnesses, coverage, and transfer risk.&lt;/p&gt;

&lt;p&gt;This is close to how experienced engineers review architecture:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This looks risky.&lt;/p&gt;

&lt;p&gt;But before fixing it, we need this evidence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That difference matters.&lt;/p&gt;
&lt;h2&gt;
  
  
  How This Differs from Existing Tools
&lt;/h2&gt;

&lt;p&gt;So what exactly is different?&lt;/p&gt;

&lt;p&gt;Existing tools are good at reading the current shape of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does a dependency cycle exist?&lt;/li&gt;
&lt;li&gt;Is there a layer violation?&lt;/li&gt;
&lt;li&gt;Is test coverage missing?&lt;/li&gt;
&lt;li&gt;Is a security rule violated?&lt;/li&gt;
&lt;li&gt;Is complexity too high?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ArchSig is trying to read something else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where are responsibility boundaries composed?&lt;/li&gt;
&lt;li&gt;On which law axis does pressure appear?&lt;/li&gt;
&lt;li&gt;Do two paths with the same destination preserve the same effect order?&lt;/li&gt;
&lt;li&gt;Where do generated output, external providers, authority, and durable state intersect?&lt;/li&gt;
&lt;li&gt;Would a repair candidate move complexity to another boundary?&lt;/li&gt;
&lt;li&gt;Which evidence is missing, and therefore should become review focus?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a code quality metric.&lt;/p&gt;

&lt;p&gt;It is an instrument for reading architectural state.&lt;/p&gt;

&lt;p&gt;Another important point is that review can happen around the ArchMap artifact.&lt;/p&gt;

&lt;p&gt;The source-grounded observation still has to be produced from real code.&lt;/p&gt;

&lt;p&gt;But after that, sharing, reviewing, and comparing can happen around ArchMap and the analysis packet.&lt;/p&gt;

&lt;p&gt;That matters for teams and companies that cannot freely share full codebases.&lt;/p&gt;

&lt;p&gt;There is also an AI angle.&lt;/p&gt;

&lt;p&gt;If you simply ask an LLM to review a large codebase, the full context will not fit.&lt;/p&gt;

&lt;p&gt;Even if it does fit, it is hard to make the model consistently focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the right boundary&lt;/li&gt;
&lt;li&gt;the missing evidence&lt;/li&gt;
&lt;li&gt;the relevant law axis&lt;/li&gt;
&lt;li&gt;the path where effect order differs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ArchMap and ArchSig change the shape of the context.&lt;/p&gt;

&lt;p&gt;Instead of handing the model all code and asking for a huge summary, you hand it Atoms, Molecules, law axes, holes, and review focus.&lt;/p&gt;

&lt;p&gt;Then the model can reason around the architecture boundary that actually matters.&lt;/p&gt;
&lt;h2&gt;
  
  
  Atom Is All You Need
&lt;/h2&gt;

&lt;p&gt;Trying to understand a large codebase all at once breaks down quickly.&lt;/p&gt;

&lt;p&gt;There are too many files.&lt;br&gt;
Too many functions.&lt;br&gt;
Too many dependencies.&lt;br&gt;
Too many external providers.&lt;br&gt;
Too much code added by fast AI agents.&lt;/p&gt;

&lt;p&gt;So start with Atoms.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;component
relation
capability
state
effect
authority
trust_relation
contract
semantic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Observe them.&lt;br&gt;
Record them as an ArchMap.&lt;br&gt;
Choose a LawPolicy.&lt;br&gt;
Run ArchSig.&lt;/p&gt;

&lt;p&gt;This lets us read meaningful architecture boundaries without pretending we can understand the entire codebase at once.&lt;/p&gt;

&lt;p&gt;What AI-era architecture analysis needs is not a larger natural-language summary.&lt;/p&gt;

&lt;p&gt;It needs the right unit of observation.&lt;/p&gt;

&lt;p&gt;Atom is all you need.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Review Experience This Enables
&lt;/h2&gt;

&lt;p&gt;Future review could look like this.&lt;/p&gt;

&lt;p&gt;First, generate an ArchMap delta from a codebase or pull request.&lt;/p&gt;

&lt;p&gt;Then run ArchSig using the team's selected LawPolicy.&lt;/p&gt;

&lt;p&gt;The reviewer no longer has to read the entire diff as a flat pile of changes.&lt;/p&gt;

&lt;p&gt;They can focus on the boundaries that require design judgment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This change touches:
  - authority boundary
  - generated output mediation
  - state/effect reconciliation
  - async provider job path

Measured pressure:
  - nonzero on permission coverage axis
  - positive path continuation defect on effect axis
  - architectural hole on output promotion path

Review focus:
  - entrypoint-level permission evidence
  - job finalization behavior
  - provider failure handling
  - persistence gate before domain promotion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AI agents can read the same packet.&lt;/p&gt;

&lt;p&gt;They can implement with more than a request like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Just add the feature.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They can receive architectural constraints:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Preserve this Atom.&lt;/p&gt;

&lt;p&gt;Do not cross this boundary.&lt;/p&gt;

&lt;p&gt;Do not increase pressure on this law axis.&lt;/p&gt;

&lt;p&gt;Do not treat these paths as equivalent; their effect order differs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That matters because AI agents are strongly shaped by context.&lt;/p&gt;

&lt;p&gt;If you give them only the codebase, you also give them every existing shortcut.&lt;/p&gt;

&lt;p&gt;If you give them the ArchMap and the ArchSig analysis packet, you also give them the architecture's structural pressure and semantic coupling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;ArchSig is not a tool for grading code.&lt;/p&gt;

&lt;p&gt;It is an architecture analyzer for reading a codebase as an Atom map, then using AAT to surface design pressure, semantic coupling, holes, and repair preconditions.&lt;/p&gt;

&lt;p&gt;It does not replace dependency graphs, lint, coverage, or security tools.&lt;/p&gt;

&lt;p&gt;Those are still important.&lt;/p&gt;

&lt;p&gt;But there are questions they do not answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where do authority and generated output intersect?&lt;/li&gt;
&lt;li&gt;Where does state/effect order diverge?&lt;/li&gt;
&lt;li&gt;Are two paths that create the same artifact really the same architecture operation?&lt;/li&gt;
&lt;li&gt;Would this repair candidate transfer complexity to another boundary?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are the questions ArchSig is built to make visible.&lt;/p&gt;

&lt;p&gt;Start from Atoms.&lt;br&gt;
Record them in ArchMap.&lt;br&gt;
Read them through AAT.&lt;br&gt;
Analyze them with ArchSig.&lt;/p&gt;

&lt;p&gt;That is the architecture analysis shape I wanted to introduce.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Comes Next: SFT and FieldSig
&lt;/h2&gt;

&lt;p&gt;We are also working on the next layer of this research.&lt;/p&gt;

&lt;p&gt;AAT makes software architecture locally algebraic.&lt;/p&gt;

&lt;p&gt;ArchSig becomes an observation instrument for that local algebra: it takes Atom observations and law-relative structure from a codebase and turns them into an analysis packet.&lt;/p&gt;

&lt;p&gt;Beyond that is SFT, Software Field Theory.&lt;/p&gt;

&lt;p&gt;SFT is about software evolution.&lt;/p&gt;

&lt;p&gt;It does not only ask about the current architecture state.&lt;/p&gt;

&lt;p&gt;It asks how review, AI agents, CI, operational feedback, and organizational decisions change the space of possible future software states.&lt;/p&gt;

&lt;p&gt;FieldSig is the next measurement surface.&lt;/p&gt;

&lt;p&gt;It reads ArchSig analysis packets and workflow evidence in order to make software evolution more computable.&lt;/p&gt;

&lt;p&gt;ArchSig is the entrance.&lt;/p&gt;

&lt;p&gt;That said, ArchSig is still at v0.3.1.&lt;/p&gt;

&lt;p&gt;I do not want it to be judged as a finished product yet.&lt;/p&gt;

&lt;p&gt;I want people to try it on many different repositories and tell us what it reads well, what it misses, and where the model feels wrong.&lt;/p&gt;

&lt;p&gt;Good reads and bad reads are both valuable for the research.&lt;/p&gt;

&lt;p&gt;You can get the ArchSig release bundles here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2/releases" rel="noopener noreferrer"&gt;AlgebraicArchitectureTheoryV2 Releases&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I Open-Sourced the AAT / SFT Research Repository</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Sun, 24 May 2026 05:13:39 +0000</pubDate>
      <link>https://dev.to/iroha1203/i-open-sourced-the-aat-sft-research-repository-360h</link>
      <guid>https://dev.to/iroha1203/i-open-sourced-the-aat-sft-research-repository-360h</guid>
      <description>&lt;p&gt;I open-sourced the AAT / SFT research repository.&lt;/p&gt;

&lt;p&gt;Repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;https://github.com/iroha1203/AlgebraicArchitectureTheoryV2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This repository is for building theory and tools that treat software architecture not only as a blueprint or a list of best practices, but as something that keeps evolving through changes, reviews, CI, operations, and proposals from AI agents.&lt;/p&gt;

&lt;p&gt;The larger goal is to make the evolution of software and computers something we can measure, compare, and reason about, instead of only looking back after the fact.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Research Is About
&lt;/h2&gt;

&lt;p&gt;The repository is organized around three ideas.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AAT makes architecture locally algebraic.
ArchSig makes architecture observable.
SFT makes software evolution computable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AAT&lt;/strong&gt; stands for Algebraic Architecture Theory.&lt;/p&gt;

&lt;p&gt;It treats software architecture as a local algebraic structure.&lt;/p&gt;

&lt;p&gt;In more practical terms, it asks questions like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did this design change preserve dependency direction?&lt;/li&gt;
&lt;li&gt;Did it cross a layer boundary?&lt;/li&gt;
&lt;li&gt;Does it still depend on abstractions instead of concrete details?&lt;/li&gt;
&lt;li&gt;Did it make failures easier to spread?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;ArchSig&lt;/strong&gt; is a set of tools for extracting architecture signals from real codebases and pull requests.&lt;/p&gt;

&lt;p&gt;It is not meant to produce one big "good / bad" score. Instead, it separates different kinds of risk: dependency cycles, boundary violations, abstraction leaks, unmeasured parts of the system, and other signals that should be read separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SFT&lt;/strong&gt; stands for Software Field Theory.&lt;/p&gt;

&lt;p&gt;It treats software evolution as a sequence of changes and tries to make that evolution computable.&lt;/p&gt;

&lt;p&gt;PRDs, issues, pull requests, reviews, CI, organizations, and AI agents do not only affect the current change. They also shape what kind of change is likely to happen next.&lt;/p&gt;

&lt;p&gt;For example, a vague PRD can invite an ad hoc implementation. A codebase with clear boundaries tends to make the next change easier to place cleanly. SFT develops concepts for reasoning about what futures become easier to reach after a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Am Building This
&lt;/h2&gt;

&lt;p&gt;AI can generate working code very quickly.&lt;/p&gt;

&lt;p&gt;But whether a fast diff makes future changes easier, or instead adds more ad hoc implementation, is a different question.&lt;/p&gt;

&lt;p&gt;The question is not only:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do the tests pass?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I also want to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did this change preserve the design properties we care about?&lt;/li&gt;
&lt;li&gt;If not, what code or dependency shows the problem?&lt;/li&gt;
&lt;li&gt;Is the problem a dependency cycle, a boundary violation, or an abstraction leak?&lt;/li&gt;
&lt;li&gt;Does this PRD, issue, or pull request make the next change easier to move in a good direction?&lt;/li&gt;
&lt;li&gt;Can review and CI stop risky change patterns early?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The motivation behind this repository is to turn those questions into something we can formalize, observe, and eventually support with tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is In The Repository
&lt;/h2&gt;

&lt;p&gt;The repository currently contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lean formalization for AAT&lt;/li&gt;
&lt;li&gt;Research notes for AAT and SFT&lt;/li&gt;
&lt;li&gt;Rust implementation of the ArchSig tools&lt;/li&gt;
&lt;li&gt;Open proof tasks and a Lean theorem index&lt;/li&gt;
&lt;li&gt;A static website for reading AAT, SFT, and ArchSig&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the Lean side, I am building small theorem packages with explicit assumptions.&lt;/p&gt;

&lt;p&gt;On the Rust tooling side, I am working toward reports that extract design signals from codebases and pull requests, then make them readable in review and CI.&lt;/p&gt;

&lt;p&gt;On the website side, I am preparing public-facing research notes and manuals for AAT, SFT, and ArchSig.&lt;/p&gt;

&lt;h2&gt;
  
  
  This Is Still Research
&lt;/h2&gt;

&lt;p&gt;This repository is a working research space, not a finished product.&lt;/p&gt;

&lt;p&gt;I separate different kinds of claims:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what has been proved mathematically,&lt;/li&gt;
&lt;li&gt;what has only been defined so far,&lt;/li&gt;
&lt;li&gt;what I want to prove later,&lt;/li&gt;
&lt;li&gt;and what should be checked against real development data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a theorem proved in Lean does not automatically predict the future of a real project.&lt;/p&gt;

&lt;p&gt;There is a difference between a tool saying "this dependency was observed," Lean proving "this property follows under these assumptions," and empirical work saying "this trend seems to appear in real development data."&lt;/p&gt;

&lt;p&gt;The repository keeps those claims separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where To Start
&lt;/h2&gt;

&lt;p&gt;The README is the best entry point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/iroha1203/AlgebraicArchitectureTheoryV2" rel="noopener noreferrer"&gt;https://github.com/iroha1203/AlgebraicArchitectureTheoryV2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to go deeper, I recommend this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Research goal&lt;/li&gt;
&lt;li&gt;AAT mathematical theory&lt;/li&gt;
&lt;li&gt;AAT / SFT interface&lt;/li&gt;
&lt;li&gt;Software Field Theory&lt;/li&gt;
&lt;li&gt;Lean definitions and theorem index&lt;/li&gt;
&lt;li&gt;ArchSig tooling documentation&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;There is also a website for reading AAT, SFT, and ArchSig as connected research notes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://iroha1203.dev" rel="noopener noreferrer"&gt;https://iroha1203.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want the big picture before reading code or proof details, the website is the easier place to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The short version is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I want to treat software architecture and software evolution as things we can observe, diagnose, and compute.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I do not want design principles to remain slogans.&lt;/p&gt;

&lt;p&gt;I want to ask what properties they preserve, what failures they reveal, and what futures they make easier to reach.&lt;/p&gt;

&lt;p&gt;This repository is where I am building the theory, formalization, tools, and public notes for that direction.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>architecture</category>
      <category>computerscience</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Forecast Cone: A Grand Theorem for Computable Software Evolution</title>
      <dc:creator>Hiroyuki Nakahata</dc:creator>
      <pubDate>Fri, 22 May 2026 17:50:41 +0000</pubDate>
      <link>https://dev.to/iroha1203/forecast-cone-a-grand-theorem-for-computable-software-evolution-521p</link>
      <guid>https://dev.to/iroha1203/forecast-cone-a-grand-theorem-for-computable-software-evolution-521p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article starts from the &lt;code&gt;ForecastCone&lt;/code&gt; in Software Field Theory (SFT), then reads modularity, technical debt, review, governance, and learning as parts of one research program.&lt;/p&gt;

&lt;p&gt;The goal is simple to state:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make it possible to see what futures a change opens, close dangerous futures early, and shape the development environment so good futures become easier to reach.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If this theorem-shaped program works, architecture, technical debt, review, governance, and AI coding safety can all be reread around the same object: the &lt;code&gt;ForecastCone&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We are also formalizing this direction in Lean by breaking concepts such as &lt;code&gt;ForecastCone&lt;/code&gt; and &lt;code&gt;ConsequenceEnvelope&lt;/code&gt; into small records and theorem packages.&lt;/p&gt;


&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  For the Bigger AAT / SFT Picture
&lt;/h2&gt;

&lt;p&gt;I introduced the broader AAT / SFT framing here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.iroha1203.dev/software-architecture-as-a-field" rel="noopener noreferrer"&gt;Software Architecture as a Field: Asking Better Questions About Software Evolution&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://iroha1203.dev/aat/" rel="noopener noreferrer"&gt;Algebraic Architecture Theory&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://iroha1203.dev/sft/" rel="noopener noreferrer"&gt;Software Field Theory&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Problem: Fast Code Is Not the Same as Healthy Evolution
&lt;/h2&gt;

&lt;p&gt;For an AI agent, the codebase itself is the largest prompt.&lt;/p&gt;

&lt;p&gt;If the existing code contains many shortcuts, the agent can easily learn those patterns.&lt;br&gt;
If boundaries are vague, the agent will naturally add the next change in the vague place.&lt;br&gt;
A good structure attracts good changes. A bad structure repeatedly makes bad shortcuts look natural.&lt;/p&gt;

&lt;p&gt;PRDs, issues, review policies, and CI rules do not only decide "this change."&lt;br&gt;
They shape what the next PR tends to look like, which modules feel natural to touch, which boundaries are easy to miss, and which shortcuts are likely to pass.&lt;/p&gt;

&lt;p&gt;In vibe coding, for example, an AI agent can quickly produce a plausible implementation from an underspecified PRD.&lt;/p&gt;

&lt;p&gt;A PRD that only says "make coupons usable" may turn into a small &lt;code&gt;if&lt;/code&gt; inside the checkout flow.&lt;br&gt;
The first demo works.&lt;br&gt;
But if that change leaves pricing policy, refunds, usage limits, and audit logs as vague boundaries, the next PR will often build on the same shortcut.&lt;/p&gt;

&lt;p&gt;The problem is not that AI writes bad code.&lt;br&gt;
The problem is that vague artifacts plus fast generation can open bad future paths very quickly.&lt;br&gt;
A bad field can be amplified by AI into larger technical debt.&lt;/p&gt;

&lt;p&gt;Traditional review, CI, and metrics often look at the current diff or at outcomes that already happened.&lt;br&gt;
In the AI era, that is not enough.&lt;/p&gt;

&lt;p&gt;The question is no longer only:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does this PR pass right now?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The deeper question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What future does this PRD, this agent, this codebase, and this review rule open next?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;SFT needs &lt;code&gt;ForecastCone&lt;/code&gt; in order to ask that question.&lt;br&gt;
It gives us an object for making software evolution computable, not as a mere sequence of changes, but as a space of reachable futures.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Grand Theorem: A Fundamental Theorem of Software Evolution
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Modularity
  = ForecastCone descent

Technical debt
  = descent obstruction

Review
  = minimal decision-preserving envelope

Governance
  = desired-cone-preserving obstruction cutting

Learning
  = closed-loop boundary-explicit fixed point
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In this article, I will call this theorem-shaped picture the &lt;strong&gt;Fundamental Theorem of Software Evolution&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In everyday engineering language, it says something like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A good architecture boundary lets teams and AI agents work separately, then combine their changes safely later.&lt;/p&gt;

&lt;p&gt;Technical debt is the ability to explain, with a concrete cause, why integration keeps breaking at the same place.&lt;/p&gt;

&lt;p&gt;In review, we do not want every diff line or every possible future. We want the dangerous futures that matter for the decision.&lt;/p&gt;

&lt;p&gt;Governance should not just add rules that stop development. It should close bad shortcuts and make good implementation paths easier to choose.&lt;/p&gt;

&lt;p&gt;Learning means using actual PRs, incidents, and review outcomes to update the next forecast and the next rule.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In more mathematical language:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A good architecture boundary is not merely a static dependency cut. It is a boundary across which future evolution paths can be computed locally and glued into a global future under compatibility conditions.&lt;/p&gt;

&lt;p&gt;Technical debt is an obstruction that appears when that gluing fails.&lt;/p&gt;

&lt;p&gt;Review is not the act of seeing the entire ForecastCone. It is the act of seeing an envelope that preserves the distinctions needed for a decision.&lt;/p&gt;

&lt;p&gt;Governance is a support transformation that removes bad futures while preserving desired futures.&lt;/p&gt;

&lt;p&gt;Learning is a closed-loop update that moves a field estimate toward a boundary-explicit fixed point using PRs, incidents, reviews, and operational outcomes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If such a theorem can be proved, the way we reason about software evolution changes.&lt;/p&gt;

&lt;p&gt;Whether an architecture is good, where technical debt sits, what a reviewer needs to see, which governance rule is effective, and how the field model should be updated next can be studied over the same computational object.&lt;/p&gt;

&lt;p&gt;That object is the &lt;code&gt;ForecastCone&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  ForecastCone: The Range of Reachable Futures
&lt;/h2&gt;

&lt;p&gt;SFT reads the development environment as a &lt;code&gt;field&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codebase
  + artifacts
  + practices
  + agents
  + governance
  + feedback
  -&amp;gt; reachable software futures
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The range of futures reachable under that field is what SFT calls a &lt;code&gt;ForecastCone&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwz6ro9mjtmuzpvlojxjz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwz6ro9mjtmuzpvlojxjz.png" alt="forecast cone" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A ForecastCone is not a prophecy.&lt;/p&gt;

&lt;p&gt;SFT does not say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This PRD will definitely produce this PR.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead, it asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Under this field model, operation support, policy, observation boundary, and horizon, which future paths are reachable?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine an e-commerce service receives a PRD: "Add limited-time coupons."&lt;/p&gt;

&lt;p&gt;That PRD does not open just one future.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One future adds a small branch to the checkout flow.&lt;/li&gt;
&lt;li&gt;One future adds a discount policy to the pricing service.&lt;/li&gt;
&lt;li&gt;One future introduces an independent coupon domain.&lt;/li&gt;
&lt;li&gt;One future expands into campaign rules and audit logs.&lt;/li&gt;
&lt;li&gt;One future adds a database column for now and leaves cleanup for later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these are, in some sense, "coupon support."&lt;br&gt;
But they open very different next futures.&lt;/p&gt;

&lt;p&gt;The ForecastCone is the object that lets us look at that difference.&lt;br&gt;
The same PRD can make different futures easy or hard to reach depending on the current codebase, module boundaries, past workarounds, review rules, CI, and AI agent behavior.&lt;/p&gt;
&lt;h2&gt;
  
  
  Modularity = ForecastCone Descent
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Modularity
  = ForecastCone descent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The intuition is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The global future of a software system can be computed by gluing compatible local futures.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Traditional modularity is often described in terms of APIs, dependency direction, and responsibility separation.&lt;br&gt;
SOLID, Layered Architecture, Clean Architecture, and Design Patterns have often been used as ways to help humans understand responsibilities, localize change, and control dependencies.&lt;/p&gt;

&lt;p&gt;SFT extends that line of thought by asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do the futures glue?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If a boundary is truly modular, we should be able to reason about the future of &lt;code&gt;Pricing&lt;/code&gt; and the future of &lt;code&gt;Checkout&lt;/code&gt; locally, then glue them into one checkout future under the right compatibility conditions.&lt;/p&gt;

&lt;p&gt;The boundary is not just a line. It is a place where future evolution should cross without breaking.&lt;/p&gt;

&lt;p&gt;In practice, following SOLID and Layered Architecture already gets us a lot of the way toward this kind of modularity.&lt;/p&gt;
&lt;h2&gt;
  
  
  Technical Debt = Descent Obstruction
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Technical debt
  = descent obstruction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The intuition is that technical debt can be read as a failure of futures to glue.&lt;/p&gt;

&lt;p&gt;local tests pass.&lt;br&gt;
local reviews pass.&lt;br&gt;
the AI proposal looks reasonable.&lt;br&gt;
then integration breaks.&lt;/p&gt;

&lt;p&gt;SFT does not want to stop at "the design is bad."&lt;br&gt;
It wants to record the failure as an obstruction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DescentFailure:
  missing interface invariant

Witness:
  Pricing returns a discounted total,
  but Checkout treats it as a tax-included final charge.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now technical debt is no longer just a feeling.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Each team-local change looks reasonable, but the whole system cannot combine them into a valid global future.&lt;br&gt;
The reason is that the boundary rule that should have been preserved was never defined.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the role of the &lt;code&gt;Descent Obstruction Theorem&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review = Minimal Decision-Preserving Envelope
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review
  = minimal decision-preserving envelope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A ForecastCone can be large.&lt;br&gt;
A reviewer cannot look at every future path.&lt;br&gt;
But a diff alone is often too small.&lt;/p&gt;

&lt;p&gt;Suppose an AI agent produces a PR like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if coupon_code.present?
  total = total - discount
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The diff is small.&lt;br&gt;
But the reviewer does not only care about these three lines.&lt;/p&gt;

&lt;p&gt;Will this add an unobserved branch to the refund path?&lt;br&gt;
Will usage limits collide with retry behavior?&lt;br&gt;
Is the tax boundary between &lt;code&gt;Pricing&lt;/code&gt; and &lt;code&gt;Checkout&lt;/code&gt; still undefined?&lt;/p&gt;

&lt;p&gt;What we need is not the whole ForecastCone, but the part needed for a review decision.&lt;br&gt;
SFT calls this a &lt;code&gt;ConsequenceEnvelope&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The goal for review tooling is not to show everything.&lt;br&gt;
It is to show the future-relevant differences needed for the decision, no more and no less.&lt;/p&gt;
&lt;h2&gt;
  
  
  Governance = Desired-Cone-Preserving Obstruction Cutting
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Governance
  = desired-cone-preserving obstruction cutting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When a risky future appears, the simplest response is to add another rule.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Anything coupon-related must be reviewed by a senior engineer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a guardrail.&lt;br&gt;
But it is often heavy, and it may not say what future it is actually closing.&lt;/p&gt;

&lt;p&gt;The kind of governance SFT wants is more specific: close bad futures while preserving desired ones.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Introduce separate &lt;code&gt;DiscountedTotal&lt;/code&gt; and &lt;code&gt;FinalCharge&lt;/code&gt; types across the &lt;code&gt;Pricing&lt;/code&gt; / &lt;code&gt;Checkout&lt;/code&gt; boundary.&lt;/li&gt;
&lt;li&gt;Make coupon usage updates idempotent.&lt;/li&gt;
&lt;li&gt;Require coupon invariant checks when touching the refund path.&lt;/li&gt;
&lt;li&gt;Guide AI agents away from ad hoc discount branches under checkout and toward policy objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We want to close the future where discount logic spreads across checkout.&lt;br&gt;
We still want to preserve the future where coupon policy can evolve independently.&lt;/p&gt;

&lt;p&gt;That difference is what the &lt;code&gt;Governance Synthesis Theorem&lt;/code&gt; is about.&lt;br&gt;
It is not just about adding guardrails. It is about shaping the field.&lt;/p&gt;
&lt;h2&gt;
  
  
  Learning = Closed-Loop Boundary-Explicit Fixed Point
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Learning
  = closed-loop boundary-explicit fixed point
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;SFT is not a theory where we compute one ForecastCone and stop.&lt;/p&gt;

&lt;p&gt;Predicted future paths are compared with actual PRs, incidents, review comments, CI failures, and runtime observations.&lt;br&gt;
When the forecast is wrong, that is not just a failure.&lt;br&gt;
It becomes evidence for updating the model.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was the field estimate too coarse?&lt;/li&gt;
&lt;li&gt;Was the observation boundary too narrow?&lt;/li&gt;
&lt;li&gt;Did the policy model fail to represent actual review behavior?&lt;/li&gt;
&lt;li&gt;Should the unknown remainder have been made explicit?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As this closed loop progresses, an SFT workbench becomes more than an analyzer.&lt;br&gt;
It becomes a system for continuously calibrating the field model of software evolution.&lt;/p&gt;
&lt;h2&gt;
  
  
  Attractor Engineering and ArchSig
&lt;/h2&gt;

&lt;p&gt;This grand theorem becomes practical only when it connects to AAT and ArchSig.&lt;/p&gt;

&lt;p&gt;AAT gives us a local theory for reading what a change preserves and what it breaks.&lt;br&gt;
ArchSig gives us a signature layer for observing preservation and breakage from repositories, PRs, reviews, CI, and incidents.&lt;br&gt;
SFT uses those observations to compute reachable futures and connect them to governance and learning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AAT
  -&amp;gt; local laws / invariants / obstruction witnesses

ArchSig
  -&amp;gt; observed signatures / measured axes / evidence boundaries

SFT
  -&amp;gt; ForecastCone / ConsequenceEnvelope / governance update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attractor Engineering fits here as well.&lt;/p&gt;

&lt;p&gt;A good architecture attracts good changes.&lt;br&gt;
A bad architecture repeatedly makes the same shortcut look natural.&lt;/p&gt;

&lt;p&gt;In SFT language, this means the shape of reachable futures changes.&lt;br&gt;
Governance interventions close bad future paths, type boundaries make good local evolution more natural, and review rules make risky paths observable.&lt;/p&gt;

&lt;p&gt;Attractor Engineering is the practice of shaping the ForecastCone.&lt;br&gt;
ArchSig is a tool for observing that change.&lt;br&gt;
SFT connects those observations back to the theorem family.&lt;/p&gt;
&lt;h2&gt;
  
  
  A Sketch of a Future Development Workflow
&lt;/h2&gt;

&lt;p&gt;SFT is not trying to build a system that decides the future instead of developers.&lt;br&gt;
It is trying to make a development environment where developers, AI agents, reviews, and CI can see the future opened by a change on the same map.&lt;/p&gt;

&lt;p&gt;An ambiguous PRD arrives.&lt;br&gt;
An AI agent quickly proposes an implementation.&lt;br&gt;
At the same time, a workbench sketches the futures that change seems to open and shows only the differences needed for review.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PRD
  -&amp;gt; implementation candidates
  -&amp;gt; reachable future range
  -&amp;gt; review-relevant differences
  -&amp;gt; review / CI / governance
  -&amp;gt; observed outcome
  -&amp;gt; next forecast update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before reading every line of the diff, the reviewer sees which futures look risky.&lt;br&gt;
CI checks not only whether tests pass, but whether a risk we wanted to close is still present.&lt;br&gt;
The AI agent prioritizes implementation candidates that open better futures instead of copying the nearest shortcut.&lt;/p&gt;

&lt;p&gt;Actual PRs, incidents, and review comments then become evidence for the next forecast.&lt;/p&gt;

&lt;p&gt;That is the development workflow SFT is aiming toward.&lt;/p&gt;
&lt;h2&gt;
  
  
  Impact on Computer Science and Software Engineering
&lt;/h2&gt;

&lt;p&gt;Lehman raised a core question of software evolution: long-lived software keeps changing as it adapts to its environment, and that change tends to increase complexity.&lt;/p&gt;

&lt;p&gt;SFT revisits that question in the age of AI-assisted development.&lt;/p&gt;

&lt;p&gt;Software engineering has long developed design and architecture theory around human cognition.&lt;/p&gt;

&lt;p&gt;That makes sense.&lt;br&gt;
Software is complex, and if humans cannot read it, they cannot maintain it.&lt;br&gt;
So we developed ideas such as separation of concerns, information hiding, cohesion, coupling, layering, Clean Architecture, and bounded contexts to make complexity manageable for people.&lt;/p&gt;

&lt;p&gt;That axis remains important.&lt;/p&gt;

&lt;p&gt;But once AI coding agents enter the loop, the bottleneck shifts.&lt;br&gt;
When code can be produced faster, the question is no longer only:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can humans understand the current structure?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The next question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What futures does this structure make reachable?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A good design is not only one that makes the current code easier to read.&lt;br&gt;
It is also one that makes good futures easier to reach and bad futures harder to reach.&lt;/p&gt;

&lt;p&gt;From this point of view, architecture expands from human comprehensibility to future reachability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can this boundary glue future paths locally?&lt;/li&gt;
&lt;li&gt;Which direction does this PR make the next change more likely to take?&lt;/li&gt;
&lt;li&gt;Does this metric preserve distinctions that matter for future evolution?&lt;/li&gt;
&lt;li&gt;Does this review rule close bad futures while preserving good ones?&lt;/li&gt;
&lt;li&gt;Which gluing failure does this technical debt represent?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions already exist in practice.&lt;br&gt;
They are just scattered across experience, intuition, review comments, incident memory, and organizational culture.&lt;/p&gt;

&lt;p&gt;SFT tries to move them toward computable theory.&lt;/p&gt;

&lt;p&gt;If this direction works, software engineering moves from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;techniques for making complexity understandable to humans&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;toward:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a science for observing, computing, and governing software evolution&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The central concepts begin to look different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;architecture
  -&amp;gt; shape of reachable futures

modularity
  -&amp;gt; descent of future paths

technical debt
  -&amp;gt; obstruction to future gluing

review
  -&amp;gt; minimal consequence envelope

metrics
  -&amp;gt; cone-conservative observations

governance
  -&amp;gt; support transformation

refactoring
  -&amp;gt; evolutionary invariance

AI coordination
  -&amp;gt; agentic confluence

lifecycle
  -&amp;gt; bifurcation of repair feasibility
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lean Formalization
&lt;/h2&gt;

&lt;p&gt;We are also formalizing this research program in Lean.&lt;/p&gt;

&lt;p&gt;The point is to keep SFT vocabulary from remaining only a metaphor.&lt;/p&gt;

&lt;p&gt;Terms such as &lt;code&gt;field&lt;/code&gt;, &lt;code&gt;ForecastCone&lt;/code&gt;, &lt;code&gt;ConsequenceEnvelope&lt;/code&gt;, and &lt;code&gt;governance update&lt;/code&gt; are being broken into small objects that can become records, types, and theorem packages.&lt;br&gt;
The big research picture gradually becomes something we can touch formally.&lt;/p&gt;

&lt;p&gt;Current formalization work includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SoftwareFieldEstimate
OperationSupport / StepRelation
ForecastCone / ClockedForecastCone
ConsequenceEnvelope
FieldUpdate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, &lt;code&gt;ForecastCone&lt;/code&gt; is treated as a supported path within a finite horizon.&lt;br&gt;
&lt;code&gt;ClockedForecastCone&lt;/code&gt; introduces a shared clock and idle / stutter steps for descent.&lt;br&gt;
&lt;code&gt;ConsequenceEnvelope&lt;/code&gt; treats review output as a projection from a cone family.&lt;/p&gt;

&lt;p&gt;The final grand theorem is also being assembled from components: descent, obstruction, review, governance, calibration, and agentic confluence.&lt;br&gt;
Under those explicit components, the Lean-side assembly has the shape:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;computably governed
  or
typed boundary failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This formalization makes SFT a research program where we can track what is a theorem, what belongs to modeling, and what remains on the tooling or empirical side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;ForecastCone is not a tool for predicting the future.&lt;/p&gt;

&lt;p&gt;It is a way to make reachable software futures computable under explicit modeling boundaries, operation support, policies, observation boundaries, and horizons.&lt;/p&gt;

&lt;p&gt;SFT's bet is that we can rebuild central software engineering concepts from there.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Architecture is not only the shape of present code.
It is the shape of reachable futures.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Architecture is not only the shape of the code we have now.&lt;/p&gt;

&lt;p&gt;It is also the shape of the futures that codebase makes reachable.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>computerscience</category>
      <category>architecture</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
