agent-devkit 0.0.3 → 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/README.md +170 -1
- package/package.json +1 -1
- package/runtime/README.md +192 -14
- package/runtime/agent +29 -13
- package/runtime/agents/README.md +3 -0
- package/runtime/agents/github-pr-reviewer/AGENTS.md +10 -0
- package/runtime/agents/github-pr-reviewer/README.md +7 -0
- package/runtime/agents/github-pr-reviewer/agent.yaml +33 -0
- package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml +20 -0
- package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/decision-rules.md +8 -0
- package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/workflow.md +9 -0
- package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/capability.yaml +20 -0
- package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/decision-rules.md +7 -0
- package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/workflow.md +8 -0
- package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/capability.yaml +20 -0
- package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/decision-rules.md +7 -0
- package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/workflow.md +8 -0
- package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/capability.yaml +20 -0
- package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/decision-rules.md +9 -0
- package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/workflow.md +10 -0
- package/runtime/agents/github-pr-reviewer/infra/README.md +7 -0
- package/runtime/agents/github-pr-reviewer/knowledge/context.md +7 -0
- package/runtime/agents/github-pr-reviewer/knowledge/system.md +17 -0
- package/runtime/agents/github-pr-reviewer/templates/pr-automation-output.md +10 -0
- package/runtime/agents/github-pr-reviewer/templates/pr-inspection-output.md +9 -0
- package/runtime/agents/github-pr-reviewer/templates/pr-list-output.md +9 -0
- package/runtime/agents/github-pr-reviewer/templates/pr-review-output.md +17 -0
- package/runtime/cli/README.md +93 -0
- package/runtime/cli/aikit/__init__.py +1 -1
- package/runtime/cli/aikit/aliases.py +196 -0
- package/runtime/cli/aikit/app_home.py +78 -0
- package/runtime/cli/aikit/audit.py +344 -0
- package/runtime/cli/aikit/calendar.py +163 -0
- package/runtime/cli/aikit/diagnostics.py +9 -0
- package/runtime/cli/aikit/github_pr.py +254 -0
- package/runtime/cli/aikit/identity.py +75 -0
- package/runtime/cli/aikit/llm.py +240 -48
- package/runtime/cli/aikit/main.py +924 -24
- package/runtime/cli/aikit/memory.py +148 -8
- package/runtime/cli/aikit/notifications.py +9 -0
- package/runtime/cli/aikit/permissions.py +345 -0
- package/runtime/cli/aikit/personality.py +123 -0
- package/runtime/cli/aikit/providers.py +4 -5
- package/runtime/cli/aikit/scheduler.py +18 -0
- package/runtime/cli/aikit/sessions.py +396 -0
- package/runtime/cli/aikit/setup_wizard.py +12 -0
- package/runtime/cli/aikit/tasks.py +351 -0
- package/runtime/cli/aikit/toolchain.py +274 -0
- package/runtime/plugins/claude-code-ai-devkit/plugin.json +1 -1
- package/runtime/plugins/claude-skill-ai-devkit/plugin.json +1 -1
- package/runtime/providers/calendar.yaml +28 -0
- package/runtime/providers/github.yaml +42 -0
- package/runtime/providers/local-notification.yaml +19 -0
- package/runtime/providers/local-scheduler.yaml +24 -0
- package/runtime/scripts/README.md +1 -1
- package/runtime/scripts/verify-release-alignment.mjs +1 -1
- package/runtime/vendor/skills/napkin/napkin.md +13 -3
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ agent doctor
|
|
|
26
26
|
Expected version for this release:
|
|
27
27
|
|
|
28
28
|
```text
|
|
29
|
-
agent 0.0
|
|
29
|
+
agent 0.1.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
@@ -60,6 +60,168 @@ Natural-language mode requires an LLM backend. Deterministic commands such as
|
|
|
60
60
|
`agent agents list`, `agent capabilities list`, `agent doctor`, `agent provider`
|
|
61
61
|
and `agent run` do not require an LLM.
|
|
62
62
|
|
|
63
|
+
## Complete Configuration Tutorial
|
|
64
|
+
|
|
65
|
+
There are three practical ways to use agents from the CLI:
|
|
66
|
+
|
|
67
|
+
1. Use an official authenticated host CLI, such as Codex CLI or Claude Code.
|
|
68
|
+
2. Use API keys for OpenAI, Anthropic or OpenRouter.
|
|
69
|
+
3. Use a local OpenAI-compatible backend, such as Ollama.
|
|
70
|
+
|
|
71
|
+
Agent DevKit does not log in directly to ChatGPT web, Claude.ai or Claude
|
|
72
|
+
Desktop. To reuse a user subscription/login, it delegates to the official host
|
|
73
|
+
CLI already installed and authenticated on your machine. For CI, automation or
|
|
74
|
+
non-interactive servers, prefer API-key backends.
|
|
75
|
+
|
|
76
|
+
### Option A: GPT through Codex CLI
|
|
77
|
+
|
|
78
|
+
Install the official Codex CLI:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Run Codex once and complete the browser login with your ChatGPT account or API
|
|
85
|
+
key:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
codex
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Verify that the binary is available:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
codex --version
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Configure Agent DevKit to use Codex CLI as the default LLM backend:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
agent llm configure codex-cli --set-default
|
|
101
|
+
agent llm doctor codex-cli
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Run a prompt:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
agent "analyze this repository and identify stabilization risks"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Option B: Claude through Claude Code
|
|
111
|
+
|
|
112
|
+
Install the official Claude Code CLI:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Run Claude Code once and complete the browser login:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
claude
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Verify that the binary is available:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
claude --version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Configure Agent DevKit to use Claude Code as the default LLM backend:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
agent llm configure claude-code --set-default
|
|
134
|
+
agent llm doctor claude-code
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Run a prompt:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
agent "plan the investigation for this production incident"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
To switch Claude accounts later, open `claude` and use `/login` inside the
|
|
144
|
+
interactive session.
|
|
145
|
+
|
|
146
|
+
### Option C: OpenAI API key
|
|
147
|
+
|
|
148
|
+
Agent DevKit stores credential references, not secret values. Keep the API key
|
|
149
|
+
in your shell environment:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
export OPENAI_API_KEY="..."
|
|
153
|
+
agent llm configure openai --api-key-env OPENAI_API_KEY --model gpt-5 --set-default
|
|
154
|
+
agent llm doctor openai
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Option D: Anthropic API key
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
export ANTHROPIC_API_KEY="..."
|
|
161
|
+
agent llm configure anthropic --api-key-env ANTHROPIC_API_KEY --model claude-sonnet-4-5 --set-default
|
|
162
|
+
agent llm doctor anthropic
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Option E: OpenRouter API key
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
export OPENROUTER_API_KEY="..."
|
|
169
|
+
agent llm configure openrouter --api-key-env OPENROUTER_API_KEY --model openai/gpt-5 --set-default
|
|
170
|
+
agent llm doctor openrouter
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Option F: Ollama local backend
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
ollama serve
|
|
177
|
+
ollama pull qwen2.5-coder
|
|
178
|
+
agent llm configure ollama --base-url http://localhost:11434/v1 --model qwen2.5-coder --set-default
|
|
179
|
+
agent llm doctor ollama
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Switch or override the backend
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
agent llm list
|
|
186
|
+
agent llm set-default codex-cli
|
|
187
|
+
agent llm set-default claude-code
|
|
188
|
+
agent llm set-default openai
|
|
189
|
+
agent llm doctor
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Use one backend for a single run:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
agent --llm claude-code "analyze this incident"
|
|
196
|
+
agent --llm openai "create a regression test plan"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Use Agents From The CLI
|
|
200
|
+
|
|
201
|
+
Agent DevKit has two execution modes:
|
|
202
|
+
|
|
203
|
+
- `agent "<prompt>"`: natural-language routing; requires an LLM backend.
|
|
204
|
+
- `agent run <agent> <capability>`: deterministic execution; does not require
|
|
205
|
+
an LLM backend.
|
|
206
|
+
|
|
207
|
+
Natural-language example:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
agent "analise o problema relatado no card 9900"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Deterministic example:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
agent run azure-devops-orchestrator read-card --project "Project" --id 9900 --include-comments
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Inspect a capability contract before running it:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
agent inspect azure-devops-orchestrator read-card
|
|
223
|
+
```
|
|
224
|
+
|
|
63
225
|
## Configure LLM Backends
|
|
64
226
|
|
|
65
227
|
Agent DevKit stores references to credentials, not secret values. API keys stay
|
|
@@ -95,6 +257,13 @@ agent llm configure codex-cli --set-default
|
|
|
95
257
|
agent llm configure claude-code --set-default
|
|
96
258
|
```
|
|
97
259
|
|
|
260
|
+
Official references:
|
|
261
|
+
|
|
262
|
+
- Codex CLI: https://developers.openai.com/codex/cli
|
|
263
|
+
- Codex authentication: https://developers.openai.com/codex/auth
|
|
264
|
+
- Claude Code quickstart: https://code.claude.com/docs/en/quickstart
|
|
265
|
+
- Claude Code setup: https://code.claude.com/docs/en/setup
|
|
266
|
+
|
|
98
267
|
## Configure Providers
|
|
99
268
|
|
|
100
269
|
Configure only the provider you need for a task. Missing optional providers are
|
package/package.json
CHANGED
package/runtime/README.md
CHANGED
|
@@ -32,17 +32,19 @@ O pacote instala o comando canonico `agent`. O nome do pacote npm e
|
|
|
32
32
|
|
|
33
33
|
## Primeiro uso
|
|
34
34
|
|
|
35
|
-
Comandos deterministicos nao precisam de LLM configurada
|
|
35
|
+
Comandos deterministicos nao precisam de LLM configurada. Use estes comandos
|
|
36
|
+
para validar se o runtime esta saudavel e quais agentes existem:
|
|
36
37
|
|
|
37
38
|
```bash
|
|
38
39
|
agent agents list
|
|
39
40
|
agent capabilities list
|
|
40
41
|
agent providers list
|
|
41
42
|
agent llm list
|
|
43
|
+
agent commands list
|
|
42
44
|
agent doctor
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
Instale os artefatos locais do Agent DevKit no projeto
|
|
47
|
+
Instale os artefatos locais do Agent DevKit no projeto em que voce trabalha:
|
|
46
48
|
|
|
47
49
|
```bash
|
|
48
50
|
cd /caminho/do/projeto
|
|
@@ -50,48 +52,221 @@ agent install project --target . --host all
|
|
|
50
52
|
agent doctor --project .
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Esse comando cria apenas arquivos de descoberta para hosts como Codex e Claude.
|
|
56
|
+
Ele nao grava `.env`, nao solicita credenciais e nao persiste segredos.
|
|
57
|
+
|
|
58
|
+
Depois de configurar uma LLM, voce pode usar prompt livre direto no comando
|
|
59
|
+
canonico:
|
|
54
60
|
|
|
55
61
|
```bash
|
|
56
62
|
agent "analise o problema relatado no card 9900"
|
|
57
63
|
```
|
|
58
64
|
|
|
59
65
|
Esse modo usa backend LLM. Se nenhum backend estiver configurado, a CLI informa
|
|
60
|
-
como configurar ou como executar uma capability deterministica com
|
|
66
|
+
como configurar uma LLM ou como executar uma capability deterministica com
|
|
67
|
+
`agent run`.
|
|
68
|
+
|
|
69
|
+
## Tutorial completo de configuracao
|
|
70
|
+
|
|
71
|
+
Existem tres formas principais de usar agentes pelo CLI:
|
|
72
|
+
|
|
73
|
+
1. Usar uma CLI oficial ja autenticada, como Codex CLI ou Claude Code.
|
|
74
|
+
2. Usar API key de OpenAI, Anthropic ou OpenRouter.
|
|
75
|
+
3. Usar um modelo local compativel, como Ollama.
|
|
76
|
+
|
|
77
|
+
O Agent DevKit nao faz login direto no ChatGPT web, Claude.ai ou Claude
|
|
78
|
+
Desktop. Para reaproveitar assinatura/login de usuario, ele chama as CLIs
|
|
79
|
+
oficiais instaladas na maquina. Para automacao, CI ou ambientes sem login
|
|
80
|
+
interativo, prefira API key.
|
|
81
|
+
|
|
82
|
+
### Opcao A: usar GPT pelo Codex CLI
|
|
83
|
+
|
|
84
|
+
Instale o Codex CLI oficial:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Abra o Codex CLI e conclua o login com sua conta ChatGPT ou API key:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
codex
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Valide se o binario esta no `PATH`:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
codex --version
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Configure o Agent DevKit para usar o Codex CLI como backend padrao:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
agent llm configure codex-cli --set-default
|
|
106
|
+
agent llm doctor codex-cli
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Execute um prompt livre:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
agent "analise este repositorio e indique riscos de estabilizacao"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Quando este backend e usado, o Agent DevKit chama:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
codex exec --skip-git-repo-check --ephemeral "<prompt>"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Opcao B: usar Claude pelo Claude Code
|
|
122
|
+
|
|
123
|
+
Instale o Claude Code oficial:
|
|
61
124
|
|
|
62
|
-
|
|
125
|
+
```bash
|
|
126
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
127
|
+
```
|
|
63
128
|
|
|
64
|
-
|
|
65
|
-
de ambiente em `~/.ai-devkit/config.json`.
|
|
129
|
+
Abra o Claude Code e conclua o login com sua conta Claude:
|
|
66
130
|
|
|
67
|
-
|
|
131
|
+
```bash
|
|
132
|
+
claude
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Valide se o binario esta no `PATH`:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
claude --version
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Configure o Agent DevKit para usar Claude Code como backend padrao:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
agent llm configure claude-code --set-default
|
|
145
|
+
agent llm doctor claude-code
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Execute um prompt livre:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
agent "planeje a investigacao do incidente informado pelo suporte"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Quando este backend e usado, o Agent DevKit chama:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
claude --print --permission-mode plan "<prompt>"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Opcao C: usar OpenAI por API key
|
|
161
|
+
|
|
162
|
+
Defina a chave no ambiente. O Agent DevKit salva apenas a referencia para a
|
|
163
|
+
variavel, nao o valor da chave:
|
|
68
164
|
|
|
69
165
|
```bash
|
|
70
166
|
export OPENAI_API_KEY="..."
|
|
71
167
|
agent llm configure openai --api-key-env OPENAI_API_KEY --model gpt-5 --set-default
|
|
72
|
-
agent llm doctor
|
|
168
|
+
agent llm doctor openai
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Uso:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
agent "gere um plano de rollback para esta mudanca"
|
|
73
175
|
```
|
|
74
176
|
|
|
75
|
-
Anthropic
|
|
177
|
+
### Opcao D: usar Anthropic por API key
|
|
76
178
|
|
|
77
179
|
```bash
|
|
78
180
|
export ANTHROPIC_API_KEY="..."
|
|
79
181
|
agent llm configure anthropic --api-key-env ANTHROPIC_API_KEY --model claude-sonnet-4-5 --set-default
|
|
182
|
+
agent llm doctor anthropic
|
|
80
183
|
```
|
|
81
184
|
|
|
82
|
-
|
|
185
|
+
Uso:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
agent "revise este plano tecnico e aponte lacunas"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Opcao E: usar OpenRouter por API key
|
|
83
192
|
|
|
84
193
|
```bash
|
|
85
194
|
export OPENROUTER_API_KEY="..."
|
|
86
195
|
agent llm configure openrouter --api-key-env OPENROUTER_API_KEY --model openai/gpt-5 --set-default
|
|
196
|
+
agent llm doctor openrouter
|
|
87
197
|
```
|
|
88
198
|
|
|
89
|
-
|
|
199
|
+
Uso:
|
|
90
200
|
|
|
91
201
|
```bash
|
|
202
|
+
agent "roteie este pedido para o agente especialista adequado"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Opcao F: usar Ollama local
|
|
206
|
+
|
|
207
|
+
Inicie o Ollama localmente e configure um endpoint compativel com OpenAI:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
ollama serve
|
|
211
|
+
ollama pull qwen2.5-coder
|
|
92
212
|
agent llm configure ollama --base-url http://localhost:11434/v1 --model qwen2.5-coder --set-default
|
|
93
|
-
agent llm
|
|
94
|
-
|
|
213
|
+
agent llm doctor ollama
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Uso:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
agent "explique quais capabilities podem ajudar nesta demanda"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Alternar backend padrao
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
agent llm list
|
|
226
|
+
agent llm set-default codex-cli
|
|
227
|
+
agent llm set-default claude-code
|
|
228
|
+
agent llm set-default openai
|
|
229
|
+
agent llm doctor
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Tambem e possivel escolher um backend apenas para uma execucao:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
agent --llm claude-code "analise este incidente"
|
|
236
|
+
agent --llm openai "crie um plano de testes"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Referencias oficiais:
|
|
240
|
+
|
|
241
|
+
- Codex CLI: https://developers.openai.com/codex/cli
|
|
242
|
+
- Codex authentication: https://developers.openai.com/codex/auth
|
|
243
|
+
- Claude Code quickstart: https://code.claude.com/docs/en/quickstart
|
|
244
|
+
- Claude Code setup: https://code.claude.com/docs/en/setup
|
|
245
|
+
|
|
246
|
+
## Usar agentes por CLI
|
|
247
|
+
|
|
248
|
+
Existem dois modos de execucao:
|
|
249
|
+
|
|
250
|
+
- `agent "<prompt>"`: entrada em linguagem natural; exige backend LLM.
|
|
251
|
+
- `agent run <agent> <capability>`: execucao deterministica; nao exige LLM.
|
|
252
|
+
|
|
253
|
+
Exemplo em linguagem natural:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
agent "analise o problema relatado no card 9900"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Exemplo deterministico:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
agent run azure-devops-orchestrator read-card --project "Projeto" --id 9900 --include-comments
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Antes de executar uma capability, voce pode inspecionar contrato, entradas e
|
|
266
|
+
saidas:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
agent inspect azure-devops-orchestrator read-card
|
|
95
270
|
```
|
|
96
271
|
|
|
97
272
|
## Configurar providers
|
|
@@ -377,6 +552,9 @@ e ignorado pelo Git. Para Azure DevOps, `AZURE_DEVOPS_ORG` e
|
|
|
377
552
|
- [`figma-ui-ux-product-designer`](agents/figma-ui-ux-product-designer/):
|
|
378
553
|
especialista UI/UX para analisar contexto de produto e criar, recriar,
|
|
379
554
|
evoluir e revisar designs mobile e web com Figma quando disponivel.
|
|
555
|
+
- [`github-pr-reviewer`](agents/github-pr-reviewer/): especialista em Pull
|
|
556
|
+
Requests GitHub para listar revisoes pendentes, inspecionar PRs, revisar diffs
|
|
557
|
+
em modo report-only e criar automacoes locais conservadoras.
|
|
380
558
|
- [`knowledge-generator`](agents/knowledge-generator/): especialista em gerar
|
|
381
559
|
knowledge versionavel a partir de arquivos, pastas, projetos e documentacoes.
|
|
382
560
|
- [`n1-support-agent`](agents/n1-support-agent/): especialista N1 para executar
|
package/runtime/agent
CHANGED
|
@@ -4,29 +4,45 @@
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
import sys
|
|
7
|
+
import os
|
|
8
|
+
from pathlib import Path
|
|
7
9
|
|
|
8
10
|
from cli.aikit.main import DETERMINISTIC_COMMANDS, LLM_COMMANDS, main
|
|
9
11
|
|
|
10
12
|
|
|
13
|
+
SESSION_SHORTCUTS = {"-s", "--sessions"}
|
|
14
|
+
AGENT_PROMPT_FLAGS = {"--llm", "--no-llm-fallback", "--session", "--new-session"}
|
|
15
|
+
GLOBAL_PROMPT_FLAGS = {"--json", "--dry-run"}
|
|
16
|
+
|
|
17
|
+
|
|
11
18
|
def normalize_args(argv: list[str]) -> list[str]:
|
|
12
19
|
if not argv:
|
|
13
20
|
return ["agent"]
|
|
14
21
|
commands = set(DETERMINISTIC_COMMANDS) | set(LLM_COMMANDS)
|
|
15
|
-
|
|
22
|
+
leading: list[str] = []
|
|
23
|
+
remaining = list(argv)
|
|
24
|
+
while remaining and remaining[0] in GLOBAL_PROMPT_FLAGS:
|
|
25
|
+
leading.append(remaining.pop(0))
|
|
26
|
+
if leading:
|
|
27
|
+
if not remaining:
|
|
28
|
+
return [*leading, "agent"]
|
|
29
|
+
if remaining[0] in SESSION_SHORTCUTS:
|
|
30
|
+
return [*leading, *remaining]
|
|
31
|
+
if remaining[0] in commands:
|
|
32
|
+
return [*leading, *remaining]
|
|
33
|
+
return [*leading, "agent", *remaining]
|
|
34
|
+
first = remaining[0]
|
|
16
35
|
if first in {"--help", "-h", "--version", "-v"}:
|
|
17
|
-
return
|
|
18
|
-
if first
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return argv
|
|
23
|
-
return ["--json", "agent", *argv[1:]]
|
|
24
|
-
if first in {"--llm"}:
|
|
25
|
-
return ["agent", *argv]
|
|
36
|
+
return remaining
|
|
37
|
+
if first in SESSION_SHORTCUTS:
|
|
38
|
+
return remaining
|
|
39
|
+
if first in AGENT_PROMPT_FLAGS:
|
|
40
|
+
return ["agent", *remaining]
|
|
26
41
|
if first in commands:
|
|
27
|
-
return
|
|
28
|
-
return ["agent", *
|
|
42
|
+
return remaining
|
|
43
|
+
return ["agent", *remaining]
|
|
29
44
|
|
|
30
45
|
|
|
31
46
|
if __name__ == "__main__":
|
|
32
|
-
|
|
47
|
+
invoked_as = os.environ.get("AI_DEVKIT_INVOKED_AS") or Path(sys.argv[0]).name
|
|
48
|
+
raise SystemExit(main(normalize_args(sys.argv[1:]), prog=invoked_as))
|
package/runtime/agents/README.md
CHANGED
|
@@ -57,6 +57,9 @@ agents/<agent-id>/
|
|
|
57
57
|
conciliacao, revisao e exportacao de planilhas Excel.
|
|
58
58
|
- `figma-ui-ux-product-designer`: especialista UI/UX para criar, recriar,
|
|
59
59
|
evoluir e revisar designs mobile e web.
|
|
60
|
+
- `github-pr-reviewer`: especialista em Pull Requests GitHub, revisao
|
|
61
|
+
report-only, permissao explicita para comentarios/aprovacoes e automacoes
|
|
62
|
+
locais conservadoras.
|
|
60
63
|
- `knowledge-generator`: especialista em gerar knowledge versionavel a partir de
|
|
61
64
|
fontes locais e documentacoes.
|
|
62
65
|
- `n1-support-agent`: especialista N1 para runbooks operacionais a partir de
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Instrucoes locais para o agente `github-pr-reviewer`.
|
|
4
|
+
|
|
5
|
+
Este agente opera em modo conservador por padrao:
|
|
6
|
+
|
|
7
|
+
- leitura de PRs e diffs e permitida quando `gh` estiver autenticado;
|
|
8
|
+
- comentarios, aprovacao e request changes exigem opt-in explicito;
|
|
9
|
+
- automacoes nascem `report-only`;
|
|
10
|
+
- nunca aprove PR sem diff completo e checks obrigatorios conhecidos.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
id: github-pr-reviewer
|
|
2
|
+
kind: specialist-agent
|
|
3
|
+
name: GitHub PR Reviewer
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
status: draft
|
|
6
|
+
owner: agent-devkit
|
|
7
|
+
|
|
8
|
+
purpose: >
|
|
9
|
+
Listar PRs pendentes de revisao, inspecionar diffs, gerar relatorios
|
|
10
|
+
report-only e criar automacoes locais de revisao diaria com permissoes
|
|
11
|
+
conservadoras.
|
|
12
|
+
|
|
13
|
+
default_context:
|
|
14
|
+
- knowledge/system.md
|
|
15
|
+
- knowledge/context.md
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
required: []
|
|
19
|
+
optional:
|
|
20
|
+
- GITHUB_TOKEN
|
|
21
|
+
|
|
22
|
+
capabilities:
|
|
23
|
+
- list-review-requests
|
|
24
|
+
- inspect-pr
|
|
25
|
+
- review-pr-diff
|
|
26
|
+
- create-review-automation
|
|
27
|
+
|
|
28
|
+
write_policy:
|
|
29
|
+
read_operations: auto
|
|
30
|
+
comments: explicit_opt_in
|
|
31
|
+
approvals: explicit_opt_in
|
|
32
|
+
request_changes: explicit_opt_in
|
|
33
|
+
default_mode: report-only
|
package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
id: github-pr-reviewer.create-review-automation
|
|
2
|
+
kind: capability
|
|
3
|
+
name: Create review automation
|
|
4
|
+
status: draft
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
purpose: Criar task local diaria para revisar PRs pendentes em modo report-only.
|
|
7
|
+
write_policy: local-write
|
|
8
|
+
entrypoint:
|
|
9
|
+
workflow: workflow.md
|
|
10
|
+
output_template: ../../templates/pr-automation-output.md
|
|
11
|
+
inputs:
|
|
12
|
+
required: []
|
|
13
|
+
optional: [time, permissions]
|
|
14
|
+
outputs:
|
|
15
|
+
artifacts: [local-task]
|
|
16
|
+
requires:
|
|
17
|
+
providers:
|
|
18
|
+
- id: github
|
|
19
|
+
mode: optional
|
|
20
|
+
fallback: manual_steps
|
package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/decision-rules.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Decision Rules
|
|
2
|
+
|
|
3
|
+
- Automacoes de PR nascem `report-only`.
|
|
4
|
+
- Nao ativar comentario, aprovacao ou request changes sem permissao explicita.
|
|
5
|
+
- Preferir notificacao terminal local no MVP.
|
|
6
|
+
- Se o provider GitHub nao estiver configurado, criar apenas plano ou pedir
|
|
7
|
+
configuracao antes da execucao real.
|
|
8
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Workflow
|
|
2
|
+
|
|
3
|
+
1. Coletar periodicidade desejada, usando diario 09:00 como padrao conservador.
|
|
4
|
+
2. Criar task local que liste PRs pendentes em modo `report-only`.
|
|
5
|
+
3. Registrar permissoes conservadoras: sem comentario, aprovacao ou request
|
|
6
|
+
changes por padrao.
|
|
7
|
+
4. Orientar o usuario a conceder permissoes explicitamente caso deseje escrita
|
|
8
|
+
futura.
|
|
9
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
id: github-pr-reviewer.inspect-pr
|
|
2
|
+
kind: capability
|
|
3
|
+
name: Inspect PR
|
|
4
|
+
status: draft
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
purpose: Inspecionar metadados de uma Pull Request.
|
|
7
|
+
write_policy: read-only
|
|
8
|
+
entrypoint:
|
|
9
|
+
workflow: workflow.md
|
|
10
|
+
output_template: ../../templates/pr-inspection-output.md
|
|
11
|
+
inputs:
|
|
12
|
+
required: [pr_ref]
|
|
13
|
+
optional: []
|
|
14
|
+
outputs:
|
|
15
|
+
artifacts: []
|
|
16
|
+
requires:
|
|
17
|
+
providers:
|
|
18
|
+
- id: github
|
|
19
|
+
mode: optional
|
|
20
|
+
fallback: manual_steps
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
id: github-pr-reviewer.list-review-requests
|
|
2
|
+
kind: capability
|
|
3
|
+
name: List review requests
|
|
4
|
+
status: draft
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
purpose: Listar PRs aguardando revisao do usuario autenticado no GitHub CLI.
|
|
7
|
+
write_policy: read-only
|
|
8
|
+
entrypoint:
|
|
9
|
+
workflow: workflow.md
|
|
10
|
+
output_template: ../../templates/pr-list-output.md
|
|
11
|
+
inputs:
|
|
12
|
+
required: []
|
|
13
|
+
optional: [state]
|
|
14
|
+
outputs:
|
|
15
|
+
artifacts: []
|
|
16
|
+
requires:
|
|
17
|
+
providers:
|
|
18
|
+
- id: github
|
|
19
|
+
mode: optional
|
|
20
|
+
fallback: manual_steps
|