A surprising amount of machinery comes from using lifted types where the domain already has meaningful distinguished points.
Consider Scope | undefined, where undefined means the realm’s scope. The semantics already contain that scope, yet every consumer must independently reinterpret its absence.
Instead, prefer pointed types, with canonical, referentially stable constants owned by the eponymous module.
An algebra can have many distinguished elements: identities, absorbing elements, top and bottom elements, each with its own laws.
The crucial shift is one of ownership. Rather than distributing the interpretation of absence across every consumer, give that interpretation a single home as an actual point in the algebra of the type.
Operations become total over the domain. Guards, flags, branches, and defensive machinery disappear because the semantics are represented directly, not reconstructed at every call site.
Ask an agent to inspect your codebase for every undefined being passed around. For each, ask whether it actually denotes a distinguished point in the algebra of its type, what laws that point should satisfy, and how much machinery would disappear if you represented it explicitly in the owning module
namespaced imports also force AI to reason about things as wholes instead of heaps of things its just slapping together (lint indexes away and force namespaced imports for everything and you'll see a major slop reduction)
import * as Algebra from (at)org/domainpackage/Algebra
better tree shaking too
@harrysolovay export const layer is better imo
especially since I also prefer namespaced imports for ais ability to reason about the domain
Thing.layer
OtherThing.layer
Had one of the best VC convos in years today.
Rarely does a founder meet someone who understands where you are on the frontier (deep!), but who also helps you push it in a single convo. Prepared minds >>>
Via Phosphor, I went all-in on multiple contrarian bets 6 years ago. $200k personal debt. 380 credit score. Took $ from friends who honestly didn't have it to lose.
100% of the bets realized at max EV last week after years of battle. Couldn't lose if I didn't quit.
No feeling quite like being right.
Good morning. I am batting 100% on AI predictions placed four years out for Phosphor. 🔮
Four years ago (GPT-3 era), we began building against a 7-10 year thesis for where things would go. We did not miss, and these bets are to be imminently realized. For now, our thesis for the project economy below.
***
Thesis: As AI forces down the cost of knowledge, we predict that over five years, all services in the project economy (origination through finance) will fall to one of two sides of a barbell.
1. On one side, large, name-brand service providers with rated rated balance sheets will continue to assume and buffer risk for decisions made with large sums of capital. As these services become more fungible, pricing will become more liquid and customers will benefit.
2. On the other side, value will accrue to those best-suited to align around and augment equity-like project outcomes. For those who are able to adapt to it, this shift from cash retainer to equity-like pricing will expand the TAM for services dramatically. For those who cannot... market efficiency at play 🪦.
3. The implication for the outcomes-based world is that the best technology (as opposed to the best sales team) wins every single time through more consistent successes and maximal alignment with customer goals.
4. The slop that has pervaded this space by capitalizing on the lack of liquidity in customer solutions, and by building businesses on large cash fees or retainers for early stage projects with no incentive for outcomes, will dissolve as outcomes-centric alignment takes hold.
As the cruft falls away, the efficiency, pace and scale of deployment will crystallize into a golden era of getting civilizational infrastructure developed and deployed.
Phosphor looks forward to putting our chariot into the race in order to drive this transition.
Hat/tip to Michael Parker for refining my thinking on this.
In 1967, Melvin Conway observed that “organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations.” Nearly 60 years later, that idea feels worth lifting into an agentic world, where the “organization” building software is increasingly a system of agents. The structure of the code may come to mirror the way those agents are orchestrated. And that makes orchestration a security concern, not just a productivity one: if every agent gets broad access to the repo, tools, credentials, and environment, we recreate ambient authority at the agent layer, and consequently at the code layer. If instead agents have narrow roles, explicit handoffs, and only the capabilities required for their task, orchestration naturally leads us toward the Principle of Least Authority. Agent architecture increasingly becomes software architecture, and part of the security model.
Perfection is reached not when there's nothing left to add, but when there's nothing left to take away. — Saint-Exupéry
Security is not added to a system; insecurity is removed from it. — Miller
Same operation. Find the thing holding more authority than its nature warrants, revoke the claim, and the compensating machinery deletes for free. This absolutely decimates slop code when iterated down to a fix point.
Banach’s fixed-point theorem has an agentic coding corollary. Any refactoring loop that preserves behavior while monotonically deleting complexity is bound to converge to a fixed point where the next refactor changes nothing.
@mattpocockuk File Topology Graph >
Your system’s ontology should be encoded in the file topology. If the graph of your modules isnt enough to understand the concepts and how they relate, your topology is wrong.
open sourced a thing i hacked together: fold your notes into one fixed size state where new beliefs subtract the old ones they replace. no keys, just prose. stale answers aren't down ranked, they're just gone.
https://t.co/TlgtZ5Hxfw
@doodlestein Very much agreed. Math is an extraordinarily precise language, and ideas like category theory live at that "zoom out and see the bigger picture" layer people often “vibe prompt”. What's changed is that AI has dramatically increased the practical value of knowing these concepts.
@refactorordie@doodlestein I think this type of workflow encourages not thinking about a problem. Immediately jumping to an implementation always leads to significantly more bloated outcomes compared to running through the principles first thing.
@mattpocockuk@MichaelArnaldi A lot of these mistakes can be identified by a linter (eg tss lint) with AST
Your lints should then point towards the right usage. All you need is to ensure your agents lint / are auto injected lints.
Very effective way to prevent under utilization of primitives / composition