1.3 KiB
1.3 KiB
Contract: Project Architecture Documents
Part of Project Bible.
system-overview.md Rules
- List what is in scope and what is explicitly out of scope.
- Out of scope section prevents scope creep; update it when you reject a feature.
- Include tech stack and local run command.
data-model.md Rules
- Document canonical naming: if domain model uses
Machinebut API usesasset, say so explicitly. - List all DB tables with one-line description of each.
- Document any non-obvious invariants (e.g. "parts are projections of history, not source of truth").
- Migration policy: how migrations are numbered and applied.
api-surface.md Rules
- Every endpoint: method, path, brief description, key response fields.
- Group by domain area (Registry, Ingest, Timeline, etc.).
- Note any endpoints that are UI-only routes vs JSON API.
- Document pagination, filtering params where non-obvious.
runtime-flows.md Rules
This is the most important file. Document flows that are easy to break:
- Mutation paths (what happens step by step when user does X)
- Event/time source priority rules
- Deduplication logic
- Cross-entity side effects (e.g. removing a component affects asset status)
- Anything that caused a bug or regression: add a "DO NOT reintroduce" note
Format each flow as a numbered list of steps, not prose.