bps-kit 1.3.1 → 1.4.0
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/.bps-kit.json +2 -2
- package/CHANGELOG.md +15 -0
- package/README.md +2 -1
- package/bin/convert_to_vscode.js +17 -0
- package/package.json +1 -1
- package/templates/agents-template/rules/AGENTS.md +81 -0
- package/templates/agents-template/rules/GEMINI.md +7 -26
package/.bps-kit.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arqui
|
|
|
5
5
|
O formato é baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
|
|
6
6
|
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
|
7
7
|
|
|
8
|
+
## [1.4.0] - 2026-03-11
|
|
9
|
+
### Adicionado
|
|
10
|
+
- **AGENTS.md**: Novo arquivo de regras dedicado ao routing de agentes, extraído do `GEMINI.md`. Contém a tabela Keyword→Agent completa com 22 agentes mapeados, regras de boundary enforcement e file type ownership. Distribuído automaticamente em `.agents/rules/AGENTS.md` (Antigravity) e `.github/AGENTS.md` (VS Code Copilot via `--vscode`).
|
|
11
|
+
- **`convert_to_vscode.js`**: Suporte nativo ao `AGENTS.md` — o arquivo é convertido e copiado para `.github/AGENTS.md` com os mesmos path replacements do `GEMINI.md` (skills, vault, agents, scripts, frontmatter trigger).
|
|
12
|
+
|
|
13
|
+
### Corrigido
|
|
14
|
+
- **GEMINI.md**: 5 causas raiz que forçavam `Agent: orchestrator | Skill: none` como default foram eliminadas:
|
|
15
|
+
- `Auto-Selection Protocol` genérico substituído por referência à tabela concreta do `AGENTS.md`.
|
|
16
|
+
- Step 2 do checklist aponta explicitamente para `AGENTS.md` com instrução `NUNCA default orchestrator`.
|
|
17
|
+
- `PRE-FLIGHT OBRIGATÓRIO` reposicionado para pós-roteamento (passos 1-7) com revalidação anti-orchestrator.
|
|
18
|
+
- Step 5 agora carrega skills do frontmatter `skills:` do agente além do Intent Map.
|
|
19
|
+
- Gemini Mode `edit` não mais hardcoded para `orchestrator` — redireciona para Keyword→Agent table.
|
|
20
|
+
- Seção `Core Rule — Skills First` redundante removida (liberando espaço).
|
|
21
|
+
- `GEMINI.md` reduzido de 279 → 182 linhas (−35%) sem perda de informação.
|
|
22
|
+
|
|
8
23
|
## [1.2.0] - 2026-03-09
|
|
9
24
|
### Adicionado
|
|
10
25
|
- Novo template `ARCHITECTURE.md` distribuído junto ao kit, mapeando os 20 agentes com suas skills, skills organizadas por tier (basic/normal/extra), 12 workflows e scripts de validação disponíveis. Referenciado obrigatoriamente pelo `GEMINI.md` no startup da sessão.
|
package/README.md
CHANGED
|
@@ -43,7 +43,8 @@ npx bps-kit@latest --upgrade
|
|
|
43
43
|
Se você adicionou a flag `--vscode`, a arquitetura compilada será organicamente moldada para as regras da nuvem do GitHub (`.github/`):
|
|
44
44
|
- O manifesto base e as Workflows irão habitar o `.github/copilot-instructions.md`.
|
|
45
45
|
- As Skills ativas receberão glob patterns específicos (`applyTo: "**/*"`) protegendo seu ciclo de vida.
|
|
46
|
-
- As
|
|
46
|
+
- As 22 Personas são mapeadas individualmente em `.github/agents/*.agent.md` — com frontmatter Copilot nativo.
|
|
47
|
+
- O manifesto de routing de agentes (Keyword→Agent) é exportado para `.github/AGENTS.md`.
|
|
47
48
|
- A gigantesca Vault contendo +1000 skills inativas será armazenada inteligentemente em isolamento (`.copilot-vault/`), salvando permanentemente seu limite de Chat no VS Code de travar.
|
|
48
49
|
|
|
49
50
|
### 🪄 Autocalibragem de Base de Código (Workflow Analyzer)
|
package/bin/convert_to_vscode.js
CHANGED
|
@@ -26,6 +26,7 @@ async function convertToVsCode(destAgents, destBase) {
|
|
|
26
26
|
content = content.replace(/\.?\/?\.agents\/skills\//g, '.copilot-skills/');
|
|
27
27
|
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
28
28
|
content = content.replace(/\.?\/?\.agents\/rules\/GEMINI\.md/g, '.github/copilot-instructions.md');
|
|
29
|
+
content = content.replace(/\.?\/?\.agents\/rules\/AGENTS\.md/g, '.github/AGENTS.md');
|
|
29
30
|
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
30
31
|
content = content.replace(/\.?\/?\.agents\/ARCHITECTURE\.md/g, '.github/ARCHITECTURE.md');
|
|
31
32
|
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
@@ -40,6 +41,22 @@ async function convertToVsCode(destAgents, destBase) {
|
|
|
40
41
|
await fs.writeFile(path.join(gitHubDir, 'copilot-instructions.md'), content);
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
// 1.1 Converter AGENTS.md (routing rules) com os mesmos path replacements
|
|
45
|
+
const agentsMdPath = path.join(destAgents, 'rules', 'AGENTS.md');
|
|
46
|
+
if (await fs.pathExists(agentsMdPath)) {
|
|
47
|
+
let content = await fs.readFile(agentsMdPath, 'utf8');
|
|
48
|
+
content = content.replace(/\.?\/?\.agents\/skills\//g, '.copilot-skills/');
|
|
49
|
+
content = content.replace(/\.?\/?\.agents\/vault\//g, '.copilot-vault/');
|
|
50
|
+
content = content.replace(/\.?\/?\.agents\/rules\/GEMINI\.md/g, '.github/copilot-instructions.md');
|
|
51
|
+
content = content.replace(/\.?\/?\.agents\/rules\/AGENTS\.md/g, '.github/AGENTS.md');
|
|
52
|
+
content = content.replace(/\.?\/?\.agents\/VAULT_INDEX\.md/g, '.github/VAULT_INDEX.md');
|
|
53
|
+
content = content.replace(/\.?\/?\.agents\/ARCHITECTURE\.md/g, '.github/ARCHITECTURE.md');
|
|
54
|
+
content = content.replace(/\.?\/?\.agents\/agents\//g, '.github/agents/');
|
|
55
|
+
content = content.replace(/\.?\/?\.agents\/scripts\//g, '.github/scripts/');
|
|
56
|
+
content = content.replace(/trigger:\s*always_on/g, 'applyTo: "**/*"');
|
|
57
|
+
await fs.writeFile(path.join(gitHubDir, 'AGENTS.md'), content);
|
|
58
|
+
}
|
|
59
|
+
|
|
43
60
|
// 2. Mover as skills ativas inteiras (em vez de achatar) para preservar scripts em python embutidos e sub documentações!
|
|
44
61
|
// Importante: NÃO alocamos em .github/skills pois o Copilot engole todos os Markdowns de lá e causa sobrecarga de +60 referências!
|
|
45
62
|
const skillsDest = path.join(destAgents, 'skills');
|
package/package.json
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# AGENTS.md — Agent Routing & Boundary Rules
|
|
6
|
+
|
|
7
|
+
> Este arquivo define COMO rotear requests para o agente correto e suas regras de fronteira.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🔴 REGRA #1: orchestrator NÃO é default
|
|
12
|
+
|
|
13
|
+
> **orchestrator = SOMENTE quando 2+ domínios distintos precisam trabalhar juntos.**
|
|
14
|
+
> Se o request cabe em 1 agente → use esse agente diretamente.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🗺️ Keyword → Agent (primeira correspondência)
|
|
19
|
+
|
|
20
|
+
| Keywords no request | Agent | Skills (frontmatter) |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| component, react, ui, ux, css, tailwind, frontend, hook, state | `frontend-specialist` | clean-code, frontend-design, react-patterns, tailwind-patterns |
|
|
23
|
+
| landing page, site, website, hero, parallax, one-pager | `site-builder` | scroll-experience, enhance-prompt, frontend-design, design-md |
|
|
24
|
+
| backend, server, api, endpoint, auth, express, fastapi, hono | `backend-specialist` | api-patterns, database-design, backend-dev-guidelines |
|
|
25
|
+
| schema, SQL, migration, prisma, drizzle, database design | `database-architect` | database-design, prisma-expert |
|
|
26
|
+
| bug, error, crash, not working, broken, fix, investigate | `debugger` | systematic-debugging |
|
|
27
|
+
| test, testing, coverage, TDD, E2E, jest, vitest | `test-engineer` | testing-patterns, test-driven-development |
|
|
28
|
+
| mobile, iOS, Android, React Native, Flutter, Expo | `mobile-developer` | mobile-design |
|
|
29
|
+
| security, vulnerability, audit, OWASP | `security-auditor` | vulnerability-scanner |
|
|
30
|
+
| pentest, red team, exploit | `penetration-tester` | vulnerability-scanner |
|
|
31
|
+
| deploy, CI/CD, Docker, infrastructure, PM2 | `devops-engineer` | docker-expert |
|
|
32
|
+
| performance, speed, Web Vitals, optimize, profiling | `performance-optimizer` | performance-profiling |
|
|
33
|
+
| SEO, meta tags, ranking, sitemap | `seo-specialist` | seo-fundamentals |
|
|
34
|
+
| plan, roadmap, task breakdown, milestones | `project-planner` | brainstorming, plan-writing |
|
|
35
|
+
| requirements, user stories, backlog | `product-manager` | plan-writing, brainstorming |
|
|
36
|
+
| MVP, strategy, product vision | `product-owner` | plan-writing, brainstorming |
|
|
37
|
+
| game, unity, godot, phaser, multiplayer | `game-developer` | — |
|
|
38
|
+
| n8n, webhook, automation, workflow automation | `automation-specialist` | n8n-mcp-tools-expert, n8n-workflow-patterns |
|
|
39
|
+
| docs, README, documentation, manual | `documentation-writer` | — |
|
|
40
|
+
| legacy code, refactor, tech debt | `code-archaeologist` | clean-code |
|
|
41
|
+
| codebase analysis, map, discovery, explore | `explorer-agent` | — |
|
|
42
|
+
| E2E automation, CI pipeline, QA pipeline | `qa-automation-engineer` | testing-patterns |
|
|
43
|
+
| coordinate, orchestrate, 2+ domains simultâneos | `orchestrator` | plan-writing, behavioral-modes |
|
|
44
|
+
|
|
45
|
+
### Protocolo de Uso
|
|
46
|
+
|
|
47
|
+
1. **Match keywords** do request na tabela acima (primeira correspondência)
|
|
48
|
+
2. **Ler** `.agents/agents/{agent}.md` → carregar skills do frontmatter `skills:`
|
|
49
|
+
3. **Anunciar**: `🤖 **Applying knowledge of @[agent-name]...**`
|
|
50
|
+
4. **Carregar skills**: Ler cada SKILL.md listada no frontmatter
|
|
51
|
+
5. **Anunciar**: `📖 Using skill: [nome]` — para CADA skill carregada
|
|
52
|
+
6. **Se Agent=orchestrator** → revalidar: o request REALMENTE precisa de 2+ agentes?
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🔴 Agent Boundary Enforcement
|
|
57
|
+
|
|
58
|
+
**Cada agente DEVE ficar no seu domínio. Cross-domain = VIOLAÇÃO.**
|
|
59
|
+
|
|
60
|
+
| Agent | ✅ CAN Do | ❌ CANNOT Do |
|
|
61
|
+
|-------|----------|-------------|
|
|
62
|
+
| `frontend-specialist` | Components, UI, styles, hooks | Test files, API routes, DB |
|
|
63
|
+
| `backend-specialist` | API, server logic, DB queries | UI components, styles |
|
|
64
|
+
| `test-engineer` | Test files, mocks, coverage | Production code |
|
|
65
|
+
| `mobile-developer` | RN/Flutter, mobile UX | Web components |
|
|
66
|
+
| `database-architect` | Schema, migrations, queries | UI, API logic |
|
|
67
|
+
| `security-auditor` | Audit, vulnerabilities | Feature code, UI |
|
|
68
|
+
| `devops-engineer` | CI/CD, deployment, infra | Application code |
|
|
69
|
+
| `debugger` | Bug fixes, root cause | New features |
|
|
70
|
+
| `explorer-agent` | Codebase discovery | Write operations |
|
|
71
|
+
|
|
72
|
+
### File Type Ownership
|
|
73
|
+
|
|
74
|
+
| File Pattern | Owner Agent |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `**/*.test.{ts,tsx,js}`, `**/__tests__/**` | `test-engineer` |
|
|
77
|
+
| `**/components/**` | `frontend-specialist` |
|
|
78
|
+
| `**/api/**`, `**/server/**` | `backend-specialist` |
|
|
79
|
+
| `**/prisma/**`, `**/drizzle/**` | `database-architect` |
|
|
80
|
+
|
|
81
|
+
> Se um agente precisa escrever fora do seu domínio → INVOCAR o agente correto para aquele arquivo.
|
|
@@ -18,10 +18,10 @@ trigger: always_on
|
|
|
18
18
|
ANTES de escrever QUALQUER código ou resposta:
|
|
19
19
|
|
|
20
20
|
□ 1. CLASSIFICAR o request (QUESTION / SIMPLE / COMPLEX / DESIGN)
|
|
21
|
-
□ 2. ROTEAR
|
|
21
|
+
□ 2. ROTEAR via AGENTS.md — Keyword→Agent table (NUNCA default orchestrator)
|
|
22
22
|
□ 3. ANUNCIAR: 🤖 **Applying knowledge of `@[agent-name]`...**
|
|
23
23
|
□ 4. LER o arquivo .md do agente (ex: .agents/agents/frontend-specialist.md)
|
|
24
|
-
□ 5.
|
|
24
|
+
□ 5. CARREGAR skills do frontmatter `skills:` do agente (+ Intent Map p/ extras)
|
|
25
25
|
□ 6. LER cada SKILL.md relevante
|
|
26
26
|
□ 7. ANUNCIAR: 📖 Using skill: [nome] — para CADA skill usada
|
|
27
27
|
□ 8. SOCRATIC GATE: Se build/feature → PERGUNTAR mínimo 3 questões estratégicas
|
|
@@ -35,7 +35,7 @@ ANTES de escrever QUALQUER código ou resposta:
|
|
|
35
35
|
- **📖 SKILLS FIRST**: Se não anunciou `📖 Using skill:` → VOLTE e releia este bloco.
|
|
36
36
|
- **⚠️ SEM SKILL**: Se nenhuma skill for relevante, diga: `⚠️ No skill used — responding from base knowledge.`
|
|
37
37
|
- **🛑 NUNCA** pule o Socratic Gate em requests de build/feature/create.
|
|
38
|
-
- **📣 PRE-FLIGHT OBRIGATÓRIO**:
|
|
38
|
+
- **📣 PRE-FLIGHT OBRIGATÓRIO**: Após rotear agente+skill (passos 1-7), confirme: `⚙️ Agent: [nome] | Skill: [nome ou none] | 🇧🇷 PT-BR` — se Agent=orchestrator, revalide: é MESMO multi-domínio?
|
|
39
39
|
- **🆘 /recall TRIGGER**: Se o usuário digitar `/recall` → PARE tudo, releia este arquivo imediatamente, e responda: `✅ Re-ancorado. Agent=[X] | Skill=[X] | PT-BR=SIM` antes de continuar.
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -69,9 +69,6 @@ Agent activated → Check frontmatter "skills:" → Read SKILL.md (INDEX) → Re
|
|
|
69
69
|
- **Active skills**: in `.agents/skills/` — see `ARCHITECTURE.md` for full list
|
|
70
70
|
- **Vault skills** (~1200+): in `.agents/vault/` — discoverable via index
|
|
71
71
|
|
|
72
|
-
### Core Rule — Skills First
|
|
73
|
-
After invoking any skill, explicitly say: '📖 Using skill: [skill-name]' before proceeding. If no skill was used, say: '⚠️ No skill used — responding from base knowledge.'
|
|
74
|
-
|
|
75
72
|
### Routing Flow
|
|
76
73
|
1. Check if an **active skill** covers the request → use it directly
|
|
77
74
|
2. If not → open `.agents/VAULT_INDEX.md` to find a vault skill
|
|
@@ -121,26 +118,10 @@ After invoking any skill, explicitly say: '📖 Using skill: [skill-name]' befor
|
|
|
121
118
|
|
|
122
119
|
## 🤖 INTELLIGENT AGENT ROUTING (STEP 2 - AUTO)
|
|
123
120
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
2. **Select Agent(s)**: Choose the most appropriate specialist(s).
|
|
127
|
-
3. **Inform User**: State which expertise is being applied.
|
|
128
|
-
4. **Apply**: Generate response using the selected agent's persona and rules.
|
|
129
|
-
|
|
130
|
-
### Response Format (MANDATORY)
|
|
131
|
-
```markdown
|
|
132
|
-
🤖 **Applying knowledge of `@[agent-name]`...**
|
|
133
|
-
[Continue with specialized response]
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Agent Routing Checklist (Before ANY code/design)
|
|
121
|
+
> 🔴 **Leia `.agents/rules/AGENTS.md` para a tabela Keyword→Agent completa.**
|
|
122
|
+
> Regra absoluta: orchestrator = SOMENTE multi-domínio (2+ agentes). NUNCA como default.
|
|
137
123
|
|
|
138
|
-
|
|
139
|
-
|------|-------|--------------|
|
|
140
|
-
| 1 | Identified correct agent? | → STOP. Analyze domain first. |
|
|
141
|
-
| 2 | Read agent's `.md` file? | → STOP. Open `.agents/agents/{agent}.md` |
|
|
142
|
-
| 3 | Announced agent? | → STOP. Add announcement. |
|
|
143
|
-
| 4 | Loaded required skills? | → STOP. Check `skills:` field. |
|
|
124
|
+
**Protocolo:** Match keywords → Ler agent `.md` → Carregar skills do frontmatter → Anunciar ambos.
|
|
144
125
|
|
|
145
126
|
---
|
|
146
127
|
|
|
@@ -230,7 +211,7 @@ Before coding, answer: (1) Goal of agent/skill? (2) Principles to apply? (3) How
|
|
|
230
211
|
|---|---|---|
|
|
231
212
|
| **plan** | `project-planner` | 4-phase. NO CODE before Phase 4. |
|
|
232
213
|
| **ask** | - | Focus on understanding. |
|
|
233
|
-
| **edit** |
|
|
214
|
+
| **edit** | Keyword→Agent table | Route especialista. orchestrator só se 2+ domains. |
|
|
234
215
|
|
|
235
216
|
---
|
|
236
217
|
|