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
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
# Analyze Project Structure
|
|
2
|
+
|
|
3
|
+
**Purpose:** Analyze an existing AIOS project to understand its structure, services, patterns, and provide recommendations for implementing new features. This is Phase 1 of the Incremental Feature Workflow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Execution Modes
|
|
8
|
+
|
|
9
|
+
**Choose your execution mode:**
|
|
10
|
+
|
|
11
|
+
### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
|
|
12
|
+
- Quick scan with default recommendations
|
|
13
|
+
- Minimal user interaction
|
|
14
|
+
- **Best for:** Quick assessments, familiar projects
|
|
15
|
+
|
|
16
|
+
### 2. Interactive Mode - Balanced, Educational (3-5 prompts) **[DEFAULT]**
|
|
17
|
+
- Detailed analysis with explanation
|
|
18
|
+
- User input on feature requirements
|
|
19
|
+
- **Best for:** First-time analysis, new features
|
|
20
|
+
|
|
21
|
+
### 3. Comprehensive Mode - Full Analysis
|
|
22
|
+
- Complete project scan
|
|
23
|
+
- All patterns documented
|
|
24
|
+
- **Best for:** Large projects, major features
|
|
25
|
+
|
|
26
|
+
**Parameter:** `mode` (optional, default: `interactive`)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Task Definition (AIOS Task Format V1.0)
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
task: analyzeProjectStructure()
|
|
34
|
+
responsible: architect (Aria)
|
|
35
|
+
responsible_type: Agent
|
|
36
|
+
atomic_layer: Analysis
|
|
37
|
+
elicit: true
|
|
38
|
+
|
|
39
|
+
inputs:
|
|
40
|
+
- field: feature_description
|
|
41
|
+
type: string
|
|
42
|
+
source: User Input
|
|
43
|
+
required: true
|
|
44
|
+
validation: Non-empty string describing the feature to add
|
|
45
|
+
|
|
46
|
+
- field: project_path
|
|
47
|
+
type: string
|
|
48
|
+
source: User Input or cwd
|
|
49
|
+
required: false
|
|
50
|
+
validation: Valid directory path with .aios-core/
|
|
51
|
+
|
|
52
|
+
- field: executionMode
|
|
53
|
+
type: string
|
|
54
|
+
source: User Input
|
|
55
|
+
required: false
|
|
56
|
+
validation: yolo|interactive|comprehensive
|
|
57
|
+
|
|
58
|
+
outputs:
|
|
59
|
+
- field: project_analysis
|
|
60
|
+
type: markdown
|
|
61
|
+
destination: docs/architecture/project-analysis.md
|
|
62
|
+
persisted: true
|
|
63
|
+
|
|
64
|
+
- field: recommended_approach
|
|
65
|
+
type: markdown
|
|
66
|
+
destination: docs/architecture/recommended-approach.md
|
|
67
|
+
persisted: true
|
|
68
|
+
|
|
69
|
+
- field: service_inventory
|
|
70
|
+
type: array
|
|
71
|
+
destination: Memory
|
|
72
|
+
persisted: false
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Pre-Conditions
|
|
78
|
+
|
|
79
|
+
**Purpose:** Validate prerequisites BEFORE task execution (blocking)
|
|
80
|
+
|
|
81
|
+
**Checklist:**
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
pre-conditions:
|
|
85
|
+
- [ ] Project has .aios-core/ directory
|
|
86
|
+
type: pre-condition
|
|
87
|
+
blocker: true
|
|
88
|
+
validation: |
|
|
89
|
+
Check .aios-core/ directory exists in project root
|
|
90
|
+
error_message: "Pre-condition failed: Not an AIOS project (.aios-core/ not found)"
|
|
91
|
+
|
|
92
|
+
- [ ] Project path is accessible
|
|
93
|
+
type: pre-condition
|
|
94
|
+
blocker: true
|
|
95
|
+
validation: |
|
|
96
|
+
Verify project directory exists and is readable
|
|
97
|
+
error_message: "Pre-condition failed: Project path not accessible"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Post-Conditions
|
|
103
|
+
|
|
104
|
+
**Purpose:** Validate execution success AFTER task completes
|
|
105
|
+
|
|
106
|
+
**Checklist:**
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
post-conditions:
|
|
110
|
+
- [ ] Project analysis document generated
|
|
111
|
+
type: post-condition
|
|
112
|
+
blocker: true
|
|
113
|
+
validation: |
|
|
114
|
+
Verify docs/architecture/project-analysis.md exists and is populated
|
|
115
|
+
error_message: "Post-condition failed: Project analysis not generated"
|
|
116
|
+
|
|
117
|
+
- [ ] Recommended approach document generated
|
|
118
|
+
type: post-condition
|
|
119
|
+
blocker: true
|
|
120
|
+
validation: |
|
|
121
|
+
Verify docs/architecture/recommended-approach.md exists and is populated
|
|
122
|
+
error_message: "Post-condition failed: Recommended approach not generated"
|
|
123
|
+
|
|
124
|
+
- [ ] Service inventory captured
|
|
125
|
+
type: post-condition
|
|
126
|
+
blocker: false
|
|
127
|
+
validation: |
|
|
128
|
+
Verify at least basic project structure was analyzed
|
|
129
|
+
error_message: "Warning: Service inventory may be incomplete"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Acceptance Criteria
|
|
135
|
+
|
|
136
|
+
**Purpose:** Definitive pass/fail criteria for task completion
|
|
137
|
+
|
|
138
|
+
**Checklist:**
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
acceptance-criteria:
|
|
142
|
+
- [ ] Project structure scanned
|
|
143
|
+
type: acceptance-criterion
|
|
144
|
+
blocker: true
|
|
145
|
+
validation: |
|
|
146
|
+
Assert .aios-core/ configuration analyzed
|
|
147
|
+
error_message: "Acceptance criterion not met: Project structure not scanned"
|
|
148
|
+
|
|
149
|
+
- [ ] Service inventory complete
|
|
150
|
+
type: acceptance-criterion
|
|
151
|
+
blocker: true
|
|
152
|
+
validation: |
|
|
153
|
+
Assert services in infrastructure/services/ listed
|
|
154
|
+
error_message: "Acceptance criterion not met: Service inventory incomplete"
|
|
155
|
+
|
|
156
|
+
- [ ] Pattern analysis performed
|
|
157
|
+
type: acceptance-criterion
|
|
158
|
+
blocker: true
|
|
159
|
+
validation: |
|
|
160
|
+
Assert language, testing, and configuration patterns identified
|
|
161
|
+
error_message: "Acceptance criterion not met: Pattern analysis not performed"
|
|
162
|
+
|
|
163
|
+
- [ ] Recommendations generated
|
|
164
|
+
type: acceptance-criterion
|
|
165
|
+
blocker: true
|
|
166
|
+
validation: |
|
|
167
|
+
Assert recommended_approach document has service type and implementation steps
|
|
168
|
+
error_message: "Acceptance criterion not met: Recommendations not generated"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Tools
|
|
174
|
+
|
|
175
|
+
**External/shared resources used by this task:**
|
|
176
|
+
|
|
177
|
+
- **Tool:** filesystem
|
|
178
|
+
- **Purpose:** Read project files and directory structure
|
|
179
|
+
|
|
180
|
+
- **Tool:** glob
|
|
181
|
+
- **Purpose:** Find files matching patterns
|
|
182
|
+
|
|
183
|
+
- **Tool:** grep
|
|
184
|
+
- **Purpose:** Search file contents for patterns
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Error Handling
|
|
189
|
+
|
|
190
|
+
**Strategy:** graceful-degradation
|
|
191
|
+
|
|
192
|
+
**Common Errors:**
|
|
193
|
+
|
|
194
|
+
1. **Error:** No .aios-core/ Directory
|
|
195
|
+
- **Cause:** Not an AIOS project
|
|
196
|
+
- **Resolution:** Initialize AIOS first or check directory
|
|
197
|
+
- **Recovery:** Exit with clear message
|
|
198
|
+
|
|
199
|
+
2. **Error:** No Services Found
|
|
200
|
+
- **Cause:** New project or services in different location
|
|
201
|
+
- **Resolution:** Proceed with minimal analysis
|
|
202
|
+
- **Recovery:** Generate analysis noting "No existing services"
|
|
203
|
+
|
|
204
|
+
3. **Error:** Permission Denied
|
|
205
|
+
- **Cause:** Cannot read certain directories
|
|
206
|
+
- **Resolution:** Skip inaccessible areas
|
|
207
|
+
- **Recovery:** Note in analysis, continue with accessible files
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Performance
|
|
212
|
+
|
|
213
|
+
**Expected Metrics:**
|
|
214
|
+
|
|
215
|
+
```yaml
|
|
216
|
+
duration_expected: 30s-2min
|
|
217
|
+
cost_estimated: $0.001-0.003
|
|
218
|
+
token_usage: ~500-1,500 tokens
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Optimization Notes:**
|
|
222
|
+
- Directory scans are O(n) for service directories
|
|
223
|
+
- File reads are cached during analysis
|
|
224
|
+
- Pattern detection uses efficient regex
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Metadata
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
story: WIS-15
|
|
232
|
+
version: 1.0.0
|
|
233
|
+
dependencies:
|
|
234
|
+
- filesystem access
|
|
235
|
+
- glob tool
|
|
236
|
+
tags:
|
|
237
|
+
- analysis
|
|
238
|
+
- architecture
|
|
239
|
+
- incremental-feature
|
|
240
|
+
- wis
|
|
241
|
+
created_at: 2025-12-23
|
|
242
|
+
updated_at: 2025-12-23
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Task Instructions
|
|
248
|
+
|
|
249
|
+
### Step 1: Elicitation - Gather Requirements
|
|
250
|
+
|
|
251
|
+
**Required Information:**
|
|
252
|
+
|
|
253
|
+
Present these prompts to the user:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
1. "What feature/service needs to be added?"
|
|
257
|
+
[TEXT INPUT - Required]
|
|
258
|
+
Example: "TikTok API integration for creator management"
|
|
259
|
+
|
|
260
|
+
2. "Does this feature require external API integration?"
|
|
261
|
+
[CHOICE: Yes / No / Unsure]
|
|
262
|
+
|
|
263
|
+
3. "Will this feature need database changes?"
|
|
264
|
+
[CHOICE: Yes / No / Unsure]
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Store responses for recommendation generation.**
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### Step 2: Project Structure Scan
|
|
272
|
+
|
|
273
|
+
**Scan the following locations:**
|
|
274
|
+
|
|
275
|
+
```javascript
|
|
276
|
+
// Core AIOS structure
|
|
277
|
+
const scanLocations = {
|
|
278
|
+
aiosCore: '.aios-core/',
|
|
279
|
+
services: '.aios-core/infrastructure/services/',
|
|
280
|
+
squads: '.aios-core/squads/',
|
|
281
|
+
agents: '.aios-core/development/agents/',
|
|
282
|
+
tasks: '.aios-core/development/tasks/',
|
|
283
|
+
data: '.aios-core/data/'
|
|
284
|
+
};
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**For each location, identify:**
|
|
288
|
+
- Directory exists (boolean)
|
|
289
|
+
- Files/subdirectories present
|
|
290
|
+
- Key configuration files
|
|
291
|
+
|
|
292
|
+
**Service Inventory:**
|
|
293
|
+
|
|
294
|
+
For each service in `infrastructure/services/`:
|
|
295
|
+
1. Service name (directory name)
|
|
296
|
+
2. Language (JS vs TS - check for .ts files)
|
|
297
|
+
3. Has tests (check for __tests__/ or *.test.* files)
|
|
298
|
+
4. Has README (check for README.md)
|
|
299
|
+
5. Entry point (index.ts or index.js)
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
### Step 3: Pattern Analysis
|
|
304
|
+
|
|
305
|
+
**Analyze the following patterns:**
|
|
306
|
+
|
|
307
|
+
#### 3.1 Language Usage
|
|
308
|
+
```javascript
|
|
309
|
+
// Count file extensions
|
|
310
|
+
const languagePatterns = {
|
|
311
|
+
typescript: glob('**/*.ts').length,
|
|
312
|
+
javascript: glob('**/*.js').length,
|
|
313
|
+
ratio: typescript / (typescript + javascript)
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// Determine primary language
|
|
317
|
+
const primaryLanguage = ratio > 0.5 ? 'TypeScript' : 'JavaScript';
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
#### 3.2 Testing Approach
|
|
321
|
+
```javascript
|
|
322
|
+
// Check for test frameworks
|
|
323
|
+
const testingPatterns = {
|
|
324
|
+
jest: exists('jest.config.js') || exists('jest.config.ts'),
|
|
325
|
+
vitest: exists('vitest.config.ts'),
|
|
326
|
+
mocha: exists('.mocharc.js'),
|
|
327
|
+
hasTests: glob('**/*.test.{ts,js}').length > 0 ||
|
|
328
|
+
glob('**/*.spec.{ts,js}').length > 0
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
// Determine testing framework
|
|
332
|
+
const testFramework = jest ? 'Jest' : vitest ? 'Vitest' : 'None detected';
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
#### 3.3 Documentation Style
|
|
336
|
+
```javascript
|
|
337
|
+
// Check documentation patterns
|
|
338
|
+
const docPatterns = {
|
|
339
|
+
hasReadmes: glob('**/README.md').length,
|
|
340
|
+
hasJSDoc: grep('@param|@returns|@example', '**/*.{ts,js}').length > 0,
|
|
341
|
+
hasTypedoc: exists('typedoc.json')
|
|
342
|
+
};
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
#### 3.4 Configuration Patterns
|
|
346
|
+
```javascript
|
|
347
|
+
// Check configuration approaches
|
|
348
|
+
const configPatterns = {
|
|
349
|
+
envVars: exists('.env.example') || exists('.env.local'),
|
|
350
|
+
configFile: exists('aios.config.js') || exists('.aios-core/core-config.yaml'),
|
|
351
|
+
envPrefix: grep('process.env', '**/*.{ts,js}').length > 0
|
|
352
|
+
};
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
### Step 4: Generate Recommendations
|
|
358
|
+
|
|
359
|
+
Based on elicitation responses and pattern analysis:
|
|
360
|
+
|
|
361
|
+
#### 4.1 Service Type Recommendation
|
|
362
|
+
|
|
363
|
+
| User Response | Detected Pattern | Recommendation |
|
|
364
|
+
|---------------|------------------|----------------|
|
|
365
|
+
| External API = Yes | Existing API services | **API Integration** |
|
|
366
|
+
| External API = No, DB = Yes | Data services exist | **Utility Service** |
|
|
367
|
+
| Unsure | No clear pattern | **Utility Service** (default) |
|
|
368
|
+
| Agent tooling mentioned | Squads configured | **Agent Tool (MCP)** |
|
|
369
|
+
|
|
370
|
+
#### 4.2 File Structure Suggestion
|
|
371
|
+
|
|
372
|
+
Based on existing service patterns, suggest structure:
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
.aios-core/infrastructure/services/{service-name}/
|
|
376
|
+
├── README.md # Documentation
|
|
377
|
+
├── index.ts # Entry point (factory + exports)
|
|
378
|
+
├── client.ts # HTTP client (if API integration)
|
|
379
|
+
├── types.ts # TypeScript interfaces
|
|
380
|
+
├── errors.ts # Error classes
|
|
381
|
+
├── __tests__/ # Test directory
|
|
382
|
+
│ └── index.test.ts
|
|
383
|
+
├── package.json # Dependencies
|
|
384
|
+
└── tsconfig.json # TypeScript config
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
#### 4.3 Agent Assignment
|
|
388
|
+
|
|
389
|
+
| Service Type | Primary Agent | Support Agent |
|
|
390
|
+
|--------------|---------------|---------------|
|
|
391
|
+
| API Integration | @dev | @qa |
|
|
392
|
+
| Utility Service | @dev | @architect |
|
|
393
|
+
| Agent Tool | @dev | @devops |
|
|
394
|
+
| Database-heavy | @data-engineer | @dev |
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
### Step 5: Generate Output Documents
|
|
399
|
+
|
|
400
|
+
#### 5.1 Project Analysis Document
|
|
401
|
+
|
|
402
|
+
Generate `docs/architecture/project-analysis.md`:
|
|
403
|
+
|
|
404
|
+
```markdown
|
|
405
|
+
# Project Analysis: {feature_name}
|
|
406
|
+
|
|
407
|
+
**Generated:** {date}
|
|
408
|
+
**Generated By:** @architect (Aria)
|
|
409
|
+
**Story:** WIS-15
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Project Structure
|
|
414
|
+
|
|
415
|
+
| Aspect | Value |
|
|
416
|
+
|--------|-------|
|
|
417
|
+
| Framework | AIOS-FullStack |
|
|
418
|
+
| Primary Language | {primaryLanguage} |
|
|
419
|
+
| Existing Services | {serviceCount} |
|
|
420
|
+
| Testing Framework | {testFramework} |
|
|
421
|
+
| Configuration | {configApproach} |
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## Existing Services
|
|
426
|
+
|
|
427
|
+
| Service | Type | Language | Tests | README |
|
|
428
|
+
|---------|------|----------|-------|--------|
|
|
429
|
+
{for each service}
|
|
430
|
+
| {name} | {type} | {language} | {hasTests} | {hasReadme} |
|
|
431
|
+
{end for}
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Pattern Summary
|
|
436
|
+
|
|
437
|
+
### Language Distribution
|
|
438
|
+
- **TypeScript:** {tsCount} files ({tsPercent}%)
|
|
439
|
+
- **JavaScript:** {jsCount} files ({jsPercent}%)
|
|
440
|
+
|
|
441
|
+
### Testing
|
|
442
|
+
- **Framework:** {testFramework}
|
|
443
|
+
- **Test Files:** {testFileCount}
|
|
444
|
+
- **Coverage:** {coverageNote}
|
|
445
|
+
|
|
446
|
+
### Configuration
|
|
447
|
+
- **Environment Variables:** {envVarsUsed}
|
|
448
|
+
- **Config Files:** {configFilesUsed}
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Squad Configuration
|
|
453
|
+
|
|
454
|
+
{if squads exist}
|
|
455
|
+
| Squad | Agents | Services |
|
|
456
|
+
|-------|--------|----------|
|
|
457
|
+
{for each squad}
|
|
458
|
+
| {squadName} | {agentCount} | {serviceCount} |
|
|
459
|
+
{end for}
|
|
460
|
+
{else}
|
|
461
|
+
No squads configured.
|
|
462
|
+
{end if}
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
#### 5.2 Recommended Approach Document
|
|
466
|
+
|
|
467
|
+
Generate `docs/architecture/recommended-approach.md`:
|
|
468
|
+
|
|
469
|
+
```markdown
|
|
470
|
+
# Recommended Approach: {feature_name}
|
|
471
|
+
|
|
472
|
+
**Generated:** {date}
|
|
473
|
+
**Generated By:** @architect (Aria)
|
|
474
|
+
**Story:** WIS-15
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Feature Requirements
|
|
479
|
+
|
|
480
|
+
**Description:** {feature_description}
|
|
481
|
+
**API Integration Required:** {apiRequired}
|
|
482
|
+
**Database Changes Required:** {dbRequired}
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Service Type
|
|
487
|
+
|
|
488
|
+
**Recommendation:** {serviceType}
|
|
489
|
+
|
|
490
|
+
**Rationale:** {rationale based on analysis}
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
## Suggested Structure
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
.aios-core/infrastructure/services/{service_name}/
|
|
498
|
+
├── README.md
|
|
499
|
+
├── index.ts
|
|
500
|
+
├── client.ts {if apiIntegration}
|
|
501
|
+
├── types.ts
|
|
502
|
+
├── errors.ts
|
|
503
|
+
├── __tests__/
|
|
504
|
+
│ └── index.test.ts
|
|
505
|
+
├── package.json
|
|
506
|
+
└── tsconfig.json
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Implementation Steps
|
|
512
|
+
|
|
513
|
+
1. **Scaffold Service**
|
|
514
|
+
- Use `*create-service` task to generate structure
|
|
515
|
+
- Select type: {serviceType}
|
|
516
|
+
|
|
517
|
+
2. **Implement Core Logic**
|
|
518
|
+
- Create {mainModules}
|
|
519
|
+
- Follow existing patterns from {referenceService}
|
|
520
|
+
|
|
521
|
+
3. **Add Tests**
|
|
522
|
+
- Use {testFramework}
|
|
523
|
+
- Target >70% coverage
|
|
524
|
+
|
|
525
|
+
4. **Documentation**
|
|
526
|
+
- Update README.md
|
|
527
|
+
- Add JSDoc comments
|
|
528
|
+
|
|
529
|
+
5. **Integration**
|
|
530
|
+
- {integrationSteps based on type}
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## Agent Assignment
|
|
535
|
+
|
|
536
|
+
| Role | Agent | Responsibilities |
|
|
537
|
+
|------|-------|------------------|
|
|
538
|
+
| Primary | @{primaryAgent} | {primaryResponsibilities} |
|
|
539
|
+
| Support | @{supportAgent} | {supportResponsibilities} |
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Dependencies
|
|
544
|
+
|
|
545
|
+
{list of dependencies based on service type}
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Next Steps
|
|
550
|
+
|
|
551
|
+
After this analysis:
|
|
552
|
+
1. Review and approve this approach
|
|
553
|
+
2. Run `*create-service {service_name}` to scaffold
|
|
554
|
+
3. Implement following the steps above
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
### Step 6: Present Results
|
|
560
|
+
|
|
561
|
+
Display summary to user:
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
=== Project Analysis Complete ===
|
|
565
|
+
|
|
566
|
+
Project: {projectName}
|
|
567
|
+
Services Found: {serviceCount}
|
|
568
|
+
Primary Language: {primaryLanguage}
|
|
569
|
+
Testing: {testFramework}
|
|
570
|
+
|
|
571
|
+
=== Recommendation ===
|
|
572
|
+
|
|
573
|
+
Feature: {feature_name}
|
|
574
|
+
Service Type: {serviceType}
|
|
575
|
+
Primary Agent: @{primaryAgent}
|
|
576
|
+
|
|
577
|
+
Documents Generated:
|
|
578
|
+
1. docs/architecture/project-analysis.md
|
|
579
|
+
2. docs/architecture/recommended-approach.md
|
|
580
|
+
|
|
581
|
+
Next Steps:
|
|
582
|
+
1. Review the recommended approach
|
|
583
|
+
2. Run `*create-service {service_name}` to scaffold
|
|
584
|
+
3. Begin implementation with @{primaryAgent}
|
|
585
|
+
|
|
586
|
+
Would you like me to proceed with `*create-service`?
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
## Success Criteria
|
|
592
|
+
|
|
593
|
+
- [ ] Feature requirements captured from user
|
|
594
|
+
- [ ] Project structure scanned completely
|
|
595
|
+
- [ ] All existing services inventoried
|
|
596
|
+
- [ ] Language and testing patterns identified
|
|
597
|
+
- [ ] Service type recommendation provided
|
|
598
|
+
- [ ] File structure suggestion based on patterns
|
|
599
|
+
- [ ] Agent assignment recommended
|
|
600
|
+
- [ ] project-analysis.md generated
|
|
601
|
+
- [ ] recommended-approach.md generated
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
## Integration with Other Tasks
|
|
606
|
+
|
|
607
|
+
This task is typically followed by:
|
|
608
|
+
|
|
609
|
+
1. **`*create-service`** - Scaffold the new service (WIS-11)
|
|
610
|
+
2. **`*create-integration`** - For API integrations (WIS-12)
|
|
611
|
+
3. **`*extend-squad-tools`** - Add to squad if needed (WIS-13)
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Notes
|
|
616
|
+
|
|
617
|
+
- This task is read-only; no project files are modified
|
|
618
|
+
- Run this BEFORE creating new services
|
|
619
|
+
- Recommendations are suggestions, not requirements
|
|
620
|
+
- For large projects, analysis may take 1-2 minutes
|
|
621
|
+
- Always review generated documents before proceeding
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Setup Docker MCP Toolkit
|
|
2
2
|
|
|
3
3
|
**Task ID:** setup-mcp-docker
|
|
4
|
-
**Version:** 2.
|
|
4
|
+
**Version:** 2.2.0
|
|
5
5
|
**Created:** 2025-12-08
|
|
6
|
-
**Updated:** 2025-12-
|
|
6
|
+
**Updated:** 2025-12-23
|
|
7
7
|
**Agent:** @devops (Gage)
|
|
8
8
|
|
|
9
9
|
---
|
|
@@ -369,12 +369,47 @@ docker mcp server enable exa
|
|
|
369
369
|
# Set user home directory for desktop-commander
|
|
370
370
|
docker mcp config write "desktop-commander:
|
|
371
371
|
paths:
|
|
372
|
-
- ${HOME}
|
|
372
|
+
- ${HOME}"
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### 4.1 Configure API Keys (CRITICAL - Known Bug Workaround)
|
|
376
|
+
|
|
377
|
+
⚠️ **BUG:** Docker MCP Toolkit's secrets store and template interpolation do NOT work properly. Credentials set via `docker mcp secret set` or `config.yaml apiKeys` are not passed to containers for MCPs with strict config schemas.
|
|
378
|
+
|
|
379
|
+
**WORKAROUND:** Edit the catalog file directly to hardcode env values.
|
|
380
|
+
|
|
381
|
+
```yaml
|
|
382
|
+
# Edit: ~/.docker/mcp/catalogs/docker-mcp.yaml
|
|
383
|
+
# Find the MCP entry and add/modify the env section:
|
|
384
|
+
|
|
385
|
+
# Example for EXA (already working via apiKeys - no change needed):
|
|
373
386
|
exa:
|
|
374
387
|
apiKeys:
|
|
375
|
-
EXA_API_KEY:
|
|
388
|
+
EXA_API_KEY: your-actual-api-key
|
|
389
|
+
|
|
390
|
+
# Example for Apify (requires catalog edit):
|
|
391
|
+
apify-mcp-server:
|
|
392
|
+
env:
|
|
393
|
+
- name: TOOLS
|
|
394
|
+
value: 'actors,docs,apify/rag-web-browser'
|
|
395
|
+
- name: APIFY_TOKEN
|
|
396
|
+
value: 'your-actual-apify-token'
|
|
376
397
|
```
|
|
377
398
|
|
|
399
|
+
**Security Note:** This exposes credentials in a local file. Ensure:
|
|
400
|
+
1. `~/.docker/mcp/catalogs/` is not committed to any repo
|
|
401
|
+
2. File permissions restrict access to current user only
|
|
402
|
+
|
|
403
|
+
**Alternative config.yaml (works for some MCPs like EXA):**
|
|
404
|
+
```yaml
|
|
405
|
+
# ~/.docker/mcp/config.yaml
|
|
406
|
+
exa:
|
|
407
|
+
apiKeys:
|
|
408
|
+
EXA_API_KEY: your-api-key
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
See `*add-mcp` task (Step 3.1) for detailed instructions.
|
|
412
|
+
|
|
378
413
|
### 5. Configure Claude Code (HTTP Transport)
|
|
379
414
|
|
|
380
415
|
**IMPORTANT:** Use HTTP type, NOT stdio!
|
|
@@ -557,7 +592,7 @@ token_usage: ~500-1,000 tokens (this task only)
|
|
|
557
592
|
|
|
558
593
|
```yaml
|
|
559
594
|
story: Story 6.14 - MCP Governance Consolidation
|
|
560
|
-
version: 2.
|
|
595
|
+
version: 2.2.0
|
|
561
596
|
dependencies:
|
|
562
597
|
- Docker Desktop 4.50+
|
|
563
598
|
- Docker MCP Toolkit
|
|
@@ -569,10 +604,15 @@ tags:
|
|
|
569
604
|
- setup
|
|
570
605
|
- http-transport
|
|
571
606
|
created_at: 2025-12-08
|
|
572
|
-
updated_at: 2025-12-
|
|
607
|
+
updated_at: 2025-12-23
|
|
573
608
|
agents:
|
|
574
609
|
- devops
|
|
575
610
|
changelog:
|
|
611
|
+
2.2.0:
|
|
612
|
+
- Added: Step 4.1 documenting Docker MCP secrets bug
|
|
613
|
+
- Added: Workaround using catalog file direct edit
|
|
614
|
+
- Updated: Clarified which MCPs need catalog edit vs config.yaml
|
|
615
|
+
- Fixed: Apify and similar MCPs now configurable
|
|
576
616
|
2.1.0:
|
|
577
617
|
- Changed: DevOps Agent now exclusive responsible (Story 6.14)
|
|
578
618
|
- Removed: Dev Agent from agents list
|