# VaultMesh Cognitive Integration - Makefile # Claude as the 7th Organ of VaultMesh .PHONY: all install dev test lint clean build server help # Default target all: install test # Install production dependencies install: @echo "๐Ÿ”ง Installing VaultMesh Cognitive..." pip install -e . @echo "โœ… Installation complete" # Install with development dependencies dev: @echo "๐Ÿ”ง Installing VaultMesh Cognitive (dev mode)..." pip install -e ".[dev]" @echo "โœ… Development installation complete" # Run governance tests test: @echo "๐Ÿงช Running governance tests..." pytest tests/governance/ -v --tb=short @echo "โœ… All tests passed" # Run constitution hash verification verify-constitution: @echo "๐Ÿ“œ Verifying constitution hash..." @python -c "\ import blake3; \ from pathlib import Path; \ content = Path('docs/MCP-CONSTITUTION.md').read_text(); \ lines = content.split('\n'); \ lock = dict(l.split('=', 1) for l in Path('governance/constitution.lock').read_text().split('\n') if '=' in l and not l.startswith('#')); \ hash_lines = int(lock.get('hash_lines', 288)); \ computed = f'blake3:{blake3.blake3(chr(10).join(lines[:hash_lines]).encode()).hexdigest()}'; \ print(f'Computed: {computed}'); \ print(f'Locked: {lock[\"hash\"]}'); \ exit(0 if computed == lock['hash'] else 1)" @echo "โœ… Constitution verified" # Run golden drill drill: @echo "๐Ÿ”ฅ Running Golden Drill Mini..." pytest tests/governance/test_golden_drill_mini.py -v --timeout=30 @echo "โœ… Drill complete" # Run linter lint: @echo "๐Ÿ” Running linter..." ruff check packages/ tests/ @echo "โœ… Linting passed" # Format code format: @echo "โœจ Formatting code..." ruff format packages/ tests/ @echo "โœ… Formatting complete" # Start MCP server (stdio mode) server: @echo "๐Ÿš€ Starting VaultMesh MCP Server..." python -m vaultmesh_mcp.server # Test tool standalone tool: @echo "๐Ÿ”ง Running tool: $(TOOL)" python -m vaultmesh_mcp.server $(TOOL) '$(ARGS)' # Build package build: @echo "๐Ÿ“ฆ Building package..." pip install build python -m build @echo "โœ… Build complete" # Clean build artifacts clean: @echo "๐Ÿงน Cleaning..." rm -rf dist/ build/ *.egg-info/ .pytest_cache/ .ruff_cache/ rm -rf packages/*.egg-info/ find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true @echo "โœ… Clean complete" # Initialize receipt directories init-receipts: @echo "๐Ÿ“ Initializing receipt directories..." mkdir -p receipts/{cognitive,identity,guardian,mesh,treasury,drills,compliance,offsec,observability,automation,psi} mkdir -p realms/cognitive/memory @echo "โœ… Directories created" # Show guardian status status: @python -m vaultmesh_mcp.server guardian_status '{}' # Show cognitive context context: @python -m vaultmesh_mcp.server cognitive_context '{"include": ["health", "receipts"]}' # Help help: @echo "VaultMesh Cognitive Integration" @echo "" @echo "Usage: make " @echo "" @echo "Targets:" @echo " all Install and run tests (default)" @echo " install Install production dependencies" @echo " dev Install with dev dependencies" @echo " test Run governance tests" @echo " verify-constitution Verify constitution hash" @echo " drill Run Golden Drill Mini" @echo " lint Run linter" @echo " format Format code" @echo " server Start MCP server" @echo " tool TOOL=x ARGS=y Test tool standalone" @echo " build Build package" @echo " clean Clean build artifacts" @echo " init-receipts Initialize receipt directories" @echo " status Show guardian status" @echo " context Show cognitive context" @echo " help Show this help" @echo "" @echo "Examples:" @echo " make dev # Install dev dependencies" @echo " make test # Run all tests" @echo " make tool TOOL=guardian_status ARGS={} # Test guardian_status"