[{"data":1,"prerenderedAt":302},["ShallowReactive",2],{"doc-features\u002Fpragma-codebase-context":3,"content-query-i2HHccwDdv":4},null,{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"body":11,"_type":296,"_id":297,"_source":298,"_file":299,"_stem":300,"_extension":301},"\u002Fdocs\u002Ffeatures\u002Fpragma-codebase-context","features",false,"","Pragma Codebase Context","Understand what project context the Pragma agent can use, how indexing works at a high level, and how to control it.",{"type":12,"children":13,"toc":288},"root",[14,22,39,45,58,65,70,100,106,111,129,140,146,214,220,243,249],{"type":15,"tag":16,"props":17,"children":19},"element","h1",{"id":18},"pragma-codebase-context",[20],{"type":21,"value":9},"text",{"type":15,"tag":23,"props":24,"children":29},"div",{"className":25,"ariaHidden":28},[26,27],"docs-page-hero","docs-page-hero--sage","true",[30,32],{"type":21,"value":31},"\n  ",{"type":15,"tag":33,"props":34,"children":38},"img",{"src":35,"alt":8,"width":36,"height":37},"\u002Fimages\u002Fdocs-illustrations\u002Fpragma-context.svg",128,72,[],{"type":15,"tag":40,"props":41,"children":42},"p",{},[43],{"type":21,"value":44},"Codebase context is how Comp \u002F the Pragma agent understands your project beyond the single file you have open.",{"type":15,"tag":40,"props":46,"children":47},{},[48,50,56],{"type":21,"value":49},"Configure related options from ",{"type":15,"tag":51,"props":52,"children":53},"strong",{},[54],{"type":21,"value":55},"Settings → AI",{"type":21,"value":57},".",{"type":15,"tag":59,"props":60,"children":62},"h2",{"id":61},"what-context-can-include",[63],{"type":21,"value":64},"What Context Can Include",{"type":15,"tag":40,"props":66,"children":67},{},[68],{"type":21,"value":69},"Depending on your settings and what you attach, the agent may use:",{"type":15,"tag":71,"props":72,"children":73},"ul",{},[74,80,85,90,95],{"type":15,"tag":75,"props":76,"children":77},"li",{},[78],{"type":21,"value":79},"Open editors and selected text",{"type":15,"tag":75,"props":81,"children":82},{},[83],{"type":21,"value":84},"Project files it can search or read",{"type":15,"tag":75,"props":86,"children":87},{},[88],{"type":21,"value":89},"Terminal \u002F command context relevant to the task",{"type":15,"tag":75,"props":91,"children":92},{},[93],{"type":21,"value":94},"Rules you configured",{"type":15,"tag":75,"props":96,"children":97},{},[98],{"type":21,"value":99},"MCP tools you enabled",{"type":15,"tag":59,"props":101,"children":103},{"id":102},"why-context-matters",[104],{"type":21,"value":105},"Why Context Matters",{"type":15,"tag":40,"props":107,"children":108},{},[109],{"type":21,"value":110},"Good context helps the agent:",{"type":15,"tag":71,"props":112,"children":113},{},[114,119,124],{"type":15,"tag":75,"props":115,"children":116},{},[117],{"type":21,"value":118},"Find the right files faster",{"type":15,"tag":75,"props":120,"children":121},{},[122],{"type":21,"value":123},"Match existing patterns",{"type":15,"tag":75,"props":125,"children":126},{},[127],{"type":21,"value":128},"Avoid inventing APIs that do not exist in your repo",{"type":15,"tag":40,"props":130,"children":131},{},[132,134,138],{"type":21,"value":133},"Too little context → generic answers.",{"type":15,"tag":135,"props":136,"children":137},"br",{},[],{"type":21,"value":139},"\nToo much sensitive context → unnecessary exposure.",{"type":15,"tag":59,"props":141,"children":143},{"id":142},"what-you-should-know",[144],{"type":21,"value":145},"What You Should Know",{"type":15,"tag":147,"props":148,"children":149},"ol",{},[150,160,179,204],{"type":15,"tag":75,"props":151,"children":152},{},[153,158],{"type":15,"tag":51,"props":154,"children":155},{},[156],{"type":21,"value":157},"You control the workspace.",{"type":21,"value":159}," Only open or index projects you are comfortable sharing with the agent features you enabled.",{"type":15,"tag":75,"props":161,"children":162},{},[163,168,170,177],{"type":15,"tag":51,"props":164,"children":165},{},[166],{"type":21,"value":167},"Secrets stay out of context when possible.",{"type":21,"value":169}," Prefer ",{"type":15,"tag":171,"props":172,"children":174},"a",{"href":173},"\u002Fdocs\u002Ffeatures\u002Fpragma-secrets",[175],{"type":21,"value":176},"Pragma Secrets",{"type":21,"value":178}," over pasting keys into prompts.",{"type":15,"tag":75,"props":180,"children":181},{},[182,187,189,195,197,202],{"type":15,"tag":51,"props":183,"children":184},{},[185],{"type":21,"value":186},"Rules + context work together.",{"type":21,"value":188}," Rules say ",{"type":15,"tag":190,"props":191,"children":192},"em",{},[193],{"type":21,"value":194},"how",{"type":21,"value":196}," to behave; context shows ",{"type":15,"tag":190,"props":198,"children":199},{},[200],{"type":21,"value":201},"what",{"type":21,"value":203}," the project looks like.",{"type":15,"tag":75,"props":205,"children":206},{},[207,212],{"type":15,"tag":51,"props":208,"children":209},{},[210],{"type":21,"value":211},"Large monorepos",{"type":21,"value":213}," may need narrower scope (active package \u002F folder) for better results.",{"type":15,"tag":59,"props":215,"children":217},{"id":216},"practical-tips",[218],{"type":21,"value":219},"Practical Tips",{"type":15,"tag":71,"props":221,"children":222},{},[223,228,233,238],{"type":15,"tag":75,"props":224,"children":225},{},[226],{"type":21,"value":227},"Start tasks with the important file open",{"type":15,"tag":75,"props":229,"children":230},{},[231],{"type":21,"value":232},"Mention the package or service name in your prompt",{"type":15,"tag":75,"props":234,"children":235},{},[236],{"type":21,"value":237},"Disable unused MCP servers so tools do not widen scope accidentally",{"type":15,"tag":75,"props":239,"children":240},{},[241],{"type":21,"value":242},"Review diffs before accepting large generated changes",{"type":15,"tag":59,"props":244,"children":246},{"id":245},"related-pages",[247],{"type":21,"value":248},"Related Pages",{"type":15,"tag":71,"props":250,"children":251},{},[252,261,270,279],{"type":15,"tag":75,"props":253,"children":254},{},[255],{"type":15,"tag":171,"props":256,"children":258},{"href":257},"\u002Fdocs\u002Ffeatures\u002Fpragma-ai-agent",[259],{"type":21,"value":260},"Pragma AI Agent",{"type":15,"tag":75,"props":262,"children":263},{},[264],{"type":15,"tag":171,"props":265,"children":267},{"href":266},"\u002Fdocs\u002Ffeatures\u002Fpragma-rules",[268],{"type":21,"value":269},"Agent Rules",{"type":15,"tag":75,"props":271,"children":272},{},[273],{"type":15,"tag":171,"props":274,"children":276},{"href":275},"\u002Fdocs\u002Ffeatures\u002Fpragma-mcp",[277],{"type":21,"value":278},"Pragma MCP Servers",{"type":15,"tag":75,"props":280,"children":281},{},[282],{"type":15,"tag":171,"props":283,"children":285},{"href":284},"\u002Fdocs\u002Ffeatures\u002Fpragma-privacy",[286],{"type":21,"value":287},"Pragma Privacy & Telemetry",{"title":8,"searchDepth":289,"depth":289,"links":290},2,[291,292,293,294,295],{"id":61,"depth":289,"text":64},{"id":102,"depth":289,"text":105},{"id":142,"depth":289,"text":145},{"id":216,"depth":289,"text":219},{"id":245,"depth":289,"text":248},"markdown","content:docs:features:pragma-codebase-context.md","content","docs\u002Ffeatures\u002Fpragma-codebase-context.md","docs\u002Ffeatures\u002Fpragma-codebase-context","md",1791370284163]