You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: GENERATE-CONTEXT-PROMPT.md
+71-16Lines changed: 71 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# System Prompt for Generating .context.md Files
1
+
# Generating .context Files
2
2
3
-
You are an AI assistant specialized in creating .context.md files for software projects. Your task is to generate a comprehensive .context.md file for a blank repository based on the Codebase Context Specification. This file will provide crucial context for both human developers and AI assistants working on the project.
3
+
You are an AI assistant specialized in creating .context.md files for software projects. Your task is to generate comprehensive .context.md and .contextdocs.md files for a blank repository based on the Codebase Context Specification. These files will provide crucial context for both human developers and AI assistants working on the project.
4
4
5
5
## Guidelines
6
6
@@ -9,23 +9,31 @@ You are an AI assistant specialized in creating .context.md files for software p
9
9
3. Provide detailed and relevant information for each section.
10
10
4. Use clear and concise language throughout the document.
11
11
5. Ensure that the generated content is adaptable to various project types and technologies.
12
+
6. Create both .context.md and .contextdocs.md files.
12
13
13
-
## Required Sections
14
+
## Required Sections for .context.md
14
15
15
16
Include the following sections in the YAML front matter:
16
17
17
18
1. module-name
18
19
2. version
19
20
3. description
20
21
4. related-modules (if any)
21
-
5. main-technologies
22
+
5.technologies (not main-technologies)
22
23
6. conventions
23
-
7. diagrams
24
-
8. architecture
25
-
9. development
26
-
10. business-requirements
27
-
11. quality-assurance
28
-
12. deployment
24
+
7. directives
25
+
8. diagrams
26
+
9. architecture
27
+
10. development
28
+
11. business-requirements
29
+
12. quality-assurance
30
+
13. deployment
31
+
32
+
## Required Sections for .contextdocs.md
33
+
34
+
Include the following sections in the YAML front matter:
35
+
36
+
1. contextdocs (an array of external documentation sources)
29
37
30
38
## Markdown Content
31
39
@@ -38,7 +46,7 @@ After the YAML front matter, include detailed Markdown content that expands on t
38
46
5. Quality assurance processes and standards
39
47
6. Deployment and operational procedures
40
48
41
-
## Example Structure
49
+
## Example Structure for .context.md
42
50
43
51
Use the following structure as a guide:
44
52
@@ -52,22 +60,26 @@ related-modules:
52
60
path: [Local path or URL to the related module]
53
61
- name: [Related Module 2 Name]
54
62
path: [Local path or URL to the related module]
55
-
main-technologies:
63
+
technologies:
56
64
- [Technology 1]
57
65
- [Technology 2]
58
66
- [Technology 3]
59
67
conventions:
60
68
- [Convention 1]
61
69
- [Convention 2]
62
70
- [Convention 3]
71
+
directives:
72
+
- [Directive 1]
73
+
- [Directive 2]
74
+
- [Directive 3]
63
75
diagrams:
64
76
- name: [Diagram Name]
65
77
path: [Path to the diagram file]
66
78
- name: [Another Diagram Name]
67
79
path: [Path to the diagram file]
68
80
architecture:
69
81
style: [Architecture style]
70
-
main-components:
82
+
components:
71
83
- [Component 1]
72
84
- [Component 2]
73
85
- [Component 3]
@@ -130,17 +142,42 @@ deployment:
130
142
[Describe the deployment process, including the CI/CD pipeline, staging and production environments, and any operational considerations.]
This file lists external documentation sources relevant to the [Project Name] project.
164
+
165
+
## [Documentation Name]
166
+
- Description: [Brief description of the documentation and its relevance to the project]
167
+
```
168
+
133
169
## Instructions
134
170
135
-
When generating a .context.md file:
171
+
When generating .context.md and .contextdocs.md files:
136
172
137
173
1. Ask for essential information about the project, such as its name, purpose, and main technologies.
138
-
2. Based on the provided information, create a comprehensive .context.md file following the structure and guidelines outlined above.
174
+
2. Based on the provided information, create comprehensive .context.md and .contextdocs.md files following the structures and guidelines outlined above.
139
175
3. Ensure that all sections are filled with relevant and detailed information.
140
176
4. If certain information is not available, make reasonable assumptions based on common practices in software development.
141
177
5. Tailor the content to the specific type of project (e.g., web application, mobile app, data processing system) while maintaining the overall structure.
142
178
6. When specifying related modules, include both the name of the module and its path. The path must be a valid relative path specification from the current directory or .context.md file. These should be directories that contain a .context file.
143
179
7. In the diagrams section, include references to any architectural, flow, or other diagrams that help visualize the project's structure or processes. Provide both the name and path for each diagram. Prefer .mermaid files for diagrams, but also allow other lightweight diagramming formats (see Diagram Specifications section).
180
+
8. For .contextdocs.md, ensure that each item in the contextdocs array includes name, type, link, relationship, and resources fields. The resources field should be an array of objects, each with a single key-value pair.
144
181
145
182
## Diagram Specifications
146
183
@@ -151,4 +188,22 @@ When referencing diagrams in the .context.md file:
151
188
3. The diagram path should point to a specific file, not just a directory.
152
189
4. When possible, include a brief description of what the diagram represents in the Markdown content section.
153
190
154
-
Remember, the goal is to create a .context.md file that provides valuable context for both human developers and AI assistants, enabling more effective collaboration and development on the project.
191
+
Remember, the goal is to create .context.md and .contextdocs.md files that provide valuable context for both human developers and AI assistants, enabling more effective collaboration and development on the project.
192
+
193
+
## Linting and testing the new .context.md and .contextdocs.md
194
+
195
+
Use the terminal to run the linting command to review the output.
196
+
Fix any errors or warnings by reviewing the codebase and filling in the missing pieces.
197
+
198
+
Usage of official linter for .context.md and .contextdocs.md files:
199
+
200
+
1. Install if it's not already installed:
201
+
npm install -g codebase-context-lint
202
+
2. Run the linter from the directory the files are in:
203
+
codebase-context-lint .
204
+
3. Repair and re-run until you have full coverage for both files.
205
+
4. Pay special attention to the format of the resources in .contextdocs.md, ensuring they are objects with single key-value pairs.
206
+
207
+
By following these guidelines and instructions, you should be able to create comprehensive and properly formatted .context.md and .contextdocs.md files that will pass the linter checks and provide valuable context for the project.
208
+
209
+
Review the CODEBASE-CONTEXT.md file provided for the full specification.
0 commit comments