Context engineering framework for AI coding agents
Ever notice your AI coding sessions get worse the longer they run?
That's not a bug — it's what happens when context fills up with noise.
Installation • Usage • The Problem • How It Works • Examples
WISCI gives you four commands — Write, Isolate, Select, Compress — that keep your sessions sharp. Save what matters, load only what's relevant, research without polluting your context, and hand off cleanly between sessions.
WISCI skills use the Agent Skills open standard (SKILL.md format), supported across all major AI coding agents.
| Platform | How to install |
|---|---|
| Claude Code | /plugin marketplace add ph3on1x/wisci/plugin install wisci@wisci-framework |
| Gemini CLI | gemini extensions install <github-url> |
| Codex CLI | Clone the repo, then run ./scripts/setup-platforms.sh |
| Cursor | Auto-discovers skills — no setup needed if Claude Code plugin is installed. Otherwise, run ./scripts/setup-platforms.sh |
Note
/isolate uses subagent spawning, which works best on Claude Code and Codex CLI. On other platforms, research runs in a single agent — functional, but without parallel exploration.
| You're thinking... | Use | What happens |
|---|---|---|
| "I'll need this info tomorrow" | /write auth-research |
Saves your findings to scratchpad/auth-research.md with file references that track staleness |
| "I need to research something without cluttering my session" | /isolate compare OAuth2 libraries for Node.js |
1-3 subagents handle it in isolated windows (websearch, docs, any task); results appear inline, your context stays clean |
| "Where was I?" | /select |
Loads a codebase overview + lists your saved context files, flagging any that are stale |
| "I need my auth research back" | /select auth-research |
Loads that specific context file, auto-stripping any sections whose source files have changed |
| "Done for the day" | /compress |
Creates a handoff document so your next session picks up exactly where you left off |
| "Time to commit" | /commit |
Creates a conventional commit with a Context: section that logs AI-layer changes — turning git log into long-term memory |
LLM context windows degrade in four predictable ways — each addressed by a specific WISCI command:
-
Context Poisoning — Wrong facts persist and compound across a session.
/writepreserves exact facts with source tracking./selectauto-strips sections whose referenced files have changed. -
Context Distraction — The model fixates on accumulated history instead of using its training.
/isolatekeeps research noise in separate windows./compressdeliberately compacts to stay in the effective range. -
Context Confusion — Irrelevant information leads to wrong tool selection and document usage.
/selectloads only relevant, validated context./isolategives each agent a clean, focused window. -
Context Clash — Information gathered incrementally across turns creates internal contradictions.
/writeuses section-level merge to consolidate without contradictions.
These failures are not edge cases — they are the default outcome of long-running sessions. Context quality degrades significantly past 40% utilization, yet most tools only react at 95% when auto-compaction kicks in. By then, the damage is done.
The four commands form a continuous cycle — each session builds on the last:
/select → work → /isolate (as needed) → /write → /compress → new session → /select → ...
The scratchpad/ directory is where context lives between sessions:
- Topic-based storage — Markdown files organized by topic, preserving exact file paths, decisions, and reasoning.
- Staleness detection — Every file includes a
## Referencesmanifest. When loaded, git history is checked to detect whether referenced files have changed. - Section-level merge —
/writemerges at##heading boundaries — stale sections are pruned automatically. - Auto-stripping —
/selectremoves stale content before loading. Outdated sections are stripped, broken references flagged. - Git as long-term memory —
/commitappends aContext:section to commits, making the context system's evolution queryable ingit log.
Session 1 — Research and plan:
> /select auth-layer
(deep dive into auth middleware, token handling, session management — results appear inline)
> /isolate compare JWT vs session-based auth for our use case
(subagents websearch best practices and read external docs — results inline, context stays clean)
> /write auth-research
(saves findings to scratchpad/auth-research.md with exact file paths and line numbers)
> /compress
(creates scratchpad/handoff.md: "Researched auth system. OAuth2 flow in src/auth/. Next: implement token refresh.")
Session 2 — Implement:
> /select
(loads codebase overview, shows: auth-research.md [fresh], handoff.md [fresh])
> /select auth-research
(loads your research — all file references still valid, nothing stripped)
... implement the feature ...
> /write auth-research
(merges new implementation decisions into the existing file — section-level merge, no duplicates)
> /commit feat: add token refresh to auth middleware
(commits with Context: section tracking scratchpad changes)
> /select
(instant codebase overview: directory structure, tech stack, conventions, available context files)
> /select api-layer
(deep dive into the API layer — subagents explore routes, handlers, and database connections)
> /isolate what are the best practices for testing Express middleware
(subagents websearch and read external docs — results inline without polluting your context)
> /write onboarding-notes
(persists everything — now any future session can /select onboarding-notes instead of re-exploring)
> /select
(shows available context: payment-integration.md [stale — src/payments/handler.ts changed 2 days ago])
> /select payment-integration
(loads the file with stale sections auto-stripped, adds note: "3 sections stripped. Consider /write to refresh.")
... review what's still valid, continue the work ...
> /write payment-integration
(refreshes the file with current state — stale sections replaced, references updated)
WISCI builds on foundational work in context engineering:
- Lance Martin / LangChain — The WISC taxonomy (Write, Isolate, Select, Compress)
- Andrej Karpathy — The context engineering framing (LLM as CPU, context window as RAM, external storage as disk)
- Drew Breunig — The four failure modes taxonomy (poisoning, distraction, confusion, clash)
- Anthropic — Claude Code and the Agent Skills standard