Kensink Labs
← The K-Framework
Foundations · Systems ThinkingLayer 5 of 16Visual guide
PILLAR A · LAYER 05 · A.05

Code as Liability.

Test, validate, secure, document.

What a CEO/CTO needs to know
Every line your team cannot test is a line they cannot safely change. A smaller, tested codebase is cheaper to own than a large, clever one.

Tests gatemergesStrict typesADRsReadablesurface

A small, load-bearing surface protected by tests, types, and decision records, not a sprawl of untested cleverness.

[WHAT IT IS]

The engineer’s view, in plain language.

Every line of code is a liability until it is tested. We write less code, test it more, and document the surface our clients have to maintain. A smaller well-tested codebase is easier to extend than a sprawling one.

[HOW WE BUILD IT]

What “done right” looks like.

01

Tests gate merges

Nothing reaches main without passing tests. Coverage is on the surfaces that matter, not a vanity percentage.

02

Strict types, less code

Strict TypeScript catches whole classes of bugs at compile time, and we delete code as readily as we add it.

03

The codebase is the manual

ADRs accompany non-trivial changes and the code reads like documentation, because at handoff it is the documentation.

[MATURITY LADDER]

Where does your build sit?

Four rungs from absent to production-grade. Level 3 is the target, and the only one that survives a real production incident.

L0
Absent

Code lands without review. Coverage is incidental. Docs are out of date or absent.

L1
Ad-hoc

Some tests exist but do not gate merges, and types are loose.

L2
Managed

Tests gate merges and types are strict, but documentation lags the code.

L3Target
Production-grade

Tests gate every merge, strict types throughout, ADRs on non-trivial changes, code that reads as the manual.

[VALIDATE IT YOURSELF]

How to check it’s really there.

You do not need to read the code. Ask these questions and demand these artifacts. Vague answers are the finding.

★ Ask your team
  • ?Can a change reach production without passing tests?
  • ?Could a new engineer extend this system without rewriting it?
  • ?Where do the reasons behind non-trivial decisions live?
★ Demand to see
  • A CI gate that blocks merges on failing tests
  • A strict type configuration with no broad escape hatches
  • ADRs and code that a handoff team can read and extend
● WHAT L0 LOOKS LIKE

The failure mode, in production.

AI-generated code dropped into the repo without review. Test coverage at 14 percent. The documentation is the source. The team that takes over after handoff cannot extend it without rewriting.

Useful for a CEO or CTO sizing up an AI build? Share the Code as Liability layer.

Share

Want this layer audited in your stack?

We run the K-Framework against your AI build and hand you the gap list, ranked by what it will cost you in production.