How to Make Agent mode Aware of Codebases and Documentation
Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance
Agent mode works best when it understands the context of your project. This guide shows you how to give agent mode access to codebases and documentation, making it more helpful and accurate.
Make agent mode aware of your open codebase
When agent mode understands your current codebase, it can provide more relevant suggestions and answers.
Let agent mode explore the codebase using tools
Agent mode can use built-in tools to navigate and understand your code:
File exploration tools: The agent can read files, search for patterns, and understand project structure
Code search: Use search to find relevant code snippets
Git integration: Access commit history and understand code evolution
Create rules to help the agent understand your codebase
Rules guide agent mode’s behavior and understanding. Place markdown files in .gobi/rules in your project to provide context:
# Project ArchitectureThis is a React application with:- Components in `/src/components`- API routes in `/src/api`- State management using Redux in `/src/store`## Coding Standards- Use TypeScript for all new files- Follow the existing naming conventions- Write tests for all new features
Place rules files at different levels of your project hierarchy to scope when
they trigger
Sometimes you need agent mode to understand code beyond your current project.
Public codebases
For open-source projects and public repositories, you have several options:
Rules with hyperlinks
Create rules that point to external codebases:
# External DependenciesOur authentication system is based on:- [Auth.js documentation](https://authjs.dev/)- [Example implementation](https://github.com/nextauthjs/next-auth-example)When implementing auth features, reference these patterns.
GitHub and GitLab CLIs
Enable gh or glab CLI access for agent mode to interact with repositories.Add rules to guide CLI usage:
# Repository AccessYou can use the `gh` CLI to:- Search for issues: `gh issue list --repo owner/repo`- View pull requests: `gh pr list --repo owner/repo`- Clone repositories: `gh repo clone owner/repo`
DeepWiki MCP
DeepWiki MCP lets agent mode explore any public GitHub repository.Once configured, agent mode can explore repositories like:
“Explore the React repository structure”
“Find how authentication is implemented in NextAuth.js”
Internal codebases
For private and internal repositories, you need additional setup:
Custom MCP servers
Create an MCP server that has access to your internal repositories.
Custom code RAG
For faster retrieval and lower costs with very large internal codebases, consider implementing a custom code RAG system. This is an advanced approach that requires more setup but can provide performance benefits at scale.
Make agent mode aware of relevant documentation
Documentation provides crucial context for agent mode to understand APIs, frameworks, and best practices.
Context7 MCP enables agent mode to search and retrieve information from public documentation:Agent mode can then answer questions like:
“How do I use React hooks?”
“What’s the syntax for Tailwind CSS animations?”
Internal documentation
For private documentation and wikis:
Rules with internal links
Create rules that reference internal resources:
# Internal DocumentationOur team documentation is available at:- API Documentation: https://internal.docs/api- Architecture Guide: https://internal.docs/architecture- Deployment Process: https://internal.docs/deploymentAlways follow our internal standards when suggesting code.
Custom MCP servers for docs
Create an MCP server that accesses your internal documentation.
Migrating from deprecated context providers
If you were previously using the @Codebase or @Docs context providers, here’s how to migrate to the new approach:
Migrating from @Codebase
The @Codebase context provider has been deprecated. Instead:
Use built-in tools: Agent mode can now use file exploration and search tools to understand your codebase
Add rules: Create .gobi/rules files to provide context about your project structure
Use MCP servers: For external codebases, use DeepWiki MCP or custom MCP servers
Migrating from @Docs
The @Docs context provider has been deprecated. Instead:
Use Context7 MCP: For public documentation, Context7 MCP provides similar functionality
Add documentation links in rules: Create rules that reference documentation URLs
Use custom MCP servers: For internal documentation, create an MCP server with access to your docs
The new approach provides better integration with Gobi’s Agent mode features and more intelligent context selection.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gobi","colors":{"primary":"#6b7280","light":"#ffffff","dark":"#000000"},"logo":{"light":"https://mintcdn.com/gourmand/Fufdu9C2YIS7Ue9k/logo/light.svg?fit=max\u0026auto=format\u0026n=Fufdu9C2YIS7Ue9k\u0026q=85\u0026s=75483d9dfd34deabbbdabd8b2ded02d0","dark":"https://mintcdn.com/gourmand/Fufdu9C2YIS7Ue9k/logo/dark.svg?fit=max\u0026auto=format\u0026n=Fufdu9C2YIS7Ue9k\u0026q=85\u0026s=7c8a2a893387392abc6ddce7162b1521","href":"https://gourmand.dev"},"favicon":"/favicon.png","background":{"color":{"dark":"#1a1a1a"}},"navbar":{"links":[{"label":"🚀 Get Started","href":"https://hub.gourmand.dev/"}],"primary":{"type":"github","href":"https://github.com/gourmand/gobi"}},"footer":{"socials":{"x":"https://twitter.com/gourmand","github":"https://github.com/gourmand/gobi","linkedin":"https://linkedin.com/company/gourmand","discord":"https://discord.gg/TODO"}},"integrations":{"ga4":{"measurementId":"G-M3JWW8N2XQ"},"posthog":{"apiKey":"phc_lBYRoFPHpgi5rYPDxRDtQmLic4ogXsJmJQlpX2wsuFi"}},"banner":{"content":"Gobi CLI v1.4.49 is live 🚀 Learn how you can [leverage the CLI with our MCP Cookbooks](/guides/overview#mcp-integration-cookbooks)"},"contextual":{"options":["copy","view"]},"navigation":{"global":{"anchors":[{"anchor":"About Us","icon":"book-open","href":"https://gourmand.dev/about-us"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/TODO"},{"anchor":"Blog","icon":"newspaper","href":"https://gourmand.dev/blog"},{"anchor":"Release Notes","icon":"bullhorn","href":"https://changelog.gourmand.dev/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gourmand","hasAudioNarration":false,"actualSubdomain":"gourmand","customDomains":["docs.gourmand.dev"],"gitSource":{"type":"github","owner":"gourmand","repo":"gobi","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9404573a0191ccbcb56e6:success","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Customize","count":80},{"language":"default","tag":"Guides","count":39},{"language":"default","tag":"Documentation","count":38},{"language":"default","tag":"Hub","count":26},{"language":"default","tag":"IDE Extensions","count":24},{"language":"default","tag":"Model Providers","count":23},{"language":"default","tag":"More Providers","count":11},{"language":"default","tag":"Popular Providers","count":11},{"language":"default","tag":"Cookbooks","count":9},{"language":"default","tag":"Deep Dives","count":8}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"html{scroll-behavior:smooth;scroll-padding-top:80px}h1[id],h2[id],h3[id],h4[id],h5[id],h6[id]{scroll-margin-top:80px}:target{animation:highlight 2s ease-out}@keyframes highlight{0%{background-color:rgba(255, 235, 59, 0.3)}100%{background-color:transparent}}"}]}
{"page":{"pagePath":"guides/codebase-documentation-awareness","slug":"/guides/codebase-documentation-awareness","pageMetadata":{"title":"How to Make Agent mode Aware of Codebases and Documentation","description":"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance","keywords":["agent","codebase","documentation","MCP","context","RAG","tools"],"sidebarTitle":"Codebase and Documentation Awareness","href":"/guides/codebase-documentation-awareness"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Agent mode works best when it understands the context of your project. This guide shows you how to give agent mode access to codebases and documentation, making it more helpful and accurate.`}),`\n`,_jsx(Heading,{level:`2`,id:`make-agent-mode-aware-of-your-open-codebase`,children:`Make agent mode aware of your open codebase`}),`\n`,_jsx(_components.p,{children:`When agent mode understands your current codebase, it can provide more relevant suggestions and answers.`}),`\n`,_jsx(Heading,{level:`3`,id:`let-agent-mode-explore-the-codebase-using-tools`,children:`Let agent mode explore the codebase using tools`}),`\n`,_jsx(_components.p,{children:`Agent mode can use built-in tools to navigate and understand your code:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`File exploration tools`}),`: The agent can read files, search for patterns, and understand project structure`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Code search`}),`: Use search to find relevant code snippets`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Git integration`}),`: Access commit history and understand code evolution`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-rules-to-help-the-agent-understand-your-codebase`,children:`Create rules to help the agent understand your codebase`}),`\n`,_jsxs(_components.p,{children:[`Rules guide agent mode’s behavior and understanding. Place markdown files in `,_jsx(_components.code,{children:`.gobi/rules`}),` in your project to provide context:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Project Architecture`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`This is a React application with:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Components in `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`/src/components`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API routes in `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`/src/api`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` State management using Redux in `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`/src/store`\"})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Coding Standards`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use TypeScript for all new files`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Follow the existing naming conventions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Write tests for all new features`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Place rules files at different levels of your project hierarchy to scope when\nthey trigger`})}),`\n`,_jsxs(_components.p,{children:[`Learn more about `,_jsx(_components.a,{href:`/customize/deep-dives/rules`,children:`rules configuration`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`make-agent-mode-aware-of-other-codebases`,children:`Make agent mode aware of other codebases`}),`\n`,_jsx(_components.p,{children:`Sometimes you need agent mode to understand code beyond your current project.`}),`\n`,_jsx(Heading,{level:`3`,id:`public-codebases`,children:`Public codebases`}),`\n`,_jsx(_components.p,{children:`For open-source projects and public repositories, you have several options:`}),`\n`,_jsx(Heading,{level:`4`,id:`rules-with-hyperlinks`,children:`Rules with hyperlinks`}),`\n`,_jsx(_components.p,{children:`Create rules that point to external codebases:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# External Dependencies`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Our authentication system is based on:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Auth.js documentation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-text-decoration\":`underline`,\"--shiki-dark\":`#D4D4D4`,\"--shiki-dark-text-decoration\":`underline`},children:`https://authjs.dev/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Example implementation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-text-decoration\":`underline`,\"--shiki-dark\":`#D4D4D4`,\"--shiki-dark-text-decoration\":`underline`},children:`https://github.com/nextauthjs/next-auth-example`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`When implementing auth features, reference these patterns.`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`github-and-gitlab-clis`,children:`GitHub and GitLab CLIs`}),`\n`,_jsxs(_components.p,{children:[`Enable `,_jsx(_components.code,{children:`gh`}),` or `,_jsx(_components.code,{children:`glab`}),` CLI access for agent mode to interact with repositories.`]}),`\n`,_jsx(_components.p,{children:`Add rules to guide CLI usage:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Repository Access`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`You can use the `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`gh`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CLI to:`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Search for issues: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`gh issue list --repo owner/repo`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` View pull requests: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`gh pr list --repo owner/repo`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Clone repositories: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`gh repo clone owner/repo`\"})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`deepwiki-mcp`,children:`DeepWiki MCP`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://hub.gourmand.dev/deepwiki/deepwiki-mcp`,children:`DeepWiki MCP`}),` lets agent mode explore any public GitHub repository.`]}),`\n`,_jsx(_components.p,{children:`Once configured, agent mode can explore repositories like:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`“Explore the React repository structure”`}),`\n`,_jsx(_components.li,{children:`“Find how authentication is implemented in NextAuth.js”`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`internal-codebases`,children:`Internal codebases`}),`\n`,_jsx(_components.p,{children:`For private and internal repositories, you need additional setup:`}),`\n`,_jsx(Heading,{level:`4`,id:`custom-mcp-servers`,children:`Custom MCP servers`}),`\n`,_jsx(_components.p,{children:`Create an MCP server that has access to your internal repositories.`}),`\n`,_jsx(Heading,{level:`4`,id:`custom-code-rag`,children:`Custom code RAG`}),`\n`,_jsxs(_components.p,{children:[`For faster retrieval and lower costs with very large internal codebases, consider implementing a `,_jsx(_components.a,{href:`/guides/custom-code-rag`,children:`custom code RAG`}),` system. This is an advanced approach that requires more setup but can provide performance benefits at scale.`]}),`\n`,_jsx(Heading,{level:`2`,id:`make-agent-mode-aware-of-relevant-documentation`,children:`Make agent mode aware of relevant documentation`}),`\n`,_jsx(_components.p,{children:`Documentation provides crucial context for agent mode to understand APIs, frameworks, and best practices.`}),`\n`,_jsx(Heading,{level:`3`,id:`public-documentation`,children:`Public documentation`}),`\n`,_jsx(Heading,{level:`4`,id:`rules-with-documentation-links`,children:`Rules with documentation links`}),`\n`,_jsx(_components.p,{children:`Guide agent mode to relevant documentation:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Documentation Resources`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`For framework-specific questions, refer to:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` React: https://react.dev/reference/react`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Next.js: https://nextjs.org/docs`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Tailwind CSS: https://tailwindcss.com/docs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Always cite documentation when explaining concepts.`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`context7-mcp`,children:`Context7 MCP`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://hub.gourmand.dev/upstash/context7-mcp`,children:`Context7 MCP`}),` enables agent mode to search and retrieve information from public documentation:`]}),`\n`,_jsx(_components.p,{children:`Agent mode can then answer questions like:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`“How do I use React hooks?”`}),`\n`,_jsx(_components.li,{children:`“What’s the syntax for Tailwind CSS animations?”`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`internal-documentation`,children:`Internal documentation`}),`\n`,_jsx(_components.p,{children:`For private documentation and wikis:`}),`\n`,_jsx(Heading,{level:`4`,id:`rules-with-internal-links`,children:`Rules with internal links`}),`\n`,_jsx(_components.p,{children:`Create rules that reference internal resources:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Internal Documentation`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Our team documentation is available at:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API Documentation: https://internal.docs/api`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Architecture Guide: https://internal.docs/architecture`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Deployment Process: https://internal.docs/deployment`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Always follow our internal standards when suggesting code.`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`custom-mcp-servers-for-docs`,children:`Custom MCP servers for docs`}),`\n`,_jsx(_components.p,{children:`Create an MCP server that accesses your internal documentation.`}),`\n`,_jsx(Heading,{level:`2`,id:`migrating-from-deprecated-context-providers`,children:`Migrating from deprecated context providers`}),`\n`,_jsxs(_components.p,{children:[`If you were previously using the `,_jsx(_components.code,{children:`@Codebase`}),` or `,_jsx(_components.code,{children:`@Docs`}),` context providers, here’s how to migrate to the new approach:`]}),`\n`,_jsx(Heading,{level:`3`,id:`migrating-from-@codebase`,children:`Migrating from @Codebase`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`@Codebase`}),` context provider has been deprecated. Instead:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use built-in tools`}),`: Agent mode can now use file exploration and search tools to understand your codebase`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add rules`}),`: Create `,_jsx(_components.code,{children:`.gobi/rules`}),` files to provide context about your project structure`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use MCP servers`}),`: For external codebases, use DeepWiki MCP or custom MCP servers`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`migrating-from-@docs`,children:`Migrating from @Docs`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`@Docs`}),` context provider has been deprecated. Instead:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use Context7 MCP`}),`: For public documentation, Context7 MCP provides similar functionality`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add documentation links in rules`}),`: Create rules that reference documentation URLs`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use custom MCP servers`}),`: For internal documentation, create an MCP server with access to your docs`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The new approach provides better integration with Gobi’s Agent mode features and more intelligent context selection.`}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Learn more about `,_jsx(_components.a,{href:`/reference/gobi-mcp`,children:`MCP servers`})]}),`\n`,_jsxs(_components.li,{children:[`Explore `,_jsx(_components.a,{href:`/customize/deep-dives/rules`,children:`rules configuration`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set up `,_jsx(_components.a,{href:`/guides/understanding-configs`,children:`other custom configurations`}),` with specific knowledge domains`]}),`\n`]}),`\n`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How to Make Agent mode Aware of Codebases and Documentation","description":"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance","keywords":["agent","codebase","documentation","MCP","context","RAG","tools"],"sidebarTitle":"Codebase and Documentation Awareness","href":"/guides/codebase-documentation-awareness"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Make agent mode aware of your open codebase","slug":"make-agent-mode-aware-of-your-open-codebase","depth":2,"children":[{"title":"Let agent mode explore the codebase using tools","slug":"let-agent-mode-explore-the-codebase-using-tools","depth":3,"children":[]},{"title":"Create rules to help the agent understand your codebase","slug":"create-rules-to-help-the-agent-understand-your-codebase","depth":3,"children":[]}]},{"title":"Make agent mode aware of other codebases","slug":"make-agent-mode-aware-of-other-codebases","depth":2,"children":[{"title":"Public codebases","slug":"public-codebases","depth":3,"children":[]},{"title":"Rules with hyperlinks","slug":"rules-with-hyperlinks","depth":4,"children":[]},{"title":"GitHub and GitLab CLIs","slug":"github-and-gitlab-clis","depth":4,"children":[]},{"title":"DeepWiki MCP","slug":"deepwiki-mcp","depth":4,"children":[]},{"title":"Internal codebases","slug":"internal-codebases","depth":3,"children":[]},{"title":"Custom MCP servers","slug":"custom-mcp-servers","depth":4,"children":[]},{"title":"Custom code RAG","slug":"custom-code-rag","depth":4,"children":[]}]},{"title":"Make agent mode aware of relevant documentation","slug":"make-agent-mode-aware-of-relevant-documentation","depth":2,"children":[{"title":"Public documentation","slug":"public-documentation","depth":3,"children":[]},{"title":"Rules with documentation links","slug":"rules-with-documentation-links","depth":4,"children":[]},{"title":"Context7 MCP","slug":"context7-mcp","depth":4,"children":[]},{"title":"Internal documentation","slug":"internal-documentation","depth":3,"children":[]},{"title":"Rules with internal links","slug":"rules-with-internal-links","depth":4,"children":[]},{"title":"Custom MCP servers for docs","slug":"custom-mcp-servers-for-docs","depth":4,"children":[]}]},{"title":"Migrating from deprecated context providers","slug":"migrating-from-deprecated-context-providers","depth":2,"children":[{"title":"Migrating from @Codebase","slug":"migrating-from-@codebase","depth":3,"children":[]},{"title":"Migrating from @Docs","slug":"migrating-from-@docs","depth":3,"children":[]}]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/gourmand/be77c1dbc9ca84c2/c15t-cookie-banner.js"],"subdomain":"gourmand","siteName":"Gobi","title":"How to Make Agent mode Aware of Codebases and Documentation - Gobi","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"guides/codebase-documentation-awareness.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gobi\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to Make Agent mode Aware of Codebases and Documentation - Gobi\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gobi\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gourmand.dev/guides/codebase-documentation-awareness\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gourmand.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=How+to+Make+Agent+mode+Aware+of+Codebases+and+Documentation\u0026amp;description=Learn+how+to+give+your+Agent+mode+access+to+codebases+and+documentation+for+more+context-aware+assistance\u0026amp;theme=179f6f137887ec7cc125a15c\u0026amp;signature=9fa1be2224313470140352c843e7968cd80cc73a2a8981862932f3a14957edba\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How to Make Agent mode Aware of Codebases and Documentation - Gobi\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gourmand.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=How+to+Make+Agent+mode+Aware+of+Codebases+and+Documentation\u0026amp;description=Learn+how+to+give+your+Agent+mode+access+to+codebases+and+documentation+for+more+context-aware+assistance\u0026amp;theme=179f6f137887ec7cc125a15c\u0026amp;signature=9fa1be2224313470140352c843e7968cd80cc73a2a8981862932f3a14957edba\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gourmand/qqUux6uIb1VEqf7R/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gobi\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6b7280\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gourmand.dev/guides/codebase-documentation-awareness\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/codebase-documentation-awareness.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gourmand.dev/#organization\",\"name\":\"Gobi\",\"url\":\"https://docs.gourmand.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gourmand/Fufdu9C2YIS7Ue9k/logo/light.svg?fit=max\u0026auto=format\u0026n=Fufdu9C2YIS7Ue9k\u0026q=85\u0026s=75483d9dfd34deabbbdabd8b2ded02d0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gourmand.dev#website\",\"name\":\"Gobi\",\"url\":\"https://docs.gourmand.dev\",\"publisher\":{\"@id\":\"https://docs.gourmand.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness#webpage\",\"url\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness\",\"name\":\"How to Make Agent mode Aware of Codebases and Documentation\",\"description\":\"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\",\"isPartOf\":{\"@id\":\"https://docs.gourmand.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.gourmand.dev/guides/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make Agent mode Aware of Codebases and Documentation\",\"item\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness#article\",\"headline\":\"How to Make Agent mode Aware of Codebases and Documentation\",\"name\":\"How to Make Agent mode Aware of Codebases and Documentation\",\"description\":\"Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance\",\"url\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gourmand.dev/guides/codebase-documentation-awareness#webpage\"},\"keywords\":\"agent, codebase, documentation, MCP, context, RAG, tools\",\"publisher\":{\"@id\":\"https://docs.gourmand.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gourmand.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gobi\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Gobi\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/codebase-documentation-awareness.md","siteName":"Gobi","nav":{"global":{"anchors":[{"anchor":"About Us","icon":"book-open","href":"https://gourmand.dev/about-us"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/TODO"},{"anchor":"Blog","icon":"newspaper","href":"https://gourmand.dev/blog"},{"anchor":"Release Notes","icon":"bullhorn","href":"https://changelog.gourmand.dev/"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Customize","pages":[{"title":"Customize","href":"/customize/overview"}]},{"tab":"Hub","pages":[{"title":"Hub","href":"/hub/introduction"}]},{"tab":"Guides","groups":[{"group":"Guides","pages":[{"title":"How to Use Gobi Guides","href":"/guides/overview"},{"title":"How to Understand Hub vs Local Configuration","href":"/guides/understanding-configs"},{"title":"Configuring Models, Rules, and Tools","description":"Learn how to work with Gobi's configuration system. Understand how to use hub models, rules, and tools, create local configurations, and organize your setup for maximum reusability.","href":"/guides/configuring-models-rules-tools"},{"title":"How to Make Agent mode Aware of Codebases and Documentation","sidebarTitle":"Codebase and Documentation Awareness","href":"/guides/codebase-documentation-awareness"},{"title":"How to Use Gobi CLI (cn)","sidebarTitle":"Gobi CLI (cn)","description":"Learn how to use Gobi's command-line interface for context engineering, automated coding tasks, and headless development workflows with customizable models, rules, and tools","href":"/guides/cli"},{"title":"Automating Documentation Updates with Gobi CLI","sidebarTitle":"Automating Documentation Updates with Gobi CLI","href":"/guides/doc-writing-agent-cli"},{"title":"Continuous AI: A Developer's Guide","href":"/guides/continuous-ai"},{"title":"Assessing Your Team's Readiness for Continuous AI","sidebarTitle":"Continuous AI Readiness Assessment","href":"/guides/continuous-ai-readiness-assessment"},{"title":"Using Plan Mode with Gobi","href":"/guides/plan-mode-guide"},{"title":"Using Ollama with Gobi: A Developer's Guide","href":"/guides/ollama-guide"},{"title":"Using Instinct with Ollama in Gobi","href":"/guides/instinct"},{"title":"How to Run Gobi Without Internet","href":"/guides/running-gobi-without-internet"},{"title":"How to Build Custom Code RAG","href":"/guides/custom-code-rag"},{"title":"How to Self-Host a Model","href":"/guides/how-to-self-host-a-model"},{"title":"Developer \u0026 Team Workflows with Notion + Gobi CLI","sidebarTitle":"Notion with Gobi","href":"/guides/notion-gobi-guide"}]},{"group":"Cookbooks","icon":"book-open-cover","pages":[{"title":"Building a Continuous AI Workflow with PostHog and GitHub","sidebarTitle":"PostHog Analytics with Gobi CLI","href":"/guides/posthog-github-continuous-ai"},{"title":"Contributing to Gobi with Model Context Protocol (MCP)","sidebarTitle":"Gobi Docs MCP Cookbook","href":"/guides/gobi-docs-mcp-cookbook"},{"title":"GitHub Issues and PRs with GitHub MCP and Gobi","sidebarTitle":"GitHub Issues with Gobi","href":"/guides/github-mcp-gobi-cookbook"},{"title":"Content Management with Sanity MCP and Gobi","sidebarTitle":"Sanity CMS with Gobi","href":"/guides/sanity-mcp-gobi-cookbook"},{"title":"Automated Error Analysis with Sentry MCP","sidebarTitle":"Sentry Automated Error Analysis with MCP","href":"/guides/sentry-mcp-error-monitoring"},{"title":"Automated Security Scanning with Snyk MCP and Gobi","sidebarTitle":"Snyk Security Scanning with Gobi","href":"/guides/snyk-mcp-gobi-cookbook"},{"title":"Building Data Pipelines with dlt MCP and Gobi","sidebarTitle":"dlt Data Pipelines with Gobi","href":"/guides/dlt-mcp-gobi-cookbook"},{"title":"Netlify Performance Optimization Cookbook","sidebarTitle":"Using Netlify MCP for Performance Optimization","href":"/guides/netlify-mcp-continuous-deployment"},{"title":"Chrome DevTools Performance Optimization Cookbook","sidebarTitle":"Chrome DevTools MCP for Performance","href":"/guides/chrome-devtools-mcp-performance"}]}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference"}]}]},"basePath":"","title":"How to Make Agent mode Aware of Codebases and Documentation - Gobi","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["10e4515597"],"chunks":["BannerMarkdown-CVKwuln2.js","dist-CXMB3QQU.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}