2.7 KiB
2.7 KiB
Research Findings: AI-Facing Repository Constitution
Decision 1: Constitution is authoritative for AI
- Decision: AI-facing constitution overrides conflicting human docs for AI guidance; conflicts trigger updates to both with recorded resolution.
- Rationale: Ensures consistent automated actions and avoids drift between AI behavior and repo rules.
- Alternatives considered: (a) Defer to human docs and mirror later (rejected: increases drift); (b) Split authority by domain (rejected: adds ambiguity for AI tools).
Decision 2: Documentation IA
- Decision: Place the living constitution in
/docs; keep feature-specific planning/playbooks underspecs/001-ai-docs/with index links in constitution. - Rationale: Clear separation of durable source-of-truth vs feature-level artifacts; aligns with spec expectations.
- Alternatives considered: (a) Keep all AI docs in
/specs(rejected: mixes planning with durable guidance); (b) Distribute docs per module directory (rejected: harder AI discoverability).
Decision 3: Validation approach
- Decision: Validate docs manually against repo conventions and the specification’s success criteria (discoverability ≤2 steps, full module/host coverage, secrets map completeness).
- Rationale: No automated tests for markdown; checklist-based review matches spec.
- Alternatives considered: (a) Add automated linting now (rejected: out-of-scope for this documentation feature); (b) No validation (rejected: risks drift and omissions).
Decision 4: Navigation and conflict logging
- Decision: Anchor discoverability through
docs/constitution.mdwith links todocs/reference/index.mdanddocs/playbooks/; record any conflict resolutions inspecs/001-ai-docs/research.mdwith date and source references. - Rationale: Keeps navigation within two steps for AI and centralizes historical decisions for reconciliation.
- Alternatives considered: (a) Distribute links per playbook only (rejected: harder to enforce two-step navigation); (b) Log conflicts in ad-hoc comments (rejected: loses traceability for AI tools).
Decision 5 (2026-02-01): MCP docs sync alignment
- Decision: Treat the constitution as authoritative, update MCP docs to include explicit tool anchors, and align the tool catalog anchors to actual markdown headings; scope sync checks to MCP tool headings in
docs/reference/mcp-server.md. - Rationale: Prevents false drift from unrelated docs while ensuring tool anchors remain accurate and navigable.
- Alternatives considered: (a) Force every doc to map to a tool (rejected: inflates catalog and adds noise); (b) Keep loose anchors without validation (rejected: undermines navigation and sync intent).