@ai-coders/context 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/dist/generators/agents/agentGenerator.d.ts +2 -0
- package/dist/generators/agents/agentGenerator.d.ts.map +1 -1
- package/dist/generators/agents/agentGenerator.js +29 -4
- package/dist/generators/agents/agentGenerator.js.map +1 -1
- package/dist/generators/documentation/codebaseMapGenerator.d.ts +45 -0
- package/dist/generators/documentation/codebaseMapGenerator.d.ts.map +1 -1
- package/dist/generators/documentation/codebaseMapGenerator.js +429 -10
- package/dist/generators/documentation/codebaseMapGenerator.js.map +1 -1
- package/dist/generators/documentation/documentationGenerator.d.ts +2 -0
- package/dist/generators/documentation/documentationGenerator.d.ts.map +1 -1
- package/dist/generators/documentation/documentationGenerator.js +28 -6
- package/dist/generators/documentation/documentationGenerator.js.map +1 -1
- package/dist/generators/documentation/index.d.ts +1 -1
- package/dist/generators/documentation/index.d.ts.map +1 -1
- package/dist/generators/plans/templates/planTemplate.d.ts.map +1 -1
- package/dist/generators/plans/templates/planTemplate.js +54 -18
- package/dist/generators/plans/templates/planTemplate.js.map +1 -1
- package/dist/generators/shared/structures/agents/definitions.d.ts +1 -1
- package/dist/generators/shared/structures/agents/definitions.d.ts.map +1 -1
- package/dist/generators/shared/structures/agents/definitions.js +554 -15
- package/dist/generators/shared/structures/agents/definitions.js.map +1 -1
- package/dist/generators/shared/structures/agents/factory.d.ts +17 -1
- package/dist/generators/shared/structures/agents/factory.d.ts.map +1 -1
- package/dist/generators/shared/structures/agents/factory.js +117 -91
- package/dist/generators/shared/structures/agents/factory.js.map +1 -1
- package/dist/generators/shared/structures/documentation/architecture.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/architecture.js +55 -0
- package/dist/generators/shared/structures/documentation/architecture.js.map +1 -1
- package/dist/generators/shared/structures/documentation/dataFlow.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/dataFlow.js +35 -0
- package/dist/generators/shared/structures/documentation/dataFlow.js.map +1 -1
- package/dist/generators/shared/structures/documentation/glossary.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/glossary.js +20 -0
- package/dist/generators/shared/structures/documentation/glossary.js.map +1 -1
- package/dist/generators/shared/structures/documentation/projectOverview.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/projectOverview.js +48 -0
- package/dist/generators/shared/structures/documentation/projectOverview.js.map +1 -1
- package/dist/generators/shared/structures/documentation/security.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/security.js +45 -0
- package/dist/generators/shared/structures/documentation/security.js.map +1 -1
- package/dist/generators/shared/structures/documentation/testing.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/testing.js +73 -0
- package/dist/generators/shared/structures/documentation/testing.js.map +1 -1
- package/dist/generators/shared/structures/documentation/tooling.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/tooling.js +59 -0
- package/dist/generators/shared/structures/documentation/tooling.js.map +1 -1
- package/dist/generators/shared/structures/documentation/workflow.d.ts.map +1 -1
- package/dist/generators/shared/structures/documentation/workflow.js +60 -0
- package/dist/generators/shared/structures/documentation/workflow.js.map +1 -1
- package/dist/generators/shared/structures/serialization.d.ts.map +1 -1
- package/dist/generators/shared/structures/serialization.js +5 -0
- package/dist/generators/shared/structures/serialization.js.map +1 -1
- package/dist/generators/shared/structures/skills/definitions.d.ts +1 -1
- package/dist/generators/shared/structures/skills/definitions.d.ts.map +1 -1
- package/dist/generators/shared/structures/skills/definitions.js +420 -11
- package/dist/generators/shared/structures/skills/definitions.js.map +1 -1
- package/dist/generators/shared/structures/skills/factory.d.ts +10 -1
- package/dist/generators/shared/structures/skills/factory.d.ts.map +1 -1
- package/dist/generators/shared/structures/skills/factory.js +55 -36
- package/dist/generators/shared/structures/skills/factory.js.map +1 -1
- package/dist/generators/shared/structures/types.d.ts +2 -0
- package/dist/generators/shared/structures/types.d.ts.map +1 -1
- package/dist/index.js +68 -59
- package/dist/index.js.map +1 -1
- package/dist/services/ai/schemas.d.ts +2 -0
- package/dist/services/ai/schemas.d.ts.map +1 -1
- package/dist/services/ai/schemas.js +3 -1
- package/dist/services/ai/schemas.js.map +1 -1
- package/dist/services/ai/tools/fillScaffoldingTool.d.ts +1 -0
- package/dist/services/ai/tools/fillScaffoldingTool.d.ts.map +1 -1
- package/dist/services/ai/tools/fillScaffoldingTool.js +19 -1
- package/dist/services/ai/tools/fillScaffoldingTool.js.map +1 -1
- package/dist/services/ai/tools/getCodebaseMapTool.d.ts +1 -1
- package/dist/services/ai/tools/getCodebaseMapTool.js +5 -1
- package/dist/services/ai/tools/getCodebaseMapTool.js.map +1 -1
- package/dist/services/ai/tools/initializeContextTool.d.ts.map +1 -1
- package/dist/services/ai/tools/initializeContextTool.js +13 -0
- package/dist/services/ai/tools/initializeContextTool.js.map +1 -1
- package/dist/services/autoFill/autoFillService.d.ts +52 -0
- package/dist/services/autoFill/autoFillService.d.ts.map +1 -0
- package/dist/services/autoFill/autoFillService.js +473 -0
- package/dist/services/autoFill/autoFillService.js.map +1 -0
- package/dist/services/autoFill/index.d.ts +2 -0
- package/dist/services/autoFill/index.d.ts.map +1 -0
- package/dist/services/autoFill/index.js +6 -0
- package/dist/services/autoFill/index.js.map +1 -0
- package/dist/services/init/initService.d.ts +2 -0
- package/dist/services/init/initService.d.ts.map +1 -1
- package/dist/services/init/initService.js +29 -3
- package/dist/services/init/initService.js.map +1 -1
- package/dist/services/semantic/contextBuilder.d.ts.map +1 -1
- package/dist/services/semantic/contextBuilder.js +2 -1
- package/dist/services/semantic/contextBuilder.js.map +1 -1
- package/dist/services/semantic/types.d.ts.map +1 -1
- package/dist/services/semantic/types.js +2 -0
- package/dist/services/semantic/types.js.map +1 -1
- package/dist/utils/i18n.d.ts +4 -2
- package/dist/utils/i18n.d.ts.map +1 -1
- package/dist/utils/i18n.js +8 -4
- package/dist/utils/i18n.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,427 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Skill structure definitions
|
|
3
|
+
* Skill structure definitions with static default content
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.securityAuditSkillStructure = exports.apiDesignSkillStructure = exports.featureBreakdownSkillStructure = exports.bugInvestigationSkillStructure = exports.refactoringSkillStructure = exports.documentationSkillStructure = exports.testGenerationSkillStructure = exports.codeReviewSkillStructure = exports.prReviewSkillStructure = exports.commitMessageSkillStructure = void 0;
|
|
7
7
|
const factory_1 = require("./factory");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Default Content Definitions
|
|
10
|
+
// ============================================================================
|
|
11
|
+
const commitMessageContent = {
|
|
12
|
+
whenToUse: `Use this skill when:
|
|
13
|
+
- Creating git commits after code changes
|
|
14
|
+
- Writing commit messages for staged changes
|
|
15
|
+
- Following conventional commit format for the project`,
|
|
16
|
+
instructions: `1. Review the staged changes using \`git diff --staged\`
|
|
17
|
+
2. Identify the type of change (feat, fix, docs, style, refactor, test, chore)
|
|
18
|
+
3. Determine the scope (component, module, or area affected)
|
|
19
|
+
4. Write a concise subject line (50 chars max, imperative mood)
|
|
20
|
+
5. Add body if needed to explain "why" not "what"
|
|
21
|
+
6. Reference issue numbers if applicable`,
|
|
22
|
+
examples: `**Feature commit:**
|
|
23
|
+
\`\`\`
|
|
24
|
+
feat(auth): add password reset functionality
|
|
25
|
+
|
|
26
|
+
Implement forgot password flow with email verification.
|
|
27
|
+
Users can now reset their password via email link.
|
|
28
|
+
|
|
29
|
+
Closes #123
|
|
30
|
+
\`\`\`
|
|
31
|
+
|
|
32
|
+
**Bug fix commit:**
|
|
33
|
+
\`\`\`
|
|
34
|
+
fix(api): handle null response in user lookup
|
|
35
|
+
|
|
36
|
+
Previously threw TypeError when user not found.
|
|
37
|
+
Now returns 404 with appropriate error message.
|
|
38
|
+
|
|
39
|
+
Fixes #456
|
|
40
|
+
\`\`\``,
|
|
41
|
+
guidelines: `- Use imperative mood: "add" not "added" or "adds"
|
|
42
|
+
- Keep subject line under 50 characters
|
|
43
|
+
- Separate subject from body with blank line
|
|
44
|
+
- Use body to explain why, not what (code shows what)
|
|
45
|
+
- Reference issues with "Closes #X" or "Fixes #X"
|
|
46
|
+
- One logical change per commit
|
|
47
|
+
- Don't end subject line with period`,
|
|
48
|
+
};
|
|
49
|
+
const prReviewContent = {
|
|
50
|
+
whenToUse: `Use this skill when:
|
|
51
|
+
- Reviewing a pull request before merge
|
|
52
|
+
- Providing feedback on proposed changes
|
|
53
|
+
- Validating PR meets project standards`,
|
|
54
|
+
instructions: `1. Read the PR description to understand the goal
|
|
55
|
+
2. Review the linked issue(s) for context
|
|
56
|
+
3. Check that tests are included and passing
|
|
57
|
+
4. Review code changes file by file
|
|
58
|
+
5. Verify documentation is updated if needed
|
|
59
|
+
6. Leave constructive feedback with specific suggestions
|
|
60
|
+
7. Approve, request changes, or comment based on findings`,
|
|
61
|
+
examples: `**Approval comment:**
|
|
62
|
+
\`\`\`
|
|
63
|
+
Looks good! Clean implementation with comprehensive tests.
|
|
64
|
+
|
|
65
|
+
Minor suggestion: Consider extracting the validation logic
|
|
66
|
+
in \`UserService.ts:45\` into a separate function for reusability.
|
|
67
|
+
|
|
68
|
+
Approved ✅
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
**Request changes:**
|
|
72
|
+
\`\`\`
|
|
73
|
+
Good progress, but a few items need attention:
|
|
74
|
+
|
|
75
|
+
1. Missing test for error handling in \`fetchUser()\`
|
|
76
|
+
2. The new endpoint needs documentation in the API docs
|
|
77
|
+
3. Consider adding input validation for the email field
|
|
78
|
+
|
|
79
|
+
Please address these and I'll re-review.
|
|
80
|
+
\`\`\``,
|
|
81
|
+
guidelines: `- Start with understanding the PR's goal
|
|
82
|
+
- Be constructive and specific in feedback
|
|
83
|
+
- Distinguish between required changes and suggestions
|
|
84
|
+
- Test the changes locally if complex
|
|
85
|
+
- Check for security implications
|
|
86
|
+
- Verify backward compatibility
|
|
87
|
+
- Approve only when confident in the changes`,
|
|
88
|
+
};
|
|
89
|
+
const codeReviewContent = {
|
|
90
|
+
whenToUse: `Use this skill when:
|
|
91
|
+
- Reviewing code changes for quality
|
|
92
|
+
- Checking adherence to coding standards
|
|
93
|
+
- Identifying potential bugs or issues`,
|
|
94
|
+
instructions: `1. Understand the context and purpose of the code
|
|
95
|
+
2. Check for correctness and logic errors
|
|
96
|
+
3. Evaluate code structure and organization
|
|
97
|
+
4. Look for potential performance issues
|
|
98
|
+
5. Check for security vulnerabilities
|
|
99
|
+
6. Verify error handling is appropriate
|
|
100
|
+
7. Assess readability and maintainability`,
|
|
101
|
+
examples: `**Code quality feedback:**
|
|
102
|
+
\`\`\`
|
|
103
|
+
// Before: Nested callbacks
|
|
104
|
+
fetchUser(id, (user) => {
|
|
105
|
+
fetchPosts(user.id, (posts) => {
|
|
106
|
+
render(posts);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Suggestion: Use async/await
|
|
111
|
+
const user = await fetchUser(id);
|
|
112
|
+
const posts = await fetchPosts(user.id);
|
|
113
|
+
render(posts);
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
**Security feedback:**
|
|
117
|
+
\`\`\`
|
|
118
|
+
// Issue: SQL injection vulnerability
|
|
119
|
+
const query = \`SELECT * FROM users WHERE id = \${userId}\`;
|
|
120
|
+
|
|
121
|
+
// Fix: Use parameterized query
|
|
122
|
+
const query = 'SELECT * FROM users WHERE id = ?';
|
|
123
|
+
db.query(query, [userId]);
|
|
124
|
+
\`\`\``,
|
|
125
|
+
guidelines: `- Focus on the most impactful issues first
|
|
126
|
+
- Explain why something is a problem
|
|
127
|
+
- Provide concrete suggestions for improvement
|
|
128
|
+
- Consider the developer's experience level
|
|
129
|
+
- Balance thoroughness with pragmatism
|
|
130
|
+
- Praise good patterns when you see them`,
|
|
131
|
+
};
|
|
132
|
+
const testGenerationContent = {
|
|
133
|
+
whenToUse: `Use this skill when:
|
|
134
|
+
- Writing tests for new functionality
|
|
135
|
+
- Adding tests for bug fixes (regression tests)
|
|
136
|
+
- Improving test coverage for existing code`,
|
|
137
|
+
instructions: `1. Identify the function/component to test
|
|
138
|
+
2. List the behaviors that need testing
|
|
139
|
+
3. Write tests for happy path scenarios
|
|
140
|
+
4. Add tests for edge cases and boundaries
|
|
141
|
+
5. Include error handling tests
|
|
142
|
+
6. Mock external dependencies appropriately
|
|
143
|
+
7. Verify tests are deterministic and isolated`,
|
|
144
|
+
examples: `**Unit test example:**
|
|
145
|
+
\`\`\`typescript
|
|
146
|
+
describe('calculateTotal', () => {
|
|
147
|
+
it('should sum item prices correctly', () => {
|
|
148
|
+
const items = [{ price: 10 }, { price: 20 }];
|
|
149
|
+
expect(calculateTotal(items)).toBe(30);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it('should return 0 for empty array', () => {
|
|
153
|
+
expect(calculateTotal([])).toBe(0);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it('should handle negative prices', () => {
|
|
157
|
+
const items = [{ price: 10 }, { price: -5 }];
|
|
158
|
+
expect(calculateTotal(items)).toBe(5);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
\`\`\``,
|
|
162
|
+
guidelines: `- Test behavior, not implementation
|
|
163
|
+
- Use descriptive test names that explain what and why
|
|
164
|
+
- Follow Arrange-Act-Assert pattern
|
|
165
|
+
- Keep tests independent and isolated
|
|
166
|
+
- Don't test external libraries
|
|
167
|
+
- Mock at the boundary, not everywhere
|
|
168
|
+
- Aim for fast, reliable tests`,
|
|
169
|
+
};
|
|
170
|
+
const documentationContent = {
|
|
171
|
+
whenToUse: `Use this skill when:
|
|
172
|
+
- Documenting new features or APIs
|
|
173
|
+
- Updating docs for code changes
|
|
174
|
+
- Creating README or getting started guides`,
|
|
175
|
+
instructions: `1. Identify the target audience
|
|
176
|
+
2. Determine what needs to be documented
|
|
177
|
+
3. Write clear, concise explanations
|
|
178
|
+
4. Include working code examples
|
|
179
|
+
5. Add any necessary diagrams or visuals
|
|
180
|
+
6. Review for clarity and completeness
|
|
181
|
+
7. Verify examples work with current code`,
|
|
182
|
+
examples: `**Function documentation:**
|
|
183
|
+
\`\`\`typescript
|
|
184
|
+
/**
|
|
185
|
+
* Calculates the total price of items in a cart.
|
|
186
|
+
*
|
|
187
|
+
* @param items - Array of cart items with price property
|
|
188
|
+
* @returns The sum of all item prices
|
|
189
|
+
* @throws {Error} If items is not an array
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* const total = calculateTotal([{ price: 10 }, { price: 20 }]);
|
|
193
|
+
* // Returns: 30
|
|
194
|
+
*/
|
|
195
|
+
function calculateTotal(items: CartItem[]): number
|
|
196
|
+
\`\`\``,
|
|
197
|
+
guidelines: `- Write for your audience's knowledge level
|
|
198
|
+
- Lead with the most important information
|
|
199
|
+
- Include working, copy-pasteable examples
|
|
200
|
+
- Keep documentation close to the code
|
|
201
|
+
- Update docs in the same PR as code changes
|
|
202
|
+
- Use consistent formatting and terminology`,
|
|
203
|
+
};
|
|
204
|
+
const refactoringContent = {
|
|
205
|
+
whenToUse: `Use this skill when:
|
|
206
|
+
- Improving code structure without changing behavior
|
|
207
|
+
- Reducing code duplication
|
|
208
|
+
- Simplifying complex logic`,
|
|
209
|
+
instructions: `1. Ensure adequate test coverage exists
|
|
210
|
+
2. Identify the specific improvement to make
|
|
211
|
+
3. Make one type of change at a time
|
|
212
|
+
4. Run tests after each change
|
|
213
|
+
5. Commit frequently with clear messages
|
|
214
|
+
6. Verify no behavior changes occurred`,
|
|
215
|
+
examples: `**Extract function:**
|
|
216
|
+
\`\`\`typescript
|
|
217
|
+
// Before: Inline validation logic
|
|
218
|
+
if (email && email.includes('@') && email.length > 5) {
|
|
219
|
+
// process email
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// After: Extracted to function
|
|
223
|
+
function isValidEmail(email: string): boolean {
|
|
224
|
+
return email && email.includes('@') && email.length > 5;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (isValidEmail(email)) {
|
|
228
|
+
// process email
|
|
229
|
+
}
|
|
230
|
+
\`\`\``,
|
|
231
|
+
guidelines: `- Never refactor without tests
|
|
232
|
+
- Small steps, frequent commits
|
|
233
|
+
- One refactoring type per commit
|
|
234
|
+
- If tests break, you changed behavior
|
|
235
|
+
- Use IDE refactoring tools when available
|
|
236
|
+
- Keep the PR focused and reviewable`,
|
|
237
|
+
};
|
|
238
|
+
const bugInvestigationContent = {
|
|
239
|
+
whenToUse: `Use this skill when:
|
|
240
|
+
- Investigating reported bugs
|
|
241
|
+
- Diagnosing unexpected behavior
|
|
242
|
+
- Finding the root cause of issues`,
|
|
243
|
+
instructions: `1. Reproduce the bug consistently
|
|
244
|
+
2. Gather information (logs, stack traces, steps)
|
|
245
|
+
3. Identify when the bug was introduced (git bisect)
|
|
246
|
+
4. Form a hypothesis about the cause
|
|
247
|
+
5. Verify hypothesis with debugging
|
|
248
|
+
6. Document the root cause
|
|
249
|
+
7. Plan the fix approach`,
|
|
250
|
+
examples: `**Bug investigation notes:**
|
|
251
|
+
\`\`\`
|
|
252
|
+
## Bug: User profile fails to load
|
|
253
|
+
|
|
254
|
+
### Reproduction:
|
|
255
|
+
1. Log in as any user
|
|
256
|
+
2. Navigate to /profile
|
|
257
|
+
3. Error: "Cannot read property 'name' of undefined"
|
|
258
|
+
|
|
259
|
+
### Investigation:
|
|
260
|
+
- Stack trace points to ProfilePage.tsx:25
|
|
261
|
+
- API returns 200 but empty body when session expired
|
|
262
|
+
- Bug introduced in commit abc123 (session refactor)
|
|
263
|
+
|
|
264
|
+
### Root cause:
|
|
265
|
+
Session middleware not checking token expiration correctly.
|
|
266
|
+
Returns empty response instead of 401.
|
|
267
|
+
|
|
268
|
+
### Fix approach:
|
|
269
|
+
Update session middleware to return 401 when token expired.
|
|
270
|
+
\`\`\``,
|
|
271
|
+
guidelines: `- Always reproduce before investigating
|
|
272
|
+
- Check recent changes that might relate
|
|
273
|
+
- Use debugger and logging strategically
|
|
274
|
+
- Document your findings
|
|
275
|
+
- Consider if bug exists elsewhere
|
|
276
|
+
- Write a regression test with the fix`,
|
|
277
|
+
};
|
|
278
|
+
const featureBreakdownContent = {
|
|
279
|
+
whenToUse: `Use this skill when:
|
|
280
|
+
- Planning new feature implementation
|
|
281
|
+
- Breaking large tasks into smaller pieces
|
|
282
|
+
- Creating implementation roadmap`,
|
|
283
|
+
instructions: `1. Understand the full feature requirements
|
|
284
|
+
2. Identify the main components needed
|
|
285
|
+
3. Break into independent, testable tasks
|
|
286
|
+
4. Identify dependencies between tasks
|
|
287
|
+
5. Order tasks by dependency and priority
|
|
288
|
+
6. Add acceptance criteria to each task
|
|
289
|
+
7. Flag any unknowns or risks`,
|
|
290
|
+
examples: `**Feature breakdown example:**
|
|
291
|
+
\`\`\`
|
|
292
|
+
## Feature: User Authentication
|
|
293
|
+
|
|
294
|
+
### Task 1: Database schema
|
|
295
|
+
- Add users table with email, password_hash, created_at
|
|
296
|
+
- Add sessions table with user_id, token, expires_at
|
|
297
|
+
- Acceptance: Migrations run successfully
|
|
298
|
+
|
|
299
|
+
### Task 2: Registration endpoint
|
|
300
|
+
- POST /api/auth/register
|
|
301
|
+
- Validate email format and password strength
|
|
302
|
+
- Hash password before storing
|
|
303
|
+
- Acceptance: Can create user, returns 201
|
|
304
|
+
|
|
305
|
+
### Task 3: Login endpoint
|
|
306
|
+
- POST /api/auth/login
|
|
307
|
+
- Verify credentials, create session
|
|
308
|
+
- Return JWT token
|
|
309
|
+
- Acceptance: Can login, receive valid token
|
|
310
|
+
|
|
311
|
+
### Dependencies:
|
|
312
|
+
Task 2 requires Task 1
|
|
313
|
+
Task 3 requires Task 1
|
|
314
|
+
\`\`\``,
|
|
315
|
+
guidelines: `- Each task should be independently testable
|
|
316
|
+
- Tasks should be small enough to complete in a day
|
|
317
|
+
- Clearly state acceptance criteria
|
|
318
|
+
- Identify and document dependencies
|
|
319
|
+
- Flag technical risks or unknowns early
|
|
320
|
+
- Consider parallel work opportunities`,
|
|
321
|
+
};
|
|
322
|
+
const apiDesignContent = {
|
|
323
|
+
whenToUse: `Use this skill when:
|
|
324
|
+
- Designing new API endpoints
|
|
325
|
+
- Restructuring existing APIs
|
|
326
|
+
- Planning API versioning strategy`,
|
|
327
|
+
instructions: `1. Define the resources and their relationships
|
|
328
|
+
2. Choose appropriate HTTP methods
|
|
329
|
+
3. Design URL structure following REST conventions
|
|
330
|
+
4. Define request/response schemas
|
|
331
|
+
5. Plan error handling and status codes
|
|
332
|
+
6. Consider pagination, filtering, sorting
|
|
333
|
+
7. Document the API specification`,
|
|
334
|
+
examples: `**RESTful API design:**
|
|
335
|
+
\`\`\`
|
|
336
|
+
# Users API
|
|
337
|
+
|
|
338
|
+
GET /api/v1/users # List users (paginated)
|
|
339
|
+
POST /api/v1/users # Create user
|
|
340
|
+
GET /api/v1/users/:id # Get user by ID
|
|
341
|
+
PUT /api/v1/users/:id # Update user
|
|
342
|
+
DELETE /api/v1/users/:id # Delete user
|
|
343
|
+
|
|
344
|
+
# Nested resources
|
|
345
|
+
GET /api/v1/users/:id/posts # Get user's posts
|
|
346
|
+
|
|
347
|
+
# Response format
|
|
348
|
+
{
|
|
349
|
+
"data": { ... },
|
|
350
|
+
"meta": { "page": 1, "total": 100 }
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
# Error format
|
|
354
|
+
{
|
|
355
|
+
"error": {
|
|
356
|
+
"code": "VALIDATION_ERROR",
|
|
357
|
+
"message": "Email is required",
|
|
358
|
+
"details": [...]
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
\`\`\``,
|
|
362
|
+
guidelines: `- Use nouns for resources, not verbs
|
|
363
|
+
- Use proper HTTP methods and status codes
|
|
364
|
+
- Version your API from the start
|
|
365
|
+
- Be consistent in naming and structure
|
|
366
|
+
- Provide clear error messages
|
|
367
|
+
- Document all endpoints
|
|
368
|
+
- Consider rate limiting and caching`,
|
|
369
|
+
};
|
|
370
|
+
const securityAuditContent = {
|
|
371
|
+
whenToUse: `Use this skill when:
|
|
372
|
+
- Reviewing code for security vulnerabilities
|
|
373
|
+
- Assessing authentication/authorization
|
|
374
|
+
- Checking for OWASP top 10 issues`,
|
|
375
|
+
instructions: `1. Review authentication implementation
|
|
376
|
+
2. Check authorization on all endpoints
|
|
377
|
+
3. Look for injection vulnerabilities
|
|
378
|
+
4. Verify input validation and sanitization
|
|
379
|
+
5. Check for sensitive data exposure
|
|
380
|
+
6. Review dependency security
|
|
381
|
+
7. Document findings with severity`,
|
|
382
|
+
examples: `**Security audit findings:**
|
|
383
|
+
\`\`\`
|
|
384
|
+
## Security Audit Report
|
|
385
|
+
|
|
386
|
+
### Critical
|
|
387
|
+
1. SQL Injection in UserController.ts:45
|
|
388
|
+
- Query constructed with string concatenation
|
|
389
|
+
- Fix: Use parameterized queries
|
|
390
|
+
|
|
391
|
+
### High
|
|
392
|
+
2. Missing authentication on /api/admin/*
|
|
393
|
+
- Admin routes accessible without auth
|
|
394
|
+
- Fix: Add auth middleware
|
|
395
|
+
|
|
396
|
+
### Medium
|
|
397
|
+
3. Sensitive data in logs
|
|
398
|
+
- Passwords logged in debug mode
|
|
399
|
+
- Fix: Sanitize logs, remove sensitive fields
|
|
400
|
+
|
|
401
|
+
### Recommendations
|
|
402
|
+
- Enable security headers (HSTS, CSP)
|
|
403
|
+
- Implement rate limiting
|
|
404
|
+
- Add input validation middleware
|
|
405
|
+
\`\`\``,
|
|
406
|
+
guidelines: `- Check OWASP top 10 vulnerabilities
|
|
407
|
+
- Never trust user input
|
|
408
|
+
- Review authentication carefully
|
|
409
|
+
- Verify authorization on all routes
|
|
410
|
+
- Check for sensitive data exposure
|
|
411
|
+
- Scan dependencies for known vulnerabilities
|
|
412
|
+
- Document findings with clear severity levels`,
|
|
413
|
+
};
|
|
414
|
+
// ============================================================================
|
|
415
|
+
// Skill Structure Exports
|
|
416
|
+
// ============================================================================
|
|
417
|
+
exports.commitMessageSkillStructure = (0, factory_1.createSkillStructure)('commit-message', 'Commit Message', 'Generates conventional commit messages following project conventions', 'Focus on conventional commits format, clear descriptions, and linking to issues.', commitMessageContent);
|
|
418
|
+
exports.prReviewSkillStructure = (0, factory_1.createSkillStructure)('pr-review', 'PR Review', 'Reviews pull requests for quality, completeness, and adherence to standards', 'Focus on code quality, test coverage, documentation, and potential issues.', prReviewContent);
|
|
419
|
+
exports.codeReviewSkillStructure = (0, factory_1.createSkillStructure)('code-review', 'Code Review', 'Reviews code changes for quality and best practices', 'Focus on maintainability, performance, security, and style consistency.', codeReviewContent);
|
|
420
|
+
exports.testGenerationSkillStructure = (0, factory_1.createSkillStructure)('test-generation', 'Test Generation', 'Generates comprehensive tests for code', 'Focus on unit tests, edge cases, mocking strategies, and test organization.', testGenerationContent);
|
|
421
|
+
exports.documentationSkillStructure = (0, factory_1.createSkillStructure)('documentation', 'Documentation', 'Creates and updates documentation', 'Focus on clarity, examples, API documentation, and keeping docs current.', documentationContent);
|
|
422
|
+
exports.refactoringSkillStructure = (0, factory_1.createSkillStructure)('refactoring', 'Refactoring', 'Refactors code to improve structure and maintainability', 'Focus on small incremental changes, test coverage, and preserving behavior.', refactoringContent);
|
|
423
|
+
exports.bugInvestigationSkillStructure = (0, factory_1.createSkillStructure)('bug-investigation', 'Bug Investigation', 'Investigates and diagnoses bugs', 'Focus on reproduction, root cause analysis, and fix verification.', bugInvestigationContent);
|
|
424
|
+
exports.featureBreakdownSkillStructure = (0, factory_1.createSkillStructure)('feature-breakdown', 'Feature Breakdown', 'Breaks down features into implementable tasks', 'Focus on clear requirements, dependencies, and estimation.', featureBreakdownContent);
|
|
425
|
+
exports.apiDesignSkillStructure = (0, factory_1.createSkillStructure)('api-design', 'API Design', 'Designs APIs following best practices', 'Focus on RESTful design, versioning, error handling, and documentation.', apiDesignContent);
|
|
426
|
+
exports.securityAuditSkillStructure = (0, factory_1.createSkillStructure)('security-audit', 'Security Audit', 'Audits code for security vulnerabilities', 'Focus on OWASP top 10, input validation, authentication, and authorization.', securityAuditContent);
|
|
18
427
|
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/definitions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/definitions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uCAAsE;AAEtE,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E,MAAM,oBAAoB,GAAwB;IAChD,SAAS,EAAE;;;uDAG0C;IAErD,YAAY,EAAE;;;;;yCAKyB;IAEvC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;OAkBL;IAEL,UAAU,EAAE;;;;;;qCAMuB;CACpC,CAAC;AAEF,MAAM,eAAe,GAAwB;IAC3C,SAAS,EAAE;;;wCAG2B;IAEtC,YAAY,EAAE;;;;;;0DAM0C;IAExD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;OAmBL;IAEL,UAAU,EAAE;;;;;;6CAM+B;CAC5C,CAAC;AAEF,MAAM,iBAAiB,GAAwB;IAC7C,SAAS,EAAE;;;uCAG0B;IAErC,YAAY,EAAE;;;;;;0CAM0B;IAExC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;OAuBL;IAEL,UAAU,EAAE;;;;;yCAK2B;CACxC,CAAC;AAEF,MAAM,qBAAqB,GAAwB;IACjD,SAAS,EAAE;;;4CAG+B;IAE1C,YAAY,EAAE;;;;;;+CAM+B;IAE7C,QAAQ,EAAE;;;;;;;;;;;;;;;;;OAiBL;IAEL,UAAU,EAAE;;;;;;+BAMiB;CAC9B,C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|
4
4
|
import { ScaffoldStructure } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Default content overrides for specific sections
|
|
7
|
+
*/
|
|
8
|
+
export interface SkillDefaultContent {
|
|
9
|
+
whenToUse?: string;
|
|
10
|
+
instructions?: string;
|
|
11
|
+
examples?: string;
|
|
12
|
+
guidelines?: string;
|
|
13
|
+
}
|
|
5
14
|
/**
|
|
6
15
|
* Create a skill structure with standard sections
|
|
7
16
|
*/
|
|
8
|
-
export declare function createSkillStructure(skillSlug: string, title: string, description: string, additionalContext?: string): ScaffoldStructure;
|
|
17
|
+
export declare function createSkillStructure(skillSlug: string, title: string, description: string, additionalContext?: string, defaultContent?: SkillDefaultContent): ScaffoldStructure;
|
|
9
18
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAmB,MAAM,UAAU,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,cAAc,CAAC,EAAE,mBAAmB,GACnC,iBAAiB,CAyDnB"}
|
|
@@ -4,10 +4,63 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createSkillStructure = createSkillStructure;
|
|
7
|
+
/**
|
|
8
|
+
* Map of section headings to content keys
|
|
9
|
+
*/
|
|
10
|
+
const SECTION_KEY_MAP = {
|
|
11
|
+
'When to Use': 'whenToUse',
|
|
12
|
+
'Instructions': 'instructions',
|
|
13
|
+
'Examples': 'examples',
|
|
14
|
+
'Guidelines': 'guidelines',
|
|
15
|
+
};
|
|
7
16
|
/**
|
|
8
17
|
* Create a skill structure with standard sections
|
|
9
18
|
*/
|
|
10
|
-
function createSkillStructure(skillSlug, title, description, additionalContext) {
|
|
19
|
+
function createSkillStructure(skillSlug, title, description, additionalContext, defaultContent) {
|
|
20
|
+
const sections = [
|
|
21
|
+
{
|
|
22
|
+
heading: 'When to Use',
|
|
23
|
+
order: 1,
|
|
24
|
+
contentType: 'prose',
|
|
25
|
+
guidance: `Briefly describe when this skill should be activated: ${description}`,
|
|
26
|
+
required: true,
|
|
27
|
+
headingLevel: 2,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
heading: 'Instructions',
|
|
31
|
+
order: 2,
|
|
32
|
+
contentType: 'list',
|
|
33
|
+
guidance: 'Step-by-step instructions for executing this skill. Be specific and actionable.',
|
|
34
|
+
exampleContent: '1. First step\n2. Second step\n3. Third step',
|
|
35
|
+
required: true,
|
|
36
|
+
headingLevel: 2,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
heading: 'Examples',
|
|
40
|
+
order: 3,
|
|
41
|
+
contentType: 'code-block',
|
|
42
|
+
guidance: 'Provide concrete examples of how to use this skill. Include input and expected output.',
|
|
43
|
+
required: true,
|
|
44
|
+
headingLevel: 2,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
heading: 'Guidelines',
|
|
48
|
+
order: 4,
|
|
49
|
+
contentType: 'list',
|
|
50
|
+
guidance: 'Best practices and guidelines for using this skill effectively.',
|
|
51
|
+
required: true,
|
|
52
|
+
headingLevel: 2,
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
// Apply default content to sections
|
|
56
|
+
if (defaultContent) {
|
|
57
|
+
for (const section of sections) {
|
|
58
|
+
const key = SECTION_KEY_MAP[section.heading];
|
|
59
|
+
if (key && defaultContent[key]) {
|
|
60
|
+
section.defaultContent = defaultContent[key];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
11
64
|
return {
|
|
12
65
|
fileType: 'skill',
|
|
13
66
|
documentName: skillSlug,
|
|
@@ -15,41 +68,7 @@ function createSkillStructure(skillSlug, title, description, additionalContext)
|
|
|
15
68
|
description,
|
|
16
69
|
tone: 'instructional',
|
|
17
70
|
audience: 'ai-agents',
|
|
18
|
-
sections
|
|
19
|
-
{
|
|
20
|
-
heading: 'When to Use',
|
|
21
|
-
order: 1,
|
|
22
|
-
contentType: 'prose',
|
|
23
|
-
guidance: `Briefly describe when this skill should be activated: ${description}`,
|
|
24
|
-
required: true,
|
|
25
|
-
headingLevel: 2,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
heading: 'Instructions',
|
|
29
|
-
order: 2,
|
|
30
|
-
contentType: 'list',
|
|
31
|
-
guidance: 'Step-by-step instructions for executing this skill. Be specific and actionable.',
|
|
32
|
-
exampleContent: '1. First step\n2. Second step\n3. Third step',
|
|
33
|
-
required: true,
|
|
34
|
-
headingLevel: 2,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
heading: 'Examples',
|
|
38
|
-
order: 3,
|
|
39
|
-
contentType: 'code-block',
|
|
40
|
-
guidance: 'Provide concrete examples of how to use this skill. Include input and expected output.',
|
|
41
|
-
required: true,
|
|
42
|
-
headingLevel: 2,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
heading: 'Guidelines',
|
|
46
|
-
order: 4,
|
|
47
|
-
contentType: 'list',
|
|
48
|
-
guidance: 'Best practices and guidelines for using this skill effectively.',
|
|
49
|
-
required: true,
|
|
50
|
-
headingLevel: 2,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
71
|
+
sections,
|
|
53
72
|
additionalContext,
|
|
54
73
|
};
|
|
55
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/factory.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/generators/shared/structures/skills/factory.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA2BH,oDA+DC;AA5ED;;GAEG;AACH,MAAM,eAAe,GAA8C;IACjE,aAAa,EAAE,WAAW;IAC1B,cAAc,EAAE,cAAc;IAC9B,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;CAC3B,CAAC;AAEF;;GAEG;AACH,SAAgB,oBAAoB,CAClC,SAAiB,EACjB,KAAa,EACb,WAAmB,EACnB,iBAA0B,EAC1B,cAAoC;IAEpC,MAAM,QAAQ,GAAsB;QAClC;YACE,OAAO,EAAE,aAAa;YACtB,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,yDAAyD,WAAW,EAAE;YAChF,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,CAAC;SAChB;QACD;YACE,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,iFAAiF;YAC3F,cAAc,EAAE,8CAA8C;YAC9D,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,CAAC;SAChB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,wFAAwF;YAClG,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,CAAC;SAChB;QACD;YACE,OAAO,EAAE,YAAY;YACrB,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,iEAAiE;YAC3E,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,CAAC;SAChB;KACF,CAAC;IAEF,oCAAoC;IACpC,IAAI,cAAc,EAAE,CAAC;QACnB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/B,OAAO,CAAC,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,SAAS;QACvB,KAAK;QACL,WAAW;QACX,IAAI,EAAE,eAAe;QACrB,QAAQ,EAAE,WAAW;QACrB,QAAQ;QACR,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -32,6 +32,8 @@ export interface ScaffoldSection {
|
|
|
32
32
|
required: boolean;
|
|
33
33
|
/** Heading level (2 = H2, 3 = H3) */
|
|
34
34
|
headingLevel?: 2 | 3;
|
|
35
|
+
/** Static default content when not autoFilled. Provides useful template content that works for any project. */
|
|
36
|
+
defaultContent?: string;
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* Complete scaffold structure definition
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generators/shared/structures/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,OAAO,GACP,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,GACX,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,gBAAgB,GAChB,QAAQ,GACR,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,mBAAmB,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generators/shared/structures/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,OAAO,GACP,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,GACX,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,gBAAgB,GAChB,QAAQ,GACR,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,mBAAmB,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,QAAQ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