Commit graph

6 commits

Author SHA1 Message Date
Eric Garcia
0150a5d1ed chore: move adrs, rfcs, spikes to .blue/docs
Per RFC 0003, Blue-tracked documents live in per-repo .blue/ directories.
ADRs needed for semantic adherence checking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:16:34 -05:00
Eric Garcia
daaaea5c82 feat(realm): Implement RFC 0001 cross-repo coordination and RFC 0002 Phase 1 MCP tools
RFC 0001 - Cross-Repo Coordination with Realms:
- Daemon architecture with HTTP server on localhost:7865
- SQLite persistence for sessions, realms, notifications
- Realm service with git-based storage and caching
- CLI commands: realm status/sync/check/worktree/pr/admin
- Session coordination for multi-repo work

RFC 0002 Phase 1 - Realm MCP Integration:
- realm_status: Get realm overview (repos, domains, contracts)
- realm_check: Validate contracts/bindings with errors/warnings
- contract_get: Get contract details with bindings
- Context detection from .blue/config.yaml
- 98% expert panel alignment via 12-expert dialogue

Also includes:
- CLI documentation in docs/cli/
- Spike for Forgejo tunnelless access
- 86 tests passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 07:14:35 -05:00
Eric Garcia
b8a15c2d87 docs(rfc): Update RFC 0001 with refinement dialogue consensus
Major updates from 12-round alignment dialogue (unanimous consensus):

Architecture:
- Hybrid coordination: SQLite IPC for real-time hints + Git PRs for durable changes
- SQLite sessions.db replaces JSON file for session coordination
- SQLite cache.db for export/contract/validation caching

Commands:
- Reduced to 5 MVP commands: status, sync, worktree, pr, check
- Admin commands under `blue realm admin` subcommand
- Added `blue realm check` with modes: exporter, importer, contract, compatibility

Contracts:
- Added `owner` field (one exporter per contract)
- Added `compatibility: {backwards, forwards}` rules
- Added `validation:` hooks with ci_only option
- Semver ranges in import bindings

Trust & Governance:
- Explicit trust.permissions model
- Contract ownership enforcement
- Cycle detection and prevention

Credentials:
- Layered: env → git credential → keychain → config
- GitHub App auth support for CI

Conflict Resolution:
- Ownership + semver + git rebase strategy
- Stale bindings as soft warnings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 05:33:55 -05:00
Eric Garcia
a593382385 docs(rfc): Correct terminology - Domain is edge, Repo is node
Updates RFC 0001 to use the correct conceptual model:
- Domain = coordination context (edge/relationship between repos)
- Repo = git repository (node)
- Realm = groups related domains
- Index = local registry of realms

Key changes:
- Sessions register by repo name, track active domains
- Worktrees created across repos participating in a domain
- Contracts belong to domains, repos provide/consume them
- Tool params changed: --domains for context, --repos for participants
- Implementation code updated to reflect correct model

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 05:19:15 -05:00
Eric Garcia
2511a630f8 docs(rfc): Add IPC session coordination and unified worktrees
Update RFC 0001 based on design preferences:

Session Coordination (Option C - IPC/Socket):
- Blue MCP servers communicate via Unix sockets
- Real-time broadcast of export changes
- Session index tracks active sessions per realm

Change Propagation (Option C - Unified Worktrees):
- Create worktrees in all affected repos simultaneously
- Single branch name spans repos
- Coordinated commits linked in realm tracking
- Linked PRs with correct merge order

New tools:
- blue_realm_sessions: List active sessions
- blue_realm_worktree: Create unified worktrees
- blue_realm_commit: Coordinated commits
- blue_realm_push: Push all branches
- blue_realm_pr: Create linked PRs

Implementation expanded to 14 weeks (8 phases).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 05:05:15 -05:00
Eric Garcia
7e9a466329 docs: RFC 0001 - Cross-repo coordination with realms
Add comprehensive design for cross-repo coordination:

- Spike: Initial problem exploration
- Dialogue: 12-expert, 6-round alignment session
- RFC: Full implementation spec

Key design decisions:
- Realm = git repo (auditable, no new infrastructure)
- Index → Realm → Domain → Repo hierarchy
- Export/import contracts with semver
- Pull-based sync with GitHub issue notifications
- Different orgs can coordinate without shared write access

7-week MVP: init, join, export, import, sync, check, status integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 05:01:08 -05:00