The hook was blocking because `timeout` is a GNU coreutil only
available via homebrew on macOS. Replaced with bash's built-in
`read -t 2` which is portable and doesn't require PATH setup.
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>
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>
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>
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>
- Replace redundant closures with function references
- Use next_back() instead of last() for DoubleEndedIterator
- Fix test_parse_index_response_invalid to use actually invalid YAML
(previous test string was valid YAML - a plain string with braces)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The stop_sequences contained "```" which caused the model to stop
immediately after outputting "```yaml", truncating the entire response.
Also wrap blocking indexer operations in spawn_blocking to avoid
runtime conflicts with reqwest::blocking::Client.
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>
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>
- Add `blue agent` command that launches Goose with Blue MCP extension
- Detects Goose installation and provides install instructions if missing
- Supports --model flag and additional Goose arguments
- Uses exec() on Unix to replace process for clean signal handling
Completes RFC 0005: Local LLM Integration (15/15 tasks)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
- Rename from 💙 to blue for filesystem compatibility
- Add blue-core crate with documents and voice modules
- Add blue-mcp crate with JSON-RPC server skeleton
- Add blue-cli with subcommands (init, status, rfc, etc.)
- Add CLAUDE.md and .gitignore
- Add RFC 0001: Efficient Document Format
Phase 1 foundation complete. Ready for porting coherence-mcp functionality.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>