@trq212 Plan mode has this tiny advantage of asking a bunch of questions after a short discovery. Usually auto mode asks less clarifying questions and rushes to implement the task (often suboptimal) Plan mode allows to verify the understanding of a task by the human more than by the AI.
Falsifiable Architecture Through Mathematical Context Compression
Software architecture has an evidence problem.
Its primary artifacts—prose, arrows, and sequence diagrams—communicate intent. They do not establish that the intent is internally consistent.
A sequence diagram presents one execution. A concurrent system permits thousands. Documentation describes the expected path. Production discovers the rest.
This was survivable while implementation was slow. Human development acted as an accidental rate limiter: architectural mistakes entered the system gradually.
Agents remove that limit. They can turn an ambiguous description into a large, polished implementation before anyone has established whether the underlying protocol is correct.
Code is now cheap. Confidence is not.
Change the primary artifact
Architecture should have a compact semantic source: a mechanically checkable model of the system's behavior. For each dangerous protocol, define an architectural kernel containing:
- actors and resources;
- state and legal transitions;
- environmental and failure assumptions;
- safety properties;
- liveness properties.
This kernel does not replace every architectural artifact. It establishes their hierarchy.
The model is the semantic source. Diagrams are views. Prose is explanation. Code is a candidate refinement. Tests and runtime traces are evidence of correspondence.
Prose can explain why a protocol exists. A diagram can show a selected behavior. Neither should be responsible for defining every behavior the system permits.
Architecture stops being a collection of descriptions and becomes a set of claims that a machine can challenge.
Compress the architect's context
Architects carry systems across service descriptions, API contracts, diagrams, runbooks, security reviews, and implementation notes. Each document contains a partial view. The real architecture exists in the reconciliation between them—and often only in the architect's working memory.
A behavioral model provides semantic compression.
The gain is not fewer characters. Dense notation can be worse than clear prose. The gain is fewer independent ideas to keep synchronized.
A sequence diagram stores one execution. A state-transition model defines a class of executions. An invariant constrains every reachable execution at once.
The architect operates on this compressed kernel. Audience-specific artifacts can then be generated from it: diagrams, explanations, scenarios, test cases, and implementation instructions for agents.
The result is not less communication. It is less duplicated meaning.
Bring adversarial review to day zero
Architecture reviews inspect the scenarios people remembered to draw. A checkable model explores combinations they rarely remember to discuss.
Consider a job-processing protocol. A worker claims a job, performs an external action, and records completion.
Then:
> Worker A claims the job.
> Worker A performs the external action.
> Worker A crashes before recording completion.
> Its claim expires.
> Worker B retries the job and repeats the action.
The database records one completion. The outside world observes the action twice.
No component is necessarily broken. Every local step may be reasonable. The protocol is wrong.
A small behavioral model can expose this execution before the queue, database schema, retry worker, and recovery procedure exist. It forces the real architectural decisions:
Must the external operation be idempotent?
Does ownership require fencing tokens?
Is at-least-once execution acceptable?
Which fact is authoritative?
Discovering these answers after implementation is not validation. It is incident-driven design.
Proof work should begin before code.
Give agents constraints, not interpretations
An agent given forty pages of prose must interpret them. When an assumption is missing, it invents one. When several answers are locally reasonable, different agents can produce incompatible implementations. Each may look complete, tested, and professional.
A behavioral model gives the agent a stronger contract:
- these transitions are permitted;
- these assumptions are explicit;
- these invariants may not be violated;
- this implementation boundary must refine the model;
- these checks attempt to falsify the result.
The task changes from:
> Implement what this document seems to mean.
to:
> Produce an implementation that preserves these properties.
Generating code faster without this boundary only generates architectural mistakes faster.
TLA+ is one practical way to do it
This idea is larger than any notation. But TLA+ already provides much of the required machinery.
A TLA+ specification defines state, initial conditions, and permitted actions. Safety and liveness properties state what the system must preserve. The TLC model checker explores the reachable states of configured finite instances and returns a concrete execution when a property fails.
The working loop is small:
Model the protocol's state and transitions in TLA+.
State its invariants and progress properties before implementation.
Include crashes, retries, duplication, delay, and reordering where relevant.
Run TLC on small finite instances.
Treat every counterexample as an architectural review.
Generate human-facing and agent-facing artifacts from the corrected model.
Add conformance evidence as the implementation appears.
TLC does not accept “normally,” “should,” or “the service prevents that.” It returns the breaking execution or exhausts the reachable states of the configured model.
TLA+ is not the architecture because it is formal. It is useful because it turns architectural assumptions into executable challenges.
Keeping the claim honest
A checked model is not automatically a correct production system.
Model checking establishes that stated properties hold for the reachable states of a particular finite model instance. Theorem proving can establish more general results at greater cost. Neither proves that the model captures reality or that the implementation conforms to it.
A verified model of the wrong system is still wrong.
The defensible claim is narrower:
The architecture consists of mechanically checkable claims under explicit assumptions.
The remaining problem is correspondence. Model-derived tests, conformance suites, runtime assertions, trace checking, and refinement mappings provide evidence that the implementation still realizes the model.
The chain will rarely be perfect. It can still be radically stronger than a collection of documents whose contradictions are discovered by customers.
Do not formalize every screen, controller, or database field. Start where intuition fails: concurrency, retries, authorization, money, ownership, orchestration, consensus, and partial failure.
Compress those protocols into a behavioral kernel. Generate the rest. Let the machine attack the architecture before production does.
@rohanpaul_ai This idea has been originally proposed by Russian scientist Alexey Semihatov in one of his interviews at least half a year back. The original idea was exactly the same except of the target theory. Alexey proposed it to be quantum theory: https://t.co/paA3WoON55
Matter, Energy... and Something Else?
You know the formula E=mc², but have you ever pondered what it truly means? Matter is simply energy slowed down to visibility. But what if reality isn't based on duality, but rather a triad?
https://t.co/8F4Bl6wWSb
Hey @perplexity_ai, I really enjoy using Perplexity on a daily basis, but there's one thing that really drives me nuts -- the shortcuts only work if the keyboard layout is Latin, which isn't the default for half the world. Could you please fix this?
@Brad08414464 You should probably add Tesla to the list also. They will also not go with Open AI’s models. And Tesla Bot is probably the most AI related hardware thing which is going to be created these days.