jdi-cli 0.1.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/AGENTS.md +209 -0
- package/ARCHITECTURE.md +210 -0
- package/COMMANDS.md +241 -0
- package/CREATE-EXAMPLE.md +385 -0
- package/CREATE.md +315 -0
- package/EXTENSION.md +141 -0
- package/LICENSE +21 -0
- package/MEMORY.md +471 -0
- package/PORTABILITY.md +438 -0
- package/README.md +789 -0
- package/bin/git-hooks/post-commit +16 -0
- package/bin/git-hooks/pre-commit +21 -0
- package/bin/jdi-build.ps1 +381 -0
- package/bin/jdi-build.sh +332 -0
- package/bin/jdi-doctor.ps1 +403 -0
- package/bin/jdi-doctor.sh +400 -0
- package/bin/jdi-install-caveman.ps1 +97 -0
- package/bin/jdi-install-caveman.sh +99 -0
- package/bin/jdi-install-playwright.ps1 +319 -0
- package/bin/jdi-install-playwright.sh +284 -0
- package/bin/jdi-install.ps1 +154 -0
- package/bin/jdi-install.sh +132 -0
- package/bin/jdi-uninstall.ps1 +309 -0
- package/bin/jdi-uninstall.sh +264 -0
- package/bin/jdi-update.ps1 +215 -0
- package/bin/jdi-update.sh +209 -0
- package/bin/jdi.js +460 -0
- package/bin/lib/jdi-monitor.ps1 +66 -0
- package/bin/lib/jdi-monitor.sh +74 -0
- package/bin/lib/jdi-truncate.ps1 +96 -0
- package/bin/lib/jdi-truncate.sh +99 -0
- package/bin/lib/ui.js +197 -0
- package/core/agents/jdi-adopter.md +465 -0
- package/core/agents/jdi-architect.md +894 -0
- package/core/agents/jdi-asker.md +153 -0
- package/core/agents/jdi-bootstrap.md +247 -0
- package/core/agents/jdi-planner.md +254 -0
- package/core/agents/jdi-researcher.md +303 -0
- package/core/commands/jdi-adopt.md +155 -0
- package/core/commands/jdi-bootstrap.md +81 -0
- package/core/commands/jdi-create.md +80 -0
- package/core/commands/jdi-discuss.md +80 -0
- package/core/commands/jdi-do.md +200 -0
- package/core/commands/jdi-loop.md +315 -0
- package/core/commands/jdi-new.md +131 -0
- package/core/commands/jdi-plan.md +73 -0
- package/core/commands/jdi-ship.md +146 -0
- package/core/commands/jdi-verify.md +159 -0
- package/core/skills/clean-code/SKILL.md +261 -0
- package/core/skills/dry/SKILL.md +150 -0
- package/core/skills/frontend-rules/SKILL.md +386 -0
- package/core/skills/frontend-validator/SKILL.md +567 -0
- package/core/skills/kiss/SKILL.md +178 -0
- package/core/skills/solid/SKILL.md +281 -0
- package/core/skills/yagni/SKILL.md +207 -0
- package/core/templates/agent.md +72 -0
- package/core/templates/doer-specialist.md +216 -0
- package/core/templates/reviewer-specialist.md +405 -0
- package/core/templates/skill.md +66 -0
- package/package.json +70 -0
- package/runtimes/antigravity/agents.md +74 -0
- package/runtimes/antigravity/skills/clean-code/SKILL.md +252 -0
- package/runtimes/antigravity/skills/dry/SKILL.md +141 -0
- package/runtimes/antigravity/skills/frontend-rules/SKILL.md +376 -0
- package/runtimes/antigravity/skills/frontend-validator/SKILL.md +559 -0
- package/runtimes/antigravity/skills/jdi-adopt/SKILL.md +155 -0
- package/runtimes/antigravity/skills/jdi-adopter/SKILL.md +436 -0
- package/runtimes/antigravity/skills/jdi-architect/SKILL.md +872 -0
- package/runtimes/antigravity/skills/jdi-asker/SKILL.md +125 -0
- package/runtimes/antigravity/skills/jdi-asker/references/context-template.md +34 -0
- package/runtimes/antigravity/skills/jdi-asker/references/decision-format.md +19 -0
- package/runtimes/antigravity/skills/jdi-asker/scripts/find_phase_dir.sh +25 -0
- package/runtimes/antigravity/skills/jdi-bootstrap/SKILL.md +81 -0
- package/runtimes/antigravity/skills/jdi-create/SKILL.md +80 -0
- package/runtimes/antigravity/skills/jdi-discuss/SKILL.md +80 -0
- package/runtimes/antigravity/skills/jdi-discuss/scripts/run_command.sh +62 -0
- package/runtimes/antigravity/skills/jdi-do/SKILL.md +200 -0
- package/runtimes/antigravity/skills/jdi-loop/SKILL.md +315 -0
- package/runtimes/antigravity/skills/jdi-new/SKILL.md +131 -0
- package/runtimes/antigravity/skills/jdi-plan/SKILL.md +73 -0
- package/runtimes/antigravity/skills/jdi-planner/SKILL.md +225 -0
- package/runtimes/antigravity/skills/jdi-researcher/SKILL.md +274 -0
- package/runtimes/antigravity/skills/jdi-ship/SKILL.md +146 -0
- package/runtimes/antigravity/skills/jdi-verify/SKILL.md +159 -0
- package/runtimes/antigravity/skills/kiss/SKILL.md +169 -0
- package/runtimes/antigravity/skills/solid/SKILL.md +272 -0
- package/runtimes/antigravity/skills/yagni/SKILL.md +198 -0
- package/runtimes/claude/CLAUDE.md +91 -0
- package/runtimes/claude/agents/jdi-adopter.md +430 -0
- package/runtimes/claude/agents/jdi-architect.md +864 -0
- package/runtimes/claude/agents/jdi-asker.md +119 -0
- package/runtimes/claude/agents/jdi-bootstrap.md +213 -0
- package/runtimes/claude/agents/jdi-planner.md +221 -0
- package/runtimes/claude/agents/jdi-researcher.md +269 -0
- package/runtimes/claude/commands/jdi-adopt.md +155 -0
- package/runtimes/claude/commands/jdi-bootstrap.md +81 -0
- package/runtimes/claude/commands/jdi-create.md +80 -0
- package/runtimes/claude/commands/jdi-discuss.md +80 -0
- package/runtimes/claude/commands/jdi-do.md +200 -0
- package/runtimes/claude/commands/jdi-loop.md +315 -0
- package/runtimes/claude/commands/jdi-new.md +131 -0
- package/runtimes/claude/commands/jdi-plan.md +73 -0
- package/runtimes/claude/commands/jdi-ship.md +146 -0
- package/runtimes/claude/commands/jdi-verify.md +159 -0
- package/runtimes/claude/settings.example.json +132 -0
- package/runtimes/claude/skills/clean-code/SKILL.md +247 -0
- package/runtimes/claude/skills/dry/SKILL.md +136 -0
- package/runtimes/claude/skills/frontend-rules/SKILL.md +369 -0
- package/runtimes/claude/skills/frontend-validator/SKILL.md +553 -0
- package/runtimes/claude/skills/kiss/SKILL.md +164 -0
- package/runtimes/claude/skills/solid/SKILL.md +267 -0
- package/runtimes/claude/skills/yagni/SKILL.md +193 -0
- package/runtimes/copilot/agents/jdi-adopter.agent.md +430 -0
- package/runtimes/copilot/agents/jdi-architect.agent.md +864 -0
- package/runtimes/copilot/agents/jdi-asker.agent.md +119 -0
- package/runtimes/copilot/agents/jdi-bootstrap.agent.md +213 -0
- package/runtimes/copilot/agents/jdi-planner.agent.md +221 -0
- package/runtimes/copilot/agents/jdi-researcher.agent.md +269 -0
- package/runtimes/copilot/copilot-instructions.md +80 -0
- package/runtimes/copilot/prompts/jdi-adopt.prompt.md +155 -0
- package/runtimes/copilot/prompts/jdi-bootstrap.prompt.md +81 -0
- package/runtimes/copilot/prompts/jdi-create.prompt.md +80 -0
- package/runtimes/copilot/prompts/jdi-discuss.prompt.md +80 -0
- package/runtimes/copilot/prompts/jdi-do.prompt.md +200 -0
- package/runtimes/copilot/prompts/jdi-loop.prompt.md +315 -0
- package/runtimes/copilot/prompts/jdi-new.prompt.md +131 -0
- package/runtimes/copilot/prompts/jdi-plan.prompt.md +73 -0
- package/runtimes/copilot/prompts/jdi-ship.prompt.md +146 -0
- package/runtimes/copilot/prompts/jdi-verify.prompt.md +159 -0
- package/runtimes/opencode/AGENTS.md +87 -0
- package/runtimes/opencode/agents/jdi-adopter.md +434 -0
- package/runtimes/opencode/agents/jdi-architect.md +861 -0
- package/runtimes/opencode/agents/jdi-asker.md +123 -0
- package/runtimes/opencode/agents/jdi-bootstrap.md +217 -0
- package/runtimes/opencode/agents/jdi-planner.md +225 -0
- package/runtimes/opencode/agents/jdi-researcher.md +273 -0
- package/runtimes/opencode/commands/jdi-adopt.md +155 -0
- package/runtimes/opencode/commands/jdi-bootstrap.md +81 -0
- package/runtimes/opencode/commands/jdi-create.md +80 -0
- package/runtimes/opencode/commands/jdi-discuss.md +80 -0
- package/runtimes/opencode/commands/jdi-do.md +200 -0
- package/runtimes/opencode/commands/jdi-loop.md +315 -0
- package/runtimes/opencode/commands/jdi-new.md +131 -0
- package/runtimes/opencode/commands/jdi-plan.md +73 -0
- package/runtimes/opencode/commands/jdi-ship.md +146 -0
- package/runtimes/opencode/commands/jdi-verify.md +159 -0
- package/runtimes/opencode/opencode.example.jsonc +169 -0
- package/runtimes/opencode/skills/clean-code/SKILL.md +247 -0
- package/runtimes/opencode/skills/dry/SKILL.md +136 -0
- package/runtimes/opencode/skills/frontend-rules/SKILL.md +369 -0
- package/runtimes/opencode/skills/frontend-validator/SKILL.md +553 -0
- package/runtimes/opencode/skills/kiss/SKILL.md +164 -0
- package/runtimes/opencode/skills/solid/SKILL.md +267 -0
- package/runtimes/opencode/skills/yagni/SKILL.md +193 -0
- package/templates-jdi-folder/config.json +18 -0
- package/templates-jdi-folder/registry.md +31 -0
- package/templates-jdi-folder/reviewers.md +33 -0
- package/templates-jdi-folder/skills-registry.md +32 -0
- package/templates-jdi-folder/specialists.md +39 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
# JDI — `/jdi-create` Walkthrough
|
|
2
|
+
|
|
3
|
+
Exemplos concretos do fluxo `/jdi-create` (modo create do architect — agents/skills genericos no core).
|
|
4
|
+
|
|
5
|
+
Pra fluxo per-project (`/jdi-bootstrap` modo specialist), veja [EXTENSION.md](EXTENSION.md).
|
|
6
|
+
|
|
7
|
+
## Caso 1 — Agent puro: specialist Rust
|
|
8
|
+
|
|
9
|
+
Voce contribui pro JDI fonte e quer adicionar suporte pra projetos Rust (existe demanda real entre users).
|
|
10
|
+
|
|
11
|
+
### Invocacao
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
$ cd /path/to/jdi-source
|
|
15
|
+
$ /jdi-create "specialist pra Rust com cargo + clippy + rustfmt"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Q&A
|
|
19
|
+
|
|
20
|
+
**Architect:** Q1 — Em 1 frase, que problema esse novo agent resolve?
|
|
21
|
+
|
|
22
|
+
**User:** Executor Rust que sabe cargo build/test/clippy/fmt sem precisar redescobrir a cada projeto.
|
|
23
|
+
|
|
24
|
+
**Q2 — Quando rodar?**
|
|
25
|
+
- [x] Outro agent o invoca (jdi-do via routing)
|
|
26
|
+
|
|
27
|
+
**Q3 — O que precisa pra rodar?**
|
|
28
|
+
- [x] Files do projeto (`src/**/*.rs`, `Cargo.toml`)
|
|
29
|
+
- [x] Output de outro agent (PLAN.md)
|
|
30
|
+
|
|
31
|
+
**Q4 — O que produz?**
|
|
32
|
+
- [x] Codigo modificado
|
|
33
|
+
- [x] SUMMARY.md em `.jdi/phases/{NN}/`
|
|
34
|
+
|
|
35
|
+
**Q5 — Quantos callers?**
|
|
36
|
+
- [x] 1 caller principal (jdi-do via routing por linguagem Rust)
|
|
37
|
+
|
|
38
|
+
**Q6 — Tem decision loop?**
|
|
39
|
+
- [x] Sim — task -> implement -> test -> retry on failure -> commit -> next task
|
|
40
|
+
|
|
41
|
+
**Q7 — Custo?**
|
|
42
|
+
- [x] Medium (Sonnet, 30-90s por task)
|
|
43
|
+
|
|
44
|
+
**Q8 — Tools?**
|
|
45
|
+
- [x] Read, Write, Edit, Bash
|
|
46
|
+
|
|
47
|
+
### Classificacao automatica
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Q5 = 1 caller + Q6 = com loop + Q4 contem "arquivo" -> AGENT puro
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Anti-pattern check
|
|
54
|
+
|
|
55
|
+
- Nome `jdi-rust-specialist` — OK (especifico)
|
|
56
|
+
- Nao eh feature-based — OK
|
|
57
|
+
- Tamanho estimado: 200-300 linhas (template doer-specialist + Rust convencoes) — OK pra agent
|
|
58
|
+
- Total agents core apos criacao: 6 — abaixo do soft cap 15 — OK
|
|
59
|
+
|
|
60
|
+
### Draft plan
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
proposed:
|
|
64
|
+
type: agent
|
|
65
|
+
name: jdi-rust-specialist
|
|
66
|
+
description: Specialist Rust com cargo + clippy + rustfmt + Testcontainers se DB
|
|
67
|
+
triggers:
|
|
68
|
+
- "executar phase rust"
|
|
69
|
+
- "/jdi-do rust"
|
|
70
|
+
- "rust files in plan"
|
|
71
|
+
tools: [Read, Write, Edit, Bash]
|
|
72
|
+
model_intent: medium
|
|
73
|
+
|
|
74
|
+
inputs:
|
|
75
|
+
- phase_number
|
|
76
|
+
- .jdi/PROJECT.md
|
|
77
|
+
- .jdi/phases/{NN}/PLAN.md
|
|
78
|
+
- src/**/*.rs, Cargo.toml
|
|
79
|
+
|
|
80
|
+
outputs:
|
|
81
|
+
- codigo Rust modificado
|
|
82
|
+
- .jdi/phases/{NN}/SUMMARY.md
|
|
83
|
+
- .jdi/phases/{NN}/PLAN.md (status atualizado)
|
|
84
|
+
|
|
85
|
+
files_to_create:
|
|
86
|
+
- core/agents/jdi-rust-specialist.md
|
|
87
|
+
|
|
88
|
+
integration_points:
|
|
89
|
+
- .jdi/specialists.md: "Rust | jdi-rust-specialist | files *.rs"
|
|
90
|
+
|
|
91
|
+
validation_checks:
|
|
92
|
+
- nome unico (jdi-rust-specialist nao existe)
|
|
93
|
+
- frontmatter conforme template/agent.md
|
|
94
|
+
- triggers nao colidem com agents existentes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Approve / Edit / Cancel?
|
|
98
|
+
|
|
99
|
+
**User:** Approve
|
|
100
|
+
|
|
101
|
+
### Geracao
|
|
102
|
+
|
|
103
|
+
Architect le `core/templates/agent.md`. Substitui placeholders. Write em:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
core/agents/jdi-rust-specialist.md
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Append em `.jdi/specialists.md`:
|
|
110
|
+
```markdown
|
|
111
|
+
| Rust | jdi-rust-specialist | files com extensao .rs |
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Append em `.jdi/registry.md`:
|
|
115
|
+
```markdown
|
|
116
|
+
## R-2 (2026-05-09)
|
|
117
|
+
**Tipo:** agent
|
|
118
|
+
**Nome:** jdi-rust-specialist
|
|
119
|
+
**Criado por:** /jdi-create
|
|
120
|
+
**Por que:** Demanda real de users com projetos Rust. Generic doer nao sabe cargo workflow.
|
|
121
|
+
**Files:** core/agents/jdi-rust-specialist.md
|
|
122
|
+
**Integration:** .jdi/specialists.md
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Build + install
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
$ ./bin/jdi-build.sh
|
|
129
|
+
JDI build - gerando runtimes a partir de core/
|
|
130
|
+
|
|
131
|
+
claude:
|
|
132
|
+
claude/agents/jdi-architect.md
|
|
133
|
+
claude/agents/jdi-asker.md
|
|
134
|
+
claude/agents/jdi-bootstrap.md
|
|
135
|
+
claude/agents/jdi-planner.md
|
|
136
|
+
claude/agents/jdi-researcher.md
|
|
137
|
+
claude/agents/jdi-rust-specialist.md <- NEW
|
|
138
|
+
... (idem pra copilot, antigravity, opencode)
|
|
139
|
+
|
|
140
|
+
$ ./bin/jdi-install.sh claude --scope user
|
|
141
|
+
Claude Code instalado em: ~/.claude (scope=user)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Smoke test
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Criado: jdi-rust-specialist (agent)
|
|
148
|
+
|
|
149
|
+
Como invocar:
|
|
150
|
+
- Claude Code: Spawn via Agent tool com subagent_type=jdi-rust-specialist
|
|
151
|
+
- Copilot: @jdi-rust-specialist no chat
|
|
152
|
+
- Antigravity: descobre por trigger "executar phase rust"
|
|
153
|
+
- OpenCode: @jdi-rust-specialist no TUI
|
|
154
|
+
|
|
155
|
+
Audit: .jdi/registry.md (R-2)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Commit
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
$ git add core/ .jdi/specialists.md .jdi/registry.md runtimes/
|
|
162
|
+
$ git commit -m "feat(jdi-create): add agent jdi-rust-specialist"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Caso 2 — Skill: convencoes EF Core 9
|
|
168
|
+
|
|
169
|
+
Voce nota que multiplos doers (.NET specialist, generic, etc) repetem regras de EF Core 9. Vira skill compartilhada.
|
|
170
|
+
|
|
171
|
+
### Invocacao
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
$ /jdi-create "skill com convencoes EF Core 9 pra reuso entre doers .NET"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Q&A
|
|
178
|
+
|
|
179
|
+
**Q1 — Problema?** Multiplos doers .NET repetem regras EF Core 9 (Include with Split, AsNoTracking, scaffolding). DRY.
|
|
180
|
+
|
|
181
|
+
**Q2 — Quando rodar?** Carregada inline pelo agent pai quando phase toca EF Core.
|
|
182
|
+
|
|
183
|
+
**Q3 — Input?** Output do agent pai (codigo .NET sendo escrito).
|
|
184
|
+
|
|
185
|
+
**Q4 — Output?** Modifica codigo do agent pai (sem file proprio).
|
|
186
|
+
|
|
187
|
+
**Q5 — Quantos callers?** Varios — qualquer doer .NET (csharp, csharp-react, etc).
|
|
188
|
+
|
|
189
|
+
**Q6 — Decision loop?** Nao — procedimento fixo.
|
|
190
|
+
|
|
191
|
+
**Q7 — Custo?** N/A (skill puro, herda).
|
|
192
|
+
|
|
193
|
+
**Q8 — Tools?** Nao tem proprios — herda do agent pai.
|
|
194
|
+
|
|
195
|
+
### Classificacao
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Q5 = varios + Q6 = sem loop -> SKILL puro
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Draft plan
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
proposed:
|
|
205
|
+
type: skill
|
|
206
|
+
name: ef-core-9-conventions
|
|
207
|
+
description: Convencoes EF Core 9 (Include splits, AsNoTracking, scaffolding seguro)
|
|
208
|
+
applies_to:
|
|
209
|
+
- codigo C# usa EF Core 9
|
|
210
|
+
- phase tocando DbContext / migrations / queries
|
|
211
|
+
loaded_by:
|
|
212
|
+
- jdi-doer-* (qualquer .NET)
|
|
213
|
+
|
|
214
|
+
files_to_create:
|
|
215
|
+
- core/skills/ef-core-9-conventions/SKILL.md
|
|
216
|
+
- core/skills/ef-core-9-conventions/references/include-split.md
|
|
217
|
+
- core/skills/ef-core-9-conventions/references/no-tracking.md
|
|
218
|
+
|
|
219
|
+
integration_points:
|
|
220
|
+
- .jdi/skills-registry.md: nova entrada
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Geracao
|
|
224
|
+
|
|
225
|
+
Le `core/templates/skill.md`. Substitui. mkdir + Write:
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
core/skills/ef-core-9-conventions/
|
|
229
|
+
SKILL.md
|
|
230
|
+
references/
|
|
231
|
+
include-split.md (placeholder pra preencher)
|
|
232
|
+
no-tracking.md (placeholder pra preencher)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Append em `.jdi/skills-registry.md`:
|
|
236
|
+
```markdown
|
|
237
|
+
| ef-core-9-conventions | core/skills/ef-core-9-conventions/ | EF Core 9 + .NET projects | jdi-doer-* (.NET) |
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Resultado
|
|
241
|
+
|
|
242
|
+
Doers .NET com `<skills_to_load>` listando essa skill carregam automaticamente. Sem duplicacao.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Caso 3 — Composite: reviewer customizado pra payments
|
|
247
|
+
|
|
248
|
+
Phase de pagamento precisa de gates extras (PCI, idempotency, retries). Cria composite: reviewer focado + skill de checks.
|
|
249
|
+
|
|
250
|
+
### Invocacao
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
$ /jdi-create "reviewer focado em payments com PCI checks + idempotency rules"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Q&A resumido
|
|
257
|
+
|
|
258
|
+
- Q1: Garantir que phases de payment passem PCI/idempotency antes de ship
|
|
259
|
+
- Q2: Trigger por phase com files em `Features/Payments/**`
|
|
260
|
+
- Q5: 1 caller (jdi-verify) + skill reusavel por outros reviewers
|
|
261
|
+
- Q6: Com loop (multiplos checks)
|
|
262
|
+
|
|
263
|
+
### Classificacao
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
Q5 = 1 + skill reusavel + Q6 = com loop -> COMPOSITE
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Draft plan
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
proposed:
|
|
273
|
+
type: composite
|
|
274
|
+
name: jdi-payment-reviewer
|
|
275
|
+
components:
|
|
276
|
+
agent:
|
|
277
|
+
file: core/agents/jdi-payment-reviewer.md
|
|
278
|
+
tools: [Read, Bash, Grep]
|
|
279
|
+
model: sonnet
|
|
280
|
+
skill:
|
|
281
|
+
file: core/skills/payment-checks/SKILL.md
|
|
282
|
+
loaded_by: [jdi-payment-reviewer, jdi-reviewer-* (any with payments)]
|
|
283
|
+
|
|
284
|
+
integration_points:
|
|
285
|
+
- .jdi/reviewers.md: "jdi-payment-reviewer | files Features/Payments/** | bloqueia ship"
|
|
286
|
+
- .jdi/skills-registry.md: "payment-checks"
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Geracao
|
|
290
|
+
|
|
291
|
+
Cria os 2 files. Agent referencia skill em `<skills_to_load>`. Reviewer-{slug} per-project podem opcionalmente carregar tambem (via append no `<skills_to_load>` do reviewer customizado).
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Anti-pattern: nome generico
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
$ /jdi-create "review-code"
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Architect detecta nome generico. Resposta:
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
Anti-pattern: nome "review-code" muito generico.
|
|
305
|
+
|
|
306
|
+
Sugestoes:
|
|
307
|
+
- jdi-payment-reviewer (focado em payments)
|
|
308
|
+
- jdi-csharp-reviewer (focado em .NET, mas reviewer per-project ja faz isso)
|
|
309
|
+
- jdi-architecture-reviewer (focado em arch decisions)
|
|
310
|
+
|
|
311
|
+
Refazer? (sim / cancel)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
User refaz com nome especifico, ou cancela.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Anti-pattern: specialist por feature
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
$ /jdi-create "specialist pra auth"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Architect:
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
Anti-pattern: specialist por feature ("auth"), nao por linguagem/stack.
|
|
328
|
+
|
|
329
|
+
Auth eh feature -> phase normal cobre.
|
|
330
|
+
Voce quer:
|
|
331
|
+
- (a) Phase de auth via /jdi-discuss + /jdi-plan + /jdi-do (specialist do projeto ja sabe)
|
|
332
|
+
- (b) Skill de auth conventions (httpOnly cookies, PKCE, etc) carregada por reviewers
|
|
333
|
+
- (c) Cancelar
|
|
334
|
+
|
|
335
|
+
Escolha?
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Anti-pattern: skill grande
|
|
341
|
+
|
|
342
|
+
Q estimou skill com 800 linhas. Architect:
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
Anti-pattern: skill estimado em 800 linhas.
|
|
346
|
+
|
|
347
|
+
Skills devem ser <500 linhas (procedimento focado, nao manual completo).
|
|
348
|
+
|
|
349
|
+
Opcoes:
|
|
350
|
+
- (a) Virar agent (com decision loop) — agent pode ser maior
|
|
351
|
+
- (b) Quebrar em 2-3 skills menores (ex: payment-validation, payment-idempotency, payment-retry)
|
|
352
|
+
- (c) Cancelar
|
|
353
|
+
|
|
354
|
+
Escolha?
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Anti-pattern: nome colide
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
$ /jdi-create "specialist pra TypeScript"
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Architect detecta `core/agents/jdi-typescript-specialist.md` ja existe.
|
|
366
|
+
|
|
367
|
+
```
|
|
368
|
+
Conflito: jdi-typescript-specialist ja existe (R-3 em registry.md).
|
|
369
|
+
|
|
370
|
+
Voce quer:
|
|
371
|
+
- (a) Atualizar o existente (edit manual depois)
|
|
372
|
+
- (b) Criar variante (jdi-typescript-strict-specialist, jdi-typescript-react-specialist)
|
|
373
|
+
- (c) Cancelar
|
|
374
|
+
|
|
375
|
+
Escolha?
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Veja tambem
|
|
381
|
+
|
|
382
|
+
- [CREATE.md](CREATE.md) — mecanica detalhada do fluxo
|
|
383
|
+
- [EXTENSION.md](EXTENSION.md) — create vs bootstrap (per-project)
|
|
384
|
+
- [AGENTS.md](AGENTS.md) — agents existentes
|
|
385
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md) — visao geral
|
package/CREATE.md
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# JDI — Create Mechanism
|
|
2
|
+
|
|
3
|
+
Como criar **agents** e **skills** novos pro JDI core sem inflar o sistema.
|
|
4
|
+
|
|
5
|
+
Comando: `/jdi-create`. Agent: `jdi-architect` modo `create`.
|
|
6
|
+
|
|
7
|
+
Fluxo paralelo do mesmo architect: `/jdi-bootstrap` invoca `jdi-architect` modo `specialist` pra criar doer/reviewer per-project. Veja [EXTENSION.md](EXTENSION.md).
|
|
8
|
+
|
|
9
|
+
## Quando usar `/jdi-create`
|
|
10
|
+
|
|
11
|
+
Use quando:
|
|
12
|
+
- Voce eh contributor do JDI fonte (nao usuario consumindo)
|
|
13
|
+
- Quer adicionar agent generico que TODOS projetos JDI vao usar
|
|
14
|
+
- Quer adicionar skill reusavel carregada por multiplos agents
|
|
15
|
+
|
|
16
|
+
NAO use quando:
|
|
17
|
+
- Quer specialist pro SEU projeto especifico — use `/jdi-bootstrap`
|
|
18
|
+
- Quer config local — edite `.jdi/` direto
|
|
19
|
+
- Esta dentro de projeto consumindo JDI (sem `core/` no diretorio)
|
|
20
|
+
|
|
21
|
+
## Pre-requisitos
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
test -d core/ && test -d .jdi/ # esta no repo JDI fonte
|
|
25
|
+
git status --porcelain | wc -l # working tree limpo (recomendado)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Fluxo passo-a-passo
|
|
29
|
+
|
|
30
|
+
### 1. Invoca
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/jdi-create "specialist pra Rust com cargo + clippy"
|
|
34
|
+
/jdi-create "skill com convencoes EF Core 9"
|
|
35
|
+
/jdi-create
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Argumento livre (opcional) acelera Q1.
|
|
39
|
+
|
|
40
|
+
### 2. Architect carrega contexto
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
ls core/agents/ # agents existentes
|
|
44
|
+
ls core/skills/ # skills existentes
|
|
45
|
+
cat .jdi/specialists.md # routing
|
|
46
|
+
cat .jdi/reviewers.md
|
|
47
|
+
cat .jdi/registry.md # historia de criacoes
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Acumula em memoria pra evitar duplicacao.
|
|
51
|
+
|
|
52
|
+
### 3. Loop de 8 perguntas
|
|
53
|
+
|
|
54
|
+
AskUserQuestion uma por vez:
|
|
55
|
+
|
|
56
|
+
| # | Pergunta | Tipo |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Q1 | Que problema resolve? | texto livre |
|
|
59
|
+
| Q2 | Quando deve rodar? | multipla escolha |
|
|
60
|
+
| Q3 | O que precisa pra rodar? (input) | multipla escolha |
|
|
61
|
+
| Q4 | O que produz? (output) | multipla escolha |
|
|
62
|
+
| Q5 | Quantos callers vao usar? | 1 caller / varios / nao sei |
|
|
63
|
+
| Q6 | Tem decision loop com retry/branches? | sim / nao |
|
|
64
|
+
| Q7 | Custo de execucao? | cheap / medium / deep / N/A |
|
|
65
|
+
| Q8 | Tools necessarios? | multipla (Read/Write/Edit/Bash/Web/AskUser/Agent) |
|
|
66
|
+
|
|
67
|
+
### 4. Classificacao automatica
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Q5 = varios callers + Q6 = sem loop -> SKILL puro
|
|
71
|
+
Q5 = 1 caller + Q6 = com loop + output file -> AGENT puro
|
|
72
|
+
Q5 = varios + Q6 = com loop -> COMPOSITE (agent + skill)
|
|
73
|
+
Q5 = nao sei + tiebreaker via Q6
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 5. Anti-pattern check
|
|
77
|
+
|
|
78
|
+
- Nome generico ("review-code") -> pede foco
|
|
79
|
+
- Specialist por feature ("auth") -> redireciona pra phase
|
|
80
|
+
- Skill > 500 linhas estimado -> sugere agent
|
|
81
|
+
- Agent sem decision loop -> sugere skill
|
|
82
|
+
- Soft cap (>15 agents / >25 skills) -> avisa
|
|
83
|
+
- Nome colide -> obriga renomear
|
|
84
|
+
|
|
85
|
+
### 6. Draft plan (preview)
|
|
86
|
+
|
|
87
|
+
Mostra YAML pro user:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
proposed:
|
|
91
|
+
type: agent
|
|
92
|
+
name: jdi-rust-specialist
|
|
93
|
+
description: Specialist Rust com cargo + clippy + rustfmt
|
|
94
|
+
triggers: [executar phase rust, rust files]
|
|
95
|
+
tools: [Read, Write, Edit, Bash]
|
|
96
|
+
model_intent: medium
|
|
97
|
+
|
|
98
|
+
inputs: [phase_number, .jdi/phases/{NN}/PLAN.md, src/**/*.rs]
|
|
99
|
+
outputs: [.jdi/phases/{NN}/SUMMARY.md, codigo Rust + tests]
|
|
100
|
+
|
|
101
|
+
files_to_create:
|
|
102
|
+
- core/agents/jdi-rust-specialist.md
|
|
103
|
+
|
|
104
|
+
integration_points:
|
|
105
|
+
- update .jdi/specialists.md (Rust -> jdi-rust-specialist)
|
|
106
|
+
|
|
107
|
+
validation_checks:
|
|
108
|
+
- nome unico
|
|
109
|
+
- frontmatter conforme template
|
|
110
|
+
- triggers nao colidem
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 7. Validacao com user
|
|
114
|
+
|
|
115
|
+
AskUserQuestion:
|
|
116
|
+
- **Approve** — confirma, vai pra geracao
|
|
117
|
+
- **Edit** — qual campo mudar?
|
|
118
|
+
- **Cancel** — sai sem criar nada
|
|
119
|
+
|
|
120
|
+
### 8. Geracao dos arquivos
|
|
121
|
+
|
|
122
|
+
#### Agent
|
|
123
|
+
|
|
124
|
+
Le `core/templates/agent.md`. Substitui placeholders:
|
|
125
|
+
- `{NOME}`, `{DESCRICAO_1_LINHA}`, `{ROLE}`, `{LISTA_TOOLS}`, `{LISTA_TRIGGERS}`
|
|
126
|
+
- `{MODELO_CLAUDE}`, `{TOOLS_CLAUDE}`, `{MODELO_COPILOT}`, etc.
|
|
127
|
+
|
|
128
|
+
Write em `core/agents/jdi-{nome}.md`.
|
|
129
|
+
|
|
130
|
+
#### Skill
|
|
131
|
+
|
|
132
|
+
Le `core/templates/skill.md`. Substitui placeholders.
|
|
133
|
+
mkdir + Write em `core/skills/{nome}/SKILL.md`.
|
|
134
|
+
|
|
135
|
+
Se tem references, cria placeholders em `core/skills/{nome}/references/`.
|
|
136
|
+
|
|
137
|
+
#### Composite
|
|
138
|
+
|
|
139
|
+
Cria os dois. Agent referencia skill em `<skills_to_load>`.
|
|
140
|
+
|
|
141
|
+
### 9. Atualiza integration points
|
|
142
|
+
|
|
143
|
+
| Tipo | Update |
|
|
144
|
+
|---|---|
|
|
145
|
+
| Specialist (linguagem) | append `.jdi/specialists.md` + edit doer routing |
|
|
146
|
+
| Reviewer | append `.jdi/reviewers.md` + edit `/jdi-verify` discovery |
|
|
147
|
+
| Skill | append `.jdi/registry.md` + edit `<skills_to_load>` dos agents que carregam |
|
|
148
|
+
|
|
149
|
+
### 10. Audit trail
|
|
150
|
+
|
|
151
|
+
Append em `.jdi/registry.md`:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
## R-{N} ({date})
|
|
155
|
+
**Tipo:** agent | skill | composite
|
|
156
|
+
**Nome:** jdi-{nome}
|
|
157
|
+
**Criado por:** /jdi-create
|
|
158
|
+
**Por que:** {Q1 resposta}
|
|
159
|
+
**Files:** {lista}
|
|
160
|
+
**Integration:** {lista}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 11. Build + install
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
./bin/jdi-build.sh # ou .ps1 em Windows
|
|
167
|
+
./bin/jdi-install.sh {runtime} --scope {user|project}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Detecta runtime ativo automaticamente:
|
|
171
|
+
- `~/.claude/` existe? -> claude
|
|
172
|
+
- `.github/agents/` existe? -> copilot
|
|
173
|
+
- `~/.gemini/antigravity/` -> antigravity
|
|
174
|
+
- `~/.config/opencode/` -> opencode
|
|
175
|
+
- nenhum -> pergunta
|
|
176
|
+
|
|
177
|
+
### 12. Smoke test
|
|
178
|
+
|
|
179
|
+
Mostra ao user **como invocar** o que foi criado:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
Criado: jdi-rust-specialist (agent)
|
|
183
|
+
|
|
184
|
+
Como invocar:
|
|
185
|
+
- Claude Code: Spawn via Agent tool com subagent_type=jdi-rust-specialist
|
|
186
|
+
- Copilot: @jdi-rust-specialist no chat
|
|
187
|
+
- Antigravity: descobre por trigger ou peca explicitamente
|
|
188
|
+
- OpenCode: @jdi-rust-specialist no TUI
|
|
189
|
+
|
|
190
|
+
Audit: .jdi/registry.md (R-N)
|
|
191
|
+
Commit: {sha}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 13. Commit
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
git add core/ .jdi/specialists.md .jdi/reviewers.md .jdi/registry.md runtimes/
|
|
198
|
+
git commit -m "feat(jdi-create): add agent jdi-rust-specialist"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Templates
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
core/templates/
|
|
205
|
+
agent.md <- base pra agent generico
|
|
206
|
+
skill.md <- base pra skill
|
|
207
|
+
doer-specialist.md <- usado por modo specialist (NAO modo create)
|
|
208
|
+
reviewer-specialist.md <- idem
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Modo create usa `agent.md` ou `skill.md`. Modo specialist usa `doer-specialist.md` + `reviewer-specialist.md`.
|
|
212
|
+
|
|
213
|
+
## Estrutura de agent gerado
|
|
214
|
+
|
|
215
|
+
```yaml
|
|
216
|
+
---
|
|
217
|
+
name: jdi-{nome}
|
|
218
|
+
description: {1 linha}
|
|
219
|
+
runtime_intent:
|
|
220
|
+
role: {role}
|
|
221
|
+
reasoning: {cheap|medium|deep}
|
|
222
|
+
privileges: {read|read+write|read+write+edit|read+write+edit+bash}
|
|
223
|
+
tools_canonical: [...]
|
|
224
|
+
triggers: [...]
|
|
225
|
+
runtime_overrides:
|
|
226
|
+
claude:
|
|
227
|
+
model: {opus|sonnet|haiku}
|
|
228
|
+
tools: [...]
|
|
229
|
+
copilot:
|
|
230
|
+
model: gpt-5
|
|
231
|
+
tools: [...]
|
|
232
|
+
opencode:
|
|
233
|
+
mode: subagent
|
|
234
|
+
model: anthropic/claude-sonnet-4-20250514
|
|
235
|
+
permission: { edit, bash, write }
|
|
236
|
+
antigravity:
|
|
237
|
+
triggers_extra: [...]
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
<role>
|
|
241
|
+
Voce eh `jdi-{nome}`. ...
|
|
242
|
+
</role>
|
|
243
|
+
|
|
244
|
+
<inputs>
|
|
245
|
+
- ...
|
|
246
|
+
</inputs>
|
|
247
|
+
|
|
248
|
+
<process>
|
|
249
|
+
### Passo 1: ...
|
|
250
|
+
### Passo 2: ...
|
|
251
|
+
</process>
|
|
252
|
+
|
|
253
|
+
<rules>
|
|
254
|
+
- ...
|
|
255
|
+
</rules>
|
|
256
|
+
|
|
257
|
+
<fallbacks>
|
|
258
|
+
- ...
|
|
259
|
+
</fallbacks>
|
|
260
|
+
|
|
261
|
+
<output>
|
|
262
|
+
- ...
|
|
263
|
+
</output>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Estrutura de skill gerado
|
|
267
|
+
|
|
268
|
+
```yaml
|
|
269
|
+
---
|
|
270
|
+
name: {nome}
|
|
271
|
+
description: {1 linha}
|
|
272
|
+
type: skill
|
|
273
|
+
applies_to: ...
|
|
274
|
+
loaded_by: [...]
|
|
275
|
+
runtime_overrides:
|
|
276
|
+
antigravity:
|
|
277
|
+
triggers: [...]
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
# Skill: {nome}
|
|
281
|
+
|
|
282
|
+
## Quando aplicar
|
|
283
|
+
...
|
|
284
|
+
|
|
285
|
+
## Procedure
|
|
286
|
+
### Passo 1: ...
|
|
287
|
+
|
|
288
|
+
## Inputs esperados
|
|
289
|
+
...
|
|
290
|
+
|
|
291
|
+
## Outputs
|
|
292
|
+
...
|
|
293
|
+
|
|
294
|
+
## References
|
|
295
|
+
- references/{X}.md
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Reverso: deletar
|
|
299
|
+
|
|
300
|
+
JDI nao tem comando `/jdi-delete`. Manualmente:
|
|
301
|
+
|
|
302
|
+
1. `git rm core/agents/jdi-{nome}.md` (ou `core/skills/{nome}/`)
|
|
303
|
+
2. Edita `.jdi/specialists.md` ou `.jdi/reviewers.md` (remove linha)
|
|
304
|
+
3. Append em `.jdi/registry.md`: `R-{N}: removed jdi-{nome} ({razao})`
|
|
305
|
+
4. `./bin/jdi-build.sh && ./bin/jdi-install.sh {runtime}`
|
|
306
|
+
5. `git commit -m "chore(jdi): remove agent jdi-{nome}"`
|
|
307
|
+
|
|
308
|
+
Soft delete preferido: marca `deprecated: true` no frontmatter, deixa file. Remove fisicamente so quando 100% certo.
|
|
309
|
+
|
|
310
|
+
## Veja tambem
|
|
311
|
+
|
|
312
|
+
- [CREATE-EXAMPLE.md](CREATE-EXAMPLE.md) — walkthrough concreto
|
|
313
|
+
- [EXTENSION.md](EXTENSION.md) — quando usar create vs bootstrap
|
|
314
|
+
- [AGENTS.md](AGENTS.md) — agents existentes
|
|
315
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md) — visao geral
|