Tenancy, Not Ownership: Running Shared Libraries Like an Allotment Plot
Photo: ad acta , CC BY-SA 2.0, via Wikimedia Commons
Every internal library begins as somebody's shortcut. A date formatter knocked together on a Friday, copied into a second service on the Tuesday, and by the following spring it's in eleven repositories, four of which nobody remembers creating. The original author has moved on. The README still says "work in progress". And somewhere a junior developer is trying to work out whether they're allowed to change a function that half the estate quietly depends on.
If you've ever had an allotment, or sat on the waiting list for one, the shape of the problem will feel familiar. A plot is shared ground with a named tenant, a visible boundary and a set of rules short enough to fit on the gate. Nobody runs it by standing committee. It works because the conventions are written down and everyone can see who is responsible for the cabbages.
That's the model worth borrowing. Not a governance board — a tenancy.
Every plot has a tenant
The single most useful thing you can do for a shared package is name a team that owns it. Not a person; people move, go on parental leave, or get lured away by a fintech with a pool table. A team, with a rota, and a review every twelve months to confirm the tenancy hasn't quietly lapsed.
The tenant's job is narrower than it sounds. They triage issues, cut releases, and — crucially — say no. They are not obliged to build every feature anyone asks for. Put the team in CODEOWNERS, put it in the README with the date it was last confirmed, and put it in the package metadata so the information follows the artefact rather than living in someone's head.
The boundary is a hedge, not a wall
An allotment boundary does two jobs: it tells you what's yours to dig, and it keeps next door's courgettes from annexing your runner beans. A shared library needs the same. Write down what the package is for in one sentence, then write down what it is deliberately not for.
That second list is the one people skip, and it's the one that saves you. "String helpers" is a hedge with a gap in it — everything becomes a string helper eventually. "Parsing and formatting UK dates, including the BST transitions; not validation, not scheduling, not relative time" is a boundary you can point at when the next request arrives.
How a new crop gets planted
Keep the intake process boringly small. A feature request is an issue with four fields: the problem, the call sites that need it, the alternative you rejected, and what breaks if we don't do it. The tenant and one existing consumer sign it off. That's the whole ceremony.
The point isn't gatekeeping; it's forcing the requester to check whether the thing belongs in the shared plot at all. A surprising number of requests turn out to be one team's need dressed as a platform requirement, and the cheapest place to discover that is a form with four boxes.
When to split the bed
The file getting long is not a reason to extract a package. The release cadence diverging is. If half your consumers want a change on Tuesday and the other half can't take it until the next audit cycle, you have two plots pretending to be one.
Other honest signals:
- Weight. A service is pulling in a full postcode lookup because it wanted a string trim.
- Blast radius. A change to one area requires regression testing on unrelated surfaces.
- Security surface. Consumers with different threat models are sharing a dependency they can't audit separately.
- Divergent support. One part is maintained, the other is preserved in amber.
Splitting has a cost — more repositories, more version numbers, more places to look. Pay it when the cadence says so, not when the folder structure starts to look untidy.
Crop rotation and fallow ground
Nothing in an allotment lasts forever, and neither should a package. Deprecation should be a season, not a surprise: announce it, ship a codemod or a migration note, keep the old version patched for security, and give consumers a date. If a package is only kept alive because extraction is expensive, mark it maintenance-only and say so in the README. Fallow ground is honest. Pretending it's still under cultivation is not.
Notes for the next gardener
Every shed wall has a diary, and every shared library should have the equivalent:
- A changelog written for humans — what changed, why, and what to do about it.
- One architecture decision record for the big choice that shaped the package, dated.
- A "how to release" section that a new starter can follow without asking anyone.
- A short list of known consumers, refreshed when someone remembers.
Then inspect the plot once a quarter. Half an hour, one person, four questions: is the owner still real, is the README still true, is anything broken, is anything unowned. Fix one thing.
A charter that fits on a seed packet
- Named tenant, reviewed annually.
- One sentence of purpose, one list of exclusions.
- New features arrive as a four-field issue, signed by the tenant and a consumer.
- Split when release cadence diverges, not when the file grows.
- Deprecation gets a date and a migration path.
- Changelog, ADR, release notes, consumer list.
- Quarterly inspection, one fix.
The committee was never the point. The sign on the gate was — and so was knowing whose name was on it.