maestro-skills 0.1.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/.github/workflows/ci.yml +26 -0
- package/.github/workflows/publish-npm.yml +30 -0
- package/CONTRIBUTING.md +31 -0
- package/LICENSE +21 -0
- package/README.md +300 -0
- package/SECURITY.md +33 -0
- package/docs/github-workflow.md +96 -0
- package/docs/maestro-skills-cli.md +113 -0
- package/package.json +35 -0
- package/packages/maestro-skills/README.md +37 -0
- package/packages/maestro-skills/agents.json +36 -0
- package/packages/maestro-skills/bin/cli.js +37 -0
- package/packages/maestro-skills/lib/detect-agents.js +28 -0
- package/packages/maestro-skills/lib/install.js +58 -0
- package/packages/maestro-skills/lib/paths.js +42 -0
- package/packages/maestro-skills/lib/remove.js +71 -0
- package/packages/maestro-skills/lib/run-manifest.js +92 -0
- package/packages/maestro-skills/lib/setup.js +115 -0
- package/packages/maestro-skills/package.json +47 -0
- package/packages/maestro-skills/test/agents.test.js +17 -0
- package/packages/rodovalhofs-maestro/agents.json +36 -0
- package/packages/rodovalhofs-maestro/bin/cli.js +10 -0
- package/packages/rodovalhofs-maestro/lib/detect-agents.js +28 -0
- package/packages/rodovalhofs-maestro/lib/install.js +58 -0
- package/packages/rodovalhofs-maestro/lib/paths.js +42 -0
- package/packages/rodovalhofs-maestro/lib/remove.js +71 -0
- package/packages/rodovalhofs-maestro/lib/run-manifest.js +92 -0
- package/packages/rodovalhofs-maestro/lib/setup.js +115 -0
- package/packages/rodovalhofs-maestro/package.json +33 -0
- package/scripts/sync-skill-to-cli.mjs +75 -0
- package/scripts/sync-templates.ps1 +22 -0
- package/skills/maestro/SKILL.md +272 -0
- package/skills/maestro/maestro-exclude.example.txt +6 -0
- package/skills/maestro/scripts/bm25.py +70 -0
- package/skills/maestro/scripts/build_manifest.py +183 -0
- package/skills/maestro/scripts/concept_gaps.py +196 -0
- package/skills/maestro/scripts/domains.py +148 -0
- package/skills/maestro/scripts/intents.py +167 -0
- package/skills/maestro/scripts/maestro_paths.py +41 -0
- package/skills/maestro/scripts/route_tasks.py +101 -0
- package/skills/maestro/scripts/routing.py +106 -0
- package/skills/maestro/scripts/search_skills.py +287 -0
- package/skills/maestro/scripts/synonyms.py +47 -0
- package/templates/.github/ISSUE_TEMPLATE/bug_report.yml +34 -0
- package/templates/.github/ISSUE_TEMPLATE/chore.yml +17 -0
- package/templates/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/templates/.github/ISSUE_TEMPLATE/feature_request.yml +27 -0
- package/templates/.github/workflows/ci-failure-to-issue.yml +47 -0
- package/templates/.github/workflows/ci.yml +27 -0
- package/templates/CONTRIBUTING.md +22 -0
- package/templates/labels.json +12 -0
- package/templates/pull_request_template.md +18 -0
- package/tests/fixtures/sample-manifest.json +76 -0
- package/tests/test_concept_gaps.py +63 -0
- package/tests/test_maestro_paths.py +29 -0
- package/tests/test_search_routing.py +161 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Testes maestro
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: "20"
|
|
21
|
+
- run: node scripts/sync-skill-to-cli.mjs
|
|
22
|
+
- run: python -m unittest discover -s tests -v
|
|
23
|
+
- run: npm install
|
|
24
|
+
working-directory: packages/maestro-skills
|
|
25
|
+
- run: npm test
|
|
26
|
+
working-directory: packages/maestro-skills
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: "20"
|
|
19
|
+
registry-url: "https://registry.npmjs.org"
|
|
20
|
+
- run: node scripts/sync-skill-to-cli.mjs
|
|
21
|
+
- run: npm ci
|
|
22
|
+
working-directory: packages/maestro-skills
|
|
23
|
+
- run: npm publish --access public
|
|
24
|
+
working-directory: packages/maestro-skills
|
|
25
|
+
env:
|
|
26
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
+
- run: npm publish --access public
|
|
28
|
+
working-directory: packages/rodovalhofs-maestro
|
|
29
|
+
env:
|
|
30
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contribuindo
|
|
2
|
+
|
|
3
|
+
Obrigado pelo interesse no Maestro. Este projeto é open source (MIT).
|
|
4
|
+
|
|
5
|
+
## Como contribuir
|
|
6
|
+
|
|
7
|
+
1. Faça fork do repositório.
|
|
8
|
+
2. Crie uma branch: `feat/<slug>` ou `fix/<slug>`.
|
|
9
|
+
3. Para mudanças no motor de busca, inclua ou atualize testes em `tests/`.
|
|
10
|
+
4. Rode localmente:
|
|
11
|
+
```bash
|
|
12
|
+
python -m unittest discover -s tests -v
|
|
13
|
+
```
|
|
14
|
+
5. Abra um Pull Request para `main` com descrição clara do que mudou e por quê.
|
|
15
|
+
|
|
16
|
+
## Áreas bem-vindas
|
|
17
|
+
|
|
18
|
+
- Melhorias no ranking (intents, sinônimos, domínios)
|
|
19
|
+
- Novos casos de teste com fixtures
|
|
20
|
+
- Documentação e exemplos no README / SKILL.md
|
|
21
|
+
- Traduções ou clareza no README
|
|
22
|
+
|
|
23
|
+
## Estilo de código
|
|
24
|
+
|
|
25
|
+
- Python 3.12+ compatível
|
|
26
|
+
- Scripts em `skills/maestro/scripts/` devem permanecer sem dependências obrigatórias além da stdlib (PyYAML continua opcional)
|
|
27
|
+
- Mensagens de commit em português ou inglês, descritivas
|
|
28
|
+
|
|
29
|
+
## Segurança
|
|
30
|
+
|
|
31
|
+
Veja [SECURITY.md](SECURITY.md) para reporte responsável de vulnerabilidades.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yuri Rodovalho
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Maestro
|
|
2
|
+
|
|
3
|
+
[](https://github.com/rodovalhofs/maestro/actions/workflows/ci.yml)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
**Maestro** é um meta-orquestrador de skills para agentes de IA (Cursor, Claude Code, Codex e outros). Você descreve a tarefa; ele descobre quais skills locais usar, monta um **grafo de dependências editável**, pede sua confirmação e só então dispara subagentes com os `SKILL.md` certos.
|
|
7
|
+
|
|
8
|
+
Se faltar skill no ecossistema (ex.: `skeleton-loader`), o Maestro abre o ramo **Discover** via [find-skills](https://skills.sh/) (`npx skills find`), instala, regenera o índice e roteia de novo.
|
|
9
|
+
|
|
10
|
+
> Motor **local e rápido** (BM25 + manifest JSON) — sem re-scan do filesystem a cada busca.
|
|
11
|
+
> Inspirado em ideias de [task-skill-router](https://github.com/wcqxgjy6d8-pixel/task-skill-router).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## O que o Maestro faz (e o que não faz)
|
|
16
|
+
|
|
17
|
+
| Faz | Não faz |
|
|
18
|
+
|-----|---------|
|
|
19
|
+
| Analisa seu prompt e busca skills **já instaladas** | Implementar código por conta própria |
|
|
20
|
+
| Monta um grafo de nós (pesquisa → implementação → CI…) | Spawnar subagentes sem você confirmar o grafo |
|
|
21
|
+
| Detecta **lacunas de conceito** (`skeleton-loader`, libs citadas no prompt) | Substituir o agente principal do Cursor |
|
|
22
|
+
| Sugere instalar skills via `npx skills find` quando necessário | Enviar dados para servidores externos |
|
|
23
|
+
| Roteia com prioridade **P0–P3** (auto-load vs recomendar) | Ignorar tarefas de alto risco (deploy, secrets) sem confirmação |
|
|
24
|
+
|
|
25
|
+
### Em uma frase
|
|
26
|
+
|
|
27
|
+
O Maestro responde: *“Para esta tarefa, quais skills devo usar, em que ordem, e preciso instalar algo novo?”*
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Fluxo completo
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
Seu prompt
|
|
35
|
+
│
|
|
36
|
+
▼
|
|
37
|
+
build_manifest.py ← índice local (~/.maestro/skills-manifest.json)
|
|
38
|
+
│
|
|
39
|
+
▼
|
|
40
|
+
search_skills.py ← BM25 + intents + sinônimos + concept gaps
|
|
41
|
+
│
|
|
42
|
+
├─ match forte, sem lacunas
|
|
43
|
+
│ └─► Grafo único → você confirma → subagentes executam
|
|
44
|
+
│
|
|
45
|
+
└─ discover.triggered
|
|
46
|
+
│
|
|
47
|
+
▼
|
|
48
|
+
npx skills find ← pré-busca no ecossistema (skills.sh)
|
|
49
|
+
│
|
|
50
|
+
▼
|
|
51
|
+
Grafo 1 (Discover + fallback local) → você: ok
|
|
52
|
+
│
|
|
53
|
+
▼
|
|
54
|
+
find-skills install + build_manifest.py
|
|
55
|
+
│
|
|
56
|
+
▼
|
|
57
|
+
Grafo 2 (execução) → você: ok
|
|
58
|
+
│
|
|
59
|
+
▼
|
|
60
|
+
subagentes com SKILL.md explícito → síntese final
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Quando o ramo Discover abre
|
|
64
|
+
|
|
65
|
+
| Sinal | Exemplo |
|
|
66
|
+
|-------|---------|
|
|
67
|
+
| `weak_match` | Nenhuma skill local confiável para o prompt |
|
|
68
|
+
| `concept_gap` | *“colocar skeleton-loader na UI”* — termo sem skill local |
|
|
69
|
+
| `force_discover` | *“find a skill for changelog”*, `npx skills find` |
|
|
70
|
+
| `single_local_skill` | Só um candidato local e score baixo |
|
|
71
|
+
|
|
72
|
+
Máximo de **2** gaps por prompt; extras viram nota no grafo para você editar.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Instalação
|
|
77
|
+
|
|
78
|
+
### Opção A — `npx maestro-skills setup` (recomendado)
|
|
79
|
+
|
|
80
|
+
Setup interativo — escolha agentes e escopo (global ou projeto).
|
|
81
|
+
|
|
82
|
+
**Se `npx maestro-skills` retornar 404**, o pacote ainda não está no npm registry — use o GitHub (funciona agora):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npx github:rodovalhofs/maestro maestro-skills setup
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Após publicação no npm** (v0.1.1+):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx maestro-skills setup
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
| Agente | Pasta | Flag |
|
|
95
|
+
|--------|-------|------|
|
|
96
|
+
| Cursor | `~/.cursor/skills/maestro` | `--cursor` |
|
|
97
|
+
| Claude Code | `~/.claude/skills/maestro` | `--claude` |
|
|
98
|
+
| Codex | `~/.codex/skills/maestro` | `--codex` |
|
|
99
|
+
| Universal | `~/.agents/skills/maestro` | `--universal` |
|
|
100
|
+
|
|
101
|
+
Exemplos:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx maestro-skills setup --codex --cursor -y # Codex + Cursor, sem prompts
|
|
105
|
+
npx maestro-skills setup --project # só o repo atual
|
|
106
|
+
npx @rodovalhofs/maestro setup # fallback (bin curto)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Documentação completa: [docs/maestro-skills-cli.md](docs/maestro-skills-cli.md)
|
|
110
|
+
|
|
111
|
+
### Opção B — `npx skills add` (catálogo skills.sh)
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx skills add rodovalhofs/maestro --skill maestro -g -a cursor -a codex -y
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Opção C — Git clone (manual)
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
# Windows
|
|
121
|
+
git clone https://github.com/rodovalhofs/maestro.git
|
|
122
|
+
Copy-Item -Recurse -Force maestro\skills\maestro $env:USERPROFILE\.cursor\skills\maestro
|
|
123
|
+
# ou: $env:USERPROFILE\.codex\skills\maestro
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# macOS / Linux
|
|
128
|
+
git clone https://github.com/rodovalhofs/maestro.git
|
|
129
|
+
cp -r maestro/skills/maestro ~/.cursor/skills/maestro
|
|
130
|
+
# ou: ~/.codex/skills/maestro
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Pós-instalação (obrigatório)
|
|
134
|
+
|
|
135
|
+
Indexe suas skills locais (todos os agentes):
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Windows
|
|
139
|
+
py -3 %USERPROFILE%\.cursor\skills\maestro\scripts\build_manifest.py --project-root .
|
|
140
|
+
|
|
141
|
+
# macOS / Linux
|
|
142
|
+
python3 ~/.cursor/skills/maestro/scripts/build_manifest.py --project-root .
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Manifest gerado em `~/.maestro/skills-manifest.json`.
|
|
146
|
+
|
|
147
|
+
### Opcional — excluir skills da busca
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
cp ~/.cursor/skills/maestro/maestro-exclude.example.txt ~/.cursor/maestro-exclude.txt
|
|
151
|
+
# edite o arquivo e regenere o manifest
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Pré-requisitos
|
|
157
|
+
|
|
158
|
+
| Ferramenta | Obrigatório | Uso |
|
|
159
|
+
|------------|-------------|-----|
|
|
160
|
+
| **Cursor** | Sim | Agent skills em `~/.cursor/skills` e/ou `~/.agents/skills` |
|
|
161
|
+
| **Python 3.12+** | Sim | Scripts de busca e manifest (mesma versão do CI) |
|
|
162
|
+
| **Node.js** | Para Discover | `npx skills find` / `npx skills add` no ramo find-skills |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Uso no Cursor
|
|
167
|
+
|
|
168
|
+
Invoque com **`$maestro`** ou **`/maestro`** + sua tarefa:
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
$maestro criar dashboard de vendas com React e gráficos
|
|
172
|
+
$maestro vamos colocar skeleton-loader na tela de produtos
|
|
173
|
+
$maestro corrigir CI quebrado no PR #42
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
O agente segue o `SKILL.md` do Maestro: busca → grafo editável → confirmação → execução.
|
|
177
|
+
|
|
178
|
+
### Ferramentas CLI (uso direto ou debug)
|
|
179
|
+
|
|
180
|
+
**1. Regenerar manifest**
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
py -3 ~/.cursor/skills/maestro/scripts/build_manifest.py --project-root /caminho/do/projeto
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**2. Buscar skills para um prompt**
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
py -3 ~/.cursor/skills/maestro/scripts/search_skills.py "criar dashboard react" --json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Campos úteis no JSON:
|
|
193
|
+
|
|
194
|
+
| Campo | Significado |
|
|
195
|
+
|-------|-------------|
|
|
196
|
+
| `results` | Skills locais ranqueadas (score, confidence, path) |
|
|
197
|
+
| `routing` | `P0`–`P3` e decisão (`auto-load`, `recommend`, `bypass`) |
|
|
198
|
+
| `discover` | `triggered`, `reasons`, `gaps`, `queries`, `local_fallback` |
|
|
199
|
+
| `weak_match` | Match local fraco — pode pedir domínio ou Discover |
|
|
200
|
+
|
|
201
|
+
**3. Rotear sub-tarefas (grafo decomposto)**
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
printf '%s\n' "design UI" "fix CI" | py -3 ~/.cursor/skills/maestro/scripts/route_tasks.py --json
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Domínios** (`--domain`): `web`, `data-viz`, `analytics`, `design`, `creative`, `devops-git`, `video-media`, `integrations`, `security`, `meta`, `general`.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Exemplos de comportamento
|
|
212
|
+
|
|
213
|
+
### Tarefa com skill local clara
|
|
214
|
+
|
|
215
|
+
```text
|
|
216
|
+
Prompt: corrigir CI quebrado no PR
|
|
217
|
+
→ discover.triggered: false
|
|
218
|
+
→ top: gh-fix-ci, github
|
|
219
|
+
→ Grafo: 1 nó → você confirma → subagente executa
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Conceito sem skill local
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
Prompt: vamos colocar skeleton-loader na UI
|
|
226
|
+
→ discover.triggered: true (concept_gap: skeleton-loader)
|
|
227
|
+
→ npx skills find "skeleton-loader ui web"
|
|
228
|
+
→ Grafo 1 com Discover → install → Grafo 2 → implementação
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Descoberta explícita
|
|
232
|
+
|
|
233
|
+
```text
|
|
234
|
+
Prompt: find a skill for changelog
|
|
235
|
+
→ discover.triggered: true (force_discover)
|
|
236
|
+
→ find-skills busca no skills.sh
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## O que há neste repositório
|
|
242
|
+
|
|
243
|
+
| Pasta | Conteúdo |
|
|
244
|
+
|-------|----------|
|
|
245
|
+
| `skills/maestro/` | Skill Cursor + scripts Python (`search_skills`, `concept_gaps`, …) |
|
|
246
|
+
| `tests/` | 18+ testes do motor de busca |
|
|
247
|
+
| `docs/` | Fluxo GitHub genérico (Issues + PR + CI) |
|
|
248
|
+
| `templates/` | Issue templates, PR template e workflows para copiar em outros projetos |
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
maestro/
|
|
252
|
+
├── .github/workflows/ci.yml
|
|
253
|
+
├── skills/maestro/
|
|
254
|
+
│ ├── SKILL.md ← regras do orquestrador
|
|
255
|
+
│ ├── maestro-exclude.example.txt
|
|
256
|
+
│ └── scripts/
|
|
257
|
+
│ ├── build_manifest.py
|
|
258
|
+
│ ├── search_skills.py
|
|
259
|
+
│ ├── concept_gaps.py
|
|
260
|
+
│ ├── route_tasks.py
|
|
261
|
+
│ └── …
|
|
262
|
+
├── tests/
|
|
263
|
+
├── docs/github-workflow.md
|
|
264
|
+
└── templates/
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Testes
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
py -3 -m unittest discover -s tests -v
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Templates GitHub
|
|
278
|
+
|
|
279
|
+
Copie workflows e templates de Issue/PR para outro repositório:
|
|
280
|
+
|
|
281
|
+
```powershell
|
|
282
|
+
# Atenção: sobrescreve .github/ no destino
|
|
283
|
+
.\scripts\sync-templates.ps1 -TargetRepo "C:\caminho\do\seu\projeto"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Detalhes: [docs/github-workflow.md](docs/github-workflow.md)
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Contribuir
|
|
291
|
+
|
|
292
|
+
Veja [CONTRIBUTING.md](CONTRIBUTING.md). Issues e PRs são bem-vindos.
|
|
293
|
+
|
|
294
|
+
## Segurança
|
|
295
|
+
|
|
296
|
+
Veja [SECURITY.md](SECURITY.md). O Maestro lê apenas pastas locais de skills; revise pacotes de `npx skills find` antes de instalar.
|
|
297
|
+
|
|
298
|
+
## Licença
|
|
299
|
+
|
|
300
|
+
[MIT](LICENSE) — Copyright (c) 2026 Yuri Rodovalho
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Política de segurança
|
|
2
|
+
|
|
3
|
+
## Escopo
|
|
4
|
+
|
|
5
|
+
Este repositório contém a skill **Maestro** e scripts Python/PowerShell que rodam **localmente** na máquina do usuário. Eles leem pastas de skills (`~/.cursor/skills`, `~/.agents/skills`) e gravam um manifest em `~/.cursor/skills-manifest.json`. Não há servidor, telemetria nem envio de dados para terceiros.
|
|
6
|
+
|
|
7
|
+
## Versões suportadas
|
|
8
|
+
|
|
9
|
+
| Versão | Suportada |
|
|
10
|
+
|--------|-----------|
|
|
11
|
+
| `main` | Sim |
|
|
12
|
+
|
|
13
|
+
## O que reportar
|
|
14
|
+
|
|
15
|
+
- Execução insegura de comandos ou path traversal nos scripts
|
|
16
|
+
- Leitura/escrita fora dos diretórios documentados sem consentimento do usuário
|
|
17
|
+
- Vulnerabilidades em dependências usadas em CI (GitHub Actions)
|
|
18
|
+
|
|
19
|
+
**Não** é escopo deste repo: vulnerabilidades em skills de terceiros instaladas na sua máquina, nem no Cursor IDE em si.
|
|
20
|
+
|
|
21
|
+
## Como reportar
|
|
22
|
+
|
|
23
|
+
1. **Não** abra Issue pública com detalhes de exploit.
|
|
24
|
+
2. Abra um [Security Advisory](https://github.com/rodovalhofs/maestro/security/advisories/new) no GitHub **ou** envie descrição e passos de reprodução por canal privado acordado com o mantenedor.
|
|
25
|
+
3. Inclua: versão/commit, SO, comando usado e impacto esperado.
|
|
26
|
+
|
|
27
|
+
Objetivo de resposta inicial: **7 dias úteis**.
|
|
28
|
+
|
|
29
|
+
## Boas práticas para quem instala
|
|
30
|
+
|
|
31
|
+
- Revise pacotes retornados por `npx skills find` antes de instalar (`npx skills add`).
|
|
32
|
+
- Use `~/.cursor/maestro-exclude.txt` para excluir skills sensíveis da busca.
|
|
33
|
+
- O script `scripts/sync-templates.ps1` **sobrescreve** `.github/` no repositório destino — confira o `-TargetRepo` antes de executar.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# GitHub — fluxo generico (Issues + PR + CI)
|
|
2
|
+
|
|
3
|
+
Guia reutilizavel para qualquer repositorio versionado. Copie `templates/` para o seu projeto ou use `scripts/sync-templates.ps1`.
|
|
4
|
+
|
|
5
|
+
## Fluxo diario
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Issue → branch feat/N-slug → testes locais → build local → push → PR → CI → merge → Issue fecha
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Branch
|
|
12
|
+
|
|
13
|
+
- Prefixo: `feat/` ou `fix/`
|
|
14
|
+
- Exemplo: `feat/12-dashboard-indicadores`
|
|
15
|
+
- Nunca commitar direto na branch principal (`main` ou `master`)
|
|
16
|
+
|
|
17
|
+
### Commits
|
|
18
|
+
|
|
19
|
+
- Mensagem clara em portugues (ou idioma do time): `tipo(escopo): descricao`
|
|
20
|
+
- Referencie a Issue: `Refs #N` no corpo ou `Closes #N` quando o PR fecha a Issue
|
|
21
|
+
|
|
22
|
+
### Pull request
|
|
23
|
+
|
|
24
|
+
1. Abra PR em **draft** enquanto trabalha
|
|
25
|
+
2. Rode testes e build localmente antes de marcar ready for review
|
|
26
|
+
3. CI deve ficar verde antes do merge
|
|
27
|
+
4. Use `Closes #N` no PR para fechar a Issue automaticamente
|
|
28
|
+
|
|
29
|
+
## CI (GitHub Actions)
|
|
30
|
+
|
|
31
|
+
Ordem recomendada em qualquer repo:
|
|
32
|
+
|
|
33
|
+
1. **test** — testes automatizados
|
|
34
|
+
2. **build** — compila frontend, empacota artefato, etc. (so se test passou)
|
|
35
|
+
|
|
36
|
+
Falha no CI:
|
|
37
|
+
|
|
38
|
+
- Workflow `ci-failure-to-issue.yml` pode abrir Issue com label `ci:falha`
|
|
39
|
+
- Corrija na mesma branch/PR ate verde
|
|
40
|
+
- Nao mergear com CI vermelho
|
|
41
|
+
|
|
42
|
+
### Adaptar ao seu stack
|
|
43
|
+
|
|
44
|
+
Edite `templates/.github/workflows/ci.yml`:
|
|
45
|
+
|
|
46
|
+
- **Node/React:** `npm ci && npm test` / `npm run build`
|
|
47
|
+
- **Python:** `pip install -r requirements.txt && pytest`
|
|
48
|
+
- **Go:** `go test ./...` / `go build ./...`
|
|
49
|
+
|
|
50
|
+
Mantenha a ordem: job `test` antes do job `build`.
|
|
51
|
+
|
|
52
|
+
## Project (opcional)
|
|
53
|
+
|
|
54
|
+
Para times que usam GitHub Projects:
|
|
55
|
+
|
|
56
|
+
| Coluna | Quando usar |
|
|
57
|
+
|--------|-------------|
|
|
58
|
+
| Backlog | Issue aberta, sem branch |
|
|
59
|
+
| Em progresso | Branch criada, PR draft |
|
|
60
|
+
| Em review | PR ready, CI verde |
|
|
61
|
+
| Concluido | Merge na branch principal |
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
gh project create --owner <org-ou-user> --title "Meu projeto"
|
|
65
|
+
gh project link <NUMERO> --owner <org-ou-user> --repo <repo>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Labels sugeridas
|
|
69
|
+
|
|
70
|
+
Veja `templates/labels.json`. Aplicar com:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
gh label create -f templates/labels.json # ou script proprio
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Manutencao dos templates
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
# Na raiz do clone do repositorio maestro
|
|
80
|
+
.\scripts\sync-templates.ps1 -TargetRepo "C:\caminho\do\seu\projeto"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# macOS / Linux (PowerShell Core)
|
|
85
|
+
pwsh ./scripts/sync-templates.ps1 -TargetRepo "$HOME/projetos/meu-repo"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Nao versione `templates/` dentro de cada repo de aplicacao; copie para `.github/` local.
|
|
89
|
+
|
|
90
|
+
## Skills relacionadas (Cursor)
|
|
91
|
+
|
|
92
|
+
Para agentes que orquestram esse fluxo:
|
|
93
|
+
|
|
94
|
+
- `github` — triagem de Issues e PRs
|
|
95
|
+
- `yeet` — commit, push e PR draft
|
|
96
|
+
- `gh-fix-ci` — depurar checks do GitHub Actions
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# CLI `maestro-skills`
|
|
2
|
+
|
|
3
|
+
Instalação interativa do Maestro para vários agentes de IA — um comando, escolha onde instalar.
|
|
4
|
+
|
|
5
|
+
## Comando principal
|
|
6
|
+
|
|
7
|
+
**GitHub (funciona sem publicar no npm):**
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx github:rodovalhofs/maestro maestro-skills setup
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**npm registry** (após `maestro-skills@0.1.1` publicado):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx maestro-skills setup
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Equivalente scoped (bin `maestro`):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @rodovalhofs/maestro setup
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## O que o setup faz
|
|
26
|
+
|
|
27
|
+
1. Detecta agentes no sistema
|
|
28
|
+
2. Você escolhe destinos (multi-select)
|
|
29
|
+
3. Escolhe escopo: **global** (padrão) ou **este projeto** (`--project`)
|
|
30
|
+
4. Copia a skill `maestro/` para cada pasta de skills
|
|
31
|
+
5. Opcional: registra no [skills.sh](https://skills.sh/) via `npx skills add`
|
|
32
|
+
6. Migra manifest legado `~/.cursor/skills-manifest.json` → `~/.maestro/`
|
|
33
|
+
7. Executa `build_manifest.py` (Python 3.12+)
|
|
34
|
+
|
|
35
|
+
## Agentes suportados
|
|
36
|
+
|
|
37
|
+
| ID | Agente | Pasta global | CLI flag |
|
|
38
|
+
|----|--------|--------------|----------|
|
|
39
|
+
| `cursor` | Cursor | `~/.cursor/skills/maestro` | `--cursor` |
|
|
40
|
+
| `claude` | Claude Code | `~/.claude/skills/maestro` | `--claude` |
|
|
41
|
+
| `codex` | Codex | `~/.codex/skills/maestro` | `--codex` |
|
|
42
|
+
| `universal` | Universal | `~/.agents/skills/maestro` | `--universal` |
|
|
43
|
+
|
|
44
|
+
Novos agentes podem ser adicionados em `packages/maestro-skills/agents.json` sem alterar o core do CLI.
|
|
45
|
+
|
|
46
|
+
## Comandos
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Setup interativo (recomendado)
|
|
50
|
+
npx maestro-skills setup
|
|
51
|
+
|
|
52
|
+
# Só Codex, global, sem prompts
|
|
53
|
+
npx maestro-skills setup --codex -y
|
|
54
|
+
|
|
55
|
+
# Vários agentes
|
|
56
|
+
npx maestro-skills setup --cursor --claude --codex -y
|
|
57
|
+
|
|
58
|
+
# Apenas o repositório atual
|
|
59
|
+
npx maestro-skills setup --project
|
|
60
|
+
|
|
61
|
+
# Desinstalar
|
|
62
|
+
npx maestro-skills remove
|
|
63
|
+
npx maestro-skills remove -y --clean-home
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Layout `~/.maestro/`
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
~/.maestro/
|
|
70
|
+
├── skills-manifest.json # índice único (todos os agentes)
|
|
71
|
+
├── maestro-exclude.txt # skills ignoradas na busca
|
|
72
|
+
└── config.json # último setup (destinos, escopo)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
O `build_manifest.py` indexa skills de:
|
|
76
|
+
|
|
77
|
+
- `~/.cursor/skills`
|
|
78
|
+
- `~/.claude/skills`
|
|
79
|
+
- `~/.codex/skills`
|
|
80
|
+
- `~/.agents/skills`
|
|
81
|
+
- `.cursor/skills`, `.claude/skills`, `.codex/skills`, `.agents/skills` do `--project-root`
|
|
82
|
+
|
|
83
|
+
## Pré-requisitos
|
|
84
|
+
|
|
85
|
+
- **Node.js 18+** — para o CLI
|
|
86
|
+
- **Python 3.12+** — para gerar o manifest (`py -3` ou `python3`)
|
|
87
|
+
|
|
88
|
+
## Desenvolvimento
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Sincronizar skill canônica → pacotes npm
|
|
92
|
+
node scripts/sync-skill-to-cli.mjs
|
|
93
|
+
|
|
94
|
+
# Testes Python
|
|
95
|
+
py -3 -m unittest discover -s tests -v
|
|
96
|
+
|
|
97
|
+
# Testes Node
|
|
98
|
+
cd packages/maestro-skills && npm test
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Publicação npm
|
|
102
|
+
|
|
103
|
+
O pacote `maestro-skills` precisa ser publicado uma vez para `npx maestro-skills` funcionar sem GitHub.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm login
|
|
107
|
+
npm run publish:cli # maestro-skills
|
|
108
|
+
npm run publish:scoped # @rodovalhofs/maestro
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Ou dispare o workflow **Publish npm** no GitHub Actions (secret `NPM_TOKEN`).
|
|
112
|
+
|
|
113
|
+
Não inclua tokens, `.env` ou credenciais nos pacotes.
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "maestro-skills",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Interactive setup for the Maestro skill orchestrator (multi-agent)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Yuri Rodovalho",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/rodovalhofs/maestro.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/rodovalhofs/maestro#installation",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/rodovalhofs/maestro/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"maestro-skills": "./packages/maestro-skills/bin/cli.js"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"prepare": "node scripts/sync-skill-to-cli.mjs",
|
|
24
|
+
"test:py": "python -m unittest discover -s tests -v",
|
|
25
|
+
"test:js": "npm test --prefix packages/maestro-skills",
|
|
26
|
+
"test": "npm run test:py && npm run test:js",
|
|
27
|
+
"publish:cli": "node scripts/sync-skill-to-cli.mjs && npm publish --prefix packages/maestro-skills --access public",
|
|
28
|
+
"publish:scoped": "node scripts/sync-skill-to-cli.mjs && npm publish --prefix packages/rodovalhofs-maestro --access public"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@clack/prompts": "^0.10.1",
|
|
32
|
+
"commander": "^13.1.0"
|
|
33
|
+
},
|
|
34
|
+
"private": false
|
|
35
|
+
}
|