5-layer hybrid context delivery system for AI coding assistants.
Project description
CONTEXTCORE
AST-first context infrastructure for AI coding workflows.
CONTEXTCORE converts raw source trees into compact, structurally meaningful context so assistants receive less noise and more relevant signals.
Highlights
- v1 sealed: 11.38x compression, 100% eval accuracy
- v2 sealed: gate passed (10/10 subgraph accuracy, 10.8ms avg latency, 577 avg tokens)
- v3 sealed: intent routing + v3 gate + v3 integration coverage passing
- v4 sealed: RBAC + freshness gate, v4 integration, and external dogfood validation passing
- local-first by design: source code stays on your machine
Current status
| Track | Status |
|---|---|
| v1 | SEALED (tag: v1.0) |
| v2 | SEALED (tag: v2.0) |
| v3 | SEALED (intent routing + v3 gate + v3 integration) |
| v4 | SEALED (RBAC + freshness gate + v4 integration + external dogfood evidence) |
| Active suite | 124 passed, 1 skipped, 0 failed |
| Gate suite | 14 passed, 0 skipped, 0 failed |
Why this exists
Raw file dumps are expensive and low-signal for assistants. CONTEXTCORE enforces a layered pipeline to deliver smaller, task-relevant context with measurable quality gates.
Layer Status
- L1 Static Analysis (AST): SEALED
- L4 Dependency Graph (SQLite): SEALED
- L5 Compression Emitter (Structured Markdown): SEALED
- L3 Intent Engine (task routing): SEALED
- L2 Temporal/Freshness: Implemented staleness/freshness validation and reporting; full temporal decision graph expansion is future work.
Proven results
v4 seal (sealed)
| Metric | Result | Target |
|---|---|---|
| RBAC correctness | 0 leaks across developer/auditor/maintainer | 0 unauthorized nodes |
| Freshness correctness | stale labeling PASS, 0 false positives, reindex clears PASS | PASS |
| External validation | scrapy dogfood run archived on 445 Python files | 200-500 file real project |
v1 gate (sealed)
| Metric | Result | Target |
|---|---|---|
| Compression ratio | 11.38x | >5x |
| Accuracy on eval set | 10/10 (100%) | >=80% |
| Parse failures | 0/20 files | 0 |
v2 gate (sealed)
| Metric | Result | Target |
|---|---|---|
| Subgraph accuracy | 10/10 | >=8/10 |
| Average latency | 10.8ms | <=500ms |
| Average tokens | 577 | <=600 |
Quick start
pip install -e ".[dev]"
python tests/run_all.py
python tests/run_all.py --gate
CLI usage
contextcore index ./sample_project
contextcore status
contextcore query "where does token counting happen"
contextcore diff
Documentation map
- PROJECT.md: roadmap and version dashboards
- CONTEXT.md: session log and benchmark tracker
- DECISIONS.md: architecture decisions (ADRs)
- tests/TEST_MANIFEST.md: test inventory and gate map
- .contextcore/context_snapshot.md: current execution snapshot
- CLAUDE.md: operational rules used during implementation
Safety and privacy
- local processing only
- no source-code telemetry
- no external API calls with source code content
License
MIT (see LICENSE)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextcore_ai_toolkit-4.0.0.tar.gz.
File metadata
- Download URL: contextcore_ai_toolkit-4.0.0.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b1f0b8191ae13a6357facb62620e67e7d3c1e71dd995befdcc9bd07c7992364
|
|
| MD5 |
a26263d6e3f95236d40a174269684a0d
|
|
| BLAKE2b-256 |
ac096e00ffe4b07d808884ba55e37576c098fdff7cc4ca9443e19931611ed0a6
|
File details
Details for the file contextcore_ai_toolkit-4.0.0-py3-none-any.whl.
File metadata
- Download URL: contextcore_ai_toolkit-4.0.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5204573ad14c3136c1f4c66d99c9beb255d0dcb2de59733d0555aa599cad2cdd
|
|
| MD5 |
3a70902e74261104012ad80117482334
|
|
| BLAKE2b-256 |
f381a3e7f5a5de74924c2d51d9af73597cadd9b4fe2d76cb33a59249739c4a8a
|