aios-core 3.0.0 → 3.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.
@@ -0,0 +1,225 @@
1
+ ---
2
+ task: List Squads
3
+ responsavel: "@squad-creator"
4
+ responsavel_type: agent
5
+ atomic_layer: task
6
+ Entrada: |
7
+ - path: Caminho alternativo (opcional, default: ./squads)
8
+ - format: Formato de output (table | json | yaml)
9
+ Saida: |
10
+ - squads: Lista de squads encontrados
11
+ - count: Numero total de squads
12
+ Checklist:
13
+ - "[ ] Usar squad-generator.listLocal()"
14
+ - "[ ] Formatar output conforme format"
15
+ - "[ ] Exibir informacoes basicas de cada squad"
16
+ ---
17
+
18
+ # *list-squads
19
+
20
+ Lista todos os squads locais do projeto.
21
+
22
+ ## Uso
23
+
24
+ ```
25
+ @squad-creator
26
+ *list-squads
27
+ *list-squads --format json
28
+ *list-squads --path ./custom-squads
29
+ ```
30
+
31
+ ## Parametros
32
+
33
+ | Parameter | Type | Default | Description |
34
+ |-----------|------|---------|-------------|
35
+ | `--path` | string | ./squads | Path to squads directory |
36
+ | `--format` | string | table | Output format: table, json, yaml |
37
+ | `--include-invalid` | flag | false | Include squads without valid manifest |
38
+
39
+ ## Output Exemplo (Table)
40
+
41
+ ```
42
+ Local Squads (./squads/)
43
+
44
+ ┌─────────────────────┬─────────┬─────────────────────────────┬────────┐
45
+ │ Name │ Version │ Description │ Status │
46
+ ├─────────────────────┼─────────┼─────────────────────────────┼────────┤
47
+ │ meu-dominio-squad │ 1.0.0 │ Squad para automacao de X │ ✅ │
48
+ │ outro-squad │ 2.1.0 │ Outro squad customizado │ ✅ │
49
+ │ legacy-pack │ 1.0.0 │ Using config.yaml │ ⚠️ │
50
+ └─────────────────────┴─────────┴─────────────────────────────┴────────┘
51
+
52
+ Total: 3 squads (2 valid, 1 deprecated)
53
+ ```
54
+
55
+ ## Output Exemplo (JSON)
56
+
57
+ ```json
58
+ {
59
+ "squads": [
60
+ {
61
+ "name": "meu-dominio-squad",
62
+ "version": "1.0.0",
63
+ "description": "Squad para automacao de X",
64
+ "path": "./squads/meu-dominio-squad",
65
+ "status": "valid"
66
+ },
67
+ {
68
+ "name": "outro-squad",
69
+ "version": "2.1.0",
70
+ "description": "Outro squad customizado",
71
+ "path": "./squads/outro-squad",
72
+ "status": "valid"
73
+ }
74
+ ],
75
+ "count": 2,
76
+ "path": "./squads"
77
+ }
78
+ ```
79
+
80
+ ## Output Exemplo (YAML)
81
+
82
+ ```yaml
83
+ squads:
84
+ - name: meu-dominio-squad
85
+ version: 1.0.0
86
+ description: Squad para automacao de X
87
+ path: ./squads/meu-dominio-squad
88
+ status: valid
89
+ - name: outro-squad
90
+ version: 2.1.0
91
+ description: Outro squad customizado
92
+ path: ./squads/outro-squad
93
+ status: valid
94
+ count: 2
95
+ path: ./squads
96
+ ```
97
+
98
+ ## Status Indicators
99
+
100
+ | Status | Icon | Description |
101
+ |--------|------|-------------|
102
+ | valid | ✅ | Valid squad.yaml manifest |
103
+ | deprecated | ⚠️ | Using config.yaml (deprecated) |
104
+ | invalid | ❌ | No manifest found |
105
+
106
+ ## Flow
107
+
108
+ ```
109
+ 1. Parse arguments
110
+ ├── Get path (default: ./squads)
111
+ └── Get format (default: table)
112
+
113
+ 2. List squads
114
+ ├── Call SquadGenerator.listLocal()
115
+ └── Get array of squad info
116
+
117
+ 3. Filter results
118
+ ├── If --include-invalid → show all
119
+ └── If not → filter out invalid
120
+
121
+ 4. Format output
122
+ ├── If table → format as ASCII table
123
+ ├── If json → JSON.stringify
124
+ └── If yaml → yaml.dump
125
+
126
+ 5. Display result
127
+ └── Output formatted list
128
+ ```
129
+
130
+ ## Implementation
131
+
132
+ ```javascript
133
+ const { SquadGenerator } = require('./.aios-core/development/scripts/squad');
134
+
135
+ async function listSquads(options) {
136
+ const { path: squadsPath, format, includeInvalid } = options;
137
+
138
+ // List local squads
139
+ const generator = new SquadGenerator({ squadsPath });
140
+ let squads = await generator.listLocal();
141
+
142
+ // Filter if needed
143
+ if (!includeInvalid) {
144
+ squads = squads.filter(s => !s.invalid);
145
+ }
146
+
147
+ // Format output
148
+ switch (format) {
149
+ case 'json':
150
+ return JSON.stringify({ squads, count: squads.length, path: squadsPath }, null, 2);
151
+
152
+ case 'yaml':
153
+ return formatYaml({ squads, count: squads.length, path: squadsPath });
154
+
155
+ case 'table':
156
+ default:
157
+ return formatTable(squads, squadsPath);
158
+ }
159
+ }
160
+
161
+ function formatTable(squads, squadsPath) {
162
+ if (squads.length === 0) {
163
+ return `No squads found in ${squadsPath}/\n\nCreate one with: @squad-creator *create-squad my-squad`;
164
+ }
165
+
166
+ let output = `Local Squads (${squadsPath}/)\n\n`;
167
+
168
+ // Header
169
+ output += '┌' + '─'.repeat(22) + '┬' + '─'.repeat(9) + '┬' + '─'.repeat(30) + '┬' + '─'.repeat(8) + '┐\n';
170
+ output += '│ Name │ Version │ Description │ Status │\n';
171
+ output += '├' + '─'.repeat(22) + '┼' + '─'.repeat(9) + '┼' + '─'.repeat(30) + '┼' + '─'.repeat(8) + '┤\n';
172
+
173
+ // Rows
174
+ for (const squad of squads) {
175
+ const name = squad.name.padEnd(20).substring(0, 20);
176
+ const version = squad.version.padEnd(7).substring(0, 7);
177
+ const desc = (squad.description || '').padEnd(28).substring(0, 28);
178
+ const status = squad.invalid ? '❌' : squad.deprecated ? '⚠️' : '✅';
179
+ output += `│ ${name} │ ${version} │ ${desc} │ ${status} │\n`;
180
+ }
181
+
182
+ output += '└' + '─'.repeat(22) + '┴' + '─'.repeat(9) + '┴' + '─'.repeat(30) + '┴' + '─'.repeat(8) + '┘\n';
183
+
184
+ // Summary
185
+ const valid = squads.filter(s => !s.invalid && !s.deprecated).length;
186
+ const deprecated = squads.filter(s => s.deprecated).length;
187
+ const invalid = squads.filter(s => s.invalid).length;
188
+
189
+ output += `\nTotal: ${squads.length} squads`;
190
+ if (deprecated > 0 || invalid > 0) {
191
+ output += ` (${valid} valid`;
192
+ if (deprecated > 0) output += `, ${deprecated} deprecated`;
193
+ if (invalid > 0) output += `, ${invalid} invalid`;
194
+ output += ')';
195
+ }
196
+
197
+ return output;
198
+ }
199
+ ```
200
+
201
+ ## Empty State
202
+
203
+ When no squads are found:
204
+
205
+ ```
206
+ No squads found in ./squads/
207
+
208
+ Create one with: @squad-creator *create-squad my-squad
209
+
210
+ Or download a public squad: @squad-creator *download-squad squad-name
211
+ ```
212
+
213
+ ## Error Handling
214
+
215
+ | Error | Cause | Resolution |
216
+ |-------|-------|------------|
217
+ | `ENOENT` | Squads directory doesn't exist | Will return empty list |
218
+ | `PERMISSION_DENIED` | Can't read directory | Check permissions |
219
+
220
+ ## Related
221
+
222
+ - **Agent:** @squad-creator (Craft)
223
+ - **Script:** squad-generator.js (listLocal method)
224
+ - **Create:** *create-squad
225
+ - **Validate:** *validate-squad
@@ -0,0 +1,86 @@
1
+ ---
2
+ task: Publish 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 publicar
10
+ - target: Destino (aios-squads | synkra-api)
11
+ Saida: |
12
+ - pr_url: URL do PR criado (para aios-squads)
13
+ - api_url: URL na API (para synkra-api)
14
+ - status: Sucesso ou erro
15
+ Checklist:
16
+ - "[ ] Implementar em Sprint 8 (SQS-6)"
17
+ ---
18
+
19
+ # *publish-squad
20
+
21
+ > **PLACEHOLDER** - Implementation scheduled for Sprint 8 (Story SQS-6)
22
+
23
+ ## Planned Functionality
24
+
25
+ Publishes a local squad to the aios-squads repository (via PR) or Synkra API marketplace.
26
+
27
+ ## Planned Usage
28
+
29
+ ```
30
+ @squad-creator
31
+
32
+ *publish-squad meu-squad
33
+ # → Creates PR to github.com/SynkraAI/aios-squads
34
+
35
+ *publish-squad meu-squad --target synkra-api
36
+ # → Publishes to api.synkra.dev/squads (requires auth)
37
+ ```
38
+
39
+ ## Planned Features
40
+
41
+ 1. **Pre-publish Validation**
42
+ - Run *validate-squad before publishing
43
+ - Check required fields in squad.yaml
44
+ - Verify license and author info
45
+
46
+ 2. **GitHub Repository (Default)**
47
+ - Fork aios-squads if needed
48
+ - Copy squad to squads/{name}/
49
+ - Create PR with description
50
+ - Add appropriate labels
51
+
52
+ 3. **Synkra API**
53
+ - Upload to api.synkra.dev/squads
54
+ - Support pricing configuration
55
+ - Manage versions and updates
56
+
57
+ ## Workflow
58
+
59
+ ```
60
+ 1. Validate squad
61
+ ├── Run *validate-squad
62
+ └── Ensure no errors
63
+
64
+ 2. Prepare for publishing
65
+ ├── Check license
66
+ ├── Check author
67
+ └── Generate changelog
68
+
69
+ 3. Publish
70
+ ├── If aios-squads → Create PR
71
+ └── If synkra-api → Upload via API
72
+
73
+ 4. Display result
74
+ └── Show URL and next steps
75
+ ```
76
+
77
+ ## Related Story
78
+
79
+ - **SQS-6:** Registry Integration (Sprint 8)
80
+
81
+ ## Current Status
82
+
83
+ This task is a placeholder. The full implementation will be done in Sprint 8.
84
+
85
+ For now, manually create PRs at:
86
+ - https://github.com/SynkraAI/aios-squads
@@ -0,0 +1,83 @@
1
+ ---
2
+ task: Sync Squad to Synkra
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 sincronizar
10
+ - pricing: Modelo de preco (free | premium | subscription)
11
+ Saida: |
12
+ - api_url: URL na Synkra API
13
+ - dashboard_url: URL do dashboard de gestao
14
+ - status: Sucesso ou erro
15
+ Checklist:
16
+ - "[ ] Implementar em Sprint 8 (SQS-5)"
17
+ ---
18
+
19
+ # *sync-squad-synkra
20
+
21
+ > **PLACEHOLDER** - Implementation scheduled for Sprint 8 (Story SQS-5)
22
+
23
+ ## Planned Functionality
24
+
25
+ Syncs a local squad to the Synkra API marketplace for distribution and monetization.
26
+
27
+ ## Planned Usage
28
+
29
+ ```bash
30
+ @squad-creator
31
+
32
+ *sync-squad-synkra meu-squad
33
+ # → Syncs to api.synkra.dev/squads (free tier)
34
+
35
+ *sync-squad-synkra meu-squad --pricing premium --price 9.99
36
+ # → Syncs as premium squad with pricing
37
+
38
+ *sync-squad-synkra meu-squad --update
39
+ # → Updates existing squad in marketplace
40
+ ```
41
+
42
+ ## Planned Features
43
+
44
+ 1. **Authentication**
45
+ - Require Synkra API key
46
+ - Validate account permissions
47
+ - Support team accounts
48
+
49
+ 2. **Pricing Models**
50
+ - Free: Available to all users
51
+ - Premium: One-time purchase
52
+ - Subscription: Monthly/yearly
53
+
54
+ 3. **Version Management**
55
+ - Semantic versioning
56
+ - Changelog generation
57
+ - Update existing squads
58
+
59
+ 4. **Analytics Dashboard**
60
+ - Download statistics
61
+ - Revenue tracking (for paid)
62
+ - User feedback
63
+
64
+ ## Synkra API Endpoints
65
+
66
+ ```http
67
+ POST /api/v1/squads # Create new squad
68
+ PUT /api/v1/squads/{id} # Update existing
69
+ GET /api/v1/squads/{id} # Get squad info
70
+ DELETE /api/v1/squads/{id} # Remove squad
71
+ GET /api/v1/squads/me # List my squads
72
+ ```
73
+
74
+ ## Related Story
75
+
76
+ - **SQS-5:** SquadSyncService (Sprint 8)
77
+
78
+ ## Current Status
79
+
80
+ This task is a placeholder. The full implementation will be done in Sprint 8.
81
+
82
+ The Synkra API is under development at:
83
+ - https://api.synkra.dev (planned)
@@ -0,0 +1,299 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://synkra.dev/schemas/squad-design.json",
4
+ "title": "Squad Design Blueprint",
5
+ "description": "Schema for squad design blueprints generated by *design-squad",
6
+ "type": "object",
7
+ "required": ["squad", "recommendations", "metadata"],
8
+ "properties": {
9
+ "squad": {
10
+ "type": "object",
11
+ "description": "Basic squad information",
12
+ "required": ["name", "domain"],
13
+ "properties": {
14
+ "name": {
15
+ "type": "string",
16
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9](-squad)?$",
17
+ "minLength": 2,
18
+ "maxLength": 64,
19
+ "description": "Squad name in kebab-case"
20
+ },
21
+ "description": {
22
+ "type": "string",
23
+ "maxLength": 500,
24
+ "description": "Human-readable description of the squad"
25
+ },
26
+ "domain": {
27
+ "type": "string",
28
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
29
+ "minLength": 2,
30
+ "maxLength": 50,
31
+ "description": "Domain identifier in kebab-case"
32
+ }
33
+ }
34
+ },
35
+ "analysis": {
36
+ "type": "object",
37
+ "description": "Domain analysis results",
38
+ "properties": {
39
+ "entities": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "maxLength": 100
45
+ },
46
+ "maxItems": 50,
47
+ "description": "Extracted domain entities"
48
+ },
49
+ "workflows": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string",
53
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
54
+ "minLength": 2,
55
+ "maxLength": 100
56
+ },
57
+ "maxItems": 50,
58
+ "description": "Identified workflows in kebab-case"
59
+ },
60
+ "integrations": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 100
66
+ },
67
+ "maxItems": 30,
68
+ "description": "External integrations detected"
69
+ },
70
+ "stakeholders": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "maxLength": 100
76
+ },
77
+ "maxItems": 20,
78
+ "description": "Stakeholder roles identified"
79
+ }
80
+ }
81
+ },
82
+ "recommendations": {
83
+ "type": "object",
84
+ "description": "Generated recommendations",
85
+ "required": ["agents", "tasks"],
86
+ "properties": {
87
+ "agents": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "#/definitions/agentRecommendation"
91
+ },
92
+ "minItems": 0,
93
+ "maxItems": 10,
94
+ "description": "Recommended agents"
95
+ },
96
+ "tasks": {
97
+ "type": "array",
98
+ "items": {
99
+ "$ref": "#/definitions/taskRecommendation"
100
+ },
101
+ "minItems": 0,
102
+ "maxItems": 50,
103
+ "description": "Recommended tasks"
104
+ },
105
+ "template": {
106
+ "type": "string",
107
+ "enum": ["basic", "etl", "agent-only", "custom"],
108
+ "default": "basic",
109
+ "description": "Recommended squad template"
110
+ },
111
+ "config_mode": {
112
+ "type": "string",
113
+ "enum": ["extend", "override", "none"],
114
+ "default": "extend",
115
+ "description": "Configuration inheritance mode"
116
+ }
117
+ }
118
+ },
119
+ "metadata": {
120
+ "type": "object",
121
+ "description": "Blueprint metadata",
122
+ "required": ["created_at"],
123
+ "properties": {
124
+ "created_at": {
125
+ "type": "string",
126
+ "format": "date-time",
127
+ "description": "ISO 8601 timestamp of blueprint creation"
128
+ },
129
+ "source_docs": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string"
133
+ },
134
+ "description": "Paths to source documentation files"
135
+ },
136
+ "user_adjustments": {
137
+ "type": "integer",
138
+ "minimum": 0,
139
+ "default": 0,
140
+ "description": "Number of user modifications made"
141
+ },
142
+ "overall_confidence": {
143
+ "type": "number",
144
+ "minimum": 0,
145
+ "maximum": 1,
146
+ "description": "Overall confidence score (0-1)"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "definitions": {
152
+ "agentRecommendation": {
153
+ "type": "object",
154
+ "required": ["id", "role", "confidence"],
155
+ "properties": {
156
+ "id": {
157
+ "type": "string",
158
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
159
+ "minLength": 2,
160
+ "maxLength": 64,
161
+ "description": "Agent identifier in kebab-case"
162
+ },
163
+ "role": {
164
+ "type": "string",
165
+ "minLength": 5,
166
+ "maxLength": 200,
167
+ "description": "Agent role description"
168
+ },
169
+ "commands": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string",
173
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
174
+ "minLength": 2,
175
+ "maxLength": 64
176
+ },
177
+ "maxItems": 20,
178
+ "description": "Agent commands in kebab-case"
179
+ },
180
+ "confidence": {
181
+ "type": "number",
182
+ "minimum": 0,
183
+ "maximum": 1,
184
+ "description": "Recommendation confidence score (0-1)"
185
+ },
186
+ "user_added": {
187
+ "type": "boolean",
188
+ "default": false,
189
+ "description": "Whether this agent was added by user"
190
+ },
191
+ "user_modified": {
192
+ "type": "boolean",
193
+ "default": false,
194
+ "description": "Whether this agent was modified by user"
195
+ }
196
+ }
197
+ },
198
+ "taskRecommendation": {
199
+ "type": "object",
200
+ "required": ["name", "agent", "confidence"],
201
+ "properties": {
202
+ "name": {
203
+ "type": "string",
204
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
205
+ "minLength": 2,
206
+ "maxLength": 64,
207
+ "description": "Task name in kebab-case (without .md extension)"
208
+ },
209
+ "agent": {
210
+ "type": "string",
211
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
212
+ "minLength": 2,
213
+ "maxLength": 64,
214
+ "description": "Owning agent identifier"
215
+ },
216
+ "entrada": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "maxLength": 100
222
+ },
223
+ "maxItems": 20,
224
+ "description": "Task input parameters"
225
+ },
226
+ "saida": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "maxLength": 100
232
+ },
233
+ "maxItems": 20,
234
+ "description": "Task output parameters"
235
+ },
236
+ "confidence": {
237
+ "type": "number",
238
+ "minimum": 0,
239
+ "maximum": 1,
240
+ "description": "Recommendation confidence score (0-1)"
241
+ },
242
+ "checklist": {
243
+ "type": "array",
244
+ "items": {
245
+ "type": "string",
246
+ "minLength": 1,
247
+ "maxLength": 200
248
+ },
249
+ "maxItems": 20,
250
+ "description": "Task checklist items"
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "examples": [
256
+ {
257
+ "squad": {
258
+ "name": "order-management-squad",
259
+ "description": "Squad for order management system",
260
+ "domain": "order-management"
261
+ },
262
+ "analysis": {
263
+ "entities": ["Order", "Customer", "Product", "Payment"],
264
+ "workflows": ["create-order", "process-payment", "ship-order"],
265
+ "integrations": ["Stripe API", "Inventory Service"],
266
+ "stakeholders": ["Customer", "Admin", "Support"]
267
+ },
268
+ "recommendations": {
269
+ "agents": [
270
+ {
271
+ "id": "order-manager",
272
+ "role": "Manages order lifecycle from creation to fulfillment",
273
+ "commands": ["create-order", "update-order", "cancel-order"],
274
+ "confidence": 0.92,
275
+ "user_added": false,
276
+ "user_modified": false
277
+ }
278
+ ],
279
+ "tasks": [
280
+ {
281
+ "name": "create-order",
282
+ "agent": "order-manager",
283
+ "entrada": ["customer_id", "items", "payment_method"],
284
+ "saida": ["order_id", "status"],
285
+ "confidence": 0.88
286
+ }
287
+ ],
288
+ "template": "basic",
289
+ "config_mode": "extend"
290
+ },
291
+ "metadata": {
292
+ "created_at": "2025-12-18T00:00:00Z",
293
+ "source_docs": ["./docs/prd/orders.md"],
294
+ "user_adjustments": 2,
295
+ "overall_confidence": 0.87
296
+ }
297
+ }
298
+ ]
299
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aios-core",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework",
5
5
  "main": "index.js",
6
6
  "module": "index.esm.js",