Every state file in CONTINUITY can live at any level of your directory tree.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bitwikiorg/continuity/llms.txt
Use this file to discover all available pages before exploring further.
STATE.md, TODO.md, MEMORY.md, CONTEXT.md — all of them can be placed at the root, inside a project folder, inside a subsystem folder, or deeper still. Each level captures a complete picture of the system at its own scope, and the agent reads the whole chain before acting. This page explains how the nesting model works, how scope resolution happens, and what rules prevent a child file from silently undoing a parent’s constraints.
The nesting model
Any file can be placed inside a project subdirectory. The result is a hierarchy where each node is a complete state description for its scope. A rootSTATE.md describes the whole workspace; a project-a/STATE.md narrows the focus to that project; a project-a/sub/STATE.md narrows further to a subsystem.
Inheritance rules
| Rule | What it means |
|---|---|
| Child inherits | Load order, authority model, and safety defaults flow down from parent to child automatically |
| Child refines | A child may add project-specific parameters, narrow the agent’s scope, or override index declarations |
| Child cannot weaken parent | Safety rules and authority boundaries set by the parent are preserved — a child may never silently remove them |
| Conflict resolution | When a child and parent disagree on a constraint, the parent wins; escalate blockers to STATE.md |
| Discovery | INIT.md builds the full hierarchy tree on boot and loads parent files before child files |
Child parent declaration
A child file declares its relationship to the parent in its YAML frontmatter or a dedicated section:INIT.md reads these declarations to construct the full hierarchy before any action is taken.
Practical nesting example
Consider a monorepo with a backend subsystem and an auth module inside it. Each level gets its own state files:/backend/auth/, it loads this chain — in order, from the outermost scope in:
Root STATE.md
Provides project-wide status — in this example, “Building auth” — so the agent understands the high-level objective.
/backend/STATE.md
Narrows context to the subsystem — “Refactoring JWT” — which tells the agent what the immediate surrounding work is.
Scoped state resolution
Before an agent acts, it resolves the state chain that governs the work area. The resolution always runs from the outermost scope inward:- Code edit chain
- Research chain
- Multi-agent chain
Scoped loading rule
Post-action reconciliation
After a meaningful change, the agent updates every file whose claims are no longer accurate. The scope chain determines which files are affected.A task completion may update
TODO.md, STATE.md, SNAPSHOT.md, and completed/ across multiple scopes — root and project-level — if the change affects both. A new tool discovery may update TOOLS.md and INFRASTRUCTURE.md. A lesson learned updates LEARNINGS.md or adds an entry to memory/.Mesh
Beyond hierarchy: many-to-many relationships between state files and shared directories.
Runtime Contracts
Binding lifecycle and machine-readable contracts for recursive multi-agent systems.
Core Tiers
Which files to use at which tier, and when to add nesting.
Ontology
State, History, and Library classes — the taxonomy that governs nesting rules.