Philosophy
Why Barntree works the way it does.
Barntree is built on a few decisions. Each one refuses something common in how structure is kept, and each shows in how the tool behaves.
Meaning comes first #
Every type has a name and a meaning, written in plain words, as long as it needs to be. A tree of names alone tells you where things sit and nothing of what they are for. A meaning is what a newcomer, or an AI agent, reads to understand the subject, so it is part of the Tree and not a comment beside it.
That is why each Template has a glossary that puts every type and its meaning on one page, and shows only what you wrote.
A Tree is never left half-broken #
Barntree knows nothing of what a Tree is about. What it does know is the rules: a type must exist before anything refers to it, a map can’t hold itself forever, the members of one list have different names, and a leaf holds nothing. An edit that would break one is refused, with a message that says why, and nothing is changed.
A file that was broken outside Barntree fails loudly when it is read, and says what is wrong and where. It does not repair it, guess, or leave a tree out without saying so. That makes the tool safer to drive than the file underneath, whether a person, a program or an agent is driving.
A decision is not rewritten #
A Template describes reusable structure. A Construction gives it real members, and keeps the exact revision it was made from, with its own copy of the types. Edit the Template tomorrow, rename it, delete it: the Construction is unchanged, and still says which revision it came from.
Every save is a revision #
Each explicit save records an immutable revision, and a save that changes nothing records none. Templates and Constructions each have their own history, so the current shape is understood together with how it came to be. A save made from a stale view is refused instead of overwriting newer work.
One set of records, two ways in #
The browser app and the command line work on the same records. Their presentation differs, but what is valid, how an item is identified, how a conflict is caught and where a revision begins and ends are the same in both.
A Tree outlives its realisation #
A folder structure, a diagram and a document are each one way to show a Tree. None of them is the Tree. So Barntree exports a Template as text, a document, a Mermaid diagram or folders, and never confuses the picture with the thing. The way a subject is understood is the durable part; what expresses it today can be replaced.
A Tree is kept as plain JSON, so any language can read it.
What it refuses to be #
- A judge of the subject. Whether tomato soup is a good starter in August is for you to decide, not a Tree.
- A tool that decides for you. When changing types would drop something, you compare before and after and keep the result only if that’s what you want.
- A history inside the Tree. A Tree itself keeps none; a Template and a Construction do, in their revisions.
- Tied to one subject or one language. A Tree can be the layers of a system, the rooms of a house or the courses of a dinner.
Next: the quick start, or types and items in detail.