Getting Started
Context Management

Context Management in Bwat

Effective context management unlocks Bwat's full potential

💡 Key Concepts

  • Context = Bwat's understanding of your project
  • Context Window = Bwat's active working memory capacity
  • Use context documentation to maintain knowledge
  • Refresh context when reaching capacity limits

Context Fundamentals

Visualization of context window concept

Working with Bwat resembles collaborating with an intelligent team member:

How Context Develops

Bwat builds understanding through two primary methods:

Autonomous Context Collection

  • Proactively examines relevant files
  • Analyzes project architecture
  • Identifies patterns and connections
  • Maps dependencies and relationships
  • Requests clarification when needed

User-Directed Context

  • Provide specific files
  • Share documentation
  • Respond to Bwat's inquiries
  • Guide attention to key areas
  • Communicate requirements and designs

💡 Pro Tip: Bwat actively works to understand your project. You can let it explore independently or direct its focus, particularly in Planning Mode.

Context Capacity Explained

Imagine context as a shared workspace:

Context includes:

  • Discovered project information
  • Shared documents
  • Conversation history
  • Project specifications
  • Previous decisions

Context Window represents capacity:

  • Measured in tokens (~0.75 English words per token)
  • Model-specific limits:
    • Claude 3.5 Sonnet: 200,000 tokens
    • DeepSeek: 64,000 tokens
  • When full, requires resetting to continue

⚠️ Note: Large context windows don't require complete utilization. Like physical workspaces, overcrowding reduces effectiveness.

Context Usage Indicator

Bwat provides visual feedback about context usage through a progress indicator:

Context usage progress bar

Interpreting the Display

  • ↑ indicates input tokens (your contributions)
  • ↓ shows output tokens (Bwat's responses)
  • Progress bar visualizes current usage
  • Total displays model capacity

When to Monitor Usage

  • During extended work sessions
  • When handling multiple files
  • Before complex tasks
  • If context appears fragmented

💡 Best Practice: Consider refreshing your session when reaching 70-80% capacity for optimal performance.

Context Documentation Strategies

Project documentation helps maintain continuity across sessions by providing structured information for AI assistance.

Documentation Approaches

Persistent Project Documentation (Knowledge Base)

  • Living documentation evolving with your project
  • Updated as architecture develops
  • Example: Maintaining technical-context.md and system-patterns.md
  • Essential for long-term projects and teams

Task-Specific Documentation

  • Created for focused implementation work
  • Records requirements and decisions
  • Example:
# authentication-implementation.md
 
## Specifications
- OAuth2 integration
- Google/GitHub provider support
- Authentication endpoint rate limits
 
## Technical Choices
- Passport.js for provider integration
- JWT session management
- Redis rate limiting

Progress Documentation

  • Use Planning Mode to document completed work and next steps
  • Save as markdown reference
  • Begin new tasks with this context

Effective Documentation Practices

Organization

  • Maintain clear structure
  • Include practical examples
  • Connect related concepts
  • Focus content purposefully

Maintenance

  • Update with major changes
  • Version control documentation
  • Remove obsolete information
  • Record important decisions

Practical Recommendations

Project Initiation

  • Allow Bwat to analyze codebase
  • Respond to architecture questions
  • Establish basic documentation
  • Record design decisions

Ongoing Development

  • Update documentation with changes
  • Share relevant references
  • Use Planning Mode for complex work
  • Refresh sessions as needed

Team Collaboration

  • Share common documentation (consider .bwatrules files)
  • Document architectural choices
  • Maintain consistent patterns
  • Keep documentation current

Effective context management ensures Bwat maintains accurate project understanding across all interactions.