Repository navigation
Update 11:27 9/4/2026
Nội dung bản cập nhật
Bản phát hành này bổ sung 4 trụ cột công nghệ cốt lõi phục vụ nén cấu trúc mã nguồn, lập chỉ mục biểu tượng hiệu năng cao, phân tích lan truyền thay đổi và tự động hóa chưng cất lỗi:
Các tính năng chính
-
Semantic Code Skeletonizer & Focus-Symbol Mode (
src/cookiegli_core/skeletonizer.py):- Gấp gọn thân hàm theo khoảng dòng thực tế giữ nguyên cấu trúc lớp, chữ ký hàm, decorators và type annotations.
- Chế độ Focus-Symbol giữ nguyên 100% thân hàm cần chỉnh sửa và rút gọn các thành phần còn lại.
- Hỗ trợ Python AST và đa ngôn ngữ (TypeScript, Go, Rust, Java, C#, C++).
- Cắt giảm từ 75% đến 92% lượng token tiêu thụ khi đọc mã nguồn lớn.
-
Chỉ mục biểu tượng B-Tree trong SQLite WAL (
src/cookiegli_core/cache_db.py):- Lưu trữ vị trí định nghĩa, chữ ký và tài liệu với chỉ mục B-Tree NOCASE trên
simple_namevàname. - Độ trễ tra cứu đạt trung bình 0,0645 ms/truy vấn, thông lượng hơn 15.400 truy vấn/giây.
- Tự động nhận diện thư mục nguồn (
src/,lib/,packages/) để phân loại import chính xác.
- Lưu trữ vị trí định nghĩa, chữ ký và tài liệu với chỉ mục B-Tree NOCASE trên
-
Git Blast Radius & Khoanh vùng kiểm thử (
src/cookiegli_core/blast_radius.py):- Đảo ngược đồ thị phụ thuộc để xác định các thành phần bị ảnh hưởng trực tiếp và gián tiếp khi có git diff.
- Đề xuất đúng bộ test suite tối thiểu cần chạy, giảm 80% log kiểm thử thừa vào ngữ cảnh.
-
Chưng cất lỗi tự động & Darwin Memory (
src/cookiegli_core/distiller.py):- Bóc tách traceback 3 tầng từ Python (unittest, pytest), Node/Jest, Go và Rust.
- Nhận diện mẫu sửa lỗi từ git diff để tổng hợp thành bài học kinh nghiệm có tính điểm Bayesian và tự động khôi phục quy tắc cũ nếu lỗi tái diễn.
-
Mở rộng CLI & Giao thức MCP Server:
- Bổ sung các lệnh:
cookiegli skeleton,cookiegli symbol,cookiegli blast,cookiegli distill. - Cung cấp 4 công cụ MCP mới:
cookiegli_get_skeleton,cookiegli_find_symbols,cookiegli_blast_radius,cookiegli_distill_lesson.
- Bổ sung các lệnh:
Số liệu kiểm định thực nghiệm
- Kiểm thử tự động: 118/118 bài test vượt qua thành công (100% PASS), 0 lỗi hồi quy.
- Nén ngữ cảnh thực tế: Giảm từ 37.861 tokens xuống 3.418 tokens (giảm 91,0% toàn tệp và 82,3% ở chế độ Focus).
- Độ trễ tra cứu: 0,0645 ms/lượt tra cứu B-Tree.
- An toàn tài nguyên: Quản lý vòng đời tài nguyên qua context manager, giải phóng hoàn toàn file handles trên Windows.
- Thư viện phụ thuộc: 0 phụ thuộc ngoài (thuần Python stdlib từ Python 3.9 trở lên).
What's Changed
This release introduces four core capabilities focused on semantic context compression, sub-millisecond symbol indexing, dependency-aware test targeting, and automated error distillation.
Core Capabilities
-
Semantic Code Skeletonizer & Focus-Symbol Mode (
src/cookiegli_core/skeletonizer.py)- AST-driven code folding preserving module docstrings, class hierarchies, method signatures, decorators, dataclass fields, and type annotations while collapsing function bodies to line ranges (
... [L{start}-L{end}]). - Focus-Symbol Mode: preserves 100% verbatim implementation of targeted symbols while compacting surrounding code.
- 4-tier token budget degradation ensuring strict compliance with token limits.
- Multi-language support: Python, TypeScript, JavaScript, Go, Rust, Java, C#, C++.
- AST-driven code folding preserving module docstrings, class hierarchies, method signatures, decorators, dataclass fields, and type annotations while collapsing function bodies to line ranges (
-
Inverted B-Tree Symbol Index (
src/cookiegli_core/cache_db.py,src/cookiegli_core/ast_scanner.py)- High-performance SQLite WAL table
symbol_cachewith case-insensitive B-Tree indexes onsimple_nameandname. - Sub-millisecond lookup latency (average 0.0645 ms per query, 15,400+ QPS).
- Multi-source root resolution (
src/,lib/,app/,packages/) for precise internal vs. external dependency classification.
- High-performance SQLite WAL table
-
Git Blast Radius & Surgical Test Targeting (
src/cookiegli_core/blast_radius.py)- Forward-to-ingress dependency graph inversion to determine direct and transitive consumers of modified files.
- Automatic change detection via
git status --porcelainwith fallback to SQLite cachemtimecomparison. - Surgical test suite targeting: maps modified modules directly to relevant test files, reducing test log noise by ~80%.
-
Autonomous Error & Traceback Distiller (
src/cookiegli_core/distiller.py)- 3-tier traceback parser supporting Python (
unittest,pytest,Traceback), Node.js/Jest, Go, and Rust. - Automated diff pattern recognition (null guards, fallbacks, path normalization, boundary checks) to synthesize actionable Darwin rules with Laplace Bayesian priors.
- Deduplication and automatic resurrection of pruned rules upon bug recurrence.
- 3-tier traceback parser supporting Python (
-
Expanded CLI & Model Context Protocol (MCP) Server
- Added CLI subcommands:
skeleton,symbol,blast,distill. - Added MCP tools:
cookiegli_get_skeleton,cookiegli_find_symbols,cookiegli_blast_radius,cookiegli_distill_lesson.
- Added CLI subcommands:
Verification & Empirical Benchmarks
- Test Suite: 118/118 automated tests passing (100% PASS) with zero regressions in 1.14s.
- Token Reduction: 91.0% aggregate token reduction on core codebase (37,861 raw tokens down to 3,418 skeleton tokens; 82.3% in focus-symbol mode).
- Symbol Seek Speed: 1,000 queries in 64.54 ms (average 0.0645 ms/lookup).
- Resource Safety: Comprehensive context manager adoption across all engines ensuring atomic release of SQLite WAL handles and zero Windows file lock contention (
WinError 32). - Dependencies: 0 external packages (100% Python standard library).
Commits
33ff14a: feat: core capabilities upgrade - symbol index, skeletonizer, blast radius, error distiller6a675a6: docs: update README with new core capabilities and grounded developer tone