cp-toolkit 2.2.0 → 2.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cp-toolkit",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
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",
@@ -91,13 +91,38 @@ export async function initCommand(directory, options) {
91
91
  // Create standard instruction files
92
92
  await createInstructionFiles(instructionsTargetDir);
93
93
 
94
- // 3. Setup .github/copilot-instructions.md
94
+ // 4. Setup .github/skills/ (essential skills referenced by agents)
95
+ spinner.text = 'Copying essential skills...';
96
+ const skillsTargetDir = path.join(targetDir, '.github', 'skills');
97
+ await fs.ensureDir(skillsTargetDir);
98
+
99
+ // Copy essential skills that agents reference
100
+ const essentialSkills = [
101
+ 'mobile-design',
102
+ 'frontend-design',
103
+ 'api-patterns',
104
+ 'database-design',
105
+ 'testing-patterns',
106
+ 'deployment-procedures',
107
+ 'architecture'
108
+ ];
109
+
110
+ for (const skill of essentialSkills) {
111
+ const skillSourceDir = path.join(templatesDir, 'skills', 'optional', skill);
112
+ if (fs.existsSync(skillSourceDir)) {
113
+ const skillTargetDir = path.join(skillsTargetDir, skill);
114
+ await fs.ensureDir(skillTargetDir);
115
+ await fs.copy(skillSourceDir, skillTargetDir, { overwrite: true });
116
+ }
117
+ }
118
+
119
+ // 5. Setup .github/copilot-instructions.md
95
120
  spinner.text = 'Creating copilot-instructions.md...';
96
121
  const instructionsPath = path.join(targetDir, '.github', 'copilot-instructions.md');
97
122
  const instructionsContent = generateCopilotInstructions(config);
98
123
  await fs.writeFile(instructionsPath, instructionsContent);
99
124
 
100
- // 4. Setup .vscode/mcp.json
125
+ // 6. Setup .vscode/mcp.json
101
126
  spinner.text = 'Configuring MCP Server...';
102
127
  const vscodeDir = path.join(targetDir, '.vscode');
103
128
  await fs.ensureDir(vscodeDir);
@@ -122,6 +147,14 @@ export async function initCommand(directory, options) {
122
147
  ],
123
148
  "disabled": false,
124
149
  "autoApprove": []
150
+ },
151
+ "antigravity": {
152
+ "command": "node",
153
+ "args": [
154
+ "${workspaceFolder}/.github/scripts/mcp-server.js"
155
+ ],
156
+ "disabled": false,
157
+ "autoApprove": []
125
158
  }
126
159
  }
127
160
  };
@@ -131,7 +164,7 @@ export async function initCommand(directory, options) {
131
164
  JSON.stringify(mcpConfig, null, 2)
132
165
  );
133
166
 
134
- // 5. Copy workflows to .github/workflows-copilot/ (optional reference)
167
+ // 7. Copy workflows to .github/workflows-copilot/ (optional reference)
135
168
  if (config.installEverything) {
136
169
  spinner.text = 'Copying workflows...';
137
170
  const workflowsSourceDir = path.join(templatesDir, 'workflows');
@@ -142,13 +175,43 @@ export async function initCommand(directory, options) {
142
175
  }
143
176
  }
144
177
 
178
+ // 8. Copy scripts to .github/scripts/
179
+ spinner.text = 'Copying scripts...';
180
+ const scriptsSourceDir = path.join(templatesDir, 'scripts');
181
+ const scriptsTargetDir = path.join(targetDir, '.github', 'scripts');
182
+ if (fs.existsSync(scriptsSourceDir)) {
183
+ await fs.ensureDir(scriptsTargetDir);
184
+ await fs.copy(scriptsSourceDir, scriptsTargetDir, { overwrite: true });
185
+ }
186
+
187
+ // 9. Copy ARCHITECTURE.md to .github/
188
+ spinner.text = 'Copying architecture documentation...';
189
+ const architectureSource = path.join(templatesDir, 'ARCHITECTURE.md');
190
+ const architectureTarget = path.join(targetDir, '.github', 'ARCHITECTURE.md');
191
+ if (fs.existsSync(architectureSource)) {
192
+ await fs.copy(architectureSource, architectureTarget, { overwrite: true });
193
+ }
194
+
195
+ // 10. Copy rules to .github/rules/
196
+ spinner.text = 'Copying rules...';
197
+ const rulesSourceDir = path.join(templatesDir, 'rules');
198
+ const rulesTargetDir = path.join(targetDir, '.github', 'rules');
199
+ if (fs.existsSync(rulesSourceDir)) {
200
+ await fs.ensureDir(rulesTargetDir);
201
+ await fs.copy(rulesSourceDir, rulesTargetDir, { overwrite: true });
202
+ }
203
+
145
204
  spinner.succeed(chalk.green('✨ Copilot Kit initialized successfully!'));
146
205
 
147
206
  console.log(chalk.bold('\nšŸ“ Created structure:'));
148
207
  console.log(chalk.dim(' .github/'));
149
208
  console.log(chalk.dim(' ā”œā”€ā”€ agents/ ') + chalk.cyan('← 20 specialist agents'));
209
+ console.log(chalk.dim(' ā”œā”€ā”€ skills/ ') + chalk.cyan('← Essential skills library'));
150
210
  console.log(chalk.dim(' ā”œā”€ā”€ instructions/ ') + chalk.cyan('← Language-specific rules'));
151
211
  console.log(chalk.dim(' ā”œā”€ā”€ copilot-workflows/') + chalk.cyan('← Workflow templates'));
212
+ console.log(chalk.dim(' ā”œā”€ā”€ scripts/ ') + chalk.cyan('← MCP server & utilities'));
213
+ console.log(chalk.dim(' ā”œā”€ā”€ rules/ ') + chalk.cyan('← Global AI rules'));
214
+ console.log(chalk.dim(' ā”œā”€ā”€ ARCHITECTURE.md ') + chalk.cyan('← System documentation'));
152
215
  console.log(chalk.dim(' └── copilot-instructions.md'));
153
216
  console.log(chalk.dim(' .vscode/'));
154
217
  console.log(chalk.dim(' └── mcp.json ') + chalk.cyan('← MCP server config'));
@@ -29,7 +29,7 @@ import {
29
29
  import * as fs from 'fs/promises';
30
30
  import * as path from 'path';
31
31
 
32
- const AGENT_ROOT = process.env.AGENT_ROOT || path.join(process.cwd(), '.agent');
32
+ const AGENT_ROOT = process.env.AGENT_ROOT || path.join(process.cwd(), '.github');
33
33
 
34
34
  // ============================================================================
35
35
  // HELPERS