botdigit-official/agent-blueprint/12-context-engineering

Claude Code and agent skill by botdigit-official/agent-blueprint

Trust tier 3
  • community
Source check pending

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

Install

npx vskill@latest install botdigit-official/agent-blueprint/12-context-engineering

SKILL.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

SymptomRoot CauseConsequence
Instruction AmnesiaContext > 60k–100k tokensAgent ignores negative constraints ("Do not touch port 41000")
Phantom Code ClaimsHallucinated diffs in bloated memoryAgent claims tests pass or files exist without verifying
Looping / ThrashingAccumulated error traces in sessionAgent re-runs failed commands repeatedly
Regression BleedUnscoped multi-file editsFixing 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_search with strict glob filters before opening files.
  • Use view_file with StartLine and EndLine slices (< 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:

┌─────────────────────────────────────────────────────────────┐
│ Wave 1: Schema, Types & Domain Contracts (Zero side-effects)│
└──────────────────────────────┬──────────────────────────────┘
│ Verified & Committed
▼
┌─────────────────────────────────────────────────────────────┐
│ Wave 2: Core Business Logic & Data Services │
└──────────────────────────────┬──────────────────────────────┘
│ Verified & Committed
▼
┌─────────────────────────────────────────────────────────────┐
│ Wave 3: API Endpoints, UI Controllers & Client Adapters │
└──────────────────────────────┬──────────────────────────────┘
│ Verified & Committed
▼
┌─────────────────────────────────────────────────────────────┐
│ Wave 4: Integration Tests, End-to-End Proofs & Docs Sync │
└─────────────────────────────────────────────────────────────┘

Between each wave:

  1. Verify empirical execution (npm test, cargo test, build commands).
  2. Commit changes with a conventional commit message.
  3. 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:

markdown
### Subagent Task Contract: [Wave X.Y - Feature Name]
#### 1. Scope & File Boundaries
-**Target Files (Read/Write):**
-`src/services/billing.rs`
-`tests/billing_test.rs`
-**Reference Only (Read-Only):**
-`src/models/invoice.rs`
-**FORBIDDEN (Do Not Touch):**
-`src/routes/auth.rs`
-Any `.env` or configuration secrets
#### 2. Concrete Objective
[Precise 2-3 sentence statement of what must be built or fixed]
#### 3. Verification Commands
-`cargo test --test billing_test`
-`cargo clippy -- -D warnings`
#### 4. Required Output Artifacts
-List of modified files
-Exact test execution log proving 0 failures
-Notes for CHANGELOG.md under [Unreleased]

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/botdigit-official/agent-blueprint/12-context-engineering/badge)](https://verified-skill.com/skills/botdigit-official/agent-blueprint/12-context-engineering)

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