The repository map

Partition keeps the state of your project in files of your repository, never in the chat. This article walks through them, folder by folder: what each one holds, who puts a document there, when, and who reads it. It separates the two kinds plainly: what a person fills to start, and what Partition creates as the work goes. Why the method works this way is in Why Partition.

Installing the package writes nothing under docs/. Each file Partition creates appears the first time a skill needs it, copied from a template the skill ships when the file does not exist yet. From then on it is your project’s: an update of the package replaces the skills, the agent and the instruction, and never touches your specs, your invariants, your plans, your rules, your docs/partition.yml or your C4 model.

The tree

.apm/instructions/                 Partition creates   your rules, one source for every assistant
docs/
├── partition.yml                  Partition creates   bounded contexts, paths, thresholds, layer maps
├── specs/
│   ├── invariants.md              Partition creates   what spans areas or layers
│   └── <area>/
│       ├── bounded-contexts.md    Partition creates   how a source was split, and why
│       ├── area.md                Partition creates   the language and the rules shared in the area
│       └── <bounded-context>/spec.md   Partition creates   the durable spec of one bounded context
├── contracts/                     you fill            API contracts, by default, under stable names
├── sources/                       you fill            PRDs, described contexts, workshop results, by default
├── designs/                       you fill            one per feature: what it builds
├── plans/                         Partition creates   one per feature and bounded context: its state
├── legacy/                        you fill            a spec written before Partition, read where it lives (the guide's example)
├── architecture/model.yml         Partition creates   the C4, as text
├── architecture/patterns-grid.md  Partition creates   your rulings on patterns
├── architecture/reshapes/         Partition creates   one record per split, merge, removal, move or promotion
└── budget/YYYY-MM-DD.md           Partition creates   one record per day of assessment

“Partition creates” never means “Partition decides”. A skill writes the file, most often after showing you what it would write and waiting for your validation; the entries below say where. “You fill” means a person brings the document; the assistant reads it, and never invents what it does not say.

The folders you can move

The folders under paths: in docs/partition.yml are yours to change. The others (docs/partition.yml itself, docs/architecture/, docs/budget/) have no key: they sit where the tree shows.

Key Default What it holds
specs docs/specs one durable spec per bounded context, by area
invariants <specs>/invariants.md what spans areas or layers
plans docs/plans one per feature and bounded context: its state and its decisions
contracts docs/contracts where an API contract pasted or read from a URL is saved; one elsewhere in the repository is read where it lives
sources docs/sources where a source pasted or described in the chat is saved; one elsewhere, an old spec included, is read where it lives
schemas none: declare it only if you document your persistence the schema documents of your persistence

The rest of this article uses the defaults.

What you fill

These are the documents a person brings.

docs/sources/: what the system is specified by

docs/contracts/: what a bounded context shows its neighbours

docs/designs/: what one feature builds

A spec written before Partition: a source, where it lives

Persistence schema documents (optional)

What Partition creates

A skill writes these documents. A person still decides what goes into them: the boundaries, the business rules, the rulings.

docs/partition.yml: the configuration

docs/specs/<area>/bounded-contexts.md: the decomposition record

docs/specs/<area>/area.md: the area file

docs/specs/<area>/<bounded-context>/spec.md: the durable spec

docs/specs/invariants.md: the invariant register

docs/plans/: the state of the work

docs/architecture/model.yml: the C4, as text

docs/architecture/patterns-grid.md: your rulings on patterns

docs/architecture/reshapes/: the record of each reshape

docs/budget/YYYY-MM-DD.md: the assessments

.apm/instructions/: your rules

Where your stack is written

Partition has no file for your technical stack, and it has no skill that picks one. Its skills name no language, framework or vendor. A generic rule produces generic code, so the package ships none. The stack is chosen before Partition, or beside it. What follows from the choice lands in files you already have:

What you look for Where it is written
Framework, code conventions, layers, configuration, logs your rule files in .apm/instructions/, each scoped by applyTo to the code it binds, written by partition-rules from the code and your answers
Commands to build, run and test, CI the README of the project, kept in step with the code by partition-readme
The technical architecture the C4 model, docs/architecture/model.yml: each container carries an optional technology
The tool that checks dependencies between layers the one your project already has, otherwise one you choose from the build checks of partition-hexagon (ArchUnit, Deptrac, dependency-cruiser…), its rules generated from the layer map of docs/partition.yml
The form of the stored data your persistence schema documents, when you declare paths.schemas (docs/schema, for example), read by partition-shape as the only source of truth on persistence; otherwise the Persistence section of the durable spec of the bounded context

The step-by-step guide shows it: step 00 hands over a Spring Boot skeleton built with Maven, together with the team’s rules. Step 01 turns those rules into scoped rule files. Partition writes down the stack it finds. It never chooses it.

A document that records why the stack was chosen, such as a technical architecture shared across projects, is yours to keep. It lives outside what Partition writes.

Go deeper

Back to the series.