What is Context?
When Summer generates code suggestions or responds to your requests, “context” refers to the information provided to the AI model that it uses to understand your intent and current situation. Effective context is the foundation of getting great results from Summer’s AI assistance. There are two types of context:- Intent Context: What you want Summer to do - your instructions, goals, and desired outcomes
- State Context: The current state of your project - code, files, error messages, and project structure
Why Context Matters
The more relevant context you provide, the more accurate and helpful Summer’s responses will be. Without sufficient context, you may experience:- Hallucinations: The AI making assumptions or creating code that doesn’t fit your project
- Generic Solutions: Responses that don’t account for your specific codebase patterns
- Inefficient Results: Having to iterate multiple times to get the right solution
Providing Context in Summer
The @ Symbol
The most direct way to provide context is using the@
symbol in Summer’s chat:
Symbol | Example | Use Case | Best For |
---|---|---|---|
@file | @player.gd | Reference specific files | When you know exactly which file is relevant |
@folder | @scripts/ | Include entire folders | When multiple related files are needed |
@function | @move_player() | Reference specific functions | When discussing particular code elements |
Project Context
Summer understands your project structure and can use it effectively:- Recent Files: Files you’ve been working on recently
- Related Code: Functions and classes that are connected to your current work
- Project Patterns: Your coding style and architectural decisions
- Error Context: Current errors and console output
Conversation Context
Summer maintains context throughout your conversation:- Previous Requests: Builds on earlier instructions in the same chat
- Established Patterns: Remembers the style and approach you’ve requested
- Project Goals: Keeps track of what you’re trying to accomplish
Best Practices
Be Specific About Intent
Instead of vague requests, provide clear, specific instructions: ❌ Vague: “Make this better”✅ Specific: “Optimize this function to reduce memory usage and add error handling” ❌ Vague: “Fix the player”
✅ Specific: “Fix the player movement so it doesn’t clip through walls when jumping”
Provide Relevant State Information
Include information about the current state of your project:Use Examples and References
Point to existing code that works as you want:Break Down Complex Requests
For large changes, break them into smaller, focused requests: Instead of:Context in Different Scenarios
Debugging
When asking for help with bugs:Feature Development
When building new features:Code Review and Optimization
When asking for improvements:Advanced Context Techniques
Contextual Conversations
Start conversations with comprehensive context:Reference Patterns
Use existing code as templates:Cross-Project Learning
Reference concepts from other projects or frameworks:Common Context Mistakes
Too Much Irrelevant Context
❌ Including entire large files when only a small section is relevant✅ Point to specific functions or sections: “Look at the jump logic in @player.gd lines 50-80”
Too Little Context
❌ “This doesn’t work” without showing what “this” is✅ “The enemy pathfinding in @enemy.gd isn’t working - enemies get stuck on corners”
Outdated Context
❌ Referencing old code that’s been changed✅ Always reference current file states and recent changes
Integration with Summer’s Features
Project Intelligence
Summer’s Project Intelligence automatically provides context about:- Your project’s architecture and patterns
- Related files and dependencies
- Your coding style and conventions
AI Operations
When using AI Operations, context helps Summer:- Make changes that fit your existing codebase
- Follow your established patterns and conventions
- Avoid breaking existing functionality
Takeaways
- Context is crucial: The quality of Summer’s responses directly correlates with the context you provide
- Be specific: Clear intent and relevant state information lead to better results
- Use @ symbols: Explicitly reference files, folders, and functions when relevant
- Provide examples: Show Summer what you want by referencing existing code that works
- Break down complexity: Large requests work better when split into focused pieces
- Maintain conversation context: Build on previous requests in the same chat for continuity