headysystems/heady-testing/heady-context-window-manager

Claude Code and agent skill by headysystems/heady-testing

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when managing limited context windows across multi-agent systems. Covers tiered context (working/session/memory/artifacts), automatic compression, LLM-based summarization, context capsules for inter-agent transfer, priority-based eviction with phi-weighted scoring, and token budget tracking. All budgets and weights use phi-continuous scaling. Keywords: context window, context management, token budget, context compression, summarization, context capsule, eviction, tiered context, agent context, Heady context, working memory.

Install

npx vskill@latest install headysystems/heady-testing/heady-context-window-manager

SKILL.md

The same SKILL.md was published earlier as headysystems/heady-testing/heady-context-window-manager.

Heady™ Context Window Manager

When to Use This Skill

Use this skill when you need to:

  • Manage context windows for multi-agent orchestration
  • Implement tiered context (hot/warm/cold/archive)
  • Compress context when approaching token limits
  • Transfer context between agents (context capsules)
  • Score and evict low-value context entries
  • Track token usage across conversation tiers

Architecture

Working Context (hot, 8K tokens)
↓ overflow
Session Context (warm, ~21K tokens) ← φ² scaling
↓ overflow
Memory Context (cold, ~56K tokens) ← φ⁴ scaling
↓ overflow
Artifacts (archive, handles only) ← φ⁶ scaling

Instructions

1. Phi-Scaled Token Budgets

phiTokenBudgets(base=8192):

  • Working: 8,192 tokens (base)
  • Session: ~21,450 tokens (base × φ²)
  • Memory: ~56,131 tokens (base × φ⁴)
  • Artifacts: ~146,920 tokens (base × φ⁶)
2. Compression Trigger

Compress when working context reaches 1 - ψ⁴ ≈ 91.0% of budget.

3. Eviction Scoring (phi-weighted)
score = importance × 0.486 + recency × 0.300 + relevance × 0.214

Weights from EVICTION_WEIGHTS = phiFusionWeights(3):

  • Importance: φ²/(φ²+φ+1) ≈ 0.486
  • Recency: φ/(φ²+φ+1) ≈ 0.300
  • Relevance: 1/(φ²+φ+1) ≈ 0.214
4. Context Capsules

For inter-agent transfer:

javascript
const capsule = contextManager.createCapsule({
targetAgent: 'coding-swarm',
maxTokens: phiTokenBudgets(8192).session,
includeSystemMsg: true,
summarizeIfOver: true,
});

A capsule packages: system context, compressed working entries, relevant memory entries, and metadata.

5. Memory Retrieval

retrieveFromMemory(queryEmbedding, topK=fib(5), threshold=PSI):

  • Threshold ψ ≈ 0.618 — phi-harmonic similarity floor
  • Returns scored entries sorted by relevance
6. Tier Promotion/Demotion
  • Working → Session: when entry ages past PHI × sessionTTL
  • Session → Memory: when entry importance < CSL_THRESHOLDS.LOW
  • Memory → Archive: handle-based reference, original evicted

Evidence Paths

  • section2-agent-orchestration/modules/context-window-manager.js
  • src/vector-memory.js

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/headysystems/heady-testing/heady-context-window-manager/badge)](https://verified-skill.com/skills/headysystems/heady-testing/heady-context-window-manager)

Something wrong with this skill or its page? Tell us.