Claude Code now supports MCP servers over HTTP natively (type: "http"
in .mcp.json). The stdio↔HTTP bridge binary was a workaround for the
older stdio-only constraint and is no longer needed — the supervisor
NodePort on koala (30320) is reachable over Tailscale from any client
machine.
Removed:
- cmd/bridge/ (Go source, ~60 lines)
- bin/supervisor-bridge artifact
- Taskfile bridge:build target and the build aggregate's reference
- README "Build the bridge binary" instruction
Updated:
- .mcp.json switched to {type:"http", url:"http://koala:30320/mcp"}
- README architecture diagram and "Connect a project" section
Behavioural prerequisite for this change shipped in 7f7524c
(notifications fix). Verified end-to-end: tier tool call returns
{tier:2, label:"lan-only"} via direct HTTP, no shim.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
110 lines
3.7 KiB
Markdown
110 lines
3.7 KiB
Markdown
# hyperguild
|
|
|
|
An MCP server that acts as a disciplined AI supervisor for Claude Code sessions.
|
|
Instead of letting Claude Code do whatever it wants, hyperguild enforces structured
|
|
workflows (TDD red/green/refactor), logs every session, and accumulates learnings
|
|
into a searchable brain.
|
|
|
|
## How it works
|
|
|
|
```
|
|
Your Claude Code session (in any project)
|
|
│
|
|
│ MCP over HTTP (Tailscale)
|
|
▼
|
|
supervisor :3200 (NodePort 30320 on koala) — skill workers: tdd, retrospective
|
|
ingestion :3300 — brain HTTP API: query wiki, write notes
|
|
│
|
|
▼
|
|
brain/
|
|
├── sessions/ — JSONL log, one file per session_id
|
|
├── wiki/ — searchable knowledge (full-text)
|
|
│ ├── concepts/
|
|
│ ├── entities/
|
|
│ └── sources/
|
|
├── raw/ — retrospective output, staged for review
|
|
└── training-data/ — SFT/DPO/RL data (Phase 2)
|
|
```
|
|
|
|
## Phase 1 tools (available now)
|
|
|
|
| Tool | What it does |
|
|
|------|-------------|
|
|
| `tdd_red` | Writes a failing test for a spec, verifies it fails |
|
|
| `tdd_green` | Writes the minimal implementation to make tests pass |
|
|
| `tdd_refactor` | Cleans up implementation while keeping tests green |
|
|
| `session_log` | Appends a structured entry to the session JSONL log |
|
|
| `retrospective` | Reads the session log, identifies novel learnings, writes to brain/raw/ |
|
|
| `brain_query` | Full-text search over brain/wiki/ |
|
|
| `brain_write` | Writes a note to brain/raw/ (with optional YAML frontmatter) |
|
|
| `tier` | Returns the current connectivity tier (1=cloud, 2=LAN, 3=offline) |
|
|
|
|
## Start the servers
|
|
|
|
```bash
|
|
# Requires goreman: go install github.com/mattn/goreman@latest
|
|
task start # starts ingestion (:3300) + supervisor (:3200) via goreman
|
|
task stop # kills both by port
|
|
```
|
|
|
|
## Connect a project
|
|
|
|
Create `.mcp.json` in your project root:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supervisor": {
|
|
"type": "http",
|
|
"url": "http://koala:30320/mcp"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
The supervisor MCP server is reachable over Tailscale at `koala:30320` (NodePort
|
|
to the in-cluster service on port 3200). No local binary or stdio shim is
|
|
required — Claude Code talks to it directly via HTTP.
|
|
|
|
Open Claude Code in your project — run `/mcp` to confirm `supervisor` is listed.
|
|
|
|
## A typical TDD session
|
|
|
|
```
|
|
1. Call tdd_red → spec in, failing test file out
|
|
2. Call tdd_green → test path in, implementation out
|
|
3. Call tdd_refactor → impl + test in, cleaned code out
|
|
4. Call session_log → log each phase result
|
|
5. Call retrospective → extracts learnings → brain/raw/
|
|
6. Review brain/raw/, move worthy notes to brain/wiki/concepts/
|
|
7. Future sessions: call brain_query to retrieve relevant context
|
|
```
|
|
|
|
## Tier detection
|
|
|
|
The supervisor probes connectivity at call time:
|
|
|
|
| Tier | Label | Condition |
|
|
|------|-------|-----------|
|
|
| 1 | full-online | Can reach api.anthropic.com |
|
|
| 2 | lan-only | Can reach LiteLLM but not Anthropic |
|
|
| 3 | airplane | No external connectivity |
|
|
|
|
## Key env vars
|
|
|
|
| Variable | Default | Purpose |
|
|
|----------|---------|---------|
|
|
| `INGEST_BRAIN_DIR` | `../brain` | Brain directory for ingestion server |
|
|
| `INGEST_PORT` | `3300` | Ingestion server port |
|
|
| `SUPERVISOR_CONFIG_DIR` | `./config/supervisor` | Skill discipline files |
|
|
| `SUPERVISOR_SESSIONS_DIR` | `./brain/sessions` | JSONL session logs |
|
|
| `INGEST_BASE_URL` | `http://localhost:3300` | Supervisor → ingestion |
|
|
| `LITELLM_BASE_URL` | — | LiteLLM proxy for Tier 2 model routing |
|
|
|
|
## Phase 2 (planned)
|
|
|
|
- `review` skill — structured code review with iron law enforcement
|
|
- `debug` skill — hypothesis-driven debugging sessions
|
|
- `spec` skill — generates specs from conversations
|
|
- `trainer` — extracts SFT/DPO pairs from session logs for fine-tuning
|