{"id":50879473,"url":"https://github.com/cdeust/ai-architect-mcp","last_synced_at":"2026-06-15T12:31:13.093Z","repository":{"id":349862415,"uuid":"1181974716","full_name":"cdeust/ai-architect-mcp","owner":"cdeust","description":"Autonomous software engineering pipeline for Claude Code: 11 stages, 64 verification rules, 17 codebase intelligence tools, 5 science-backed git analytics. Findings → PRD → verified PR with zero LLM judges.","archived":false,"fork":false,"pushed_at":"2026-04-27T12:27:40.000Z","size":1395,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T14:24:18.266Z","etag":null,"topics":["anthropic","autonomous-agents","claude-code","code-analysis","codebase-intelligence","dead-code-detection","git-analytics","graph-analysis","mcp","mcp-server","pipeline-as-code","prd-generation","pydantic","software-engineering","tree-sitter"],"latest_commit_sha":null,"homepage":"https://ai-architect.tools","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdeust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T21:54:12.000Z","updated_at":"2026-04-27T12:27:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cdeust/ai-architect-mcp","commit_stats":null,"previous_names":["cdeust/ai-architect-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdeust/ai-architect-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeust%2Fai-architect-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeust%2Fai-architect-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeust%2Fai-architect-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeust%2Fai-architect-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdeust","download_url":"https://codeload.github.com/cdeust/ai-architect-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeust%2Fai-architect-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34363537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","autonomous-agents","claude-code","code-analysis","codebase-intelligence","dead-code-detection","git-analytics","graph-analysis","mcp","mcp-server","pipeline-as-code","prd-generation","pydantic","software-engineering","tree-sitter"],"created_at":"2026-06-15T12:31:12.018Z","updated_at":"2026-06-15T12:31:12.962Z","avatar_url":"https://github.com/cdeust.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Architect\n\n\u003e **Findings → PRD → verified PR.** An autonomous software-engineering pipeline for Claude Code that runs on real evidence: 17 codebase intelligence tools, 5 science-backed git analytics, 64 deterministic verification rules, and zero LLM-judges-LLM. Every claim traces to a paper. Every PR passes its own gates.\n\n```bash\n/plugin marketplace add cdeust/ai-architect-mcp\n/plugin install ai-architect\n```\n\nThen run `/ai-architect:run-pipeline` from any project. Open source. MIT licensed.\n\n[![Tests](https://img.shields.io/badge/tests-544%20passing-brightgreen.svg)](#tests)\n[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io)\n\n---\n\n## What you get\n\nThree MCP servers, one pipeline, one philosophy.\n\n### `ai-architect` — pipeline orchestration (49 MCP tools)\n\n- **11 stages, 0–10**: health → discovery → impact → integration → PRD → interview → review → implementation → verification → benchmark → PR\n- **64 deterministic HOR rules** across 10 categories (structural, security, resilience, observability, …)\n- **5 verification algorithms** — Chain of Verification, KS Adaptive Stability, Multi-Agent Debate, NLI Entailment, Zero-LLM Graph Verification\n- **5 prompting algorithms** — TRM Self-Refine, Adaptive Expansion (ToT/GoT), Metacognitive Monitor, Signal-Aware Thought Buffer, Collaborative Inference\n- **10-dimension Plan Interview gate** — deterministic PRD quality check with zero LLM calls\n\n### `ai-codebase-intelligence` — typed graph engine (17 MCP tools)\n\n- **Tree-sitter parsing** for 13 languages (Python, TS, Swift, Go, Rust, Java, Kotlin, C#, Ruby, PHP, C, C++, JavaScript)\n- **Typed Pydantic API** — `GraphNode`, `GraphRelationship`, 29 node labels, 19 relationship types, no raw dicts\n- **Hybrid search** — BM25 full-text + Reciprocal Rank Fusion + process-aware ranking\n- **5 science-backed git analytics**:\n\n  | Tool | Paper | What it does |\n  |---|---|---|\n  | `ownership` | Bird et al. 2011 (ESEC/FSE) | per-file ownership ratio + minor contributor count |\n  | `bus_factor` | Avelino et al. 2016 (ICPC) | iterative top-contributor removal until orphan threshold |\n  | `churn` | Nagappan \u0026 Ball 2005 (ICSE) | relative code churn metrics, defect predictor |\n  | `cochange` | Gall 1998 + Zimmermann 2005 | hidden coupling via association rule mining on commits |\n  | `dead_code` | Grove 1997 + Tip 1999 | conservative CHA-based reachability with confidence levels |\n\n### `cortex` (optional) — persistent cognitive memory\n\nRecall past findings before each pipeline run. Remember decisions after. The pipeline learns across sessions instead of starting fresh every time. See [Cortex](https://github.com/cdeust/cortex).\n\n---\n\n## 30-second start\n\n```bash\ngit clone https://github.com/cdeust/ai-architect-mcp.git\ncd ai-architect-mcp\n./scripts/setup.sh\n```\n\nThat installs both MCP servers, symlinks the 13 stage skills into `~/.claude/skills/`, and registers the slash commands. Restart Claude Code, then:\n\n```\n/ai-architect:run-pipeline\n```\n\nThat's it. The pipeline detects findings, scores them, generates PRDs, implements them, verifies, and opens PRs.\n\n---\n\n## Real example — verified end-to-end\n\nThis repo dogfoods itself. PR [#2](https://github.com/cdeust/ai-architect-mcp/pull/2) was produced entirely through MCP tools:\n\n| Stage | Tool | Result |\n|---|---|---|\n| 1. Discovery | `ai_architect_codebase_query(\"generator\")` | Found `core/wiki/generator.py` (355 lines, violates 300 limit) |\n| 2. Score | `ai_architect_compound_score` | **0.735** (relevance 0.95, uniqueness 0.4, impact 0.6, confidence 0.95) |\n| 3. Verify | `ai_architect_run_hor_rules` | **61/64 passed**, adjusted_score **0.75** |\n| 4. Recall | `cortex:recall` | No prior fix on this file — proceed |\n| 5. Decide | `ai_architect_emit_ooda_checkpoint(phase=decide)` | PROCEED |\n| 6. Implement | manual edit → `phases.py` extracted | 7 functions extracted, 211+278 lines |\n| 7. Test | `pytest tests/unit/` | **544/544 passing** |\n| 8. Branch + commit + push + PR | `gh pr create` | [PR #2](https://github.com/cdeust/ai-architect-mcp/pull/2) green ✓ |\n| 9. Remember | `cortex:remember` | memory persisted for next session |\n\nCI runs the same 544-test suite on every PR. **No PR ships without green tests.**\n\n---\n\n## How it works\n\n```\nFindings (research papers, bug reports, ideas)\n   │\n   ▼\nStage 0  Health        Validate all 49 + 17 MCP tools\nStage 1  Discovery     Query codebase intelligence + churn/cochange + cortex recall\nStage 2  Impact        Compound scoring + ownership + bus_factor risk\nStage 3  Integration   Cochange coupling + dead_code cleanup + port design\nStage 4  PRD           Generate via ai-prd-generator (delegated)\nStage 4.5 Interview    10-dimension deterministic gate\nStage 5  Review        7 verification algorithms, loop on score \u003c 0.85\nStage 6  Implementation One worker per file, dependency-ordered\nStage 7  Verification  64 HOR rules + build gate, loop on failure\nStage 8  Benchmark     Performance gates from prd-tests.md\nStage 9  Deployment    Full test suite, zero failures required\nStage 10 PR            Push, open PR with audit trail, save lessons to cortex\n```\n\nThree layers, strictly separated:\n\n- **Skills** (`skills/*/SKILL.md`) define **WHAT** each stage does. Markdown only, zero code.\n- **Tools** (`mcp/`, `ai-codebase-intelligence/`) define **HOW**. Python only, zero markdown logic.\n- **Claude** decides **WHY**. Reads the skill, calls tools, evaluates output, retries or proceeds.\n\n---\n\n## Installation\n\n### Plugin (Claude Code)\n\n```\n/plugin marketplace add cdeust/ai-architect-mcp\n/plugin install ai-architect\n```\n\n### Manual (Claude Code, Cursor, VS Code, Claude Desktop)\n\n```bash\ngit clone https://github.com/cdeust/ai-architect-mcp.git\ncd ai-architect-mcp\n./scripts/setup.sh\n```\n\n`setup.sh` installs both MCP servers via `pip install -e`, symlinks all stage skills into `~/.claude/skills/`, and writes the slash commands. Restart your editor.\n\n### Claude Desktop config\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-architect\": { \"command\": \"ai_architect_mcp\" },\n    \"codebase-intelligence\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"ai_codebase_intelligence\"]\n    }\n  }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eConfig file location\u003c/summary\u003e\n\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n\u003c/details\u003e\n\n---\n\n## Usage\n\n### Slash commands\n\n| Command | What it does |\n|---|---|\n| `/ai-architect:run-pipeline` | Full 11-stage pipeline — findings to pull requests |\n| `/ai-architect:generate-prd` | Generate a 9-file PRD package with verification |\n| `/ai-architect:verify-architecture` | Run 64 HOR rules on your codebase |\n| `/ai-architect:check-status` | Check pipeline state, active finding, retry counts |\n\n### Direct tool calls\n\nThe MCP tools are discoverable from any Claude Code session. No slash command needed for one-off use:\n\n```\nUse ai_architect_codebase_query to find the OrchestrationEngine class\nUse ai_architect_codebase_dead_code with min_confidence 0.9\nUse ai_architect_run_hor_rules on this PRD\nUse ai_architect_compound_score with relevance 0.8 uniqueness 0.6 impact 0.7 confidence 0.85\n```\n\n### Index a codebase\n\n```\nai_architect_codebase_analyze --repo-path /path/to/your/repo\n```\n\nThis runs the 6-phase ingestion (scan → structure → parse → resolve → community → process) and persists everything to `~/.codebase-intelligence/registry.json`. Subsequent queries are instant.\n\n---\n\n## Architecture principles\n\n1. **Skills define WHAT. Tools define HOW. Claude decides WHY.** Never mix layers.\n2. **The model generates. The system verifies.** No LLM judges LLM output. Stage 7 is fully deterministic.\n3. **Adapters implement Ports.** No hardcoded infrastructure calls in stage logic.\n4. **Context flows forward, never backward.** Each stage reads upstream, writes to its own slot.\n5. **Every algorithm traces to a paper.** No invented constants. No \"industry common sense.\"\n6. **Full engine on every run.** No license gates, no tier checks, no feature flags.\n\n---\n\n## Tests\n\n```bash\ncd ai-codebase-intelligence\nPYTHONPATH=src python3 -m pytest tests/unit/ -q\n# 544 passed in ~6s\n```\n\nThe CI workflow at `.github/workflows/test.yml` runs this on every PR plus a 300-line file-size guard. No PR merges without both checks green.\n\n---\n\n## Project structure\n\n```\nai-architect-mcp/\n├── README.md\n├── CLAUDE.md                     # Project instructions for Claude\n├── .github/workflows/test.yml    # CI: 544 tests + file-size guard\n├── .mcp.json                     # MCP server auto-discovery\n├── commands/                     # Slash commands (4)\n├── skills/                       # Stage skills (13 — orchestrator + 12 stages)\n│   ├── orchestrator/SKILL.md\n│   ├── stage-0-health/SKILL.md\n│   ├── stage-1-discovery/SKILL.md\n│   └── …\n├── mcp/                          # ai-architect MCP server (49 tools)\n│   ├── ai_architect_mcp/\n│   │   ├── _tools/               # Tool definitions\n│   │   ├── _verification/        # 64 HOR rules + 5 verification algorithms\n│   │   ├── _prompting/           # 5 prompting algorithms\n│   │   ├── _interview/           # 10 dimension scorers\n│   │   ├── _adapters/            # Git, fs, xcode ports\n│   │   └── server.py\n│   └── pyproject.toml\n├── ai-codebase-intelligence/     # codebase-intelligence MCP server (17 tools)\n│   ├── src/ai_codebase_intelligence/\n│   │   ├── _models/              # Typed Pydantic graph models\n│   │   ├── _analysis/            # Community + process detection\n│   │   ├── _extraction/          # Call routing, heritage, type extractors\n│   │   ├── _resolution/          # Per-language import resolvers\n│   │   ├── _search/              # BM25 + RRF hybrid search\n│   │   ├── _wiki/                # LLM-driven wiki generator\n│   │   └── core/\n│   │       ├── ingestion/        # 6-phase pipeline (incl. ownership, cochange)\n│   │       ├── analysis/         # Bus factor, churn, dead code\n│   │       └── storage/          # SQLite + in-memory graph index\n│   └── tests/unit/               # 544 tests\n└── scripts/setup.sh              # One-command install\n```\n\n---\n\n## System requirements\n\n- Python 3.12+\n- Git\n- Claude Code, Cursor, VS Code, or Claude Desktop with MCP support\n\n---\n\n## Part of a bigger system\n\n- **PRD generation** is delegated to [ai-prd-generator](https://github.com/cdeust/ai-prd-generator-plugin) — same author, same methodology, free.\n- **Cognitive memory** is delegated to [Cortex](https://github.com/cdeust/cortex) — persistent learning across sessions.\n- **Specialized agents** are available via [zetetic-team-subagents](https://github.com/cdeust/zetetic-team-subagents) — orchestrator, engineer, code-reviewer, test-engineer, etc.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n---\n\n## Troubleshooting\n\n**Commands not found** — Run `./scripts/setup.sh` again. Check that `~/.claude/skills/orchestrator/` exists and is a symlink.\n\n**MCP server not connecting** — Verify Python 3.12+ is installed. Run `python3 -m ai_architect_mcp.server` to test directly. For codebase intelligence: `python3 -m ai_codebase_intelligence`.\n\n**Tests failing locally** — Run `cd ai-codebase-intelligence \u0026\u0026 PYTHONPATH=src python3 -m pytest tests/unit/ -x -v` for verbose output.\n\n**MCP daemon caches stale state after `analyze`** — Restart Claude Code after the first index of a new repo. The daemon re-reads the registry on startup.\n\n---\n\nBuilt by [Clement Deust](https://ai-architect.tools) — methodology over tooling. The pipeline is the vehicle, the verification is the value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeust%2Fai-architect-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdeust%2Fai-architect-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeust%2Fai-architect-mcp/lists"}