Skip to content

Context efficiency documentation #217

@smith-xyz

Description

@smith-xyz

Just observing some of the plugins so far along with the PRs that exist, the common theme I'm seeing is that context window and token usage are an after thought.

Might be worth putting together some suggestions for contributors. Something like:

## Context-Efficient Plugin Design

Agent x has limited context (~128K-200K tokens). Design plugins that work within these constraints:

### DO: Offload Data Processing

**Good:** Python scripts fetch/process data, return JSON summaries
# Script does heavy lifting
python3 parse_logs.py --input logs/ --output summary.json

# Claude interprets compact summary
cat summary.json**Bad:** Claude reads raw logs directly
# Claude's context fills with 50K tokens of logs
cat audit.log pod.log container.log### DO: Set Explicit Limits

**Good:** "Focus on top 5-7 most relevant repos"
**Bad:** "Explore all 50 cloned repositories"

### DO: Checkpoint to Files

**Good:** "Save intermediate analysis to `.work/{cmd}/analysis.json`"
**Bad:** Keep all findings in context across phases

### DO: Prioritize

**Good:** "If context is limited, prioritize X over Y"
**Bad:** "Read everything and synthesize"

### DON'T: Open-ended Exploration

**Bad:** "Search the codebase to understand..."
**Good:** "Search for X in Y directory, read top 3 matches"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions