57 lines
2.1 KiB
Markdown
57 lines
2.1 KiB
Markdown
# Contract: Project Bible (bible-local/)
|
|
|
|
Version: 1.1
|
|
|
|
## Purpose
|
|
|
|
`bible-local/` is the single source of truth for everything **specific to this project**:
|
|
data model, API surface, business rules, architectural decisions.
|
|
|
|
Shared engineering rules (CSV, logging, DB, tables, etc.) live in the `bible/` submodule.
|
|
Do not duplicate them in `bible-local/`.
|
|
|
|
## Required Files
|
|
|
|
Every project bible must have these files:
|
|
|
|
```
|
|
bible-local/
|
|
README.md - index: what files exist and what each covers
|
|
architecture/
|
|
system-overview.md - what the product does, active scope, non-goals
|
|
data-model.md - domain entities, DB tables, naming conventions
|
|
api-surface.md - all HTTP endpoints with methods and response shape
|
|
runtime-flows.md - key mutation flows, invariants, critical rules
|
|
decisions/
|
|
README.md - ADL format explanation
|
|
YYYY-MM-DD-topic.md - one file per architectural decision
|
|
```
|
|
|
|
Optional (add when relevant):
|
|
```
|
|
architecture/
|
|
ui-information-architecture.md - page structure, navigation, UI invariants
|
|
docs/
|
|
INTEGRATION_GUIDE.md - external system integration (formats, protocols)
|
|
```
|
|
|
|
## What NOT to Put in bible-local/
|
|
|
|
- Generic rules (CSV format, logging, pagination) -> these are in `bible/rules/patterns/`
|
|
- Work-in-progress notes, TODO lists -> use issues or a separate `docs/` folder
|
|
- Duplicate of what is already in code (don't restate what the code clearly shows)
|
|
- Speculative future architecture: document what exists, not what might exist
|
|
|
|
## Keeping the Bible Current
|
|
|
|
- Update `bible-local/` in the **same commit** as the code change it describes.
|
|
- If you change a flow, update `runtime-flows.md` in the same PR.
|
|
- If a section becomes outdated, fix or delete it; stale docs are worse than no docs.
|
|
- Bible files are in **English only**.
|
|
- Do not use em dash in Bible files; prefer ASCII punctuation such as `-`, `:`, or `;` depending on the sentence.
|
|
|
|
## Topic Contracts
|
|
|
|
- [Architecture documents](architecture/contract.md)
|
|
- [Decision records and promotion to shared rules](decisions/contract.md)
|