aios-core 3.4.0 → 3.6.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/architect.md +4 -0
- package/.aios-core/development/agents/squad-creator.md +11 -0
- package/.aios-core/development/scripts/squad/index.js +48 -0
- package/.aios-core/development/scripts/squad/squad-downloader.js +510 -0
- package/.aios-core/development/scripts/squad/squad-migrator.js +634 -0
- package/.aios-core/development/scripts/squad/squad-publisher.js +629 -0
- package/.aios-core/development/tasks/add-mcp.md +124 -13
- package/.aios-core/development/tasks/analyze-project-structure.md +621 -0
- package/.aios-core/development/tasks/setup-mcp-docker.md +46 -6
- package/.aios-core/development/tasks/squad-creator-download.md +135 -33
- package/.aios-core/development/tasks/squad-creator-migrate.md +243 -0
- package/.aios-core/development/tasks/squad-creator-publish.md +190 -47
- package/.aios-core/development/tasks/squad-creator-sync-synkra.md +280 -48
- package/.aios-core/install-manifest.yaml +39 -19
- package/.claude/rules/mcp-usage.md +62 -2
- package/package.json +1 -1
|
@@ -3,63 +3,165 @@ task: Download Squad
|
|
|
3
3
|
responsavel: "@squad-creator"
|
|
4
4
|
responsavel_type: agent
|
|
5
5
|
atomic_layer: task
|
|
6
|
-
status:
|
|
6
|
+
status: active
|
|
7
7
|
sprint: 8
|
|
8
|
+
story: SQS-6
|
|
8
9
|
Entrada: |
|
|
9
|
-
-
|
|
10
|
-
-
|
|
10
|
+
- squad_name: Nome do squad para baixar (obrigatório)
|
|
11
|
+
- version: Versão específica (opcional, default: latest)
|
|
12
|
+
- list: Flag para listar squads disponíveis (--list)
|
|
13
|
+
- overwrite: Flag para sobrescrever squad existente (--overwrite)
|
|
11
14
|
Saida: |
|
|
12
15
|
- squad_path: Caminho do squad baixado
|
|
13
|
-
-
|
|
16
|
+
- manifest: Manifest do squad
|
|
17
|
+
- validation_result: Resultado da validação
|
|
14
18
|
Checklist:
|
|
15
|
-
- "[ ]
|
|
19
|
+
- "[ ] Verificar se já existe localmente"
|
|
20
|
+
- "[ ] Buscar no registry.json"
|
|
21
|
+
- "[ ] Baixar arquivos do GitHub"
|
|
22
|
+
- "[ ] Extrair para ./squads/{name}/"
|
|
23
|
+
- "[ ] Validar squad baixado"
|
|
24
|
+
- "[ ] Exibir próximos passos"
|
|
16
25
|
---
|
|
17
26
|
|
|
18
27
|
# *download-squad
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
Downloads public squads from the aios-squads GitHub repository to use in your project.
|
|
21
30
|
|
|
22
|
-
##
|
|
31
|
+
## Usage
|
|
23
32
|
|
|
24
|
-
|
|
33
|
+
```bash
|
|
34
|
+
@squad-creator
|
|
35
|
+
|
|
36
|
+
# List available squads
|
|
37
|
+
*download-squad --list
|
|
38
|
+
|
|
39
|
+
# Download a squad
|
|
40
|
+
*download-squad etl-squad
|
|
25
41
|
|
|
26
|
-
|
|
42
|
+
# Download specific version
|
|
43
|
+
*download-squad etl-squad@2.0.0
|
|
27
44
|
|
|
45
|
+
# Overwrite existing
|
|
46
|
+
*download-squad etl-squad --overwrite
|
|
28
47
|
```
|
|
29
|
-
@squad-creator
|
|
30
48
|
|
|
49
|
+
## Examples
|
|
50
|
+
|
|
51
|
+
### List Available Squads
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
*download-squad --list
|
|
55
|
+
|
|
56
|
+
Available Squads (from aios-squads):
|
|
57
|
+
|
|
58
|
+
Official:
|
|
59
|
+
├── etl-squad@1.0.0 - ETL pipeline automation
|
|
60
|
+
├── api-squad@1.2.0 - REST API development
|
|
61
|
+
└── devops-squad@1.0.0 - CI/CD automation
|
|
62
|
+
|
|
63
|
+
Community:
|
|
64
|
+
├── data-viz-squad@0.5.0 - Data visualization
|
|
65
|
+
└── ml-squad@0.3.0 - Machine learning pipelines
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Download Squad
|
|
69
|
+
|
|
70
|
+
```
|
|
31
71
|
*download-squad etl-squad
|
|
32
|
-
# → Downloads from github.com/SynkraAI/aios-squads
|
|
33
72
|
|
|
34
|
-
|
|
35
|
-
|
|
73
|
+
Downloading: etl-squad@1.0.0
|
|
74
|
+
Source: github.com/SynkraAI/aios-squads/packages/etl-squad
|
|
75
|
+
Target: ./squads/etl-squad/
|
|
76
|
+
|
|
77
|
+
✓ Downloaded 12 files
|
|
78
|
+
✓ Validated successfully
|
|
79
|
+
|
|
80
|
+
Squad installed! Next steps:
|
|
81
|
+
1. Review: cat squads/etl-squad/squad.yaml
|
|
82
|
+
2. Activate: @squad-creator *activate etl-squad
|
|
36
83
|
```
|
|
37
84
|
|
|
38
|
-
##
|
|
85
|
+
## Options
|
|
39
86
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
87
|
+
| Option | Description |
|
|
88
|
+
|--------|-------------|
|
|
89
|
+
| `--list` | List all available squads from registry |
|
|
90
|
+
| `--version` | Download specific version (e.g., @2.0.0) |
|
|
91
|
+
| `--overwrite` | Overwrite if squad already exists locally |
|
|
92
|
+
| `--verbose` | Show detailed download progress |
|
|
44
93
|
|
|
45
|
-
|
|
46
|
-
- Download from api.synkra.dev/squads
|
|
47
|
-
- Support premium/paid squads
|
|
48
|
-
- Require authentication
|
|
94
|
+
## How It Works
|
|
49
95
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
96
|
+
```
|
|
97
|
+
1. Fetch registry.json from aios-squads
|
|
98
|
+
├── Contains official and community squads
|
|
99
|
+
└── Includes version and metadata
|
|
54
100
|
|
|
55
|
-
|
|
101
|
+
2. Find requested squad
|
|
102
|
+
├── Search official squads first
|
|
103
|
+
└── Then community squads
|
|
56
104
|
|
|
57
|
-
|
|
58
|
-
|
|
105
|
+
3. Download via GitHub API
|
|
106
|
+
├── Get directory listing
|
|
107
|
+
└── Download each file recursively
|
|
59
108
|
|
|
60
|
-
|
|
109
|
+
4. Validate downloaded squad
|
|
110
|
+
├── Run SquadValidator
|
|
111
|
+
└── Report warnings/errors
|
|
112
|
+
|
|
113
|
+
5. Load manifest
|
|
114
|
+
└── Confirm installation
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Registry Structure
|
|
118
|
+
|
|
119
|
+
The registry.json in aios-squads contains:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"version": "1.0.0",
|
|
124
|
+
"squads": {
|
|
125
|
+
"official": [
|
|
126
|
+
{
|
|
127
|
+
"name": "etl-squad",
|
|
128
|
+
"version": "1.0.0",
|
|
129
|
+
"description": "ETL pipeline automation",
|
|
130
|
+
"author": "SynkraAI"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"community": [
|
|
134
|
+
{
|
|
135
|
+
"name": "data-viz-squad",
|
|
136
|
+
"version": "0.5.0",
|
|
137
|
+
"description": "Data visualization",
|
|
138
|
+
"author": "community-member"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
61
144
|
|
|
62
|
-
|
|
145
|
+
## Error Handling
|
|
146
|
+
|
|
147
|
+
| Error | Cause | Solution |
|
|
148
|
+
|-------|-------|----------|
|
|
149
|
+
| `SQUAD_NOT_FOUND` | Squad not in registry | Check available squads with --list |
|
|
150
|
+
| `SQUAD_EXISTS` | Already downloaded | Use --overwrite flag |
|
|
151
|
+
| `REGISTRY_FETCH_ERROR` | Network issue | Check connection |
|
|
152
|
+
| `RATE_LIMIT` | GitHub API limit | Set GITHUB_TOKEN env var |
|
|
153
|
+
|
|
154
|
+
## Implementation
|
|
155
|
+
|
|
156
|
+
Uses `SquadDownloader` class from:
|
|
157
|
+
- `.aios-core/development/scripts/squad/squad-downloader.js`
|
|
158
|
+
|
|
159
|
+
## Related Tasks
|
|
160
|
+
|
|
161
|
+
- `*validate-squad` - Validate downloaded squad
|
|
162
|
+
- `*publish-squad` - Publish your squad to registry
|
|
163
|
+
- `*create-squad` - Create new local squad
|
|
164
|
+
|
|
165
|
+
## Related Story
|
|
63
166
|
|
|
64
|
-
|
|
65
|
-
- https://github.com/SynkraAI/aios-squads
|
|
167
|
+
- **SQS-6:** Download & Publish Tasks (Sprint 8)
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
task: Migrate Squad
|
|
3
|
+
responsável: @squad-creator
|
|
4
|
+
responsável_type: agent
|
|
5
|
+
atomic_layer: task
|
|
6
|
+
Entrada: |
|
|
7
|
+
- squad_path: Path to the squad directory to migrate (required)
|
|
8
|
+
- dry_run: If true, preview changes without modifying files (--dry-run)
|
|
9
|
+
- verbose: If true, show detailed output (--verbose)
|
|
10
|
+
Saída: |
|
|
11
|
+
- migration_result: Object with { success, actions, validation, backupPath }
|
|
12
|
+
- report: Formatted migration report
|
|
13
|
+
- exit_code: 0 if successful, 1 if failed
|
|
14
|
+
Checklist:
|
|
15
|
+
- "[ ] Analyze squad for migration needs"
|
|
16
|
+
- "[ ] Create backup in .backup/"
|
|
17
|
+
- "[ ] Execute migration actions"
|
|
18
|
+
- "[ ] Validate migrated squad"
|
|
19
|
+
- "[ ] Generate migration report"
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# *migrate-squad
|
|
23
|
+
|
|
24
|
+
Migrates legacy squad formats to AIOS 2.1 standard.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
@squad-creator
|
|
30
|
+
|
|
31
|
+
# Preview changes without modifying files
|
|
32
|
+
*migrate-squad ./squads/my-squad --dry-run
|
|
33
|
+
|
|
34
|
+
# Migrate with automatic backup
|
|
35
|
+
*migrate-squad ./squads/my-squad
|
|
36
|
+
|
|
37
|
+
# Migrate with detailed output
|
|
38
|
+
*migrate-squad ./squads/my-squad --verbose
|
|
39
|
+
|
|
40
|
+
# Migrate expansion pack
|
|
41
|
+
*migrate-squad ./expansion-packs/my-pack --verbose
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Parameters
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Default | Description |
|
|
47
|
+
|-----------|------|---------|-------------|
|
|
48
|
+
| `squad_path` | string | - | Full path to squad directory (required) |
|
|
49
|
+
| `--dry-run` | flag | false | Preview changes without modifying files |
|
|
50
|
+
| `--verbose` | flag | false | Show detailed migration output |
|
|
51
|
+
|
|
52
|
+
## Migration Detection
|
|
53
|
+
|
|
54
|
+
The migrator detects the following legacy patterns:
|
|
55
|
+
|
|
56
|
+
| Pattern | Detection | Migration Action |
|
|
57
|
+
|---------|-----------|------------------|
|
|
58
|
+
| `config.yaml` | Legacy manifest name | Rename to `squad.yaml` |
|
|
59
|
+
| Flat structure | No `tasks/`, `agents/` dirs | Create directory structure |
|
|
60
|
+
| Missing `aios.type` | Field not present | Add `aios.type: squad` |
|
|
61
|
+
| Missing `aios.minVersion` | Field not present | Add `aios.minVersion: 2.1.0` |
|
|
62
|
+
| Missing `name` | Field not present | Infer from directory name |
|
|
63
|
+
| Missing `version` | Field not present | Add `version: 1.0.0` |
|
|
64
|
+
|
|
65
|
+
## Flow
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
1. Analyze Squad
|
|
69
|
+
├── Check for config.yaml vs squad.yaml
|
|
70
|
+
├── Check directory structure
|
|
71
|
+
├── Validate manifest schema
|
|
72
|
+
└── Generate action list
|
|
73
|
+
|
|
74
|
+
2. Confirm Migration (if not --dry-run)
|
|
75
|
+
├── Display issues found
|
|
76
|
+
├── Display planned actions
|
|
77
|
+
└── Request user confirmation
|
|
78
|
+
|
|
79
|
+
3. Create Backup
|
|
80
|
+
└── Copy all files to .backup/pre-migration-{timestamp}/
|
|
81
|
+
|
|
82
|
+
4. Execute Actions
|
|
83
|
+
├── RENAME_MANIFEST: config.yaml → squad.yaml
|
|
84
|
+
├── CREATE_DIRECTORIES: tasks/, agents/, config/
|
|
85
|
+
├── ADD_FIELD: Add missing required fields
|
|
86
|
+
└── MOVE_FILE: Reorganize files if needed
|
|
87
|
+
|
|
88
|
+
5. Validate Result
|
|
89
|
+
├── Run squad-validator on migrated squad
|
|
90
|
+
└── Report any remaining issues
|
|
91
|
+
|
|
92
|
+
6. Generate Report
|
|
93
|
+
├── Summary of changes made
|
|
94
|
+
├── Backup location
|
|
95
|
+
└── Validation result
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Output Example
|
|
99
|
+
|
|
100
|
+
### Analysis Phase
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
═══════════════════════════════════════════════════════════
|
|
104
|
+
SQUAD MIGRATION REPORT
|
|
105
|
+
═══════════════════════════════════════════════════════════
|
|
106
|
+
|
|
107
|
+
Squad Path: ./squads/my-legacy-squad/
|
|
108
|
+
Needs Migration: Yes
|
|
109
|
+
|
|
110
|
+
───────────────────────────────────────────────────────────
|
|
111
|
+
ISSUES FOUND:
|
|
112
|
+
───────────────────────────────────────────────────────────
|
|
113
|
+
⚠️ [WARNING] Uses deprecated config.yaml manifest
|
|
114
|
+
⚠️ [WARNING] Missing task-first directories: tasks, agents
|
|
115
|
+
❌ [ERROR] Missing required field: aios.type
|
|
116
|
+
❌ [ERROR] Missing required field: aios.minVersion
|
|
117
|
+
|
|
118
|
+
───────────────────────────────────────────────────────────
|
|
119
|
+
PLANNED ACTIONS:
|
|
120
|
+
───────────────────────────────────────────────────────────
|
|
121
|
+
1. Rename config.yaml → squad.yaml
|
|
122
|
+
2. Create directories: tasks, agents
|
|
123
|
+
3. Add field: aios.type = "squad"
|
|
124
|
+
4. Add field: aios.minVersion = "2.1.0"
|
|
125
|
+
|
|
126
|
+
═══════════════════════════════════════════════════════════
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Migration Result
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
───────────────────────────────────────────────────────────
|
|
133
|
+
MIGRATION RESULT:
|
|
134
|
+
───────────────────────────────────────────────────────────
|
|
135
|
+
Status: ✅ SUCCESS
|
|
136
|
+
Message: Migration completed successfully
|
|
137
|
+
Backup: ./squads/my-legacy-squad/.backup/pre-migration-1703318400000/
|
|
138
|
+
|
|
139
|
+
Executed Actions:
|
|
140
|
+
✅ Rename config.yaml → squad.yaml [success]
|
|
141
|
+
✅ Create directories: tasks, agents [success]
|
|
142
|
+
✅ Add field: aios.type = "squad" [success]
|
|
143
|
+
✅ Add field: aios.minVersion = "2.1.0" [success]
|
|
144
|
+
|
|
145
|
+
Post-Migration Validation:
|
|
146
|
+
Valid: Yes
|
|
147
|
+
|
|
148
|
+
═══════════════════════════════════════════════════════════
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Dry-Run Mode
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
───────────────────────────────────────────────────────────
|
|
155
|
+
MIGRATION RESULT:
|
|
156
|
+
───────────────────────────────────────────────────────────
|
|
157
|
+
Status: ✅ SUCCESS
|
|
158
|
+
Message: Dry-run completed successfully
|
|
159
|
+
|
|
160
|
+
Executed Actions:
|
|
161
|
+
🔍 Rename config.yaml → squad.yaml [dry-run]
|
|
162
|
+
🔍 Create directories: tasks, agents [dry-run]
|
|
163
|
+
🔍 Add field: aios.type = "squad" [dry-run]
|
|
164
|
+
🔍 Add field: aios.minVersion = "2.1.0" [dry-run]
|
|
165
|
+
|
|
166
|
+
═══════════════════════════════════════════════════════════
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Rollback Procedure
|
|
170
|
+
|
|
171
|
+
If migration fails or produces unexpected results, restore from backup:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# List available backups
|
|
175
|
+
ls ./squads/my-squad/.backup/
|
|
176
|
+
|
|
177
|
+
# View backup contents
|
|
178
|
+
ls ./squads/my-squad/.backup/pre-migration-1703318400000/
|
|
179
|
+
|
|
180
|
+
# Restore from backup (removes current, restores backup)
|
|
181
|
+
rm -rf ./squads/my-squad/squad.yaml ./squads/my-squad/tasks ./squads/my-squad/agents
|
|
182
|
+
cp -r ./squads/my-squad/.backup/pre-migration-1703318400000/. ./squads/my-squad/
|
|
183
|
+
|
|
184
|
+
# Verify restoration
|
|
185
|
+
ls ./squads/my-squad/
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Error Codes
|
|
189
|
+
|
|
190
|
+
| Code | Severity | Description |
|
|
191
|
+
|------|----------|-------------|
|
|
192
|
+
| `SQUAD_NOT_FOUND` | Error | Squad directory doesn't exist |
|
|
193
|
+
| `NO_MANIFEST` | Error | No config.yaml or squad.yaml found |
|
|
194
|
+
| `BACKUP_FAILED` | Error | Failed to create backup |
|
|
195
|
+
| `MIGRATION_FAILED` | Error | Action execution failed |
|
|
196
|
+
| `VALIDATION_FAILED` | Warning | Post-migration validation found issues |
|
|
197
|
+
| `INVALID_PATH` | Error | Invalid squad path provided |
|
|
198
|
+
|
|
199
|
+
## Implementation
|
|
200
|
+
|
|
201
|
+
```javascript
|
|
202
|
+
const { SquadMigrator } = require('./.aios-core/development/scripts/squad');
|
|
203
|
+
const { SquadValidator } = require('./.aios-core/development/scripts/squad');
|
|
204
|
+
|
|
205
|
+
async function migrateSquad(options) {
|
|
206
|
+
const { squadPath, dryRun, verbose } = options;
|
|
207
|
+
|
|
208
|
+
// Create migrator with optional validator
|
|
209
|
+
const validator = new SquadValidator();
|
|
210
|
+
const migrator = new SquadMigrator({
|
|
211
|
+
dryRun,
|
|
212
|
+
verbose,
|
|
213
|
+
validator
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Analyze first
|
|
217
|
+
const analysis = await migrator.analyze(squadPath);
|
|
218
|
+
|
|
219
|
+
// Display analysis report
|
|
220
|
+
console.log(migrator.generateReport(analysis));
|
|
221
|
+
|
|
222
|
+
if (!analysis.needsMigration) {
|
|
223
|
+
console.log('Squad is already up to date. No migration needed.');
|
|
224
|
+
return 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Execute migration
|
|
228
|
+
const result = await migrator.migrate(squadPath);
|
|
229
|
+
|
|
230
|
+
// Display final report
|
|
231
|
+
console.log(migrator.generateReport(analysis, result));
|
|
232
|
+
|
|
233
|
+
return result.success ? 0 : 1;
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Related
|
|
238
|
+
|
|
239
|
+
- **Story:** SQS-7 (Squad Migration Tool)
|
|
240
|
+
- **Dependencies:** squad-migrator.js, squad-validator.js
|
|
241
|
+
- **Schema:** .aios-core/schemas/squad-schema.json
|
|
242
|
+
- **Agent:** @squad-creator (Craft)
|
|
243
|
+
- **Similar Tasks:** *validate-squad, *create-squad
|