botdigit-official/agent-blueprint/12-context-engineering
Claude Code and agent skill by botdigit-official/agent-blueprint
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install botdigit-official/agent-blueprint/12-context-engineeringSKILL.md
The same SKILL.md was published earlier as botdigit-official/agent-blueprint/12-context-engineering.
12 — Context Engineering & Fresh Subagent Waves
Version: 1.0.0 Compatible: agent_blueprint >= 1.0 Requires: orchestrator, discovery, project-context Outputs: wave-plan.md, subagent-spec.md
Purpose
Context Engineering is the discipline of protecting an AI coding agent's working memory against context rot — the severe degradation of cognitive performance, precision, and instruction-following that occurs as LLM context windows accumulate noise, stale logs, and sprawling file dumps.
This skill equips agents (Antigravity, Claude Code, Cursor, Windsurf, OpenCode) with proven mechanisms from the Open GSD framework to execute complex, multi-day engineering tasks with zero hallucinations and zero context collapse.
The Core Problem: Context Rot
| Symptom | Root Cause | Consequence | |
|---|---|---|---|
| Instruction Amnesia | Context > 60k–100k tokens | Agent ignores negative constraints ("Do not touch port 41000") | |
| Phantom Code Claims | Hallucinated diffs in bloated memory | Agent claims tests pass or files exist without verifying | |
| Looping / Thrashing | Accumulated error traces in session | Agent re-runs failed commands repeatedly | |
| Regression Bleed | Unscoped multi-file edits | Fixing one file silently breaks adjacent modules |
The 4 Laws of Context Engineering
Law 1 — The Lean Supervisor
The orchestrating agent's primary conversation must remain lean and focused. It holds:
- Current project classification & active task list (
TASK.md) - High-level architectural invariants (
AGENTS.md) - Milestone status and next wave boundaries
The supervisor never retains:
- Multi-megabyte raw log dumps
- Unfiltered search outputs across 10,000 files
- Bloated build artifacts or minified assets
Law 2 — Subagent Wave Delegation
Heavy exploratory tasks, file refactorings, test runs, and deep security audits must be delegated to fresh-context subagents or bounded, isolated task executions:
- Each subagent begins with a pristine 200k-token context.
- Each subagent receives an explicit, bounded Subagent Spec:
- Target files to view and modify
- Concrete acceptance criteria
- Commands to execute for verification
- When the subagent finishes, it returns only the synthesized outcome and proof of verification back to the supervisor.
Law 3 — Scoped Read & Search Budget
Never read whole files when line ranges suffice.
- Use
grep_searchwith strict glob filters before opening files. - Use
view_filewithStartLineandEndLineslices (< 150 lines per view). - Limit command outputs using
git log -n 5,head -n 20, or pagers.
Law 4 — Atomic Wave Progression
Large features must be split into sequential, non-overlapping Execution Waves:
Between each wave:
- Verify empirical execution (
npm test,cargo test, build commands). - Commit changes with a conventional commit message.
- Flush transient context before advancing to the next wave.
Subagent Spec Template
When spawning or isolating work for a subagent or task runner, structure the prompt with this contract:
Context Health Checklist
Before accepting any agent task completion, verify:
- [ ] Supervisor context has not accumulated unresolved error loops.
- [ ] Work was broken down into manageable waves (< 5 files per wave).
- [ ] Each wave was tested and verified independently before the next started.
- [ ] No phantom files or undocumented edits were introduced.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/12-context-engineering/SKILL.md
Popularity
- 7-day trend score
- 5
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
[](https://verified-skill.com/skills/botdigit-official/agent-blueprint/12-context-engineering)