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:

LayerNameTransformer TargetingFunction
L1核心 (Core)Entity recognition headsEntities, decisions, state
L2関係 (Relational)Relational attention patternsEdges, threads, blockers
L3文脈 (Contextual)Contextual inference shapingRejections, constraints
L4認知 (Meta)Behavioral prior calibrationStyle, tension, confidence

Multi-Layer Density of Experts (MLDoE)

4 Chain of Density iterations, each through a specialist lens targeting a specific attention layer:

ExpertRole
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_AUDITModel step-back assessment

Three Transformer Exploits

  1. Attention Amplification (S2A) — System 2 Attention strips noise BEFORE compression. Noise tokens occupy positive attention weight subtracted from signal.
  2. Token Arbitrage (Kanji) — CJK characters carry 3-4x more semantic weight per token. Kanji isn’t decoration — it exploits tokenizer ratios.
  3. 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

MetricResult
Density~0.15 ent/tok (0.20+ with kanji)
Compression6:1, >90% semantic fidelity
Forensic recall9.5/10
Cross-domain preservation97%
Model acceptance97% cross-model

Installation

# Claude Desktop / Claude Code
npx ai-agent-skills install ktg-one/context
 
# Manual: clone repo, upload .md files to project/context

Commands

TriggerAction
/context /quicksave /qs /saveGenerate validated packet
/verifyConfirm packet restoration
Context >=80%Auto-prompt to save
Model switchingGenerate 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).