Jump to content

MindAttic.Agency/build-up

From MindAttic Docs

Build up: from the lowest leaves to the finished product (MAT-T484)

The owner, 2026-11-30: start building by organising the work into units, "pick one project and test it to make sure it works and refine it along the way"; order every project from simplest to most complex, with Prose, Gadfly, GridGame (Convergence) and SpaceGod at the end, "where they can benefit most from this paradigm shift"; recognise, ticket and build the connective tissue between separate pieces "from individual ticket interconnectivity to a tier higher interactivity so that you are building the pyramid of a feature, or of an epic"; "if anything appears unordered it must be abstracted and rebuilt no matter how modest it seems, code that isn't accounted for is tech debt so it must be a fine tooth comb."

single-source.md says how the plan is written, top down. This page says how it is built, bottom up, one repo at a time.

1. The order of repos

tickets order writes docs/buildup/BUILD_ORDER.md and build-order.json at the workspace root (--out <dir> writes them elsewhere for a dry run): every repo ranked by complexity (thousands of lines of tracked source, the code the comb must account for, plus open leaf tickets, the work still to build). Repos are built in that order, one at a time, the first being the pilot. The four most complex products and their satellites (Prose, Gadfly, GridGame, SpaceGod) are pinned last.

  • Pull forward. When a leaf requires a leaf in another repo, that leaf is built first, wherever its repo sits in the order. The platform is therefore built as products need it, not all at once. Pull forward also covers any story the method itself requires (its tools and views, owned by Tickets): it is built first, in its owner repo, whatever that repo's place in the order.
  • Unnumbered rows are not built in the order: dissertations (writing has its own tree), repos with no open work, repos archived on GitHub, and repos with code and no tickets at all (an owner decision: plan them or archive them).

2. Per repo: reason, comb, membranes, build, record

Every repo goes through the same steps, in this order. A repo is done when its ledger is 100% accounted, every container with two or more parts has its membrane, and every open leaf an agent can do is closed (owner-only steps are listed, not forced). tickets plan check <repo> reports what the plan still lacks, deterministically, and exits 1 while anything is found: open stories without acceptance (Given/When/Then, an Acceptance: line or an ## Acceptance section) or without a why, open epics and features with no parts, epics with a single part, containers with two or more parts and no membrane, and a ledger below 100% (computed in memory). A story's why is the ## Why section of its description: tickets ticket why <ID> "..." sets it and tickets ticket show prints it.

2.0 Reason: architecture first, then the stories between stories

Before building, run tickets reason <ID> on each open container (it writes the container's ## Design: how its children fit, from its SPEC section and the ECOSYSTEM owner table) and tickets gaps <ID> (the requires links, the membrane and the acceptance no child covers; --apply files them as proposed tickets). Review the proposals: approve what belongs, reject the rest with a reason.

2.1 Comb: every line of code is accounted for

tickets ledger <repo> writes <repo>/docs/CODE_LEDGER.md: every tracked source file, and the ticket in the repo's tree that accounts for it (found from history: the ticket ID in a commit subject, or the commit hash in a ticket's ref). --check exits 1 below 100%; --out <path> writes the ledger elsewhere for a dry run. Only a repo's own build-up step writes docs/CODE_LEDGER.md; everything else (a dry run, tickets plan check) uses --out or computes it in memory. Then work every row that is not accounted:

The file is... Do this
Part of a behaviour a seated story already covers (open or closed) Add an assigned row: path (or folder ending in /) -> that story.
A behaviour the product should keep, but no story covers it File the missing story under the right feature, --status closed, its ref the commit that built it, and add it to SPEC §4 marked built. Assign the file to it.
Disordered: it mixes concerns, duplicates something, re-implements a platform concern, or does not fit one story File a story labelled debt under the feature it belongs to: "abstract and rebuild <behaviour>" (one owner, one story). Assign the file to it. It is built in the next step like any other leaf.
Not wanted (dead, superseded, outside the SPEC) File a task to remove it, labelled debt. Assign the file to it.
Generated, vendored or data, not source Add an assigned row to the repo's tooling or build story with the note generated or vendor; when a pattern recurs, add it to the scripts' vendor pattern instead.

No file is too small. The comb is done when the ledger says 100%.

A file may be assigned to the lowest ticket covering everything it serves only if everything it serves sits under that one ticket and it has one reason to change. A file serving stories in two features, or mixing concerns, is debt however small: file the debt story, do not assign it upward.

2.2 Membranes: the connective tissue, tier by tier

tickets membranes <repo> lists every open feature or epic with two or more parts and no membrane child; --apply files one for each (proposed, for the owner to approve). A membrane is the one story that makes a container's parts work as one: it wires the siblings together (state they share, events they pass, data one hands the next, the one flow a user takes through them) and proves the container's own acceptance end to end.

  • It is level:story, labelled membrane, part of the container, and requires every sibling, so it is the last leaf of its container and the container closes when it does.
  • The pyramid. A feature's membrane joins its stories. An epic's membrane joins its features, and so requires their membranes. A milestone's acceptance checks join its epics. Each tier is built only on the tier below.
  • Recognise them as you build, too. When a leaf turns out to need another leaf's output, or two siblings turn out to share state, that is tissue: link requires between them, and put the joining work in the container's membrane (or file a new leaf for it), never inside one of the siblings.
  • The agent who works a membrane rewrites its skeleton summary to say which parts meet and how before building it.
  • A container with a single part needs no membrane: its part is its acceptance.
  • Evidence. A membrane closes on the build plus one recorded run of the joined flow that is not a test suite (run the CLI or tool on real input, launch the app, check the published artifact), written in its close note. A run only the owner can make leaves it open as an owner step. A membrane closed with no change and no recorded run is empty ceremony.

2.3 Build: lowest leaves first

Work the repo's open leaves in waves (MindAttic.Agency/shared/waterfall/build-waterfall.ps1: wave 0 first; within a wave, the queue order). One subagent per leaf task, one commit per ticket, build-only verification, the standard rules for commits. Debt stories are leaves like any other. Membranes come last in their container because of their requires links; nothing else orders them.

Owner-only leaves (buy, sign, play, approve, deploy where only the owner holds the keys) are listed in the repo's row of the results and left open.

2.4 Record and refine

Each repo adds one row to docs/buildup/RESULTS.md at the workspace root: ledger before and after, debt stories filed and closed, membranes filed and closed, leaves closed, owner steps left, and refinements: anything about this method that did not work, with the change made to this page or the scripts. The next repo uses the refined method. That is how the pilot tests the method and how the method improves along the order.

3. Where it is written

  • The paradigm and the pilot's evidence: Dissertation.NestedHierarchyAbstraction, Part II (Building up).
  • The rules: this page, AGENTS.md ("Build up"), and the golden rule in MINDATTIC_AGENT.md.
  • The tools: the tickets CLI (tickets order, tickets ledger, tickets membranes, tickets reason, tickets gaps, tickets plan check, tickets ticket why). The scripts in MindAttic.Agency/shared/buildup/ (mirrored to mindattic-agent-standard/shared/buildup/) forward to it, keeping their parameter names.
From MindAttic.Agency/docs/build-up.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.