proagents 1.0.18 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -3
- package/lib/commands/init.js +7 -2
- package/package.json +1 -1
- package/proagents/AI_INSTRUCTIONS.md +628 -0
- package/proagents/PROAGENTS.md +134 -11
- package/proagents/backups/README.md +34 -0
- package/proagents/checkpoints.json +13 -0
- package/proagents/metrics/README.md +57 -162
- package/proagents/sprints/README.md +58 -0
- package/proagents/time-tracking.json +19 -0
package/README.md
CHANGED
|
@@ -149,15 +149,32 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
|
|
|
149
149
|
| `pa:d` | `pa:doc` |
|
|
150
150
|
| `pa:t` | `pa:test` |
|
|
151
151
|
| `pa:q` | `pa:qa` |
|
|
152
|
+
| `pa:a` | `pa:analyze` |
|
|
153
|
+
| `pa:r` | `pa:requirements` |
|
|
154
|
+
| `pa:p` | `pa:plan` |
|
|
155
|
+
| `pa:i` | `pa:implement` |
|
|
152
156
|
|
|
153
157
|
### Core Commands
|
|
154
158
|
| Command | Description |
|
|
155
159
|
|---------|-------------|
|
|
156
|
-
| `pa:feature "name"` | Start new feature workflow |
|
|
160
|
+
| `pa:feature "name"` | Start new feature workflow (all phases) |
|
|
157
161
|
| `pa:fix "description"` | Quick bug fix mode |
|
|
158
162
|
| `pa:status` | Show current progress |
|
|
159
163
|
| `pa:help` | Show all commands |
|
|
160
164
|
|
|
165
|
+
### Workflow Phase Commands
|
|
166
|
+
| Command | Phase | Description |
|
|
167
|
+
|---------|-------|-------------|
|
|
168
|
+
| `pa:analyze` | Analysis | Deep codebase analysis |
|
|
169
|
+
| `pa:requirements` | Requirements | Gather feature requirements |
|
|
170
|
+
| `pa:design` | Design | UI/Architecture design |
|
|
171
|
+
| `pa:plan` | Planning | Create implementation plan |
|
|
172
|
+
| `pa:implement` | Implementation | Execute code changes |
|
|
173
|
+
| `pa:test` | Testing | Create and run tests |
|
|
174
|
+
| `pa:review` | Review | Code review workflow |
|
|
175
|
+
| `pa:doc` | Documentation | Generate documentation |
|
|
176
|
+
| `pa:deploy` | Deployment | Deployment preparation |
|
|
177
|
+
|
|
161
178
|
### Documentation
|
|
162
179
|
| Command | Description |
|
|
163
180
|
|---------|-------------|
|
|
@@ -169,8 +186,7 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
|
|
|
169
186
|
| Command | Description |
|
|
170
187
|
|---------|-------------|
|
|
171
188
|
| `pa:qa` | Run quality assurance checks |
|
|
172
|
-
| `pa:
|
|
173
|
-
| `pa:deploy` | Deployment preparation |
|
|
189
|
+
| `pa:rollback` | Rollback procedures |
|
|
174
190
|
|
|
175
191
|
### Multi-AI Collaboration
|
|
176
192
|
| Command | Description |
|
|
@@ -198,6 +214,96 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
|
|
|
198
214
|
| `pa:ai-add` | Add more AI platforms |
|
|
199
215
|
| `pa:ai-sync` | Sync config with files |
|
|
200
216
|
|
|
217
|
+
### Navigation & Flow
|
|
218
|
+
| Command | Description |
|
|
219
|
+
|---------|-------------|
|
|
220
|
+
| `pa:next` | Show next step in workflow |
|
|
221
|
+
| `pa:resume` | Resume paused feature |
|
|
222
|
+
| `pa:skip` | Skip current phase |
|
|
223
|
+
| `pa:back` | Go to previous phase |
|
|
224
|
+
| `pa:progress` | Show visual progress bar |
|
|
225
|
+
|
|
226
|
+
### Context & History
|
|
227
|
+
| Command | Description |
|
|
228
|
+
|---------|-------------|
|
|
229
|
+
| `pa:context` | View project context |
|
|
230
|
+
| `pa:diff` | Show changes since last session |
|
|
231
|
+
| `pa:history` | Show command history |
|
|
232
|
+
| `pa:checkpoint` | Create restore point |
|
|
233
|
+
| `pa:undo` | Undo last action |
|
|
234
|
+
|
|
235
|
+
### Sprint & Estimation
|
|
236
|
+
| Command | Description |
|
|
237
|
+
|---------|-------------|
|
|
238
|
+
| `pa:sprint-start` | Start new sprint |
|
|
239
|
+
| `pa:sprint-end` | End sprint with summary |
|
|
240
|
+
| `pa:estimate` | Estimate task complexity |
|
|
241
|
+
| `pa:velocity` | Show velocity metrics |
|
|
242
|
+
|
|
243
|
+
### Integration
|
|
244
|
+
| Command | Description |
|
|
245
|
+
|---------|-------------|
|
|
246
|
+
| `pa:github` | GitHub integration |
|
|
247
|
+
| `pa:github-pr` | Create pull request |
|
|
248
|
+
| `pa:jira` | Sync with Jira |
|
|
249
|
+
| `pa:notify` | Send notification |
|
|
250
|
+
|
|
251
|
+
### Code Quality
|
|
252
|
+
| Command | Description |
|
|
253
|
+
|---------|-------------|
|
|
254
|
+
| `pa:metrics` | Code quality metrics |
|
|
255
|
+
| `pa:coverage` | Test coverage report |
|
|
256
|
+
| `pa:deps` | Analyze dependencies |
|
|
257
|
+
| `pa:deps-outdated` | Find outdated packages |
|
|
258
|
+
| `pa:deps-security` | Security scan |
|
|
259
|
+
|
|
260
|
+
### Code Generation
|
|
261
|
+
| Command | Description |
|
|
262
|
+
|---------|-------------|
|
|
263
|
+
| `pa:generate` | Show generation options |
|
|
264
|
+
| `pa:generate-component` | Generate component |
|
|
265
|
+
| `pa:generate-api` | Generate API endpoint |
|
|
266
|
+
| `pa:generate-test` | Generate test file |
|
|
267
|
+
|
|
268
|
+
### Refactoring
|
|
269
|
+
| Command | Description |
|
|
270
|
+
|---------|-------------|
|
|
271
|
+
| `pa:refactor` | Suggest refactoring |
|
|
272
|
+
| `pa:rename` | Rename across codebase |
|
|
273
|
+
| `pa:extract` | Extract function/component |
|
|
274
|
+
| `pa:cleanup` | Remove dead code |
|
|
275
|
+
|
|
276
|
+
### Time Tracking
|
|
277
|
+
| Command | Description |
|
|
278
|
+
|---------|-------------|
|
|
279
|
+
| `pa:time-start` | Start time tracking |
|
|
280
|
+
| `pa:time-stop` | Stop tracking |
|
|
281
|
+
| `pa:time-report` | Show time report |
|
|
282
|
+
|
|
283
|
+
### Environment & Database
|
|
284
|
+
| Command | Description |
|
|
285
|
+
|---------|-------------|
|
|
286
|
+
| `pa:env-check` | Verify environment |
|
|
287
|
+
| `pa:secrets-scan` | Scan for secrets |
|
|
288
|
+
| `pa:db-migrate` | Run migrations |
|
|
289
|
+
| `pa:db-seed` | Seed database |
|
|
290
|
+
|
|
291
|
+
### Accessibility & Performance
|
|
292
|
+
| Command | Description |
|
|
293
|
+
|---------|-------------|
|
|
294
|
+
| `pa:a11y` | Accessibility audit |
|
|
295
|
+
| `pa:lighthouse` | Lighthouse audit |
|
|
296
|
+
| `pa:perf` | Performance analysis |
|
|
297
|
+
|
|
298
|
+
### Export & Learning
|
|
299
|
+
| Command | Description |
|
|
300
|
+
|---------|-------------|
|
|
301
|
+
| `pa:export` | Export config/data |
|
|
302
|
+
| `pa:import` | Import data |
|
|
303
|
+
| `pa:backup` | Backup proagents |
|
|
304
|
+
| `pa:learn` | Teach AI a pattern |
|
|
305
|
+
| `pa:suggestions` | Show AI suggestions |
|
|
306
|
+
|
|
201
307
|
### Custom Commands
|
|
202
308
|
| Command | Description |
|
|
203
309
|
|---------|-------------|
|
package/lib/commands/init.js
CHANGED
|
@@ -784,6 +784,11 @@ function saveProjectConfig(projectConfig, configPath) {
|
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
786
|
|
|
787
|
+
// Save platforms
|
|
788
|
+
if (projectConfig.platforms && projectConfig.platforms.length > 0) {
|
|
789
|
+
config.platforms = projectConfig.platforms;
|
|
790
|
+
}
|
|
791
|
+
|
|
787
792
|
const yamlContent = yaml.dump(config, { indent: 2, lineWidth: 120 });
|
|
788
793
|
writeFileSync(configPath, yamlContent);
|
|
789
794
|
}
|
|
@@ -997,8 +1002,8 @@ For detailed commands, see \`./proagents/PROAGENTS.md\`
|
|
|
997
1002
|
console.log(chalk.green(`✓ Merged with existing: ${aiResults.merged.join(', ')}`));
|
|
998
1003
|
}
|
|
999
1004
|
|
|
1000
|
-
// Save project and platform config
|
|
1001
|
-
const configPath = join(
|
|
1005
|
+
// Save project and platform config to ROOT config (not proagents/ folder)
|
|
1006
|
+
const configPath = join(targetDir, 'proagents.config.yaml');
|
|
1002
1007
|
saveProjectConfig(projectConfig, configPath);
|
|
1003
1008
|
savePlatformConfig(selectedPlatforms, configPath);
|
|
1004
1009
|
|
package/package.json
CHANGED
|
@@ -237,6 +237,10 @@ When the user types commands starting with `pa:`, recognize and execute them.
|
|
|
237
237
|
| `pa:d` | `pa:doc` |
|
|
238
238
|
| `pa:t` | `pa:test` |
|
|
239
239
|
| `pa:q` | `pa:qa` |
|
|
240
|
+
| `pa:a` | `pa:analyze` |
|
|
241
|
+
| `pa:r` | `pa:requirements` |
|
|
242
|
+
| `pa:p` | `pa:plan` |
|
|
243
|
+
| `pa:i` | `pa:implement` |
|
|
240
244
|
|
|
241
245
|
### Initialization
|
|
242
246
|
| Command | Action |
|
|
@@ -255,6 +259,56 @@ When the user types commands starting with `pa:`, recognize and execute them.
|
|
|
255
259
|
| `pa:feature-complete` | Mark feature complete |
|
|
256
260
|
| `pa:fix "description"` | Quick bug fix mode |
|
|
257
261
|
|
|
262
|
+
### Workflow Phase Commands
|
|
263
|
+
Run individual phases of the development workflow:
|
|
264
|
+
|
|
265
|
+
| Command | Phase | Action |
|
|
266
|
+
|---------|-------|--------|
|
|
267
|
+
| `pa:analyze` | Analysis | Deep codebase analysis - structure, patterns, dependencies |
|
|
268
|
+
| `pa:analyze-full` | Analysis | Comprehensive analysis with full depth |
|
|
269
|
+
| `pa:analyze-quick` | Analysis | Quick overview analysis |
|
|
270
|
+
| `pa:requirements` | Requirements | Gather and document feature requirements |
|
|
271
|
+
| `pa:requirements "feature"` | Requirements | Requirements for specific feature |
|
|
272
|
+
| `pa:design` | Design | UI/UX and architecture design |
|
|
273
|
+
| `pa:design-ui` | Design | Focus on UI/UX design |
|
|
274
|
+
| `pa:design-arch` | Design | Focus on architecture design |
|
|
275
|
+
| `pa:plan` | Planning | Create implementation plan |
|
|
276
|
+
| `pa:plan "feature"` | Planning | Plan specific feature implementation |
|
|
277
|
+
| `pa:implement` | Implementation | Execute implementation phase |
|
|
278
|
+
| `pa:implement-continue` | Implementation | Continue paused implementation |
|
|
279
|
+
|
|
280
|
+
**How to execute Workflow Phase commands:**
|
|
281
|
+
|
|
282
|
+
For `pa:analyze`:
|
|
283
|
+
1. Read `./proagents/prompts/01-analysis.md` for analysis workflow
|
|
284
|
+
2. Scan project structure, dependencies, patterns
|
|
285
|
+
3. Cache results in `./proagents/cache/`
|
|
286
|
+
4. Output analysis report
|
|
287
|
+
|
|
288
|
+
For `pa:requirements`:
|
|
289
|
+
1. Read `./proagents/prompts/02-requirements.md`
|
|
290
|
+
2. If feature name provided, create `./proagents/active-features/feature-{name}/requirements.md`
|
|
291
|
+
3. Gather user stories, acceptance criteria, constraints
|
|
292
|
+
4. Output requirements document
|
|
293
|
+
|
|
294
|
+
For `pa:design`:
|
|
295
|
+
1. Read `./proagents/prompts/03-ui-design.md`
|
|
296
|
+
2. Check for design inputs (Figma, sketches, exports)
|
|
297
|
+
3. Create component specifications
|
|
298
|
+
4. Output design document
|
|
299
|
+
|
|
300
|
+
For `pa:plan`:
|
|
301
|
+
1. Read `./proagents/prompts/04-planning.md`
|
|
302
|
+
2. Create implementation plan with task breakdown
|
|
303
|
+
3. Identify dependencies and risks
|
|
304
|
+
4. Save to `./proagents/active-features/feature-{name}/implementation-plan.md`
|
|
305
|
+
|
|
306
|
+
For `pa:implement`:
|
|
307
|
+
1. Read `./proagents/prompts/05-implementation.md`
|
|
308
|
+
2. Follow existing project patterns
|
|
309
|
+
3. Implement code changes
|
|
310
|
+
4. Log progress to activity.log
|
|
311
|
+
|
|
258
312
|
### Documentation Commands
|
|
259
313
|
| Command | Action |
|
|
260
314
|
|---------|--------|
|
|
@@ -283,6 +337,580 @@ When the user types commands starting with `pa:`, recognize and execute them.
|
|
|
283
337
|
| `pa:deploy` | Deployment preparation |
|
|
284
338
|
| `pa:rollback` | Rollback procedures |
|
|
285
339
|
|
|
340
|
+
### Navigation & Flow
|
|
341
|
+
| Command | Action |
|
|
342
|
+
|---------|--------|
|
|
343
|
+
| `pa:next` | Show next step in current workflow |
|
|
344
|
+
| `pa:resume` | Resume paused feature from where left off |
|
|
345
|
+
| `pa:skip` | Skip current phase, move to next |
|
|
346
|
+
| `pa:back` | Go back to previous phase |
|
|
347
|
+
| `pa:progress` | Show visual progress bar for current feature |
|
|
348
|
+
|
|
349
|
+
**How to execute Navigation commands:**
|
|
350
|
+
|
|
351
|
+
For `pa:next`:
|
|
352
|
+
1. Read `./proagents/active-features/*/status.json` to find current feature
|
|
353
|
+
2. Identify current phase from status
|
|
354
|
+
3. Show what the next step/phase is
|
|
355
|
+
4. Provide guidance for the next action
|
|
356
|
+
|
|
357
|
+
For `pa:resume`:
|
|
358
|
+
1. Read `./proagents/active-features/` to find paused features
|
|
359
|
+
2. Read feature's `status.json` for last phase and progress
|
|
360
|
+
3. Read `./proagents/handoff.md` for context
|
|
361
|
+
4. Continue from where it was left off
|
|
362
|
+
|
|
363
|
+
For `pa:skip`:
|
|
364
|
+
1. Read current feature status
|
|
365
|
+
2. Mark current phase as "skipped" in status.json
|
|
366
|
+
3. Move to next phase
|
|
367
|
+
4. Log skip reason to activity.log
|
|
368
|
+
5. Warn if skipping critical phase (testing, review)
|
|
369
|
+
|
|
370
|
+
For `pa:back`:
|
|
371
|
+
1. Read current feature status
|
|
372
|
+
2. Move to previous phase
|
|
373
|
+
3. Update status.json
|
|
374
|
+
4. Reload context from previous phase
|
|
375
|
+
|
|
376
|
+
For `pa:progress`:
|
|
377
|
+
1. Read `./proagents/active-features/*/status.json`
|
|
378
|
+
2. Calculate percentage complete (current_phase / total_phases)
|
|
379
|
+
3. Display visual progress bar:
|
|
380
|
+
```
|
|
381
|
+
Feature: user-auth
|
|
382
|
+
Phase: 5/10 (Implementation)
|
|
383
|
+
Progress: [████████░░░░░░░░░░░░] 50%
|
|
384
|
+
|
|
385
|
+
✓ Init → ✓ Analysis → ✓ Requirements → ✓ Design → ● Implementation → ○ Testing → ○ Review → ○ Docs → ○ Deploy
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Context & History
|
|
389
|
+
| Command | Action |
|
|
390
|
+
|---------|--------|
|
|
391
|
+
| `pa:context` | Quick view/edit project context |
|
|
392
|
+
| `pa:context-edit` | Edit project context interactively |
|
|
393
|
+
| `pa:diff` | Show what changed since last session |
|
|
394
|
+
| `pa:history` | Show command history with results |
|
|
395
|
+
| `pa:checkpoint` | Create a snapshot/restore point |
|
|
396
|
+
| `pa:checkpoint-restore` | Restore from a checkpoint |
|
|
397
|
+
| `pa:undo` | Undo last AI action using git |
|
|
398
|
+
|
|
399
|
+
**How to execute Context & History commands:**
|
|
400
|
+
|
|
401
|
+
For `pa:context`:
|
|
402
|
+
1. Read `./proagents/context.md`
|
|
403
|
+
2. Display current project context summary
|
|
404
|
+
3. Show last updated timestamp
|
|
405
|
+
|
|
406
|
+
For `pa:diff`:
|
|
407
|
+
1. Read `./proagents/activity.log` for last session timestamp
|
|
408
|
+
2. Run `git diff` from that point
|
|
409
|
+
3. Summarize changes by file/module
|
|
410
|
+
4. Highlight significant changes
|
|
411
|
+
|
|
412
|
+
For `pa:history`:
|
|
413
|
+
1. Read `./proagents/history.log`
|
|
414
|
+
2. Show recent commands with their results
|
|
415
|
+
3. Format: `[timestamp] command → result`
|
|
416
|
+
|
|
417
|
+
For `pa:checkpoint`:
|
|
418
|
+
1. Create git commit with message "checkpoint: [description]"
|
|
419
|
+
2. Save checkpoint info to `./proagents/checkpoints.json`:
|
|
420
|
+
```json
|
|
421
|
+
{
|
|
422
|
+
"checkpoints": [
|
|
423
|
+
{
|
|
424
|
+
"id": "cp-001",
|
|
425
|
+
"timestamp": "2024-03-06T15:00:00Z",
|
|
426
|
+
"commit": "abc123",
|
|
427
|
+
"description": "Before auth refactor",
|
|
428
|
+
"feature": "user-auth",
|
|
429
|
+
"phase": "implementation"
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
3. Log to activity.log
|
|
435
|
+
|
|
436
|
+
For `pa:undo`:
|
|
437
|
+
1. Read last action from `./proagents/activity.log`
|
|
438
|
+
2. If file changes, run `git checkout` to revert
|
|
439
|
+
3. If multiple files, offer selective undo
|
|
440
|
+
4. Update activity.log with undo entry
|
|
441
|
+
|
|
442
|
+
### Sprint & Project Management
|
|
443
|
+
| Command | Action |
|
|
444
|
+
|---------|--------|
|
|
445
|
+
| `pa:sprint-start` | Start a new sprint |
|
|
446
|
+
| `pa:sprint-end` | End sprint with summary |
|
|
447
|
+
| `pa:sprint-status` | Show current sprint status |
|
|
448
|
+
| `pa:estimate` | Estimate task complexity |
|
|
449
|
+
| `pa:estimate "task"` | Estimate specific task |
|
|
450
|
+
| `pa:velocity` | Show team velocity metrics |
|
|
451
|
+
|
|
452
|
+
**How to execute Sprint commands:**
|
|
453
|
+
|
|
454
|
+
For `pa:sprint-start`:
|
|
455
|
+
1. Create `./proagents/sprints/sprint-{number}.json`:
|
|
456
|
+
```json
|
|
457
|
+
{
|
|
458
|
+
"sprint_number": 1,
|
|
459
|
+
"start_date": "2024-03-06",
|
|
460
|
+
"end_date": "2024-03-20",
|
|
461
|
+
"goals": [],
|
|
462
|
+
"features": [],
|
|
463
|
+
"status": "active"
|
|
464
|
+
}
|
|
465
|
+
```
|
|
466
|
+
2. Ask for sprint goals
|
|
467
|
+
3. Link active features to sprint
|
|
468
|
+
|
|
469
|
+
For `pa:sprint-end`:
|
|
470
|
+
1. Read current sprint file
|
|
471
|
+
2. Calculate metrics (completed features, velocity)
|
|
472
|
+
3. Generate sprint summary → `./proagents/sprints/sprint-{n}-summary.md`
|
|
473
|
+
4. Archive sprint
|
|
474
|
+
|
|
475
|
+
For `pa:estimate`:
|
|
476
|
+
1. Analyze task/feature complexity
|
|
477
|
+
2. Consider: code changes, files affected, dependencies, testing needs
|
|
478
|
+
3. Provide estimate in story points or T-shirt sizes (S/M/L/XL)
|
|
479
|
+
4. Save estimate to feature status.json
|
|
480
|
+
|
|
481
|
+
For `pa:velocity`:
|
|
482
|
+
1. Read completed sprints from `./proagents/sprints/`
|
|
483
|
+
2. Calculate average story points per sprint
|
|
484
|
+
3. Show velocity chart/trend
|
|
485
|
+
|
|
486
|
+
### Integration Commands
|
|
487
|
+
| Command | Action |
|
|
488
|
+
|---------|--------|
|
|
489
|
+
| `pa:github` | GitHub integration commands |
|
|
490
|
+
| `pa:github-issue` | Create GitHub issue from current work |
|
|
491
|
+
| `pa:github-pr` | Create pull request |
|
|
492
|
+
| `pa:jira` | Jira integration commands |
|
|
493
|
+
| `pa:jira-sync` | Sync with Jira ticket |
|
|
494
|
+
| `pa:notify` | Send notification |
|
|
495
|
+
| `pa:notify-slack` | Send Slack notification |
|
|
496
|
+
| `pa:notify-email` | Send email notification |
|
|
497
|
+
|
|
498
|
+
**How to execute Integration commands:**
|
|
499
|
+
|
|
500
|
+
For `pa:github-issue`:
|
|
501
|
+
1. Read current feature/bug context
|
|
502
|
+
2. Generate issue title and body
|
|
503
|
+
3. Show preview and ask for confirmation
|
|
504
|
+
4. Provide `gh issue create` command or API call
|
|
505
|
+
|
|
506
|
+
For `pa:github-pr`:
|
|
507
|
+
1. Read current feature context
|
|
508
|
+
2. Generate PR title and description
|
|
509
|
+
3. Include: summary, changes, test plan
|
|
510
|
+
4. Provide `gh pr create` command
|
|
511
|
+
|
|
512
|
+
For `pa:jira-sync`:
|
|
513
|
+
1. Read Jira config from `proagents.config.yaml`
|
|
514
|
+
2. Find linked ticket (from feature name or config)
|
|
515
|
+
3. Update ticket status based on feature phase
|
|
516
|
+
4. Add comment with progress
|
|
517
|
+
|
|
518
|
+
For `pa:notify`:
|
|
519
|
+
1. Read notification config from `proagents.config.yaml`
|
|
520
|
+
2. Generate notification message based on context
|
|
521
|
+
3. Send via configured channel (Slack webhook, email, etc.)
|
|
522
|
+
|
|
523
|
+
### Code Quality Commands
|
|
524
|
+
| Command | Action |
|
|
525
|
+
|---------|--------|
|
|
526
|
+
| `pa:metrics` | Show code quality metrics |
|
|
527
|
+
| `pa:metrics-history` | Show metrics over time |
|
|
528
|
+
| `pa:coverage` | Show test coverage report |
|
|
529
|
+
| `pa:coverage-diff` | Show coverage changes |
|
|
530
|
+
| `pa:deps` | Analyze dependencies |
|
|
531
|
+
| `pa:deps-outdated` | Find outdated dependencies |
|
|
532
|
+
| `pa:deps-security` | Security scan dependencies |
|
|
533
|
+
|
|
534
|
+
**How to execute Code Quality commands:**
|
|
535
|
+
|
|
536
|
+
For `pa:metrics`:
|
|
537
|
+
1. Analyze codebase for:
|
|
538
|
+
- Lines of code (by language)
|
|
539
|
+
- Cyclomatic complexity
|
|
540
|
+
- Code duplication
|
|
541
|
+
- Function/file sizes
|
|
542
|
+
2. Save to `./proagents/metrics/latest.json`
|
|
543
|
+
3. Display summary with warnings for issues
|
|
544
|
+
|
|
545
|
+
For `pa:coverage`:
|
|
546
|
+
1. Check for coverage reports (coverage/, .nyc_output/, etc.)
|
|
547
|
+
2. Parse coverage data
|
|
548
|
+
3. Display summary:
|
|
549
|
+
```
|
|
550
|
+
Test Coverage Report
|
|
551
|
+
═══════════════════
|
|
552
|
+
Overall: 82% ✓
|
|
553
|
+
|
|
554
|
+
By Module:
|
|
555
|
+
• src/auth/ 95% ████████████████████ ✓
|
|
556
|
+
• src/api/ 78% ███████████████░░░░░
|
|
557
|
+
• src/utils/ 65% █████████████░░░░░░░ ⚠
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
For `pa:deps`:
|
|
561
|
+
1. Read package.json / requirements.txt
|
|
562
|
+
2. Analyze dependency tree
|
|
563
|
+
3. Identify:
|
|
564
|
+
- Direct vs transitive deps
|
|
565
|
+
- Duplicate packages
|
|
566
|
+
- Large dependencies
|
|
567
|
+
- Outdated versions
|
|
568
|
+
|
|
569
|
+
For `pa:deps-security`:
|
|
570
|
+
1. Run `npm audit` or equivalent
|
|
571
|
+
2. Parse security advisories
|
|
572
|
+
3. Categorize by severity
|
|
573
|
+
4. Suggest fixes
|
|
574
|
+
|
|
575
|
+
### Code Generation
|
|
576
|
+
| Command | Action |
|
|
577
|
+
|---------|--------|
|
|
578
|
+
| `pa:generate` | Show generation options |
|
|
579
|
+
| `pa:generate-component "name"` | Generate React/Vue component |
|
|
580
|
+
| `pa:generate-api "name"` | Generate API endpoint |
|
|
581
|
+
| `pa:generate-test "file"` | Generate test file for module |
|
|
582
|
+
| `pa:generate-hook "name"` | Generate custom hook |
|
|
583
|
+
| `pa:generate-service "name"` | Generate service class |
|
|
584
|
+
|
|
585
|
+
**How to execute Code Generation commands:**
|
|
586
|
+
|
|
587
|
+
For `pa:generate-component`:
|
|
588
|
+
1. Read project type and patterns from `./proagents/cache/patterns.json`
|
|
589
|
+
2. Use template from `./proagents/scaffolding/` matching project type
|
|
590
|
+
3. Apply project naming conventions
|
|
591
|
+
4. Create component file with:
|
|
592
|
+
- Component code
|
|
593
|
+
- Types/interfaces
|
|
594
|
+
- Basic styles (if applicable)
|
|
595
|
+
- Test file (optional)
|
|
596
|
+
5. Save to appropriate directory based on project structure
|
|
597
|
+
|
|
598
|
+
For `pa:generate-api`:
|
|
599
|
+
1. Detect API framework (Express, Next.js, NestJS, etc.)
|
|
600
|
+
2. Use appropriate template
|
|
601
|
+
3. Generate:
|
|
602
|
+
- Route handler
|
|
603
|
+
- Input validation
|
|
604
|
+
- Error handling
|
|
605
|
+
- Types
|
|
606
|
+
4. Add to routes index if applicable
|
|
607
|
+
|
|
608
|
+
For `pa:generate-test`:
|
|
609
|
+
1. Read the source file
|
|
610
|
+
2. Detect testing framework (Jest, Vitest, etc.)
|
|
611
|
+
3. Generate test file with:
|
|
612
|
+
- Import statements
|
|
613
|
+
- Describe blocks
|
|
614
|
+
- Test cases for each function
|
|
615
|
+
- Mock setup
|
|
616
|
+
4. Save alongside source or in tests/ folder
|
|
617
|
+
|
|
618
|
+
### Refactoring
|
|
619
|
+
| Command | Action |
|
|
620
|
+
|---------|--------|
|
|
621
|
+
| `pa:refactor` | Analyze and suggest refactoring |
|
|
622
|
+
| `pa:refactor "file"` | Refactor specific file |
|
|
623
|
+
| `pa:rename "old" "new"` | Rename symbol across codebase |
|
|
624
|
+
| `pa:extract "name"` | Extract function/component |
|
|
625
|
+
| `pa:cleanup` | Remove dead code, unused imports |
|
|
626
|
+
| `pa:cleanup-imports` | Clean up imports only |
|
|
627
|
+
|
|
628
|
+
**How to execute Refactoring commands:**
|
|
629
|
+
|
|
630
|
+
For `pa:refactor`:
|
|
631
|
+
1. Analyze codebase for:
|
|
632
|
+
- Long functions (>50 lines)
|
|
633
|
+
- Deep nesting (>3 levels)
|
|
634
|
+
- Duplicate code
|
|
635
|
+
- Complex conditionals
|
|
636
|
+
- God classes/components
|
|
637
|
+
2. Prioritize by impact
|
|
638
|
+
3. Suggest specific refactoring for each issue
|
|
639
|
+
4. Offer to apply refactoring
|
|
640
|
+
|
|
641
|
+
For `pa:rename`:
|
|
642
|
+
1. Find all occurrences of symbol
|
|
643
|
+
2. Check for naming conflicts
|
|
644
|
+
3. Show preview of changes
|
|
645
|
+
4. Apply rename across all files
|
|
646
|
+
5. Update imports/exports
|
|
647
|
+
|
|
648
|
+
For `pa:cleanup`:
|
|
649
|
+
1. Find unused imports
|
|
650
|
+
2. Find unused variables
|
|
651
|
+
3. Find dead code (unreachable)
|
|
652
|
+
4. Find unused exports
|
|
653
|
+
5. Show list and offer to remove
|
|
654
|
+
6. Log changes to activity.log
|
|
655
|
+
|
|
656
|
+
### Time Tracking
|
|
657
|
+
| Command | Action |
|
|
658
|
+
|---------|--------|
|
|
659
|
+
| `pa:time-start` | Start time tracking |
|
|
660
|
+
| `pa:time-start "task"` | Start tracking specific task |
|
|
661
|
+
| `pa:time-stop` | Stop current time tracking |
|
|
662
|
+
| `pa:time-pause` | Pause time tracking |
|
|
663
|
+
| `pa:time-report` | Show time report |
|
|
664
|
+
| `pa:time-report "feature"` | Report for specific feature |
|
|
665
|
+
|
|
666
|
+
**How to execute Time Tracking commands:**
|
|
667
|
+
|
|
668
|
+
For `pa:time-start`:
|
|
669
|
+
1. Create/update `./proagents/time-tracking.json`:
|
|
670
|
+
```json
|
|
671
|
+
{
|
|
672
|
+
"current": {
|
|
673
|
+
"task": "feature-user-auth",
|
|
674
|
+
"started": "2024-03-06T15:00:00Z",
|
|
675
|
+
"status": "running"
|
|
676
|
+
},
|
|
677
|
+
"entries": []
|
|
678
|
+
}
|
|
679
|
+
```
|
|
680
|
+
2. Log to activity.log
|
|
681
|
+
|
|
682
|
+
For `pa:time-stop`:
|
|
683
|
+
1. Read current tracking
|
|
684
|
+
2. Calculate duration
|
|
685
|
+
3. Add to entries array:
|
|
686
|
+
```json
|
|
687
|
+
{
|
|
688
|
+
"task": "feature-user-auth",
|
|
689
|
+
"started": "2024-03-06T15:00:00Z",
|
|
690
|
+
"ended": "2024-03-06T17:30:00Z",
|
|
691
|
+
"duration_minutes": 150,
|
|
692
|
+
"ai": "Claude:opus-4"
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
4. Clear current tracking
|
|
696
|
+
|
|
697
|
+
For `pa:time-report`:
|
|
698
|
+
1. Read all entries from time-tracking.json
|
|
699
|
+
2. Group by task/feature
|
|
700
|
+
3. Calculate totals
|
|
701
|
+
4. Display report:
|
|
702
|
+
```
|
|
703
|
+
Time Report
|
|
704
|
+
═══════════
|
|
705
|
+
Feature: user-auth
|
|
706
|
+
Total: 5h 30m
|
|
707
|
+
Sessions: 3
|
|
708
|
+
|
|
709
|
+
Feature: dashboard
|
|
710
|
+
Total: 2h 15m
|
|
711
|
+
Sessions: 2
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
### Environment & Setup
|
|
715
|
+
| Command | Action |
|
|
716
|
+
|---------|--------|
|
|
717
|
+
| `pa:env-check` | Verify environment setup |
|
|
718
|
+
| `pa:env-setup` | Setup development environment |
|
|
719
|
+
| `pa:env-diff` | Compare environments |
|
|
720
|
+
| `pa:secrets-scan` | Scan for exposed secrets |
|
|
721
|
+
| `pa:secrets-check` | Verify required secrets exist |
|
|
722
|
+
|
|
723
|
+
**How to execute Environment commands:**
|
|
724
|
+
|
|
725
|
+
For `pa:env-check`:
|
|
726
|
+
1. Check for required files (.env, .env.local, etc.)
|
|
727
|
+
2. Verify Node/Python/etc. version matches
|
|
728
|
+
3. Check for required dependencies
|
|
729
|
+
4. Verify database connection (if applicable)
|
|
730
|
+
5. Check for required environment variables
|
|
731
|
+
6. Report status:
|
|
732
|
+
```
|
|
733
|
+
Environment Check
|
|
734
|
+
═════════════════
|
|
735
|
+
✓ Node.js v18.17.0 (required: >=18)
|
|
736
|
+
✓ npm v9.6.0
|
|
737
|
+
✓ .env.local exists
|
|
738
|
+
⚠ DATABASE_URL not set
|
|
739
|
+
✗ Redis not running
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
For `pa:secrets-scan`:
|
|
743
|
+
1. Scan codebase for patterns:
|
|
744
|
+
- API keys (sk_, pk_, api_key, etc.)
|
|
745
|
+
- Passwords in code
|
|
746
|
+
- Private keys
|
|
747
|
+
- Connection strings
|
|
748
|
+
2. Check .gitignore for sensitive files
|
|
749
|
+
3. Report findings with file locations
|
|
750
|
+
4. Suggest fixes (move to .env, etc.)
|
|
751
|
+
|
|
752
|
+
### Database Commands
|
|
753
|
+
| Command | Action |
|
|
754
|
+
|---------|--------|
|
|
755
|
+
| `pa:db-migrate` | Run database migrations |
|
|
756
|
+
| `pa:db-migrate-create "name"` | Create new migration |
|
|
757
|
+
| `pa:db-seed` | Seed database with test data |
|
|
758
|
+
| `pa:db-reset` | Reset database |
|
|
759
|
+
| `pa:db-status` | Show migration status |
|
|
760
|
+
|
|
761
|
+
**How to execute Database commands:**
|
|
762
|
+
|
|
763
|
+
For `pa:db-migrate`:
|
|
764
|
+
1. Detect ORM (Prisma, TypeORM, Sequelize, Drizzle, etc.)
|
|
765
|
+
2. Run appropriate migrate command:
|
|
766
|
+
- Prisma: `npx prisma migrate dev`
|
|
767
|
+
- TypeORM: `npm run typeorm migration:run`
|
|
768
|
+
3. Report results
|
|
769
|
+
|
|
770
|
+
For `pa:db-seed`:
|
|
771
|
+
1. Find seed files (prisma/seed.ts, seeds/, etc.)
|
|
772
|
+
2. Run seed command
|
|
773
|
+
3. Report inserted records
|
|
774
|
+
|
|
775
|
+
For `pa:db-reset`:
|
|
776
|
+
1. Warn user about data loss
|
|
777
|
+
2. Require confirmation
|
|
778
|
+
3. Drop and recreate database
|
|
779
|
+
4. Run migrations
|
|
780
|
+
5. Optionally run seeds
|
|
781
|
+
|
|
782
|
+
### Accessibility & Performance
|
|
783
|
+
| Command | Action |
|
|
784
|
+
|---------|--------|
|
|
785
|
+
| `pa:a11y` | Run accessibility audit |
|
|
786
|
+
| `pa:a11y "url"` | Audit specific page |
|
|
787
|
+
| `pa:lighthouse` | Run Lighthouse audit |
|
|
788
|
+
| `pa:lighthouse "url"` | Audit specific URL |
|
|
789
|
+
| `pa:perf` | Performance analysis |
|
|
790
|
+
| `pa:perf-bundle` | Bundle size analysis |
|
|
791
|
+
|
|
792
|
+
**How to execute A11y & Performance commands:**
|
|
793
|
+
|
|
794
|
+
For `pa:a11y`:
|
|
795
|
+
1. Check for a11y tools (axe, pa11y, etc.)
|
|
796
|
+
2. Run audit on pages/components
|
|
797
|
+
3. Report issues by severity:
|
|
798
|
+
```
|
|
799
|
+
Accessibility Audit
|
|
800
|
+
═══════════════════
|
|
801
|
+
Critical: 2
|
|
802
|
+
Serious: 5
|
|
803
|
+
Moderate: 12
|
|
804
|
+
Minor: 8
|
|
805
|
+
|
|
806
|
+
Top Issues:
|
|
807
|
+
• Missing alt text on images (5 instances)
|
|
808
|
+
• Low color contrast (3 instances)
|
|
809
|
+
• Missing form labels (2 instances)
|
|
810
|
+
```
|
|
811
|
+
4. Link to WCAG guidelines for each issue
|
|
812
|
+
|
|
813
|
+
For `pa:lighthouse`:
|
|
814
|
+
1. Check if Lighthouse is available
|
|
815
|
+
2. Run audit (provide command or use API)
|
|
816
|
+
3. Parse results
|
|
817
|
+
4. Display scores:
|
|
818
|
+
```
|
|
819
|
+
Lighthouse Scores
|
|
820
|
+
═════════════════
|
|
821
|
+
Performance: 85 ████████░░
|
|
822
|
+
Accessibility: 92 █████████░
|
|
823
|
+
Best Practices: 100 ██████████
|
|
824
|
+
SEO: 90 █████████░
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
For `pa:perf`:
|
|
828
|
+
1. Analyze:
|
|
829
|
+
- Bundle sizes
|
|
830
|
+
- Load times
|
|
831
|
+
- Render performance
|
|
832
|
+
- Memory usage patterns
|
|
833
|
+
2. Identify bottlenecks
|
|
834
|
+
3. Suggest optimizations
|
|
835
|
+
|
|
836
|
+
### Export & Backup
|
|
837
|
+
| Command | Action |
|
|
838
|
+
|---------|--------|
|
|
839
|
+
| `pa:export` | Export ProAgents config and data |
|
|
840
|
+
| `pa:export-config` | Export only configuration |
|
|
841
|
+
| `pa:import` | Import from export file |
|
|
842
|
+
| `pa:backup` | Create full backup |
|
|
843
|
+
| `pa:backup-restore` | Restore from backup |
|
|
844
|
+
|
|
845
|
+
**How to execute Export & Backup commands:**
|
|
846
|
+
|
|
847
|
+
For `pa:export`:
|
|
848
|
+
1. Gather all ProAgents data:
|
|
849
|
+
- proagents.config.yaml
|
|
850
|
+
- context.md
|
|
851
|
+
- decisions.md
|
|
852
|
+
- feedback.md
|
|
853
|
+
- active-features/
|
|
854
|
+
- learned patterns
|
|
855
|
+
2. Create export file: `proagents-export-YYYY-MM-DD.json`
|
|
856
|
+
3. Optionally encrypt sensitive data
|
|
857
|
+
|
|
858
|
+
For `pa:import`:
|
|
859
|
+
1. Read export file
|
|
860
|
+
2. Validate format
|
|
861
|
+
3. Merge or replace existing data
|
|
862
|
+
4. Report what was imported
|
|
863
|
+
|
|
864
|
+
For `pa:backup`:
|
|
865
|
+
1. Create timestamped backup of entire proagents/ folder
|
|
866
|
+
2. Save to `./proagents/backups/` or specified location
|
|
867
|
+
3. Compress if large
|
|
868
|
+
4. Maintain rolling backups (keep last N)
|
|
869
|
+
|
|
870
|
+
### Learning & AI
|
|
871
|
+
| Command | Action |
|
|
872
|
+
|---------|--------|
|
|
873
|
+
| `pa:learn "pattern"` | Teach AI a new pattern |
|
|
874
|
+
| `pa:learn-from "file"` | Learn patterns from file |
|
|
875
|
+
| `pa:forget "pattern"` | Remove learned pattern |
|
|
876
|
+
| `pa:suggestions` | Show AI suggestions for project |
|
|
877
|
+
| `pa:suggestions-apply` | Apply a suggestion |
|
|
878
|
+
|
|
879
|
+
**How to execute Learning commands:**
|
|
880
|
+
|
|
881
|
+
For `pa:learn`:
|
|
882
|
+
1. Parse the pattern description
|
|
883
|
+
2. Add to `./proagents/.learning/`:
|
|
884
|
+
```json
|
|
885
|
+
{
|
|
886
|
+
"pattern": "Always use React Query for API calls",
|
|
887
|
+
"type": "preference",
|
|
888
|
+
"added": "2024-03-06",
|
|
889
|
+
"added_by": "user",
|
|
890
|
+
"applies_to": ["api", "data-fetching"]
|
|
891
|
+
}
|
|
892
|
+
```
|
|
893
|
+
3. Confirm pattern learned
|
|
894
|
+
|
|
895
|
+
For `pa:forget`:
|
|
896
|
+
1. Find matching pattern
|
|
897
|
+
2. Remove from learning data
|
|
898
|
+
3. Confirm removal
|
|
899
|
+
|
|
900
|
+
For `pa:suggestions`:
|
|
901
|
+
1. Analyze project state
|
|
902
|
+
2. Check learned patterns
|
|
903
|
+
3. Generate suggestions:
|
|
904
|
+
```
|
|
905
|
+
AI Suggestions
|
|
906
|
+
══════════════
|
|
907
|
+
1. [Code Quality] Consider adding error boundaries to page components
|
|
908
|
+
2. [Performance] Bundle size increased 15% - review new dependencies
|
|
909
|
+
3. [Testing] Test coverage dropped below 80% in src/utils/
|
|
910
|
+
4. [Security] 2 dependencies have known vulnerabilities
|
|
911
|
+
```
|
|
912
|
+
4. Offer to apply each suggestion
|
|
913
|
+
|
|
286
914
|
### AI Platform Management
|
|
287
915
|
| Command | Action |
|
|
288
916
|
|---------|--------|
|
package/proagents/PROAGENTS.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Execute these commands when user types them (prefix: `pa:`):
|
|
4
4
|
|
|
5
5
|
## Quick Aliases
|
|
6
|
-
`pa:f` → feature | `pa:s` → status | `pa:h` → help | `pa:d` → doc | `pa:t` → test | `pa:q` → qa
|
|
6
|
+
`pa:f` → feature | `pa:s` → status | `pa:h` → help | `pa:d` → doc | `pa:t` → test | `pa:q` → qa | `pa:a` → analyze | `pa:r` → requirements | `pa:p` → plan | `pa:i` → implement
|
|
7
7
|
|
|
8
8
|
> **Multi-AI Note:** Multiple AIs may work on this project. Always read `./proagents/activity.log` before executing commands, and log your actions after completing them.
|
|
9
9
|
|
|
@@ -14,6 +14,11 @@ Execute these commands when user types them (prefix: `pa:`):
|
|
|
14
14
|
| `pa:help` | Show this command table |
|
|
15
15
|
| `pa:feature "name"` | Create `./proagents/active-features/feature-[name]/`, analyze codebase, implement feature |
|
|
16
16
|
| `pa:fix "description"` | Find bug, fix it, update `./CHANGELOG.md` |
|
|
17
|
+
| `pa:analyze` | Deep codebase analysis → `./proagents/cache/` |
|
|
18
|
+
| `pa:requirements` | Gather requirements → `./proagents/active-features/` |
|
|
19
|
+
| `pa:design` | UI/Architecture design phase |
|
|
20
|
+
| `pa:plan` | Create implementation plan |
|
|
21
|
+
| `pa:implement` | Execute implementation phase |
|
|
17
22
|
| `pa:status` | Read `./proagents/active-features/*/status.json`, show progress |
|
|
18
23
|
| `pa:qa` | Check code quality, run tests, report issues |
|
|
19
24
|
| `pa:test` | Create/run tests for current work |
|
|
@@ -36,6 +41,120 @@ Execute these commands when user types them (prefix: `pa:`):
|
|
|
36
41
|
| `pa:standup` | Generate daily standup summary |
|
|
37
42
|
| `pa:tech-debt` | Scan for technical debt |
|
|
38
43
|
|
|
44
|
+
## Navigation & Flow
|
|
45
|
+
|
|
46
|
+
| Command | What to Do |
|
|
47
|
+
|---------|------------|
|
|
48
|
+
| `pa:next` | Show next step in current workflow |
|
|
49
|
+
| `pa:resume` | Resume paused feature from last checkpoint |
|
|
50
|
+
| `pa:skip` | Skip current phase, move to next |
|
|
51
|
+
| `pa:back` | Go back to previous phase |
|
|
52
|
+
| `pa:progress` | Show visual progress bar |
|
|
53
|
+
|
|
54
|
+
## Context & History
|
|
55
|
+
|
|
56
|
+
| Command | What to Do |
|
|
57
|
+
|---------|------------|
|
|
58
|
+
| `pa:context` | View project context |
|
|
59
|
+
| `pa:diff` | Show changes since last session |
|
|
60
|
+
| `pa:history` | Show command history with results |
|
|
61
|
+
| `pa:checkpoint` | Create snapshot/restore point |
|
|
62
|
+
| `pa:undo` | Undo last AI action (git revert) |
|
|
63
|
+
|
|
64
|
+
## Sprint & Estimation
|
|
65
|
+
|
|
66
|
+
| Command | What to Do |
|
|
67
|
+
|---------|------------|
|
|
68
|
+
| `pa:sprint-start` | Start new sprint → `./proagents/sprints/` |
|
|
69
|
+
| `pa:sprint-end` | End sprint with summary |
|
|
70
|
+
| `pa:estimate` | Estimate task complexity (S/M/L/XL) |
|
|
71
|
+
| `pa:velocity` | Show velocity metrics |
|
|
72
|
+
|
|
73
|
+
## Integration
|
|
74
|
+
|
|
75
|
+
| Command | What to Do |
|
|
76
|
+
|---------|------------|
|
|
77
|
+
| `pa:github` | GitHub commands (issue, PR) |
|
|
78
|
+
| `pa:github-pr` | Create pull request |
|
|
79
|
+
| `pa:jira` | Sync with Jira ticket |
|
|
80
|
+
| `pa:notify` | Send notification (Slack/email) |
|
|
81
|
+
|
|
82
|
+
## Code Quality
|
|
83
|
+
|
|
84
|
+
| Command | What to Do |
|
|
85
|
+
|---------|------------|
|
|
86
|
+
| `pa:metrics` | Show code quality metrics |
|
|
87
|
+
| `pa:coverage` | Show test coverage report |
|
|
88
|
+
| `pa:deps` | Analyze dependencies |
|
|
89
|
+
| `pa:deps-outdated` | Find outdated packages |
|
|
90
|
+
| `pa:deps-security` | Security scan dependencies |
|
|
91
|
+
|
|
92
|
+
## Code Generation
|
|
93
|
+
|
|
94
|
+
| Command | What to Do |
|
|
95
|
+
|---------|------------|
|
|
96
|
+
| `pa:generate` | Show generation options |
|
|
97
|
+
| `pa:generate-component "name"` | Generate component from template |
|
|
98
|
+
| `pa:generate-api "name"` | Generate API endpoint |
|
|
99
|
+
| `pa:generate-test "file"` | Generate test file |
|
|
100
|
+
|
|
101
|
+
## Refactoring
|
|
102
|
+
|
|
103
|
+
| Command | What to Do |
|
|
104
|
+
|---------|------------|
|
|
105
|
+
| `pa:refactor` | Suggest refactoring opportunities |
|
|
106
|
+
| `pa:rename "old" "new"` | Rename across codebase |
|
|
107
|
+
| `pa:extract "name"` | Extract function/component |
|
|
108
|
+
| `pa:cleanup` | Remove dead code, unused imports |
|
|
109
|
+
|
|
110
|
+
## Time Tracking
|
|
111
|
+
|
|
112
|
+
| Command | What to Do |
|
|
113
|
+
|---------|------------|
|
|
114
|
+
| `pa:time-start` | Start tracking → `./proagents/time-tracking.json` |
|
|
115
|
+
| `pa:time-stop` | Stop tracking, save duration |
|
|
116
|
+
| `pa:time-report` | Show time report by feature |
|
|
117
|
+
|
|
118
|
+
## Environment & Setup
|
|
119
|
+
|
|
120
|
+
| Command | What to Do |
|
|
121
|
+
|---------|------------|
|
|
122
|
+
| `pa:env-check` | Verify environment setup |
|
|
123
|
+
| `pa:env-setup` | Setup dev environment |
|
|
124
|
+
| `pa:secrets-scan` | Scan for exposed secrets |
|
|
125
|
+
|
|
126
|
+
## Database
|
|
127
|
+
|
|
128
|
+
| Command | What to Do |
|
|
129
|
+
|---------|------------|
|
|
130
|
+
| `pa:db-migrate` | Run database migrations |
|
|
131
|
+
| `pa:db-seed` | Seed with test data |
|
|
132
|
+
| `pa:db-reset` | Reset database (caution!) |
|
|
133
|
+
|
|
134
|
+
## Accessibility & Performance
|
|
135
|
+
|
|
136
|
+
| Command | What to Do |
|
|
137
|
+
|---------|------------|
|
|
138
|
+
| `pa:a11y` | Run accessibility audit |
|
|
139
|
+
| `pa:lighthouse` | Run Lighthouse audit |
|
|
140
|
+
| `pa:perf` | Performance analysis |
|
|
141
|
+
|
|
142
|
+
## Export & Backup
|
|
143
|
+
|
|
144
|
+
| Command | What to Do |
|
|
145
|
+
|---------|------------|
|
|
146
|
+
| `pa:export` | Export config/data → JSON file |
|
|
147
|
+
| `pa:import` | Import from export file |
|
|
148
|
+
| `pa:backup` | Backup proagents folder |
|
|
149
|
+
|
|
150
|
+
## Learning & AI
|
|
151
|
+
|
|
152
|
+
| Command | What to Do |
|
|
153
|
+
|---------|------------|
|
|
154
|
+
| `pa:learn "pattern"` | Teach AI a pattern |
|
|
155
|
+
| `pa:forget "pattern"` | Remove learned pattern |
|
|
156
|
+
| `pa:suggestions` | Show AI suggestions |
|
|
157
|
+
|
|
39
158
|
## Key Files to Read
|
|
40
159
|
|
|
41
160
|
| File | Purpose |
|
|
@@ -48,16 +167,20 @@ Execute these commands when user types them (prefix: `pa:`):
|
|
|
48
167
|
|
|
49
168
|
## Feature Workflow
|
|
50
169
|
|
|
51
|
-
`pa:feature`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
170
|
+
`pa:feature` runs all phases, or run individually:
|
|
171
|
+
|
|
172
|
+
| Phase | Command | Action |
|
|
173
|
+
|-------|---------|--------|
|
|
174
|
+
| 1. Init | `pa:feature "name"` | Create tracking files |
|
|
175
|
+
| 2. Analysis | `pa:analyze` | Understand existing code |
|
|
176
|
+
| 3. Requirements | `pa:requirements` | Define what to build |
|
|
177
|
+
| 4. Design | `pa:design` | Plan UI/architecture |
|
|
178
|
+
| 5. Planning | `pa:plan` | Create implementation plan |
|
|
179
|
+
| 6. Implementation | `pa:implement` | Write code |
|
|
180
|
+
| 7. Testing | `pa:test` | Create/run tests |
|
|
181
|
+
| 8. Review | `pa:review` | Quality check |
|
|
182
|
+
| 9. Documentation | `pa:doc` | Update docs |
|
|
183
|
+
| 10. Deployment | `pa:deploy` | Prepare release |
|
|
61
184
|
|
|
62
185
|
## Save Locations
|
|
63
186
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Backups
|
|
2
|
+
|
|
3
|
+
This folder contains ProAgents backups created with `pa:backup`.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `pa:backup` - Create full backup
|
|
8
|
+
- `pa:backup-restore` - Restore from backup
|
|
9
|
+
|
|
10
|
+
## Backup Format
|
|
11
|
+
|
|
12
|
+
Backups are stored as timestamped folders or compressed archives:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
backups/
|
|
16
|
+
├── 2024-03-06-150000/
|
|
17
|
+
│ ├── proagents.config.yaml
|
|
18
|
+
│ ├── context.md
|
|
19
|
+
│ ├── decisions.md
|
|
20
|
+
│ ├── feedback.md
|
|
21
|
+
│ ├── active-features/
|
|
22
|
+
│ └── ...
|
|
23
|
+
└── 2024-03-05-100000.tar.gz
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Retention
|
|
27
|
+
|
|
28
|
+
By default, the last 5 backups are kept. Configure in proagents.config.yaml:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
backup:
|
|
32
|
+
retention: 5
|
|
33
|
+
compress: true
|
|
34
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"checkpoints": [],
|
|
3
|
+
"_comment": "Checkpoints are created with pa:checkpoint command",
|
|
4
|
+
"_format": {
|
|
5
|
+
"id": "cp-001",
|
|
6
|
+
"timestamp": "2024-03-06T15:00:00Z",
|
|
7
|
+
"commit": "abc123def",
|
|
8
|
+
"description": "Before major refactor",
|
|
9
|
+
"feature": "feature-name",
|
|
10
|
+
"phase": "implementation",
|
|
11
|
+
"created_by": "Claude:opus-4"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,174 +1,69 @@
|
|
|
1
|
-
# Metrics
|
|
1
|
+
# Code Metrics
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This folder contains code quality metrics and reports.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Commands
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- `pa:metrics` - Show current code quality metrics
|
|
8
|
+
- `pa:metrics-history` - Show metrics over time
|
|
9
|
+
- `pa:coverage` - Show test coverage report
|
|
10
|
+
- `pa:coverage-diff` - Show coverage changes
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Files
|
|
10
13
|
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Available Metrics
|
|
14
|
-
|
|
15
|
-
| Category | Document | Description |
|
|
16
|
-
|----------|----------|-------------|
|
|
17
|
-
| [Developer Productivity](./developer-productivity.md) | Velocity, cycle time, throughput | Track team and individual efficiency |
|
|
18
|
-
| [Code Quality KPIs](./code-quality-kpis.md) | Coverage, complexity, debt | Measure code health over time |
|
|
19
|
-
| [Deployment Metrics](./deployment-metrics.md) | DORA, frequency, stability | Track delivery performance |
|
|
20
|
-
| [Learning Effectiveness](./learning-effectiveness.md) | Adoption, improvement rates | Measure workflow optimization |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Quick Start
|
|
25
|
-
|
|
26
|
-
### Enable Metrics Collection
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
# proagents.config.yaml
|
|
30
|
-
metrics:
|
|
31
|
-
enabled: true
|
|
32
|
-
|
|
33
|
-
collection:
|
|
34
|
-
developer_productivity: true
|
|
35
|
-
code_quality: true
|
|
36
|
-
deployment: true
|
|
37
|
-
learning: true
|
|
38
|
-
|
|
39
|
-
storage:
|
|
40
|
-
type: "local" # local, database, api
|
|
41
|
-
path: ".proagents/metrics/"
|
|
42
|
-
retention_days: 90
|
|
43
|
-
|
|
44
|
-
reporting:
|
|
45
|
-
schedule: "weekly" # daily, weekly, monthly
|
|
46
|
-
format: "markdown" # markdown, json, html
|
|
47
|
-
output: "./reports/"
|
|
48
14
|
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# View current metrics dashboard
|
|
56
|
-
pa:metrics dashboard
|
|
57
|
-
|
|
58
|
-
# Generate weekly report
|
|
59
|
-
pa:metrics report --period weekly
|
|
60
|
-
|
|
61
|
-
# View specific category
|
|
62
|
-
pa:metrics productivity
|
|
63
|
-
pa:metrics quality
|
|
64
|
-
pa:metrics deployment
|
|
65
|
-
|
|
66
|
-
# Export metrics
|
|
67
|
-
pa:metrics export --format json --output ./metrics.json
|
|
15
|
+
metrics/
|
|
16
|
+
├── latest.json # Most recent metrics snapshot
|
|
17
|
+
├── history/ # Historical metrics
|
|
18
|
+
│ ├── 2024-03-01.json
|
|
19
|
+
│ └── 2024-03-15.json
|
|
20
|
+
└── README.md
|
|
68
21
|
```
|
|
69
22
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### With CI/CD
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
# .github/workflows/metrics.yml
|
|
109
|
-
- name: Collect ProAgents Metrics
|
|
110
|
-
run: |
|
|
111
|
-
proagents metrics collect \
|
|
112
|
-
--coverage ./coverage/lcov.info \
|
|
113
|
-
--tests ./test-results.xml \
|
|
114
|
-
--commit ${{ github.sha }}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### With Dashboards
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
# Export to external dashboards
|
|
121
|
-
metrics:
|
|
122
|
-
export:
|
|
123
|
-
grafana:
|
|
124
|
-
enabled: true
|
|
125
|
-
endpoint: "${GRAFANA_URL}"
|
|
126
|
-
datadog:
|
|
127
|
-
enabled: true
|
|
128
|
-
api_key: "${DD_API_KEY}"
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Reports
|
|
134
|
-
|
|
135
|
-
### Weekly Summary Template
|
|
136
|
-
|
|
137
|
-
```markdown
|
|
138
|
-
## Development Metrics - Week {{week}}
|
|
139
|
-
|
|
140
|
-
### Productivity
|
|
141
|
-
- Features Completed: {{features_completed}}
|
|
142
|
-
- Average Cycle Time: {{avg_cycle_time}}
|
|
143
|
-
- Throughput Trend: {{throughput_trend}}
|
|
144
|
-
|
|
145
|
-
### Code Quality
|
|
146
|
-
- Test Coverage: {{coverage}}% ({{coverage_trend}})
|
|
147
|
-
- New Technical Debt: {{new_debt}}
|
|
148
|
-
- Debt Resolved: {{resolved_debt}}
|
|
149
|
-
|
|
150
|
-
### Deployment
|
|
151
|
-
- Deployments: {{deployment_count}}
|
|
152
|
-
- Success Rate: {{success_rate}}%
|
|
153
|
-
- Average Lead Time: {{avg_lead_time}}
|
|
154
|
-
|
|
155
|
-
### Highlights
|
|
156
|
-
{{#each highlights}}
|
|
157
|
-
- {{this}}
|
|
158
|
-
{{/each}}
|
|
159
|
-
|
|
160
|
-
### Action Items
|
|
161
|
-
{{#each actions}}
|
|
162
|
-
- [ ] {{this}}
|
|
163
|
-
{{/each}}
|
|
23
|
+
## Metrics Format
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"timestamp": "2024-03-06T15:00:00Z",
|
|
28
|
+
"generated_by": "Claude:opus-4",
|
|
29
|
+
"summary": {
|
|
30
|
+
"total_files": 45,
|
|
31
|
+
"total_lines": 12500,
|
|
32
|
+
"languages": {
|
|
33
|
+
"typescript": 10200,
|
|
34
|
+
"javascript": 1500,
|
|
35
|
+
"css": 800
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"quality": {
|
|
39
|
+
"complexity": {
|
|
40
|
+
"average": 4.2,
|
|
41
|
+
"max": 15,
|
|
42
|
+
"high_complexity_files": ["src/utils/parser.ts"]
|
|
43
|
+
},
|
|
44
|
+
"duplication": {
|
|
45
|
+
"percentage": 3.5,
|
|
46
|
+
"duplicated_blocks": 12
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"coverage": {
|
|
50
|
+
"overall": 82,
|
|
51
|
+
"by_module": {
|
|
52
|
+
"src/auth": 95,
|
|
53
|
+
"src/api": 78,
|
|
54
|
+
"src/utils": 65
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
164
58
|
```
|
|
165
59
|
|
|
166
|
-
|
|
60
|
+
## Thresholds
|
|
167
61
|
|
|
168
|
-
|
|
62
|
+
Default thresholds (customize in proagents.config.yaml):
|
|
169
63
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
64
|
+
| Metric | Warning | Error |
|
|
65
|
+
|--------|---------|-------|
|
|
66
|
+
| Coverage | < 70% | < 50% |
|
|
67
|
+
| Complexity | > 10 | > 20 |
|
|
68
|
+
| File size | > 300 lines | > 500 lines |
|
|
69
|
+
| Duplication | > 5% | > 10% |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Sprints
|
|
2
|
+
|
|
3
|
+
This folder contains sprint tracking files.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `pa:sprint-start` - Start a new sprint
|
|
8
|
+
- `pa:sprint-end` - End sprint with summary
|
|
9
|
+
- `pa:sprint-status` - Show current sprint status
|
|
10
|
+
- `pa:velocity` - Show velocity metrics
|
|
11
|
+
|
|
12
|
+
## File Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
sprints/
|
|
16
|
+
├── sprint-1.json # Sprint data
|
|
17
|
+
├── sprint-1-summary.md # Sprint summary (generated on end)
|
|
18
|
+
├── sprint-2.json
|
|
19
|
+
└── sprint-2-summary.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Sprint File Format
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"sprint_number": 1,
|
|
27
|
+
"name": "Sprint 1",
|
|
28
|
+
"start_date": "2024-03-01",
|
|
29
|
+
"end_date": "2024-03-15",
|
|
30
|
+
"status": "active",
|
|
31
|
+
"goals": [
|
|
32
|
+
"Complete user authentication",
|
|
33
|
+
"Add dashboard UI"
|
|
34
|
+
],
|
|
35
|
+
"features": [
|
|
36
|
+
{
|
|
37
|
+
"name": "user-auth",
|
|
38
|
+
"status": "completed",
|
|
39
|
+
"points": 8
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "dashboard",
|
|
43
|
+
"status": "in_progress",
|
|
44
|
+
"points": 5
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"metrics": {
|
|
48
|
+
"planned_points": 13,
|
|
49
|
+
"completed_points": 8,
|
|
50
|
+
"velocity": 8
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Velocity Tracking
|
|
56
|
+
|
|
57
|
+
Velocity is calculated as the average story points completed per sprint.
|
|
58
|
+
Use `pa:velocity` to see trends over time.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"current": null,
|
|
3
|
+
"entries": [],
|
|
4
|
+
"_comment": "Time tracking data managed by pa:time-start/stop commands",
|
|
5
|
+
"_format": {
|
|
6
|
+
"current": {
|
|
7
|
+
"task": "feature-name",
|
|
8
|
+
"started": "2024-03-06T15:00:00Z",
|
|
9
|
+
"status": "running"
|
|
10
|
+
},
|
|
11
|
+
"entry": {
|
|
12
|
+
"task": "feature-name",
|
|
13
|
+
"started": "2024-03-06T15:00:00Z",
|
|
14
|
+
"ended": "2024-03-06T17:30:00Z",
|
|
15
|
+
"duration_minutes": 150,
|
|
16
|
+
"ai": "Claude:opus-4"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|