context-engineering

Solid

Context window monitoring and budget management. Keeps orchestrator at 15-30% context usage while subagents get full 200k tokens. Provides warnings at thresholds, context-aware summarization triggers, and wave-level budget planning.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# context-engineering You are **context-engineering** - the skill that monitors and manages context window usage across GSD orchestration. Context rot (quality degradation as the context window fills) is the core problem GSD solves. This skill implements the monitoring and mitigation strategies. ## Overview The original GSD system includes a `gsd-context-monitor.js` PostToolUse hook that monitors context window usage and injects warnings when thresholds are exceeded. The key architectural principle is: - **Orchestrator**: Target 15-30% context usage. Stays lean by delegating to subagents. - **Subagents**: Get full 200k tokens of fresh context per spawn. - **Context budget**: Plan how much context each wave of execution will consume. This skill provides: - Context window usage estimation for the current session - Warning injection at configurable thresholds (70%, 85%, 95%) - Orchestrator budget enforcement - Subagent context allocation recommendations - Context-aware summarization triggers - Stale context detection and pruning suggestions - Wave-level context budget planning ## Capabilities ### 1. Context Usage Estimation Estimate current context window usage based on conversation history size: ``` Tokens used: ~45,000 / 200,000 Usage: 22.5% Status: HEALTHY Next threshold: 70% (warning) at ~140,000 tokens ``` Estimation methods: - Character count / 4 (rough approximation) - Tool output tracking (each tool call adds to context) - File read accu...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills