cp-toolkit 2.2.4 → 2.2.6

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.4",
3
+ "version": "2.2.6",
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",
@@ -122,7 +122,13 @@ export async function initCommand(directory, options) {
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);
@@ -164,7 +170,7 @@ export async function initCommand(directory, options) {
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,7 +207,7 @@ export async function initCommand(directory, options) {
201
207
  await fs.copy(rulesSourceDir, rulesTargetDir, { overwrite: true });
202
208
  }
203
209
 
204
- // 11. Copy AGENTS.md to root (required by doctor)
210
+ // 12. Copy AGENTS.md to root (required by doctor)
205
211
  spinner.text = 'Copying AGENTS.md...';
206
212
  const agentsSource = path.join(templatesDir, 'AGENTS.md');
207
213
  const agentsTarget = path.join(targetDir, 'AGENTS.md');
@@ -229,6 +235,7 @@ export async function initCommand(directory, options) {
229
235
  console.log(chalk.dim(' ├── copilot-workflows/') + chalk.cyan('← Workflow templates'));
230
236
  console.log(chalk.dim(' ├── scripts/ ') + chalk.cyan('← MCP server & utilities'));
231
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'));
232
239
  console.log(chalk.dim(' ├── ARCHITECTURE.md ') + chalk.cyan('← System documentation'));
233
240
  console.log(chalk.dim(' └── copilot-instructions.md'));
234
241
  console.log(chalk.dim(' .vscode/'));
@@ -743,6 +750,86 @@ Workflow templates in \`.github/copilot-workflows/\`:
743
750
  `;
744
751
  }
745
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
+
746
833
  export default initCommand;
747
834
 
748
835