Skip to main content
Glama

Project Christina: 自律型認知増幅器

Python 3.11+ License: MIT Dependencies Tests FastMCP Compliant Code Style: Ponytail Ultra

Host: Google Antigravity Host: OpenCode Host: Claude Desktop Host: OpenAI Codex CLI

クイックスタート • アーキテクチャ • MCPツール • CLIリファレンス • ドキュメント • コントリビューション


🌟 エグゼクティブ概要: コンテキスト腐敗の排除

現代のAIコーディングエージェントは、大規模コードベース($10\text{M}+$トークン)において、推論能力の限界ではなくコンテキスト腐敗によって失敗します。すなわち、注意の散逸、インデックス化されていないプロンプト汚染、コンテキスト消去をまたいだアーキテクチャ制約の喪失、そして調整されていないスウォーム衝突です。

Project Christina は、統合された高性能な認知トライアドによってこの問題を解決します:

  1. RLM(再帰言語モデル — 変数としてのコンテキスト): 大規模コードベースを会話プロンプトのトランスクリプトからサンドボックス化されたヒープ変数(context)へ移行します。エージェントは制限付きサブクエリ($D \le 2, N \le 20$)と、自動ロールバックを備えたトランザクショナルなコピーオンライト(CoW)Python制御ループを実行します。

  2. Graphify(決定論的CPG & ASTレーダー): インメモリSQLite3 WALコールグラフを構築し、0.3ms未満の再帰CTEクエリ、推移的ブラスト半径計算、および71.5倍のトークン発見削減を実現するGodノード中心性ランキングを提供します。

  3. OKF(永続的セマンティックメモリ & 認識論的進化): サブマイクロ秒の正規表現フロントマター解析($6.72\ \mu\text{s}$/ドキュメント)、形式AGM信念修正、エビングハウス減衰、および自動化された$\le 400$トークンの圧縮後メモリ回復アンカーを備えたMark-and-Sweep認識論的ガベージコレクションを提供します。

  4. クロスプロジェクト認識論的蒸留: 独自コードを数学的原型へ匿名化し、厳格なゼロ情報漏洩不変条件($\mathcal{I} = 0$)、マルチベースシャノンエントロピー秘密スクラビング、およびコードリポジトリ間のベイズ不変条件集約を実現します。

  5. スウォーム並行処理制御: Kung-Robinson楽観的並行処理制御(OCC)、Tree-CRDT 3ウェイASTマージ、およびLindaタプルスペースブラックボードを用いた分散型マルチエージェント実行。


Related MCP server: onto-agent

🏛️ 三本柱の認知アーキテクチャ

                                  ┌─────────────────────────────────────────┐
                                  │           SUPERVISOR / AGENT            │
                                  │  (Antigravity / OpenCode / Claude / AI) │
                                  └────────────────────┬────────────────────┘
                                                       │ JSON-RPC 2.0 (stdio)
                                                       ▼
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                            PROJECT CHRISTINA FAST-MCP GATEWAY                                     │
├──────────────────────────────────────┬────────────────────────────────────┬───────────────────────────────────────┤
│          PILLAR 1: RLM ENGINE        │       PILLAR 2: GRAPHIFY CPG       │        PILLAR 3: OKF MEMORY           │
│         (Context as Variable)        │          (AST Code Radar)          │         (Semantic Evolution)          │
├──────────────────────────────────────┼────────────────────────────────────┼───────────────────────────────────────┤
│ • Out-of-core Heap Variables         │ • In-Memory SQLite3 WAL Graph      │ • Sub-microsecond OKF Regex Parser    │
│ • Transactional CoW Rollback         │ • Sub-0.3ms Transitive Blast Query │ • Formal AGM Belief Revision          │
│ • 3-Phase EGRI Invariant Linter      │ • Composite God-Node Centrality    │ • Ebbinghaus Forgetting & GC          │
│ • Dynamic Governor (D<=2, N<=20)     │ • Circular Dependency & Wave Sort  │ • Symbol-to-ADR Constraints           │
└──────────────────────────────────────┴────────────────────────────────────┴───────────────────────────────────────┘
                                                       │
                                                       ▼
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                        DECENTRALIZED SWARM & DISTILLERY                                           │
├───────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────┤
│                    SWARM CONCURRENCY BLACKBOARD                   │         GLOBAL EPISTEMIC DISTILLERY           │
├───────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────┤
│ • Kung-Robinson Optimistic Concurrency Control (OCC)              │ • Zero-Information Leakage (I = 0)           │
│ • Semantic Tree-CRDT 3-Way AST Merge Resolution                   │ • Multi-Base Shannon Entropy Secret Redaction │
│ • Linda Tuple Space (`out`, `rd`, `in`, `eval`, `digest`)         │ • Bayesian Invariant Distillation (0700 Fence)│
└───────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────┘

Mermaidフローチャート

flowchart TD
    Host[Host Agent Context] -->|JSON-RPC 2.0 stdio| MCP[Christina FastMCP Server]
    
    subgraph Trinity["Autonomous Cognitive Trinity"]
        MCP -->|cpg_query| CPG[Graphify CPG Radar<br/><i>sub-0.3ms SQLite WAL</i>]
        MCP -->|rlm_execute| RLM[RLM Sandbox<br/><i>Transactional CoW REPL</i>]
        MCP -->|memory_evolve| OKF[OKF Semantic Memory<br/><i>AGM Revision & Epistemic GC</i>]
    end
    
    subgraph SwarmDistill["Swarm & Cross-Project Substrate"]
        MCP -->|swarm_blackboard| OCC[Swarm Concurrency<br/><i>Kung-Robinson OCC + Tree-CRDT</i>]
        OKF -->|distill_global| Distill[Global Epistemic Distillery<br/><i>Anonymized Archetypes (I=0)</i>]
    end

    CPG -.->|Blast Radius & Waves| OCC
    RLM -.->|Isolated Sub-Calls| Host
    OKF -.->|ADR Anchor <=400 Tokens| Host

🚀 1コマンド・ゼロフリクションインストール

Christinaは、バックグラウンドデーモン、ネイティブコンパイル、ルート権限を必要とせず、数秒でインストールできます:

cd christina
./install.sh

自動診断プリフライト

./install.sh doctor
================================================================
 Christina Cognitive Amplifier Diagnostics (v1.0.0)
================================================================
✓ Python Version: 3.11+ (Requirement satisfied)
✓ SQLite3 in-memory WAL Engine: Ready
✓ OKF Semantic Memory Engine: Ready
✓ Google Antigravity Plugin: Registered
✓ OpenCode Plugin: Registered
✓ Global memory directory: ~/.config/christina/global_memory (0700 fenced)
================================================================
✅ All systems functional.

完全テストスイートの実行(62/62パス、1.2秒未満)

./install.sh test
# Or with pytest directly:
pytest tests/ -v

🛠️ 標準FastMCPツールマトリックス

Christinaは、あらゆるMCPホストと互換性のある4つの統合JSON-RPC 2.0 stdioツールを公開します:

ツール

カテゴリ

主要機能とモード

パフォーマンス上限

cpg_query

ASTコードレーダー

blast_radius, def_use, cfg, vinterfaces, god_nodes, cycles, waves, info

インメモリ走査で$<0.3\text{ms}$

rlm_execute

サンドボックス実行

サブエージェントMapReduce、トランザクショナルCoW REPL、3フェーズEGRIリンティング、計算ガバナー

再帰上限$D \le 2, N \le 20$

memory_evolve

セマンティックメモリ

search, persist, revise(AGM), gc(エビングハウスMark-and-Sweep), distill_global, query_global

ドキュメント解析$6.72\ \mu\text{s}$/doc

swarm_blackboard

スウォーム並行処理

out, rd, in, eval, occ_validate(Kung-Robinson OCC), tree_merge(Tree-CRDT), digest

ロックフリー楽観的検証

MCPツール呼び出し

1. ブラスト半径分析(cpg_query)

{
  "name": "cpg_query",
  "arguments": {
    "symbol": "PaymentGateway",
    "mode": "blast_radius",
    "depth": 3
  }
}

2. トランザクショナルサブクエリ実行(rlm_execute)

{
  "name": "rlm_execute",
  "arguments": {
    "query": "Audit error recovery handling in database connection pool",
    "scope_paths": ["src/db/", "src/pools/"]
  }
}

3. シンボル制約付きセマンティックメモリ検索(memory_evolve)

{
  "name": "memory_evolve",
  "arguments": {
    "action": "search",
    "query": "zero-trust authentication policy",
    "linked_symbols": ["AuthMiddleware"]
  }
}

4. スウォームOCC競合検証(swarm_blackboard)

{
  "name": "swarm_blackboard",
  "arguments": {
    "action": "occ_validate",
    "worker_id": "worker_security_audit",
    "read_version": 4,
    "read_set": ["AuthMiddleware", "SessionToken"],
    "write_set": ["AuthMiddleware"]
  }
}

⚡ CLIクイックリファレンス

# 1. Scan codebase and index AST knowledge graph into in-memory SQLite3 WAL
python3 -m christina.cli scan .

# 2. Calculate static blast radius for a target symbol
python3 -m christina.cli blast AuthService --depth 3

# 3. List top God Nodes ranked by composite degree centrality
python3 -m christina.cli god-nodes --limit 10

# 4. Search OKF institutional memory, ADRs, and symbol constraints
python3 -m christina.cli memory "connection pool timeout" --symbol DatabasePool

# 5. Run FastMCP JSON-RPC 2.0 stdio server
python3 -m christina.cli serve

# 6. Execute system diagnostics
python3 -m christina.cli doctor

🔌 マルチホスト互換性とセットアップ

Christinaには、すべての標準AIエージェントホスト向けのシームレスな1コマンド登録が含まれています:

1. Google Antigravity CLI(agy)

~/.gemini/antigravity-cli/plugins/christina に自動的にシンボリックリンクされ、~/.gemini/antigravity-cli/mcp_config.json に登録されます。

2. OpenCode

~/.config/opencode/plugins/christina と ~/.config/opencode/opencode.json に自動的に登録されます。

3. Claude Desktop

~/.claude/claude_desktop_config.json(macOSでは Library/Application Support/Claude/claude_desktop_config.json)に自動的に設定されます:

{
  "mcpServers": {
    "christina": {
      "command": "python3",
      "args": ["-m", "christina.bridge.mcp_server"],
      "env": {
        "PYTHONPATH": "/path/to/christina"
      }
    }
  }
}

4. OpenAI Codex CLI

~/.config/codex/config.json に自動的に登録されます。


🪮 Ponytail Ultra: ゼロ依存性保証

Project Christinaは、Ponytail Ultra の規律のもとに厳格に設計されています:

  • ゼロ外部ランタイム依存性: Python標準ライブラリのみを使用(ast, sqlite3, re, json, hashlib, fcntl, math, pathlib, typing)。

  • ゼロヘビーデーモン: Docker、Neo4j、ChromaDB、Redisは不要。インメモリSQLite3 WALとPOSIXファイルロックにより、アイドル時バックグラウンドRAM $0\text{MB}$ でサブミリ秒の実行を実現。

  • 厳格なコード簡潔性: すべてのモジュールは簡潔($<250$ LOC)で、凝集的かつ自己完結的です。


📚 ドキュメントとガイド

ドキュメント

説明

はじめにガイド

ステップバイステップのセットアップ、検証、および最初のエージェントワークフロー。

スキル分類

プログレッシブディスクロージャースキル定義(cpg, rlm, memory, swarm)。

コントリビューションガイド

Ponytail Ultra開発ガイドライン、Nixセットアップ、テストスイート、ADRワークフロー。

セキュリティポリシー

ゼロ情報漏洩($\mathcal{I} = 0$)、シャノンエントロピー秘密スクラビング、および封じ込め。

変更履歴

詳細なリリースノートとバージョン履歴。


📜 ライセンス

Project Christinaは、オープンソースの**MITライセンス** のもとで配布されています。

Copyright (c) 2026 Christina Engineering Swarm & Contributors.

Available Tools

4 tools
cpg_queryC

CPG & AST radar: def-use chains, CFG, virtual interfaces, blast radius.

Inputs: code, mode, depth, symbol.

memory_evolveC

Semantic memory: AGM revision, GC, distill_global, query_global, search, persist.

Inputs: code, tags, query, title, +6 more.

rlm_executeC

Sandboxed RLM REPL executor with transactional CoW rollback, 3-phase EGRI linter, governor.

Inputs: code, query, scope_paths.

swarm_blackboardD

Swarm blackboard & OCC concurrency: Kung-Robinson OCC validation, Tree-CRDT 3-way merge, Linda tuple space.

Inputs: action, channel, payload, read_set, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a completely different subsystem: static code analysis, sandboxed execution, semantic memory, and concurrency/blackboard coordination. There is no overlap or plausible confusion between them.

    Naming Consistency4/5

    All tools follow a readable two-part snake_case format with domain-specific prefixes. However, the suffixes mix verbs (query, execute, evolve) with a noun (blackboard), creating a minor deviation from a fully uniform pattern.

    Tool Count5/5

    Four tools is a reasonable, focused count for a server whose scope appears to be a coordinated agent runtime: analyze, execute, remember, and coordinate. Each tool earns its place and none feel redundant.

    Completeness4/5

    The tool surface covers the major capabilities one would expect from this kind of system: code understanding, safe execution, memory persistence, and shared-state coordination. There are minor gaps such as explicit file/API interaction, but the broad sub-operations embedded in each tool make the overall surface feel fairly complete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to query and analyze code across multiple repositories through a unified knowledge graph, with tools for symbol search, impact analysis, and graph algorithms.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides AI coding agents with an embedded knowledge graph and architecture governance tools, enabling blast radius analysis, compliance checks, and smart context extraction from codebases.
      Apache 2.0
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables developer agents to perform semantic codebase search, dependency and impact analysis, cross-file refactoring, and full-stack API tracing through a unified query DSL over a high-performance graph engine.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides persistent cross-session AI memory, code graph analysis, and subagent context compression so coding agents can resume work instantly and avoid re-reading the codebase.
      Elastic 2.0