blue/.blue/docs/rfcs/0022-Filesystem Authority.plan.md
Eric Garcia 16d45d9a11 feat: alignment dialogue subagents, MCP instructions, and document batch
Alignment dialogues now use custom `alignment-expert` subagents with
max_turns: 10, tool restrictions (Read/Grep/Glob), and hard 400-word
output limits. Judge protocol injects as prose via RFC 0023. Moved
Blue voice patterns from CLAUDE.md to MCP server instructions field
for cross-repo portability.

Includes RFCs 0017-0026, spikes, and alignment dialogues from
2026-01-25/26 sessions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 07:09:39 -05:00

1.3 KiB

Plan: Filesystem Authority

RFC Filesystem Authority
Status complete
Updated 2026-01-26T02:38:21.586730+00:00

Tasks

  • Add content_hash and indexed_at columns to documents table (migration)
  • Implement hash_content() for staleness detection
  • Implement is_stale() with mtime fast path and hash slow path
  • Implement scan_and_register() to parse frontmatter and create DB record from file
  • Implement find_document() fallback to filesystem scan when DB lookup fails
  • Add slug-based document lookup (kebab-case title matching)
  • Implement scan_filesystem_max() for filesystem-aware numbering
  • Modify next_number() to use max(db, fs) + 1
  • Implement reconcile() for blue sync - scan filesystem and register unindexed files
  • Implement orphan detection - soft-delete records for missing files
  • Add --dry-run flag to blue sync
  • Update blue status to detect and warn about index drift
  • Add blue.db to .gitignore
  • Write core authority tests (delete DB rebuild, manual file creation, hash mismatch)
  • Write document lookup tests (slug matching, file-only creation)
  • Write numbering tests (empty DB, max of both sources, missing directory)
  • Write sync tests (unindexed files, orphan records, dry-run, drift warning)