proagents 1.6.19 → 1.6.21

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 (143) hide show
  1. package/.claude/settings.local.json +13 -1
  2. package/.proagents/.cursorrules +25 -10
  3. package/.proagents/.windsurfrules +25 -10
  4. package/.proagents/AGENTS.md +30 -11
  5. package/.proagents/AI_INSTRUCTIONS.md +86 -30
  6. package/.proagents/BOLT.md +25 -10
  7. package/.proagents/CLAUDE.md +25 -10
  8. package/.proagents/GEMINI.md +25 -10
  9. package/.proagents/KIRO.md +25 -10
  10. package/.proagents/LOVABLE.md +25 -10
  11. package/.proagents/PROAGENTS.md +96 -343
  12. package/.proagents/REPLIT.md +25 -10
  13. package/.proagents/activity.log +1 -0
  14. package/.proagents/custom-commands.yaml +0 -1
  15. package/.proagents/docs/command-details.md +1 -2
  16. package/.proagents/getting-started/ai-training-setup.md +0 -1
  17. package/.proagents/performance/README.md +59 -0
  18. package/.proagents/performance/bundle-analysis.md +375 -0
  19. package/.proagents/performance/load-testing.md +563 -0
  20. package/.proagents/performance/runtime-metrics.md +489 -0
  21. package/.proagents/performance/web-vitals.md +425 -0
  22. package/.proagents/platforms.yaml +66 -0
  23. package/.proagents/proagents.config.yaml +0 -1
  24. package/.proagents/prompts/ai-add.md +80 -0
  25. package/.proagents/prompts/ai-list.md +41 -0
  26. package/.proagents/prompts/ai-remove.md +112 -0
  27. package/.proagents/prompts/ai-sync.md +96 -0
  28. package/.proagents/workflow-modes/entry-modes.md +1 -6
  29. package/lib/commands/ai.js +100 -48
  30. package/lib/commands/init.js +89 -22
  31. package/package.json +1 -1
  32. package/.proagents/ANTIGRAVITY.md +0 -61
  33. package/.proagents/CHATGPT.md +0 -57
  34. package/.proagents/GROQ.md +0 -57
  35. package/.proagents/api-versioning/README.md +0 -257
  36. package/.proagents/api-versioning/changelog-template.md +0 -225
  37. package/.proagents/api-versioning/deprecation-workflow.md +0 -470
  38. package/.proagents/api-versioning/versioning-strategy.md +0 -291
  39. package/.proagents/automation/README.md +0 -38
  40. package/.proagents/automation/ai-behavior-rules.md +0 -339
  41. package/.proagents/automation/ai-prompt-injection.md +0 -331
  42. package/.proagents/automation/auto-decisions.md +0 -535
  43. package/.proagents/automation/decision-defaults.yaml +0 -317
  44. package/.proagents/cache/README.md +0 -110
  45. package/.proagents/cache/analysis-metadata.json +0 -76
  46. package/.proagents/cache/conventions.json +0 -125
  47. package/.proagents/cache/dependencies.json +0 -85
  48. package/.proagents/cache/features.json +0 -115
  49. package/.proagents/cache/patterns.json +0 -105
  50. package/.proagents/cache/schemas/conventions-schema.json +0 -138
  51. package/.proagents/cache/schemas/dependencies-schema.json +0 -95
  52. package/.proagents/cache/schemas/features-schema.json +0 -104
  53. package/.proagents/cache/schemas/metadata-schema.json +0 -83
  54. package/.proagents/cache/schemas/patterns-schema.json +0 -136
  55. package/.proagents/cache/schemas/structure-schema.json +0 -72
  56. package/.proagents/cache/structure.json +0 -109
  57. package/.proagents/checklists/README.md +0 -261
  58. package/.proagents/checklists/code-quality.md +0 -137
  59. package/.proagents/checklists/code-review.md +0 -148
  60. package/.proagents/checklists/pr-checklist.md +0 -78
  61. package/.proagents/checklists/pre-deployment.md +0 -132
  62. package/.proagents/checklists/pre-implementation.md +0 -80
  63. package/.proagents/checklists/testing.md +0 -120
  64. package/.proagents/checkpoints.json +0 -13
  65. package/.proagents/cicd/README.md +0 -338
  66. package/.proagents/cicd/azure-devops.md +0 -267
  67. package/.proagents/cicd/github-actions.md +0 -375
  68. package/.proagents/cicd/gitlab-ci.md +0 -278
  69. package/.proagents/cicd/jenkins.md +0 -317
  70. package/.proagents/collaboration/README.md +0 -143
  71. package/.proagents/collaboration/roles.md +0 -248
  72. package/.proagents/collaboration/sessions.md +0 -390
  73. package/.proagents/collaboration/sync.md +0 -358
  74. package/.proagents/cost/README.md +0 -48
  75. package/.proagents/cost/cost-template.md +0 -283
  76. package/.proagents/cost/estimation-framework.md +0 -287
  77. package/.proagents/database/README.md +0 -72
  78. package/.proagents/database/examples/001-create-users.sql +0 -129
  79. package/.proagents/database/examples/002-add-preferences.sql +0 -94
  80. package/.proagents/database/examples/003-add-index.sql +0 -105
  81. package/.proagents/database/examples/004-rename-column.sql +0 -122
  82. package/.proagents/database/examples/005-add-foreign-key.sql +0 -142
  83. package/.proagents/database/examples/006-data-migration.sql +0 -196
  84. package/.proagents/database/examples/007-drop-column.sql +0 -163
  85. package/.proagents/database/examples/README.md +0 -89
  86. package/.proagents/database/migration-workflow.md +0 -478
  87. package/.proagents/database/rollback-scripts.md +0 -487
  88. package/.proagents/database/safety-checks.md +0 -447
  89. package/.proagents/git/README.md +0 -68
  90. package/.proagents/git/branch-strategy.md +0 -164
  91. package/.proagents/git/commit-conventions.md +0 -241
  92. package/.proagents/git/pr-workflow.md +0 -286
  93. package/.proagents/git/rollback-procedures.md +0 -416
  94. package/.proagents/ide-integration/README.md +0 -124
  95. package/.proagents/ide-integration/cline-config.md +0 -429
  96. package/.proagents/ide-integration/continue-config.md +0 -380
  97. package/.proagents/ide-integration/cursor-rules.md +0 -280
  98. package/.proagents/ide-integration/github-copilot.md +0 -384
  99. package/.proagents/ide-integration/windsurf-rules.md +0 -314
  100. package/.proagents/integrations/README.md +0 -97
  101. package/.proagents/integrations/pm/README.md +0 -344
  102. package/.proagents/learning/README.md +0 -136
  103. package/.proagents/learning/adaptation.md +0 -305
  104. package/.proagents/learning/data-collection.md +0 -283
  105. package/.proagents/learning/implementation-guide.md +0 -865
  106. package/.proagents/learning/reports.md +0 -306
  107. package/.proagents/mcp/README.md +0 -133
  108. package/.proagents/mcp/context-providers.md +0 -442
  109. package/.proagents/mcp/server-config.md +0 -306
  110. package/.proagents/mcp/tools-definition.md +0 -513
  111. package/.proagents/pm-integration/README.md +0 -151
  112. package/.proagents/pm-integration/asana.md +0 -346
  113. package/.proagents/pm-integration/github-issues.md +0 -308
  114. package/.proagents/pm-integration/gitlab-issues.md +0 -482
  115. package/.proagents/pm-integration/jira.md +0 -364
  116. package/.proagents/pm-integration/linear.md +0 -409
  117. package/.proagents/pm-integration/notion.md +0 -275
  118. package/.proagents/pm-integration/sync-config.md +0 -533
  119. package/.proagents/pm-integration/trello.md +0 -159
  120. package/.proagents/rules/README.md +0 -179
  121. package/.proagents/rules/custom-rules-template.yaml +0 -286
  122. package/.proagents/rules/custom-rules.md +0 -754
  123. package/.proagents/rules/validation-rules-template.yaml +0 -517
  124. package/.proagents/runbooks/README.md +0 -219
  125. package/.proagents/runbooks/dependency-vulnerability.md +0 -505
  126. package/.proagents/runbooks/incident-response.md +0 -451
  127. package/.proagents/runbooks/performance-degradation.md +0 -584
  128. package/.proagents/runbooks/production-debugging.md +0 -489
  129. package/.proagents/sprints/README.md +0 -58
  130. package/.proagents/team/README.md +0 -256
  131. package/.proagents/team/code-ownership.md +0 -306
  132. package/.proagents/team/communication-templates.md +0 -441
  133. package/.proagents/team/handoff-protocol.md +0 -380
  134. package/.proagents/team/ide-setup/README.md +0 -103
  135. package/.proagents/team/ide-setup/cursor.md +0 -276
  136. package/.proagents/team/ide-setup/jetbrains.md +0 -330
  137. package/.proagents/team/ide-setup/neovim.md +0 -640
  138. package/.proagents/team/ide-setup/vscode.md +0 -348
  139. package/.proagents/team/onboarding.md +0 -278
  140. package/.proagents/time-tracking.json +0 -19
  141. package/.proagents/troubleshooting/README.md +0 -730
  142. package/.proagents/troubleshooting/ai-issues.md +0 -601
  143. package/.proagents/troubleshooting/workflow-issues.md +0 -571
@@ -0,0 +1,112 @@
1
+ # pa:ai-remove - Remove AI Platform
2
+
3
+ Remove an AI platform configuration from this project.
4
+
5
+ ## Steps
6
+
7
+ ### 1. Show Installed Platforms
8
+
9
+ Read config and show what's installed:
10
+
11
+ ```bash
12
+ cat ./proagents.config.yaml
13
+ ```
14
+
15
+ Display:
16
+ ```
17
+ Installed AI Platforms:
18
+ 1. claude - Claude Code (CLAUDE.md)
19
+ 2. cursor - Cursor (.cursorrules)
20
+
21
+ Which platform to remove?
22
+ ```
23
+
24
+ ### 2. Locate the File
25
+
26
+ Get file path from `.proagents/platforms.yaml`:
27
+ - claude → `CLAUDE.md`
28
+ - cursor → `.cursorrules`
29
+ - copilot → `.github/copilot-instructions.md`
30
+ - etc.
31
+
32
+ ### 3. Remove ProAgents Content
33
+
34
+ **CRITICAL: Follow these rules carefully to avoid deleting user's config.**
35
+
36
+ #### Step 3a: Check for Markers
37
+
38
+ Look for these markers in the file:
39
+ ```
40
+ <!-- PROAGENTS_START -->
41
+ ...content...
42
+ <!-- PROAGENTS_END -->
43
+ ```
44
+
45
+ #### Step 3b: If Markers Found
46
+
47
+ 1. Remove ONLY the content between markers (including the markers)
48
+ 2. Keep ALL other content in the file
49
+ 3. Clean up extra blank lines
50
+ 4. If file is empty after removal → delete the file
51
+ 5. If file has remaining content → keep the file
52
+
53
+ **Example:**
54
+ ```
55
+ # My Custom Rules ← KEEP
56
+ Some user config ← KEEP
57
+
58
+ <!-- PROAGENTS_START --> ← REMOVE
59
+ ProAgents content... ← REMOVE
60
+ <!-- PROAGENTS_END --> ← REMOVE
61
+
62
+ # More user config ← KEEP
63
+ ```
64
+
65
+ #### Step 3c: If NO Markers Found
66
+
67
+ **DO NOT DELETE THE FILE.**
68
+
69
+ The file may contain user's own configuration that predates ProAgents or was manually edited.
70
+
71
+ Action:
72
+ 1. Warn user: "No ProAgents markers found in {file}"
73
+ 2. Suggest: "Manual cleanup may be needed"
74
+ 3. Skip file removal
75
+ 4. Still update config (step 4)
76
+
77
+ ### 4. Update Config
78
+
79
+ Remove platform from `ai_platforms` in `./proagents.config.yaml`:
80
+
81
+ ```yaml
82
+ ai_platforms:
83
+ - claude
84
+ # - cursor ← removed
85
+ ```
86
+
87
+ ### 5. Confirm
88
+
89
+ Success cases:
90
+ ```
91
+ Removed {platform}:
92
+ - Deleted: {file} (file only had ProAgents content)
93
+ OR
94
+ - Cleaned: {file} (kept your custom config)
95
+ ```
96
+
97
+ Skip case:
98
+ ```
99
+ Skipped {platform}:
100
+ - No ProAgents markers in {file}
101
+ - Manual cleanup may be needed
102
+ - Config updated anyway
103
+ ```
104
+
105
+ ## Safety Summary
106
+
107
+ | Scenario | Action |
108
+ |----------|--------|
109
+ | File has markers, only ProAgents content | Delete file |
110
+ | File has markers + user content | Remove markers section, keep rest |
111
+ | File has no markers | **SKIP - don't delete** |
112
+ | File doesn't exist | Skip silently |
@@ -0,0 +1,96 @@
1
+ # pa:ai-sync - Sync AI Platform Config
2
+
3
+ Synchronize the config file with actual AI instruction files (fix mismatches).
4
+
5
+ ## When to Use
6
+
7
+ - After manually adding/removing AI files
8
+ - When config is out of sync with files
9
+ - To detect and fix inconsistencies
10
+
11
+ ## Steps
12
+
13
+ ### 1. Read Current Config
14
+
15
+ ```bash
16
+ cat ./proagents.config.yaml
17
+ ```
18
+
19
+ Extract `ai_platforms` array.
20
+
21
+ ### 2. Read Platform Definitions
22
+
23
+ ```bash
24
+ cat .proagents/platforms.yaml
25
+ ```
26
+
27
+ ### 3. Scan for Existing Files
28
+
29
+ Check project root for each platform's file:
30
+
31
+ | Platform | File to Check |
32
+ |----------|---------------|
33
+ | claude | `CLAUDE.md` |
34
+ | cursor | `.cursorrules` |
35
+ | windsurf | `.windsurfrules` |
36
+ | copilot | `.github/copilot-instructions.md` |
37
+ | kiro | `KIRO.md` |
38
+ | gemini | `GEMINI.md` |
39
+ | replit | `REPLIT.md` |
40
+ | bolt | `BOLT.md` |
41
+ | lovable | `LOVABLE.md` |
42
+
43
+ ### 4. Compare and Report
44
+
45
+ ```
46
+ AI Platform Sync Status:
47
+
48
+ In Config + File Exists:
49
+ [x] claude - CLAUDE.md
50
+ [x] cursor - .cursorrules
51
+
52
+ In Config but File Missing:
53
+ [!] windsurf - .windsurfrules NOT FOUND
54
+
55
+ File Exists but Not in Config:
56
+ [?] gemini - GEMINI.md exists
57
+
58
+ Actions needed:
59
+ 1. Add windsurf file OR remove from config
60
+ 2. Add gemini to config OR delete file
61
+ ```
62
+
63
+ ### 5. Ask User for Action
64
+
65
+ For each mismatch:
66
+
67
+ **File missing:**
68
+ ```
69
+ windsurf is in config but file doesn't exist.
70
+ 1. Create the file (copy from .proagents/)
71
+ 2. Remove from config
72
+ ```
73
+
74
+ **File exists but not in config:**
75
+ ```
76
+ GEMINI.md exists but gemini not in config.
77
+ 1. Add to config
78
+ 2. Delete the file
79
+ ```
80
+
81
+ ### 6. Apply Fixes
82
+
83
+ Based on user choice:
84
+ - Create missing files (use `pa:ai-add` logic)
85
+ - Remove orphaned entries from config
86
+ - Add discovered platforms to config
87
+ - Delete orphaned files (use `pa:ai-remove` logic)
88
+
89
+ ### 7. Confirm
90
+
91
+ ```
92
+ Sync complete!
93
+ - Added: gemini to config
94
+ - Created: .windsurfrules
95
+ - Removed: kiro from config (file was missing)
96
+ ```
@@ -127,8 +127,7 @@ Streamlined workflow for fixing bugs quickly without skipping quality.
127
127
  │ Phase 1: Context Scan (2-5 min) │
128
128
  │ ├── Identify affected files from bug description │
129
129
  │ ├── Scan recent changes (git history) │
130
- ├── Check related components │
131
- │ └── Load cached analysis if available │
130
+ └── Check related components │
132
131
  │ │
133
132
  │ Phase 2: Root Cause Analysis │
134
133
  │ ├── Identify the bug source │
@@ -186,10 +185,6 @@ auto_context:
186
185
  components: true
187
186
  services: true
188
187
  tests: true
189
-
190
- load_cached:
191
- analysis: true
192
- patterns: true
193
188
  ```
194
189
 
195
190
  ### Guardrails
@@ -8,8 +8,50 @@ import yaml from 'js-yaml';
8
8
  const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = dirname(__filename);
10
10
 
11
+ // Load platforms from YAML (single source of truth)
12
+ // Priority: 1) User's project .proagents/platforms.yaml, 2) npm package's platforms.yaml
13
+ function loadPlatformsFromYaml() {
14
+ // First, try user's project directory
15
+ const userYamlPath = join(process.cwd(), '.proagents', 'platforms.yaml');
16
+ if (existsSync(userYamlPath)) {
17
+ try {
18
+ const content = readFileSync(userYamlPath, 'utf-8');
19
+ return yaml.load(content);
20
+ } catch (error) {
21
+ // Fall through to npm package
22
+ }
23
+ }
24
+
25
+ // Fallback to npm package's platforms.yaml
26
+ const packageYamlPath = join(__dirname, '..', '..', '.proagents', 'platforms.yaml');
27
+ if (existsSync(packageYamlPath)) {
28
+ try {
29
+ const content = readFileSync(packageYamlPath, 'utf-8');
30
+ return yaml.load(content);
31
+ } catch (error) {
32
+ console.warn('Warning: Could not load platforms.yaml, using defaults');
33
+ }
34
+ }
35
+
36
+ // Fallback to defaults if YAML doesn't exist
37
+ return null;
38
+ }
39
+
40
+ // Load from YAML or use defaults
41
+ const platformsConfig = loadPlatformsFromYaml();
42
+
11
43
  // AI Platform definitions grouped by type
12
- export const AI_PLATFORMS = {
44
+ export const AI_PLATFORMS = platformsConfig ? {
45
+ ide: {
46
+ label: platformsConfig.ide?.label || 'IDE-based AI Assistants',
47
+ platforms: platformsConfig.ide?.platforms || []
48
+ },
49
+ web: {
50
+ label: platformsConfig.web?.label || 'Web-based AI Platforms',
51
+ platforms: platformsConfig.web?.platforms || []
52
+ }
53
+ } : {
54
+ // Fallback defaults (only used if platforms.yaml is missing)
13
55
  ide: {
14
56
  label: 'IDE-based AI Assistants',
15
57
  platforms: [
@@ -18,34 +60,28 @@ export const AI_PLATFORMS = {
18
60
  { id: 'windsurf', name: 'Windsurf', file: '.windsurfrules', desc: 'Codeium Windsurf IDE' },
19
61
  { id: 'copilot', name: 'GitHub Copilot', file: '.github/copilot-instructions.md', desc: 'GitHub Copilot' },
20
62
  { id: 'kiro', name: 'AWS Kiro', file: 'KIRO.md', desc: 'AWS Kiro IDE' },
21
- { id: 'antigravity', name: 'Antigravity', file: 'ANTIGRAVITY.md', desc: 'Antigravity IDE (Gemini/Claude)' },
63
+ { id: 'gemini', name: 'Gemini', file: 'GEMINI.md', desc: 'Google Gemini / AI Studio' },
22
64
  ]
23
65
  },
24
66
  web: {
25
67
  label: 'Web-based AI Platforms',
26
68
  platforms: [
27
- { id: 'chatgpt', name: 'ChatGPT', file: 'CHATGPT.md', desc: 'OpenAI ChatGPT' },
28
- { id: 'gemini', name: 'Gemini', file: 'GEMINI.md', desc: 'Google Gemini' },
29
69
  { id: 'replit', name: 'Replit AI', file: 'REPLIT.md', desc: 'Replit Ghostwriter' },
30
70
  { id: 'bolt', name: 'Bolt.new', file: 'BOLT.md', desc: 'StackBlitz Bolt' },
31
71
  { id: 'lovable', name: 'Lovable', file: 'LOVABLE.md', desc: 'Lovable (GPT Engineer)' },
32
- { id: 'groq', name: 'Groq', file: 'GROQ.md', desc: 'Groq fast inference' },
33
- ]
34
- },
35
- cli: {
36
- label: 'CLI-based AI Agents',
37
- platforms: [
38
- { id: 'codex', name: 'Codex CLI', file: 'AGENTS.md', desc: 'OpenAI Codex CLI' },
39
72
  ]
40
73
  }
41
74
  };
42
75
 
76
+ // Auto-handled platforms (use AGENTS.md, no separate file needed)
77
+ export const AUTO_HANDLED_PLATFORMS = platformsConfig?.auto_handled ||
78
+ ['ChatGPT', 'Groq', 'Antigravity', 'Codex CLI', 'OpenAI API'];
79
+
43
80
  // Get all platforms as flat array
44
81
  export function getAllPlatforms() {
45
82
  return [
46
83
  ...AI_PLATFORMS.ide.platforms,
47
84
  ...AI_PLATFORMS.web.platforms,
48
- ...AI_PLATFORMS.cli.platforms,
49
85
  ];
50
86
  }
51
87
 
@@ -115,7 +151,12 @@ export async function selectPlatforms(previouslySelected = []) {
115
151
  const preselected = [...new Set([...autoSelected, ...(previouslySelected || [])])];
116
152
 
117
153
  console.log('\n' + chalk.bold('Which AI platform(s) do you use?'));
118
- console.log(chalk.gray('(Enter numbers separated by commas, or "all" for all platforms)\n'));
154
+ console.log(chalk.gray('(Enter numbers separated by commas, or "all" for all platforms)'));
155
+
156
+ // Show auto-handled platforms info
157
+ console.log(chalk.cyan.bold('\n Auto-handled (via AGENTS.md):'));
158
+ console.log(chalk.gray(' ' + AUTO_HANDLED_PLATFORMS.join(', ')));
159
+ console.log(chalk.gray(' → These work automatically, no installation needed\n'));
119
160
 
120
161
  let index = 1;
121
162
  const indexMap = {};
@@ -155,20 +196,6 @@ export async function selectPlatforms(previouslySelected = []) {
155
196
 
156
197
  console.log('');
157
198
 
158
- // CLI-based platforms
159
- console.log(chalk.cyan.bold(` ${AI_PLATFORMS.cli.label}:`));
160
- for (const platform of AI_PLATFORMS.cli.platforms) {
161
- const wasPreviouslySelected = previouslySelected && previouslySelected.includes(platform.id);
162
- const isPreselected = preselected.includes(platform.id);
163
- const marker = wasPreviouslySelected ? chalk.green(' ✓ (previously selected)') : '';
164
- console.log(chalk.white(` ${index}. ${platform.name}`) + chalk.gray(` - ${platform.desc}`) + marker);
165
- indexMap[index] = platform.id;
166
- if (isPreselected) preSelectedIndices.push(index);
167
- index++;
168
- }
169
-
170
- console.log('');
171
-
172
199
  // Show default based on preselected (auto-detected + previously selected)
173
200
  const defaultHint = preSelectedIndices.length > 0
174
201
  ? `Enter for selected: ${preSelectedIndices.join(',')}`
@@ -253,12 +280,9 @@ function removeProagentsSectionFromFile(filePath) {
253
280
  return 'cleaned';
254
281
  }
255
282
  } else {
256
- // No ProAgents markers - file was created by ProAgents (not merged)
257
- // Check if it's a ProAgents-generated file by looking for ProAgents reference
258
- if (content.includes('proagents') || content.includes('ProAgents') || content.includes('.proagents/')) {
259
- rmSync(filePath, { force: true });
260
- return 'deleted';
261
- }
283
+ // No ProAgents markers found - we cannot safely determine what to remove
284
+ // Don't delete the file as it may contain user's own configuration
285
+ // User should manually clean up files without proper markers
262
286
  return 'skipped';
263
287
  }
264
288
  } catch (error) {
@@ -346,6 +370,24 @@ export function copyPlatformFiles(selectedIds, sourceDir, targetDir) {
346
370
  return results;
347
371
  }
348
372
 
373
+ /**
374
+ * Copy universal AGENTS.md file (always present, not a selectable platform)
375
+ * @param {string} sourceDir - Source directory (.proagents folder in npm package)
376
+ * @param {string} targetDir - Target directory (project root)
377
+ * @returns {string} - 'created', 'updated', or 'skipped'
378
+ */
379
+ export function copyUniversalAIFile(sourceDir, targetDir) {
380
+ const sourcePath = join(sourceDir, 'AGENTS.md');
381
+ const targetPath = join(targetDir, 'AGENTS.md');
382
+
383
+ if (!existsSync(sourcePath)) {
384
+ return 'skipped';
385
+ }
386
+
387
+ const result = mergeAIInstructions(sourcePath, targetPath);
388
+ return result;
389
+ }
390
+
349
391
  /**
350
392
  * Save selected platforms to config
351
393
  */
@@ -431,6 +473,20 @@ export function getInstalledPlatforms(targetDir, configPath) {
431
473
  * Show available platforms that can be added
432
474
  */
433
475
  export function showAvailablePlatforms(currentIds) {
476
+ // Show auto-handled platforms info
477
+ console.log(chalk.cyan.bold('\n Auto-handled (via AGENTS.md):'));
478
+ console.log(chalk.gray(' ' + AUTO_HANDLED_PLATFORMS.join(', ')));
479
+ console.log(chalk.gray(' → These work automatically, no installation needed'));
480
+ console.log(chalk.yellow(' ⚠️ Do not remove AGENTS.md - required for these platforms'));
481
+
482
+ // Show user's installed platforms
483
+ const installedNames = currentIds
484
+ .map(id => getPlatformById(id)?.name)
485
+ .filter(Boolean);
486
+ if (installedNames.length > 0) {
487
+ console.log(chalk.green('\n Your platforms: ') + chalk.white(installedNames.join(', ')));
488
+ }
489
+
434
490
  console.log('\n' + chalk.bold('Available AI Platforms:\n'));
435
491
 
436
492
  let index = 1;
@@ -464,21 +520,6 @@ export function showAvailablePlatforms(currentIds) {
464
520
  index++;
465
521
  }
466
522
 
467
- console.log('');
468
-
469
- // CLI-based platforms
470
- console.log(chalk.cyan.bold(` ${AI_PLATFORMS.cli.label}:`));
471
- for (const platform of AI_PLATFORMS.cli.platforms) {
472
- const status = currentIds.includes(platform.id)
473
- ? chalk.green(' ✓ (installed)')
474
- : chalk.gray(' (not installed)');
475
- console.log(chalk.white(` ${index}. ${platform.name}`) + status);
476
- if (!currentIds.includes(platform.id)) {
477
- available.push({ index, platform });
478
- }
479
- index++;
480
- }
481
-
482
523
  return available;
483
524
  }
484
525
 
@@ -540,6 +581,12 @@ export async function aiAddCommand() {
540
581
  // Copy files for new platforms
541
582
  const results = copyPlatformFiles(toAdd, sourceDir, targetDir);
542
583
 
584
+ // Ensure universal AGENTS.md exists (auto-handled platforms)
585
+ const agentsResult = copyUniversalAIFile(sourceDir, targetDir);
586
+ if (agentsResult === 'created') {
587
+ results.created.push('AGENTS.md (auto-handled)');
588
+ }
589
+
543
590
  // Update config
544
591
  const newIds = [...currentIds, ...toAdd];
545
592
  savePlatformConfig(newIds, configPath);
@@ -658,6 +705,8 @@ export async function aiRemoveCommand() {
658
705
  results.deleted.push(platform.name);
659
706
  } else if (result === 'cleaned') {
660
707
  results.cleaned.push(platform.name);
708
+ } else if (result === 'skipped') {
709
+ results.skipped.push(platform.name);
661
710
  }
662
711
  }
663
712
  }
@@ -670,6 +719,9 @@ export async function aiRemoveCommand() {
670
719
  if (results.cleaned.length > 0) {
671
720
  console.log(chalk.green(`✓ Cleaned ProAgents section from: ${results.cleaned.join(', ')} (kept your custom config)`));
672
721
  }
722
+ if (results.skipped.length > 0) {
723
+ console.log(chalk.yellow(`⚠ Skipped: ${results.skipped.join(', ')} (no ProAgents markers found - manual cleanup may be needed)`));
724
+ }
673
725
 
674
726
  console.log(chalk.gray('\nConfig updated in proagents.config.yaml\n'));
675
727
  }
@@ -4,7 +4,7 @@ import { fileURLToPath } from 'url';
4
4
  import { createInterface } from 'readline';
5
5
  import chalk from 'chalk';
6
6
  import yaml from 'js-yaml';
7
- import { selectPlatforms, copyPlatformFiles, savePlatformConfig, loadPlatformConfig } from './ai.js';
7
+ import { selectPlatforms, copyPlatformFiles, copyUniversalAIFile, savePlatformConfig, loadPlatformConfig } from './ai.js';
8
8
 
9
9
  const __filename = fileURLToPath(import.meta.url);
10
10
  const __dirname = dirname(__filename);
@@ -13,7 +13,6 @@ const __dirname = dirname(__filename);
13
13
  const PRESERVE_PATHS = [
14
14
  'active-features', // User's work in progress
15
15
  '.learning', // Learned patterns
16
- 'cache', // Cached analysis
17
16
  'changelog', // Change history (user data)
18
17
  'worklog', // Work context (user data)
19
18
  'sessions', // Session data
@@ -148,10 +147,9 @@ const CONFIG_FILE = 'proagents.config.yaml';
148
147
  const FRAMEWORK_FOLDERS = [
149
148
  'prompts',
150
149
  'templates',
151
- 'checklists',
152
150
  'standards',
153
151
  'examples',
154
- 'git',
152
+ 'docs',
155
153
  'ui-integration',
156
154
  'workflow-modes',
157
155
  'security',
@@ -161,25 +159,32 @@ const FRAMEWORK_FOLDERS = [
161
159
  'scaffolding',
162
160
  'cli',
163
161
  'adr',
162
+ 'config',
163
+ 'existing-projects',
164
+ 'getting-started',
165
+ ];
166
+
167
+ // Deprecated folders to remove during update (no longer part of framework)
168
+ const DEPRECATED_FOLDERS = [
164
169
  'ai-models',
165
170
  'ai-training',
166
171
  'api-versioning',
167
172
  'approval-workflows',
168
173
  'automation',
174
+ 'cache',
175
+ 'checklists',
169
176
  'cicd',
170
177
  'collaboration',
171
178
  'compliance',
172
179
  'config-versioning',
173
- 'config',
174
180
  'contract-testing',
175
181
  'cost',
176
182
  'database',
177
183
  'dependency-management',
178
184
  'disaster-recovery',
179
185
  'environments',
180
- 'existing-projects',
181
186
  'feature-flags',
182
- 'getting-started',
187
+ 'git',
183
188
  'i18n',
184
189
  'ide-integration',
185
190
  'integrations',
@@ -200,11 +205,19 @@ const FRAMEWORK_FOLDERS = [
200
205
  'rules',
201
206
  'runbooks',
202
207
  'secrets',
208
+ 'sprints',
203
209
  'team',
204
210
  'troubleshooting',
205
211
  'webhooks',
206
212
  ];
207
213
 
214
+ // Deprecated files to remove during update
215
+ const DEPRECATED_FILES = [
216
+ 'checkpoints.json',
217
+ 'history.log',
218
+ 'time-tracking.json',
219
+ ];
220
+
208
221
  // Root files to always update (AI files handled separately via platform selection)
209
222
  const FRAMEWORK_FILES = [
210
223
  'README.md',
@@ -213,9 +226,22 @@ const FRAMEWORK_FILES = [
213
226
  'GETTING-STARTED-STORY.md',
214
227
  'slash-commands.json',
215
228
  'AI_INSTRUCTIONS.md', // Universal instructions kept for reference
216
- 'AGENTS.md', // Universal AI instruction file (works with most AI platforms)
229
+ 'platforms.yaml', // Single source of truth for AI platforms
230
+ // Platform instruction files (updated during init)
231
+ 'AGENTS.md',
232
+ 'CLAUDE.md',
233
+ '.cursorrules',
234
+ '.windsurfrules',
235
+ 'GEMINI.md',
236
+ 'BOLT.md',
237
+ 'REPLIT.md',
238
+ 'LOVABLE.md',
239
+ 'KIRO.md',
217
240
  ];
218
241
 
242
+ // Universal AI file - always copied to project root (not selectable)
243
+ const UNIVERSAL_AI_FILE = 'AGENTS.md';
244
+
219
245
  // Project type definitions for detection
220
246
  const PROJECT_TYPES = [
221
247
  {
@@ -1016,7 +1042,8 @@ export async function initCommand(options = {}) {
1016
1042
  console.log(chalk.gray(' • active-features/ (your work in progress)'));
1017
1043
  console.log(chalk.gray(' • proagents.config.yaml (your values + new options merged)'));
1018
1044
  console.log(chalk.gray(' • .learning/ (learned patterns)'));
1019
- console.log(chalk.gray(' • cache/ (analysis cache)\n'));
1045
+ console.log(chalk.gray(' • changelog/ (change history)'));
1046
+ console.log(chalk.gray(' • worklog/ (work context)\n'));
1020
1047
  return;
1021
1048
  } catch (error) {
1022
1049
  console.error(chalk.red('\n✗ Error updating ProAgents:'));
@@ -1111,7 +1138,6 @@ Generated by [ProAgents](https://github.com/prakashpro3/proAgents)
1111
1138
  // Default: Ignore only local data
1112
1139
  gitignoreEntries = [
1113
1140
  '# ProAgents - Local data only (workflow config shared with team)',
1114
- '.proagents/cache/',
1115
1141
  '.proagents/.learning/',
1116
1142
  '.proagents/sessions/',
1117
1143
  '.proagents/active-features/',
@@ -1243,6 +1269,14 @@ For detailed commands, see \`./.proagents/PROAGENTS.md\`
1243
1269
  // Copy AI instruction files for selected platforms (merges with existing files)
1244
1270
  const aiResults = copyPlatformFiles(selectedPlatforms, sourceDir, targetDir);
1245
1271
 
1272
+ // Always copy universal AGENTS.md
1273
+ const agentsResult = copyUniversalAIFile(sourceDir, targetDir);
1274
+ if (agentsResult === 'created') {
1275
+ aiResults.created.push('AGENTS.md');
1276
+ } else if (agentsResult === 'updated') {
1277
+ aiResults.updated.push('AGENTS.md');
1278
+ }
1279
+
1246
1280
  if (aiResults.created.length > 0) {
1247
1281
  console.log(chalk.green(`✓ Created AI files: ${aiResults.created.join(', ')}`));
1248
1282
  }
@@ -1329,6 +1363,32 @@ async function smartUpdate(sourceDir, targetDir) {
1329
1363
  }
1330
1364
  console.log(chalk.green(`✓ Updated ${updatedCount} framework folders`));
1331
1365
 
1366
+ // Remove deprecated folders
1367
+ let removedFolders = 0;
1368
+ for (const folder of DEPRECATED_FOLDERS) {
1369
+ const folderPath = join(targetDir, folder);
1370
+ if (existsSync(folderPath)) {
1371
+ rmSync(folderPath, { recursive: true, force: true });
1372
+ removedFolders++;
1373
+ }
1374
+ }
1375
+ if (removedFolders > 0) {
1376
+ console.log(chalk.green(`✓ Removed ${removedFolders} deprecated folders`));
1377
+ }
1378
+
1379
+ // Remove deprecated files
1380
+ let removedFiles = 0;
1381
+ for (const file of DEPRECATED_FILES) {
1382
+ const filePath = join(targetDir, file);
1383
+ if (existsSync(filePath)) {
1384
+ rmSync(filePath, { force: true });
1385
+ removedFiles++;
1386
+ }
1387
+ }
1388
+ if (removedFiles > 0) {
1389
+ console.log(chalk.green(`✓ Removed ${removedFiles} deprecated files`));
1390
+ }
1391
+
1332
1392
  // Restore user files that were migrated (they were saved before folder deletion)
1333
1393
  restoreUserFiles(targetDir, migrationResult);
1334
1394
 
@@ -1376,21 +1436,28 @@ async function smartUpdate(sourceDir, targetDir) {
1376
1436
 
1377
1437
  // Copy AI instruction files for configured platforms (merges with existing files)
1378
1438
  const projectRoot = join(targetDir, '..');
1379
- const configPath = join(targetDir, 'proagents.config.yaml');
1439
+ const configPath = join(projectRoot, 'proagents.config.yaml');
1380
1440
  const selectedPlatforms = loadPlatformConfig(configPath);
1381
1441
 
1382
- if (selectedPlatforms.length > 0) {
1383
- const aiResults = copyPlatformFiles(selectedPlatforms, sourceDir, projectRoot);
1442
+ // Copy AI instruction files for configured platforms
1443
+ const aiResults = copyPlatformFiles(selectedPlatforms, sourceDir, projectRoot);
1384
1444
 
1385
- if (aiResults.created.length > 0) {
1386
- console.log(chalk.green(`✓ Created new AI files: ${aiResults.created.join(', ')}`));
1387
- }
1388
- if (aiResults.updated.length > 0) {
1389
- console.log(chalk.green(`✓ Updated AI files: ${aiResults.updated.join(', ')}`));
1390
- }
1391
- if (aiResults.merged.length > 0) {
1392
- console.log(chalk.green(`✓ Merged with existing: ${aiResults.merged.join(', ')}`));
1393
- }
1445
+ // Always copy universal AGENTS.md
1446
+ const agentsResult = copyUniversalAIFile(sourceDir, projectRoot);
1447
+ if (agentsResult === 'created') {
1448
+ aiResults.created.push('AGENTS.md');
1449
+ } else if (agentsResult === 'updated') {
1450
+ aiResults.updated.push('AGENTS.md');
1451
+ }
1452
+
1453
+ if (aiResults.created.length > 0) {
1454
+ console.log(chalk.green(`✓ Created new AI files: ${aiResults.created.join(', ')}`));
1455
+ }
1456
+ if (aiResults.updated.length > 0) {
1457
+ console.log(chalk.green(`✓ Updated AI files: ${aiResults.updated.join(', ')}`));
1458
+ }
1459
+ if (aiResults.merged.length > 0) {
1460
+ console.log(chalk.green(`✓ Merged with existing: ${aiResults.merged.join(', ')}`));
1394
1461
  }
1395
1462
 
1396
1463
  // Update framework files within preserved paths (templates, README, schemas)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proagents",
3
- "version": "1.6.19",
3
+ "version": "1.6.21",
4
4
  "description": "AI-agnostic development workflow framework that automates the full software development lifecycle",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",