- blue init now creates .blue/ directory and SQLite database
- Added --force flag to reinitialize existing projects
- Prints helpful output showing created paths
- Idempotent: running twice shows "already initialized" message
Phase 1 of RFC 0061 (CLI Database Parity).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- install.sh: Add xattr/codesign fix after cp on macOS
- install.sh: Add portable timeout verification using perl
- INSTALL.md: Recommend cargo install --path as primary method
- INSTALL.md: Document macOS signature issue and fix
- blue doctor: Detect com.apple.provenance xattr with fix hint
- blue doctor: Verify code signature with codesign --verify
- blue doctor: 3-second liveness timeout for hanging binaries
Fixes dyld hang at _dyld_start when copied binaries have stale
signatures after Homebrew library updates.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes convergence discipline with four core changes:
1. Velocity redefined: velocity = open_tensions + new_perspectives
(work remaining, not score delta)
2. Unanimous convergence: 100% of experts must signal [MOVE:CONVERGE]
3. Both conditions required: velocity=0 AND converge=100%
4. Dialogues persist: stored in .blue/dialogues/<ISO>-<name>/
Database schema updates:
- Added score component columns (W/C/T/R breakdown)
- Added convergence tracking columns
- Created alignment_convergence_signals table
- Created alignment_scoreboard view
MCP tool updates:
- round_register accepts new metrics
- round_context returns convergence status
- verdict_register gates on convergence criteria
- dialogue_create outputs to .blue/dialogues/
- dialogue_export includes full scoreboard
Judge protocol updated with new scoreboard format and max_rounds=10.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added:
- Performance indices on all entity tables for fast dialogue lookups
- test_output_directory_isolation: Unique IDs ensure separate output dirs
- test_performance_many_perspectives: 100 perspectives queried under 100ms
- test_indices_exist: Verify all performance indices created
- test_no_orphaned_entities: Refs connect valid entities
All pending tests complete. RFC 0051 fully implemented.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
RFC 0051 accepted and initial implementation:
- Added alignment_dialogues, alignment_experts, alignment_rounds tables
- Added alignment_perspectives, alignment_tensions with event tracking
- Added alignment_recommendations, alignment_evidence, alignment_claims
- Added alignment_refs table for cross-entity references
- Added alignment_verdicts table for final/interim/minority verdicts
- Created alignment_db.rs module with database operations
- Created alignment-expert skill with marker syntax reference
Schema version bumped from 8 to 9.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove context_brief from MCP return (Judge constructs from data)
- Add three expert sources: retained, pool, created
- Consolidate duplicate blue_dialogue_round_context sections
- Add step 0 (EVOLVE PANEL) to round workflow
- Fix step numbering and loop target in workflow
- Clarify Judge registers rounds even on convergence
- Fix "experts register" → Judge registers on their behalf
- Change "collide" to "overlap" for local IDs
- Add defaults section (panel size, 100% convergence)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Judge-driven panel evolution for alignment dialogues:
- Add `Graduated` as default rotation mode
- New `blue_dialogue_evolve_panel` tool for panel specification
- Panel sampling is now a suggestion (`suggested_panel`) not mandate
- Judge can override Round 0 panel before spawning agents
- Fresh experts (pool/created) get automatic context briefs
- Support for on-demand expert creation with focus areas
- Track panel history with source counts (retained/pool/created)
Key workflow changes:
- Phase 1: Review suggested panel, override if needed
- Phase 2+: Evolve panel based on dialogue dynamics
- `expert_source` param in round_prompt for context brief generation
Updates skill documentation with graduated rotation guidelines and
7 key rules including "REVIEW THE SUGGESTED PANEL".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds unified installation management for Claude Code integration:
blue install - Install hooks, skills, MCP server
blue uninstall - Remove Blue from Claude Code
blue doctor - Check installation health
Components managed:
- Hooks: session-start.sh (PATH), guard-write.sh (guard)
- Skills: Symlinks to ~/.claude/skills/
- MCP Server: Configuration in ~/.claude.json
Features:
- --hooks-only, --skills-only, --mcp-only flags
- --force to overwrite existing files
- Managed files tagged with "# Managed by: blue install"
- Idempotent - safe to run repeatedly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now covers unified `blue install` that manages:
- Hooks (SessionStart + PreToolUse)
- Skills (symlinks to ~/.claude/skills/)
- MCP Server (configuration in ~/.claude.json)
Also adds `blue uninstall` and `blue doctor` for health checks.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Proposes `blue hooks` subcommand for managing Claude Code hooks:
blue hooks install - Install all Blue hooks
blue hooks uninstall - Remove Blue hooks
blue hooks status - Show current hook status
blue hooks check - Verify hooks work correctly
Benefits: one-command setup, portable, idempotent, reversible.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added SessionStart hook that adds $CLAUDE_PROJECT_DIR/target/release
to PATH via CLAUDE_ENV_FILE. This makes `blue` available by name in
all subsequent hooks.
- .claude/hooks/session-start.sh: Sets PATH on session start
- .claude/hooks/guard-write.sh: Now uses `blue` instead of full path
- .claude/settings.json: Added SessionStart hook
Requires Claude Code restart to take effect.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem: Claude Code hooks run in minimal environment without PATH.
Commands by name hang; only full paths work.
Solution: Use $CLAUDE_PROJECT_DIR for portable binary resolution:
"$CLAUDE_PROJECT_DIR/target/release/blue" guard --path="$FILE_PATH"
This is documented Claude Code behavior - hooks don't inherit shell
initialization for security reasons.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Guard now runs synchronously before tokio runtime initialization:
- Added maybe_handle_guard_sync() pre-main check
- Added run_guard_sync() with full guard logic
- Added is_in_allowlist_sync() and is_source_code_path_sync()
- main() now checks for guard before calling tokio_main()
This eliminates tokio overhead for guard invocations and provides
correct architecture (pre-init gates don't depend on post-init infra).
Note: PATH-based command lookup still hangs in Claude Code's hook
environment - this is a Claude Code issue, not Blue. The hook still
requires full binary path as workaround.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Emerged from alignment dialogue with 5 experts (unanimous convergence).
Problem: guard command runs async within tokio::main, causing hangs
when invoked from Claude Code hooks.
Solution: Run guard synchronously before tokio runtime initialization.
Pre-init gates should not depend on post-init infrastructure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Establishes mandatory standards for Mermaid diagrams in Blue documents:
- Neutral theme required for dark/light mode compatibility
- Leaf node counting for LR flow warnings (>3 nodes)
- Plain text for architecture labels (no emoji color injection)
- Shape semantics advisory for new diagrams
- Auto-fix for theme declaration only (colors require manual review)
Includes alignment dialogue with 10/10 tensions resolved across 3 rounds.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 'resolved' outcome for spikes where a fix is applied during investigation.
Requires fix_summary parameter describing what was fixed. File renames to .resolved.md.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Every document filename now mirrors its lifecycle state with a status
suffix (e.g., .draft.md, .wip.md, .accepted.md). No more bare .md for
tracked document types. Also renamed all from_str methods to parse to
avoid FromStr trait confusion, introduced StagingDeploymentParams struct,
and fixed all 19 clippy warnings across the codebase.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
Separate mcp_root from cwd so tool-arg overrides don't clobber the
session-level root from initialize. Fallback chain matches RFC spec:
cwd → mcp_root → walk tree → fail with guidance. Error messages now
include attempted paths and actionable fix suggestions. Added --debug
flag to MCP server for file-based DEBUG logging.
Phase 2 finding: Claude Code v2.1.19 declares roots capability but
sends no roots array. Walk-up is the primary detection path.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- RFC 0014: Workflow Enforcement Parity - conversational hints over JSON
- RFC 0015: Cert-Manager with Let's Encrypt for TLS on K3s cluster
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
RFC 0012 was implemented with Option B (MCP orchestrates via Ollama)
instead of Option A (Claude orchestrates via Task tool). This caused:
- No parallel agents spawned
- Fake Ollama responses instead of real deliberation
- Inline JSON instead of .dialogue.md files
Fix by removing blue_alignment_play tool entirely. Claude now
orchestrates alignment dialogues directly using Task tool per ADR 0014.
Also:
- Add pub mod resources for RFC 0016/0017 (was missing)
- Update lib.rs threading for spawn_blocking
- Add .blue/worktrees/ to gitignore
- Update database schema
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add blue_alignment_play MCP tool for multi-expert deliberation:
- Core alignment module with Expert, Round, ExpertResponse types
- Panel templates: Infrastructure, Product, ML, Governance, General
- Ollama integration for running expert rounds until convergence
- Dialogue markdown generation with SQLite tracking
- RFC linking support
Also removes dead code (ADR 0010: No Dead Code).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the AI-powered indexing component of RFC 0010:
- Add indexer module with LlmProvider abstraction
- Integrate qwen2.5:3b via Ollama for local file analysis
- Extract summaries, relationships, and symbols from source files
- Support partial indexing for files >1000 lines
- Wire indexer to all CLI index commands (--all, --diff, --file, --refresh)
The indexer generates structured YAML output with:
- One-sentence file summaries
- Relationship descriptions for semantic search
- Symbol-level indexing with line numbers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds the foundation for AI-maintained semantic file indexing:
Schema (v4 migration):
- file_index table with summary, relationships, prompt_version
- symbol_index table with name, kind, line numbers, description
- FTS5 virtual tables for full-text search
CLI commands (blue index):
- --all: Bootstrap full index
- --diff: Index staged files (for pre-commit hook)
- --file: Single file indexing
- --refresh: Re-index stale entries
- --install-hook: Install git pre-commit hook
- status: Show index freshness
MCP tools:
- blue_index_status: Get index stats
- blue_index_search: FTS5 search across files/symbols
- blue_index_impact: Analyze change blast radius
- blue_index_file: Store AI-generated index data
- blue_index_realm: List all indexed files
Remaining work: Ollama integration for actual AI indexing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Spike investigation into AI-maintained semantic indexing for realms.
12-expert dialogue refined through 6 rounds to 96% alignment.
Key decisions:
- Storage: SQLite + FTS5, relationships stored at index time
- Triggers: Git pre-commit hook on diff, --all for bootstrap
- Model: Qwen2.5:3b via Ollama (speed/quality sweet spot)
- Granularity: Symbol-level with line numbers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
RFC 0008: Status updates now sync to markdown files, not just DB
RFC 0009: Add Audit as first-class document type, rename blue_audit to
blue_health_check to avoid naming collision
Also includes:
- Update RFC 0005 with Ollama auto-detection and bundled Goose support
- Mark RFCs 0001-0006 as Implemented
- Add spikes documenting investigations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>