aios-core 3.0.0 → 3.2.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/.aios-core/development/agents/squad-creator.md +261 -0
- package/.aios-core/development/scripts/squad/index.js +36 -2
- package/.aios-core/development/scripts/squad/squad-designer.js +1010 -0
- package/.aios-core/development/scripts/squad/squad-generator.js +1317 -0
- package/.aios-core/development/tasks/squad-creator-create.md +289 -0
- package/.aios-core/development/tasks/squad-creator-design.md +334 -0
- package/.aios-core/development/tasks/squad-creator-download.md +65 -0
- package/.aios-core/development/tasks/squad-creator-list.md +225 -0
- package/.aios-core/development/tasks/squad-creator-publish.md +86 -0
- package/.aios-core/development/tasks/squad-creator-sync-synkra.md +83 -0
- package/.aios-core/install-manifest.yaml +2233 -349
- package/.aios-core/schemas/squad-design-schema.json +299 -0
- package/bin/aios-init.js +126 -0
- package/package.json +4 -1
- package/scripts/generate-install-manifest.js +337 -0
- package/scripts/validate-manifest.js +265 -0
- package/squads/.designs/duplicate-test-design.yaml +23 -0
- package/squads/.designs/force-test-design.yaml +23 -0
- package/squads/.designs/nested-test-design.yaml +23 -0
- package/squads/.designs/test-squad-design.yaml +23 -0
- package/src/installer/brownfield-upgrader.js +438 -0
- package/src/installer/file-hasher.js +137 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
task: Create Squad
|
|
3
|
+
responsavel: "@squad-creator"
|
|
4
|
+
responsavel_type: agent
|
|
5
|
+
atomic_layer: task
|
|
6
|
+
Entrada: |
|
|
7
|
+
- name: Nome do squad (kebab-case, obrigatorio)
|
|
8
|
+
- description: Descricao (opcional, elicitacao)
|
|
9
|
+
- author: Autor (opcional, default: git config user.name)
|
|
10
|
+
- license: Licenca (opcional, default: MIT)
|
|
11
|
+
- template: Template base (basic | etl | agent-only)
|
|
12
|
+
- config_mode: extend | override | none
|
|
13
|
+
Saida: |
|
|
14
|
+
- squad_path: Caminho do squad criado
|
|
15
|
+
- manifest: Conteudo do squad.yaml gerado
|
|
16
|
+
- next_steps: Instrucoes para proximos passos
|
|
17
|
+
Checklist:
|
|
18
|
+
- "[ ] Validar nome (kebab-case, nao existe)"
|
|
19
|
+
- "[ ] Coletar informacoes via elicitacao"
|
|
20
|
+
- "[ ] Gerar estrutura de diretorios"
|
|
21
|
+
- "[ ] Gerar squad.yaml"
|
|
22
|
+
- "[ ] Gerar arquivos de config (coding-standards, etc.)"
|
|
23
|
+
- "[ ] Gerar exemplo de agent"
|
|
24
|
+
- "[ ] Gerar exemplo de task"
|
|
25
|
+
- "[ ] Executar validacao inicial"
|
|
26
|
+
- "[ ] Exibir proximos passos"
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# *create-squad
|
|
30
|
+
|
|
31
|
+
Cria um novo squad seguindo a arquitetura task-first do AIOS.
|
|
32
|
+
|
|
33
|
+
## Uso
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
@squad-creator
|
|
37
|
+
|
|
38
|
+
*create-squad
|
|
39
|
+
# → Modo interativo, elicita todas as informacoes
|
|
40
|
+
|
|
41
|
+
*create-squad meu-squad
|
|
42
|
+
# → Usa defaults para o resto
|
|
43
|
+
|
|
44
|
+
*create-squad meu-squad --template etl --author "Meu Nome"
|
|
45
|
+
# → Especifica opcoes diretamente
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Parametros
|
|
49
|
+
|
|
50
|
+
| Parameter | Type | Default | Description |
|
|
51
|
+
|-----------|------|---------|-------------|
|
|
52
|
+
| `name` | string | - | Squad name (kebab-case, required) |
|
|
53
|
+
| `--description` | string | "Custom squad" | Squad description |
|
|
54
|
+
| `--author` | string | git user.name | Author name |
|
|
55
|
+
| `--license` | string | MIT | License type |
|
|
56
|
+
| `--template` | string | basic | Template: basic, etl, agent-only |
|
|
57
|
+
| `--config-mode` | string | extend | Config inheritance: extend, override, none |
|
|
58
|
+
| `--skip-validation` | flag | false | Skip initial validation |
|
|
59
|
+
| `--yes` | flag | false | Skip interactive prompts, use defaults |
|
|
60
|
+
|
|
61
|
+
## Elicitacao Interativa
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
? Squad name: meu-dominio-squad
|
|
65
|
+
? Description: Squad para automacao de processos X
|
|
66
|
+
? Author: [git config user.name]
|
|
67
|
+
? License: (MIT)
|
|
68
|
+
> MIT
|
|
69
|
+
Apache-2.0
|
|
70
|
+
ISC
|
|
71
|
+
UNLICENSED
|
|
72
|
+
? Template:
|
|
73
|
+
> basic (estrutura minima)
|
|
74
|
+
etl (processamento de dados)
|
|
75
|
+
agent-only (apenas agentes)
|
|
76
|
+
? Include example agent? (Y/n)
|
|
77
|
+
? Include example task? (Y/n)
|
|
78
|
+
? Config inheritance:
|
|
79
|
+
> extend (adiciona as regras do core)
|
|
80
|
+
override (substitui regras do core)
|
|
81
|
+
none (sem heranca)
|
|
82
|
+
? Minimum AIOS version: (2.1.0)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Templates Disponiveis
|
|
86
|
+
|
|
87
|
+
| Template | Description | Components |
|
|
88
|
+
|----------|-------------|------------|
|
|
89
|
+
| `basic` | Estrutura minima | 1 agent, 1 task |
|
|
90
|
+
| `etl` | Processamento de dados | 2 agents, 3 tasks, scripts |
|
|
91
|
+
| `agent-only` | Apenas agentes | 2 agents, sem tasks |
|
|
92
|
+
|
|
93
|
+
## Estrutura Gerada
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
./squads/meu-dominio-squad/
|
|
97
|
+
├── squad.yaml # Manifest
|
|
98
|
+
├── README.md # Documentacao
|
|
99
|
+
├── config/
|
|
100
|
+
│ ├── coding-standards.md # Extends/override core
|
|
101
|
+
│ ├── tech-stack.md # Tecnologias do squad
|
|
102
|
+
│ └── source-tree.md # Estrutura documentada
|
|
103
|
+
├── agents/
|
|
104
|
+
│ └── example-agent.md # Agente de exemplo
|
|
105
|
+
├── tasks/
|
|
106
|
+
│ └── example-agent-task.md # Task de exemplo
|
|
107
|
+
├── checklists/
|
|
108
|
+
│ └── .gitkeep
|
|
109
|
+
├── workflows/
|
|
110
|
+
│ └── .gitkeep
|
|
111
|
+
├── templates/
|
|
112
|
+
│ └── .gitkeep
|
|
113
|
+
├── tools/
|
|
114
|
+
│ └── .gitkeep
|
|
115
|
+
├── scripts/
|
|
116
|
+
│ └── .gitkeep
|
|
117
|
+
└── data/
|
|
118
|
+
└── .gitkeep
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## squad.yaml Gerado
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
name: meu-dominio-squad
|
|
125
|
+
version: 1.0.0
|
|
126
|
+
description: Squad para automacao de processos X
|
|
127
|
+
author: Meu Nome
|
|
128
|
+
license: MIT
|
|
129
|
+
slashPrefix: meu-dominio
|
|
130
|
+
|
|
131
|
+
aios:
|
|
132
|
+
minVersion: "2.1.0"
|
|
133
|
+
type: squad
|
|
134
|
+
|
|
135
|
+
components:
|
|
136
|
+
tasks:
|
|
137
|
+
- example-agent-task.md
|
|
138
|
+
agents:
|
|
139
|
+
- example-agent.md
|
|
140
|
+
workflows: []
|
|
141
|
+
checklists: []
|
|
142
|
+
templates: []
|
|
143
|
+
tools: []
|
|
144
|
+
scripts: []
|
|
145
|
+
|
|
146
|
+
config:
|
|
147
|
+
extends: extend
|
|
148
|
+
coding-standards: config/coding-standards.md
|
|
149
|
+
tech-stack: config/tech-stack.md
|
|
150
|
+
source-tree: config/source-tree.md
|
|
151
|
+
|
|
152
|
+
dependencies:
|
|
153
|
+
node: []
|
|
154
|
+
python: []
|
|
155
|
+
squads: []
|
|
156
|
+
|
|
157
|
+
tags:
|
|
158
|
+
- custom
|
|
159
|
+
- automation
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Flow
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
1. Parse arguments
|
|
166
|
+
├── If name provided → validate kebab-case
|
|
167
|
+
└── If no name → prompt for name
|
|
168
|
+
|
|
169
|
+
2. Check if squad exists
|
|
170
|
+
├── If exists → error with suggestion
|
|
171
|
+
└── If not exists → continue
|
|
172
|
+
|
|
173
|
+
3. Collect configuration
|
|
174
|
+
├── If --yes flag → use all defaults
|
|
175
|
+
└── If interactive → elicit each option
|
|
176
|
+
|
|
177
|
+
4. Generate squad structure
|
|
178
|
+
├── Create directories
|
|
179
|
+
├── Generate squad.yaml from template
|
|
180
|
+
├── Generate config files
|
|
181
|
+
├── Generate example agent (if requested)
|
|
182
|
+
├── Generate example task (if requested)
|
|
183
|
+
└── Add .gitkeep to empty directories
|
|
184
|
+
|
|
185
|
+
5. Run initial validation
|
|
186
|
+
├── If --skip-validation → skip
|
|
187
|
+
└── If validation → run squad-validator
|
|
188
|
+
|
|
189
|
+
6. Display success message
|
|
190
|
+
└── Show next steps
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Output de Sucesso
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
✅ Squad created successfully!
|
|
197
|
+
|
|
198
|
+
📁 Location: ./squads/meu-dominio-squad/
|
|
199
|
+
|
|
200
|
+
📋 Next steps:
|
|
201
|
+
1. cd squads/meu-dominio-squad
|
|
202
|
+
2. Customize squad.yaml with your details
|
|
203
|
+
3. Create your agents in agents/
|
|
204
|
+
4. Create tasks in tasks/ (task-first!)
|
|
205
|
+
5. Validate: @squad-creator *validate-squad meu-dominio-squad
|
|
206
|
+
|
|
207
|
+
📚 Documentation:
|
|
208
|
+
- Squad Guide: docs/guides/squads-guide.md
|
|
209
|
+
- Task Format: .aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md
|
|
210
|
+
|
|
211
|
+
🚀 When ready to share:
|
|
212
|
+
- Local only: Keep in ./squads/ (private)
|
|
213
|
+
- Public: @squad-creator *publish-squad meu-dominio-squad
|
|
214
|
+
- API: @squad-creator *sync-squad-synkra meu-dominio-squad
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Error Handling
|
|
218
|
+
|
|
219
|
+
| Error | Cause | Resolution |
|
|
220
|
+
|-------|-------|------------|
|
|
221
|
+
| `INVALID_NAME` | Name not kebab-case | Use lowercase with hyphens |
|
|
222
|
+
| `SQUAD_EXISTS` | Squad already exists | Choose different name or delete existing |
|
|
223
|
+
| `PERMISSION_DENIED` | Can't write to squads/ | Check directory permissions |
|
|
224
|
+
| `VALIDATION_FAILED` | Generated squad invalid | Check error details, fix manually |
|
|
225
|
+
|
|
226
|
+
## Implementation
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
const { SquadGenerator } = require('./.aios-core/development/scripts/squad');
|
|
230
|
+
const { SquadValidator } = require('./.aios-core/development/scripts/squad');
|
|
231
|
+
|
|
232
|
+
async function createSquad(options) {
|
|
233
|
+
const {
|
|
234
|
+
name,
|
|
235
|
+
description,
|
|
236
|
+
author,
|
|
237
|
+
license,
|
|
238
|
+
template,
|
|
239
|
+
configMode,
|
|
240
|
+
skipValidation,
|
|
241
|
+
includeAgent,
|
|
242
|
+
includeTask,
|
|
243
|
+
aiosMinVersion
|
|
244
|
+
} = options;
|
|
245
|
+
|
|
246
|
+
// Validate name
|
|
247
|
+
if (!/^[a-z][a-z0-9-]*[a-z0-9]$/.test(name)) {
|
|
248
|
+
throw new Error('INVALID_NAME: Squad name must be kebab-case');
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Generate squad
|
|
252
|
+
const generator = new SquadGenerator();
|
|
253
|
+
const result = await generator.generate({
|
|
254
|
+
name,
|
|
255
|
+
description,
|
|
256
|
+
author,
|
|
257
|
+
license,
|
|
258
|
+
template,
|
|
259
|
+
configMode,
|
|
260
|
+
includeAgent,
|
|
261
|
+
includeTask,
|
|
262
|
+
aiosMinVersion
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// Validate (unless skipped)
|
|
266
|
+
if (!skipValidation) {
|
|
267
|
+
const validator = new SquadValidator();
|
|
268
|
+
const validation = await validator.validate(result.path);
|
|
269
|
+
if (!validation.valid) {
|
|
270
|
+
console.warn('Warning: Generated squad has validation issues');
|
|
271
|
+
console.warn(validator.formatResult(validation, result.path));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Display success
|
|
276
|
+
console.log(`\n✅ Squad created successfully!\n`);
|
|
277
|
+
console.log(`📁 Location: ${result.path}/\n`);
|
|
278
|
+
displayNextSteps(name);
|
|
279
|
+
|
|
280
|
+
return result;
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Related
|
|
285
|
+
|
|
286
|
+
- **Agent:** @squad-creator (Craft)
|
|
287
|
+
- **Script:** squad-generator.js
|
|
288
|
+
- **Validator:** squad-validator.js (SQS-3)
|
|
289
|
+
- **Loader:** squad-loader.js (SQS-2)
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
---
|
|
2
|
+
task: Design Squad from Documentation
|
|
3
|
+
responsavel: "@squad-creator"
|
|
4
|
+
responsavel_type: agent
|
|
5
|
+
atomic_layer: task
|
|
6
|
+
elicit: true
|
|
7
|
+
Entrada: |
|
|
8
|
+
- docs: Documentation sources (text, files, or verbal description)
|
|
9
|
+
- domain: Optional domain hint to guide analysis
|
|
10
|
+
- output_path: Where to save blueprint (default: ./squads/.designs/)
|
|
11
|
+
Saida: |
|
|
12
|
+
- blueprint_path: Path to generated squad-design.yaml
|
|
13
|
+
- summary: Human-readable summary of recommendations
|
|
14
|
+
- confidence: Overall confidence score (0-1)
|
|
15
|
+
Checklist:
|
|
16
|
+
- "[ ] Collect documentation input"
|
|
17
|
+
- "[ ] Analyze domain and extract concepts"
|
|
18
|
+
- "[ ] Generate agent recommendations"
|
|
19
|
+
- "[ ] Generate task recommendations"
|
|
20
|
+
- "[ ] Present recommendations for refinement"
|
|
21
|
+
- "[ ] Apply user adjustments"
|
|
22
|
+
- "[ ] Generate blueprint file"
|
|
23
|
+
- "[ ] Display next steps"
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# *design-squad
|
|
27
|
+
|
|
28
|
+
Analyzes documentation and guides the user through designing a squad structure with intelligent recommendations for agents and tasks.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
@squad-creator
|
|
34
|
+
|
|
35
|
+
*design-squad
|
|
36
|
+
# → Interactive mode, prompts for documentation
|
|
37
|
+
|
|
38
|
+
*design-squad --docs ./docs/prd/my-project.md
|
|
39
|
+
# → Analyzes specific file
|
|
40
|
+
|
|
41
|
+
*design-squad --docs ./docs/prd/my-project.md,./docs/specs/api.yaml
|
|
42
|
+
# → Analyzes multiple files
|
|
43
|
+
|
|
44
|
+
*design-squad --domain "e-commerce order management"
|
|
45
|
+
# → Uses domain hint for guidance
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Parameters
|
|
49
|
+
|
|
50
|
+
| Parameter | Type | Default | Description |
|
|
51
|
+
|-----------|------|---------|-------------|
|
|
52
|
+
| `--docs` | string | - | Comma-separated paths to documentation files |
|
|
53
|
+
| `--domain` | string | - | Domain hint to guide analysis |
|
|
54
|
+
| `--output` | string | ./squads/.designs/ | Output directory for blueprint |
|
|
55
|
+
| `--quick` | flag | false | Accept all recommendations without review |
|
|
56
|
+
| `--verbose` | flag | false | Show detailed analysis output |
|
|
57
|
+
|
|
58
|
+
## Interactive Flow
|
|
59
|
+
|
|
60
|
+
### Phase 1: Documentation Input
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
? How would you like to provide documentation?
|
|
64
|
+
1. Paste text directly
|
|
65
|
+
2. Provide file paths
|
|
66
|
+
3. Describe the domain verbally
|
|
67
|
+
> 2
|
|
68
|
+
|
|
69
|
+
? Documentation file paths (comma-separated):
|
|
70
|
+
> ./docs/prd/my-project.md, ./docs/specs/api.yaml
|
|
71
|
+
|
|
72
|
+
Analyzing documentation...
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Phase 2: Domain Confirmation
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Based on your documentation, I identified:
|
|
79
|
+
|
|
80
|
+
Domain: Order Management System
|
|
81
|
+
Key Entities: Order, Customer, Product, Payment, Shipment
|
|
82
|
+
Main Workflows:
|
|
83
|
+
1. order-creation
|
|
84
|
+
2. payment-processing
|
|
85
|
+
3. inventory-check
|
|
86
|
+
4. shipment-tracking
|
|
87
|
+
|
|
88
|
+
Is this correct? [Y/n/Adjust]
|
|
89
|
+
> Y
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Phase 3: Agent Review
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Recommended Agent 1 of 3:
|
|
96
|
+
|
|
97
|
+
ID: order-manager
|
|
98
|
+
Role: Manages order lifecycle from creation to fulfillment
|
|
99
|
+
Commands: *create-order, *update-order, *cancel-order
|
|
100
|
+
Confidence: 92%
|
|
101
|
+
|
|
102
|
+
[A]ccept / [R]eject / [M]odify / [S]kip to tasks
|
|
103
|
+
> A
|
|
104
|
+
|
|
105
|
+
Recommended Agent 2 of 3:
|
|
106
|
+
...
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Phase 4: Task Review
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Tasks for order-manager:
|
|
113
|
+
|
|
114
|
+
1. create-order.md (90% confidence)
|
|
115
|
+
Entrada: customer_id, items[], payment_method
|
|
116
|
+
Saida: order_id, status, total
|
|
117
|
+
|
|
118
|
+
2. update-order.md (85% confidence)
|
|
119
|
+
Entrada: order_id, updates{}
|
|
120
|
+
Saida: updated_order, changelog
|
|
121
|
+
|
|
122
|
+
[A]ccept all / Review [1-2] / [R]eject all
|
|
123
|
+
> A
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Phase 5: Custom Additions
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Would you like to add any agents or tasks not recommended?
|
|
130
|
+
|
|
131
|
+
[A]dd agent / Add [T]ask / [C]ontinue to blueprint
|
|
132
|
+
> C
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Phase 6: Blueprint Generation
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Generating blueprint...
|
|
139
|
+
|
|
140
|
+
Summary:
|
|
141
|
+
Agents: 3 (3 recommended, 0 added)
|
|
142
|
+
Tasks: 8 (7 recommended, 1 added)
|
|
143
|
+
User adjustments: 2
|
|
144
|
+
Overall confidence: 88%
|
|
145
|
+
|
|
146
|
+
Saved: ./squads/.designs/order-management-squad-design.yaml
|
|
147
|
+
|
|
148
|
+
Next steps:
|
|
149
|
+
1. Review blueprint: cat ./squads/.designs/order-management-squad-design.yaml
|
|
150
|
+
2. Create squad: *create-squad order-management --from-design
|
|
151
|
+
3. Or edit blueprint manually before creation
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Analysis Pipeline
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
158
|
+
│ DOMAIN ANALYSIS PIPELINE │
|
|
159
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
160
|
+
│ │
|
|
161
|
+
│ 1. INPUT NORMALIZATION │
|
|
162
|
+
│ ├── Parse markdown/yaml/json files │
|
|
163
|
+
│ ├── Extract text content │
|
|
164
|
+
│ └── Merge multiple sources │
|
|
165
|
+
│ │
|
|
166
|
+
│ 2. ENTITY EXTRACTION │
|
|
167
|
+
│ ├── Identify nouns and proper nouns (capitalized terms) │
|
|
168
|
+
│ ├── Detect domain-specific terms (repeated concepts) │
|
|
169
|
+
│ ├── Group related concepts │
|
|
170
|
+
│ └── Output: entities[] │
|
|
171
|
+
│ │
|
|
172
|
+
│ 3. WORKFLOW DETECTION │
|
|
173
|
+
│ ├── Identify action verbs (create, update, delete, process) │
|
|
174
|
+
│ ├── Detect sequential processes (steps, flows) │
|
|
175
|
+
│ ├── Map input → process → output patterns │
|
|
176
|
+
│ └── Output: workflows[] │
|
|
177
|
+
│ │
|
|
178
|
+
│ 4. INTEGRATION MAPPING │
|
|
179
|
+
│ ├── Detect external system references (API, database, service) │
|
|
180
|
+
│ ├── Identify third-party mentions │
|
|
181
|
+
│ └── Output: integrations[] │
|
|
182
|
+
│ │
|
|
183
|
+
│ 5. STAKEHOLDER IDENTIFICATION │
|
|
184
|
+
│ ├── Detect user types/roles (admin, user, manager) │
|
|
185
|
+
│ ├── Identify personas mentioned │
|
|
186
|
+
│ └── Output: stakeholders[] │
|
|
187
|
+
│ │
|
|
188
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Recommendation Engine
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
195
|
+
│ RECOMMENDATION ENGINE │
|
|
196
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
197
|
+
│ │
|
|
198
|
+
│ AGENT GENERATION: │
|
|
199
|
+
│ ┌─────────────────────────────────────────────────────────────────┐│
|
|
200
|
+
│ │ For each major workflow: ││
|
|
201
|
+
│ │ → Generate agent with matching role ││
|
|
202
|
+
│ │ → Derive commands from workflow steps ││
|
|
203
|
+
│ │ → Calculate confidence based on clarity ││
|
|
204
|
+
│ │ ││
|
|
205
|
+
│ │ Deduplication: ││
|
|
206
|
+
│ │ → Merge similar agents (>70% overlap) ││
|
|
207
|
+
│ │ → Consolidate commands ││
|
|
208
|
+
│ └─────────────────────────────────────────────────────────────────┘│
|
|
209
|
+
│ │
|
|
210
|
+
│ TASK GENERATION: │
|
|
211
|
+
│ ┌─────────────────────────────────────────────────────────────────┐│
|
|
212
|
+
│ │ For each agent command: ││
|
|
213
|
+
│ │ → Generate task following TASK-FORMAT-SPECIFICATION-V1 ││
|
|
214
|
+
│ │ → Derive entrada from workflow inputs ││
|
|
215
|
+
│ │ → Derive saida from workflow outputs ││
|
|
216
|
+
│ │ → Generate checklist from workflow steps ││
|
|
217
|
+
│ └─────────────────────────────────────────────────────────────────┘│
|
|
218
|
+
│ │
|
|
219
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Output: Blueprint Schema
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
# squad-design.yaml
|
|
226
|
+
squad:
|
|
227
|
+
name: my-domain-squad
|
|
228
|
+
description: "Generated from documentation analysis"
|
|
229
|
+
domain: domain-name
|
|
230
|
+
|
|
231
|
+
analysis:
|
|
232
|
+
entities: [Entity1, Entity2, ...]
|
|
233
|
+
workflows: [workflow-1, workflow-2, ...]
|
|
234
|
+
integrations: [API1, Service2, ...]
|
|
235
|
+
stakeholders: [Role1, Role2, ...]
|
|
236
|
+
|
|
237
|
+
recommendations:
|
|
238
|
+
agents:
|
|
239
|
+
- id: agent-id
|
|
240
|
+
role: "Agent role description"
|
|
241
|
+
commands: [cmd1, cmd2]
|
|
242
|
+
confidence: 0.92
|
|
243
|
+
user_added: false
|
|
244
|
+
user_modified: false
|
|
245
|
+
|
|
246
|
+
tasks:
|
|
247
|
+
- name: task-name
|
|
248
|
+
agent: agent-id
|
|
249
|
+
entrada: [input1, input2]
|
|
250
|
+
saida: [output1, output2]
|
|
251
|
+
confidence: 0.88
|
|
252
|
+
|
|
253
|
+
template: basic | etl | agent-only | custom
|
|
254
|
+
config_mode: extend | override | none
|
|
255
|
+
|
|
256
|
+
metadata:
|
|
257
|
+
created_at: "2025-12-18T00:00:00Z"
|
|
258
|
+
source_docs: ["./path/to/doc1.md"]
|
|
259
|
+
user_adjustments: 2
|
|
260
|
+
overall_confidence: 0.87
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Integration with *create-squad
|
|
264
|
+
|
|
265
|
+
After generating a blueprint, use it with *create-squad:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
*create-squad my-domain-squad --from-design ./squads/.designs/my-domain-squad-design.yaml
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
This will:
|
|
272
|
+
1. Load the blueprint
|
|
273
|
+
2. Validate against schema
|
|
274
|
+
3. Generate squad structure with custom agents/tasks from blueprint
|
|
275
|
+
4. Skip interactive elicitation (uses blueprint values)
|
|
276
|
+
|
|
277
|
+
## Error Handling
|
|
278
|
+
|
|
279
|
+
| Error | Cause | Resolution |
|
|
280
|
+
|-------|-------|------------|
|
|
281
|
+
| `NO_DOCUMENTATION` | No input provided | Provide docs via --docs or interactively |
|
|
282
|
+
| `PARSE_ERROR` | Cannot read/parse file | Check file format (md, yaml, json) |
|
|
283
|
+
| `EMPTY_ANALYSIS` | No domain concepts extracted | Provide more detailed documentation |
|
|
284
|
+
| `BLUEPRINT_EXISTS` | Blueprint already exists | Use --force to overwrite |
|
|
285
|
+
|
|
286
|
+
## Implementation
|
|
287
|
+
|
|
288
|
+
```javascript
|
|
289
|
+
const { SquadDesigner } = require('./.aios-core/development/scripts/squad');
|
|
290
|
+
|
|
291
|
+
async function designSquad(options) {
|
|
292
|
+
const designer = new SquadDesigner();
|
|
293
|
+
|
|
294
|
+
// 1. Collect documentation
|
|
295
|
+
const docs = await designer.collectDocumentation(options);
|
|
296
|
+
|
|
297
|
+
// 2. Analyze domain
|
|
298
|
+
const analysis = await designer.analyzeDomain(docs);
|
|
299
|
+
|
|
300
|
+
// 3. Generate recommendations
|
|
301
|
+
const recommendations = {
|
|
302
|
+
agents: designer.generateAgentRecommendations(analysis),
|
|
303
|
+
tasks: designer.generateTaskRecommendations(analysis)
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// 4. Interactive refinement (unless --quick)
|
|
307
|
+
if (!options.quick) {
|
|
308
|
+
await designer.interactiveRefinement(recommendations);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// 5. Generate blueprint
|
|
312
|
+
const blueprint = await designer.generateBlueprint({
|
|
313
|
+
analysis,
|
|
314
|
+
recommendations,
|
|
315
|
+
metadata: {
|
|
316
|
+
source_docs: options.docs,
|
|
317
|
+
created_at: new Date().toISOString()
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// 6. Save blueprint
|
|
322
|
+
const blueprintPath = await designer.saveBlueprint(blueprint, options.output);
|
|
323
|
+
|
|
324
|
+
return { blueprintPath, blueprint };
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## Related
|
|
329
|
+
|
|
330
|
+
- **Agent:** @squad-creator (Craft)
|
|
331
|
+
- **Script:** squad-designer.js
|
|
332
|
+
- **Schema:** squad-design-schema.json
|
|
333
|
+
- **Integration:** *create-squad --from-design
|
|
334
|
+
- **Story:** SQS-9 (Squad Designer)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
task: Download Squad
|
|
3
|
+
responsavel: "@squad-creator"
|
|
4
|
+
responsavel_type: agent
|
|
5
|
+
atomic_layer: task
|
|
6
|
+
status: placeholder
|
|
7
|
+
sprint: 8
|
|
8
|
+
Entrada: |
|
|
9
|
+
- name: Nome do squad para baixar
|
|
10
|
+
- source: Fonte (aios-squads | synkra-api)
|
|
11
|
+
Saida: |
|
|
12
|
+
- squad_path: Caminho do squad baixado
|
|
13
|
+
- status: Sucesso ou erro
|
|
14
|
+
Checklist:
|
|
15
|
+
- "[ ] Implementar em Sprint 8 (SQS-5)"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# *download-squad
|
|
19
|
+
|
|
20
|
+
> **PLACEHOLDER** - Implementation scheduled for Sprint 8 (Story SQS-5)
|
|
21
|
+
|
|
22
|
+
## Planned Functionality
|
|
23
|
+
|
|
24
|
+
Downloads a public squad from the aios-squads repository or Synkra API marketplace.
|
|
25
|
+
|
|
26
|
+
## Planned Usage
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
@squad-creator
|
|
30
|
+
|
|
31
|
+
*download-squad etl-squad
|
|
32
|
+
# → Downloads from github.com/SynkraAI/aios-squads
|
|
33
|
+
|
|
34
|
+
*download-squad premium-pack --source synkra-api
|
|
35
|
+
# → Downloads from api.synkra.dev/squads (requires auth)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Planned Features
|
|
39
|
+
|
|
40
|
+
1. **Repository Source (Default)**
|
|
41
|
+
- Clone from github.com/SynkraAI/aios-squads
|
|
42
|
+
- Support specific versions via tags
|
|
43
|
+
- Validate squad before installation
|
|
44
|
+
|
|
45
|
+
2. **Synkra API Source**
|
|
46
|
+
- Download from api.synkra.dev/squads
|
|
47
|
+
- Support premium/paid squads
|
|
48
|
+
- Require authentication
|
|
49
|
+
|
|
50
|
+
3. **Installation**
|
|
51
|
+
- Install to ./squads/{name}/
|
|
52
|
+
- Run validation after download
|
|
53
|
+
- Show usage instructions
|
|
54
|
+
|
|
55
|
+
## Related Story
|
|
56
|
+
|
|
57
|
+
- **SQS-5:** SquadSyncService (Sprint 8)
|
|
58
|
+
- **SQS-6:** Registry Integration (Sprint 8)
|
|
59
|
+
|
|
60
|
+
## Current Status
|
|
61
|
+
|
|
62
|
+
This task is a placeholder. The full implementation will be done in Sprint 8.
|
|
63
|
+
|
|
64
|
+
For now, manually clone squads from:
|
|
65
|
+
- https://github.com/SynkraAI/aios-squads
|