Pragma Codebase Context
Codebase context is how Comp / the Pragma agent understands your project beyond the single file you have open.
Configure related options from Settings → AI.
What Context Can Include
Depending on your settings and what you attach, the agent may use:
- Open editors and selected text
- Project files it can search or read
- Terminal / command context relevant to the task
- Rules you configured
- MCP tools you enabled
Why Context Matters
Good context helps the agent:
- Find the right files faster
- Match existing patterns
- Avoid inventing APIs that do not exist in your repo
Too little context → generic answers.
Too much sensitive context → unnecessary exposure.
What You Should Know
- You control the workspace. Only open or index projects you are comfortable sharing with the agent features you enabled.
- Secrets stay out of context when possible. Prefer Pragma Secrets over pasting keys into prompts.
- Rules + context work together. Rules say how to behave; context shows what the project looks like.
- Large monorepos may need narrower scope (active package / folder) for better results.
Practical Tips
- Start tasks with the important file open
- Mention the package or service name in your prompt
- Disable unused MCP servers so tools do not widen scope accidentally
- Review diffs before accepting large generated changes