CONTEXT v15 — Cognitive Order Normalized in Transformer EXtract Truncate
GitHub: ktg-one/context Tagline: “You are not saving text. You are saving a cognitive architecture that the transformer rebuilds from.” Production testing: 19 months at ktg.one
Context windows are finite. Platform compaction is lossy. Cross-model handoffs lose critical relationships. CONTEXT creates carry-packets — compressed cognitive architecture structured to match transformer attention patterns.
The Core Insight
When a fresh LLM instance loads a carry packet, the PDL layers reconstruct the same attention patterns in the new context window. You’re not saving text — you’re saving a cognitive architecture that the transformer can rebuild from.
Core Components
Progressive Density Layering (PDL) — 4-Layer Hierarchy
Each layer maps to a specific transformer attention mechanism:
| Layer | Name | Transformer Targeting | Function |
|---|---|---|---|
| L1 | 核心 (Core) | Entity recognition heads | Entities, decisions, state |
| L2 | 関係 (Relational) | Relational attention patterns | Edges, threads, blockers |
| L3 | 文脈 (Contextual) | Contextual inference shaping | Rejections, constraints |
| L4 | 認知 (Meta) | Behavioral prior calibration | Style, tension, confidence |
Multi-Layer Density of Experts (MLDoE)
4 Chain of Density iterations, each through a specialist lens targeting a specific attention layer:
| Expert | Role |
|---|---|
| MEMORY_ARCHITECT 記憶設計者 | L1 Core — entity recognition |
| CROSS_DOMAIN_ANALYST 横断分析者 | L2 Edges — relational patterns |
| COMPRESSION_SPECIALIST 圧縮専門家 | L3 Context — inference shaping |
| RESTORATION_ENGINEER 復元技師 | L4 Meta — behavioral calibration |
| COHERENCE_AUDITOR 整合性監査者 | NCL validation overlay |
| SELF_AUDIT | Model step-back assessment |
Three Transformer Exploits
- Attention Amplification (S2A) — System 2 Attention strips noise BEFORE compression. Noise tokens occupy positive attention weight subtracted from signal.
- Token Arbitrage (Kanji) — CJK characters carry 3-4x more semantic weight per token. Kanji isn’t decoration — it exploits tokenizer ratios.
- Scaffold Reconstruction (PDL) — L1-L4 layers anchor into corresponding attention mechanisms in the new instance.
Unified Pipeline
S2A (denoise) → MLDoE (4x CoD through expert lenses → 4 PDL layers → 4 attention layers) → NCL (validate)
Negentropic Coherence Lattice (NCL)
7 drift metrics that catch hallucination, constraint drift, and reality disconnect before handoff.
Benchmarks
| Metric | Result |
|---|---|
| Density | ~0.15 ent/tok (0.20+ with kanji) |
| Compression | 6:1, >90% semantic fidelity |
| Forensic recall | 9.5/10 |
| Cross-domain preservation | 97% |
| Model acceptance | 97% cross-model |
Installation
# Claude Desktop / Claude Code
npx ai-agent-skills install ktg-one/context
# Manual: clone repo, upload .md files to project/contextCommands
| Trigger | Action |
|---|---|
/context /quicksave /qs /save | Generate validated packet |
/verify | Confirm packet restoration |
| Context >=80% | Auto-prompt to save |
| Model switching | Generate transfer packet |
Packet Format
Packets use YAML with kanji-compressed keys and 4-layer structure:
# L1: 核心 (core — entities + decisions)
実体: [files/systems + state]
決定事項: [decisions with rationale]
# L2: 関係 (relational — edges + threads)
橋渡し: [concept connections]
進行中: [active threads]
障害: [blockers]
# L3: 文脈 (contextual — rejections + constraints)
却下案: [rejected options]
制約: [constraints]
# L4: 認知 (meta — behavioral calibration)
meta:
session_style: "..."
confidence: [0-1]
user_waiting_for: "..."Packet Storage
Set CONTEXT_PACKET_DIR in your agent’s custom instructions or environment. Packets saved as MMDDYYYY-MODEL-Rscore/10-domain-topic.md.
Model codes: COP (Claude Opus), CSO (Claude Sonnet), CHK (Claude Haiku), G4O (GPT-4o), GP5 (GPT-5), GE2 (Gemini 2), G25 (Gemini 2.5), QWM (Qwen), DSV (DeepSeek), GRK (Grok).