Understand any codebase instantly. System intelligence for codebases, built for humans and AI.
TypeScript aiai-memoryclaude-codeclicode-analysiscode-mappingcode-memorycodebase-understandingcodexdeveloper-toolsllmopenclawpersistent-memoryprogram-analysissoftware-architecturesystem-intelligencesystem-mapping
fix: docker healthcheck ordering and make MCP opt-in
kagebinary6a05692415d4
diff --git a/.claude/hooks/stop-decision-reminder.sh b/.claude/hooks/stop-decision-reminder.shindex 574d9da7..d317a02e 100755--- a/.claude/hooks/stop-decision-reminder.sh+++ b/.claude/hooks/stop-decision-reminder.sh@@ -1,4 +1,11 @@#!/usr/bin/env bash-# Remind Claude to record significant design decisions after each session.-# Exit 0 always — non-blocking reminder only.+# After each turn, if code was changed, remind Claude to record design decisions.+# Only fires when there are uncommitted changes — silent otherwise.++if git diff --quiet HEAD 2>/dev/null && git diff --cached --quiet 2>/dev/null; then+ exit 0 # no changes, no reminder needed+fi++echo "Code was modified. If a design decision was made, record it:"+echo " ix decide \"<title>\" --rationale \"<why>\""exit 0diff --git a/.gitignore b/.gitignoreindex 9ba0231d..6f71b798 100644--- a/.gitignore+++ b/.gitignore@@ -6,5 +6,8 @@ target/.DS_Store.worktrees/ix-cli/node_modules/*+core-ingestion/node_modules/*+core-ingestion/dist/ix-cli/dist/-.vscode/\ No newline at end of file+.vscode/+.mcp.json\ No newline at end of filediff --git a/.mcp.json b/.mcp.json.examplesimilarity index 73%rename from .mcp.jsonrename to .mcp.json.exampleindex 1ad5c55d..a81d797a 100644--- a/.mcp.json+++ b/.mcp.json.example@@ -5,7 +5,7 @@"command": "npx","args": ["tsx",- "/Users/tkocher/Development/Ix/IX-Memory/ix-cli/src/mcp/server.ts"+ "/path/to/IX-Memory/ix-cli/src/mcp/server.ts"],"env": {"IX_ENDPOINT": "http://localhost:8090"diff --git a/docker-compose.yml b/docker-compose.ymlindex 381180b7..c139176f 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -7,6 +7,13 @@ services:ARANGO_NO_AUTH: "1"volumes:- arangodb-data:/var/lib/arangodb3+ healthcheck:+ test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8529/_api/version || exit 1"]+ interval: 5s+ timeout: 5s+ start_period: 60s+ retries: 15+ restart: unless-stoppedmemory-layer:build: ./memory-layer@@ -22,7 +29,9 @@ services:ARANGO_PASSWORD: ""PORT: "8090"depends_on:- - arangodb+ arangodb:+ condition: service_healthy+ restart: unless-stoppedhealthcheck:test: ["CMD", "curl", "-sf", "http://localhost:8090/v1/health"]interval: 10sdiff --git a/scripts/connect.sh b/scripts/connect.shindex 9a23980e..0d81c965 100755--- a/scripts/connect.sh+++ b/scripts/connect.sh@@ -5,14 +5,17 @@ set -euo pipefail# Ix — Connect a Project## Connects a project to Ix:-# 1. Creates .mcp.json in the project (so Claude Code sees IX tools)-# 2. Adds IX rules to CLAUDE.md (so Claude follows the IX workflow)-# 3. Ingests the project's source code into the knowledge graph+# 1. Adds IX rules to CLAUDE.md (so Claude follows the IX workflow)+# 2. Ingests the project's source code into the knowledge graph+#+# MCP is optional — the plugin (Claude hooks) is the default integration.+# Pass --mcp to also install an MCP server config.## Usage:-# ./scripts/connect.sh ~/my-project # Claude Code (default)-# ./scripts/connect.sh ~/my-project --cursor # Cursor-# ./scripts/connect.sh ~/my-project --claude-desktop # Claude Desktop+# ./scripts/connect.sh ~/my-project # Plugin only (default)+# ./scripts/connect.sh ~/my-project --mcp # Plugin + MCP (Claude Code)+# ./scripts/connect.sh ~/my-project --mcp cursor # Plugin + MCP (Cursor)+# ./scripts/connect.sh ~/my-project --mcp claude-desktop# ./scripts/connect.sh ~/my-project --skip-ingest # Don't ingest yet# ─────────────────────────────────────────────────────────────────────────────@@ -23,34 +26,43 @@ IX_CMD="npx --prefix $CLI_DIR tsx $CLI_DIR/src/cli/main.ts"# ── Parse arguments ──────────────────────────────────────────────────────────PROJECT_DIR=""-IDE="claude-code"+MCP=false+MCP_IDE="claude-code"SKIP_INGEST=falsewhile [[ $# -gt 0 ]]; docase "$1" in- --claude-desktop) IDE="claude-desktop"; shift ;;- --cursor) IDE="cursor"; shift ;;- --claude-code) IDE="claude-code"; shift ;;- --skip-ingest) SKIP_INGEST=true; shift ;;+ --mcp)+ MCP=true+ shift+ # Optional IDE argument: claude-code (default), cursor, claude-desktop+ if [[ $# -gt 0 ]] && [[ "$1" != --* ]]; then+ MCP_IDE="$1"+ shift+ fi+ ;;+ --skip-ingest) SKIP_INGEST=true; shift ;;-h|--help)echo "Usage: ./scripts/connect.sh <PROJECT_DIR> [OPTIONS]"echo ""echo "Connects a project to Ix so Claude can use the knowledge graph."echo ""echo "Arguments:"- echo " PROJECT_DIR Path to the project to connect (required)"+ echo " PROJECT_DIR Path to the project to connect (required)"echo ""echo "Options:"- echo " --claude-code Install MCP for Claude Code (default)"- echo " --claude-desktop Install MCP for Claude Desktop"- echo " --cursor Install MCP for Cursor"- echo " --skip-ingest Don't ingest the codebase yet"- echo " -h, --help Show this help"+ echo " --mcp [ide] Also install MCP server config (optional)"+ echo " ide: claude-code (default), cursor, claude-desktop"+ echo " --skip-ingest Don't ingest the codebase yet"+ echo " -h, --help Show this help"echo ""echo "What this does:"- echo " 1. Creates .mcp.json in the project (MCP server config)"- echo " 2. Adds IX rules to CLAUDE.md (mandatory LLM workflow)"- echo " 3. Ingests the project's source code into the knowledge graph"+ echo " 1. Adds IX rules to CLAUDE.md (mandatory LLM workflow)"+ echo " 2. Ingests the project's source code into the knowledge graph"+ echo " 3. (--mcp only) Writes MCP server config for the specified IDE"+ echo ""+ echo "The plugin (Claude hooks) is installed globally via ./setup.sh."+ echo "MCP is an alternative integration — use --mcp only if you prefer it."echo ""echo "To disconnect later:"echo " ./scripts/disconnect.sh ~/my-project"@@ -101,48 +113,56 @@ echo "║ Ix — Connect Project ║"echo "╚══════════════════════════════════════════╝"echo ""echo " Project: $PROJECT_DIR"-echo " IDE: $IDE"-echo ""--# ── Step 1: Install MCP config ──────────────────────────────────────────────--echo "── [1] MCP Config ───────────────────────────────────"--cd "$PROJECT_DIR"--case "$IDE" in- claude-code)- $IX_CMD mcp-install --claude-code- ;;- claude-desktop)- $IX_CMD mcp-install- ;;- cursor)- $IX_CMD mcp-install --cursor- ;;-esac-+if [ "$MCP" = true ]; then+ echo " MCP: $MCP_IDE"+fiecho ""-# ── Step 2: Add IX rules to CLAUDE.md ────────────────────────────────────────+# ── Step 1: Add IX rules to CLAUDE.md ────────────────────────────────────────-echo "── [2] CLAUDE.md ────────────────────────────────────"+echo "── [1] CLAUDE.md ────────────────────────────────────"cd "$PROJECT_DIR"$IX_CMD init --force 2>&1 | grep -v "^$" | grep -v "Initializing\|Next:"echo ""-# ── Step 3: Ingest codebase ─────────────────────────────────────────────────+# ── Step 2: Ingest codebase ─────────────────────────────────────────────────if [ "$SKIP_INGEST" = true ]; then- echo "── [3] Ingest (skipped) ───────────────────────────"+ echo "── [2] Ingest (skipped) ───────────────────────────"else- echo "── [3] Ingest Codebase ────────────────────────────"+ echo "── [2] Ingest Codebase ────────────────────────────"cd "$PROJECT_DIR""$IX_DIR/scripts/ingest.sh"fi+# ── Step 3: MCP (opt-in) ────────────────────────────────────────────────────++if [ "$MCP" = true ]; then+ echo ""+ echo "── [3] MCP Config ($MCP_IDE) ──────────────────────"+ cd "$PROJECT_DIR"+ case "$MCP_IDE" in+ claude-code)+ $IX_CMD mcp-install --claude-code+ echo " Config written to: $(pwd)/.claude/settings.json"+ ;;+ claude-desktop)+ $IX_CMD mcp-install+ ;;+ cursor)+ $IX_CMD mcp-install --cursor+ echo " Config written to: $(pwd)/.cursor/mcp.json"+ ;;+ *)+ echo " Unknown IDE '$MCP_IDE'. Valid options: claude-code, cursor, claude-desktop"+ exit 1+ ;;+ esac+ echo " [ok] MCP server configured — restart your IDE to activate"+fi+# ── Done ─────────────────────────────────────────────────────────────────────echo ""@@ -151,12 +171,8 @@ echo "║ Project connected! ║"echo "╚══════════════════════════════════════════╝"echo ""echo " Project: $PROJECT_DIR"-echo " IDE: $IDE"echo ""-echo " Next steps:"-echo " 1. Open $PROJECT_DIR in $IDE"-echo " 2. The IX MCP server starts automatically"-echo " 3. Ask Claude questions about your codebase"+echo " Open $PROJECT_DIR in Claude Code — the Ix plugin is active."echo ""echo " To disconnect:"echo " ./scripts/disconnect.sh $PROJECT_DIR"diff --git a/setup.sh b/setup.shindex 45f880df..5e8d9515 100755--- a/setup.sh+++ b/setup.sh@@ -196,6 +196,7 @@ echo ""echo " Next: connect a project to IX:"echo " ./scripts/connect.sh ~/my-project"echo ""-echo " Or with a specific IDE:"-echo " ./scripts/connect.sh ~/my-project --cursor"+echo " To also install MCP (optional, for Cursor/Claude Desktop):"+echo " ./scripts/connect.sh ~/my-project --mcp cursor"+echo " ./scripts/connect.sh ~/my-project --mcp claude-desktop"echo ""