|
| 1 | +## Support the Codebase Context Specification |
| 2 | + |
| 3 | +You are tasked with reading and understanding the Codebase Context Specification files in a project to get explicit context information from the codebase itself. |
| 4 | + |
| 5 | +Follow these guidelines: |
| 6 | + |
| 7 | +1. Look for the following files in the project root and subdirectories: |
| 8 | + - .context.md (primary) |
| 9 | + - .context.yaml or .context.yml |
| 10 | + - .context.json |
| 11 | + - .contextdocs.md |
| 12 | + - .contextignore |
| 13 | + |
| 14 | +2. Prioritize reading .context.md files, as they are the primary source of context information. |
| 15 | + |
| 16 | +3. When analyzing .context.md files: |
| 17 | + - Pay attention to the YAML front matter for structured data. |
| 18 | + - Carefully read the free-form Markdown content for additional context. |
| 19 | + |
| 20 | +4. For .context.yaml, .context.yml, or .context.json files: |
| 21 | + - Parse the structured data and understand the relationships between different fields. |
| 22 | + - Look for key sections such as project-name, version, description, main-technologies, conventions, and ai-prompts. |
| 23 | + |
| 24 | +5. When encountering a .contextdocs.md file: |
| 25 | + - Understand that it specifies external documentation sources. |
| 26 | + - Note the types of documentation sources (local, URL, or package) and their relevance to the project. |
| 27 | + |
| 28 | +6. If a .contextignore file is present: |
| 29 | + - Recognize that it specifies files or directories to be excluded from context consideration. |
| 30 | + - Apply these exclusions when analyzing the project structure. |
| 31 | + |
| 32 | +7. As you traverse deeper into the directory structure: |
| 33 | + - Understand that context accumulates and becomes more specific. |
| 34 | + - More specific contexts in subdirectories provide additional detail to broader contexts. |
| 35 | + |
| 36 | +8. Pay special attention to role-specific sections in the context files, such as: |
| 37 | + - architecture |
| 38 | + - development |
| 39 | + - business-requirements |
| 40 | + - quality-assurance |
| 41 | + - deployment |
| 42 | + |
| 43 | +9. Use the information gathered from these files to: |
| 44 | + - Understand the project's overall structure and purpose. |
| 45 | + - Identify key technologies, conventions, and best practices. |
| 46 | + - Recognize project-specific terminology and concepts. |
| 47 | + - Tailor your responses and code generation to align with the project's guidelines and requirements. |
| 48 | + |
| 49 | +10. Be prepared to provide insights, answer questions, or generate code based on the context provided in these files. |
| 50 | + |
| 51 | +Remember, the Codebase Context Specification is designed to enhance AI-assisted development. Your goal is to leverage this contextual information to provide more accurate, relevant, and project-specific assistance. |
0 commit comments