Context-efficient documentation system that loads what you need, when you need it. 92% reduction in documentation loading overhead.
This plugin is not yet in any themed marketplace. To install it, you'll need to add it from GitHub directly.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install jitd@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/jitd.json
Step 2: Install the plugin
/plugin install jitd@jitd
Context-efficient documentation system with on-demand loading and conversation checkpoints.
Status: β Published v1.6.0
JITD (Just-In-Time Documentation) is a Claude Code plugin that optimizes context usage through on-demand documentation loading. Instead of loading 150k+ tokens of docs upfront, JITD loads only what you need (12k tokens), freeing 92% of your context for actual work.
β Traditional Approach:
ββββββββββββββββββββββββββββββββββββ
Entire codebase docs ~150,000 tokens
System prompts ~50,000 tokens
ββββββββββββββββββββββββββββββββββββ
= 200k tokens used before any work
= Frequent session restarts
= Lost context mid-feature
β
JITD Approach:
ββββββββββββββββββββββββββββββββββββ
Navigator (roadmap) ~2,000 tokens
Current task doc ~3,000 tokens
Relevant system doc ~5,000 tokens
Specific SOP (optional) ~2,000 tokens
ββββββββββββββββββββββββββββββββββββ
= 12,000 tokens (92% reduction)
= 188k tokens free for work
= Zero session restarts
Real Results:
# 1. Ensure Claude Code is initialized in your project
/init
# 2. Add the JITD plugin marketplace
/plugin marketplace add alekspetrov/jitd-plugin
# 3. Install the plugin
/plugin install jitd
# 4. Restart Claude Code to load the plugin
# 5. Initialize JITD in your project
/jitd:init
Requirements:
pnpm upgrade -g @anthropic-ai/claude-code@latest
.claude/
directory in project (run /init
first)# Start every new conversation with:
/jitd:start
# This loads the navigator and sets up JITD workflow
Always load lightweight navigator first (2k tokens):
/jitd:start # Loads .agent/DEVELOPMENT-README.md
Load only what you need, when you need it:
Scenario | Load | Tokens |
---|---|---|
Working on feature | Task doc | +3k |
Need architecture | System doc | +5k |
Solving pattern | SOP | +2k |
Total | ~12k |
vs Traditional: Loading everything = 150k tokens
Save conversation state anytime - like git commits for AI conversations:
# Before lunch break
/jitd:marker lunch-break
# Before risky refactor
/jitd:marker before-routing-refactor
# End of day
/jitd:marker eod-2025-10-12 "Finished OAuth, need tests tomorrow"
# Manage markers (interactive)
/jitd:markers
# Or list all markers
/jitd:markers list
# Clean old markers
/jitd:markers clean
Benefits:
Docs update as code evolves:
# After completing feature
/jitd:update-doc feature TASK-123
# After solving novel issue
/jitd:update-doc sop debugging cors-issue
# After architecture change
/jitd:update-doc system architecture
Clear conversation while preserving knowledge:
/jitd:compact
When to compact:
Command | Description |
---|---|
/jitd:init | One-time setup: creates .agent/ structure |
/jitd:start | Start session: loads navigator, sets JITD context |
/jitd:update-doc feature TASK-XX | Archive implementation plan after feature |
/jitd:update-doc sop <category> <name> | Create Standard Operating Procedure |
/jitd:update-doc system <doc> | Update architecture documentation |
/jitd:marker [name] | Create context save point anytime |
/jitd:markers | Manage markers: list, load, clean |
/jitd:compact | Smart compact: preserves markers, clears history |
JITD uses a navigator-first pattern with lazy-loading:
Step 1: Session Start
/jitd:start
# Loads: .agent/DEVELOPMENT-README.md (~2k tokens)
# Result: Documentation index loaded, ready to load specific docs
Step 2: Load On-Demand
# Only load what's needed for current task
Read .agent/tasks/TASK-123-oauth.md # +3k tokens
Read .agent/system/project-architecture.md # +5k tokens (if needed)
Step 3: Work Efficiently
Total loaded: 10k tokens (vs 150k traditional)
Available for work: 190k tokens (95%)
Step 4: Document & Clear
# After completing work
/jitd:update-doc feature TASK-123
# Then compact context
/jitd:compact
# Creates marker automatically
# Frees up tokens for next task
Problem: Conversations grow to 130k+ tokens, then you compact and lose everything.
JITD Solution: Create markers (3k token snapshots) before compacting:
# Context Marker Structure
## Current Location
- Task: TASK-123 - OAuth implementation
- Phase: Integration complete, testing pending
- Files: src/auth/oauth.ts, src/routes/auth.ts
## What's Done
β
OAuth flow implemented with passport.js
β
JWT token generation working
β
Login/logout endpoints created
## Technical Decisions
- Chose passport.js over next-auth (better control)
- JWT in httpOnly cookies (XSS protection)
- Redis for session storage (fast, scalable)
## Next Steps
1. Write comprehensive tests
2. Add error handling
3. Document OAuth setup in README
## Restore Instructions
Read @.agent/.context-markers/oauth-working.md
Result: 130k conversation β 3k marker (97.7% compression)
After running /jitd:init
:
your-project/
βββ CLAUDE.md # Project configuration
βββ .agent/
β βββ DEVELOPMENT-README.md # Navigator (2k tokens)
β βββ .jitd-config.json # Plugin configuration
β βββ .context-markers/ # Session save points (git-ignored)
β β βββ lunch-break-2025-10-12.md
β β βββ before-refactor-2025-10-12.md
β βββ tasks/ # Implementation plans
β β βββ TASK-123-oauth.md # Generated from tickets
β βββ system/ # Living architecture docs
β β βββ project-architecture.md
β β βββ tech-stack-patterns.md
β βββ sops/ # Standard Operating Procedures
β βββ integrations/ # Third-party service setups
β βββ debugging/ # Common issues & solutions
β βββ development/ # Dev workflows
β βββ deployment/ # Deploy procedures
βββ .gitignore # Includes .context-markers/
JITD configuration in .agent/.jitd-config.json
:
{
"version": "1.0.0",
"project_management": "linear", // linear | github | jira | gitlab | none
"task_prefix": "TASK", // TASK | GH | LIN | JIRA-123
"team_chat": "none", // slack | discord | teams | none
"auto_load_navigator": true,
"compact_strategy": "conservative" // aggressive | conservative | manual
}
Supported Integrations:
# 1. Start session
/jitd:start
# Loads navigator, shows assigned tasks from Linear/GitHub
# 2. Select task to work on
# Claude loads: .agent/tasks/TASK-456-payment.md
# 3. Load relevant architecture
Read .agent/system/project-architecture.md
# 4. Implement feature
# (Using only ~10k tokens for docs, 190k available for work)
# Create marker before leaving
/jitd:marker lunch-break "Stripe integration 70% complete, need to add webhooks"
# Resume after lunch
/jitd:markers
# [Interactive list appears]
# [Select "lunch-break" from list]
# Context restored in 30 seconds!
# Finish implementation and tests
# Document what you built
/jitd:update-doc feature TASK-456
# Clear context for next task
/jitd:compact
# Automatically creates marker
# Shows restore instructions
# Before trying new approach
/jitd:marker before-api-refactor
# Try refactoring API structure
# ...doesn't work well...
# Restore from marker
Read @.agent/.context-markers/before-api-refactor.md
# Try different approach with full context
Q: What makes JITD different from just organizing docs well?
A: Organization helps discoverability for humans. JITD adds token efficiency for AI. Traditional well-organized docs still load 150k tokens upfront. JITD's navigator pattern loads 2k tokens initially, then lazy-loads specific docs (3-5k each) only when needed. Result: 92% fewer tokens wasted on unused documentation.
Q: Do I need project management tools (Linear/GitHub) to use JITD?
A: No. JITD works standalone. PM integrations are optional enhancements. Set "project_management": "none"
in .agent/.jitd-config.json
and document tasks manually from conversation context.
Q: What's the minimum project size where JITD makes sense?
A: Any project with 3+ documentation files benefits. Even small projects (5-10 files) see 60-70% token reduction. Larger codebases (50+ files) achieve 90%+ savings.
Q: Can I use JITD with existing documentation?
A: Yes. Run /jitd:init
to create .agent/
structure, then migrate existing docs:
.agent/DEVELOPMENT-README.md
(navigator).agent/system/
.agent/sops/integrations/
.agent/sops/debugging/
Q: How does JITD calculate token usage?
A: When you run /jitd:start
, it measures actual file sizes using wc -c
(bytes) and calculates tokens as bytes / 4
(standard estimation). This shows real documentation overhead, not educational guesses.
Example output:
Navigator: 12,282 bytes = 3,070 tokens (measured)
CLAUDE.md: 10,085 bytes = 2,521 tokens (measured)
Total documentation: 5,591 tokens
Available for work: 144,409 tokens (72%)
Q: Why load navigator every session if it costs 2k tokens?
A: Navigator is your documentation index. Without it, you either:
2k tokens for complete documentation awareness is a 98.7% savings vs loading everything.
Q: Does /jitd:compact
delete my work?
A: No. It creates a context marker (save point) automatically, then clears conversation history. Your code, documentation, and markers remain intact. You can restore context anytime with /jitd:markers
.
Q: How much space do context markers save?
A: Context markers compress conversations by 85-97%:
Markers extract key decisions, progress, and next stepsβdiscarding redundant conversational back-and-forth.
Q: When should I create a marker?
A: Create markers before:
Q: How are markers different from git commits?
A: Git commits save code state. Markers save conversation state:
Think: Git commits are for code history, markers are for context history.
Q: Can I load markers from old projects?
A: Technically yes, but not recommended. Markers are session-specific: they reference code state, task context, and decisions from that project. Loading cross-project markers creates context mismatch. Create new markers for each project.
Q: Do markers work across different Claude Code sessions?
A: Yes! That's the point. Create marker in session A β start session B β run /jitd:markers
β select marker β full context restored. No need to re-explain 20 messages of context.
Q: Do I have to run /jitd:start
every session?
A: Yes. It's mandatory for JITD workflow. Without it:
Think of it like git status
at start of dayβessential for knowing where you are.
Q: What's "autonomous task completion"?
A: When you finish a task, Claude automatically:
/jitd:update-doc feature TASK-XX
)TASK-XX-complete
)No need to prompt "please commit now" or "update docs"βit's done autonomously once work is verified complete.
Q: Can I skip documentation updates?
A: You can, but you shouldn't. Documentation updates are the compounding benefit:
Skipping documentation is like skipping git commitsβyou lose the trail of why decisions were made.
Q: How do I share JITD docs with my team?
A: Commit .agent/
to git (except .agent/.context-markers/
βthose are personal session save points). Team members:
/jitd:start
Q: What's the .agent/.context-markers/.active
file?
A: When you run /jitd:compact
, it creates a marker and writes the filename to .active
. Next time you run /jitd:start
, it detects the active marker and asks if you want to load it (auto-resume feature). After loading, .active
is deleted.
Q: Why are context markers git-ignored?
A: Markers are personal session save points, not project documentation:
Task docs and SOPs (in .agent/tasks/
and .agent/sops/
) ARE committedβthey're polished documentation.
Q: Can I customize the JITD templates?
A: Yes. After /jitd:init
, edit templates in .agent/
:
DEVELOPMENT-README.md
: Customize navigator sections.jitd-config.json
: Change PM tool, task prefix, compact strategyChanges persist across sessions. Share customizations by committing .agent/
structure.
Q: Does JITD work with other AI assistants (Cursor, Copilot, etc.)?
A: JITD is a Claude Code pluginβit won't run in other tools. However, the documentation pattern (navigator + lazy loading + markers) works anywhere:
.agent/
docs/jitd:compact
functionalityBut you lose slash commands, autonomous completion, and PM integrations.
Q: What if /jitd:start
shows "navigator not found"?
A: JITD isn't initialized. Run:
/jitd:init
This creates .agent/
structure with DEVELOPMENT-README.md. Then /jitd:start
will work.
Q: Can I use JITD for non-code projects (writing, research, etc.)?
A: Yes! JITD is a documentation workflow, not code-specific:
Any project with evolving documentation benefits from on-demand loading and context markers.
Q: I ran /jitd:compact
but lost all my contextβhow do I recover?
A: /jitd:compact
creates a marker automatically. Run:
/jitd:markers
Select the most recent marker to restore context. If you want to restore immediately after compact, copy the marker filename shown in compact output and:
Read @.agent/.context-markers/[marker-name].md
Q: My tokens are still high after /jitd:start
βwhy?
A: Tokens accumulate from:
/jitd:start
output)JITD optimizes documentation (1). To reduce message history (2), run /jitd:compact
. To reduce code reads (3), use agents for multi-file searches instead of reading files directly.
Q: /jitd:update-doc
created a doc I don't likeβcan I regenerate?
A: Yes. Documentation is versioned with git, so you can:
/jitd:update-doc
again with better contextSOPs and task docs are living documentsβiterate until they're useful.
Q: Can I have multiple projects with different JITD configs?
A: Yes! Each project has its own .agent/.jitd-config.json
. Configure per project:
JITD detects config when you run /jitd:start
in each project directory.
JITD is open source (MIT) and community-driven.
How to Help:
Want to contribute?
MIT - Use freely, contribute back if it helps you.
Built in public π Share your JITD success stories!
Version: 1.6.0 Last Updated: 2025-10-16 Author: Aleks Petrov
1.6.0