Repository navigation
CookieGli Update β Two-Tier Context Boost Engine, SQLite FTS5 BM25+ & Unified CookieGli_Full MCP
CookieGli v3.0 is a major architectural milestone designed specifically for the 2026 generation of frontier reasoning models (OpenAI GPT-6 Astra & GPT-5.6 Sol, Anthropic Claude opus 5 & Claude Fable 5.1, Google Gemini 3.8 Flash, Moonshot Kimi K3, and DeepSeek-V4).
This release introduces the Unified CookieGli_Full MCP Server with an intelligent Agent Disambiguation Matrix, a Two-Tier Context Engine, industrial SQLite FTS5 BM25+ full-text retrieval, automated Reasoning Calibration, and strict Token-0 Byte-Stability to lock in 90% prompt caching discounts.
π What's New in Update
1. Unified CookieGli_Full MCP Server & Agent Disambiguation Matrix
- All-in-One Server Entrypoint: Consolidates all CookieGli capabilities into a single MCP server profile (
CookieGli_Full) while maintaining 100% backward compatibility with existing granular tools. - Categorized Tool Prefixes: Eliminates tool overlap and confusion across frontier models by explicitly categorizing tool schemas:
[01_TASK_BOOST] cookiegli_boost: Primary entrypoint for any coding or debugging task.[02_SYMBOL_IR] cookiegli_search: Industrial Okapi BM25+ ranked full-text search across symbols.[02_SYMBOL_BTREE] cookiegli_find_symbols: Sub-millisecond exact B-Tree symbol lookup for known identifiers.[03_CODE_SKELETON] cookiegli_get_skeleton: Structural code folding preserving focused functions verbatim.[04_IMPACT_ANALYSIS] cookiegli_blast_radius: Forward-to-ingress dependency graph & minimal targeted test suite.[05_ERROR_DISTILLER] cookiegli_distill_lesson: Traceback bisection into Darwin learned patterns with Bayesian ROI.[06_ARCHITECTURE] cookiegli_get_genome: High-density Layer 1 static codebase topology (<600 tokens).[07_DARWIN_MEMORY] cookiegli_darwin_record / _search: Bayesian operational pattern persistence.[08_TARGET_SYNC] cookiegli_sync: Automated multi-target rule synchronization.
- Polymorphic Gateway Tool (
cookiegli_full): A centralized dispatcher tool accepting{action, params}with support for action aliases, JSON-stringified argument auto-parsing, and safe fallback handling. - Embedded Agent Guide (
mcp://cookiegli/guide): Implemented native MCP Resource protocol (resources/listandresources/read) delivering the complete Agent Decision Tree directly into the AI agent's system prompt upon connection.
2. Two-Tier Context Boost Engine (/boost)
- Layer 1: Static Architectural Anchor (<600 tokens): Placed permanently at Token 0 of
CLAUDE.md,AGENTS.md, and.cursorrules. Stripped of dynamic timestamps and in-file floating-point telemetry to maintain byte-identical prefixes, activating 90% Prompt Cache Read Discounts. - Layer 2: Dynamic Task Tail (<600 tokens): Synthesized on-demand via
cookiegli boost "<task>". Combines FTS5 BM25+ symbol ranking, surgical code skeletonization, and blast radius targeted testing. Includes an automatic markdown code fence balance algorithm to guarantee valid markdown syntax under strict token budgets.
3. Hybrid Retrieval (SQLite FTS5 BM25+ & 3 SQLite Triggers)
- Virtual table
symbol_ftspowered by SQLite FTS5 (unicode61 remove_diacritics 2). - 3 automated triggers (
trig_symbol_cache_ai,trig_symbol_cache_ad,trig_symbol_cache_au) guarantee 100% two-way data integrity between the primary symbol cache and the full-text search index. - Industrial-grade Okapi BM25 ranking (
<0.5ms) with automatic search token deduplication, 1-character token filtering, and graceful fallback to B-Tree search if FTS5 is absent.
4. 2026 Frontier Reasoning Calibration
- Automatically calibrates
effort=low/medium/highbased on graph traversalblast_depth:- Depth 0β1 (Low): Constrains thinking token budgets for GPT-6 Astra, GPT-5.6 Sol, Claude Opus 5, and Gemini 3.7 Flash to eliminate unnecessary surcharge on output tokens ($15β$50/M).
- Depth 2 (Medium): Balanced thinking budget for multi-caller changes.
-
Depth
$\ge 3$ (High): Deep reasoning allocation for complex architectural refactors.
5. Token-0 Cache Invariant & Idempotent File Write Guard
- Eliminated dynamic ISO timestamps from the first line of generated genomes (
# PROJECT GENOME | id:<hash>). - Decoupled floating-point Bayesian ROI telemetry
(ROI: ..., SR: ...)into.cookiegli/darwin_state.json. - Added idempotent write guards in adapters: compares existing content before writing, preserving file
mtimeand preventing unnecessary prefix cache invalidations.
β‘ Quick Start
CLI Usage
# Clone and enter repository
git clone https://github.com/LoveCookieee-java/CookieGli.git
cd CookieGli
# One-command project initialization (Layer 1 static anchor)
python cli/cookiegli.py boost --init
# On-demand task context synthesis (Layer 2 dynamic tail <600 tokens)
python cli/cookiegli.py boost "Fix cache miss on relative path in AstCache"
# Fast BM25 full-text symbol search
python cli/cookiegli.py search "AstCache"