cp-toolkit 2.2.3 → 2.2.5

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.
Files changed (71) hide show
  1. package/package.json +1 -1
  2. package/src/commands/add.js +23 -16
  3. package/src/commands/doctor.js +15 -10
  4. package/src/commands/init.js +147 -21
  5. package/templates/AGENTS.md +47 -0
  6. package/templates/ARCHITECTURE.md +42 -0
  7. package/templates/agents/backend-specialist.md +1 -0
  8. package/templates/agents/code-archaeologist.md +116 -106
  9. package/templates/agents/database-architect.md +1 -0
  10. package/templates/agents/debugger.md +1 -0
  11. package/templates/agents/devops-engineer.md +1 -0
  12. package/templates/agents/documentation-writer.md +1 -0
  13. package/templates/agents/explorer-agent.md +83 -73
  14. package/templates/agents/frontend-specialist.md +1 -0
  15. package/templates/agents/game-developer.md +1 -0
  16. package/templates/agents/mobile-developer.md +1 -0
  17. package/templates/agents/orchestrator.md +426 -416
  18. package/templates/agents/penetration-tester.md +1 -0
  19. package/templates/agents/performance-optimizer.md +1 -0
  20. package/templates/agents/product-manager.md +122 -112
  21. package/templates/agents/product-owner.md +105 -95
  22. package/templates/agents/project-planner.md +416 -406
  23. package/templates/agents/qa-automation-engineer.md +113 -103
  24. package/templates/agents/security-auditor.md +1 -0
  25. package/templates/agents/seo-specialist.md +1 -0
  26. package/templates/agents/test-engineer.md +1 -0
  27. package/templates/skills/core/behavioral-modes/SKILL.md +244 -242
  28. package/templates/skills/core/brainstorming/SKILL.md +166 -163
  29. package/templates/skills/core/mcp-builder/SKILL.md +178 -176
  30. package/templates/skills/core/parallel-agents/SKILL.md +187 -175
  31. package/templates/skills/core/plan-writing/SKILL.md +154 -152
  32. package/templates/skills/optional/api-patterns/SKILL.md +83 -81
  33. package/templates/skills/optional/app-builder/SKILL.md +78 -75
  34. package/templates/skills/optional/app-builder/templates/SKILL.md +41 -39
  35. package/templates/skills/optional/architecture/SKILL.md +58 -55
  36. package/templates/skills/optional/bash-linux/SKILL.md +201 -199
  37. package/templates/skills/optional/code-review-checklist/SKILL.md +110 -109
  38. package/templates/skills/optional/database-design/SKILL.md +54 -52
  39. package/templates/skills/optional/deployment-procedures/SKILL.md +243 -241
  40. package/templates/skills/optional/documentation-templates/SKILL.md +196 -194
  41. package/templates/skills/optional/frontend-design/SKILL.md +421 -418
  42. package/templates/skills/optional/game-development/2d-games/SKILL.md +120 -119
  43. package/templates/skills/optional/game-development/3d-games/SKILL.md +136 -135
  44. package/templates/skills/optional/game-development/SKILL.md +169 -167
  45. package/templates/skills/optional/game-development/game-art/SKILL.md +187 -185
  46. package/templates/skills/optional/game-development/game-audio/SKILL.md +192 -190
  47. package/templates/skills/optional/game-development/game-design/SKILL.md +131 -129
  48. package/templates/skills/optional/game-development/mobile-games/SKILL.md +110 -108
  49. package/templates/skills/optional/game-development/multiplayer/SKILL.md +133 -132
  50. package/templates/skills/optional/game-development/pc-games/SKILL.md +146 -144
  51. package/templates/skills/optional/game-development/vr-ar/SKILL.md +124 -123
  52. package/templates/skills/optional/game-development/web-games/SKILL.md +152 -150
  53. package/templates/skills/optional/geo-fundamentals/SKILL.md +158 -156
  54. package/templates/skills/optional/i18n-localization/SKILL.md +156 -154
  55. package/templates/skills/optional/lint-and-validate/SKILL.md +48 -45
  56. package/templates/skills/optional/mobile-design/SKILL.md +397 -394
  57. package/templates/skills/optional/nextjs-react-expert/SKILL.md +271 -267
  58. package/templates/skills/optional/nodejs-best-practices/SKILL.md +335 -333
  59. package/templates/skills/optional/performance-profiling/SKILL.md +145 -143
  60. package/templates/skills/optional/powershell-windows/SKILL.md +169 -167
  61. package/templates/skills/optional/python-patterns/SKILL.md +443 -441
  62. package/templates/skills/optional/red-team-tactics/SKILL.md +201 -199
  63. package/templates/skills/optional/seo-fundamentals/SKILL.md +130 -129
  64. package/templates/skills/optional/server-management/SKILL.md +163 -161
  65. package/templates/skills/optional/systematic-debugging/SKILL.md +111 -109
  66. package/templates/skills/optional/tailwind-patterns/SKILL.md +271 -269
  67. package/templates/skills/optional/tdd-workflow/SKILL.md +150 -149
  68. package/templates/skills/optional/testing-patterns/SKILL.md +179 -178
  69. package/templates/skills/optional/vulnerability-scanner/SKILL.md +278 -276
  70. package/templates/skills/optional/web-design-guidelines/SKILL.md +60 -57
  71. package/templates/skills/optional/webapp-testing/SKILL.md +188 -187
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cp-toolkit",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Copilot Toolkit - AI Agent framework for GitHub Copilot, Claude, Gemini CLI, and other AI assistants",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -13,6 +13,8 @@ const AGENT_TEMPLATES = {
13
13
  specialist: (name, description, triggers) => `---
14
14
  name: ${name}
15
15
  description: ${description}
16
+ version: 1.0
17
+ skills: clean-code
16
18
  ---
17
19
 
18
20
  # ${name}
@@ -39,6 +41,8 @@ ${triggers.map(t => `- ${t} related tasks`).join('\n')}
39
41
  reviewer: (name, description, triggers) => `---
40
42
  name: ${name}
41
43
  description: ${description}
44
+ version: 1.0
45
+ skills: clean-code, qa-automation-engineer
42
46
  ---
43
47
 
44
48
  # ${name}
@@ -76,7 +80,7 @@ description: ${description}
76
80
 
77
81
  export async function addCommand(type, name, options) {
78
82
  const targetDir = process.cwd();
79
-
83
+
80
84
  // Validate type
81
85
  const validTypes = ['agent', 'instruction'];
82
86
  if (!validTypes.includes(type)) {
@@ -84,7 +88,7 @@ export async function addCommand(type, name, options) {
84
88
  console.log(chalk.dim(` Valid types: ${validTypes.join(', ')}`));
85
89
  return;
86
90
  }
87
-
91
+
88
92
  // Check if cp-kit is initialized
89
93
  const githubDir = path.join(targetDir, '.github');
90
94
  if (!fs.existsSync(path.join(githubDir, 'copilot-instructions.md'))) {
@@ -92,9 +96,9 @@ export async function addCommand(type, name, options) {
92
96
  console.log(chalk.dim(' Run: cp-kit init'));
93
97
  return;
94
98
  }
95
-
99
+
96
100
  console.log(chalk.bold.cyan(`\n➕ Adding ${type}: ${name}\n`));
97
-
101
+
98
102
  switch (type) {
99
103
  case 'agent':
100
104
  await addAgent(githubDir, name, options);
@@ -107,12 +111,12 @@ export async function addCommand(type, name, options) {
107
111
 
108
112
  async function addAgent(githubDir, name, options) {
109
113
  const agentFile = path.join(githubDir, 'agents', `${name}.md`);
110
-
114
+
111
115
  if (fs.existsSync(agentFile)) {
112
116
  console.log(chalk.yellow(`⚠️ Agent "${name}" already exists.`));
113
117
  return;
114
118
  }
115
-
119
+
116
120
  const response = await prompts([
117
121
  {
118
122
  type: 'text',
@@ -136,30 +140,30 @@ async function addAgent(githubDir, name, options) {
136
140
  ]
137
141
  }
138
142
  ]);
139
-
143
+
140
144
  if (!response.description) {
141
145
  console.log(chalk.yellow('Aborted.'));
142
146
  return;
143
147
  }
144
-
148
+
145
149
  const triggers = response.triggers.split(',').map(t => t.trim());
146
150
  const content = AGENT_TEMPLATES[response.template](name, response.description, triggers);
147
-
151
+
148
152
  await fs.ensureDir(path.dirname(agentFile));
149
153
  await fs.writeFile(agentFile, content);
150
-
154
+
151
155
  console.log(chalk.green(`✅ Created agent: .github/agents/${name}.md`));
152
156
  console.log(chalk.dim(` Invoke with @${name} in Copilot Chat`));
153
157
  }
154
158
 
155
159
  async function addInstruction(githubDir, name, options) {
156
160
  const instrFile = path.join(githubDir, 'instructions', `${name}.instructions.md`);
157
-
161
+
158
162
  if (fs.existsSync(instrFile)) {
159
163
  console.log(chalk.yellow(`⚠️ Instruction "${name}" already exists.`));
160
164
  return;
161
165
  }
162
-
166
+
163
167
  const response = await prompts([
164
168
  {
165
169
  type: 'text',
@@ -174,13 +178,16 @@ async function addInstruction(githubDir, name, options) {
174
178
  initial: `${name} coding guidelines`
175
179
  }
176
180
  ]);
177
-
181
+
178
182
  if (!response.applyTo) {
179
183
  console.log(chalk.yellow('Aborted.'));
180
184
  return;
181
185
  }
182
-
186
+
183
187
  const content = `---
188
+ name: ${name}
189
+ description: ${response.description}
190
+ version: 1.0
184
191
  applyTo: "${response.applyTo}"
185
192
  ---
186
193
 
@@ -201,10 +208,10 @@ applyTo: "${response.applyTo}"
201
208
  ### Best Practices
202
209
  - [Add specific guidelines here]
203
210
  `;
204
-
211
+
205
212
  await fs.ensureDir(path.dirname(instrFile));
206
213
  await fs.writeFile(instrFile, content);
207
-
214
+
208
215
  console.log(chalk.green(`✅ Created instruction: .github/instructions/${name}.instructions.md`));
209
216
  console.log(chalk.dim(` Will apply to: ${response.applyTo}`));
210
217
  }
@@ -61,7 +61,7 @@ const CHECKS = [
61
61
  fix: 'Run: cp-kit init (with MCP option)'
62
62
  },
63
63
  {
64
- name: 'Instructions have valid applyTo',
64
+ name: 'Instructions have valid frontmatter (applyTo, version)',
65
65
  check: async (dir) => {
66
66
  const instrDir = path.join(dir, '.github', 'instructions');
67
67
  if (!await fs.pathExists(instrDir)) return true;
@@ -69,13 +69,15 @@ const CHECKS = [
69
69
  for (const file of files.filter(f => f.endsWith('.instructions.md'))) {
70
70
  const content = await fs.readFile(path.join(instrDir, file), 'utf-8');
71
71
  if (!content.includes('applyTo:')) return false;
72
+ if (!content.includes('version:')) return false;
73
+ if (!content.includes('description:')) return false;
72
74
  }
73
75
  return true;
74
76
  },
75
- fix: 'Add applyTo frontmatter to instruction files'
77
+ fix: 'Add version and description frontmatter to instruction files'
76
78
  },
77
79
  {
78
- name: 'Agents have valid frontmatter',
80
+ name: 'Agents have complete frontmatter (name, description, skills)',
79
81
  check: async (dir) => {
80
82
  const agentsDir = path.join(dir, '.github', 'agents');
81
83
  if (!await fs.pathExists(agentsDir)) return true;
@@ -84,30 +86,33 @@ const CHECKS = [
84
86
  const content = await fs.readFile(path.join(agentsDir, file), 'utf-8');
85
87
  if (!content.startsWith('---')) return false;
86
88
  if (!content.includes('name:')) return false;
89
+ if (!content.includes('description:')) return false;
90
+ if (!content.includes('skills:')) return false;
91
+ if (!content.includes('applyTo:')) return false;
87
92
  }
88
93
  return true;
89
94
  },
90
- fix: 'Add frontmatter with name: to agent files'
95
+ fix: 'Update agent files with full frontmatter (name, description, skills, applyTo)'
91
96
  }
92
97
  ];
93
98
 
94
99
  export async function doctorCommand() {
95
100
  const targetDir = process.cwd();
96
-
101
+
97
102
  console.log('');
98
103
  console.log(chalk.bold.cyan('🩺 cp-kit Doctor'));
99
104
  console.log(chalk.gray('─'.repeat(50)));
100
105
  console.log(chalk.gray(`Checking: ${targetDir}`));
101
106
  console.log('');
102
-
107
+
103
108
  let passed = 0;
104
109
  let failed = 0;
105
110
  let warnings = 0;
106
-
111
+
107
112
  for (const check of CHECKS) {
108
113
  try {
109
114
  const result = await check.check(targetDir);
110
-
115
+
111
116
  if (result) {
112
117
  console.log(chalk.green(' ✓ ') + check.name);
113
118
  passed++;
@@ -126,10 +131,10 @@ export async function doctorCommand() {
126
131
  failed++;
127
132
  }
128
133
  }
129
-
134
+
130
135
  console.log('');
131
136
  console.log(chalk.gray('─'.repeat(50)));
132
-
137
+
133
138
  if (failed === 0) {
134
139
  if (warnings > 0) {
135
140
  console.log(chalk.green.bold(`✓ All checks passed!`) + chalk.gray(` (${passed} passed, ${warnings} optional)`));
@@ -26,13 +26,13 @@ export async function initCommand(directory, options) {
26
26
  const templatesDir = path.join(__dirname, '../../templates');
27
27
 
28
28
  console.log(chalk.bold.cyan('\n🚀 cp-toolkit - GitHub Copilot Agent Toolkit\n'));
29
-
29
+
30
30
  // Create directory if needed
31
31
  if (directory && !fs.existsSync(targetDir)) {
32
32
  fs.mkdirSync(targetDir, { recursive: true });
33
33
  console.log(chalk.green(`📁 Created directory: ${dirName}`));
34
34
  }
35
-
35
+
36
36
  // Check for existing configuration
37
37
  const githubAgentsDir = path.join(targetDir, '.github', 'agents');
38
38
  if (fs.existsSync(githubAgentsDir) && !options.force) {
@@ -42,7 +42,7 @@ export async function initCommand(directory, options) {
42
42
  message: 'Copilot Kit (.github/agents) already exists. Overwrite?',
43
43
  initial: false
44
44
  });
45
-
45
+
46
46
  if (!overwrite) {
47
47
  console.log(chalk.yellow('⚠️ Aborted. Use --force to overwrite.'));
48
48
  return;
@@ -82,31 +82,31 @@ export async function initCommand(directory, options) {
82
82
  const agentsTargetDir = path.join(targetDir, '.github', 'agents');
83
83
  await fs.ensureDir(agentsTargetDir);
84
84
  await fs.copy(agentsSourceDir, agentsTargetDir, { overwrite: true });
85
-
85
+
86
86
  // 2. Setup .github/instructions/ (from skills that have instruction content)
87
87
  spinner.text = 'Copying instructions...';
88
88
  const instructionsTargetDir = path.join(targetDir, '.github', 'instructions');
89
89
  await fs.ensureDir(instructionsTargetDir);
90
-
90
+
91
91
  // Create standard instruction files
92
92
  await createInstructionFiles(instructionsTargetDir);
93
-
93
+
94
94
  // 4. Setup .github/skills/ (essential skills referenced by agents)
95
95
  spinner.text = 'Copying essential skills...';
96
96
  const skillsTargetDir = path.join(targetDir, '.github', 'skills');
97
97
  await fs.ensureDir(skillsTargetDir);
98
-
98
+
99
99
  // Copy essential skills that agents reference
100
100
  const essentialSkills = [
101
101
  'mobile-design',
102
- 'frontend-design',
102
+ 'frontend-design',
103
103
  'api-patterns',
104
104
  'database-design',
105
105
  'testing-patterns',
106
106
  'deployment-procedures',
107
107
  'architecture'
108
108
  ];
109
-
109
+
110
110
  for (const skill of essentialSkills) {
111
111
  const skillSourceDir = path.join(templatesDir, 'skills', 'optional', skill);
112
112
  if (fs.existsSync(skillSourceDir)) {
@@ -115,18 +115,24 @@ export async function initCommand(directory, options) {
115
115
  await fs.copy(skillSourceDir, skillTargetDir, { overwrite: true });
116
116
  }
117
117
  }
118
-
118
+
119
119
  // 5. Setup .github/copilot-instructions.md
120
120
  spinner.text = 'Creating copilot-instructions.md...';
121
121
  const instructionsPath = path.join(targetDir, '.github', 'copilot-instructions.md');
122
122
  const instructionsContent = generateCopilotInstructions(config);
123
123
  await fs.writeFile(instructionsPath, instructionsContent);
124
124
 
125
- // 6. Setup .vscode/mcp.json
125
+ // 6. Setup .github/cp-kit-models.yaml
126
+ spinner.text = 'Creating cp-kit-models.yaml...';
127
+ const modelsPath = path.join(targetDir, '.github', 'cp-kit-models.yaml');
128
+ const modelsContent = generateModelsConfig();
129
+ await fs.writeFile(modelsPath, modelsContent);
130
+
131
+ // 7. Setup .vscode/mcp.json
126
132
  spinner.text = 'Configuring MCP Server...';
127
133
  const vscodeDir = path.join(targetDir, '.vscode');
128
134
  await fs.ensureDir(vscodeDir);
129
-
135
+
130
136
  const mcpConfig = {
131
137
  "mcpServers": {
132
138
  "filesystem": {
@@ -158,13 +164,13 @@ export async function initCommand(directory, options) {
158
164
  }
159
165
  }
160
166
  };
161
-
167
+
162
168
  await fs.writeFile(
163
- path.join(vscodeDir, 'mcp.json'),
169
+ path.join(vscodeDir, 'mcp.json'),
164
170
  JSON.stringify(mcpConfig, null, 2)
165
171
  );
166
172
 
167
- // 7. Copy workflows to .github/workflows-copilot/ (optional reference)
173
+ // 8. Copy workflows to .github/workflows-copilot/ (optional reference)
168
174
  if (config.installEverything) {
169
175
  spinner.text = 'Copying workflows...';
170
176
  const workflowsSourceDir = path.join(templatesDir, 'workflows');
@@ -175,7 +181,7 @@ export async function initCommand(directory, options) {
175
181
  }
176
182
  }
177
183
 
178
- // 8. Copy scripts to .github/scripts/
184
+ // 9. Copy scripts to .github/scripts/
179
185
  spinner.text = 'Copying scripts...';
180
186
  const scriptsSourceDir = path.join(templatesDir, 'scripts');
181
187
  const scriptsTargetDir = path.join(targetDir, '.github', 'scripts');
@@ -184,7 +190,7 @@ export async function initCommand(directory, options) {
184
190
  await fs.copy(scriptsSourceDir, scriptsTargetDir, { overwrite: true });
185
191
  }
186
192
 
187
- // 9. Copy ARCHITECTURE.md to .github/
193
+ // 10. Copy ARCHITECTURE.md to .github/
188
194
  spinner.text = 'Copying architecture documentation...';
189
195
  const architectureSource = path.join(templatesDir, 'ARCHITECTURE.md');
190
196
  const architectureTarget = path.join(targetDir, '.github', 'ARCHITECTURE.md');
@@ -192,7 +198,7 @@ export async function initCommand(directory, options) {
192
198
  await fs.copy(architectureSource, architectureTarget, { overwrite: true });
193
199
  }
194
200
 
195
- // 10. Copy rules to .github/rules/
201
+ // 11. Copy rules to .github/rules/
196
202
  spinner.text = 'Copying rules...';
197
203
  const rulesSourceDir = path.join(templatesDir, 'rules');
198
204
  const rulesTargetDir = path.join(targetDir, '.github', 'rules');
@@ -201,8 +207,16 @@ export async function initCommand(directory, options) {
201
207
  await fs.copy(rulesSourceDir, rulesTargetDir, { overwrite: true });
202
208
  }
203
209
 
210
+ // 12. Copy AGENTS.md to root (required by doctor)
211
+ spinner.text = 'Copying AGENTS.md...';
212
+ const agentsSource = path.join(templatesDir, 'AGENTS.md');
213
+ const agentsTarget = path.join(targetDir, 'AGENTS.md');
214
+ if (fs.existsSync(agentsSource)) {
215
+ await fs.copy(agentsSource, agentsTarget, { overwrite: true });
216
+ }
217
+
204
218
  spinner.succeed(chalk.green('✨ Copilot Kit initialized successfully!'));
205
-
219
+
206
220
  console.log(chalk.bold('\n📁 Created structure:'));
207
221
  console.log(chalk.dim(' .github/'));
208
222
  console.log(chalk.dim(' ├── agents/ ') + chalk.cyan('← 20 specialist agents'));
@@ -221,15 +235,17 @@ export async function initCommand(directory, options) {
221
235
  console.log(chalk.dim(' ├── copilot-workflows/') + chalk.cyan('← Workflow templates'));
222
236
  console.log(chalk.dim(' ├── scripts/ ') + chalk.cyan('← MCP server & utilities'));
223
237
  console.log(chalk.dim(' ├── rules/ ') + chalk.cyan('← Global AI rules'));
238
+ console.log(chalk.dim(' ├── cp-kit-models.yaml') + chalk.cyan('← AI model allocation matrix'));
224
239
  console.log(chalk.dim(' ├── ARCHITECTURE.md ') + chalk.cyan('← System documentation'));
225
240
  console.log(chalk.dim(' └── copilot-instructions.md'));
226
241
  console.log(chalk.dim(' .vscode/'));
227
242
  console.log(chalk.dim(' └── mcp.json ') + chalk.cyan('← MCP server config'));
228
-
243
+
229
244
  console.log(chalk.bold('\n🚀 Next Steps:'));
230
245
  console.log(` 1. ${chalk.cyan('Reload VS Code window')} to activate MCP servers`);
231
246
  console.log(` 2. Open Copilot Chat and try: ${chalk.yellow('@workspace use the orchestrator agent')}`);
232
247
  console.log(` 3. Or try a workflow: ${chalk.yellow('/create a React component')}`);
248
+ console.log(chalk.green('\n✅ Smart Context patterns applied to agents.'));
233
249
 
234
250
  } catch (error) {
235
251
  spinner.fail(chalk.red('❌ Failed to initialize Copilot Kit'));
@@ -243,6 +259,9 @@ export async function initCommand(directory, options) {
243
259
  async function createInstructionFiles(instructionsDir) {
244
260
  const instructions = {
245
261
  'typescript-development.instructions.md': `---
262
+ name: typescript-development
263
+ description: Strict guidelines for TypeScript development including type safety, modules, and error handling.
264
+ version: 1.0
246
265
  applyTo: "**/*.ts,**/*.tsx,**/*.mts,**/*.cts"
247
266
  ---
248
267
 
@@ -273,6 +292,9 @@ applyTo: "**/*.ts,**/*.tsx,**/*.mts,**/*.cts"
273
292
  `,
274
293
 
275
294
  'javascript-development.instructions.md': `---
295
+ name: javascript-development
296
+ description: Best practices for modern JavaScript development including ES6+ features and functional patterns.
297
+ version: 1.0
276
298
  applyTo: "**/*.js,**/*.mjs,**/*.cjs"
277
299
  ---
278
300
 
@@ -306,6 +328,9 @@ applyTo: "**/*.js,**/*.mjs,**/*.cjs"
306
328
  `,
307
329
 
308
330
  'react-development.instructions.md': `---
331
+ name: react-development
332
+ description: Component patterns, state management, and accessibility standards for React development.
333
+ version: 1.0
309
334
  applyTo: "**/*.jsx,**/*.tsx,**/*react*"
310
335
  ---
311
336
 
@@ -344,7 +369,10 @@ applyTo: "**/*.jsx,**/*.tsx,**/*react*"
344
369
  `,
345
370
 
346
371
  'nextjs-development.instructions.md': `---
347
- applyTo: "**/pages/**,**/app/**,**/components/**,**/lib/**,**/utils/**"
372
+ name: nextjs-development
373
+ description: Guidelines for Next.js development including App Router, Server Components, and SEO optimization.
374
+ version: 1.0
375
+ applyTo: "**/app/**,**/components/**,**/lib/**,**/utils/**"
348
376
  ---
349
377
 
350
378
  # Next.js Development Guidelines
@@ -383,6 +411,9 @@ applyTo: "**/pages/**,**/app/**,**/components/**,**/lib/**,**/utils/**"
383
411
  `,
384
412
 
385
413
  'python-development.instructions.md': `---
414
+ name: python-development
415
+ description: Best practices for Python development including type hints, async/await, and testing.
416
+ version: 1.0
386
417
  applyTo: "**/*.py"
387
418
  ---
388
419
 
@@ -422,6 +453,9 @@ applyTo: "**/*.py"
422
453
  `,
423
454
 
424
455
  'security-development.instructions.md': `---
456
+ name: security-development
457
+ description: Comprehensive security guidelines including auth, data protection, and web security.
458
+ version: 1.0
425
459
  applyTo: "**/auth/**,**/security/**,**/*auth*,**/*token*,**/*session*,**/middleware/**"
426
460
  ---
427
461
 
@@ -464,6 +498,9 @@ applyTo: "**/auth/**,**/security/**,**/*auth*,**/*token*,**/*session*,**/middlew
464
498
  `,
465
499
 
466
500
  'database-development.instructions.md': `---
501
+ name: database-development
502
+ description: Standards for schema design, query optimization, and database migrations.
503
+ version: 1.0
467
504
  applyTo: "**/prisma/**,**/*.sql,**/migrations/**,**/schema.*,**/db/**,**/models/**"
468
505
  ---
469
506
 
@@ -506,6 +543,9 @@ applyTo: "**/prisma/**,**/*.sql,**/migrations/**,**/schema.*,**/db/**,**/models/
506
543
  `,
507
544
 
508
545
  'testing-development.instructions.md': `---
546
+ name: testing-development
547
+ description: Guidelines for test structure, frameworks, and code coverage best practices.
548
+ version: 1.0
509
549
  applyTo: "**/*.test.*,**/*.spec.*,**/tests/**,**/__tests__/**"
510
550
  ---
511
551
 
@@ -547,6 +587,9 @@ applyTo: "**/*.test.*,**/*.spec.*,**/tests/**,**/__tests__/**"
547
587
  `,
548
588
 
549
589
  'api-development.instructions.md': `---
590
+ name: api-development
591
+ description: RESTful API design standards including versioning, error handling, and documentation.
592
+ version: 1.0
550
593
  applyTo: "**/api/**,**/routes/**,**/controllers/**,**/services/**,**/*api*,**/*endpoint*"
551
594
  ---
552
595
 
@@ -589,6 +632,9 @@ applyTo: "**/api/**,**/routes/**,**/controllers/**,**/services/**,**/*api*,**/*e
589
632
  `,
590
633
 
591
634
  'github-actions.instructions.md': `---
635
+ name: github-actions
636
+ description: Standards for GitHub Actions workflows including security, performance, and best practices.
637
+ version: 1.0
592
638
  applyTo: ".github/workflows/**/*.yml,.github/workflows/**/*.yaml"
593
639
  ---
594
640
 
@@ -704,6 +750,86 @@ Workflow templates in \`.github/copilot-workflows/\`:
704
750
  `;
705
751
  }
706
752
 
753
+ function generateModelsConfig() {
754
+ return `# .github/cp-kit-models.yaml
755
+ # Matriz de Alocação de Modelos v2.0 (Full Agent Suite)
756
+
757
+ defaults:
758
+ temperature: 0.2
759
+ fallback_model: "gpt-5.1-codex"
760
+
761
+ agents:
762
+ # --- LIDERANÇA E ESTRATÉGIA ---
763
+ orchestrator:
764
+ model: "gpt-5.2"
765
+ reason: "Raciocínio mestre para coordenar múltiplos agentes e contextos complexos."
766
+ product-manager:
767
+ model: "claude-opus-4.5"
768
+ reason: "Melhor empatia com usuário e visão estratégica de produto."
769
+ product-owner:
770
+ model: "claude-opus-4.5"
771
+ reason: "Excelente na quebra de requisitos de negócios em user stories detalhadas."
772
+ project-planner:
773
+ model: "gpt-5"
774
+ reason: "Estruturação lógica impecável para cronogramas e dependências."
775
+
776
+ # --- DESENVOLVIMENTO CORE ---
777
+ backend-specialist:
778
+ model: "gpt-5.2-codex"
779
+ reason: "O estado da arte em lógica de servidor, APIs e tipagem estrita."
780
+ frontend-specialist:
781
+ model: "claude-sonnet-4.5"
782
+ reason: "Rei do CSS/React. Visualmente preciso e alucina menos em UI libraries."
783
+ mobile-developer:
784
+ model: "claude-sonnet-4.5"
785
+ reason: "Lida melhor com aninhamento complexo de componentes SwiftUI/Flutter."
786
+ game-developer:
787
+ model: "gpt-5.1-codex-max"
788
+ reason: "Necessário para física, matemática vetorial e lógica C++ pesada."
789
+
790
+ # --- QUALIDADE E SEGURANÇA ---
791
+ qa-automation-engineer:
792
+ model: "gpt-5.1-codex"
793
+ reason: "Geração robusta de scripts Cypress/Playwright."
794
+ test-engineer:
795
+ model: "gpt-5.1-codex-mini" # (Preview)
796
+ reason: "Econômico e rápido para gerar unit tests repetitivos."
797
+ security-auditor:
798
+ model: "gpt-5.2"
799
+ reason: "Capacidade profunda de encontrar falhas lógicas sutis no código."
800
+ penetration-tester:
801
+ model: "gpt-5.2-codex"
802
+ reason: "Precisa de criatividade de ataque + conhecimento profundo de código."
803
+ debugger:
804
+ model: "gpt-5.2"
805
+ reason: "Melhor raciocínio causal para encontrar a raiz de bugs obscuros."
806
+
807
+ # --- INFRA E DADOS ---
808
+ database-architect:
809
+ model: "gpt-5.1-codex"
810
+ reason: "SQL complexo e otimização de queries exigem precisão do Codex."
811
+ devops-engineer:
812
+ model: "grok-code-fast-1"
813
+ reason: "Velocidade bruta para logs e scripts declarativos (YAML/Bash)."
814
+ performance-optimizer:
815
+ model: "gpt-5.1-codex-max"
816
+ reason: "Conhecimento profundo de algoritmos e complexidade Big O."
817
+
818
+ # --- ESPECIALISTAS E LEGADO ---
819
+ code-archaeologist:
820
+ model: "gemini-3-pro" # (Preview)
821
+ reason: "Janela de contexto massiva para ler todo o legado de uma vez."
822
+ documentation-writer:
823
+ model: "gemini-2.5-pro"
824
+ reason: "Texto natural fluido e excelente capacidade de resumo."
825
+ seo-specialist:
826
+ model: "gemini-3-flash" # (Preview)
827
+ reason: "Acesso rápido a dados recentes e tendências de busca."
828
+ explorer-agent:
829
+ model: "raptor-mini" # (Preview)
830
+ reason: "Modelo experimental para ideias fora da caixa e prototipagem rápida."`;
831
+ }
832
+
707
833
  export default initCommand;
708
834
 
709
835
 
@@ -0,0 +1,47 @@
1
+ # Available Agents
2
+
3
+ This project is equipped with specialized AI agents to assist with development. Invoke them using `@workspace` in Copilot Chat or by their specific names.
4
+
5
+ ## Core Agents
6
+
7
+ | Agent | Description | Triggers |
8
+ |-------|-------------|----------|
9
+ | **orchestrator** | Multi-agent coordination and task decomposition. | `plan`, `organize`, `coordinate` |
10
+ | **project-planner** | Task breakdown and roadmap planning. | `plan`, `roadmap`, `tasks` |
11
+ | **explorer-agent** | Codebase mapping and architectural analysis. | `analyze`, `map`, `audit` |
12
+
13
+ ## Development Agents
14
+
15
+ | Agent | Description | Triggers |
16
+ |-------|-------------|----------|
17
+ | **frontend-specialist** | React/Next.js UI implementation. | `component`, `css`, `ui` |
18
+ | **backend-specialist** | Node.js/Python API and server logic. | `api`, `server`, `endpoint` |
19
+ | **mobile-developer** | React Native/Flutter app development. | `ios`, `android`, `mobile` |
20
+ | **database-architect** | Schema design and migrations. | `schema`, `sql`, `migration` |
21
+ | **game-developer** | Game mechanics and engine logic. | `unity`, `godot`, `game` |
22
+
23
+ ## Specialized Agents
24
+
25
+ | Agent | Description | Triggers |
26
+ |-------|-------------|----------|
27
+ | **test-engineer** | Unit and integration testing strategies. | `test`, `spec`, `coverage` |
28
+ | **qa-automation-engineer** | E2E and browser automation. | `e2e`, `cypress`, `playwright` |
29
+ | **security-auditor** | Vulnerability scanning and auth review. | `security`, `audit`, `auth` |
30
+ | **penetration-tester** | Offensive security testing. | `pentest`, `exploit` |
31
+ | **performance-optimizer** | Web vitals and bundle optimization. | `performance`, `slow`, `optimize` |
32
+ | **seo-specialist** | SEO and GEO (Generative Engine Optimization). | `seo`, `meta`, `robots` |
33
+ | **debugger** | Root cause analysis for complex bugs. | `debug`, `crash`, `error` |
34
+
35
+ ## Product Agents
36
+
37
+ | Agent | Description | Triggers |
38
+ |-------|-------------|----------|
39
+ | **product-manager** | Requirements gathering and PRDs. | `requirements`, `user story` |
40
+ | **product-owner** | Backlog prioritization and strategy. | `backlog`, `roadmap` |
41
+ | **code-archaeologist** | Understanding legacy systems. | `legacy`, `refactor` |
42
+ | **devops-engineer** | CI/CD, Docker, and infrastructure. | `deploy`, `docker`, `ci` |
43
+ | **documentation-writer** | Technical documentation. | `docs`, `readme` |
44
+
45
+ ---
46
+
47
+ > **Tip:** Use `cp-toolkit list agents` to see this list in your CLI.
@@ -17,6 +17,48 @@ Antigravity Kit is a modular system consisting of:
17
17
 
18
18
  ---
19
19
 
20
+ ## 📝 Template Standards
21
+
22
+ All toolkit files MUST follow the strict metadata standard (YAML Frontmatter) to ensure proper indexing by GitHub Copilot and the CP-Toolkit CLI.
23
+
24
+ ### AGENTS (`/agents/*.md`)
25
+ ```yaml
26
+ ---
27
+ name: agent-name # lowercase-slug
28
+ description: "..." # Concise mandatory description
29
+ version: 1.0 # Current version
30
+ skills: skill-a, skill-b # Comma-separated list of primary skills
31
+ ---
32
+ ```
33
+
34
+ ### SKILLS (`/skills/**/SKILL.md`)
35
+ ```yaml
36
+ ---
37
+ name: skill-name # lowercase-slug
38
+ description: "..." # Detailed capability description
39
+ version: 1.0 # Mandatory version tracking
40
+ ---
41
+ ```
42
+
43
+ ### INSTRUCTIONS (`/instructions/*.instructions.md`)
44
+ ```yaml
45
+ ---
46
+ name: instruction-name
47
+ description: "..."
48
+ version: 1.0
49
+ applyTo: "**/*.ext" # Glob pattern for Copilot context
50
+ ---
51
+ ```
52
+
53
+ ### RULES (`/rules/GEMINI.md`)
54
+ ```yaml
55
+ ---
56
+ trigger: always_on # Activation trigger
57
+ ---
58
+ ```
59
+
60
+ ---
61
+
20
62
  ## 🏗️ Directory Structure
21
63
 
22
64
  ```plaintext
@@ -4,6 +4,7 @@ description: Expert backend architect for Node.js, Python, and modern serverless
4
4
  tools: Read, Grep, Glob, Bash, Edit, Write
5
5
  model: inherit
6
6
  skills: clean-code, nodejs-best-practices, python-patterns, api-patterns, database-design, mcp-builder, lint-and-validate, powershell-windows, bash-linux
7
+ applyTo: ["**/api/**", "**/*.server.*", "**/controllers/**", "**/*.service.ts"]
7
8
  ---
8
9
 
9
10
  # Backend Development Architect