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
Copy file name to clipboardExpand all lines: .github/docs-gen-prompts.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,21 +42,37 @@ These section headers from `copilot-instructions.md` are appended to the system
42
42
43
43
Given this module documentation from the Compose diamond proxy framework, enhance it by generating developer-grade content that is specific, actionable, and faithful to the provided contract data.
44
44
45
+
**CRITICAL: Use the EXACT function signatures, import paths, and storage information provided below. Do not invent or modify function names, parameter types, or import paths.**
46
+
45
47
1.**description**: A concise one-line description (max 100 chars) for the page subtitle. Derive from the module's purpose based on its functions and NatSpec. Do NOT include "module" or "for Compose diamonds" - just describe what it does.
46
48
2.**overview**: 2-3 sentence overview of what the module does and why it matters for diamonds (storage reuse, composition, safety).
47
-
3.**usageExample**: 10-20 lines of Solidity demonstrating how a facet would import and call this module. Use the real function names and signatures; include pragma and any required imports. Keep it minimal but compilable.
49
+
3.**usageExample**: 10-20 lines of Solidity demonstrating how a facet would import and call this module. Use the EXACT import path provided ({{importPath}}), EXACT function signatures from the Function Signatures section below, and pragma version {{pragmaVersion}}. Keep it minimal but compilable.
48
50
4.**bestPractices**: 2-3 bullets focused on safe and idiomatic use (access control, storage hygiene, upgrade awareness, error handling).
49
-
5.**integrationNotes**: Explain how the module interacts with diamond storage and how changes are visible to facets; note any invariants or ordering requirements.
51
+
5.**integrationNotes**: Explain how the module interacts with diamond storage and how changes are visible to facets; note any invariants or ordering requirements. Reference the storage information provided below.
50
52
6.**keyFeatures**: 2-4 bullets highlighting unique capabilities, constraints, or guarantees.
51
53
52
54
Contract Information:
53
55
- Name: {{title}}
54
56
- Current Description: {{description}}
57
+
- Import Path: {{importPath}}
58
+
- Pragma Version: {{pragmaVersion}}
55
59
- Functions: {{functionNames}}
60
+
- Function Signatures:
61
+
{{functionSignatures}}
56
62
- Events: {{eventNames}}
63
+
- Event Signatures:
64
+
{{eventSignatures}}
57
65
- Errors: {{errorNames}}
66
+
- Error Signatures:
67
+
{{errorSignatures}}
58
68
- Function Details:
59
69
{{functionDescriptions}}
70
+
- Storage Information:
71
+
{{storageContext}}
72
+
- Related Contracts:
73
+
{{relatedContracts}}
74
+
- Struct Definitions:
75
+
{{structDefinitions}}
60
76
61
77
Respond ONLY with valid JSON in this exact format (no markdown code blocks, no extra text):
62
78
{
@@ -74,21 +90,37 @@ Respond ONLY with valid JSON in this exact format (no markdown code blocks, no e
74
90
75
91
Given this facet documentation from the Compose diamond proxy framework, enhance it by generating precise, implementation-ready guidance.
76
92
93
+
**CRITICAL: Use the EXACT function signatures, import paths, and storage information provided below. Do not invent or modify function names, parameter types, or import paths.**
94
+
77
95
1.**description**: A concise one-line description (max 100 chars) for the page subtitle. Derive from the facet's purpose based on its functions and NatSpec. Do NOT include "facet" or "for Compose diamonds" - just describe what it does.
78
96
2.**overview**: 2-3 sentence summary of the facet's purpose and value inside a diamond (routing, orchestration, surface area).
79
-
3.**usageExample**: 10-20 lines showing how this facet is deployed or invoked within a diamond. Include pragma, imports, selector usage, and sample calls that reflect the real function names and signatures.
97
+
3.**usageExample**: 10-20 lines showing how this facet is deployed or invoked within a diamond. Use the EXACT import path provided ({{importPath}}), EXACT function signatures from the Function Signatures section below, pragma version {{pragmaVersion}}, and sample calls that reflect the real function names and signatures.
// Fallback to hardcoded prompt if template not loaded
@@ -176,7 +222,7 @@ function buildPrompt(data, contractType) {
176
222
177
223
2. **overview**: A clear, concise overview (2-3 sentences) explaining what this ${contractType} does and why it's useful in the context of diamond contracts.
178
224
179
-
3. **usageExample**: A practical Solidity code example (10-20 lines) showing how to use this ${contractType}. For modules, show importing and calling functions. For facets, show how it would be used in a diamond.
225
+
3. **usageExample**: A practical Solidity code example (10-20 lines) showing how to use this ${contractType}. For modules, show importing and calling functions. For facets, show how it would be used in a diamond. Use the EXACT import path and function signatures provided below.
180
226
181
227
4. **bestPractices**: 2-3 bullet points of best practices for using this ${contractType}.
IMPORTANT: Use the EXACT function signatures, import paths, and storage information provided above. Do not invent or modify function names, parameter types, or import paths.
197
256
198
257
Respond ONLY with valid JSON in this exact format (no markdown code blocks, no extra text):
0 commit comments