Private beta, by invitation. It may change without warning. While the beta lasts, some paid features are free. See pricing

trumly GitHub
Try the demo(opens in a new tab)

Blog /

Why design docs rot, and what a checked graph changes

Most teams have a design doc for the system they run. Most of those docs are wrong in places, and nobody can say where.

Why they rot

Nothing reads them. Code is compiled, linted and run on every change. A design doc is read by a person, sometimes, when they remember it exists. A wrong sentence never fails anything, so nothing tells you it is wrong.

The structure is hidden in prose. "The payments service writes to the ledger" is a fact about two things and the relationship between them. In a paragraph it is only words. You cannot list every writer of the ledger, or ask which requirements nobody has said how to build, without reading the whole document and holding it in your head.

Changes are reviewed where the code is. A pull request changes code, and the doc sits in a wiki with no diff and no reviewer. The two drift apart one reasonable shortcut at a time.

Nobody owns the whole. Each person fixes the paragraph they happen to be in. The inconsistencies between paragraphs, which are the expensive ones, belong to no one.

What changes when the design is a graph of files

In trumly each part of a design is a Markdown file: a requirement, a component, a data store, a decision. The file has a type, a few fields, typed links to other files and a free-text description. The files sit in the same repository as the code, so a change to the design is a diff in a pull request, reviewed like any other.

Here is a requirement from the ops-api example that ships with trumly, a small service that shows operations staff the status of their jobs. It says what the system must do and which capability it comes from:

id: requirement-list-jobs
type: requirement
title: List jobs
plane: def--requirements
fields:
  statement: The system shall list every job
    with its current status.
  kind: functional
  priority: must
links:
  - type: derives-from
    to: capability-view-job-status

Because links are typed and live in the file, a rule can ask a question about the whole design. This one, from the define pack, is also a file:

id: def--rule-functional-requirement-verified
type: rule
title: Functional req criteria
fields:
  statement: Every functional requirement is verified
    by an acceptance criterion
  severity: error
  applies_to:
    type: requirement
    kind: functional
  check:
    require_link:
      type: verified-by
      node_type: acceptance-criterion
      min: 1

Run trumly check and it reports what a reader would have had to hunt for:

FAIL  Functional req criteria
      def--rule-functional-requirement-verified
      requirement-list-jobs  List jobs

requirement-list-jobs has no verified-by link, so nobody has said how it would be proved. (In the shipped example the link is there. We removed it to show the finding.) That is now a finding with an id. You can fix it by adding an acceptance criterion and the link, or switch the rule off for this project. trumly check exits 1 while a rule fails, so the same check can stop a build in CI. Whichever you choose, it is a decision someone made, and it is in the history.

What it does not do

A checked graph does not prove that the code matches the design. The rules check the design against itself: that every functional requirement has a way to prove it, that every component has an owner and somewhere to run. Whether the component really exists in the code is a different question, and not one trumly answers today.

It also does not remove the writing. Each node keeps a free-text description, because the reasons for a design are prose, and prose is the part people read.

Why agents care

The same files are what an AI agent reads. An agent working from an out-of-date wiki page builds the wrong thing with confidence. An agent that reads an index of the project and then the few nodes it needs is working from something that has been checked, and the rules run on whatever it writes, just as they would on a person's change.

Try it

Try the editor opens this example in the live editor, where you can break the rule, fix it and write one of your own. The quickstart starts a project of your own. We are in beta, so expect rough edges, and tell us where they are.