# CLAUDE.md — Guildhouse MCP Server ## What is this? MCP server connecting Claude Code to the Guildhouse ecosystem: Forgejo, Capstone, GSAP governance, Chronicle audit, and K8s/Flux. ## Structure - `src/guildhouse_mcp/server.py` — FastMCP server with 25+ tools - `src/guildhouse_mcp/tools/` — Backend implementations (forgejo, chronicle, capstone, gsap_proxy, tasks) - `src/guildhouse_mcp/agents/` — Multi-agent orchestration (confidence gate, topology) - `tasks/` — TOML task definitions with phased prompts ## Commands ```bash pip install -e ".[dev]" python -m guildhouse_mcp # Run MCP server (stdio) python -m pytest tests/ # Run tests ``` ## Key Concepts - **Confidence gate**: Combined worker (40%) + reviewer (60%) score decides auto-merge/flag/propose/reject - **Chronicle recording**: Every tool call emits MCP_TOOL_CALL (0x3020) event - **GSAP proxy**: Forwards governance tool calls to existing GSAP MCP broker - **Task definitions**: TOML files with phases, success criteria, delegation scopes ## Thresholds (configurable via env) - `GUILDHOUSE_AUTO_MERGE_THRESHOLD=85` — No human needed - `GUILDHOUSE_FLAG_MERGE_THRESHOLD=70` — Merged, flagged for post-review - `GUILDHOUSE_PROPOSAL_THRESHOLD=50` — Tyler reviews - Below 50 — Rejected, worker revises