This commit is contained in:
Danilo Reyes
2026-01-30 16:31:02 -06:00
parent 93411591ef
commit 5da9abf1b7
21 changed files with 2509 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# Data Model: AI-Facing Repository Constitution
## Entities
### Constitution
- **Role**: Source of truth for AI about repository rules, architecture, conventions, precedence.
- **Key Fields**: scope (modules, hosts, secrets, proxies), conventions (no blank lines, comment discipline, factor duplication), precedence (constitution over human docs for AI), update triggers, references index, success criteria links.
- **Relationships**: Links to Use-case Playbooks and Reference Map; references repo paths.
### Use-case Playbook
- **Role**: Workflow guide for repeatable actions (add module/server/script/host/secrets).
- **Key Fields**: use-case name, required inputs, steps, expected outputs, related helpers (e.g., mkserver), secrets mapping, host/toggle implications.
- **Relationships**: References Constitution for rules and Reference Map for file locations.
### Reference Map
- **Role**: Index mapping core concerns to repo paths for navigation and validation.
- **Key Fields**: category (apps, dev, scripts, servers, services, shell, network, users, nix, patches), hosts list (emacs, server, workstation), secrets files, proxy rules, auto-import rules, stylix/schemes.
- **Relationships**: Anchors citations used by Constitution and Playbooks.
## Constraints and States
- **Lifecycle**: Constitution updates trigger playbook/index updates; playbooks evolve with new workflows; reference map updates when repo structure changes.
- **Validation Rules**: Constitution must enumerate all categories/hosts; secrets map must be complete; discoverability within two steps; precedence must be explicit.