proagents 1.6.12 → 1.6.15
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/.proagents/.cursorrules +16 -2
- package/.proagents/.learning/global/common-patterns.template.json +60 -0
- package/.proagents/.learning/global/user-preferences.template.json +78 -0
- package/.proagents/.windsurfrules +16 -2
- package/.proagents/AGENTS.md +55 -0
- package/.proagents/AI_INSTRUCTIONS.md +1252 -53
- package/.proagents/ANTIGRAVITY.md +16 -2
- package/.proagents/BOLT.md +16 -2
- package/.proagents/CHATGPT.md +16 -2
- package/.proagents/CLAUDE.md +16 -2
- package/.proagents/GEMINI.md +16 -2
- package/.proagents/GROQ.md +16 -2
- package/.proagents/KIRO.md +16 -2
- package/.proagents/LOVABLE.md +16 -2
- package/.proagents/PROAGENTS.md +52 -26
- package/.proagents/REPLIT.md +16 -2
- package/.proagents/active-features/_index.template.json +75 -0
- package/.proagents/changelog/_recent.template.md +51 -0
- package/.proagents/docs/command-details.md +985 -82
- package/.proagents/worklog/_context.md +31 -1
- package/.proagents/worklog/_context.template.md +82 -0
- package/.proagents/worklog/ai-stats.json +19 -0
- package/.proagents/worklog/ai-stats.template.json +54 -0
- package/README.md +85 -1
- package/bin/proagents.js +132 -1
- package/lib/commands/ai.js +103 -11
- package/lib/commands/changelog.js +389 -0
- package/lib/commands/completion.js +413 -0
- package/lib/commands/config.js +248 -0
- package/lib/commands/doctor.js +222 -25
- package/lib/commands/help.js +22 -2
- package/lib/commands/init.js +171 -2
- package/lib/commands/open.js +188 -0
- package/lib/commands/release.js +1007 -0
- package/lib/commands/restore.js +150 -0
- package/lib/commands/stats.js +320 -0
- package/lib/commands/uninstall.js +98 -4
- package/lib/commands/upgrade.js +102 -10
- package/lib/commands/version.js +140 -0
- package/package.json +1 -1
|
@@ -8,6 +8,36 @@ Last AI: [None]
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## Quick Summary
|
|
12
|
+
<!-- AI auto-generates this section - always keep under 5 lines -->
|
|
13
|
+
```
|
|
14
|
+
Last: [None yet]
|
|
15
|
+
Active: No active features
|
|
16
|
+
Pending: 0 tasks
|
|
17
|
+
Tests: Unknown
|
|
18
|
+
Status: Ready for work
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Test Status
|
|
24
|
+
<!-- AI updates after running tests -->
|
|
25
|
+
```
|
|
26
|
+
Status: Unknown
|
|
27
|
+
Last Run: Never
|
|
28
|
+
Failing: None
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Feature Progress
|
|
34
|
+
<!-- AI auto-calculates from completed vs pending tasks -->
|
|
35
|
+
```
|
|
36
|
+
No active features
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
11
41
|
## Active Work
|
|
12
42
|
|
|
13
43
|
No active features yet. Start with `pa:feature "name"` or `pa:fix "issue"`.
|
|
@@ -38,6 +68,6 @@ None.
|
|
|
38
68
|
|
|
39
69
|
## How to Use
|
|
40
70
|
|
|
41
|
-
1. **Starting work:**
|
|
71
|
+
1. **Starting work:** Context loads automatically on first pa: command
|
|
42
72
|
2. **After code changes:** AI auto-updates this file
|
|
43
73
|
3. **Check history:** See `./worklog/` for detailed session logs
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Current Project Context - Template Reference
|
|
2
|
+
|
|
3
|
+
> This is the FORMAT REFERENCE for `_context.md`.
|
|
4
|
+
> AI should read this template when creating/updating `_context.md`.
|
|
5
|
+
> DO NOT modify this file - it gets updated with ProAgents upgrades.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Expected Structure
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# Current Project Context
|
|
13
|
+
|
|
14
|
+
> **For AI Assistants:** Read this file first to understand current state.
|
|
15
|
+
> **Auto-updated** after each code change.
|
|
16
|
+
|
|
17
|
+
Last Updated: [ISO timestamp]
|
|
18
|
+
Last AI: [Platform (model)]
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Quick Summary
|
|
23
|
+
<!-- AI auto-generates - keep under 5 lines -->
|
|
24
|
+
```
|
|
25
|
+
Last: [Last action]
|
|
26
|
+
Active: [Feature name or "No active features"]
|
|
27
|
+
Pending: [N] tasks
|
|
28
|
+
Tests: [Passing/Failing/Unknown]
|
|
29
|
+
Status: [Current status]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Test Status
|
|
35
|
+
<!-- AI updates after running tests -->
|
|
36
|
+
```
|
|
37
|
+
Status: [Passing/Failing/Unknown]
|
|
38
|
+
Last Run: [Timestamp]
|
|
39
|
+
Failing: [Test names or "None"]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Feature Progress
|
|
45
|
+
<!-- AI auto-calculates -->
|
|
46
|
+
```
|
|
47
|
+
[Feature name]: [X]% ([done]/[total] tasks)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Active Work
|
|
53
|
+
[Current active features or tasks]
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Recent Changes
|
|
58
|
+
[Last 3-5 changes]
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Pending Items
|
|
63
|
+
[Outstanding tasks]
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Quick Stats
|
|
68
|
+
| Metric | Value |
|
|
69
|
+
|--------|-------|
|
|
70
|
+
| Active Features | [N] |
|
|
71
|
+
| Completed Today | [N] |
|
|
72
|
+
| Open Issues | [N] |
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Auto-Update Rules
|
|
76
|
+
|
|
77
|
+
1. **Update `Last Updated`** with current timestamp
|
|
78
|
+
2. **Update `Last AI`** with current platform
|
|
79
|
+
3. **Keep Quick Summary under 5 lines**
|
|
80
|
+
4. **Update Test Status after test runs**
|
|
81
|
+
5. **Update Recent Changes with last 3-5 items**
|
|
82
|
+
6. **Calculate Feature Progress from active-features/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ai_platforms": {},
|
|
3
|
+
"totals": {
|
|
4
|
+
"total_sessions": 0,
|
|
5
|
+
"total_tasks": 0,
|
|
6
|
+
"total_files_modified": 0,
|
|
7
|
+
"total_reverts": 0
|
|
8
|
+
},
|
|
9
|
+
"_format": {
|
|
10
|
+
"platform_entry": {
|
|
11
|
+
"sessions": 0,
|
|
12
|
+
"tasks_completed": 0,
|
|
13
|
+
"files_modified": 0,
|
|
14
|
+
"reverts": 0,
|
|
15
|
+
"avg_session_minutes": 0,
|
|
16
|
+
"last_session": null
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_template_info": {
|
|
3
|
+
"description": "Template reference for ai-stats.json schema",
|
|
4
|
+
"note": "DO NOT modify this file - it gets updated with ProAgents upgrades",
|
|
5
|
+
"usage": "AI reads this to understand expected schema for ai-stats.json"
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
"ai_platforms": {
|
|
9
|
+
"claude": {
|
|
10
|
+
"sessions": 0,
|
|
11
|
+
"tasks_completed": 0,
|
|
12
|
+
"files_modified": 0,
|
|
13
|
+
"reverts": 0,
|
|
14
|
+
"avg_session_minutes": 0,
|
|
15
|
+
"last_session": "2024-03-13T10:30:00Z"
|
|
16
|
+
},
|
|
17
|
+
"chatgpt": {
|
|
18
|
+
"sessions": 0,
|
|
19
|
+
"tasks_completed": 0,
|
|
20
|
+
"files_modified": 0,
|
|
21
|
+
"reverts": 0,
|
|
22
|
+
"avg_session_minutes": 0,
|
|
23
|
+
"last_session": null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
"totals": {
|
|
28
|
+
"total_sessions": 0,
|
|
29
|
+
"total_tasks": 0,
|
|
30
|
+
"total_files_modified": 0,
|
|
31
|
+
"total_reverts": 0
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"_schema": {
|
|
35
|
+
"ai_platforms": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Stats per AI platform",
|
|
38
|
+
"properties": {
|
|
39
|
+
"[platform_id]": {
|
|
40
|
+
"sessions": "number - Total sessions by this AI",
|
|
41
|
+
"tasks_completed": "number - Tasks completed",
|
|
42
|
+
"files_modified": "number - Files modified",
|
|
43
|
+
"reverts": "number - Changes reverted by user",
|
|
44
|
+
"avg_session_minutes": "number - Average session duration",
|
|
45
|
+
"last_session": "string|null - ISO timestamp of last session"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"totals": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"description": "Aggregated totals across all AIs"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/README.md
CHANGED
|
@@ -86,6 +86,13 @@ Multiple AIs can work on the same project with full context sharing:
|
|
|
86
86
|
| **Module Changelogs** | Per-module change history |
|
|
87
87
|
| **Conflict Detection** | Warns if files modified by other AI |
|
|
88
88
|
| **Activity Log** | Track what each AI does with model name |
|
|
89
|
+
| **Smart Context Summary** | Auto-generated 5-line summary at top of context |
|
|
90
|
+
| **Context Changed Alert** | Warns if another AI worked since your last session |
|
|
91
|
+
| **Test Status Tracking** | Auto-updates test status after every test run |
|
|
92
|
+
| **Feature Progress** | Auto-calculates progress from tasks |
|
|
93
|
+
| **AI Performance Stats** | Tracks sessions, tasks, reverts per AI platform |
|
|
94
|
+
| **Quick Undo (pa:undo-last)** | Revert last AI's entire session changes |
|
|
95
|
+
| **Auto-Archive Old Logs** | Automatically archives logs older than 7 days |
|
|
89
96
|
|
|
90
97
|
```bash
|
|
91
98
|
# Just start working - context loads automatically!
|
|
@@ -94,6 +101,9 @@ pa:fix "bug in auth" # AI auto-loads context, then fixes
|
|
|
94
101
|
|
|
95
102
|
# No manual pa:sync needed - it's automatic
|
|
96
103
|
# No manual pa:session-end needed - changes logged automatically
|
|
104
|
+
|
|
105
|
+
# Undo another AI's work if needed
|
|
106
|
+
pa:undo-last # Revert last AI's entire session
|
|
97
107
|
```
|
|
98
108
|
|
|
99
109
|
### Project Templates
|
|
@@ -157,8 +167,30 @@ proagents fix "bug description" # Quick bug fix mode
|
|
|
157
167
|
|
|
158
168
|
# Maintenance
|
|
159
169
|
proagents doctor # Health check installation
|
|
160
|
-
proagents
|
|
170
|
+
proagents doctor --full # Extended checks (branches, logs, features)
|
|
161
171
|
proagents status # Show ProAgents status
|
|
172
|
+
proagents version # Show detailed version info
|
|
173
|
+
|
|
174
|
+
# Release Notes
|
|
175
|
+
proagents release # Interactive release note generator
|
|
176
|
+
proagents release -t detailed # Full comprehensive notes
|
|
177
|
+
proagents release -t short # Quick summary
|
|
178
|
+
proagents release -t client # Business-focused, non-technical
|
|
179
|
+
proagents release -t developer # Technical details for devs
|
|
180
|
+
proagents release -t hotfix # Urgent patch notes
|
|
181
|
+
proagents release -t prerelease # Beta/RC notes
|
|
182
|
+
proagents release --include fixes # Only include bug fixes
|
|
183
|
+
proagents release --include features # Only include features
|
|
184
|
+
proagents release --append -o FILE # Append to existing notes
|
|
185
|
+
proagents release --bump # Suggest version bump
|
|
186
|
+
proagents release --module auth # Filter by module name
|
|
187
|
+
proagents release --changelog # Update CHANGELOG.md
|
|
188
|
+
proagents release --tag # Create git tag
|
|
189
|
+
proagents release --json # JSON output for CI/CD
|
|
190
|
+
|
|
191
|
+
# Updating ProAgents
|
|
192
|
+
npx proagents init # Smart update (recommended)
|
|
193
|
+
proagents upgrade # Full replace (use with caution)
|
|
162
194
|
|
|
163
195
|
# AI Platforms
|
|
164
196
|
proagents ai list # List installed AI platforms
|
|
@@ -168,6 +200,34 @@ proagents ai remove # Remove platforms
|
|
|
168
200
|
# Configuration
|
|
169
201
|
proagents config show # Show current config
|
|
170
202
|
proagents config setup # Interactive config wizard
|
|
203
|
+
proagents config export # Export config for sharing
|
|
204
|
+
proagents config import <file> # Import config from file
|
|
205
|
+
|
|
206
|
+
# Statistics & Monitoring
|
|
207
|
+
proagents stats # Show project & AI usage stats
|
|
208
|
+
proagents stats --json # JSON output for scripting
|
|
209
|
+
|
|
210
|
+
# Changelog Management
|
|
211
|
+
proagents changelog view # View recent changelog entries
|
|
212
|
+
proagents changelog add "entry" # Add new changelog entry
|
|
213
|
+
proagents changelog list # List available changelogs
|
|
214
|
+
proagents changelog export # Export to CHANGELOG.md
|
|
215
|
+
proagents changelog git # View git history as changelog
|
|
216
|
+
|
|
217
|
+
# Backup & Restore
|
|
218
|
+
proagents restore <backup.json> # Restore from uninstall backup
|
|
219
|
+
|
|
220
|
+
# Shell Completions
|
|
221
|
+
proagents completion bash # Generate bash completions
|
|
222
|
+
proagents completion zsh # Generate zsh completions
|
|
223
|
+
proagents completion fish # Generate fish completions
|
|
224
|
+
|
|
225
|
+
# Quick File Access
|
|
226
|
+
proagents open # Show available shortcuts
|
|
227
|
+
proagents open config # Open proagents.config.yaml
|
|
228
|
+
proagents open changelog # Open recent changelog
|
|
229
|
+
proagents open activity # Open activity log
|
|
230
|
+
proagents open context # Open worklog context
|
|
171
231
|
|
|
172
232
|
# Other
|
|
173
233
|
proagents docs # Open documentation
|
|
@@ -175,6 +235,27 @@ proagents commands # Show all commands
|
|
|
175
235
|
proagents uninstall # Remove ProAgents
|
|
176
236
|
```
|
|
177
237
|
|
|
238
|
+
### Updating ProAgents
|
|
239
|
+
|
|
240
|
+
| Command | What It Does | When to Use |
|
|
241
|
+
|---------|--------------|-------------|
|
|
242
|
+
| `npx proagents init` | **Smart update** - Updates 60 framework folders, merges config, preserves your work | **Recommended** for regular updates |
|
|
243
|
+
| `proagents upgrade` | **Full replace** - Removes everything, installs fresh, restores backups | Only when you need a complete reset |
|
|
244
|
+
|
|
245
|
+
**What's preserved with `init` (smart update):**
|
|
246
|
+
- `active-features/` - Your work in progress
|
|
247
|
+
- `changelog/` - Your change history (_recent.md, modules/, features/)
|
|
248
|
+
- `worklog/` - Your work context (_context.md, ai-stats.json)
|
|
249
|
+
- `.learning/` - Learned patterns
|
|
250
|
+
- `cache/` - Analysis cache
|
|
251
|
+
- `proagents.config.yaml` - Your values kept, new options merged
|
|
252
|
+
|
|
253
|
+
**What's preserved with `upgrade` (full replace):**
|
|
254
|
+
- `proagents.config.yaml`, `activity.log`, `handoff.md`, `.lock`
|
|
255
|
+
- `active-features/` - All files
|
|
256
|
+
- `changelog/` - _recent.md, modules/, features/, yearly folders
|
|
257
|
+
- `worklog/` - _context.md, ai-stats.json
|
|
258
|
+
|
|
178
259
|
---
|
|
179
260
|
|
|
180
261
|
## AI Commands (pa:)
|
|
@@ -240,6 +321,8 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
|
|
|
240
321
|
| `pa:session-start` | Begin new work session |
|
|
241
322
|
| `pa:session-end` | Finalize session, update logs |
|
|
242
323
|
| `pa:conflict-check` | Check if files modified by other AI |
|
|
324
|
+
| `pa:undo-last` | Undo last AI's entire session (revert all changes) |
|
|
325
|
+
| `pa:undo-file "path"` | Undo changes to specific file |
|
|
243
326
|
| `pa:changelog` | Update all changelogs |
|
|
244
327
|
| `pa:changelog --from-git` | Auto-populate from git commits |
|
|
245
328
|
| `pa:changelog-feature X` | View feature changelog |
|
|
@@ -529,6 +612,7 @@ your-project/
|
|
|
529
612
|
│ ├── custom-commands.yaml # Custom pa: commands
|
|
530
613
|
│ ├── worklog/ # Cross-AI session tracking
|
|
531
614
|
│ │ ├── _context.md # Quick context for any AI
|
|
615
|
+
│ │ ├── ai-stats.json # AI performance stats
|
|
532
616
|
│ │ └── YYYY-MM-DD-ai-*.md # Session logs
|
|
533
617
|
│ ├── changelog/ # Detailed changelogs
|
|
534
618
|
│ │ ├── _recent.md # Last 10 changes
|
package/bin/proagents.js
CHANGED
|
@@ -8,10 +8,17 @@ import { statusCommand } from '../lib/commands/status.js';
|
|
|
8
8
|
import { helpCommand } from '../lib/commands/help.js';
|
|
9
9
|
import { aiAddCommand, aiListCommand, aiRemoveCommand } from '../lib/commands/ai.js';
|
|
10
10
|
import { uninstallCommand } from '../lib/commands/uninstall.js';
|
|
11
|
-
import { configListCommand, configShowCommand, configEditCommand, configSetCommand, configGetCommand, configSetupCommand, configCustomizeCommand } from '../lib/commands/config.js';
|
|
11
|
+
import { configListCommand, configShowCommand, configEditCommand, configSetCommand, configGetCommand, configSetupCommand, configCustomizeCommand, configExportCommand, configImportCommand } from '../lib/commands/config.js';
|
|
12
12
|
import { doctorCommand } from '../lib/commands/doctor.js';
|
|
13
13
|
import { upgradeCommand } from '../lib/commands/upgrade.js';
|
|
14
14
|
import { migrateCommand } from '../lib/commands/migrate.js';
|
|
15
|
+
import { versionCommand } from '../lib/commands/version.js';
|
|
16
|
+
import { releaseCommand } from '../lib/commands/release.js';
|
|
17
|
+
import { statsCommand } from '../lib/commands/stats.js';
|
|
18
|
+
import { restoreCommand } from '../lib/commands/restore.js';
|
|
19
|
+
import { changelogCommand, changelogAddCommand, changelogListCommand, changelogExportCommand, changelogViewCommand } from '../lib/commands/changelog.js';
|
|
20
|
+
import { completionCommand } from '../lib/commands/completion.js';
|
|
21
|
+
import { openCommand } from '../lib/commands/open.js';
|
|
15
22
|
import { readFileSync } from 'fs';
|
|
16
23
|
import { fileURLToPath } from 'url';
|
|
17
24
|
import { dirname, join } from 'path';
|
|
@@ -149,6 +156,20 @@ config
|
|
|
149
156
|
.description('Copy templates to create custom configurations')
|
|
150
157
|
.action(configCustomizeCommand);
|
|
151
158
|
|
|
159
|
+
config
|
|
160
|
+
.command('export')
|
|
161
|
+
.description('Export configuration for sharing or backup')
|
|
162
|
+
.option('-o, --output [path]', 'Output to file instead of stdout')
|
|
163
|
+
.action(configExportCommand);
|
|
164
|
+
|
|
165
|
+
config
|
|
166
|
+
.command('import <file>')
|
|
167
|
+
.description('Import configuration from export file')
|
|
168
|
+
.option('-f, --force', 'Skip confirmation prompt')
|
|
169
|
+
.option('-q, --quiet', 'Minimal output')
|
|
170
|
+
.option('--json', 'Output in JSON format')
|
|
171
|
+
.action(configImportCommand);
|
|
172
|
+
|
|
152
173
|
// Uninstall command
|
|
153
174
|
program
|
|
154
175
|
.command('uninstall')
|
|
@@ -166,6 +187,7 @@ program
|
|
|
166
187
|
program
|
|
167
188
|
.command('doctor')
|
|
168
189
|
.description('Check health of ProAgents installation')
|
|
190
|
+
.option('--full', 'Run extended health checks')
|
|
169
191
|
.action(doctorCommand);
|
|
170
192
|
|
|
171
193
|
// Upgrade command
|
|
@@ -182,4 +204,113 @@ program
|
|
|
182
204
|
.option('-f, --force', 'Skip confirmation prompt')
|
|
183
205
|
.action(migrateCommand);
|
|
184
206
|
|
|
207
|
+
// Version command (detailed)
|
|
208
|
+
program
|
|
209
|
+
.command('version')
|
|
210
|
+
.description('Show detailed version information')
|
|
211
|
+
.option('--offline', 'Skip checking npm for latest version')
|
|
212
|
+
.action(versionCommand);
|
|
213
|
+
|
|
214
|
+
// Stats command
|
|
215
|
+
program
|
|
216
|
+
.command('stats')
|
|
217
|
+
.description('Show project and AI usage statistics')
|
|
218
|
+
.option('--json', 'Output in JSON format')
|
|
219
|
+
.action(statsCommand);
|
|
220
|
+
|
|
221
|
+
// Restore command
|
|
222
|
+
program
|
|
223
|
+
.command('restore <backup-file>')
|
|
224
|
+
.description('Restore ProAgents data from backup')
|
|
225
|
+
.option('-f, --force', 'Skip confirmation prompt')
|
|
226
|
+
.option('-q, --quiet', 'Minimal output')
|
|
227
|
+
.option('--json', 'Output in JSON format')
|
|
228
|
+
.action(restoreCommand);
|
|
229
|
+
|
|
230
|
+
// Changelog commands
|
|
231
|
+
const changelog = program
|
|
232
|
+
.command('changelog')
|
|
233
|
+
.description('Manage project changelogs');
|
|
234
|
+
|
|
235
|
+
changelog
|
|
236
|
+
.command('view')
|
|
237
|
+
.description('View recent changelog entries (default)')
|
|
238
|
+
.option('-l, --limit <number>', 'Number of entries to show', '10')
|
|
239
|
+
.option('--json', 'Output in JSON format')
|
|
240
|
+
.action(changelogViewCommand);
|
|
241
|
+
|
|
242
|
+
changelog
|
|
243
|
+
.command('add <entry>')
|
|
244
|
+
.description('Add a new changelog entry')
|
|
245
|
+
.option('--json', 'Output in JSON format')
|
|
246
|
+
.action(changelogAddCommand);
|
|
247
|
+
|
|
248
|
+
changelog
|
|
249
|
+
.command('list')
|
|
250
|
+
.description('List available changelogs (features, modules, years)')
|
|
251
|
+
.option('--json', 'Output in JSON format')
|
|
252
|
+
.action(changelogListCommand);
|
|
253
|
+
|
|
254
|
+
changelog
|
|
255
|
+
.command('export')
|
|
256
|
+
.description('Export changelog to CHANGELOG.md')
|
|
257
|
+
.option('--git', 'Include git commit history')
|
|
258
|
+
.option('--json', 'Output in JSON format')
|
|
259
|
+
.action(changelogExportCommand);
|
|
260
|
+
|
|
261
|
+
changelog
|
|
262
|
+
.command('feature <name>')
|
|
263
|
+
.description('View changelog for a specific feature')
|
|
264
|
+
.action((name) => changelogCommand('feature', name));
|
|
265
|
+
|
|
266
|
+
changelog
|
|
267
|
+
.command('module <name>')
|
|
268
|
+
.description('View changelog for a specific module')
|
|
269
|
+
.action((name) => changelogCommand('module', name));
|
|
270
|
+
|
|
271
|
+
changelog
|
|
272
|
+
.command('git')
|
|
273
|
+
.description('View git commit history as changelog')
|
|
274
|
+
.option('--since <ref>', 'Start from tag/commit/date')
|
|
275
|
+
.option('--until <ref>', 'End at tag/commit/date')
|
|
276
|
+
.option('-l, --limit <number>', 'Number of commits', '20')
|
|
277
|
+
.action((options) => changelogCommand('git', null, options));
|
|
278
|
+
|
|
279
|
+
// Release command
|
|
280
|
+
program
|
|
281
|
+
.command('release')
|
|
282
|
+
.description('Generate release notes with type selection')
|
|
283
|
+
.option('-t, --type <type>', 'Release type: detailed, short, client, developer, hotfix, prerelease')
|
|
284
|
+
.option('-v, --version <version>', 'Version number (defaults to package.json)')
|
|
285
|
+
.option('-o, --output [path]', 'Output to file (optional path)')
|
|
286
|
+
.option('-a, --append', 'Append to existing release notes file')
|
|
287
|
+
.option('-i, --include <categories>', 'Include only: features,fixes,improvements,security,breaking,docs,deps,perf')
|
|
288
|
+
.option('-e, --exclude <categories>', 'Exclude categories (comma-separated)')
|
|
289
|
+
.option('-m, --module <name>', 'Filter by module/component name in commits')
|
|
290
|
+
.option('-p, --path <path>', 'Filter commits by file path')
|
|
291
|
+
.option('--since <ref>', 'Start from tag/commit/date')
|
|
292
|
+
.option('--until <ref>', 'End at tag/commit/date')
|
|
293
|
+
.option('--bump', 'Suggest version bump based on changes')
|
|
294
|
+
.option('--prerelease <stage>', 'Mark as pre-release (beta, rc, alpha)')
|
|
295
|
+
.option('--urgency <level>', 'Hotfix urgency level (low, medium, high, critical)')
|
|
296
|
+
.option('--interactive', 'Interactive mode with filter selection')
|
|
297
|
+
.option('--changelog', 'Update CHANGELOG.md with release notes')
|
|
298
|
+
.option('--tag', 'Create git tag for this release')
|
|
299
|
+
.option('--tag-message <message>', 'Custom message for git tag')
|
|
300
|
+
.option('--json', 'Output in JSON format (for scripting)')
|
|
301
|
+
.action(releaseCommand);
|
|
302
|
+
|
|
303
|
+
// Completion command
|
|
304
|
+
program
|
|
305
|
+
.command('completion [shell]')
|
|
306
|
+
.description('Generate shell completion scripts (bash, zsh, fish)')
|
|
307
|
+
.option('-q, --quiet', 'Skip install instructions')
|
|
308
|
+
.action(completionCommand);
|
|
309
|
+
|
|
310
|
+
// Open command
|
|
311
|
+
program
|
|
312
|
+
.command('open [target]')
|
|
313
|
+
.description('Open ProAgents files quickly (config, changelog, activity, etc.)')
|
|
314
|
+
.action(openCommand);
|
|
315
|
+
|
|
185
316
|
program.parse();
|
package/lib/commands/ai.js
CHANGED
|
@@ -24,13 +24,19 @@ export const AI_PLATFORMS = {
|
|
|
24
24
|
web: {
|
|
25
25
|
label: 'Web-based AI Platforms',
|
|
26
26
|
platforms: [
|
|
27
|
-
{ id: 'chatgpt', name: 'ChatGPT
|
|
27
|
+
{ id: 'chatgpt', name: 'ChatGPT', file: 'CHATGPT.md', desc: 'OpenAI ChatGPT' },
|
|
28
28
|
{ id: 'gemini', name: 'Gemini', file: 'GEMINI.md', desc: 'Google Gemini' },
|
|
29
29
|
{ id: 'replit', name: 'Replit AI', file: 'REPLIT.md', desc: 'Replit Ghostwriter' },
|
|
30
30
|
{ id: 'bolt', name: 'Bolt.new', file: 'BOLT.md', desc: 'StackBlitz Bolt' },
|
|
31
31
|
{ id: 'lovable', name: 'Lovable', file: 'LOVABLE.md', desc: 'Lovable (GPT Engineer)' },
|
|
32
32
|
{ id: 'groq', name: 'Groq', file: 'GROQ.md', desc: 'Groq fast inference' },
|
|
33
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
|
+
]
|
|
34
40
|
}
|
|
35
41
|
};
|
|
36
42
|
|
|
@@ -39,6 +45,7 @@ export function getAllPlatforms() {
|
|
|
39
45
|
return [
|
|
40
46
|
...AI_PLATFORMS.ide.platforms,
|
|
41
47
|
...AI_PLATFORMS.web.platforms,
|
|
48
|
+
...AI_PLATFORMS.cli.platforms,
|
|
42
49
|
];
|
|
43
50
|
}
|
|
44
51
|
|
|
@@ -47,6 +54,39 @@ export function getPlatformById(id) {
|
|
|
47
54
|
return getAllPlatforms().find(p => p.id === id);
|
|
48
55
|
}
|
|
49
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Detect current IDE from environment variables
|
|
59
|
+
* Returns platform ID if detected and it's in our AI_PLATFORMS config, null otherwise
|
|
60
|
+
* Note: VS Code is NOT an AI platform, so we skip it even if detected
|
|
61
|
+
*/
|
|
62
|
+
export function detectIDE() {
|
|
63
|
+
// Cursor IDE - check for Cursor-specific env vars
|
|
64
|
+
if (process.env.CURSOR_TRACE_ID || process.env.CURSOR_CHANNEL || process.env.CURSOR_SESSION_ID) {
|
|
65
|
+
return 'cursor';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Windsurf IDE - Codeium's IDE
|
|
69
|
+
if (process.env.WINDSURF_SESSION_ID || process.env.CODEIUM_API_KEY ||
|
|
70
|
+
(process.env.TERM_PROGRAM && process.env.TERM_PROGRAM.toLowerCase().includes('windsurf'))) {
|
|
71
|
+
return 'windsurf';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// AWS Kiro IDE
|
|
75
|
+
if (process.env.KIRO_SESSION || process.env.KIRO_API_KEY ||
|
|
76
|
+
(process.env.TERM_PROGRAM && process.env.TERM_PROGRAM.toLowerCase().includes('kiro'))) {
|
|
77
|
+
return 'kiro';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// VS Code - NOT an AI platform, explicitly return null
|
|
81
|
+
// This prevents accidental detection as we don't want to create files for plain VS Code
|
|
82
|
+
if (process.env.TERM_PROGRAM === 'vscode' || process.env.VSCODE_GIT_IPC_HANDLE) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// No AI-powered IDE detected
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
50
90
|
/**
|
|
51
91
|
* Interactive platform selection using readline
|
|
52
92
|
* @param {string[]} previouslySelected - Previously selected platforms (from interrupted setup)
|
|
@@ -59,6 +99,21 @@ export async function selectPlatforms(previouslySelected = []) {
|
|
|
59
99
|
|
|
60
100
|
const question = (prompt) => new Promise(resolve => rl.question(prompt, resolve));
|
|
61
101
|
|
|
102
|
+
// Auto-detect IDE and pre-select it
|
|
103
|
+
const detectedIDE = detectIDE();
|
|
104
|
+
let autoSelected = [];
|
|
105
|
+
|
|
106
|
+
if (detectedIDE) {
|
|
107
|
+
const platform = getPlatformById(detectedIDE);
|
|
108
|
+
if (platform) {
|
|
109
|
+
console.log(chalk.green(`\n✓ Detected ${platform.name} IDE - auto-selected`));
|
|
110
|
+
autoSelected = [detectedIDE];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Merge auto-detected with previously selected
|
|
115
|
+
const preselected = [...new Set([...autoSelected, ...(previouslySelected || [])])];
|
|
116
|
+
|
|
62
117
|
console.log('\n' + chalk.bold('Which AI platform(s) do you use?'));
|
|
63
118
|
console.log(chalk.gray('(Enter numbers separated by commas, or "all" for all platforms)\n'));
|
|
64
119
|
|
|
@@ -69,11 +124,18 @@ export async function selectPlatforms(previouslySelected = []) {
|
|
|
69
124
|
// IDE-based platforms
|
|
70
125
|
console.log(chalk.cyan.bold(` ${AI_PLATFORMS.ide.label}:`));
|
|
71
126
|
for (const platform of AI_PLATFORMS.ide.platforms) {
|
|
72
|
-
const
|
|
73
|
-
const
|
|
127
|
+
const isAutoDetected = autoSelected.includes(platform.id);
|
|
128
|
+
const wasPreviouslySelected = previouslySelected && previouslySelected.includes(platform.id);
|
|
129
|
+
const isPreselected = preselected.includes(platform.id);
|
|
130
|
+
let marker = '';
|
|
131
|
+
if (isAutoDetected) {
|
|
132
|
+
marker = chalk.green(' ✓ (auto-detected)');
|
|
133
|
+
} else if (wasPreviouslySelected) {
|
|
134
|
+
marker = chalk.green(' ✓ (previously selected)');
|
|
135
|
+
}
|
|
74
136
|
console.log(chalk.white(` ${index}. ${platform.name}`) + chalk.gray(` - ${platform.desc}`) + marker);
|
|
75
137
|
indexMap[index] = platform.id;
|
|
76
|
-
if (
|
|
138
|
+
if (isPreselected) preSelectedIndices.push(index);
|
|
77
139
|
index++;
|
|
78
140
|
}
|
|
79
141
|
|
|
@@ -82,27 +144,42 @@ export async function selectPlatforms(previouslySelected = []) {
|
|
|
82
144
|
// Web-based platforms
|
|
83
145
|
console.log(chalk.cyan.bold(` ${AI_PLATFORMS.web.label}:`));
|
|
84
146
|
for (const platform of AI_PLATFORMS.web.platforms) {
|
|
85
|
-
const
|
|
86
|
-
const
|
|
147
|
+
const wasPreviouslySelected = previouslySelected && previouslySelected.includes(platform.id);
|
|
148
|
+
const isPreselected = preselected.includes(platform.id);
|
|
149
|
+
const marker = wasPreviouslySelected ? chalk.green(' ✓ (previously selected)') : '';
|
|
87
150
|
console.log(chalk.white(` ${index}. ${platform.name}`) + chalk.gray(` - ${platform.desc}`) + marker);
|
|
88
151
|
indexMap[index] = platform.id;
|
|
89
|
-
if (
|
|
152
|
+
if (isPreselected) preSelectedIndices.push(index);
|
|
90
153
|
index++;
|
|
91
154
|
}
|
|
92
155
|
|
|
93
156
|
console.log('');
|
|
94
157
|
|
|
95
|
-
//
|
|
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
|
+
// Show default based on preselected (auto-detected + previously selected)
|
|
96
173
|
const defaultHint = preSelectedIndices.length > 0
|
|
97
|
-
? `Enter for
|
|
174
|
+
? `Enter for selected: ${preSelectedIndices.join(',')}`
|
|
98
175
|
: 'e.g., 1,2,3 or "all"';
|
|
99
176
|
|
|
100
177
|
const answer = await question(chalk.yellow(`Your selection (${defaultHint}): `));
|
|
101
178
|
rl.close();
|
|
102
179
|
|
|
103
|
-
// If user just pressed enter and we have
|
|
180
|
+
// If user just pressed enter and we have preselected platforms, use them
|
|
104
181
|
if (answer.trim() === '' && preSelectedIndices.length > 0) {
|
|
105
|
-
return
|
|
182
|
+
return preselected;
|
|
106
183
|
}
|
|
107
184
|
|
|
108
185
|
if (answer.toLowerCase() === 'all') {
|
|
@@ -387,6 +464,21 @@ export function showAvailablePlatforms(currentIds) {
|
|
|
387
464
|
index++;
|
|
388
465
|
}
|
|
389
466
|
|
|
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
|
+
|
|
390
482
|
return available;
|
|
391
483
|
}
|
|
392
484
|
|