ContextDocs
Your AI agent maintains its own context files
What ContextDocs does
A Claude Code plugin with an AGENTS-first model that covers Codex, Copilot, Cursor, Gemini, and 5 more tools.
What ContextDocs includes
Signal Gate filtering
Strips out discoverable content (directory listings, file trees, architecture overviews) so your context files contain only what actually helps AI tools, keeping them lean and under budget.
7 context file types from one scan
AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md, .windsurfrules, .clinerules, and GEMINI.md — covering 8 AI tools including GitHub Copilot.
Full lifecycle, not just generation
init bootstraps, update patches only what drifted, promote graduates MEMORY.md patterns to CLAUDE.md, audit flags staleness — so context files stay accurate as your project evolves.
Health scoring (0–100)
Grades context files across line budget, signal quality, path accuracy, AGENTS-to-bridge consistency, freshness, and aggregate context load — 13 checks total. Export to CI with --min-score so drift never reaches your team.
Context Guard enforcement
Two-tier hooks nudge at session end (Tier 1) and block commits (Tier 2) when context files are stale, so drift gets caught before it costs anyone tokens. Claude Code only.
Content filter protection
Guards against Claude Code's API filter (HTTP 400) for CODE_OF_CONDUCT, LICENSE, and SECURITY files, so hook installation never gets blocked. Claude Code only.
Path-scoped context rules
Apply different conventions to different directories using glob patterns — monorepos and multi-platform projects get targeted context per area. Claude Code only.
Upstream compatibility tracking
Weekly Claude Code release monitoring and settings schema diffing detect breaking changes before they affect your context files.
Line budgets that work
CLAUDE.md under 80 lines, AGENTS.md under 120, all others under 60 — backed by the ETH Zurich finding that shorter, focused context outperforms longer files.
Works with 8 AI tools
Claude Code and OpenCode natively; generated files work with Codex CLI, GitHub Copilot, Cursor, Windsurf, Cline, and Gemini CLI automatically.
Get started in 60 seconds
Three steps for Claude Code, or one prompt for any other AI agent
Requires a AI Coding Agents account
Install via the LBA plugin marketplace. Full plugin access with slash commands, rules, and hooks including Context Guard enforcement.
Add the LBA plugin marketplace
/plugin marketplace add littlebearapps/lba-plugins One-time setup — works in both Claude Code and OpenCode
Install ContextDocs
/plugin install contextdocs@lba-plugins Pure Markdown plugin, no build step
Bootstrap AI context for your project
/contextdocs:ai-context init Scans your codebase, applies Signal Gate filtering, generates up to 7 context files for 8 AI tools
Context Guard hooks
/contextdocs:context-guard install Adds two-tier freshness enforcement: session-end nudge + pre-commit guard. Claude Code only. Uninstall anytime with /contextdocs:context-guard uninstall.
Copy this prompt and paste it into any AI assistant:
Try these commands
Claude Code slash commands — copy one to see it in action
"/contextdocs:ai-context init"
Scans your codebase and generates context files for 8 AI tools with Signal Gate filtering
"/contextdocs:context-verify"
Scores context file health 0–100 across 6 dimensions
"/contextdocs:ai-context update"
Patches only what drifted — preserves manual customisations
Try these prompts
Natural language equivalents — works with any AI agent that reads .claude/skills/
"Generate AI context files for this project"
Scans codebase and creates 7 context files for 8 AI tools with Signal Gate filtering
"Check my context files for drift"
Scores health 0–100 across 6 dimensions
"Update stale context files"
Patches only what drifted, preserves manual customisations
"Every project I set up, I'd spend 20 minutes writing a CLAUDE.md that was half directory listings the agent already knew. Signal Gate changed that — now I get context files that actually help."
Questions about ContextDocs
What is ContextDocs?
What is the Signal Gate principle?
How is ContextDocs different from writing context files manually?
What are the line budgets?
Does ContextDocs work with any programming language?
Can I use both ContextDocs and PitchDocs?
What is Context Guard?
/contextdocs:context-guard install, uninstall anytime. Where did ContextDocs come from?
Roadmap
Coming Soon
- Coming soon: Memory management skill — MEMORY.md analysis, pattern promotion, hygiene
- Coming soon: Rules management skill — .claude/rules/ lifecycle, linting, organisation
- Planned: Context CI — GitHub Actions for context freshness checks in PRs
- Planned: Context sync — one-command sync across all 7 formats
- Planned: Project-type templates — starter context for common stacks
Changelog
- •add .mcp.json, agent memory, and plugin manifest validation (097f452)
- •add ai-context companion reference, agent upgrades, and CLAUDE.md advanced features (d2389b9)
- •add Claude Code release and schema monitoring (42fbb84)
- •add complete hook system reference and SessionStart health check hook (f91ec63)
Also by Little Bear Apps