# Documentation Policy ## Purpose This policy defines how architectural knowledge is captured and maintained. ## Mandatory Rules - Record every architecture decision in the Bible before or together with implementation. - Use English for all architecture documentation. - Keep only current architecture in active sections. - When a solution is replaced, update or remove obsolete guidance in the same change. - Keep architecture details centralized in `bible/`; other top-level docs should only reference it. ## Change Workflow 1. Update the relevant file(s) in `bible/architecture/`. 2. If behavior changed, add or update a decision note in `bible/decisions/`. 3. Remove duplicated or outdated statements from non-Bible docs. 4. Validate consistency against code paths in `internal/api`, `internal/ingest`, and `internal/repository`. ## Hardware Ingest Contract `bible-local/docs/hardware-ingest-contract.md` is a distributable integration document for external teams. **Mandatory:** any change to the hardware JSON import contract (`HardwareIngestRequest`, `HardwareSnapshot`, or any nested struct in `internal/ingest/parser_hardware.go`) must be reflected in `hardware-ingest-contract.md` in the same commit: - Bump the `version` field in the YAML front matter (patch for additive/optional fields, minor for new sections, major for breaking changes). - Update the `updated` date. - Add a row to the Changelog table describing what changed.