@iservu-inc/adf-cli 0.2.0 → 0.3.6

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.
Files changed (33) hide show
  1. package/.project/chats/complete/2025-10-03_AGENTS-MD-AND-TOOL-GENERATORS.md +764 -0
  2. package/.project/chats/current/2025-10-03_AI-PROVIDER-INTEGRATION.md +569 -0
  3. package/.project/chats/current/2025-10-03_FRAMEWORK-UPDATE-SYSTEM.md +497 -0
  4. package/.project/chats/current/SESSION-STATUS.md +127 -0
  5. package/.project/docs/AI-PROVIDER-INTEGRATION.md +600 -0
  6. package/.project/docs/FRAMEWORK-UPDATE-INTEGRATION.md +421 -0
  7. package/.project/docs/FRAMEWORK-UPDATE-SYSTEM.md +832 -0
  8. package/.project/docs/PROJECT-STRUCTURE-EXPLANATION.md +500 -0
  9. package/.project/docs/architecture/SYSTEM-DESIGN.md +122 -1
  10. package/.project/docs/goals/PROJECT-VISION.md +33 -28
  11. package/.project/docs/tool-integrations/RESEARCH-FINDINGS.md +828 -0
  12. package/CHANGELOG.md +325 -0
  13. package/README.md +100 -11
  14. package/bin/adf.js +7 -0
  15. package/lib/ai/ai-client.js +328 -0
  16. package/lib/ai/ai-config.js +398 -0
  17. package/lib/commands/config.js +154 -0
  18. package/lib/commands/deploy.js +122 -3
  19. package/lib/commands/init.js +56 -10
  20. package/lib/frameworks/interviewer.js +89 -11
  21. package/lib/frameworks/progress-tracker.js +8 -1
  22. package/lib/generators/agents-md-generator.js +388 -0
  23. package/lib/generators/cursor-generator.js +374 -0
  24. package/lib/generators/index.js +98 -0
  25. package/lib/generators/tool-config-generator.js +188 -0
  26. package/lib/generators/vscode-generator.js +403 -0
  27. package/lib/generators/windsurf-generator.js +596 -0
  28. package/package.json +15 -3
  29. package/tests/agents-md-generator.test.js +245 -0
  30. package/tests/cursor-generator.test.js +326 -0
  31. package/tests/vscode-generator.test.js +436 -0
  32. package/tests/windsurf-generator.test.js +320 -0
  33. /package/.project/chats/{current → complete}/2025-10-03_ADF-CLI-QUALITY-BASED-PROGRESS-AND-RESUME.md +0 -0
@@ -0,0 +1,832 @@
1
+ # Framework Update Monitoring System
2
+
3
+ **Date:** 2025-10-03
4
+ **Purpose:** Automated monitoring and AI-driven evaluation of upstream framework updates
5
+ **Status:** Design Specification
6
+
7
+ ---
8
+
9
+ ## 🎯 System Goals
10
+
11
+ **Primary Objectives:**
12
+ 1. **Monitor** the 4 upstream framework repositories for updates
13
+ 2. **Notify** when changes are detected
14
+ 3. **Update** AgentDevFramework git submodules
15
+ 4. **Analyze** changes using AI to determine impact on adf-cli
16
+ 5. **Recommend** which changes should be incorporated into adf-cli
17
+ 6. **Allow** manual review and decision-making
18
+
19
+ ---
20
+
21
+ ## 📊 Architecture Overview
22
+
23
+ ```
24
+ ┌─────────────────────────────────────────────────────────────┐
25
+ │ Upstream Framework Repositories │
26
+ │ • BMAD-METHOD │
27
+ │ • Spec-Kit (GitHub) │
28
+ │ • Context Engineering │
29
+ │ • PRPs Agentic Engineering │
30
+ └──────────────────┬──────────────────────────────────────────┘
31
+
32
+ │ Monitor (Daily/Weekly)
33
+
34
+ ┌─────────────────────────────────────────────────────────────┐
35
+ │ Update Detection Service │
36
+ │ • GitHub Actions (cron schedule) │
37
+ │ • GitHub API polling │
38
+ │ • Webhook listeners (optional) │
39
+ └──────────────────┬──────────────────────────────────────────┘
40
+
41
+ │ Detected Change
42
+
43
+ ┌─────────────────────────────────────────────────────────────┐
44
+ │ AgentDevFramework Repository │
45
+ │ • Update git submodules │
46
+ │ • Create update branch │
47
+ │ • Document changes │
48
+ └──────────────────┬──────────────────────────────────────────┘
49
+
50
+ │ Trigger Analysis
51
+
52
+ ┌─────────────────────────────────────────────────────────────┐
53
+ │ AI Analysis Service │
54
+ │ • Generate diff analysis │
55
+ │ • Evaluate impact on adf-cli │
56
+ │ • Suggest code changes │
57
+ │ • Create recommendations report │
58
+ └──────────────────┬──────────────────────────────────────────┘
59
+
60
+ │ Create Issue/PR
61
+
62
+ ┌─────────────────────────────────────────────────────────────┐
63
+ │ Review & Decision │
64
+ │ • Human reviews AI recommendations │
65
+ │ • Decides which changes to adopt │
66
+ │ • Updates adf-cli accordingly │
67
+ └─────────────────────────────────────────────────────────────┘
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 🔧 Implementation Approaches
73
+
74
+ ### Approach 1: GitHub Actions (Recommended)
75
+
76
+ **Pros:**
77
+ - Free for public repos
78
+ - Built into GitHub
79
+ - No external infrastructure
80
+ - Cron scheduling built-in
81
+
82
+ **Cons:**
83
+ - Limited to scheduled checks (not real-time)
84
+ - Requires GitHub account permissions
85
+
86
+ #### Implementation:
87
+
88
+ **File:** `.github/workflows/monitor-framework-updates.yml` (in AgentDevFramework)
89
+
90
+ ```yaml
91
+ name: Monitor Upstream Framework Updates
92
+
93
+ on:
94
+ schedule:
95
+ # Run daily at 2am UTC
96
+ - cron: '0 2 * * *'
97
+ workflow_dispatch: # Manual trigger
98
+
99
+ jobs:
100
+ check-updates:
101
+ runs-on: ubuntu-latest
102
+
103
+ steps:
104
+ - name: Checkout AgentDevFramework
105
+ uses: actions/checkout@v4
106
+ with:
107
+ submodules: recursive
108
+ token: ${{ secrets.GITHUB_TOKEN }}
109
+
110
+ - name: Update submodules and check for changes
111
+ id: update
112
+ run: |
113
+ git submodule update --remote --merge
114
+
115
+ # Check if any submodules have updates
116
+ if git diff --quiet; then
117
+ echo "has_updates=false" >> $GITHUB_OUTPUT
118
+ echo "No updates detected"
119
+ else
120
+ echo "has_updates=true" >> $GITHUB_OUTPUT
121
+ echo "Updates detected!"
122
+
123
+ # Get detailed change info
124
+ git submodule status > submodule_status.txt
125
+ git diff --submodule > submodule_diff.txt
126
+ fi
127
+
128
+ - name: Upload change artifacts
129
+ if: steps.update.outputs.has_updates == 'true'
130
+ uses: actions/upload-artifact@v3
131
+ with:
132
+ name: framework-updates
133
+ path: |
134
+ submodule_status.txt
135
+ submodule_diff.txt
136
+
137
+ - name: Trigger AI Analysis
138
+ if: steps.update.outputs.has_updates == 'true'
139
+ uses: actions/github-script@v7
140
+ with:
141
+ script: |
142
+ const fs = require('fs');
143
+ const diff = fs.readFileSync('submodule_diff.txt', 'utf8');
144
+
145
+ // Create issue with update notification
146
+ await github.rest.issues.create({
147
+ owner: context.repo.owner,
148
+ repo: context.repo.repo,
149
+ title: `🔔 Framework Update Detected - ${new Date().toISOString().split('T')[0]}`,
150
+ body: `## Framework Updates Detected\n\n` +
151
+ `Upstream frameworks have new commits.\n\n` +
152
+ `### Changes:\n\`\`\`\n${diff}\n\`\`\`\n\n` +
153
+ `### Next Steps:\n` +
154
+ `1. Review the changes above\n` +
155
+ `2. Run AI analysis: \`npm run analyze-updates\`\n` +
156
+ `3. Review AI recommendations\n` +
157
+ `4. Update adf-cli if needed\n\n` +
158
+ `**Branch:** \`updates/${new Date().toISOString().split('T')[0]}\``,
159
+ labels: ['framework-update', 'needs-review']
160
+ });
161
+
162
+ - name: Create update branch
163
+ if: steps.update.outputs.has_updates == 'true'
164
+ run: |
165
+ BRANCH_NAME="updates/$(date +%Y-%m-%d)"
166
+ git checkout -b $BRANCH_NAME
167
+ git config user.name "Framework Update Bot"
168
+ git config user.email "bot@agentdevframework.dev"
169
+ git add .
170
+ git commit -m "chore: Update framework submodules - $(date +%Y-%m-%d)"
171
+ git push origin $BRANCH_NAME
172
+
173
+ analyze-changes:
174
+ needs: check-updates
175
+ if: needs.check-updates.outputs.has_updates == 'true'
176
+ runs-on: ubuntu-latest
177
+
178
+ steps:
179
+ - name: Checkout AgentDevFramework
180
+ uses: actions/checkout@v4
181
+ with:
182
+ submodules: recursive
183
+
184
+ - name: Setup Node.js
185
+ uses: actions/setup-node@v4
186
+ with:
187
+ node-version: '20'
188
+
189
+ - name: Install dependencies
190
+ run: npm install
191
+
192
+ - name: Run AI Analysis
193
+ env:
194
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
195
+ run: |
196
+ npm run analyze-framework-updates
197
+ ```
198
+
199
+ ---
200
+
201
+ ### Approach 2: Manual Check Script (Simple)
202
+
203
+ **File:** `scripts/check-framework-updates.js` (in AgentDevFramework)
204
+
205
+ ```javascript
206
+ #!/usr/bin/env node
207
+
208
+ const { execSync } = require('child_process');
209
+ const fs = require('fs');
210
+ const path = require('path');
211
+
212
+ const SUBMODULES = [
213
+ { name: 'BMAD-METHOD', path: 'references/bmad-method' },
214
+ { name: 'Spec-Kit', path: 'references/spec-kit' },
215
+ { name: 'Context Engineering', path: 'references/context-engineering' },
216
+ { name: 'PRPs Agentic', path: 'references/prps-agentic' }
217
+ ];
218
+
219
+ console.log('🔍 Checking for framework updates...\n');
220
+
221
+ let hasUpdates = false;
222
+ const updates = [];
223
+
224
+ SUBMODULES.forEach(submodule => {
225
+ try {
226
+ // Get current commit
227
+ const currentCommit = execSync(
228
+ `git -C ${submodule.path} rev-parse HEAD`,
229
+ { encoding: 'utf-8' }
230
+ ).trim();
231
+
232
+ // Fetch latest
233
+ execSync(`git -C ${submodule.path} fetch origin`, { stdio: 'ignore' });
234
+
235
+ // Get latest commit
236
+ const latestCommit = execSync(
237
+ `git -C ${submodule.path} rev-parse origin/main || git -C ${submodule.path} rev-parse origin/master`,
238
+ { encoding: 'utf-8' }
239
+ ).trim();
240
+
241
+ if (currentCommit !== latestCommit) {
242
+ hasUpdates = true;
243
+
244
+ // Get commit log
245
+ const commits = execSync(
246
+ `git -C ${submodule.path} log ${currentCommit}..${latestCommit} --oneline`,
247
+ { encoding: 'utf-8' }
248
+ );
249
+
250
+ updates.push({
251
+ name: submodule.name,
252
+ path: submodule.path,
253
+ currentCommit: currentCommit.substring(0, 7),
254
+ latestCommit: latestCommit.substring(0, 7),
255
+ commits: commits.trim().split('\n')
256
+ });
257
+
258
+ console.log(`📦 ${submodule.name}: Updates available`);
259
+ console.log(` Current: ${currentCommit.substring(0, 7)}`);
260
+ console.log(` Latest: ${latestCommit.substring(0, 7)}`);
261
+ console.log(` Commits:\n${commits.split('\n').map(c => ` ${c}`).join('\n')}`);
262
+ console.log('');
263
+ } else {
264
+ console.log(`✅ ${submodule.name}: Up to date`);
265
+ }
266
+ } catch (error) {
267
+ console.error(`❌ ${submodule.name}: Error checking - ${error.message}`);
268
+ }
269
+ });
270
+
271
+ if (hasUpdates) {
272
+ console.log('\n🎯 Updates detected! Next steps:');
273
+ console.log('1. Run: npm run update-frameworks');
274
+ console.log('2. Run: npm run analyze-framework-updates');
275
+ console.log('3. Review AI recommendations');
276
+ console.log('4. Update adf-cli if needed\n');
277
+
278
+ // Write update report
279
+ fs.writeFileSync(
280
+ 'framework-updates-report.json',
281
+ JSON.stringify(updates, null, 2)
282
+ );
283
+ console.log('📄 Report saved: framework-updates-report.json\n');
284
+
285
+ process.exit(1); // Exit with code 1 to indicate updates available
286
+ } else {
287
+ console.log('\n✨ All frameworks are up to date!\n');
288
+ process.exit(0);
289
+ }
290
+ ```
291
+
292
+ **File:** `scripts/update-frameworks.js`
293
+
294
+ ```javascript
295
+ #!/usr/bin/env node
296
+
297
+ const { execSync } = require('child_process');
298
+
299
+ console.log('📥 Updating framework submodules...\n');
300
+
301
+ try {
302
+ // Update all submodules to latest
303
+ execSync('git submodule update --remote --merge', { stdio: 'inherit' });
304
+
305
+ console.log('\n✅ Submodules updated successfully!\n');
306
+ console.log('Next: Run npm run analyze-framework-updates\n');
307
+ } catch (error) {
308
+ console.error('❌ Error updating submodules:', error.message);
309
+ process.exit(1);
310
+ }
311
+ ```
312
+
313
+ ---
314
+
315
+ ### Approach 3: AI Analysis Script
316
+
317
+ **File:** `scripts/analyze-framework-updates.js`
318
+
319
+ ```javascript
320
+ #!/usr/bin/env node
321
+
322
+ const Anthropic = require('@anthropic-ai/sdk');
323
+ const { execSync } = require('child_process');
324
+ const fs = require('fs');
325
+ const path = require('path');
326
+
327
+ const anthropic = new Anthropic({
328
+ apiKey: process.env.ANTHROPIC_API_KEY
329
+ });
330
+
331
+ const SUBMODULES = [
332
+ { name: 'BMAD-METHOD', path: 'references/bmad-method' },
333
+ { name: 'Spec-Kit', path: 'references/spec-kit' },
334
+ { name: 'Context Engineering', path: 'references/context-engineering' },
335
+ { name: 'PRPs Agentic', path: 'references/prps-agentic' }
336
+ ];
337
+
338
+ async function analyzeFrameworkUpdate(submodule, diff) {
339
+ console.log(`\n🤖 Analyzing ${submodule.name} updates with AI...\n`);
340
+
341
+ const prompt = `You are analyzing updates to the ${submodule.name} framework to determine their impact on adf-cli (an npm CLI tool that implements these frameworks).
342
+
343
+ ## Framework Update Diff:
344
+ \`\`\`diff
345
+ ${diff}
346
+ \`\`\`
347
+
348
+ ## Your Task:
349
+
350
+ Analyze these changes and provide:
351
+
352
+ 1. **Summary**: What changed in 2-3 sentences
353
+ 2. **Impact Level**: Critical / High / Medium / Low / None
354
+ 3. **Affects adf-cli**: Yes/No and why
355
+ 4. **Recommended Actions**: What should be updated in adf-cli
356
+ 5. **Code Suggestions**: Specific file paths and code changes for adf-cli
357
+ 6. **Breaking Changes**: Any breaking changes to watch out for
358
+
359
+ ## adf-cli Context:
360
+
361
+ adf-cli has these components:
362
+ - Interview system (lib/frameworks/questions.js)
363
+ - Quality analyzer (lib/frameworks/answer-quality-analyzer.js)
364
+ - Output generators (lib/frameworks/output-generators.js)
365
+ - Tool config generators (lib/generators/)
366
+ - Templates (lib/templates/shared/)
367
+
368
+ Format your response as JSON:
369
+
370
+ \`\`\`json
371
+ {
372
+ "summary": "...",
373
+ "impactLevel": "Critical|High|Medium|Low|None",
374
+ "affectsAdfCli": true|false,
375
+ "reason": "...",
376
+ "recommendedActions": ["action 1", "action 2"],
377
+ "codeSuggestions": [
378
+ {
379
+ "file": "lib/path/to/file.js",
380
+ "change": "Description of change",
381
+ "code": "Suggested code snippet"
382
+ }
383
+ ],
384
+ "breakingChanges": ["change 1", "change 2"],
385
+ "confidence": "High|Medium|Low"
386
+ }
387
+ \`\`\``;
388
+
389
+ try {
390
+ const response = await anthropic.messages.create({
391
+ model: 'claude-sonnet-4-5-20250929',
392
+ max_tokens: 4096,
393
+ messages: [{
394
+ role: 'user',
395
+ content: prompt
396
+ }]
397
+ });
398
+
399
+ const analysis = JSON.parse(
400
+ response.content[0].text.match(/```json\n([\s\S]*?)\n```/)[1]
401
+ );
402
+
403
+ return analysis;
404
+ } catch (error) {
405
+ console.error(`❌ Error analyzing ${submodule.name}:`, error.message);
406
+ return null;
407
+ }
408
+ }
409
+
410
+ async function main() {
411
+ if (!process.env.ANTHROPIC_API_KEY) {
412
+ console.error('❌ ANTHROPIC_API_KEY not set');
413
+ process.exit(1);
414
+ }
415
+
416
+ console.log('🔍 Analyzing framework updates...\n');
417
+
418
+ const analyses = {};
419
+
420
+ for (const submodule of SUBMODULES) {
421
+ try {
422
+ // Get diff for this submodule
423
+ const diff = execSync(
424
+ `git diff HEAD@{1} HEAD -- ${submodule.path}`,
425
+ { encoding: 'utf-8', maxBuffer: 10 * 1024 * 1024 }
426
+ );
427
+
428
+ if (!diff.trim()) {
429
+ console.log(`ℹ️ ${submodule.name}: No changes detected\n`);
430
+ continue;
431
+ }
432
+
433
+ // Analyze with AI
434
+ const analysis = await analyzeFrameworkUpdate(submodule, diff);
435
+
436
+ if (analysis) {
437
+ analyses[submodule.name] = analysis;
438
+
439
+ console.log(`\n📊 ${submodule.name} Analysis:`);
440
+ console.log(` Impact Level: ${analysis.impactLevel}`);
441
+ console.log(` Affects adf-cli: ${analysis.affectsAdfCli ? 'YES' : 'NO'}`);
442
+ console.log(` Summary: ${analysis.summary}`);
443
+
444
+ if (analysis.affectsAdfCli) {
445
+ console.log(`\n 🎯 Recommended Actions:`);
446
+ analysis.recommendedActions.forEach((action, i) => {
447
+ console.log(` ${i + 1}. ${action}`);
448
+ });
449
+ }
450
+ }
451
+
452
+ // Rate limit
453
+ await new Promise(resolve => setTimeout(resolve, 1000));
454
+
455
+ } catch (error) {
456
+ console.error(`❌ Error processing ${submodule.name}:`, error.message);
457
+ }
458
+ }
459
+
460
+ // Generate comprehensive report
461
+ const report = {
462
+ date: new Date().toISOString(),
463
+ analyses,
464
+ summary: generateSummary(analyses)
465
+ };
466
+
467
+ // Save report
468
+ const reportPath = path.join(process.cwd(), 'framework-analysis-report.json');
469
+ fs.writeFileSync(reportPath, JSON.stringify(report, null, 2));
470
+
471
+ console.log(`\n\n📄 Full report saved: framework-analysis-report.json\n`);
472
+
473
+ // Generate markdown report
474
+ const mdReport = generateMarkdownReport(report);
475
+ fs.writeFileSync('framework-analysis-report.md', mdReport);
476
+
477
+ console.log('📄 Markdown report: framework-analysis-report.md\n');
478
+
479
+ // Create GitHub issue if high impact
480
+ if (hasHighImpact(analyses)) {
481
+ console.log('⚠️ HIGH IMPACT changes detected!');
482
+ console.log(' Consider creating a GitHub issue in adf-cli repo\n');
483
+ }
484
+ }
485
+
486
+ function generateSummary(analyses) {
487
+ const frameworks = Object.keys(analyses);
488
+ const affectedCount = frameworks.filter(
489
+ f => analyses[f].affectsAdfCli
490
+ ).length;
491
+
492
+ const highImpact = frameworks.filter(
493
+ f => ['Critical', 'High'].includes(analyses[f].impactLevel)
494
+ );
495
+
496
+ return {
497
+ totalFrameworksUpdated: frameworks.length,
498
+ affectingAdfCli: affectedCount,
499
+ highImpactChanges: highImpact.length,
500
+ requiresAction: affectedCount > 0
501
+ };
502
+ }
503
+
504
+ function hasHighImpact(analyses) {
505
+ return Object.values(analyses).some(
506
+ a => ['Critical', 'High'].includes(a.impactLevel)
507
+ );
508
+ }
509
+
510
+ function generateMarkdownReport(report) {
511
+ let md = `# Framework Update Analysis Report\n\n`;
512
+ md += `**Date:** ${new Date(report.date).toLocaleDateString()}\n\n`;
513
+ md += `## Summary\n\n`;
514
+ md += `- **Frameworks Updated:** ${report.summary.totalFrameworksUpdated}\n`;
515
+ md += `- **Affecting adf-cli:** ${report.summary.affectingAdfCli}\n`;
516
+ md += `- **High Impact:** ${report.summary.highImpactChanges}\n`;
517
+ md += `- **Requires Action:** ${report.summary.requiresAction ? 'YES' : 'NO'}\n\n`;
518
+
519
+ md += `---\n\n`;
520
+
521
+ Object.entries(report.analyses).forEach(([framework, analysis]) => {
522
+ md += `## ${framework}\n\n`;
523
+ md += `**Impact Level:** ${analysis.impactLevel}\n\n`;
524
+ md += `**Affects adf-cli:** ${analysis.affectsAdfCli ? '✅ YES' : '❌ NO'}\n\n`;
525
+ md += `**Summary:** ${analysis.summary}\n\n`;
526
+
527
+ if (analysis.affectsAdfCli) {
528
+ md += `### Recommended Actions\n\n`;
529
+ analysis.recommendedActions.forEach((action, i) => {
530
+ md += `${i + 1}. ${action}\n`;
531
+ });
532
+ md += `\n`;
533
+
534
+ if (analysis.codeSuggestions.length > 0) {
535
+ md += `### Code Suggestions\n\n`;
536
+ analysis.codeSuggestions.forEach(suggestion => {
537
+ md += `**File:** \`${suggestion.file}\`\n\n`;
538
+ md += `${suggestion.change}\n\n`;
539
+ md += `\`\`\`javascript\n${suggestion.code}\n\`\`\`\n\n`;
540
+ });
541
+ }
542
+
543
+ if (analysis.breakingChanges.length > 0) {
544
+ md += `### ⚠️ Breaking Changes\n\n`;
545
+ analysis.breakingChanges.forEach(change => {
546
+ md += `- ${change}\n`;
547
+ });
548
+ md += `\n`;
549
+ }
550
+ }
551
+
552
+ md += `---\n\n`;
553
+ });
554
+
555
+ return md;
556
+ }
557
+
558
+ main().catch(console.error);
559
+ ```
560
+
561
+ ---
562
+
563
+ ## 📦 Package.json Scripts
564
+
565
+ Add to `AgentDevFramework/package.json`:
566
+
567
+ ```json
568
+ {
569
+ "scripts": {
570
+ "check-updates": "node scripts/check-framework-updates.js",
571
+ "update-frameworks": "node scripts/update-frameworks.js",
572
+ "analyze-updates": "node scripts/analyze-framework-updates.js",
573
+ "update-and-analyze": "npm run update-frameworks && npm run analyze-updates"
574
+ },
575
+ "devDependencies": {
576
+ "@anthropic-ai/sdk": "^0.32.0"
577
+ }
578
+ }
579
+ ```
580
+
581
+ ---
582
+
583
+ ## 🔄 Workflow
584
+
585
+ ### Automated (GitHub Actions)
586
+
587
+ ```
588
+ Daily at 2am UTC:
589
+ 1. GitHub Action runs
590
+ 2. Checks all submodules for updates
591
+ 3. If updates found:
592
+ a. Creates update branch
593
+ b. Creates GitHub issue
594
+ c. Triggers AI analysis
595
+ d. Uploads analysis report
596
+ 4. Maintainer reviews issue
597
+ 5. Decides whether to update adf-cli
598
+ ```
599
+
600
+ ### Manual
601
+
602
+ ```bash
603
+ # In AgentDevFramework directory
604
+
605
+ # 1. Check for updates
606
+ npm run check-updates
607
+
608
+ # 2. If updates found, pull them
609
+ npm run update-frameworks
610
+
611
+ # 3. Run AI analysis
612
+ npm run analyze-updates
613
+
614
+ # 4. Review reports:
615
+ # - framework-analysis-report.json
616
+ # - framework-analysis-report.md
617
+
618
+ # 5. Decide which changes to adopt in adf-cli
619
+
620
+ # 6. Update adf-cli accordingly
621
+ ```
622
+
623
+ ---
624
+
625
+ ## 📋 Analysis Report Example
626
+
627
+ ```json
628
+ {
629
+ "date": "2025-10-03T10:30:00.000Z",
630
+ "analyses": {
631
+ "BMAD-METHOD": {
632
+ "summary": "Added new persona for DevOps Engineer and updated testing methodology to include infrastructure tests",
633
+ "impactLevel": "High",
634
+ "affectsAdfCli": true,
635
+ "reason": "New persona should be added to agent definitions, testing methodology affects output-generators.js",
636
+ "recommendedActions": [
637
+ "Add DevOps Engineer agent to lib/templates/shared/agents/",
638
+ "Update output-generators.js to include infrastructure testing in BMAD outputs",
639
+ "Add infrastructure testing questions to questions.js"
640
+ ],
641
+ "codeSuggestions": [
642
+ {
643
+ "file": "lib/templates/shared/agents/devops.md",
644
+ "change": "Create new DevOps Engineer agent",
645
+ "code": "# DevOps Engineer Agent\n\n## Role\nInfrastructure automation and deployment specialist..."
646
+ },
647
+ {
648
+ "file": "lib/frameworks/questions.js",
649
+ "change": "Add infrastructure testing questions",
650
+ "code": "{\n id: 'infrastructure-testing',\n text: 'What infrastructure testing is required?',\n guidance: '...',\n frameworks: ['comprehensive']\n}"
651
+ }
652
+ ],
653
+ "breakingChanges": [],
654
+ "confidence": "High"
655
+ },
656
+ "Spec-Kit": {
657
+ "summary": "Updated markdown template format, no methodology changes",
658
+ "impactLevel": "Low",
659
+ "affectsAdfCli": false,
660
+ "reason": "Template format changes don't affect CLI logic",
661
+ "recommendedActions": [],
662
+ "codeSuggestions": [],
663
+ "breakingChanges": [],
664
+ "confidence": "High"
665
+ }
666
+ },
667
+ "summary": {
668
+ "totalFrameworksUpdated": 2,
669
+ "affectingAdfCli": 1,
670
+ "highImpactChanges": 1,
671
+ "requiresAction": true
672
+ }
673
+ }
674
+ ```
675
+
676
+ ---
677
+
678
+ ## 🎯 Decision Flow
679
+
680
+ ```
681
+ Framework Update Detected
682
+
683
+ AI Analysis
684
+
685
+ ┌─────┴─────┐
686
+ │ │
687
+ ↓ ↓
688
+ Critical/High Low/None
689
+ ↓ ↓
690
+ Create Issue Log Only
691
+
692
+ Human Review
693
+
694
+ ┌─────┴─────┐
695
+ │ │
696
+ ↓ ↓
697
+ Adopt Defer
698
+ ↓ ↓
699
+ Update Document
700
+ adf-cli Reason
701
+
702
+ Test
703
+
704
+ Release
705
+ ```
706
+
707
+ ---
708
+
709
+ ## 🚀 Getting Started
710
+
711
+ ### Setup
712
+
713
+ **1. In AgentDevFramework:**
714
+
715
+ ```bash
716
+ cd D:\Documents\GitHub\AgentDevFramework
717
+
718
+ # Install dependencies
719
+ npm install @anthropic-ai/sdk
720
+
721
+ # Create scripts
722
+ mkdir -p scripts
723
+ # [Copy scripts from above]
724
+
725
+ # Set API key
726
+ export ANTHROPIC_API_KEY="your-key" # or add to .env
727
+ ```
728
+
729
+ **2. Test Manual Flow:**
730
+
731
+ ```bash
732
+ # Check for updates
733
+ npm run check-updates
734
+
735
+ # If updates found:
736
+ npm run update-frameworks
737
+ npm run analyze-updates
738
+
739
+ # Review reports
740
+ cat framework-analysis-report.md
741
+ ```
742
+
743
+ **3. Setup GitHub Actions (Optional):**
744
+
745
+ ```bash
746
+ # Create workflow file
747
+ mkdir -p .github/workflows
748
+ # [Copy monitor-framework-updates.yml from above]
749
+
750
+ # Add secret to GitHub repo
751
+ # Settings → Secrets → Actions → New repository secret
752
+ # Name: ANTHROPIC_API_KEY
753
+ # Value: your-key
754
+ ```
755
+
756
+ ---
757
+
758
+ ## 📊 Maintenance
759
+
760
+ ### Weekly (Manual)
761
+ ```bash
762
+ npm run check-updates
763
+ ```
764
+
765
+ ### Daily (Automated via GitHub Actions)
766
+ - Runs automatically
767
+ - Creates issues when updates detected
768
+
769
+ ### When Issue Created
770
+ 1. Review AI analysis report
771
+ 2. Evaluate recommendations
772
+ 3. Decide: Adopt / Defer / Reject
773
+ 4. If adopting: Update adf-cli
774
+ 5. Test changes
775
+ 6. Release new version
776
+
777
+ ---
778
+
779
+ ## 🔐 Security Considerations
780
+
781
+ 1. **API Keys:**
782
+ - Store ANTHROPIC_API_KEY in GitHub Secrets
783
+ - Never commit to repository
784
+
785
+ 2. **Submodule Trust:**
786
+ - Frameworks are from trusted sources
787
+ - Review changes before auto-merging
788
+
789
+ 3. **Rate Limits:**
790
+ - AI analysis rate-limited (1 req/sec)
791
+ - GitHub Actions has usage limits
792
+
793
+ ---
794
+
795
+ ## 📈 Future Enhancements
796
+
797
+ 1. **Auto-PR Creation:**
798
+ - AI generates PRs with suggested changes
799
+ - Human reviews and merges
800
+
801
+ 2. **Semantic Version Detection:**
802
+ - Detect breaking changes in frameworks
803
+ - Suggest version bump for adf-cli
804
+
805
+ 3. **Changelog Integration:**
806
+ - Auto-generate CHANGELOG entries
807
+ - Link to upstream framework changes
808
+
809
+ 4. **Multi-Stage Analysis:**
810
+ - Stage 1: Quick impact assessment
811
+ - Stage 2: Deep code analysis
812
+ - Stage 3: Suggested implementation
813
+
814
+ 5. **Testing Integration:**
815
+ - Run adf-cli tests against suggested changes
816
+ - Report test results in analysis
817
+
818
+ ---
819
+
820
+ ## ✅ Success Criteria
821
+
822
+ - [ ] Framework updates detected within 24 hours
823
+ - [ ] AI analysis provides actionable recommendations
824
+ - [ ] 80%+ accuracy in impact assessment
825
+ - [ ] Human review time < 30 minutes per update
826
+ - [ ] Zero missed critical updates
827
+
828
+ ---
829
+
830
+ **Created:** 2025-10-03
831
+ **Status:** Design Complete - Ready for Implementation
832
+ **Next Step:** Implement scripts in AgentDevFramework