proagents 1.6.9 → 1.6.10
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/AI_INSTRUCTIONS.md +216 -3291
- package/.proagents/docs/README.md +27 -0
- package/.proagents/docs/command-details.md +813 -0
- package/.proagents/docs/testing.md +241 -0
- package/.proagents/prompts/06-testing.md +172 -0
- package/.proagents/prompts/07-documentation.md +62 -0
- package/.proagents/prompts/10-debug-logs.md +1130 -0
- package/README.md +22 -0
- package/package.json +1 -1
|
@@ -10,9 +10,8 @@ This project uses ProAgents - an AI-agnostic development workflow framework.
|
|
|
10
10
|
|-----------------|----------------|
|
|
11
11
|
| "To run tests: `npm test`" | Actually run `npm test` and show results |
|
|
12
12
|
| "Create tests in `__tests__/`" | Actually create the test files |
|
|
13
|
-
| "Install dependencies with `npm install`" | Actually run `npm install` |
|
|
14
13
|
| "You can fix this by..." | Actually fix it |
|
|
15
|
-
| "Next steps: 1. Create...
|
|
14
|
+
| "Next steps: 1. Create..." | Do all steps automatically |
|
|
16
15
|
|
|
17
16
|
**Rules:**
|
|
18
17
|
1. **Execute, don't instruct** - Run commands, don't tell user to run them
|
|
@@ -26,235 +25,65 @@ This project uses ProAgents - an AI-agnostic development workflow framework.
|
|
|
26
25
|
- Action is destructive and needs explicit user confirmation
|
|
27
26
|
- Action is outside the project scope (external services, deployments)
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
---
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
## Multi-AI Environment
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
**Multiple AI tools may work on this project simultaneously. They do NOT share context.**
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
2. **Read project context** - Read `./.proagents/context.md` for persistent project knowledge
|
|
37
|
-
3. **Check the activity log** - Read `./.proagents/activity.log` to see recent AI actions
|
|
38
|
-
4. **Key files to check:**
|
|
39
|
-
- `./.proagents/context.md` - Persistent project context (READ FIRST!)
|
|
40
|
-
- `./.proagents/activity.log` - Recent AI activity
|
|
41
|
-
- `./.proagents/watchlist.yaml` - Files requiring confirmation before changes
|
|
42
|
-
- `./.proagents/proagents.config.yaml` - Project and platform config
|
|
43
|
-
- `./.proagents/active-features/` - Active feature status
|
|
44
|
-
- `./CHANGELOG.md` - Recent changes
|
|
45
|
-
- `./.proagents/feedback.md` - Past corrections and preferences (LEARN FROM THESE!)
|
|
34
|
+
### Before ANY `pa:` command:
|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
1. **Read project context** - `./.proagents/context.md`
|
|
37
|
+
2. **Check activity log** - `./.proagents/activity.log`
|
|
38
|
+
3. **Check feedback** - `./.proagents/feedback.md` (learn from past corrections!)
|
|
39
|
+
4. **Check watchlist** - `./.proagents/watchlist.yaml` (files requiring confirmation)
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
- **Corrections**: Mistakes other AIs made - don't repeat them!
|
|
51
|
-
- **Preferences**: How the user/team prefers things done
|
|
52
|
-
- **Patterns**: What worked well in this project
|
|
41
|
+
### After ANY `pa:` command:
|
|
53
42
|
|
|
54
|
-
|
|
55
|
-
1. Log it in `./.proagents/feedback.md` using `pa:feedback`
|
|
56
|
-
2. Apply the learning to your current work
|
|
57
|
-
3. Avoid making the same mistake again
|
|
58
|
-
|
|
59
|
-
### File Watch List
|
|
60
|
-
|
|
61
|
-
Before modifying ANY file, check `./.proagents/watchlist.yaml`:
|
|
62
|
-
|
|
63
|
-
- **critical**: Ask user for confirmation before modifying
|
|
64
|
-
- **review_required**: Warn user and explain changes before modifying
|
|
65
|
-
- **never_modify**: NEVER modify these files/patterns
|
|
66
|
-
|
|
67
|
-
If a file matches a pattern, inform the user:
|
|
68
|
-
> "This file is on the watch list (critical). Do you want me to proceed with the changes?"
|
|
69
|
-
4. **If you detect conflicts or outdated state:**
|
|
70
|
-
- Inform the user: "I notice [X] may have changed since my last context. Let me refresh..."
|
|
71
|
-
- Re-read the relevant files before proceeding
|
|
72
|
-
|
|
73
|
-
### After completing ANY `pa:` command:
|
|
74
|
-
|
|
75
|
-
**ALWAYS log your activity** to `./.proagents/activity.log`:
|
|
43
|
+
**MANDATORY: Log every command to `./.proagents/activity.log`**
|
|
76
44
|
|
|
45
|
+
AI must append to activity.log (create if not exists):
|
|
77
46
|
```
|
|
78
|
-
[TIMESTAMP] [
|
|
47
|
+
[TIMESTAMP] [AI:MODEL] [COMMAND] Result/Description
|
|
79
48
|
```
|
|
80
49
|
|
|
81
50
|
Example entries:
|
|
82
51
|
```
|
|
83
52
|
2024-03-06 15:10 [Claude:opus-4] [pa:feature] Started feature "user-auth"
|
|
84
|
-
2024-03-06 15:
|
|
85
|
-
2024-03-06 15:
|
|
86
|
-
2024-03-06
|
|
87
|
-
2024-03-06 15:25 [Copilot:gpt-4o] [pa:test] Added unit tests for auth module
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Include your model name** (e.g., opus-4, sonnet-4, gpt-4o, gemini-1.5-pro).
|
|
91
|
-
Keep log entries concise (one line). Other AIs will read this to understand recent changes.
|
|
92
|
-
|
|
93
|
-
### Command History
|
|
94
|
-
|
|
95
|
-
Also log commands to `./.proagents/history.log` with their results:
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
[TIMESTAMP] [AI:MODEL] COMMAND → RESULT
|
|
53
|
+
2024-03-06 15:15 [Claude:opus-4] [pa:analyze] Analyzed codebase - found 45 files
|
|
54
|
+
2024-03-06 15:30 [Cursor:gpt-4] [pa:test] Ran 12 tests - all passed
|
|
55
|
+
2024-03-06 16:00 [Gemini:pro] [pa:logs] Captured 50 log entries, found 2 errors
|
|
99
56
|
```
|
|
100
57
|
|
|
101
|
-
|
|
58
|
+
**How to log (AI executes this after EVERY pa: command):**
|
|
59
|
+
```bash
|
|
60
|
+
echo "[$(date '+%Y-%m-%d %H:%M')] [Claude:opus-4] [pa:feature] Started user-auth" >> .proagents/activity.log
|
|
102
61
|
```
|
|
103
|
-
2024-03-06 15:10 [Claude:opus-4] pa:feature "user-auth" → Started
|
|
104
|
-
2024-03-06 15:30 [Claude:opus-4] pa:feature "user-auth" → Completed
|
|
105
|
-
2024-03-06 15:35 [Cursor:gpt-4o] pa:test → 15 passed, 2 failed
|
|
106
|
-
2024-03-06 15:40 [Claude:sonnet-4] pa:fix "login bug" → Fixed
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
This helps track what commands were run and their outcomes.
|
|
110
62
|
|
|
111
|
-
|
|
63
|
+
**CRITICAL:**
|
|
64
|
+
- Log AFTER the "--- Activity Log Start ---" marker
|
|
65
|
+
- Use YOUR AI platform name (Claude, Cursor, Gemini, etc.)
|
|
66
|
+
- Log EVERY pa: command, not just major ones
|
|
112
67
|
|
|
113
|
-
|
|
68
|
+
### Lock File
|
|
114
69
|
|
|
70
|
+
For major tasks, create `./.proagents/.lock`:
|
|
115
71
|
```yaml
|
|
116
|
-
locked_by: Claude
|
|
117
|
-
model: opus-4
|
|
118
|
-
started: 2024-03-06T15:10:00
|
|
72
|
+
locked_by: Claude
|
|
73
|
+
model: opus-4
|
|
119
74
|
task: "pa:feature user-auth"
|
|
120
|
-
|
|
121
|
-
files:
|
|
122
|
-
- src/auth/*
|
|
123
|
-
- src/api/auth.ts
|
|
124
|
-
expires: 2024-03-06T17:10:00 # Auto-expires after 2 hours
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Before starting major work:**
|
|
128
|
-
1. Check if `./.proagents/.lock` exists
|
|
129
|
-
2. If locked by another AI, inform user: "Project is locked by [AI] working on [task]. Wait or ask user to override."
|
|
130
|
-
3. If lock is expired (past `expires` time), you may delete it and proceed
|
|
131
|
-
|
|
132
|
-
**After completing work:**
|
|
133
|
-
1. Delete the `./.proagents/.lock` file
|
|
134
|
-
2. Log completion in activity.log
|
|
135
|
-
|
|
136
|
-
### Conflict Detection
|
|
137
|
-
|
|
138
|
-
Before modifying any file, check for potential conflicts:
|
|
139
|
-
|
|
140
|
-
1. **Read activity.log** - See if another AI recently modified the same file
|
|
141
|
-
2. **Check lock file** - See if another AI is working on related files
|
|
142
|
-
3. **Look for patterns** like:
|
|
143
|
-
```
|
|
144
|
-
2024-03-06 15:10 [Cursor:gpt-4o] Modified src/auth/login.ts
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**If you detect a potential conflict:**
|
|
148
|
-
|
|
149
|
-
Warn the user:
|
|
150
|
-
> "I notice [Other AI] modified `src/auth/login.ts` 10 minutes ago.
|
|
151
|
-
> There may be uncommitted changes. Should I:
|
|
152
|
-
> 1. Proceed anyway (may overwrite their changes)
|
|
153
|
-
> 2. Wait and check with them first
|
|
154
|
-
> 3. Show me the recent changes to this file"
|
|
155
|
-
|
|
156
|
-
**After modifying files, always log:**
|
|
157
|
-
```
|
|
158
|
-
[TIMESTAMP] [AI:MODEL] [MODIFIED] file1.ts, file2.ts
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
This helps other AIs detect conflicts.
|
|
162
|
-
|
|
163
|
-
**Lock commands:**
|
|
164
|
-
| Command | Action |
|
|
165
|
-
|---------|--------|
|
|
166
|
-
| `pa:lock` | Show current lock status |
|
|
167
|
-
| `pa:lock-release` | Release lock (if you hold it) |
|
|
168
|
-
| `pa:lock-override` | Force release lock (requires user confirmation) |
|
|
169
|
-
|
|
170
|
-
### Handoff Notes
|
|
171
|
-
|
|
172
|
-
When ending a session or switching to another AI, create handoff notes at `./.proagents/handoff.md`:
|
|
173
|
-
|
|
174
|
-
**For `pa:handoff`** - Create/update handoff notes:
|
|
175
|
-
```markdown
|
|
176
|
-
# AI Handoff Notes
|
|
177
|
-
Updated: 2024-03-06 15:30 by Claude (opus-4)
|
|
178
|
-
|
|
179
|
-
## Current Status
|
|
180
|
-
- **Working on:** User authentication feature
|
|
181
|
-
- **Phase:** Implementation (5 of 9)
|
|
182
|
-
- **Branch:** feature/user-auth
|
|
183
|
-
|
|
184
|
-
## Completed
|
|
185
|
-
- [x] Login UI component
|
|
186
|
-
- [x] JWT token generation
|
|
187
|
-
- [x] Password hashing setup
|
|
188
|
-
|
|
189
|
-
## In Progress
|
|
190
|
-
- [ ] Password reset flow (50% done)
|
|
191
|
-
- [ ] Email verification endpoint
|
|
192
|
-
|
|
193
|
-
## Blocked / Needs Attention
|
|
194
|
-
- Need API endpoint for sending emails (waiting on backend team)
|
|
195
|
-
- Rate limiting not yet implemented
|
|
196
|
-
|
|
197
|
-
## Files Modified
|
|
198
|
-
- src/auth/login.tsx
|
|
199
|
-
- src/auth/jwt.ts
|
|
200
|
-
- src/api/auth.ts
|
|
201
|
-
|
|
202
|
-
## Next Steps
|
|
203
|
-
1. Complete password reset flow
|
|
204
|
-
2. Add email verification
|
|
205
|
-
3. Write tests for auth module
|
|
206
|
-
|
|
207
|
-
## Notes for Next AI
|
|
208
|
-
- Using bcrypt for password hashing (see src/auth/hash.ts)
|
|
209
|
-
- JWT secret is in .env.local
|
|
210
|
-
- Test user: test@example.com / password123
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**For `pa:handoff-read`** - Read and summarize current handoff notes before starting work.
|
|
214
|
-
|
|
215
|
-
### Session Summary
|
|
216
|
-
|
|
217
|
-
**For `pa:session-end`** - Generate and save a session summary to `./.proagents/sessions/`:
|
|
218
|
-
|
|
219
|
-
```markdown
|
|
220
|
-
# Session Summary
|
|
221
|
-
Date: 2024-03-06 15:00-17:30
|
|
222
|
-
AI: Claude (opus-4)
|
|
223
|
-
|
|
224
|
-
## What Was Done
|
|
225
|
-
- Implemented user authentication feature
|
|
226
|
-
- Fixed 3 bugs in login flow
|
|
227
|
-
- Added unit tests for auth module
|
|
228
|
-
|
|
229
|
-
## Files Modified
|
|
230
|
-
- src/auth/login.tsx (created)
|
|
231
|
-
- src/auth/jwt.ts (created)
|
|
232
|
-
- src/api/auth.ts (modified)
|
|
233
|
-
- tests/auth.test.ts (created)
|
|
234
|
-
|
|
235
|
-
## Commands Executed
|
|
236
|
-
- pa:feature "user-auth" → Completed
|
|
237
|
-
- pa:test → 15 passed, 0 failed
|
|
238
|
-
- pa:doc → Updated API docs
|
|
239
|
-
|
|
240
|
-
## Issues Encountered
|
|
241
|
-
- Rate limiting not yet implemented (deferred)
|
|
242
|
-
|
|
243
|
-
## Next Session Should
|
|
244
|
-
1. Implement rate limiting
|
|
245
|
-
2. Add password reset flow
|
|
246
|
-
3. Write integration tests
|
|
75
|
+
expires: 2024-03-06T17:10:00
|
|
247
76
|
```
|
|
248
77
|
|
|
249
|
-
|
|
78
|
+
Check lock before starting. Delete when done.
|
|
250
79
|
|
|
251
|
-
|
|
80
|
+
---
|
|
252
81
|
|
|
253
|
-
|
|
82
|
+
## Command Quick Reference
|
|
254
83
|
|
|
255
|
-
###
|
|
256
|
-
| Alias |
|
|
257
|
-
|
|
84
|
+
### Aliases
|
|
85
|
+
| Alias | Command |
|
|
86
|
+
|-------|---------|
|
|
258
87
|
| `pa:f` | `pa:feature` |
|
|
259
88
|
| `pa:s` | `pa:status` |
|
|
260
89
|
| `pa:h` | `pa:help` |
|
|
@@ -265,3160 +94,256 @@ When the user types commands starting with `pa:`, recognize and execute them.
|
|
|
265
94
|
| `pa:r` | `pa:requirements` |
|
|
266
95
|
| `pa:p` | `pa:plan` |
|
|
267
96
|
| `pa:i` | `pa:implement` |
|
|
97
|
+
| `pa:rev` | `pa:review` |
|
|
98
|
+
| `pa:dbg` | `pa:debug` |
|
|
99
|
+
| `pa:l` | `pa:logs` |
|
|
268
100
|
|
|
269
|
-
###
|
|
101
|
+
### Core Commands
|
|
270
102
|
| Command | Action |
|
|
271
103
|
|---------|--------|
|
|
272
|
-
| `pa:
|
|
273
|
-
| `pa:help` | Show all available commands |
|
|
104
|
+
| `pa:help` | Show all commands |
|
|
274
105
|
| `pa:status` | Show current progress |
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
For `pa:status` (or `pa:s`):
|
|
279
|
-
1. **Read the ACTUAL data** from `./.proagents/active-features/_index.json`
|
|
280
|
-
2. **Check if empty** - if `active_features`, `paused_features`, and `completed_features` are all empty arrays:
|
|
281
|
-
```
|
|
282
|
-
Project Status
|
|
283
|
-
══════════════
|
|
284
|
-
|
|
285
|
-
No features currently tracked.
|
|
286
|
-
|
|
287
|
-
Start a new feature with:
|
|
288
|
-
→ pa:feature-start "feature name"
|
|
289
|
-
|
|
290
|
-
Or quick bug fix:
|
|
291
|
-
→ pa:fix "bug description"
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
3. **If has features**, show real status:
|
|
295
|
-
```
|
|
296
|
-
Project Status
|
|
297
|
-
══════════════
|
|
298
|
-
|
|
299
|
-
Active Features: [count]
|
|
300
|
-
────────────────────────
|
|
301
|
-
• [feature-name] - [phase] ([progress]%)
|
|
302
|
-
Branch: [branch]
|
|
303
|
-
Last updated: [timestamp]
|
|
304
|
-
|
|
305
|
-
Paused Features: [count]
|
|
306
|
-
────────────────────────
|
|
307
|
-
• [feature-name] - Paused: [reason]
|
|
308
|
-
|
|
309
|
-
Completed Features: [count]
|
|
310
|
-
──────────────────────────
|
|
311
|
-
• [feature-name] - Completed [date]
|
|
312
|
-
|
|
313
|
-
Next Steps:
|
|
314
|
-
→ [suggested action based on current state]
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
4. **NEVER show example/template data** - only show what's actually in the JSON file
|
|
318
|
-
|
|
319
|
-
### Feature Development
|
|
320
|
-
| Command | Action |
|
|
321
|
-
|---------|--------|
|
|
322
|
-
| `pa:feature "name"` | Start new feature workflow |
|
|
323
|
-
| `pa:feature-start "name"` | Start new feature |
|
|
324
|
-
| `pa:feature-status` | Check feature status |
|
|
106
|
+
| `pa:feature "name"` | Start new feature |
|
|
107
|
+
| `pa:fix "bug"` | Quick bug fix |
|
|
325
108
|
| `pa:feature-list` | List all features |
|
|
326
109
|
| `pa:feature-complete` | Mark feature complete |
|
|
327
|
-
| `pa:fix "description"` | Quick bug fix mode |
|
|
328
|
-
|
|
329
|
-
### Workflow Phase Commands
|
|
330
|
-
Run individual phases of the development workflow:
|
|
331
|
-
|
|
332
|
-
| Command | Phase | Action |
|
|
333
|
-
|---------|-------|--------|
|
|
334
|
-
| `pa:analyze` | Analysis | Deep codebase analysis - structure, patterns, dependencies |
|
|
335
|
-
| `pa:analyze-full` | Analysis | Comprehensive analysis with full depth |
|
|
336
|
-
| `pa:analyze-quick` | Analysis | Quick overview analysis |
|
|
337
|
-
| `pa:requirements` | Requirements | Gather and document feature requirements |
|
|
338
|
-
| `pa:requirements "feature"` | Requirements | Requirements for specific feature |
|
|
339
|
-
| `pa:design` | Design | UI/UX and architecture design |
|
|
340
|
-
| `pa:design-ui` | Design | Focus on UI/UX design |
|
|
341
|
-
| `pa:design-arch` | Design | Focus on architecture design |
|
|
342
|
-
| `pa:plan` | Planning | Create implementation plan |
|
|
343
|
-
| `pa:plan "feature"` | Planning | Plan specific feature implementation |
|
|
344
|
-
| `pa:implement` | Implementation | Execute implementation phase |
|
|
345
|
-
| `pa:implement-continue` | Implementation | Continue paused implementation |
|
|
346
|
-
|
|
347
|
-
**How to execute Workflow Phase commands:**
|
|
348
|
-
|
|
349
|
-
For `pa:analyze`:
|
|
350
|
-
1. Read `./.proagents/prompts/01-analysis.md` for analysis workflow
|
|
351
|
-
2. Scan project structure, dependencies, patterns
|
|
352
|
-
3. Cache results in `./.proagents/cache/`
|
|
353
|
-
4. Output analysis report
|
|
354
|
-
|
|
355
|
-
For `pa:requirements`:
|
|
356
|
-
1. Read `./.proagents/prompts/02-requirements.md`
|
|
357
|
-
2. If feature name provided, create `./.proagents/active-features/feature-{name}/requirements.md`
|
|
358
|
-
3. Gather user stories, acceptance criteria, constraints
|
|
359
|
-
4. Output requirements document
|
|
360
|
-
|
|
361
|
-
For `pa:design`:
|
|
362
|
-
1. Read `./.proagents/prompts/03-ui-design.md`
|
|
363
|
-
2. Check for design inputs (Figma, sketches, exports)
|
|
364
|
-
3. Create component specifications
|
|
365
|
-
4. Output design document
|
|
366
|
-
|
|
367
|
-
For `pa:plan`:
|
|
368
|
-
1. Read `./.proagents/prompts/04-planning.md`
|
|
369
|
-
2. Create implementation plan with task breakdown
|
|
370
|
-
3. Identify dependencies and risks
|
|
371
|
-
4. Save to `./.proagents/active-features/feature-{name}/implementation-plan.md`
|
|
372
|
-
|
|
373
|
-
For `pa:implement`:
|
|
374
|
-
1. Read `./.proagents/prompts/05-implementation.md`
|
|
375
|
-
2. Follow existing project patterns
|
|
376
|
-
3. Implement code changes
|
|
377
|
-
4. Log progress to activity.log
|
|
378
|
-
|
|
379
|
-
### Documentation Commands
|
|
380
|
-
| Command | Action |
|
|
381
|
-
|---------|--------|
|
|
382
|
-
| `pa:doc` | Show documentation options |
|
|
383
|
-
| `pa:doc-full` | Generate full project documentation |
|
|
384
|
-
| `pa:doc-moderate` | Generate balanced documentation |
|
|
385
|
-
| `pa:doc-lite` | Generate quick reference |
|
|
386
|
-
| `pa:doc-module [name]` | Document specific module |
|
|
387
|
-
| `pa:doc-file [path]` | Document specific file |
|
|
388
|
-
| `pa:doc-api` | Generate API documentation |
|
|
389
|
-
| `pa:readme` | Generate/update README |
|
|
390
|
-
| `pa:changelog` | Update CHANGELOG.md |
|
|
391
|
-
| `pa:release` | Generate release notes |
|
|
392
|
-
| `pa:release [version]` | Version-specific release notes |
|
|
393
|
-
|
|
394
|
-
### Quality & Testing
|
|
395
|
-
| Command | Action |
|
|
396
|
-
|---------|--------|
|
|
397
|
-
| `pa:qa` | Run quality assurance checks |
|
|
398
|
-
| `pa:test` | Run test workflow |
|
|
399
|
-
| `pa:review` | Code review workflow |
|
|
400
110
|
|
|
401
|
-
###
|
|
111
|
+
### Workflow Phases
|
|
402
112
|
| Command | Action |
|
|
403
113
|
|---------|--------|
|
|
114
|
+
| `pa:analyze` | Codebase analysis |
|
|
115
|
+
| `pa:requirements` | Gather requirements |
|
|
116
|
+
| `pa:design` | UI/architecture design |
|
|
117
|
+
| `pa:plan` | Create implementation plan |
|
|
118
|
+
| `pa:implement` | Execute implementation |
|
|
119
|
+
| `pa:test` | Run tests |
|
|
120
|
+
| `pa:review` | Code review |
|
|
121
|
+
| `pa:doc` | Generate documentation |
|
|
404
122
|
| `pa:deploy` | Deployment preparation |
|
|
405
|
-
| `pa:rollback` | Rollback procedures |
|
|
406
|
-
|
|
407
|
-
**How to execute Quality, Testing & Deployment commands (FULL AUTOMATION):**
|
|
408
|
-
|
|
409
|
-
For `pa:test`:
|
|
410
|
-
1. **Detect project type** and test framework (Jest, Vitest, Mocha, Pytest, etc.)
|
|
411
|
-
2. **Auto-install missing test dependencies** (no confirmation)
|
|
412
|
-
3. **Run all tests:**
|
|
413
|
-
```
|
|
414
|
-
Running tests...
|
|
415
|
-
✓ 45 passed
|
|
416
|
-
✗ 3 failed
|
|
417
|
-
```
|
|
418
|
-
4. **Auto-fix ALL failures** (no confirmation):
|
|
419
|
-
```
|
|
420
|
-
AUTO-FIX: Fixing 3 failed tests...
|
|
421
|
-
|
|
422
|
-
Fix 1/3: UserService.test.ts
|
|
423
|
-
─────────────────────────────
|
|
424
|
-
Root cause: Expected 'user' but got 'undefined'
|
|
425
|
-
Fixing: src/services/UserService.ts:23
|
|
426
|
-
→ Added null check before return
|
|
427
|
-
Re-running test... ✓ PASSED
|
|
428
|
-
```
|
|
429
|
-
5. **Loop until all pass** or fix is impossible
|
|
430
|
-
6. **Generate report** at `.proagents/test-reports/`
|
|
431
|
-
|
|
432
|
-
For `pa:qa`:
|
|
433
|
-
1. **Run ALL quality checks** automatically:
|
|
434
|
-
- Linting (ESLint, Prettier)
|
|
435
|
-
- Type checking (TypeScript)
|
|
436
|
-
- Security scan (npm audit)
|
|
437
|
-
- Dead code detection
|
|
438
|
-
2. **Auto-fix ALL issues** (no confirmation):
|
|
439
|
-
```
|
|
440
|
-
Running QA checks...
|
|
441
|
-
|
|
442
|
-
ESLint: 12 errors found
|
|
443
|
-
AUTO-FIX: Fixing...
|
|
444
|
-
→ Fixed 12/12 errors
|
|
445
|
-
|
|
446
|
-
TypeScript: 3 type errors
|
|
447
|
-
AUTO-FIX: Fixing...
|
|
448
|
-
→ src/api/user.ts:15 - Added type annotation
|
|
449
|
-
→ src/utils/date.ts:8 - Fixed return type
|
|
450
|
-
→ src/hooks/useAuth.ts:22 - Added null check
|
|
451
|
-
|
|
452
|
-
Prettier: 28 files need formatting
|
|
453
|
-
AUTO-FIX: Formatting... ✓ Done
|
|
454
|
-
|
|
455
|
-
npm audit: 2 vulnerabilities
|
|
456
|
-
AUTO-FIX: Running npm audit fix... ✓ Fixed
|
|
457
|
-
```
|
|
458
|
-
3. **Re-run checks** to verify all fixed
|
|
459
|
-
4. **Only report issues that cannot be auto-fixed**
|
|
460
|
-
|
|
461
|
-
For `pa:fix "description"`:
|
|
462
|
-
1. **Understand the bug** from description
|
|
463
|
-
2. **Find the root cause** automatically
|
|
464
|
-
3. **Apply the fix** directly (no confirmation)
|
|
465
|
-
4. **Run related tests** to verify fix works
|
|
466
|
-
5. **Auto-fix any test failures** caused by the fix
|
|
467
|
-
6. **Commit when done** (if git is configured)
|
|
468
|
-
```
|
|
469
|
-
pa:fix "login button not working"
|
|
470
|
-
|
|
471
|
-
Finding root cause...
|
|
472
|
-
→ Found: onClick handler missing in LoginButton.tsx:34
|
|
473
|
-
|
|
474
|
-
Applying fix...
|
|
475
|
-
→ Added: onClick={() => handleLogin()}
|
|
476
|
-
|
|
477
|
-
Running related tests...
|
|
478
|
-
✓ LoginButton.test.tsx - 5/5 passed
|
|
479
|
-
|
|
480
|
-
✓ Fix complete
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
For `pa:deploy`:
|
|
484
|
-
1. **Run pre-deployment checks** automatically:
|
|
485
|
-
- All tests passing? If not → auto-fix
|
|
486
|
-
- QA checks passing? If not → auto-fix
|
|
487
|
-
- Security scan clean? If not → auto-fix
|
|
488
|
-
- Build succeeds? If not → auto-fix
|
|
489
|
-
2. **Only proceed when all checks pass**
|
|
490
|
-
3. **Deploy to target environment**
|
|
491
|
-
4. **Run post-deployment verification**
|
|
492
|
-
5. **Auto-rollback if verification fails**
|
|
493
|
-
```
|
|
494
|
-
pa:deploy
|
|
495
|
-
|
|
496
|
-
Pre-deployment checks...
|
|
497
|
-
✓ Tests: 128/128 passed
|
|
498
|
-
✓ QA: All checks passed
|
|
499
|
-
✓ Security: No vulnerabilities
|
|
500
|
-
✓ Build: Successful
|
|
501
|
-
|
|
502
|
-
Deploying to staging...
|
|
503
|
-
✓ Deployed successfully
|
|
504
|
-
|
|
505
|
-
Post-deployment verification...
|
|
506
|
-
✓ Health check passed
|
|
507
|
-
✓ Smoke tests passed
|
|
508
|
-
|
|
509
|
-
══════════════════════════════════════════
|
|
510
|
-
DEPLOYMENT SUCCESSFUL ✓
|
|
511
|
-
══════════════════════════════════════════
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
**IMPORTANT - Full Automation Rules:**
|
|
515
|
-
- **Never ask** "Should I fix this?" - Just fix it
|
|
516
|
-
- **Never say** "Run `pa:test` to verify" - Run it yourself
|
|
517
|
-
- **Never give** "Next steps" - Do the steps
|
|
518
|
-
- **Only stop when:** All done OR truly impossible to proceed
|
|
519
|
-
|
|
520
|
-
### Navigation & Flow
|
|
521
|
-
| Command | Action |
|
|
522
|
-
|---------|--------|
|
|
523
|
-
| `pa:next` | Show next step in current workflow |
|
|
524
|
-
| `pa:resume` | Resume paused feature from where left off |
|
|
525
|
-
| `pa:skip` | Skip current phase, move to next |
|
|
526
|
-
| `pa:back` | Go back to previous phase |
|
|
527
|
-
| `pa:progress` | Show visual progress bar for current feature |
|
|
528
|
-
|
|
529
|
-
**How to execute Navigation commands:**
|
|
530
|
-
|
|
531
|
-
For `pa:next`:
|
|
532
|
-
1. Read `./.proagents/active-features/*/status.json` to find current feature
|
|
533
|
-
2. Identify current phase from status
|
|
534
|
-
3. Show what the next step/phase is
|
|
535
|
-
4. Provide guidance for the next action
|
|
536
|
-
|
|
537
|
-
For `pa:resume`:
|
|
538
|
-
1. Read `./.proagents/active-features/` to find paused features
|
|
539
|
-
2. Read feature's `status.json` for last phase and progress
|
|
540
|
-
3. Read `./.proagents/handoff.md` for context
|
|
541
|
-
4. Continue from where it was left off
|
|
542
|
-
|
|
543
|
-
For `pa:skip`:
|
|
544
|
-
1. Read current feature status
|
|
545
|
-
2. Mark current phase as "skipped" in status.json
|
|
546
|
-
3. Move to next phase
|
|
547
|
-
4. Log skip reason to activity.log
|
|
548
|
-
5. Warn if skipping critical phase (testing, review)
|
|
549
|
-
|
|
550
|
-
For `pa:back`:
|
|
551
|
-
1. Read current feature status
|
|
552
|
-
2. Move to previous phase
|
|
553
|
-
3. Update status.json
|
|
554
|
-
4. Reload context from previous phase
|
|
555
|
-
|
|
556
|
-
For `pa:progress`:
|
|
557
|
-
1. Read `./.proagents/active-features/*/status.json`
|
|
558
|
-
2. Calculate percentage complete (current_phase / total_phases)
|
|
559
|
-
3. Display visual progress bar:
|
|
560
|
-
```
|
|
561
|
-
Feature: user-auth
|
|
562
|
-
Phase: 5/10 (Implementation)
|
|
563
|
-
Progress: [████████░░░░░░░░░░░░] 50%
|
|
564
|
-
|
|
565
|
-
✓ Init → ✓ Analysis → ✓ Requirements → ✓ Design → ● Implementation → ○ Testing → ○ Review → ○ Docs → ○ Deploy
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
### Context & History
|
|
569
|
-
| Command | Action |
|
|
570
|
-
|---------|--------|
|
|
571
|
-
| `pa:context` | Quick view/edit project context |
|
|
572
|
-
| `pa:context-edit` | Edit project context interactively |
|
|
573
|
-
| `pa:diff` | Show what changed since last session |
|
|
574
|
-
| `pa:history` | Show command history with results |
|
|
575
|
-
| `pa:checkpoint` | Create a snapshot/restore point |
|
|
576
|
-
| `pa:checkpoint-restore` | Restore from a checkpoint |
|
|
577
|
-
| `pa:undo` | Undo last AI action using git |
|
|
578
|
-
|
|
579
|
-
**How to execute Context & History commands:**
|
|
580
|
-
|
|
581
|
-
For `pa:context`:
|
|
582
|
-
1. Read `./.proagents/context.md`
|
|
583
|
-
2. Display current project context summary
|
|
584
|
-
3. Show last updated timestamp
|
|
585
|
-
|
|
586
|
-
For `pa:diff`:
|
|
587
|
-
1. Read `./.proagents/activity.log` for last session timestamp
|
|
588
|
-
2. Run `git diff` from that point
|
|
589
|
-
3. Summarize changes by file/module
|
|
590
|
-
4. Highlight significant changes
|
|
591
|
-
|
|
592
|
-
For `pa:history`:
|
|
593
|
-
1. Read `./.proagents/history.log`
|
|
594
|
-
2. Show recent commands with their results
|
|
595
|
-
3. Format: `[timestamp] command → result`
|
|
596
|
-
|
|
597
|
-
For `pa:checkpoint`:
|
|
598
|
-
1. Create git commit with message "checkpoint: [description]"
|
|
599
|
-
2. Save checkpoint info to `./.proagents/checkpoints.json`:
|
|
600
|
-
```json
|
|
601
|
-
{
|
|
602
|
-
"checkpoints": [
|
|
603
|
-
{
|
|
604
|
-
"id": "cp-001",
|
|
605
|
-
"timestamp": "2024-03-06T15:00:00Z",
|
|
606
|
-
"commit": "abc123",
|
|
607
|
-
"description": "Before auth refactor",
|
|
608
|
-
"feature": "user-auth",
|
|
609
|
-
"phase": "implementation"
|
|
610
|
-
}
|
|
611
|
-
]
|
|
612
|
-
}
|
|
613
|
-
```
|
|
614
|
-
3. Log to activity.log
|
|
615
|
-
|
|
616
|
-
For `pa:undo`:
|
|
617
|
-
1. Read last action from `./.proagents/activity.log`
|
|
618
|
-
2. If file changes, run `git checkout` to revert
|
|
619
|
-
3. If multiple files, offer selective undo
|
|
620
|
-
4. Update activity.log with undo entry
|
|
621
|
-
|
|
622
|
-
### Sprint & Project Management
|
|
623
|
-
| Command | Action |
|
|
624
|
-
|---------|--------|
|
|
625
|
-
| `pa:sprint-start` | Start a new sprint |
|
|
626
|
-
| `pa:sprint-end` | End sprint with summary |
|
|
627
|
-
| `pa:sprint-status` | Show current sprint status |
|
|
628
|
-
| `pa:estimate` | Estimate task complexity |
|
|
629
|
-
| `pa:estimate "task"` | Estimate specific task |
|
|
630
|
-
| `pa:velocity` | Show team velocity metrics |
|
|
631
|
-
|
|
632
|
-
**How to execute Sprint commands:**
|
|
633
|
-
|
|
634
|
-
For `pa:sprint-start`:
|
|
635
|
-
1. Create `./.proagents/sprints/sprint-{number}.json`:
|
|
636
|
-
```json
|
|
637
|
-
{
|
|
638
|
-
"sprint_number": 1,
|
|
639
|
-
"start_date": "2024-03-06",
|
|
640
|
-
"end_date": "2024-03-20",
|
|
641
|
-
"goals": [],
|
|
642
|
-
"features": [],
|
|
643
|
-
"status": "active"
|
|
644
|
-
}
|
|
645
|
-
```
|
|
646
|
-
2. Ask for sprint goals
|
|
647
|
-
3. Link active features to sprint
|
|
648
|
-
|
|
649
|
-
For `pa:sprint-end`:
|
|
650
|
-
1. Read current sprint file
|
|
651
|
-
2. Calculate metrics (completed features, velocity)
|
|
652
|
-
3. Generate sprint summary → `./.proagents/sprints/sprint-{n}-summary.md`
|
|
653
|
-
4. Archive sprint
|
|
654
|
-
|
|
655
|
-
For `pa:estimate`:
|
|
656
|
-
1. Analyze task/feature complexity
|
|
657
|
-
2. Consider: code changes, files affected, dependencies, testing needs
|
|
658
|
-
3. Provide estimate in story points or T-shirt sizes (S/M/L/XL)
|
|
659
|
-
4. Save estimate to feature status.json
|
|
660
|
-
|
|
661
|
-
For `pa:velocity`:
|
|
662
|
-
1. Read completed sprints from `./.proagents/sprints/`
|
|
663
|
-
2. Calculate average story points per sprint
|
|
664
|
-
3. Show velocity chart/trend
|
|
665
|
-
|
|
666
|
-
### Integration Commands
|
|
667
|
-
| Command | Action |
|
|
668
|
-
|---------|--------|
|
|
669
|
-
| `pa:github` | GitHub integration commands |
|
|
670
|
-
| `pa:github-issue` | Create GitHub issue from current work |
|
|
671
|
-
| `pa:github-pr` | Create pull request |
|
|
672
|
-
| `pa:jira` | Jira integration commands |
|
|
673
|
-
| `pa:jira-sync` | Sync with Jira ticket |
|
|
674
|
-
| `pa:notify` | Send notification |
|
|
675
|
-
| `pa:notify-slack` | Send Slack notification |
|
|
676
|
-
| `pa:notify-email` | Send email notification |
|
|
677
|
-
|
|
678
|
-
**How to execute Integration commands:**
|
|
679
|
-
|
|
680
|
-
For `pa:github-issue`:
|
|
681
|
-
1. Read current feature/bug context
|
|
682
|
-
2. Generate issue title and body
|
|
683
|
-
3. Show preview and ask for confirmation
|
|
684
|
-
4. Provide `gh issue create` command or API call
|
|
685
|
-
|
|
686
|
-
For `pa:github-pr`:
|
|
687
|
-
1. Read current feature context
|
|
688
|
-
2. Generate PR title and description
|
|
689
|
-
3. Include: summary, changes, test plan
|
|
690
|
-
4. Provide `gh pr create` command
|
|
691
|
-
|
|
692
|
-
For `pa:jira-sync`:
|
|
693
|
-
1. Read Jira config from `proagents.config.yaml`
|
|
694
|
-
2. Find linked ticket (from feature name or config)
|
|
695
|
-
3. Update ticket status based on feature phase
|
|
696
|
-
4. Add comment with progress
|
|
697
|
-
|
|
698
|
-
For `pa:notify`:
|
|
699
|
-
1. Read notification config from `proagents.config.yaml`
|
|
700
|
-
2. Generate notification message based on context
|
|
701
|
-
3. Send via configured channel (Slack webhook, email, etc.)
|
|
702
|
-
|
|
703
|
-
### Code Quality Commands
|
|
704
|
-
| Command | Action |
|
|
705
|
-
|---------|--------|
|
|
706
|
-
| `pa:metrics` | Show code quality metrics |
|
|
707
|
-
| `pa:metrics-history` | Show metrics over time |
|
|
708
|
-
| `pa:coverage` | Show test coverage report |
|
|
709
|
-
| `pa:coverage-diff` | Show coverage changes |
|
|
710
|
-
| `pa:deps` | Analyze dependencies |
|
|
711
|
-
| `pa:deps-outdated` | Find outdated dependencies |
|
|
712
|
-
| `pa:deps-security` | Security scan dependencies |
|
|
713
|
-
|
|
714
|
-
**How to execute Code Quality commands:**
|
|
715
|
-
|
|
716
|
-
For `pa:metrics`:
|
|
717
|
-
1. Analyze codebase for:
|
|
718
|
-
- Lines of code (by language)
|
|
719
|
-
- Cyclomatic complexity
|
|
720
|
-
- Code duplication
|
|
721
|
-
- Function/file sizes
|
|
722
|
-
2. Save to `./.proagents/metrics/latest.json`
|
|
723
|
-
3. Display summary with warnings for issues
|
|
724
|
-
|
|
725
|
-
For `pa:coverage`:
|
|
726
|
-
1. Check for coverage reports (coverage/, .nyc_output/, etc.)
|
|
727
|
-
2. Parse coverage data
|
|
728
|
-
3. Display summary:
|
|
729
|
-
```
|
|
730
|
-
Test Coverage Report
|
|
731
|
-
═══════════════════
|
|
732
|
-
Overall: 82% ✓
|
|
733
|
-
|
|
734
|
-
By Module:
|
|
735
|
-
• src/auth/ 95% ████████████████████ ✓
|
|
736
|
-
• src/api/ 78% ███████████████░░░░░
|
|
737
|
-
• src/utils/ 65% █████████████░░░░░░░ ⚠
|
|
738
|
-
```
|
|
739
|
-
|
|
740
|
-
For `pa:deps`:
|
|
741
|
-
1. Read package.json / requirements.txt
|
|
742
|
-
2. Analyze dependency tree
|
|
743
|
-
3. Identify:
|
|
744
|
-
- Direct vs transitive deps
|
|
745
|
-
- Duplicate packages
|
|
746
|
-
- Large dependencies
|
|
747
|
-
- Outdated versions
|
|
748
|
-
|
|
749
|
-
For `pa:deps-security`:
|
|
750
|
-
1. Run `npm audit` or equivalent
|
|
751
|
-
2. Parse security advisories
|
|
752
|
-
3. Categorize by severity
|
|
753
|
-
4. Suggest fixes
|
|
754
|
-
|
|
755
|
-
### Code Generation
|
|
756
|
-
| Command | Action |
|
|
757
|
-
|---------|--------|
|
|
758
|
-
| `pa:generate` | Show generation options |
|
|
759
|
-
| `pa:generate-component "name"` | Generate React/Vue component |
|
|
760
|
-
| `pa:generate-api "name"` | Generate API endpoint |
|
|
761
|
-
| `pa:generate-test "file"` | Generate test file for module |
|
|
762
|
-
| `pa:generate-hook "name"` | Generate custom hook |
|
|
763
|
-
| `pa:generate-service "name"` | Generate service class |
|
|
764
|
-
|
|
765
|
-
**How to execute Code Generation commands:**
|
|
766
|
-
|
|
767
|
-
For `pa:generate-component`:
|
|
768
|
-
1. Read project type and patterns from `./.proagents/cache/patterns.json`
|
|
769
|
-
2. Use template from `./.proagents/scaffolding/` matching project type
|
|
770
|
-
3. Apply project naming conventions
|
|
771
|
-
4. Create component file with:
|
|
772
|
-
- Component code
|
|
773
|
-
- Types/interfaces
|
|
774
|
-
- Basic styles (if applicable)
|
|
775
|
-
- Test file (optional)
|
|
776
|
-
5. Save to appropriate directory based on project structure
|
|
777
|
-
|
|
778
|
-
For `pa:generate-api`:
|
|
779
|
-
1. Detect API framework (Express, Next.js, NestJS, etc.)
|
|
780
|
-
2. Use appropriate template
|
|
781
|
-
3. Generate:
|
|
782
|
-
- Route handler
|
|
783
|
-
- Input validation
|
|
784
|
-
- Error handling
|
|
785
|
-
- Types
|
|
786
|
-
4. Add to routes index if applicable
|
|
787
|
-
|
|
788
|
-
For `pa:generate-test`:
|
|
789
|
-
1. Read the source file
|
|
790
|
-
2. Detect testing framework (Jest, Vitest, etc.)
|
|
791
|
-
3. Generate test file with:
|
|
792
|
-
- Import statements
|
|
793
|
-
- Describe blocks
|
|
794
|
-
- Test cases for each function
|
|
795
|
-
- Mock setup
|
|
796
|
-
4. Save alongside source or in tests/ folder
|
|
797
|
-
|
|
798
|
-
### Refactoring
|
|
799
|
-
| Command | Action |
|
|
800
|
-
|---------|--------|
|
|
801
|
-
| `pa:refactor` | Analyze and suggest refactoring |
|
|
802
|
-
| `pa:refactor "file"` | Refactor specific file |
|
|
803
|
-
| `pa:rename "old" "new"` | Rename symbol across codebase |
|
|
804
|
-
| `pa:extract "name"` | Extract function/component |
|
|
805
|
-
| `pa:cleanup` | Remove dead code, unused imports |
|
|
806
|
-
| `pa:cleanup-imports` | Clean up imports only |
|
|
807
|
-
|
|
808
|
-
**How to execute Refactoring commands:**
|
|
809
|
-
|
|
810
|
-
For `pa:refactor`:
|
|
811
|
-
1. Analyze codebase for:
|
|
812
|
-
- Long functions (>50 lines)
|
|
813
|
-
- Deep nesting (>3 levels)
|
|
814
|
-
- Duplicate code
|
|
815
|
-
- Complex conditionals
|
|
816
|
-
- God classes/components
|
|
817
|
-
2. Prioritize by impact
|
|
818
|
-
3. Suggest specific refactoring for each issue
|
|
819
|
-
4. Offer to apply refactoring
|
|
820
|
-
|
|
821
|
-
For `pa:rename`:
|
|
822
|
-
1. Find all occurrences of symbol
|
|
823
|
-
2. Check for naming conflicts
|
|
824
|
-
3. Show preview of changes
|
|
825
|
-
4. Apply rename across all files
|
|
826
|
-
5. Update imports/exports
|
|
827
|
-
|
|
828
|
-
For `pa:cleanup`:
|
|
829
|
-
1. Find unused imports
|
|
830
|
-
2. Find unused variables
|
|
831
|
-
3. Find dead code (unreachable)
|
|
832
|
-
4. Find unused exports
|
|
833
|
-
5. Show list and offer to remove
|
|
834
|
-
6. Log changes to activity.log
|
|
835
|
-
|
|
836
|
-
### Time Tracking
|
|
837
|
-
| Command | Action |
|
|
838
|
-
|---------|--------|
|
|
839
|
-
| `pa:time-start` | Start time tracking |
|
|
840
|
-
| `pa:time-start "task"` | Start tracking specific task |
|
|
841
|
-
| `pa:time-stop` | Stop current time tracking |
|
|
842
|
-
| `pa:time-pause` | Pause time tracking |
|
|
843
|
-
| `pa:time-report` | Show time report |
|
|
844
|
-
| `pa:time-report "feature"` | Report for specific feature |
|
|
845
|
-
|
|
846
|
-
**How to execute Time Tracking commands:**
|
|
847
|
-
|
|
848
|
-
For `pa:time-start`:
|
|
849
|
-
1. Create/update `./.proagents/time-tracking.json`:
|
|
850
|
-
```json
|
|
851
|
-
{
|
|
852
|
-
"current": {
|
|
853
|
-
"task": "feature-user-auth",
|
|
854
|
-
"started": "2024-03-06T15:00:00Z",
|
|
855
|
-
"status": "running"
|
|
856
|
-
},
|
|
857
|
-
"entries": []
|
|
858
|
-
}
|
|
859
|
-
```
|
|
860
|
-
2. Log to activity.log
|
|
861
|
-
|
|
862
|
-
For `pa:time-stop`:
|
|
863
|
-
1. Read current tracking
|
|
864
|
-
2. Calculate duration
|
|
865
|
-
3. Add to entries array:
|
|
866
|
-
```json
|
|
867
|
-
{
|
|
868
|
-
"task": "feature-user-auth",
|
|
869
|
-
"started": "2024-03-06T15:00:00Z",
|
|
870
|
-
"ended": "2024-03-06T17:30:00Z",
|
|
871
|
-
"duration_minutes": 150,
|
|
872
|
-
"ai": "Claude:opus-4"
|
|
873
|
-
}
|
|
874
|
-
```
|
|
875
|
-
4. Clear current tracking
|
|
876
|
-
|
|
877
|
-
For `pa:time-report`:
|
|
878
|
-
1. Read all entries from time-tracking.json
|
|
879
|
-
2. Group by task/feature
|
|
880
|
-
3. Calculate totals
|
|
881
|
-
4. Display report:
|
|
882
|
-
```
|
|
883
|
-
Time Report
|
|
884
|
-
═══════════
|
|
885
|
-
Feature: user-auth
|
|
886
|
-
Total: 5h 30m
|
|
887
|
-
Sessions: 3
|
|
888
|
-
|
|
889
|
-
Feature: dashboard
|
|
890
|
-
Total: 2h 15m
|
|
891
|
-
Sessions: 2
|
|
892
|
-
```
|
|
893
|
-
|
|
894
|
-
### Environment & Setup
|
|
895
|
-
| Command | Action |
|
|
896
|
-
|---------|--------|
|
|
897
|
-
| `pa:env-check` | Verify environment setup |
|
|
898
|
-
| `pa:env-setup` | Setup development environment |
|
|
899
|
-
| `pa:env-diff` | Compare environments |
|
|
900
|
-
| `pa:secrets-scan` | Scan for exposed secrets |
|
|
901
|
-
| `pa:secrets-check` | Verify required secrets exist |
|
|
902
|
-
|
|
903
|
-
**How to execute Environment commands:**
|
|
904
|
-
|
|
905
|
-
For `pa:env-check`:
|
|
906
|
-
1. Check for required files (.env, .env.local, etc.)
|
|
907
|
-
2. Verify Node/Python/etc. version matches
|
|
908
|
-
3. Check for required dependencies
|
|
909
|
-
4. Verify database connection (if applicable)
|
|
910
|
-
5. Check for required environment variables
|
|
911
|
-
6. Report status:
|
|
912
|
-
```
|
|
913
|
-
Environment Check
|
|
914
|
-
═════════════════
|
|
915
|
-
✓ Node.js v18.17.0 (required: >=18)
|
|
916
|
-
✓ npm v9.6.0
|
|
917
|
-
✓ .env.local exists
|
|
918
|
-
⚠ DATABASE_URL not set
|
|
919
|
-
✗ Redis not running
|
|
920
|
-
```
|
|
921
|
-
|
|
922
|
-
For `pa:secrets-scan`:
|
|
923
|
-
1. Scan codebase for patterns:
|
|
924
|
-
- API keys (sk_, pk_, api_key, etc.)
|
|
925
|
-
- Passwords in code
|
|
926
|
-
- Private keys
|
|
927
|
-
- Connection strings
|
|
928
|
-
2. Check .gitignore for sensitive files
|
|
929
|
-
3. Report findings with file locations
|
|
930
|
-
4. Suggest fixes (move to .env, etc.)
|
|
931
|
-
|
|
932
|
-
### Database Commands
|
|
933
|
-
| Command | Action |
|
|
934
|
-
|---------|--------|
|
|
935
|
-
| `pa:db-migrate` | Run database migrations |
|
|
936
|
-
| `pa:db-migrate-create "name"` | Create new migration |
|
|
937
|
-
| `pa:db-seed` | Seed database with test data |
|
|
938
|
-
| `pa:db-reset` | Reset database |
|
|
939
|
-
| `pa:db-status` | Show migration status |
|
|
940
|
-
|
|
941
|
-
**How to execute Database commands:**
|
|
942
|
-
|
|
943
|
-
For `pa:db-migrate`:
|
|
944
|
-
1. Detect ORM (Prisma, TypeORM, Sequelize, Drizzle, etc.)
|
|
945
|
-
2. Run appropriate migrate command:
|
|
946
|
-
- Prisma: `npx prisma migrate dev`
|
|
947
|
-
- TypeORM: `npm run typeorm migration:run`
|
|
948
|
-
3. Report results
|
|
949
|
-
|
|
950
|
-
For `pa:db-seed`:
|
|
951
|
-
1. Find seed files (prisma/seed.ts, seeds/, etc.)
|
|
952
|
-
2. Run seed command
|
|
953
|
-
3. Report inserted records
|
|
954
|
-
|
|
955
|
-
For `pa:db-reset`:
|
|
956
|
-
1. Warn user about data loss
|
|
957
|
-
2. Require confirmation
|
|
958
|
-
3. Drop and recreate database
|
|
959
|
-
4. Run migrations
|
|
960
|
-
5. Optionally run seeds
|
|
961
|
-
|
|
962
|
-
### Accessibility & Performance
|
|
963
|
-
| Command | Action |
|
|
964
|
-
|---------|--------|
|
|
965
|
-
| `pa:a11y` | Run accessibility audit |
|
|
966
|
-
| `pa:a11y "url"` | Audit specific page |
|
|
967
|
-
| `pa:lighthouse` | Run Lighthouse audit |
|
|
968
|
-
| `pa:lighthouse "url"` | Audit specific URL |
|
|
969
|
-
| `pa:perf` | Performance analysis |
|
|
970
|
-
| `pa:perf-bundle` | Bundle size analysis |
|
|
971
|
-
|
|
972
|
-
**How to execute A11y & Performance commands:**
|
|
973
|
-
|
|
974
|
-
For `pa:a11y`:
|
|
975
|
-
1. Check for a11y tools (axe, pa11y, etc.)
|
|
976
|
-
2. Run audit on pages/components
|
|
977
|
-
3. Report issues by severity:
|
|
978
|
-
```
|
|
979
|
-
Accessibility Audit
|
|
980
|
-
═══════════════════
|
|
981
|
-
Critical: 2
|
|
982
|
-
Serious: 5
|
|
983
|
-
Moderate: 12
|
|
984
|
-
Minor: 8
|
|
985
|
-
|
|
986
|
-
Top Issues:
|
|
987
|
-
• Missing alt text on images (5 instances)
|
|
988
|
-
• Low color contrast (3 instances)
|
|
989
|
-
• Missing form labels (2 instances)
|
|
990
|
-
```
|
|
991
|
-
4. Link to WCAG guidelines for each issue
|
|
992
|
-
|
|
993
|
-
For `pa:lighthouse`:
|
|
994
|
-
1. Check if Lighthouse is available
|
|
995
|
-
2. Run audit (provide command or use API)
|
|
996
|
-
3. Parse results
|
|
997
|
-
4. Display scores:
|
|
998
|
-
```
|
|
999
|
-
Lighthouse Scores
|
|
1000
|
-
═════════════════
|
|
1001
|
-
Performance: 85 ████████░░
|
|
1002
|
-
Accessibility: 92 █████████░
|
|
1003
|
-
Best Practices: 100 ██████████
|
|
1004
|
-
SEO: 90 █████████░
|
|
1005
|
-
```
|
|
1006
|
-
|
|
1007
|
-
For `pa:perf`:
|
|
1008
|
-
1. Analyze:
|
|
1009
|
-
- Bundle sizes
|
|
1010
|
-
- Load times
|
|
1011
|
-
- Render performance
|
|
1012
|
-
- Memory usage patterns
|
|
1013
|
-
2. Identify bottlenecks
|
|
1014
|
-
3. Suggest optimizations
|
|
1015
123
|
|
|
1016
|
-
###
|
|
1017
|
-
| Command | Action |
|
|
1018
|
-
|---------|--------|
|
|
1019
|
-
| `pa:export` | Export ProAgents config and data |
|
|
1020
|
-
| `pa:export-config` | Export only configuration |
|
|
1021
|
-
| `pa:import` | Import from export file |
|
|
1022
|
-
| `pa:backup` | Create full backup |
|
|
1023
|
-
| `pa:backup-restore` | Restore from backup |
|
|
1024
|
-
|
|
1025
|
-
**How to execute Export & Backup commands:**
|
|
1026
|
-
|
|
1027
|
-
For `pa:export`:
|
|
1028
|
-
1. Gather all ProAgents data:
|
|
1029
|
-
- proagents.config.yaml
|
|
1030
|
-
- context.md
|
|
1031
|
-
- decisions.md
|
|
1032
|
-
- feedback.md
|
|
1033
|
-
- active-features/
|
|
1034
|
-
- learned patterns
|
|
1035
|
-
2. Create export file: `proagents-export-YYYY-MM-DD.json`
|
|
1036
|
-
3. Optionally encrypt sensitive data
|
|
1037
|
-
|
|
1038
|
-
For `pa:import`:
|
|
1039
|
-
1. Read export file
|
|
1040
|
-
2. Validate format
|
|
1041
|
-
3. Merge or replace existing data
|
|
1042
|
-
4. Report what was imported
|
|
1043
|
-
|
|
1044
|
-
For `pa:backup`:
|
|
1045
|
-
1. Create timestamped backup of entire .proagents/ folder
|
|
1046
|
-
2. Save to `./.proagents/backups/` or specified location
|
|
1047
|
-
3. Compress if large
|
|
1048
|
-
4. Maintain rolling backups (keep last N)
|
|
1049
|
-
|
|
1050
|
-
### Learning & AI
|
|
124
|
+
### Testing
|
|
1051
125
|
| Command | Action |
|
|
1052
126
|
|---------|--------|
|
|
1053
|
-
| `pa:
|
|
1054
|
-
| `pa:
|
|
1055
|
-
| `pa:
|
|
1056
|
-
| `pa:
|
|
1057
|
-
| `pa:
|
|
1058
|
-
|
|
1059
|
-
**How to execute Learning commands:**
|
|
1060
|
-
|
|
1061
|
-
For `pa:learn`:
|
|
1062
|
-
1. Parse the pattern description
|
|
1063
|
-
2. Add to `./.proagents/.learning/`:
|
|
1064
|
-
```json
|
|
1065
|
-
{
|
|
1066
|
-
"pattern": "Always use React Query for API calls",
|
|
1067
|
-
"type": "preference",
|
|
1068
|
-
"added": "2024-03-06",
|
|
1069
|
-
"added_by": "user",
|
|
1070
|
-
"applies_to": ["api", "data-fetching"]
|
|
1071
|
-
}
|
|
1072
|
-
```
|
|
1073
|
-
3. Confirm pattern learned
|
|
1074
|
-
|
|
1075
|
-
For `pa:forget`:
|
|
1076
|
-
1. Find matching pattern
|
|
1077
|
-
2. Remove from learning data
|
|
1078
|
-
3. Confirm removal
|
|
1079
|
-
|
|
1080
|
-
For `pa:suggestions`:
|
|
1081
|
-
1. Analyze project state
|
|
1082
|
-
2. Check learned patterns
|
|
1083
|
-
3. Generate suggestions:
|
|
1084
|
-
```
|
|
1085
|
-
AI Suggestions
|
|
1086
|
-
══════════════
|
|
1087
|
-
1. [Code Quality] Consider adding error boundaries to page components
|
|
1088
|
-
2. [Performance] Bundle size increased 15% - review new dependencies
|
|
1089
|
-
3. [Testing] Test coverage dropped below 80% in src/utils/
|
|
1090
|
-
4. [Security] 2 dependencies have known vulnerabilities
|
|
1091
|
-
```
|
|
1092
|
-
4. Offer to apply each suggestion
|
|
127
|
+
| `pa:test` | Run all tests |
|
|
128
|
+
| `pa:test-unit` | Unit tests only |
|
|
129
|
+
| `pa:test-e2e` | E2E tests only |
|
|
130
|
+
| `pa:test-coverage` | Run with coverage |
|
|
131
|
+
| `pa:test-watch` | Watch mode |
|
|
1093
132
|
|
|
1094
|
-
###
|
|
133
|
+
### Documentation
|
|
1095
134
|
| Command | Action |
|
|
1096
135
|
|---------|--------|
|
|
1097
|
-
| `pa:
|
|
1098
|
-
| `pa:api
|
|
1099
|
-
| `pa:
|
|
1100
|
-
| `pa:
|
|
1101
|
-
| `pa:readme` |
|
|
1102
|
-
| `pa:
|
|
1103
|
-
| `pa:
|
|
1104
|
-
| `pa:types "file"` | Generate types for specific file |
|
|
1105
|
-
|
|
1106
|
-
**How to execute API & Documentation commands:**
|
|
1107
|
-
|
|
1108
|
-
For `pa:api-docs`:
|
|
1109
|
-
1. Detect API framework (Express, Next.js, NestJS, FastAPI, etc.)
|
|
1110
|
-
2. Scan route files for endpoints
|
|
1111
|
-
3. Extract:
|
|
1112
|
-
- HTTP methods and paths
|
|
1113
|
-
- Request/response types
|
|
1114
|
-
- Query/path parameters
|
|
1115
|
-
- Authentication requirements
|
|
1116
|
-
4. Generate OpenAPI 3.0 spec:
|
|
1117
|
-
```yaml
|
|
1118
|
-
openapi: 3.0.0
|
|
1119
|
-
info:
|
|
1120
|
-
title: API Documentation
|
|
1121
|
-
version: 1.0.0
|
|
1122
|
-
paths:
|
|
1123
|
-
/api/users:
|
|
1124
|
-
get:
|
|
1125
|
-
summary: List all users
|
|
1126
|
-
responses:
|
|
1127
|
-
'200':
|
|
1128
|
-
description: Success
|
|
1129
|
-
```
|
|
1130
|
-
5. Save to `./docs/openapi.yaml` or `./swagger.json`
|
|
1131
|
-
6. Optionally generate HTML documentation
|
|
1132
|
-
|
|
1133
|
-
For `pa:storybook`:
|
|
1134
|
-
1. Find React/Vue/Angular components
|
|
1135
|
-
2. Analyze component props/interfaces
|
|
1136
|
-
3. Generate story file with:
|
|
1137
|
-
- Default story
|
|
1138
|
-
- Variant stories for different props
|
|
1139
|
-
- Interactive controls
|
|
1140
|
-
4. Save to `*.stories.tsx` alongside component:
|
|
1141
|
-
```tsx
|
|
1142
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
1143
|
-
import { Button } from './Button';
|
|
1144
|
-
|
|
1145
|
-
const meta: Meta<typeof Button> = {
|
|
1146
|
-
component: Button,
|
|
1147
|
-
title: 'Components/Button',
|
|
1148
|
-
};
|
|
1149
|
-
export default meta;
|
|
1150
|
-
|
|
1151
|
-
export const Primary: StoryObj<typeof Button> = {
|
|
1152
|
-
args: { variant: 'primary', children: 'Click me' },
|
|
1153
|
-
};
|
|
1154
|
-
```
|
|
136
|
+
| `pa:doc` | **Create** docs in `./docs/` |
|
|
137
|
+
| `pa:doc-api` | **Create** API docs in `./docs/api/` |
|
|
138
|
+
| `pa:doc-module X` | **Create** `./docs/modules/X.md` |
|
|
139
|
+
| `pa:doc-component` | **Create** component docs |
|
|
140
|
+
| `pa:doc-readme` | **Update** `./README.md` |
|
|
141
|
+
| `pa:release` | **Create** `./RELEASE_NOTES.md` |
|
|
142
|
+
| `pa:changelog` | **Update** `./CHANGELOG.md` |
|
|
1155
143
|
|
|
1156
|
-
|
|
1157
|
-
1. Analyze project structure
|
|
1158
|
-
2. Detect:
|
|
1159
|
-
- Project type and framework
|
|
1160
|
-
- Available scripts (npm scripts)
|
|
1161
|
-
- Dependencies
|
|
1162
|
-
- Existing documentation
|
|
1163
|
-
3. Generate/update README with:
|
|
1164
|
-
- Project title and description
|
|
1165
|
-
- Installation instructions
|
|
1166
|
-
- Usage examples
|
|
1167
|
-
- Available commands
|
|
1168
|
-
- Contributing guidelines
|
|
1169
|
-
4. Preserve existing custom sections
|
|
1170
|
-
|
|
1171
|
-
For `pa:types`:
|
|
1172
|
-
1. Analyze source file or API responses
|
|
1173
|
-
2. Infer TypeScript types:
|
|
1174
|
-
- From JavaScript usage patterns
|
|
1175
|
-
- From JSON data structures
|
|
1176
|
-
- From API responses
|
|
1177
|
-
3. Generate interface/type definitions:
|
|
1178
|
-
```typescript
|
|
1179
|
-
interface User {
|
|
1180
|
-
id: string;
|
|
1181
|
-
name: string;
|
|
1182
|
-
email: string;
|
|
1183
|
-
createdAt: Date;
|
|
1184
|
-
}
|
|
1185
|
-
```
|
|
1186
|
-
4. Save to `types/` folder or alongside source
|
|
1187
|
-
|
|
1188
|
-
### Git Advanced
|
|
144
|
+
### Quality & Review
|
|
1189
145
|
| Command | Action |
|
|
1190
146
|
|---------|--------|
|
|
1191
|
-
| `pa:
|
|
1192
|
-
| `pa:
|
|
1193
|
-
| `pa:
|
|
1194
|
-
| `pa:
|
|
1195
|
-
| `pa:
|
|
1196
|
-
| `pa:conflict` | Resolve merge conflicts with AI |
|
|
1197
|
-
| `pa:conflict "file"` | Resolve conflicts in specific file |
|
|
1198
|
-
| `pa:changelog-gen` | Auto-generate changelog from commits |
|
|
1199
|
-
| `pa:changelog-gen "version"` | Generate for specific version |
|
|
1200
|
-
|
|
1201
|
-
**How to execute Git Advanced commands:**
|
|
1202
|
-
|
|
1203
|
-
For `pa:branch`:
|
|
1204
|
-
1. Run `git branch -a` to list all branches
|
|
1205
|
-
2. Show current branch with `git branch --show-current`
|
|
1206
|
-
3. Display branch info:
|
|
1207
|
-
```
|
|
1208
|
-
Branches
|
|
1209
|
-
════════
|
|
1210
|
-
Current: feature/user-auth
|
|
1211
|
-
|
|
1212
|
-
Local:
|
|
1213
|
-
• main (2 days ago)
|
|
1214
|
-
• develop (1 hour ago)
|
|
1215
|
-
• feature/user-auth * (current)
|
|
1216
|
-
• feature/dashboard (5 days ago, stale)
|
|
1217
|
-
|
|
1218
|
-
Remote:
|
|
1219
|
-
• origin/main
|
|
1220
|
-
• origin/develop
|
|
1221
|
-
```
|
|
147
|
+
| `pa:qa` | Full QA checks |
|
|
148
|
+
| `pa:qa-security` | Security audit |
|
|
149
|
+
| `pa:qa-performance` | Performance check |
|
|
150
|
+
| `pa:review` | Code review |
|
|
151
|
+
| `pa:lint` | Run linters |
|
|
1222
152
|
|
|
1223
|
-
|
|
1224
|
-
1. Find merged branches: `git branch --merged`
|
|
1225
|
-
2. Find stale branches (no commits in 30+ days)
|
|
1226
|
-
3. Show list and ask for confirmation
|
|
1227
|
-
4. Delete selected branches
|
|
1228
|
-
5. Optionally prune remote tracking branches
|
|
1229
|
-
|
|
1230
|
-
For `pa:merge`:
|
|
1231
|
-
1. Show current branch and target
|
|
1232
|
-
2. Preview changes: `git diff branch...HEAD`
|
|
1233
|
-
3. Check for conflicts: `git merge --no-commit --no-ff branch`
|
|
1234
|
-
4. If conflicts exist, list conflicting files
|
|
1235
|
-
5. If clean, proceed with merge
|
|
1236
|
-
6. Create merge commit with descriptive message
|
|
1237
|
-
|
|
1238
|
-
For `pa:conflict`:
|
|
1239
|
-
1. List conflicting files: `git diff --name-only --diff-filter=U`
|
|
1240
|
-
2. For each file:
|
|
1241
|
-
- Show conflict markers
|
|
1242
|
-
- Analyze both versions
|
|
1243
|
-
- Suggest resolution based on:
|
|
1244
|
-
- Code context
|
|
1245
|
-
- Which change is more recent
|
|
1246
|
-
- What each change accomplishes
|
|
1247
|
-
3. Apply resolution and mark as resolved
|
|
1248
|
-
4. Stage resolved files
|
|
1249
|
-
|
|
1250
|
-
For `pa:changelog-gen`:
|
|
1251
|
-
1. Get commits since last tag: `git log $(git describe --tags --abbrev=0)..HEAD`
|
|
1252
|
-
2. Parse conventional commits
|
|
1253
|
-
3. Group by type (feat, fix, docs, etc.)
|
|
1254
|
-
4. Generate changelog:
|
|
1255
|
-
```markdown
|
|
1256
|
-
## [1.2.0] - 2024-03-06
|
|
1257
|
-
|
|
1258
|
-
### Added
|
|
1259
|
-
- User authentication with JWT (#123)
|
|
1260
|
-
- Dashboard component (#125)
|
|
1261
|
-
|
|
1262
|
-
### Fixed
|
|
1263
|
-
- Login button styling (#124)
|
|
1264
|
-
|
|
1265
|
-
### Changed
|
|
1266
|
-
- Updated dependencies (#126)
|
|
1267
|
-
```
|
|
1268
|
-
5. Prepend to CHANGELOG.md
|
|
1269
|
-
|
|
1270
|
-
### Search & Code Navigation
|
|
153
|
+
### Debug & Logs
|
|
1271
154
|
| Command | Action |
|
|
1272
155
|
|---------|--------|
|
|
1273
|
-
| `pa:
|
|
1274
|
-
| `pa:
|
|
1275
|
-
| `pa:
|
|
1276
|
-
| `pa:
|
|
1277
|
-
| `pa:
|
|
1278
|
-
| `pa:
|
|
1279
|
-
| `pa:
|
|
1280
|
-
| `pa:
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
```
|
|
1289
|
-
Search Results: "useAuth"
|
|
1290
|
-
═══════════════════════════
|
|
1291
|
-
|
|
1292
|
-
src/hooks/useAuth.ts:5
|
|
1293
|
-
│ export function useAuth() {
|
|
156
|
+
| `pa:debug` | Start debug session |
|
|
157
|
+
| `pa:debug-add` | Add debug logs to code |
|
|
158
|
+
| `pa:debug-add "file"` | Add logs to specific file |
|
|
159
|
+
| `pa:debug-trace "func"` | Add entry/exit logs to function |
|
|
160
|
+
| `pa:debug-var "var"` | Track variable changes |
|
|
161
|
+
| `pa:debug-api` | Add API request/response logging |
|
|
162
|
+
| `pa:debug-state` | Add state change logging |
|
|
163
|
+
| `pa:debug-error` | Add error boundary logging |
|
|
164
|
+
| `pa:debug-web` | Web console debugging |
|
|
165
|
+
| `pa:debug-rn` | React Native debugging |
|
|
166
|
+
| `pa:debug-android` | Android native (logcat) |
|
|
167
|
+
| `pa:debug-ios` | iOS native debugging |
|
|
168
|
+
| `pa:logs` | View recent logs |
|
|
169
|
+
| `pa:logs-filter "term"` | Filter logs by term |
|
|
170
|
+
| `pa:debug-clean` | Remove all debug statements |
|
|
1294
171
|
|
|
1295
|
-
|
|
1296
|
-
│ const { login, logout } = useAuth();
|
|
1297
|
-
|
|
1298
|
-
src/components/Navbar.tsx:8
|
|
1299
|
-
│ const { user } = useAuth();
|
|
1300
|
-
|
|
1301
|
-
Found 3 matches in 3 files
|
|
1302
|
-
```
|
|
1303
|
-
|
|
1304
|
-
For `pa:todo`:
|
|
1305
|
-
1. Search for TODO, FIXME, HACK, XXX comments
|
|
1306
|
-
2. Parse priority markers (TODO(high):, TODO:, etc.)
|
|
1307
|
-
3. Group by priority and file:
|
|
1308
|
-
```
|
|
1309
|
-
TODOs Found: 15
|
|
1310
|
-
═══════════════
|
|
1311
|
-
|
|
1312
|
-
High Priority:
|
|
1313
|
-
• src/auth/jwt.ts:45 - TODO(high): Add token refresh
|
|
1314
|
-
• src/api/users.ts:78 - FIXME: SQL injection risk
|
|
1315
|
-
|
|
1316
|
-
Medium Priority:
|
|
1317
|
-
• src/utils/date.ts:12 - TODO: Handle timezone
|
|
1318
|
-
|
|
1319
|
-
Low Priority:
|
|
1320
|
-
• src/components/Button.tsx:5 - TODO: Add loading state
|
|
1321
|
-
```
|
|
1322
|
-
|
|
1323
|
-
For `pa:fixme`:
|
|
1324
|
-
1. Search for FIXME, BUG, HACK, XXX, SECURITY
|
|
1325
|
-
2. Prioritize by keyword severity
|
|
1326
|
-
3. Show with context and age (when added via git blame)
|
|
1327
|
-
4. Suggest fixes where possible
|
|
1328
|
-
|
|
1329
|
-
For `pa:unused`:
|
|
1330
|
-
1. Analyze exports and imports
|
|
1331
|
-
2. Find:
|
|
1332
|
-
- Exported but never imported
|
|
1333
|
-
- Defined but never used
|
|
1334
|
-
- Dead code (unreachable)
|
|
1335
|
-
3. Report with confidence level:
|
|
1336
|
-
```
|
|
1337
|
-
Unused Code Analysis
|
|
1338
|
-
═══════════════════
|
|
1339
|
-
|
|
1340
|
-
Definitely Unused:
|
|
1341
|
-
• src/utils/old-helper.ts - entire file (no imports)
|
|
1342
|
-
• src/types/legacy.ts:LegacyUser - type never used
|
|
1343
|
-
|
|
1344
|
-
Possibly Unused:
|
|
1345
|
-
• src/api/deprecated.ts:oldEndpoint - only test imports
|
|
1346
|
-
```
|
|
1347
|
-
|
|
1348
|
-
For `pa:unused-deps`:
|
|
1349
|
-
1. Read package.json dependencies
|
|
1350
|
-
2. Search codebase for imports
|
|
1351
|
-
3. Find packages never imported:
|
|
1352
|
-
```
|
|
1353
|
-
Unused Dependencies
|
|
1354
|
-
═══════════════════
|
|
1355
|
-
|
|
1356
|
-
dependencies:
|
|
1357
|
-
• lodash - never imported
|
|
1358
|
-
• moment - never imported (consider date-fns)
|
|
1359
|
-
|
|
1360
|
-
devDependencies:
|
|
1361
|
-
• @types/node - used
|
|
1362
|
-
```
|
|
1363
|
-
|
|
1364
|
-
### Code Analysis
|
|
172
|
+
### Collaboration
|
|
1365
173
|
| Command | Action |
|
|
1366
174
|
|---------|--------|
|
|
1367
|
-
| `pa:
|
|
1368
|
-
| `pa:
|
|
1369
|
-
| `pa:
|
|
1370
|
-
| `pa:
|
|
1371
|
-
| `pa:
|
|
1372
|
-
| `pa:
|
|
1373
|
-
|
|
1374
|
-
**How to execute Code Analysis commands:**
|
|
1375
|
-
|
|
1376
|
-
For `pa:complexity`:
|
|
1377
|
-
1. Analyze functions/methods for:
|
|
1378
|
-
- Cyclomatic complexity (if/else, switch, loops)
|
|
1379
|
-
- Cognitive complexity
|
|
1380
|
-
- Nesting depth
|
|
1381
|
-
- Parameter count
|
|
1382
|
-
2. Report high complexity areas:
|
|
1383
|
-
```
|
|
1384
|
-
Complexity Report
|
|
1385
|
-
═════════════════
|
|
1386
|
-
|
|
1387
|
-
High Complexity (>10):
|
|
1388
|
-
• src/utils/parser.ts:parseData() - complexity: 15
|
|
1389
|
-
↳ 8 if statements, 3 loops, max depth: 4
|
|
1390
|
-
↳ Suggestion: Split into smaller functions
|
|
1391
|
-
|
|
1392
|
-
• src/api/handler.ts:processRequest() - complexity: 12
|
|
1393
|
-
↳ Large switch statement (10 cases)
|
|
1394
|
-
↳ Suggestion: Use strategy pattern
|
|
1395
|
-
|
|
1396
|
-
Medium Complexity (5-10):
|
|
1397
|
-
• src/auth/validate.ts:validateUser() - complexity: 7
|
|
1398
|
-
```
|
|
1399
|
-
|
|
1400
|
-
For `pa:duplication`:
|
|
1401
|
-
1. Find duplicate code blocks (default: 6+ lines)
|
|
1402
|
-
2. Calculate similarity percentage
|
|
1403
|
-
3. Report duplicates:
|
|
1404
|
-
```
|
|
1405
|
-
Code Duplication Report
|
|
1406
|
-
═══════════════════════
|
|
1407
|
-
|
|
1408
|
-
Duplicate #1 (98% similar, 15 lines):
|
|
1409
|
-
• src/api/users.ts:45-60
|
|
1410
|
-
• src/api/posts.ts:32-47
|
|
1411
|
-
↳ Suggestion: Extract to shared utility
|
|
1412
|
-
|
|
1413
|
-
Duplicate #2 (100% identical, 8 lines):
|
|
1414
|
-
• src/components/Card.tsx:12-20
|
|
1415
|
-
• src/components/Panel.tsx:8-16
|
|
1416
|
-
↳ Suggestion: Create shared component
|
|
1417
|
-
|
|
1418
|
-
Total: 5 duplicate blocks, ~120 duplicated lines
|
|
1419
|
-
```
|
|
1420
|
-
|
|
1421
|
-
For `pa:hotspots`:
|
|
1422
|
-
1. Analyze git history for frequently changed files
|
|
1423
|
-
2. Correlate with bug fixes
|
|
1424
|
-
3. Identify risky areas:
|
|
1425
|
-
```
|
|
1426
|
-
Code Hotspots (Last 30 Days)
|
|
1427
|
-
════════════════════════════
|
|
1428
|
-
|
|
1429
|
-
Most Changed:
|
|
1430
|
-
1. src/api/auth.ts - 45 changes, 12 bug fixes
|
|
1431
|
-
↳ High churn + bugs = refactoring candidate
|
|
1432
|
-
|
|
1433
|
-
2. src/utils/helpers.ts - 32 changes, 3 bug fixes
|
|
1434
|
-
↳ Frequently modified utility
|
|
1435
|
-
|
|
1436
|
-
3. src/components/Form.tsx - 28 changes, 8 bug fixes
|
|
1437
|
-
↳ Complex component, consider splitting
|
|
1438
|
-
```
|
|
175
|
+
| `pa:activity` | Show AI activity log |
|
|
176
|
+
| `pa:lock` | Show lock status |
|
|
177
|
+
| `pa:handoff` | Create handoff notes |
|
|
178
|
+
| `pa:feedback "text"` | Log feedback for AI learning |
|
|
179
|
+
| `pa:decision "title"` | Log architectural decision |
|
|
180
|
+
| `pa:error "desc"` | Log error and solution |
|
|
1439
181
|
|
|
1440
|
-
###
|
|
182
|
+
### Configuration
|
|
1441
183
|
| Command | Action |
|
|
1442
184
|
|---------|--------|
|
|
1443
|
-
| `pa:
|
|
1444
|
-
| `pa:
|
|
1445
|
-
| `pa:
|
|
1446
|
-
| `pa:test-unit "file"` | Generate tests for file |
|
|
1447
|
-
| `pa:mock` | Generate mocks/stubs |
|
|
1448
|
-
| `pa:mock "module"` | Mock specific module |
|
|
1449
|
-
| `pa:snapshot` | Snapshot testing management |
|
|
1450
|
-
| `pa:snapshot-update` | Update snapshots |
|
|
1451
|
-
|
|
1452
|
-
**How to execute Testing Advanced commands:**
|
|
1453
|
-
|
|
1454
|
-
For `pa:test-e2e`:
|
|
1455
|
-
1. Detect E2E framework (Playwright, Cypress, etc.)
|
|
1456
|
-
2. Analyze user flows in the app
|
|
1457
|
-
3. Generate E2E test:
|
|
1458
|
-
```typescript
|
|
1459
|
-
import { test, expect } from '@playwright/test';
|
|
1460
|
-
|
|
1461
|
-
test.describe('User Authentication', () => {
|
|
1462
|
-
test('should login successfully', async ({ page }) => {
|
|
1463
|
-
await page.goto('/login');
|
|
1464
|
-
await page.fill('[name="email"]', 'test@example.com');
|
|
1465
|
-
await page.fill('[name="password"]', 'password123');
|
|
1466
|
-
await page.click('button[type="submit"]');
|
|
1467
|
-
await expect(page).toHaveURL('/dashboard');
|
|
1468
|
-
});
|
|
1469
|
-
|
|
1470
|
-
test('should show error for invalid credentials', async ({ page }) => {
|
|
1471
|
-
await page.goto('/login');
|
|
1472
|
-
await page.fill('[name="email"]', 'wrong@example.com');
|
|
1473
|
-
await page.fill('[name="password"]', 'wrong');
|
|
1474
|
-
await page.click('button[type="submit"]');
|
|
1475
|
-
await expect(page.locator('.error')).toBeVisible();
|
|
1476
|
-
});
|
|
1477
|
-
});
|
|
1478
|
-
```
|
|
1479
|
-
|
|
1480
|
-
For `pa:test-unit`:
|
|
1481
|
-
1. Read source file
|
|
1482
|
-
2. Identify functions/methods to test
|
|
1483
|
-
3. Generate comprehensive test file:
|
|
1484
|
-
```typescript
|
|
1485
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
1486
|
-
import { calculateTotal, formatPrice } from './pricing';
|
|
1487
|
-
|
|
1488
|
-
describe('calculateTotal', () => {
|
|
1489
|
-
it('should calculate total with tax', () => {
|
|
1490
|
-
expect(calculateTotal(100, 0.1)).toBe(110);
|
|
1491
|
-
});
|
|
1492
|
-
|
|
1493
|
-
it('should handle zero amount', () => {
|
|
1494
|
-
expect(calculateTotal(0, 0.1)).toBe(0);
|
|
1495
|
-
});
|
|
1496
|
-
|
|
1497
|
-
it('should throw for negative amounts', () => {
|
|
1498
|
-
expect(() => calculateTotal(-100, 0.1)).toThrow();
|
|
1499
|
-
});
|
|
1500
|
-
});
|
|
1501
|
-
```
|
|
1502
|
-
|
|
1503
|
-
For `pa:mock`:
|
|
1504
|
-
1. Analyze module dependencies
|
|
1505
|
-
2. Generate mock implementations:
|
|
1506
|
-
```typescript
|
|
1507
|
-
// mocks/api.ts
|
|
1508
|
-
import { vi } from 'vitest';
|
|
1509
|
-
|
|
1510
|
-
export const mockApi = {
|
|
1511
|
-
getUsers: vi.fn().mockResolvedValue([
|
|
1512
|
-
{ id: '1', name: 'Test User' }
|
|
1513
|
-
]),
|
|
1514
|
-
createUser: vi.fn().mockResolvedValue({ id: '2' }),
|
|
1515
|
-
deleteUser: vi.fn().mockResolvedValue(true),
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
vi.mock('../api', () => mockApi);
|
|
1519
|
-
```
|
|
1520
|
-
3. Include type-safe mocks with TypeScript
|
|
1521
|
-
|
|
1522
|
-
For `pa:snapshot`:
|
|
1523
|
-
1. Find existing snapshots
|
|
1524
|
-
2. Show status:
|
|
1525
|
-
```
|
|
1526
|
-
Snapshot Status
|
|
1527
|
-
═══════════════
|
|
1528
|
-
|
|
1529
|
-
Total: 45 snapshots in 12 files
|
|
1530
|
-
|
|
1531
|
-
Outdated (need update):
|
|
1532
|
-
• Button.test.tsx - 3 snapshots
|
|
1533
|
-
• Card.test.tsx - 1 snapshot
|
|
1534
|
-
|
|
1535
|
-
Obsolete (no matching test):
|
|
1536
|
-
• OldComponent.test.tsx.snap - entire file
|
|
185
|
+
| `pa:config` | Show config |
|
|
186
|
+
| `pa:checkpoint` | Pause for approval |
|
|
187
|
+
| `pa:skip-checkpoint` | Skip checkpoint |
|
|
1537
188
|
|
|
1538
|
-
|
|
1539
|
-
• pa:snapshot-update - Update outdated
|
|
1540
|
-
• pa:snapshot-clean - Remove obsolete
|
|
1541
|
-
```
|
|
1542
|
-
|
|
1543
|
-
### DevOps & Infrastructure
|
|
189
|
+
### History & Progress
|
|
1544
190
|
| Command | Action |
|
|
1545
191
|
|---------|--------|
|
|
1546
|
-
| `pa:
|
|
1547
|
-
| `pa:
|
|
1548
|
-
| `pa:
|
|
1549
|
-
| `pa:ci` | CI/CD pipeline status/management |
|
|
1550
|
-
| `pa:ci-run` | Trigger CI pipeline |
|
|
1551
|
-
| `pa:deploy-preview` | Deploy to preview environment |
|
|
1552
|
-
| `pa:deploy-preview-url` | Get preview deployment URL |
|
|
1553
|
-
|
|
1554
|
-
**How to execute DevOps commands:**
|
|
1555
|
-
|
|
1556
|
-
For `pa:docker`:
|
|
1557
|
-
1. Check for Dockerfile and docker-compose.yml
|
|
1558
|
-
2. Show available commands:
|
|
1559
|
-
```
|
|
1560
|
-
Docker Status
|
|
1561
|
-
═════════════
|
|
1562
|
-
|
|
1563
|
-
Dockerfile: ✓ Found
|
|
1564
|
-
docker-compose.yml: ✓ Found
|
|
1565
|
-
|
|
1566
|
-
Services:
|
|
1567
|
-
• app - Node.js application
|
|
1568
|
-
• db - PostgreSQL
|
|
1569
|
-
• redis - Redis cache
|
|
1570
|
-
|
|
1571
|
-
Commands:
|
|
1572
|
-
• pa:docker-build - Build images
|
|
1573
|
-
• pa:docker-compose up - Start services
|
|
1574
|
-
• pa:docker-compose down - Stop services
|
|
1575
|
-
```
|
|
1576
|
-
|
|
1577
|
-
For `pa:docker-build`:
|
|
1578
|
-
1. Read Dockerfile
|
|
1579
|
-
2. Suggest optimizations if needed
|
|
1580
|
-
3. Build image with appropriate tags
|
|
1581
|
-
4. Report build status and size
|
|
192
|
+
| `pa:history` | Show command history (read activity.log) |
|
|
193
|
+
| `pa:progress` | Show feature progress |
|
|
194
|
+
| `pa:activity` | Show recent AI activity |
|
|
1582
195
|
|
|
1583
|
-
|
|
1584
|
-
1. Detect CI system (GitHub Actions, GitLab CI, etc.)
|
|
1585
|
-
2. Show pipeline status:
|
|
1586
|
-
```
|
|
1587
|
-
CI/CD Status
|
|
1588
|
-
════════════
|
|
1589
|
-
|
|
1590
|
-
Platform: GitHub Actions
|
|
1591
|
-
|
|
1592
|
-
Recent Workflows:
|
|
1593
|
-
✓ Build & Test (main) - 2m ago - passed
|
|
1594
|
-
✓ Deploy Preview (PR #123) - 15m ago - passed
|
|
1595
|
-
✗ Security Scan (main) - 1h ago - failed
|
|
1596
|
-
↳ 2 vulnerabilities found
|
|
1597
|
-
|
|
1598
|
-
Current:
|
|
1599
|
-
● Build & Test (feature/auth) - running (1m 30s)
|
|
1600
|
-
```
|
|
196
|
+
---
|
|
1601
197
|
|
|
1602
|
-
|
|
1603
|
-
1. Detect preview deployment platform (Vercel, Netlify, etc.)
|
|
1604
|
-
2. Trigger preview deployment
|
|
1605
|
-
3. Wait for deployment URL
|
|
1606
|
-
4. Return preview URL:
|
|
1607
|
-
```
|
|
1608
|
-
Preview Deployment
|
|
1609
|
-
══════════════════
|
|
198
|
+
## How to Execute Commands
|
|
1610
199
|
|
|
1611
|
-
|
|
1612
|
-
Status: Deploying...
|
|
200
|
+
When user types a `pa:` command:
|
|
1613
201
|
|
|
1614
|
-
|
|
1615
|
-
|
|
202
|
+
1. **Read the prompt file** from `./.proagents/prompts/`
|
|
203
|
+
2. **Follow the workflow** defined in that prompt
|
|
204
|
+
3. **Use project config** from `proagents.config.yaml`
|
|
1616
205
|
|
|
1617
|
-
|
|
1618
|
-
|
|
206
|
+
### Prompt File Mapping
|
|
207
|
+
| Command | Prompt File |
|
|
208
|
+
|---------|-------------|
|
|
209
|
+
| `pa:feature` | `./prompts/00-init.md` |
|
|
210
|
+
| `pa:analyze` | `./prompts/01-analysis.md` |
|
|
211
|
+
| `pa:requirements` | `./prompts/02-requirements.md` |
|
|
212
|
+
| `pa:design` | `./prompts/03-ui-design.md` |
|
|
213
|
+
| `pa:plan` | `./prompts/04-planning.md` |
|
|
214
|
+
| `pa:implement` | `./prompts/05-implementation.md` |
|
|
215
|
+
| `pa:test` | `./prompts/06-testing.md` |
|
|
216
|
+
| `pa:review` | `./prompts/06.5-code-review.md` |
|
|
217
|
+
| `pa:doc` | `./prompts/07-documentation.md` |
|
|
218
|
+
| `pa:deploy` | `./prompts/08-deployment.md` |
|
|
219
|
+
| `pa:fix` | `./workflow-modes/entry-modes.md` |
|
|
220
|
+
| `pa:debug` | `./prompts/10-debug-logs.md` |
|
|
221
|
+
| `pa:logs` | `./prompts/10-debug-logs.md` |
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## pa:history Execution
|
|
226
|
+
|
|
227
|
+
**AI MUST read and display the actual log file content.**
|
|
228
|
+
|
|
229
|
+
1. Read `./.proagents/activity.log`
|
|
230
|
+
2. Filter out header lines (lines starting with #)
|
|
231
|
+
3. Display entries (most recent first)
|
|
232
|
+
4. NEVER say "no commands yet" without reading the file
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# AI runs this:
|
|
236
|
+
grep -v "^#" .proagents/activity.log | grep -v "^$" | grep -v "Activity Log Start" | tail -30
|
|
237
|
+
```
|
|
1619
238
|
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
| `pa:tag` | Create git tag for release |
|
|
1626
|
-
| `pa:tag "version"` | Create specific version tag |
|
|
1627
|
-
| `pa:publish` | Publish package to registry |
|
|
1628
|
-
| `pa:publish-dry` | Dry run of publish |
|
|
1629
|
-
|
|
1630
|
-
**How to execute Release commands:**
|
|
1631
|
-
|
|
1632
|
-
For `pa:version`:
|
|
1633
|
-
1. Read version from package.json or equivalent
|
|
1634
|
-
2. Show version info:
|
|
1635
|
-
```
|
|
1636
|
-
Version Info
|
|
1637
|
-
════════════
|
|
239
|
+
If no entries found after filtering, show:
|
|
240
|
+
```
|
|
241
|
+
No pa: commands logged yet.
|
|
242
|
+
Run some commands, then try pa:history again.
|
|
243
|
+
```
|
|
1638
244
|
|
|
1639
|
-
|
|
1640
|
-
|
|
245
|
+
**Output format:**
|
|
246
|
+
```
|
|
247
|
+
Command History
|
|
248
|
+
═══════════════
|
|
249
|
+
[2024-03-06 16:00] [Gemini] pa:logs - Captured 50 entries
|
|
250
|
+
[2024-03-06 15:30] [Cursor] pa:test - 12 tests passed
|
|
251
|
+
[2024-03-06 15:15] [Claude] pa:analyze - Analyzed 45 files
|
|
252
|
+
[2024-03-06 15:10] [Claude] pa:feature - Started "user-auth"
|
|
253
|
+
```
|
|
1641
254
|
|
|
1642
|
-
|
|
1643
|
-
• 5 features
|
|
1644
|
-
• 3 bug fixes
|
|
1645
|
-
• 2 breaking changes
|
|
255
|
+
---
|
|
1646
256
|
|
|
1647
|
-
|
|
1648
|
-
• Major (2.0.0) - has breaking changes
|
|
1649
|
-
• Minor (1.3.0) - new features
|
|
1650
|
-
• Patch (1.2.4) - bug fixes only
|
|
1651
|
-
```
|
|
257
|
+
## pa:progress Execution
|
|
1652
258
|
|
|
1653
|
-
|
|
1654
|
-
1. Determine bump type (major/minor/patch)
|
|
1655
|
-
2. Update version in:
|
|
1656
|
-
- package.json
|
|
1657
|
-
- package-lock.json
|
|
1658
|
-
- Other version files
|
|
1659
|
-
3. Update CHANGELOG.md with new version
|
|
1660
|
-
4. Show changes:
|
|
1661
|
-
```
|
|
1662
|
-
Version Bump: 1.2.3 → 1.3.0
|
|
1663
|
-
═══════════════════════════
|
|
259
|
+
**AI MUST read feature status from actual files.**
|
|
1664
260
|
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
• CHANGELOG.md
|
|
261
|
+
1. Read `./.proagents/active-features/_index.json`
|
|
262
|
+
2. Read each feature's `status.json`
|
|
263
|
+
3. Calculate and display progress
|
|
1669
264
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
265
|
+
```bash
|
|
266
|
+
# AI runs this:
|
|
267
|
+
cat .proagents/active-features/_index.json
|
|
268
|
+
cat .proagents/active-features/feature-*/status.json
|
|
269
|
+
```
|
|
1674
270
|
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
271
|
+
**Output format:**
|
|
272
|
+
```
|
|
273
|
+
Feature Progress
|
|
274
|
+
════════════════
|
|
275
|
+
user-auth [████████░░] 80%
|
|
276
|
+
Phase: testing
|
|
277
|
+
Last: Ran 12 unit tests
|
|
278
|
+
|
|
279
|
+
dashboard [████░░░░░░] 40%
|
|
280
|
+
Phase: implementation
|
|
281
|
+
Last: Created 3 components
|
|
282
|
+
```
|
|
1682
283
|
|
|
1683
|
-
|
|
1684
|
-
Message: Release 1.3.0 - User Authentication
|
|
284
|
+
---
|
|
1685
285
|
|
|
1686
|
-
|
|
1687
|
-
• feat: Add user authentication
|
|
1688
|
-
• feat: Add password reset
|
|
1689
|
-
• fix: Login validation
|
|
286
|
+
## pa:status Execution
|
|
1690
287
|
|
|
1691
|
-
|
|
1692
|
-
```
|
|
288
|
+
**IMPORTANT:** Show REAL data only, never example data.
|
|
1693
289
|
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
- Tests pass
|
|
1697
|
-
- Build succeeds
|
|
1698
|
-
- No uncommitted changes
|
|
1699
|
-
- Version is tagged
|
|
1700
|
-
2. Show publish preview
|
|
1701
|
-
3. Publish to registry:
|
|
290
|
+
1. Read `./.proagents/active-features/_index.json`
|
|
291
|
+
2. If empty:
|
|
1702
292
|
```
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
Pre-checks:
|
|
1707
|
-
✓ Tests passing
|
|
1708
|
-
✓ Build successful
|
|
1709
|
-
✓ Clean working directory
|
|
1710
|
-
✓ Version tagged (v1.3.0)
|
|
1711
|
-
|
|
1712
|
-
Publishing to npm...
|
|
1713
|
-
✓ Published successfully!
|
|
293
|
+
Project Status
|
|
294
|
+
══════════════
|
|
295
|
+
No features tracked.
|
|
1714
296
|
|
|
1715
|
-
|
|
297
|
+
Start with:
|
|
298
|
+
→ pa:feature "name"
|
|
299
|
+
→ pa:fix "bug"
|
|
1716
300
|
```
|
|
1717
|
-
|
|
1718
|
-
### Code Review & PR
|
|
1719
|
-
| Command | Action |
|
|
1720
|
-
|---------|--------|
|
|
1721
|
-
| `pa:review-request` | Request code review from team |
|
|
1722
|
-
| `pa:review-request "user"` | Request review from specific user |
|
|
1723
|
-
| `pa:review-comments` | Show PR review comments |
|
|
1724
|
-
| `pa:review-comments "pr"` | Comments for specific PR |
|
|
1725
|
-
| `pa:review-approve` | Approve current PR |
|
|
1726
|
-
| `pa:review-approve "pr"` | Approve specific PR |
|
|
1727
|
-
|
|
1728
|
-
**How to execute Code Review commands:**
|
|
1729
|
-
|
|
1730
|
-
For `pa:review-request`:
|
|
1731
|
-
1. Detect current branch and PR status
|
|
1732
|
-
2. If no PR exists, suggest creating one first
|
|
1733
|
-
3. Get team members from config or git history
|
|
1734
|
-
4. Request review:
|
|
301
|
+
3. If has features:
|
|
1735
302
|
```
|
|
1736
|
-
|
|
303
|
+
Project Status
|
|
1737
304
|
══════════════
|
|
1738
305
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
Requesting review from:
|
|
1743
|
-
• @tech-lead (suggested - code owner)
|
|
1744
|
-
• @senior-dev (suggested - recent contributor)
|
|
306
|
+
Active: [count]
|
|
307
|
+
• [name] - [phase] ([progress]%)
|
|
1745
308
|
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
✓ Review requested from 2 reviewers
|
|
309
|
+
Paused: [count]
|
|
310
|
+
Completed: [count]
|
|
1750
311
|
```
|
|
1751
312
|
|
|
1752
|
-
|
|
1753
|
-
1. Get PR comments from GitHub/GitLab
|
|
1754
|
-
2. Group by file and status:
|
|
1755
|
-
```
|
|
1756
|
-
PR Review Comments
|
|
1757
|
-
══════════════════
|
|
1758
|
-
|
|
1759
|
-
PR #123: Add user authentication
|
|
1760
|
-
Status: Changes requested (2 pending)
|
|
1761
|
-
|
|
1762
|
-
src/auth/login.ts:
|
|
1763
|
-
├─ Line 45 [PENDING] @tech-lead:
|
|
1764
|
-
│ "Consider using bcrypt instead of md5 for hashing"
|
|
1765
|
-
│
|
|
1766
|
-
└─ Line 78 [RESOLVED] @qa-engineer:
|
|
1767
|
-
"Add error handling for network failures"
|
|
1768
|
-
|
|
1769
|
-
src/api/users.ts:
|
|
1770
|
-
└─ Line 12 [PENDING] @tech-lead:
|
|
1771
|
-
"Missing input validation"
|
|
1772
|
-
|
|
1773
|
-
Actions:
|
|
1774
|
-
• Reply to comment: pa:review-reply "comment-id" "response"
|
|
1775
|
-
• Resolve comment: pa:review-resolve "comment-id"
|
|
1776
|
-
```
|
|
313
|
+
---
|
|
1777
314
|
|
|
1778
|
-
|
|
1779
|
-
1. Check all required checks pass
|
|
1780
|
-
2. Verify no pending comments
|
|
1781
|
-
3. Approve PR:
|
|
1782
|
-
```
|
|
1783
|
-
PR Approval
|
|
1784
|
-
═══════════
|
|
315
|
+
## Detailed Documentation
|
|
1785
316
|
|
|
1786
|
-
|
|
317
|
+
For detailed instructions, read these files:
|
|
1787
318
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
319
|
+
| Topic | File |
|
|
320
|
+
|-------|------|
|
|
321
|
+
| Command details | `./.proagents/docs/command-details.md` |
|
|
322
|
+
| Workflow guide | `./.proagents/WORKFLOW.md` |
|
|
323
|
+
| Testing config | `./.proagents/docs/testing.md` |
|
|
324
|
+
| Quick reference | `./.proagents/PROAGENTS.md` |
|
|
1793
325
|
|
|
1794
|
-
|
|
326
|
+
Or ask user: "Should I read the detailed docs for [topic]?"
|
|
1795
327
|
|
|
1796
|
-
|
|
1797
|
-
Ready to merge.
|
|
1798
|
-
```
|
|
1799
|
-
|
|
1800
|
-
### Architecture
|
|
1801
|
-
| Command | Action |
|
|
1802
|
-
|---------|--------|
|
|
1803
|
-
| `pa:architecture` | Show architecture overview |
|
|
1804
|
-
| `pa:architecture "module"` | Architecture for specific module |
|
|
1805
|
-
| `pa:architecture-diagram` | Generate architecture diagram |
|
|
1806
|
-
| `pa:architecture-export` | Export architecture docs |
|
|
1807
|
-
|
|
1808
|
-
**How to execute Architecture commands:**
|
|
1809
|
-
|
|
1810
|
-
For `pa:architecture`:
|
|
1811
|
-
1. Analyze project structure
|
|
1812
|
-
2. Identify architectural patterns
|
|
1813
|
-
3. Generate overview:
|
|
1814
|
-
```
|
|
1815
|
-
Architecture Overview
|
|
1816
|
-
═════════════════════
|
|
1817
|
-
|
|
1818
|
-
Project: my-app
|
|
1819
|
-
Type: Full-stack Next.js
|
|
1820
|
-
Pattern: Clean Architecture + Feature-based
|
|
1821
|
-
|
|
1822
|
-
Layers:
|
|
1823
|
-
┌─────────────────────────────────────────┐
|
|
1824
|
-
│ Presentation (app/, components/) │
|
|
1825
|
-
│ ┌───────────────────────────────────┐ │
|
|
1826
|
-
│ │ Application (services/, hooks/) │ │
|
|
1827
|
-
│ │ ┌─────────────────────────────┐ │ │
|
|
1828
|
-
│ │ │ Domain (types/, entities/) │ │ │
|
|
1829
|
-
│ │ └─────────────────────────────┘ │ │
|
|
1830
|
-
│ └───────────────────────────────────┘ │
|
|
1831
|
-
└─────────────────────────────────────────┘
|
|
1832
|
-
|
|
1833
|
-
Key Components:
|
|
1834
|
-
• API Routes: /app/api/* (15 endpoints)
|
|
1835
|
-
• Pages: /app/* (12 pages)
|
|
1836
|
-
• Components: /components/* (45 components)
|
|
1837
|
-
• Services: /services/* (8 services)
|
|
1838
|
-
|
|
1839
|
-
Dependencies:
|
|
1840
|
-
• Database: PostgreSQL via Prisma
|
|
1841
|
-
• Auth: NextAuth.js with JWT
|
|
1842
|
-
• State: Zustand + React Query
|
|
1843
|
-
• Styling: Tailwind CSS
|
|
1844
|
-
|
|
1845
|
-
Patterns Detected:
|
|
1846
|
-
• Repository Pattern (services/)
|
|
1847
|
-
• Factory Pattern (components/forms/)
|
|
1848
|
-
• Singleton (lib/prisma.ts)
|
|
1849
|
-
```
|
|
1850
|
-
|
|
1851
|
-
For `pa:architecture-diagram`:
|
|
1852
|
-
1. Generate Mermaid diagram from codebase
|
|
1853
|
-
2. Show component relationships:
|
|
1854
|
-
```mermaid
|
|
1855
|
-
graph TB
|
|
1856
|
-
subgraph Presentation
|
|
1857
|
-
Pages[Pages]
|
|
1858
|
-
Components[Components]
|
|
1859
|
-
end
|
|
1860
|
-
|
|
1861
|
-
subgraph Application
|
|
1862
|
-
Services[Services]
|
|
1863
|
-
Hooks[Hooks]
|
|
1864
|
-
end
|
|
1865
|
-
|
|
1866
|
-
subgraph Infrastructure
|
|
1867
|
-
API[API Routes]
|
|
1868
|
-
DB[(Database)]
|
|
1869
|
-
end
|
|
1870
|
-
|
|
1871
|
-
Pages --> Components
|
|
1872
|
-
Pages --> Hooks
|
|
1873
|
-
Hooks --> Services
|
|
1874
|
-
Services --> API
|
|
1875
|
-
API --> DB
|
|
1876
|
-
```
|
|
1877
|
-
3. Save to `./docs/architecture.md`
|
|
1878
|
-
|
|
1879
|
-
### API Testing
|
|
1880
|
-
| Command | Action |
|
|
1881
|
-
|---------|--------|
|
|
1882
|
-
| `pa:api-test` | Test API endpoints |
|
|
1883
|
-
| `pa:api-test "endpoint"` | Test specific endpoint |
|
|
1884
|
-
| `pa:curl` | Generate curl commands |
|
|
1885
|
-
| `pa:curl "endpoint"` | Curl for specific endpoint |
|
|
1886
|
-
| `pa:postman` | Generate Postman collection |
|
|
1887
|
-
| `pa:postman-export` | Export to Postman file |
|
|
1888
|
-
|
|
1889
|
-
**How to execute API Testing commands:**
|
|
1890
|
-
|
|
1891
|
-
For `pa:api-test`:
|
|
1892
|
-
1. Discover API endpoints from routes
|
|
1893
|
-
2. Generate and run tests:
|
|
1894
|
-
```
|
|
1895
|
-
API Test Results
|
|
1896
|
-
════════════════
|
|
1897
|
-
|
|
1898
|
-
Testing: /api/*
|
|
1899
|
-
Environment: development (localhost:3000)
|
|
1900
|
-
|
|
1901
|
-
GET /api/users
|
|
1902
|
-
├─ Status: 200 OK ✓
|
|
1903
|
-
├─ Time: 45ms
|
|
1904
|
-
└─ Response: Array[10 items]
|
|
1905
|
-
|
|
1906
|
-
POST /api/users
|
|
1907
|
-
├─ Status: 201 Created ✓
|
|
1908
|
-
├─ Time: 120ms
|
|
1909
|
-
└─ Response: { id: "123", name: "Test" }
|
|
1910
|
-
|
|
1911
|
-
GET /api/users/:id
|
|
1912
|
-
├─ Status: 200 OK ✓
|
|
1913
|
-
├─ Time: 32ms
|
|
1914
|
-
└─ Response: { id: "1", name: "John" }
|
|
1915
|
-
|
|
1916
|
-
DELETE /api/users/:id
|
|
1917
|
-
├─ Status: 401 Unauthorized ✗
|
|
1918
|
-
├─ Time: 15ms
|
|
1919
|
-
└─ Error: Missing auth token
|
|
1920
|
-
|
|
1921
|
-
Summary: 3/4 passed (75%)
|
|
1922
|
-
```
|
|
1923
|
-
|
|
1924
|
-
For `pa:curl`:
|
|
1925
|
-
1. Analyze API routes and generate curl commands:
|
|
1926
|
-
```
|
|
1927
|
-
Generated Curl Commands
|
|
1928
|
-
═══════════════════════
|
|
1929
|
-
|
|
1930
|
-
# List users
|
|
1931
|
-
curl -X GET http://localhost:3000/api/users \
|
|
1932
|
-
-H "Content-Type: application/json" \
|
|
1933
|
-
-H "Authorization: Bearer $TOKEN"
|
|
1934
|
-
|
|
1935
|
-
# Create user
|
|
1936
|
-
curl -X POST http://localhost:3000/api/users \
|
|
1937
|
-
-H "Content-Type: application/json" \
|
|
1938
|
-
-H "Authorization: Bearer $TOKEN" \
|
|
1939
|
-
-d '{"name": "John", "email": "john@example.com"}'
|
|
1940
|
-
|
|
1941
|
-
# Get user by ID
|
|
1942
|
-
curl -X GET http://localhost:3000/api/users/123 \
|
|
1943
|
-
-H "Authorization: Bearer $TOKEN"
|
|
1944
|
-
|
|
1945
|
-
Saved to: ./docs/curl-commands.sh
|
|
1946
|
-
```
|
|
1947
|
-
|
|
1948
|
-
For `pa:postman`:
|
|
1949
|
-
1. Scan API routes and extract endpoints
|
|
1950
|
-
2. Generate Postman collection:
|
|
1951
|
-
```
|
|
1952
|
-
Postman Collection Generated
|
|
1953
|
-
════════════════════════════
|
|
1954
|
-
|
|
1955
|
-
Collection: my-app API
|
|
1956
|
-
Endpoints: 15
|
|
1957
|
-
|
|
1958
|
-
Folders:
|
|
1959
|
-
├─ Auth (3 endpoints)
|
|
1960
|
-
│ ├─ POST /api/auth/login
|
|
1961
|
-
│ ├─ POST /api/auth/register
|
|
1962
|
-
│ └─ POST /api/auth/logout
|
|
1963
|
-
├─ Users (5 endpoints)
|
|
1964
|
-
│ ├─ GET /api/users
|
|
1965
|
-
│ ├─ POST /api/users
|
|
1966
|
-
│ ├─ GET /api/users/:id
|
|
1967
|
-
│ ├─ PUT /api/users/:id
|
|
1968
|
-
│ └─ DELETE /api/users/:id
|
|
1969
|
-
└─ Posts (7 endpoints)
|
|
1970
|
-
└─ ...
|
|
1971
|
-
|
|
1972
|
-
Saved to: ./docs/postman-collection.json
|
|
1973
|
-
|
|
1974
|
-
Import: File > Import in Postman
|
|
1975
|
-
```
|
|
1976
|
-
|
|
1977
|
-
### Health & Monitoring
|
|
1978
|
-
| Command | Action |
|
|
1979
|
-
|---------|--------|
|
|
1980
|
-
| `pa:health` | Project health check |
|
|
1981
|
-
| `pa:health-full` | Comprehensive health report |
|
|
1982
|
-
| `pa:monitor` | Show monitoring status |
|
|
1983
|
-
| `pa:monitor "service"` | Monitor specific service |
|
|
1984
|
-
| `pa:uptime` | Service uptime check |
|
|
1985
|
-
|
|
1986
|
-
**How to execute Health & Monitoring commands:**
|
|
1987
|
-
|
|
1988
|
-
For `pa:health`:
|
|
1989
|
-
1. Check various project health indicators:
|
|
1990
|
-
```
|
|
1991
|
-
Project Health Check
|
|
1992
|
-
════════════════════
|
|
1993
|
-
|
|
1994
|
-
Overall: 85% Healthy ████████░░
|
|
1995
|
-
|
|
1996
|
-
Code Quality:
|
|
1997
|
-
✓ Linting: No errors
|
|
1998
|
-
✓ Type checking: No errors
|
|
1999
|
-
⚠ Test coverage: 72% (target: 80%)
|
|
2000
|
-
✓ No security vulnerabilities
|
|
2001
|
-
|
|
2002
|
-
Dependencies:
|
|
2003
|
-
✓ All dependencies installed
|
|
2004
|
-
⚠ 3 outdated packages
|
|
2005
|
-
✓ No security advisories
|
|
2006
|
-
|
|
2007
|
-
Configuration:
|
|
2008
|
-
✓ Environment variables set
|
|
2009
|
-
✓ Config files valid
|
|
2010
|
-
⚠ Missing .env.example
|
|
2011
|
-
|
|
2012
|
-
Git Status:
|
|
2013
|
-
✓ Clean working directory
|
|
2014
|
-
✓ Up to date with remote
|
|
2015
|
-
✓ No merge conflicts
|
|
2016
|
-
|
|
2017
|
-
Performance:
|
|
2018
|
-
✓ Bundle size: 245KB (limit: 500KB)
|
|
2019
|
-
✓ Build time: 12s
|
|
2020
|
-
⚠ Lighthouse score: 78 (target: 90)
|
|
2021
|
-
|
|
2022
|
-
Issues Found: 4
|
|
2023
|
-
• Test coverage below 80%
|
|
2024
|
-
• 3 outdated packages
|
|
2025
|
-
• Missing .env.example
|
|
2026
|
-
• Lighthouse score below target
|
|
2027
|
-
```
|
|
2028
|
-
|
|
2029
|
-
For `pa:monitor`:
|
|
2030
|
-
1. Check running services and status:
|
|
2031
|
-
```
|
|
2032
|
-
Service Monitor
|
|
2033
|
-
═══════════════
|
|
2034
|
-
|
|
2035
|
-
Services:
|
|
2036
|
-
┌────────────────┬──────────┬─────────┬────────────┐
|
|
2037
|
-
│ Service │ Status │ Uptime │ Health │
|
|
2038
|
-
├────────────────┼──────────┼─────────┼────────────┤
|
|
2039
|
-
│ App (Next.js) │ Running │ 2h 15m │ Healthy │
|
|
2040
|
-
│ Database │ Running │ 5d 3h │ Healthy │
|
|
2041
|
-
│ Redis Cache │ Running │ 5d 3h │ Healthy │
|
|
2042
|
-
│ Worker │ Stopped │ - │ ⚠ Down │
|
|
2043
|
-
└────────────────┴──────────┴─────────┴────────────┘
|
|
2044
|
-
|
|
2045
|
-
Recent Events:
|
|
2046
|
-
• 10:30 - App restarted (deployment)
|
|
2047
|
-
• 09:15 - Worker stopped (manual)
|
|
2048
|
-
• Yesterday - Database backup completed
|
|
2049
|
-
|
|
2050
|
-
Alerts:
|
|
2051
|
-
⚠ Worker service is not running
|
|
2052
|
-
```
|
|
2053
|
-
|
|
2054
|
-
For `pa:uptime`:
|
|
2055
|
-
1. Check endpoint availability:
|
|
2056
|
-
```
|
|
2057
|
-
Uptime Check
|
|
2058
|
-
════════════
|
|
2059
|
-
|
|
2060
|
-
Checking endpoints...
|
|
2061
|
-
|
|
2062
|
-
Production (https://myapp.com):
|
|
2063
|
-
├─ / (homepage): 200 OK (125ms) ✓
|
|
2064
|
-
├─ /api/health: 200 OK (45ms) ✓
|
|
2065
|
-
├─ /api/users: 200 OK (89ms) ✓
|
|
2066
|
-
└─ /dashboard: 200 OK (156ms) ✓
|
|
2067
|
-
|
|
2068
|
-
Staging (https://staging.myapp.com):
|
|
2069
|
-
├─ / (homepage): 200 OK (145ms) ✓
|
|
2070
|
-
└─ /api/health: 200 OK (52ms) ✓
|
|
2071
|
-
|
|
2072
|
-
All endpoints responding ✓
|
|
2073
|
-
Average response time: 102ms
|
|
2074
|
-
```
|
|
2075
|
-
|
|
2076
|
-
### Quick Actions
|
|
2077
|
-
| Command | Action |
|
|
2078
|
-
|---------|--------|
|
|
2079
|
-
| `pa:quick` | Show quick actions menu |
|
|
2080
|
-
| `pa:quick "action"` | Execute quick action |
|
|
2081
|
-
| `pa:alias` | Manage command aliases |
|
|
2082
|
-
| `pa:alias-add "name" "command"` | Add new alias |
|
|
2083
|
-
| `pa:alias-remove "name"` | Remove alias |
|
|
2084
|
-
|
|
2085
|
-
**How to execute Quick Actions commands:**
|
|
2086
|
-
|
|
2087
|
-
For `pa:quick`:
|
|
2088
|
-
1. Show context-aware quick actions:
|
|
2089
|
-
```
|
|
2090
|
-
Quick Actions
|
|
2091
|
-
═════════════
|
|
2092
|
-
|
|
2093
|
-
Based on current context (feature/user-auth):
|
|
2094
|
-
|
|
2095
|
-
Development:
|
|
2096
|
-
[1] Run tests for current feature
|
|
2097
|
-
[2] Check code coverage
|
|
2098
|
-
[3] Lint and fix
|
|
2099
|
-
|
|
2100
|
-
Git:
|
|
2101
|
-
[4] Commit all changes
|
|
2102
|
-
[5] Push to remote
|
|
2103
|
-
[6] Create PR
|
|
2104
|
-
|
|
2105
|
-
Quality:
|
|
2106
|
-
[7] Run full QA check
|
|
2107
|
-
[8] Security scan
|
|
2108
|
-
[9] Performance audit
|
|
2109
|
-
|
|
2110
|
-
Documentation:
|
|
2111
|
-
[10] Update docs for changes
|
|
2112
|
-
|
|
2113
|
-
Select action (1-10) or type command:
|
|
2114
|
-
> 6
|
|
2115
|
-
|
|
2116
|
-
Creating PR...
|
|
2117
|
-
```
|
|
2118
|
-
|
|
2119
|
-
For `pa:alias`:
|
|
2120
|
-
1. List and manage command aliases:
|
|
2121
|
-
```
|
|
2122
|
-
Command Aliases
|
|
2123
|
-
═══════════════
|
|
2124
|
-
|
|
2125
|
-
Current Aliases:
|
|
2126
|
-
┌──────────┬───────────────────────────┐
|
|
2127
|
-
│ Alias │ Command │
|
|
2128
|
-
├──────────┼───────────────────────────┤
|
|
2129
|
-
│ pa:c │ pa:commit │
|
|
2130
|
-
│ pa:pr │ pa:github-pr │
|
|
2131
|
-
│ pa:cov │ pa:coverage │
|
|
2132
|
-
│ pa:sec │ pa:security-scan │
|
|
2133
|
-
│ pa:up │ pa:deps-outdated │
|
|
2134
|
-
└──────────┴───────────────────────────┘
|
|
2135
|
-
|
|
2136
|
-
Add alias: pa:alias-add "name" "command"
|
|
2137
|
-
Remove: pa:alias-remove "name"
|
|
2138
|
-
|
|
2139
|
-
Built-in aliases cannot be modified:
|
|
2140
|
-
pa:f, pa:s, pa:h, pa:d, pa:t, pa:q, pa:a, pa:r, pa:p, pa:i
|
|
2141
|
-
```
|
|
2142
|
-
|
|
2143
|
-
For `pa:alias-add`:
|
|
2144
|
-
1. Add custom alias:
|
|
2145
|
-
```
|
|
2146
|
-
Adding Alias
|
|
2147
|
-
════════════
|
|
2148
|
-
|
|
2149
|
-
Alias: pa:ship
|
|
2150
|
-
Command: pa:test && pa:build && pa:deploy
|
|
2151
|
-
|
|
2152
|
-
✓ Alias created!
|
|
2153
|
-
|
|
2154
|
-
Usage: pa:ship
|
|
2155
|
-
Runs: pa:test && pa:build && pa:deploy
|
|
2156
|
-
```
|
|
2157
|
-
|
|
2158
|
-
### Platform-Specific Test Suites
|
|
2159
|
-
|
|
2160
|
-
**Mobile (React Native / Expo):**
|
|
2161
|
-
| Command | Action |
|
|
2162
|
-
|---------|--------|
|
|
2163
|
-
| `pa:test-mobile` | Run full mobile test suite |
|
|
2164
|
-
| `pa:test-mobile "feature"` | Test specific feature |
|
|
2165
|
-
|
|
2166
|
-
**Web (React / Next.js / Vue / etc.):**
|
|
2167
|
-
| Command | Action |
|
|
2168
|
-
|---------|--------|
|
|
2169
|
-
| `pa:test-web` | Run full web test suite |
|
|
2170
|
-
| `pa:test-web "feature"` | Test specific web feature |
|
|
2171
|
-
|
|
2172
|
-
**API / Backend (Node.js / Python / etc.):**
|
|
2173
|
-
| Command | Action |
|
|
2174
|
-
|---------|--------|
|
|
2175
|
-
| `pa:test-api` | Run full API/backend test suite |
|
|
2176
|
-
| `pa:test-api "endpoint"` | Test specific API endpoint |
|
|
2177
|
-
|
|
2178
|
-
**Visual & Comparison:**
|
|
2179
|
-
| Command | Action |
|
|
2180
|
-
|---------|--------|
|
|
2181
|
-
| `pa:test-visual` | Visual/design comparison testing |
|
|
2182
|
-
| `pa:compare-figma` | Compare UI against Figma design |
|
|
2183
|
-
| `pa:compare-image "path"` | Compare UI against image/sketch |
|
|
2184
|
-
| `pa:screenshot` | Take app screenshots for comparison |
|
|
2185
|
-
|
|
2186
|
-
**Auto-Fix:**
|
|
2187
|
-
| Command | Action |
|
|
2188
|
-
|---------|--------|
|
|
2189
|
-
| `pa:test-auto-fix` | Auto-fix failing tests |
|
|
2190
|
-
| `pa:test-loop` | Test → Fix → Retest loop until success |
|
|
2191
|
-
|
|
2192
|
-
**How to execute Mobile Test Suite commands:**
|
|
2193
|
-
|
|
2194
|
-
For `pa:test-mobile`:
|
|
2195
|
-
|
|
2196
|
-
**Supports ALL mobile platforms:**
|
|
2197
|
-
- React Native / Expo
|
|
2198
|
-
- Native Android (Kotlin/Java)
|
|
2199
|
-
- Native iOS (Swift/Objective-C)
|
|
2200
|
-
- Flutter (Dart)
|
|
2201
|
-
|
|
2202
|
-
1. **Detect project type automatically:**
|
|
2203
|
-
```
|
|
2204
|
-
Detecting mobile project type...
|
|
2205
|
-
|
|
2206
|
-
Checking for:
|
|
2207
|
-
├── package.json + react-native → React Native
|
|
2208
|
-
├── android/build.gradle (no RN) → Native Android
|
|
2209
|
-
├── ios/*.xcodeproj (no RN) → Native iOS
|
|
2210
|
-
├── pubspec.yaml → Flutter
|
|
2211
|
-
|
|
2212
|
-
Detected: [PROJECT_TYPE]
|
|
2213
|
-
```
|
|
2214
|
-
|
|
2215
|
-
2. **Check & auto-install required tools based on platform:**
|
|
2216
|
-
|
|
2217
|
-
**React Native / Expo:**
|
|
2218
|
-
```
|
|
2219
|
-
✓ Node.js
|
|
2220
|
-
✓ Jest / Vitest
|
|
2221
|
-
✓ React Native Testing Library
|
|
2222
|
-
✗ MISSING: Maestro → Auto-installing...
|
|
2223
|
-
✗ MISSING: Detox → Auto-installing...
|
|
2224
|
-
```
|
|
2225
|
-
|
|
2226
|
-
**Native Android (Kotlin/Java):**
|
|
2227
|
-
```
|
|
2228
|
-
✓ Android Studio / Gradle
|
|
2229
|
-
✓ JUnit
|
|
2230
|
-
✗ MISSING: Espresso → Auto-adding to build.gradle
|
|
2231
|
-
✗ MISSING: UI Automator → Auto-adding to build.gradle
|
|
2232
|
-
✗ MISSING: Maestro → Auto-installing...
|
|
2233
|
-
```
|
|
2234
|
-
|
|
2235
|
-
**Native iOS (Swift/Objective-C):**
|
|
2236
|
-
```
|
|
2237
|
-
✓ Xcode
|
|
2238
|
-
✓ XCTest (built-in)
|
|
2239
|
-
✓ XCUITest (built-in)
|
|
2240
|
-
✗ MISSING: Maestro → Auto-installing...
|
|
2241
|
-
```
|
|
2242
|
-
|
|
2243
|
-
**Flutter:**
|
|
2244
|
-
```
|
|
2245
|
-
✓ Flutter SDK
|
|
2246
|
-
✓ flutter_test (built-in)
|
|
2247
|
-
✗ MISSING: integration_test → Auto-adding to pubspec.yaml
|
|
2248
|
-
✗ MISSING: Maestro → Auto-installing...
|
|
2249
|
-
```
|
|
2250
|
-
|
|
2251
|
-
**IMPORTANT - FULL AUTOMATION:**
|
|
2252
|
-
- Missing tools? **Install automatically** (no confirmation)
|
|
2253
|
-
- Tests fail? **Fix automatically** (no confirmation)
|
|
2254
|
-
- Fix doesn't work? **Try alternative fix** (no confirmation)
|
|
2255
|
-
- Only stop when: all tests pass OR no fix possible
|
|
2256
|
-
|
|
2257
|
-
**Just DO it.**
|
|
2258
|
-
|
|
2259
|
-
3. **Run platform-specific test suite:**
|
|
2260
|
-
|
|
2261
|
-
**For React Native:**
|
|
2262
|
-
```
|
|
2263
|
-
Mobile Test Suite
|
|
2264
|
-
═════════════════
|
|
2265
|
-
|
|
2266
|
-
Running full test suite for: feature/user-auth
|
|
2267
|
-
|
|
2268
|
-
Phase 1: Unit Tests
|
|
2269
|
-
───────────────────
|
|
2270
|
-
✓ AuthService.login() - 5 tests passed
|
|
2271
|
-
✓ AuthService.logout() - 3 tests passed
|
|
2272
|
-
✓ TokenManager - 8 tests passed
|
|
2273
|
-
✓ UserStore - 12 tests passed
|
|
2274
|
-
|
|
2275
|
-
Phase 2: Component Tests
|
|
2276
|
-
────────────────────────
|
|
2277
|
-
✓ LoginScreen - renders correctly
|
|
2278
|
-
✓ LoginScreen - validates email format
|
|
2279
|
-
✓ LoginScreen - shows error on invalid credentials
|
|
2280
|
-
✓ SignupScreen - all fields required
|
|
2281
|
-
✓ ProfileScreen - displays user data
|
|
2282
|
-
|
|
2283
|
-
Phase 3: Integration Tests
|
|
2284
|
-
──────────────────────────
|
|
2285
|
-
✓ Login flow end-to-end
|
|
2286
|
-
✓ Token refresh on expiry
|
|
2287
|
-
✓ Logout clears all data
|
|
2288
|
-
✗ FAILED: Password reset flow
|
|
2289
|
-
→ Error: Reset email not sent
|
|
2290
|
-
|
|
2291
|
-
Phase 4: E2E Tests (Maestro/Detox)
|
|
2292
|
-
──────────────────────────────────
|
|
2293
|
-
✓ User can login with valid credentials
|
|
2294
|
-
✓ User sees error with invalid password
|
|
2295
|
-
✗ FAILED: User can reset password
|
|
2296
|
-
→ Button not found: "Send Reset Email"
|
|
2297
|
-
|
|
2298
|
-
Phase 5: Visual Tests
|
|
2299
|
-
─────────────────────
|
|
2300
|
-
✓ LoginScreen matches design
|
|
2301
|
-
✗ FAILED: SignupScreen has visual differences
|
|
2302
|
-
→ Button color: expected #007AFF, got #0066CC
|
|
2303
|
-
→ Font size: expected 16px, got 14px
|
|
2304
|
-
|
|
2305
|
-
══════════════════════════════════════════
|
|
2306
|
-
RESULTS: 35/38 tests passed (3 failed)
|
|
2307
|
-
══════════════════════════════════════════
|
|
2308
|
-
|
|
2309
|
-
Failed Tests:
|
|
2310
|
-
1. Integration: Password reset flow
|
|
2311
|
-
2. E2E: User can reset password
|
|
2312
|
-
3. Visual: SignupScreen design mismatch
|
|
2313
|
-
|
|
2314
|
-
══════════════════════════════════════════
|
|
2315
|
-
AUTO-FIX: Attempting to fix 3 failed tests...
|
|
2316
|
-
══════════════════════════════════════════
|
|
2317
|
-
```
|
|
2318
|
-
|
|
2319
|
-
3. **Automatically fix all failures** (no confirmation needed):
|
|
2320
|
-
```
|
|
2321
|
-
══════════════════════════════════════════
|
|
2322
|
-
AUTO-FIX: Fixing 3 failed tests...
|
|
2323
|
-
══════════════════════════════════════════
|
|
2324
|
-
|
|
2325
|
-
Fix 1/3: Integration - Password reset flow
|
|
2326
|
-
──────────────────────────────────────────
|
|
2327
|
-
Root cause: ResetEmailService.send() not called
|
|
2328
|
-
Fixing: src/services/AuthService.ts:142
|
|
2329
|
-
→ Added: await this.resetEmailService.send(email)
|
|
2330
|
-
Re-running test... ✓ PASSED
|
|
2331
|
-
|
|
2332
|
-
Fix 2/3: E2E - User can reset password
|
|
2333
|
-
──────────────────────────────────────────
|
|
2334
|
-
Root cause: Button text mismatch
|
|
2335
|
-
Fixing: src/screens/ResetPassword.tsx:28
|
|
2336
|
-
→ Changed: "Reset" → "Send Reset Email"
|
|
2337
|
-
Re-running test... ✓ PASSED
|
|
2338
|
-
|
|
2339
|
-
Fix 3/3: Visual - SignupScreen design mismatch
|
|
2340
|
-
──────────────────────────────────────────
|
|
2341
|
-
Root cause: Wrong color and font size
|
|
2342
|
-
Fixing: src/screens/SignupScreen.styles.ts:15-16
|
|
2343
|
-
→ Changed: color #0066CC → #007AFF
|
|
2344
|
-
→ Changed: fontSize 14px → 16px
|
|
2345
|
-
Re-running test... ✓ PASSED
|
|
2346
|
-
|
|
2347
|
-
══════════════════════════════════════════
|
|
2348
|
-
ALL TESTS PASSING: 38/38 ✓
|
|
2349
|
-
══════════════════════════════════════════
|
|
2350
|
-
```
|
|
2351
|
-
|
|
2352
|
-
**For Native Android (Kotlin/Java):**
|
|
2353
|
-
```
|
|
2354
|
-
Android Test Suite
|
|
2355
|
-
══════════════════
|
|
2356
|
-
|
|
2357
|
-
Phase 1: Unit Tests (JUnit)
|
|
2358
|
-
───────────────────────────
|
|
2359
|
-
Running: ./gradlew test
|
|
2360
|
-
✓ UserRepositoryTest - 8 passed
|
|
2361
|
-
✓ AuthViewModelTest - 12 passed
|
|
2362
|
-
✓ PaymentServiceTest - 6 passed
|
|
2363
|
-
|
|
2364
|
-
Phase 2: Instrumented Tests (Espresso)
|
|
2365
|
-
──────────────────────────────────────
|
|
2366
|
-
Running: ./gradlew connectedAndroidTest
|
|
2367
|
-
✓ LoginActivityTest - UI renders correctly
|
|
2368
|
-
✓ MainActivityTest - Navigation works
|
|
2369
|
-
✗ FAILED: CheckoutActivityTest - Button not found
|
|
2370
|
-
|
|
2371
|
-
AUTO-FIX: Analyzing failure...
|
|
2372
|
-
Root cause: Button ID changed
|
|
2373
|
-
Fixing: app/src/main/res/layout/activity_checkout.xml
|
|
2374
|
-
→ Changed: android:id="@+id/btn_pay" → android:id="@+id/checkout_button"
|
|
2375
|
-
Fixing: app/src/androidTest/.../CheckoutActivityTest.kt
|
|
2376
|
-
→ Changed: R.id.btn_pay → R.id.checkout_button
|
|
2377
|
-
Re-running test... ✓ PASSED
|
|
2378
|
-
|
|
2379
|
-
Phase 3: UI Tests (UI Automator)
|
|
2380
|
-
─────────────────────────────────
|
|
2381
|
-
✓ Full checkout flow
|
|
2382
|
-
✓ User settings update
|
|
2383
|
-
✓ Push notification handling
|
|
2384
|
-
|
|
2385
|
-
Phase 4: E2E Tests (Maestro)
|
|
2386
|
-
────────────────────────────
|
|
2387
|
-
Running: maestro test .maestro/
|
|
2388
|
-
✓ User login flow
|
|
2389
|
-
✓ Product purchase flow
|
|
2390
|
-
|
|
2391
|
-
══════════════════════════════════════════
|
|
2392
|
-
ALL TESTS PASSING: 32/32 ✓
|
|
2393
|
-
══════════════════════════════════════════
|
|
2394
|
-
```
|
|
2395
|
-
|
|
2396
|
-
**For Native iOS (Swift/Objective-C):**
|
|
2397
|
-
```
|
|
2398
|
-
iOS Test Suite
|
|
2399
|
-
══════════════
|
|
2400
|
-
|
|
2401
|
-
Phase 1: Unit Tests (XCTest)
|
|
2402
|
-
────────────────────────────
|
|
2403
|
-
Running: xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 15'
|
|
2404
|
-
✓ UserServiceTests - 10 passed
|
|
2405
|
-
✓ AuthManagerTests - 8 passed
|
|
2406
|
-
✓ NetworkClientTests - 12 passed
|
|
2407
|
-
|
|
2408
|
-
Phase 2: UI Tests (XCUITest)
|
|
2409
|
-
────────────────────────────
|
|
2410
|
-
✓ LoginViewControllerTests - UI renders
|
|
2411
|
-
✓ HomeViewControllerTests - Navigation works
|
|
2412
|
-
✗ FAILED: ProfileViewControllerTests - Label not found
|
|
2413
|
-
|
|
2414
|
-
AUTO-FIX: Analyzing failure...
|
|
2415
|
-
Root cause: Accessibility identifier missing
|
|
2416
|
-
Fixing: ProfileViewController.swift:45
|
|
2417
|
-
→ Added: nameLabel.accessibilityIdentifier = "profile_name_label"
|
|
2418
|
-
Re-running test... ✓ PASSED
|
|
2419
|
-
|
|
2420
|
-
Phase 3: E2E Tests (Maestro)
|
|
2421
|
-
────────────────────────────
|
|
2422
|
-
Running: maestro test .maestro/
|
|
2423
|
-
✓ Onboarding flow
|
|
2424
|
-
✓ Purchase flow
|
|
2425
|
-
✓ Settings update
|
|
2426
|
-
|
|
2427
|
-
══════════════════════════════════════════
|
|
2428
|
-
ALL TESTS PASSING: 28/28 ✓
|
|
2429
|
-
══════════════════════════════════════════
|
|
2430
|
-
```
|
|
2431
|
-
|
|
2432
|
-
**For Flutter (Dart):**
|
|
2433
|
-
```
|
|
2434
|
-
Flutter Test Suite
|
|
2435
|
-
══════════════════
|
|
2436
|
-
|
|
2437
|
-
Phase 1: Unit Tests
|
|
2438
|
-
───────────────────
|
|
2439
|
-
Running: flutter test test/unit/
|
|
2440
|
-
✓ user_repository_test.dart - 8 passed
|
|
2441
|
-
✓ auth_bloc_test.dart - 15 passed
|
|
2442
|
-
✓ api_client_test.dart - 10 passed
|
|
2443
|
-
|
|
2444
|
-
Phase 2: Widget Tests
|
|
2445
|
-
─────────────────────
|
|
2446
|
-
Running: flutter test test/widget/
|
|
2447
|
-
✓ login_screen_test.dart - renders correctly
|
|
2448
|
-
✓ home_screen_test.dart - shows user data
|
|
2449
|
-
✗ FAILED: cart_screen_test.dart - widget not found
|
|
2450
|
-
|
|
2451
|
-
AUTO-FIX: Analyzing failure...
|
|
2452
|
-
Root cause: Key not set on widget
|
|
2453
|
-
Fixing: lib/screens/cart_screen.dart:67
|
|
2454
|
-
→ Added: key: const Key('checkout_button')
|
|
2455
|
-
Re-running test... ✓ PASSED
|
|
2456
|
-
|
|
2457
|
-
Phase 3: Integration Tests
|
|
2458
|
-
──────────────────────────
|
|
2459
|
-
Running: flutter test integration_test/
|
|
2460
|
-
✓ app_test.dart - Full app flow
|
|
2461
|
-
✓ checkout_test.dart - Purchase complete
|
|
2462
|
-
|
|
2463
|
-
Phase 4: E2E Tests (Maestro)
|
|
2464
|
-
────────────────────────────
|
|
2465
|
-
Running: maestro test .maestro/
|
|
2466
|
-
✓ User registration
|
|
2467
|
-
✓ Product browsing
|
|
2468
|
-
✓ Checkout flow
|
|
2469
|
-
|
|
2470
|
-
══════════════════════════════════════════
|
|
2471
|
-
ALL TESTS PASSING: 42/42 ✓
|
|
2472
|
-
══════════════════════════════════════════
|
|
2473
|
-
```
|
|
2474
|
-
|
|
2475
|
-
4. If a fix cannot be applied automatically:
|
|
2476
|
-
```
|
|
2477
|
-
✗ Cannot auto-fix: Database schema mismatch
|
|
2478
|
-
Reason: Requires migration file and database access
|
|
2479
|
-
|
|
2480
|
-
Manual action needed:
|
|
2481
|
-
→ Run: npx prisma migrate dev --name fix_user_table
|
|
2482
|
-
```
|
|
2483
|
-
|
|
2484
|
-
5. Generate detailed test report at `./.proagents/test-reports/mobile-{timestamp}.md`
|
|
2485
|
-
|
|
2486
|
-
For `pa:test-web`:
|
|
2487
|
-
1. **Check required tools and auto-install:**
|
|
2488
|
-
```
|
|
2489
|
-
Checking required tools...
|
|
2490
|
-
✓ Node.js
|
|
2491
|
-
✓ Vitest / Jest
|
|
2492
|
-
✗ MISSING: Playwright
|
|
2493
|
-
|
|
2494
|
-
Auto-installing Playwright...
|
|
2495
|
-
→ npx playwright install
|
|
2496
|
-
✓ Playwright installed
|
|
2497
|
-
```
|
|
2498
|
-
|
|
2499
|
-
2. **Run full web test suite:**
|
|
2500
|
-
```
|
|
2501
|
-
Web Test Suite
|
|
2502
|
-
══════════════
|
|
2503
|
-
|
|
2504
|
-
Phase 1: Unit Tests (Vitest/Jest)
|
|
2505
|
-
──────────────────────────────────
|
|
2506
|
-
Running: npm test
|
|
2507
|
-
✓ utils/formatDate.test.ts - 5 passed
|
|
2508
|
-
✓ hooks/useAuth.test.ts - 8 passed
|
|
2509
|
-
✓ services/api.test.ts - 12 passed
|
|
2510
|
-
|
|
2511
|
-
Phase 2: Component Tests
|
|
2512
|
-
────────────────────────
|
|
2513
|
-
✓ Button.test.tsx - renders correctly
|
|
2514
|
-
✓ Form.test.tsx - validates inputs
|
|
2515
|
-
✗ FAILED: Modal.test.tsx - close handler
|
|
2516
|
-
|
|
2517
|
-
AUTO-FIX: Analyzing failure...
|
|
2518
|
-
Root cause: onClose prop not called
|
|
2519
|
-
Fixing: src/components/Modal.tsx:24
|
|
2520
|
-
→ Added: onClick={() => onClose?.()}
|
|
2521
|
-
Re-running test... ✓ PASSED
|
|
2522
|
-
|
|
2523
|
-
Phase 3: Integration Tests
|
|
2524
|
-
──────────────────────────
|
|
2525
|
-
✓ Login flow
|
|
2526
|
-
✓ Checkout process
|
|
2527
|
-
✓ User settings update
|
|
2528
|
-
|
|
2529
|
-
Phase 4: E2E Tests (Playwright)
|
|
2530
|
-
────────────────────────────────
|
|
2531
|
-
Running: npx playwright test
|
|
2532
|
-
✓ Homepage loads correctly
|
|
2533
|
-
✓ User can login
|
|
2534
|
-
✓ User can add to cart
|
|
2535
|
-
✗ FAILED: Checkout completes
|
|
2536
|
-
|
|
2537
|
-
AUTO-FIX: Analyzing failure...
|
|
2538
|
-
Root cause: Submit button selector changed
|
|
2539
|
-
Fixing: e2e/checkout.spec.ts:45
|
|
2540
|
-
→ Changed: 'button.submit' → 'button[type="submit"]'
|
|
2541
|
-
Re-running test... ✓ PASSED
|
|
2542
|
-
|
|
2543
|
-
Phase 5: Visual Regression (Percy/Playwright)
|
|
2544
|
-
──────────────────────────────────────────────
|
|
2545
|
-
✓ Homepage - no visual changes
|
|
2546
|
-
✓ Product page - no visual changes
|
|
2547
|
-
✗ FAILED: Cart page - button color changed
|
|
2548
|
-
|
|
2549
|
-
AUTO-FIX: Analyzing failure...
|
|
2550
|
-
Root cause: CSS variable override
|
|
2551
|
-
Fixing: src/styles/cart.css:12
|
|
2552
|
-
→ Changed: --btn-color: blue → --btn-color: var(--primary)
|
|
2553
|
-
Re-running test... ✓ PASSED
|
|
2554
|
-
|
|
2555
|
-
══════════════════════════════════════════
|
|
2556
|
-
ALL TESTS PASSING: 45/45 ✓
|
|
2557
|
-
══════════════════════════════════════════
|
|
2558
|
-
```
|
|
2559
|
-
|
|
2560
|
-
3. Generate detailed test report at `./.proagents/test-reports/web-{timestamp}.md`
|
|
2561
|
-
|
|
2562
|
-
For `pa:test-api`:
|
|
2563
|
-
1. **Check required tools and auto-install:**
|
|
2564
|
-
```
|
|
2565
|
-
Checking required tools...
|
|
2566
|
-
✓ Node.js / Python
|
|
2567
|
-
✓ Jest / Pytest
|
|
2568
|
-
✗ MISSING: Supertest
|
|
2569
|
-
✗ MISSING: k6 (load testing)
|
|
2570
|
-
|
|
2571
|
-
Auto-installing...
|
|
2572
|
-
→ npm install --save-dev supertest
|
|
2573
|
-
→ brew install k6
|
|
2574
|
-
✓ All tools installed
|
|
2575
|
-
```
|
|
2576
|
-
|
|
2577
|
-
2. **Run full API test suite:**
|
|
2578
|
-
```
|
|
2579
|
-
API Test Suite
|
|
2580
|
-
══════════════
|
|
2581
|
-
|
|
2582
|
-
Phase 1: Unit Tests
|
|
2583
|
-
───────────────────
|
|
2584
|
-
✓ UserService - 12 tests passed
|
|
2585
|
-
✓ AuthService - 8 tests passed
|
|
2586
|
-
✓ PaymentService - 15 tests passed
|
|
2587
|
-
|
|
2588
|
-
Phase 2: Integration Tests
|
|
2589
|
-
──────────────────────────
|
|
2590
|
-
Testing: GET /api/users
|
|
2591
|
-
✓ Returns 200 with user list
|
|
2592
|
-
✓ Supports pagination
|
|
2593
|
-
✓ Filters by role
|
|
2594
|
-
|
|
2595
|
-
Testing: POST /api/auth/login
|
|
2596
|
-
✓ Returns token on valid credentials
|
|
2597
|
-
✓ Returns 401 on invalid password
|
|
2598
|
-
✗ FAILED: Returns 429 on rate limit
|
|
2599
|
-
|
|
2600
|
-
AUTO-FIX: Analyzing failure...
|
|
2601
|
-
Root cause: Rate limiter not configured in test env
|
|
2602
|
-
Fixing: src/middleware/rateLimit.ts:8
|
|
2603
|
-
→ Added: if (process.env.NODE_ENV === 'test') return next()
|
|
2604
|
-
Re-running test... ✓ PASSED
|
|
2605
|
-
|
|
2606
|
-
Phase 3: Contract Tests
|
|
2607
|
-
───────────────────────
|
|
2608
|
-
Validating OpenAPI spec...
|
|
2609
|
-
✓ GET /api/users matches schema
|
|
2610
|
-
✓ POST /api/users matches schema
|
|
2611
|
-
✗ FAILED: PUT /api/users/:id - missing field
|
|
2612
|
-
|
|
2613
|
-
AUTO-FIX: Analyzing failure...
|
|
2614
|
-
Root cause: Response missing 'updatedAt' field
|
|
2615
|
-
Fixing: src/controllers/userController.ts:89
|
|
2616
|
-
→ Added: updatedAt: user.updatedAt to response
|
|
2617
|
-
Re-running test... ✓ PASSED
|
|
2618
|
-
|
|
2619
|
-
Phase 4: Load Tests (k6)
|
|
2620
|
-
────────────────────────
|
|
2621
|
-
Running: k6 run loadtest.js
|
|
2622
|
-
✓ 100 VUs, 30s duration
|
|
2623
|
-
✓ p95 response time: 145ms (< 200ms threshold)
|
|
2624
|
-
✓ Error rate: 0.1% (< 1% threshold)
|
|
2625
|
-
✓ Throughput: 850 req/s
|
|
2626
|
-
|
|
2627
|
-
Phase 5: Security Tests
|
|
2628
|
-
───────────────────────
|
|
2629
|
-
✓ SQL injection: Protected
|
|
2630
|
-
✓ XSS: Protected
|
|
2631
|
-
✓ CSRF: Protected
|
|
2632
|
-
✗ FAILED: Rate limiting on /api/auth/login
|
|
2633
|
-
|
|
2634
|
-
AUTO-FIX: Analyzing failure...
|
|
2635
|
-
Root cause: Rate limit too high (1000 req/min)
|
|
2636
|
-
Fixing: src/config/security.ts:15
|
|
2637
|
-
→ Changed: loginRateLimit: 1000 → loginRateLimit: 10
|
|
2638
|
-
Re-running test... ✓ PASSED
|
|
2639
|
-
|
|
2640
|
-
══════════════════════════════════════════
|
|
2641
|
-
ALL TESTS PASSING: 52/52 ✓
|
|
2642
|
-
══════════════════════════════════════════
|
|
2643
|
-
```
|
|
2644
|
-
|
|
2645
|
-
3. Generate detailed test report at `./.proagents/test-reports/api-{timestamp}.md`
|
|
2646
|
-
|
|
2647
|
-
For `pa:test-visual`:
|
|
2648
|
-
1. Take screenshots of all screens/components
|
|
2649
|
-
2. Compare against design references:
|
|
2650
|
-
```
|
|
2651
|
-
Visual Design Testing
|
|
2652
|
-
═════════════════════
|
|
2653
|
-
|
|
2654
|
-
Comparing app UI against design references...
|
|
2655
|
-
|
|
2656
|
-
Design Source: ./designs/ (Figma exports)
|
|
2657
|
-
|
|
2658
|
-
Screen: LoginScreen
|
|
2659
|
-
───────────────────
|
|
2660
|
-
✓ Layout matches design
|
|
2661
|
-
✓ Colors match design tokens
|
|
2662
|
-
✓ Typography correct
|
|
2663
|
-
✓ Spacing/padding correct
|
|
2664
|
-
✓ Button styles match
|
|
2665
|
-
|
|
2666
|
-
Screen: SignupScreen
|
|
2667
|
-
────────────────────
|
|
2668
|
-
✗ MISMATCH DETECTED
|
|
2669
|
-
|
|
2670
|
-
Differences found:
|
|
2671
|
-
┌─────────────────┬──────────────┬──────────────┐
|
|
2672
|
-
│ Element │ Expected │ Actual │
|
|
2673
|
-
├─────────────────┼──────────────┼──────────────┤
|
|
2674
|
-
│ Submit Button │ #007AFF │ #0066CC │
|
|
2675
|
-
│ Title Font │ 24px Bold │ 22px Regular │
|
|
2676
|
-
│ Input Height │ 48px │ 44px │
|
|
2677
|
-
│ Bottom Margin │ 16px │ 12px │
|
|
2678
|
-
└─────────────────┴──────────────┴──────────────┘
|
|
2679
|
-
|
|
2680
|
-
Screenshot saved: ./.proagents/test-reports/visual/signup-diff.png
|
|
2681
|
-
|
|
2682
|
-
Screen: ProfileScreen
|
|
2683
|
-
─────────────────────
|
|
2684
|
-
✓ All elements match design
|
|
2685
|
-
|
|
2686
|
-
══════════════════════════════════════════
|
|
2687
|
-
VISUAL TEST RESULTS: 2/3 screens passed
|
|
2688
|
-
══════════════════════════════════════════
|
|
2689
|
-
|
|
2690
|
-
Run `pa:test-auto-fix` to fix visual issues automatically.
|
|
2691
|
-
```
|
|
328
|
+
---
|
|
2692
329
|
|
|
2693
|
-
|
|
2694
|
-
1. Analyze failing tests
|
|
2695
|
-
2. Identify root cause
|
|
2696
|
-
3. Generate and apply fixes:
|
|
2697
|
-
```
|
|
2698
|
-
Auto-Fix Mode
|
|
2699
|
-
═════════════
|
|
2700
|
-
|
|
2701
|
-
Analyzing 3 failing tests...
|
|
2702
|
-
|
|
2703
|
-
Fix 1: Password reset flow
|
|
2704
|
-
──────────────────────────
|
|
2705
|
-
Root Cause: API endpoint missing in AuthService
|
|
2706
|
-
|
|
2707
|
-
Applying fix to: src/services/AuthService.ts
|
|
2708
|
-
+ async resetPassword(email: string): Promise<void> {
|
|
2709
|
-
+ const response = await api.post('/auth/reset-password', { email });
|
|
2710
|
-
+ if (!response.ok) throw new Error('Reset failed');
|
|
2711
|
-
+ }
|
|
2712
|
-
|
|
2713
|
-
✓ Fix applied
|
|
2714
|
-
|
|
2715
|
-
Fix 2: Reset button not found
|
|
2716
|
-
─────────────────────────────
|
|
2717
|
-
Root Cause: Button testID missing
|
|
2718
|
-
|
|
2719
|
-
Applying fix to: src/screens/ResetPasswordScreen.tsx
|
|
2720
|
-
- <Button title="Send Reset Email" onPress={handleReset} />
|
|
2721
|
-
+ <Button
|
|
2722
|
-
+ testID="send-reset-email-button"
|
|
2723
|
-
+ title="Send Reset Email"
|
|
2724
|
-
+ onPress={handleReset}
|
|
2725
|
-
+ />
|
|
2726
|
-
|
|
2727
|
-
✓ Fix applied
|
|
2728
|
-
|
|
2729
|
-
Fix 3: SignupScreen visual mismatch
|
|
2730
|
-
────────────────────────────────────
|
|
2731
|
-
Root Cause: Style values don't match design tokens
|
|
2732
|
-
|
|
2733
|
-
Applying fix to: src/screens/SignupScreen.styles.ts
|
|
2734
|
-
- submitButton: { backgroundColor: '#0066CC' }
|
|
2735
|
-
+ submitButton: { backgroundColor: '#007AFF' }
|
|
2736
|
-
|
|
2737
|
-
- title: { fontSize: 22, fontWeight: 'normal' }
|
|
2738
|
-
+ title: { fontSize: 24, fontWeight: 'bold' }
|
|
2739
|
-
|
|
2740
|
-
- input: { height: 44, marginBottom: 12 }
|
|
2741
|
-
+ input: { height: 48, marginBottom: 16 }
|
|
2742
|
-
|
|
2743
|
-
✓ Fix applied
|
|
2744
|
-
|
|
2745
|
-
══════════════════════════════════════════
|
|
2746
|
-
AUTO-FIX COMPLETE: 3/3 issues fixed
|
|
2747
|
-
══════════════════════════════════════════
|
|
2748
|
-
|
|
2749
|
-
Running verification tests...
|
|
2750
|
-
```
|
|
2751
|
-
|
|
2752
|
-
4. **Learn from fixes** - Store successful fixes for future use:
|
|
2753
|
-
```
|
|
2754
|
-
Saving fix patterns to .proagents/.learning/fixes.json...
|
|
2755
|
-
|
|
2756
|
-
New patterns learned:
|
|
2757
|
-
┌────────────────────┬────────────────────────────────────────┐
|
|
2758
|
-
│ Error Pattern │ Fix Pattern │
|
|
2759
|
-
├────────────────────┼────────────────────────────────────────┤
|
|
2760
|
-
│ "undefined" error │ Add null check before access │
|
|
2761
|
-
│ testID not found │ Add testID prop to component │
|
|
2762
|
-
│ color mismatch │ Use design token instead of hex │
|
|
2763
|
-
│ rate limit fail │ Disable in test environment │
|
|
2764
|
-
│ schema mismatch │ Add missing field to response │
|
|
2765
|
-
└────────────────────┴────────────────────────────────────────┘
|
|
2766
|
-
|
|
2767
|
-
✓ 5 fix patterns saved
|
|
2768
|
-
```
|
|
2769
|
-
|
|
2770
|
-
**Auto-Fix Intelligence:**
|
|
2771
|
-
|
|
2772
|
-
The AI learns from previous fixes to apply them faster:
|
|
2773
|
-
|
|
2774
|
-
1. **Pattern Database** - Stored in `.proagents/.learning/`:
|
|
2775
|
-
```
|
|
2776
|
-
.proagents/.learning/
|
|
2777
|
-
├── fixes.json # Successful fix patterns
|
|
2778
|
-
├── errors.json # Common error patterns
|
|
2779
|
-
└── project-patterns.json # Project-specific patterns
|
|
2780
|
-
```
|
|
2781
|
-
|
|
2782
|
-
2. **Fix Matching** - When a test fails:
|
|
2783
|
-
```
|
|
2784
|
-
Analyzing failure: "Cannot read property 'id' of undefined"
|
|
2785
|
-
|
|
2786
|
-
Checking learned patterns...
|
|
2787
|
-
✓ Match found: "undefined property access"
|
|
2788
|
-
|
|
2789
|
-
Applying known fix:
|
|
2790
|
-
→ Add optional chaining: user?.id
|
|
2791
|
-
|
|
2792
|
-
Confidence: 95% (applied 12 times before, 100% success rate)
|
|
2793
|
-
```
|
|
2794
|
-
|
|
2795
|
-
3. **Learning from Corrections** - If AI fix is wrong:
|
|
2796
|
-
```
|
|
2797
|
-
User corrected fix:
|
|
2798
|
-
- AI suggested: user?.id ?? 'default'
|
|
2799
|
-
- User changed to: user?.id || throw new Error('User required')
|
|
2800
|
-
|
|
2801
|
-
Learning...
|
|
2802
|
-
→ Updated pattern: In auth contexts, throw error instead of default
|
|
2803
|
-
→ Saved to .proagents/.learning/corrections.json
|
|
2804
|
-
```
|
|
2805
|
-
|
|
2806
|
-
4. **Project-Specific Learning**:
|
|
2807
|
-
- Learns project conventions (e.g., "this project uses Zod for validation")
|
|
2808
|
-
- Remembers file structure patterns
|
|
2809
|
-
- Knows which solutions worked in this codebase
|
|
2810
|
-
|
|
2811
|
-
For `pa:test-loop`:
|
|
2812
|
-
1. Run complete Test → Fix → Retest cycle:
|
|
2813
|
-
```
|
|
2814
|
-
Test Loop Mode
|
|
2815
|
-
══════════════
|
|
2816
|
-
|
|
2817
|
-
Starting automated test-fix-retest cycle...
|
|
2818
|
-
Max iterations: 5
|
|
2819
|
-
|
|
2820
|
-
┌─────────────────────────────────────────────────────┐
|
|
2821
|
-
│ ITERATION 1 │
|
|
2822
|
-
├─────────────────────────────────────────────────────┤
|
|
2823
|
-
│ Running tests... │
|
|
2824
|
-
│ Results: 35/38 passed (3 failed) │
|
|
2825
|
-
│ │
|
|
2826
|
-
│ Analyzing failures... │
|
|
2827
|
-
│ Applying auto-fixes... │
|
|
2828
|
-
│ Fixes applied: 3 │
|
|
2829
|
-
└─────────────────────────────────────────────────────┘
|
|
2830
|
-
|
|
2831
|
-
┌─────────────────────────────────────────────────────┐
|
|
2832
|
-
│ ITERATION 2 │
|
|
2833
|
-
├─────────────────────────────────────────────────────┤
|
|
2834
|
-
│ Running tests... │
|
|
2835
|
-
│ Results: 37/38 passed (1 failed) │
|
|
2836
|
-
│ │
|
|
2837
|
-
│ Analyzing failures... │
|
|
2838
|
-
│ New issue: TypeScript type error after fix │
|
|
2839
|
-
│ Applying auto-fixes... │
|
|
2840
|
-
│ Fixes applied: 1 │
|
|
2841
|
-
└─────────────────────────────────────────────────────┘
|
|
2842
|
-
|
|
2843
|
-
┌─────────────────────────────────────────────────────┐
|
|
2844
|
-
│ ITERATION 3 │
|
|
2845
|
-
├─────────────────────────────────────────────────────┤
|
|
2846
|
-
│ Running tests... │
|
|
2847
|
-
│ Results: 38/38 passed (0 failed) │
|
|
2848
|
-
│ │
|
|
2849
|
-
│ ✓ ALL TESTS PASSING! │
|
|
2850
|
-
└─────────────────────────────────────────────────────┘
|
|
2851
|
-
|
|
2852
|
-
══════════════════════════════════════════════════════
|
|
2853
|
-
TEST LOOP COMPLETE
|
|
2854
|
-
══════════════════════════════════════════════════════
|
|
2855
|
-
|
|
2856
|
-
Summary:
|
|
2857
|
-
────────
|
|
2858
|
-
Iterations: 3
|
|
2859
|
-
Initial failures: 3
|
|
2860
|
-
Fixes applied: 4
|
|
2861
|
-
Final status: ALL PASSING ✓
|
|
2862
|
-
|
|
2863
|
-
Files modified:
|
|
2864
|
-
• src/services/AuthService.ts
|
|
2865
|
-
• src/screens/ResetPasswordScreen.tsx
|
|
2866
|
-
• src/screens/SignupScreen.styles.ts
|
|
2867
|
-
• src/types/auth.ts
|
|
2868
|
-
|
|
2869
|
-
Test report: ./.proagents/test-reports/test-loop-{timestamp}.md
|
|
2870
|
-
|
|
2871
|
-
Ready for commit? (y/n)
|
|
2872
|
-
```
|
|
2873
|
-
|
|
2874
|
-
For `pa:compare-figma`:
|
|
2875
|
-
1. Connect to Figma API or use exported frames
|
|
2876
|
-
2. Extract design specifications
|
|
2877
|
-
3. Compare with actual app:
|
|
2878
|
-
```
|
|
2879
|
-
Figma Design Comparison
|
|
2880
|
-
═══════════════════════
|
|
2881
|
-
|
|
2882
|
-
Design Source: [Figma Link or ./designs/figma-export/]
|
|
2883
|
-
|
|
2884
|
-
Extracting design tokens from Figma...
|
|
2885
|
-
✓ Colors extracted
|
|
2886
|
-
✓ Typography extracted
|
|
2887
|
-
✓ Spacing system extracted
|
|
2888
|
-
✓ Component specs extracted
|
|
2889
|
-
|
|
2890
|
-
Comparing: LoginScreen
|
|
2891
|
-
──────────────────────
|
|
2892
|
-
|
|
2893
|
-
Layout Comparison:
|
|
2894
|
-
┌────────────────────┬────────────────────┐
|
|
2895
|
-
│ Figma Design │ App Screenshot │
|
|
2896
|
-
│ ┌──────────┐ │ ┌──────────┐ │
|
|
2897
|
-
│ │ Logo │ │ │ Logo │ ✓ │
|
|
2898
|
-
│ ├──────────┤ │ ├──────────┤ │
|
|
2899
|
-
│ │ Email │ │ │ Email │ ✓ │
|
|
2900
|
-
│ │ Input │ │ │ Input │ │
|
|
2901
|
-
│ ├──────────┤ │ ├──────────┤ │
|
|
2902
|
-
│ │ Password │ │ │ Password │ ✓ │
|
|
2903
|
-
│ │ Input │ │ │ Input │ │
|
|
2904
|
-
│ ├──────────┤ │ ├──────────┤ │
|
|
2905
|
-
│ │ Login │ │ │ Login │ ✗ │
|
|
2906
|
-
│ │ Button │ │ │ Button │ │
|
|
2907
|
-
│ └──────────┘ │ └──────────┘ │
|
|
2908
|
-
└────────────────────┴────────────────────┘
|
|
2909
|
-
|
|
2910
|
-
Detailed Comparison:
|
|
2911
|
-
┌───────────────┬─────────────┬─────────────┬────────┐
|
|
2912
|
-
│ Element │ Figma │ App │ Status │
|
|
2913
|
-
├───────────────┼─────────────┼─────────────┼────────┤
|
|
2914
|
-
│ Logo Size │ 120x40 │ 120x40 │ ✓ │
|
|
2915
|
-
│ Input Height │ 48px │ 48px │ ✓ │
|
|
2916
|
-
│ Input Border │ 1px #E0E0E0 │ 1px #E0E0E0 │ ✓ │
|
|
2917
|
-
│ Button Color │ #007AFF │ #0056B3 │ ✗ │
|
|
2918
|
-
│ Button Radius │ 8px │ 4px │ ✗ │
|
|
2919
|
-
│ Button Height │ 52px │ 48px │ ✗ │
|
|
2920
|
-
│ Vertical Gap │ 16px │ 12px │ ✗ │
|
|
2921
|
-
└───────────────┴─────────────┴─────────────┴────────┘
|
|
2922
|
-
|
|
2923
|
-
Issues Found: 4
|
|
2924
|
-
|
|
2925
|
-
Auto-fix available? Yes
|
|
2926
|
-
Run `pa:test-auto-fix` to apply design corrections.
|
|
2927
|
-
```
|
|
2928
|
-
|
|
2929
|
-
For `pa:compare-image "path"`:
|
|
2930
|
-
1. Load reference image (sketch, screenshot, mockup)
|
|
2931
|
-
2. Use visual comparison:
|
|
2932
|
-
```
|
|
2933
|
-
Image Comparison
|
|
2934
|
-
════════════════
|
|
2935
|
-
|
|
2936
|
-
Reference: ./designs/sketch-login.png
|
|
2937
|
-
App Screen: LoginScreen
|
|
2938
|
-
|
|
2939
|
-
Analyzing reference image...
|
|
2940
|
-
✓ Detected UI elements
|
|
2941
|
-
✓ Extracted layout structure
|
|
2942
|
-
✓ Identified colors and typography
|
|
2943
|
-
|
|
2944
|
-
Taking app screenshot...
|
|
2945
|
-
✓ Screenshot captured
|
|
2946
|
-
|
|
2947
|
-
Visual Diff Analysis:
|
|
2948
|
-
─────────────────────
|
|
2949
|
-
|
|
2950
|
-
Overall Match: 87%
|
|
2951
|
-
|
|
2952
|
-
Differences Detected:
|
|
2953
|
-
|
|
2954
|
-
1. Header Section (Region: 0,0 to 375,100)
|
|
2955
|
-
• Logo position: slightly lower than reference
|
|
2956
|
-
• Background: matches ✓
|
|
2957
|
-
|
|
2958
|
-
2. Form Section (Region: 0,100 to 375,350)
|
|
2959
|
-
• Input fields: match ✓
|
|
2960
|
-
• Labels: font slightly smaller
|
|
2961
|
-
• Spacing: compressed by ~4px
|
|
2962
|
-
|
|
2963
|
-
3. Button Section (Region: 0,350 to 375,450)
|
|
2964
|
-
• Color: differs by 15% (darker in app)
|
|
2965
|
-
• Corner radius: sharper in app
|
|
2966
|
-
• Shadow: missing in app
|
|
2967
|
-
|
|
2968
|
-
Diff image saved: ./.proagents/test-reports/visual/login-diff-overlay.png
|
|
2969
|
-
|
|
2970
|
-
┌─────────────────────────────────────────────┐
|
|
2971
|
-
│ [Reference] │ [App] │ [Diff] │
|
|
2972
|
-
│ Expected design │ Actual app │ Δ │
|
|
2973
|
-
└─────────────────────────────────────────────┘
|
|
2974
|
-
|
|
2975
|
-
Suggested fixes generated.
|
|
2976
|
-
Run `pa:test-auto-fix` to apply.
|
|
2977
|
-
```
|
|
2978
|
-
|
|
2979
|
-
For `pa:screenshot`:
|
|
2980
|
-
1. Capture screenshots of all app screens:
|
|
2981
|
-
```
|
|
2982
|
-
Screenshot Capture
|
|
2983
|
-
══════════════════
|
|
2984
|
-
|
|
2985
|
-
Detecting available screens...
|
|
2986
|
-
|
|
2987
|
-
Found 12 screens in navigation:
|
|
2988
|
-
|
|
2989
|
-
Capturing screenshots...
|
|
2990
|
-
|
|
2991
|
-
✓ LoginScreen → ./.proagents/screenshots/LoginScreen.png
|
|
2992
|
-
✓ SignupScreen → ./.proagents/screenshots/SignupScreen.png
|
|
2993
|
-
✓ HomeScreen → ./.proagents/screenshots/HomeScreen.png
|
|
2994
|
-
✓ ProfileScreen → ./.proagents/screenshots/ProfileScreen.png
|
|
2995
|
-
✓ SettingsScreen → ./.proagents/screenshots/SettingsScreen.png
|
|
2996
|
-
✓ NotificationsScreen → ./.proagents/screenshots/NotificationsScreen.png
|
|
2997
|
-
... (6 more)
|
|
2998
|
-
|
|
2999
|
-
Component screenshots:
|
|
3000
|
-
✓ Button variants → ./.proagents/screenshots/components/Button.png
|
|
3001
|
-
✓ Input variants → ./.proagents/screenshots/components/Input.png
|
|
3002
|
-
✓ Card variants → ./.proagents/screenshots/components/Card.png
|
|
3003
|
-
|
|
3004
|
-
══════════════════════════════════════════
|
|
3005
|
-
Screenshots saved: 15 images
|
|
3006
|
-
Location: ./.proagents/screenshots/
|
|
3007
|
-
══════════════════════════════════════════
|
|
3008
|
-
|
|
3009
|
-
Use these for:
|
|
3010
|
-
• Visual regression testing
|
|
3011
|
-
• Design comparison with `pa:compare-image`
|
|
3012
|
-
• Documentation
|
|
3013
|
-
```
|
|
3014
|
-
|
|
3015
|
-
**Mobile Test Configuration:**
|
|
3016
|
-
Add to `proagents.config.yaml`:
|
|
3017
|
-
```yaml
|
|
3018
|
-
mobile_testing:
|
|
3019
|
-
platform: react-native # or flutter, native
|
|
3020
|
-
|
|
3021
|
-
test_frameworks:
|
|
3022
|
-
unit: jest
|
|
3023
|
-
component: "@testing-library/react-native"
|
|
3024
|
-
e2e: maestro # or detox, appium
|
|
3025
|
-
|
|
3026
|
-
visual_testing:
|
|
3027
|
-
enabled: true
|
|
3028
|
-
design_source: figma # or ./designs/
|
|
3029
|
-
figma_file_id: "your-figma-file-id" # if using Figma
|
|
3030
|
-
threshold: 0.95 # 95% match required
|
|
3031
|
-
|
|
3032
|
-
auto_fix:
|
|
3033
|
-
enabled: true
|
|
3034
|
-
max_iterations: 5
|
|
3035
|
-
require_approval: false # true = ask before applying fixes
|
|
3036
|
-
|
|
3037
|
-
screenshot:
|
|
3038
|
-
output_dir: ./.proagents/screenshots
|
|
3039
|
-
devices:
|
|
3040
|
-
- iPhone 14 Pro
|
|
3041
|
-
- Pixel 7
|
|
3042
|
-
|
|
3043
|
-
test_on:
|
|
3044
|
-
feature_complete: true # auto-run tests when feature done
|
|
3045
|
-
bug_fix: true # auto-run tests after bug fix
|
|
3046
|
-
pre_commit: false # run before git commit
|
|
3047
|
-
```
|
|
3048
|
-
|
|
3049
|
-
**Test Report Structure:**
|
|
3050
|
-
```
|
|
3051
|
-
./.proagents/test-reports/
|
|
3052
|
-
├── mobile-2024-03-06-1500.md # Full test report
|
|
3053
|
-
├── visual/
|
|
3054
|
-
│ ├── LoginScreen-diff.png # Visual diff images
|
|
3055
|
-
│ ├── SignupScreen-diff.png
|
|
3056
|
-
│ └── comparison-report.md
|
|
3057
|
-
├── coverage/
|
|
3058
|
-
│ └── coverage-report.html # Test coverage
|
|
3059
|
-
└── auto-fix-log.md # Log of all auto-fixes
|
|
3060
|
-
```
|
|
3061
|
-
|
|
3062
|
-
### Custom Testing Tools Configuration
|
|
3063
|
-
|
|
3064
|
-
Users can configure their own testing tools in `proagents.config.yaml`. **AI MUST check and use these custom tools** instead of defaults.
|
|
3065
|
-
|
|
3066
|
-
**Read custom tools from config:**
|
|
3067
|
-
```yaml
|
|
3068
|
-
# proagents.config.yaml → testing.tools section
|
|
3069
|
-
testing:
|
|
3070
|
-
tools:
|
|
3071
|
-
unit:
|
|
3072
|
-
command: "npm test" # Custom unit test command
|
|
3073
|
-
framework: "jest" # jest | vitest | mocha | pytest | junit | xctest
|
|
3074
|
-
integration:
|
|
3075
|
-
command: "npm run test:integration"
|
|
3076
|
-
framework: "jest"
|
|
3077
|
-
e2e:
|
|
3078
|
-
command: "npx playwright test"
|
|
3079
|
-
framework: "playwright" # playwright | cypress | maestro | detox
|
|
3080
|
-
visual:
|
|
3081
|
-
command: "npx percy exec -- npm test"
|
|
3082
|
-
framework: "percy" # percy | chromatic | applitools
|
|
3083
|
-
load:
|
|
3084
|
-
command: "k6 run loadtest.js"
|
|
3085
|
-
framework: "k6" # k6 | artillery | locust | jmeter
|
|
3086
|
-
security:
|
|
3087
|
-
command: "npm audit && snyk test"
|
|
3088
|
-
framework: "snyk" # snyk | npm-audit | owasp-zap
|
|
3089
|
-
|
|
3090
|
-
auto_install: true # Auto-install missing tools
|
|
3091
|
-
|
|
3092
|
-
custom_commands: # User shortcuts
|
|
3093
|
-
"test:quick": "npm test -- --onlyChanged"
|
|
3094
|
-
"test:ci": "npm test -- --coverage --ci"
|
|
3095
|
-
```
|
|
3096
|
-
|
|
3097
|
-
**How AI uses custom tools:**
|
|
3098
|
-
|
|
3099
|
-
For `pa:test`, `pa:test-mobile`, `pa:test-web`, `pa:test-api`:
|
|
3100
|
-
|
|
3101
|
-
1. **Read proagents.config.yaml first:**
|
|
3102
|
-
```
|
|
3103
|
-
Loading test configuration...
|
|
3104
|
-
|
|
3105
|
-
Custom tools configured:
|
|
3106
|
-
├── Unit: npm test (jest)
|
|
3107
|
-
├── Integration: npm run test:integration (jest)
|
|
3108
|
-
├── E2E: npx playwright test (playwright)
|
|
3109
|
-
├── Visual: npx percy exec -- npm test (percy)
|
|
3110
|
-
├── Load: k6 run loadtest.js (k6)
|
|
3111
|
-
└── Security: npm audit && snyk test (snyk)
|
|
3112
|
-
```
|
|
3113
|
-
|
|
3114
|
-
2. **Use custom command instead of default:**
|
|
3115
|
-
```
|
|
3116
|
-
Running Unit Tests
|
|
3117
|
-
══════════════════
|
|
3118
|
-
|
|
3119
|
-
Using custom command: npm test
|
|
3120
|
-
Framework: jest
|
|
3121
|
-
|
|
3122
|
-
> npm test
|
|
3123
|
-
|
|
3124
|
-
PASS src/__tests__/auth.test.ts
|
|
3125
|
-
PASS src/__tests__/user.test.ts
|
|
3126
|
-
...
|
|
3127
|
-
```
|
|
3128
|
-
|
|
3129
|
-
3. **Auto-install if tool missing and auto_install: true:**
|
|
3130
|
-
```
|
|
3131
|
-
Tool not found: k6
|
|
3132
|
-
Config: auto_install: true
|
|
3133
|
-
|
|
3134
|
-
Installing k6...
|
|
3135
|
-
✓ k6 installed successfully
|
|
3136
|
-
|
|
3137
|
-
Running load tests...
|
|
3138
|
-
```
|
|
3139
|
-
|
|
3140
|
-
4. **Support custom_commands shortcuts:**
|
|
3141
|
-
```
|
|
3142
|
-
User runs: pa:test quick
|
|
3143
|
-
|
|
3144
|
-
Checking custom_commands...
|
|
3145
|
-
Found: "test:quick" → "npm test -- --onlyChanged"
|
|
3146
|
-
|
|
3147
|
-
Running: npm test -- --onlyChanged
|
|
3148
|
-
```
|
|
3149
|
-
|
|
3150
|
-
**Mobile Testing Tools (platform-specific):**
|
|
3151
|
-
|
|
3152
|
-
For `pa:test-mobile`, read the `testing.mobile` section:
|
|
3153
|
-
|
|
3154
|
-
```yaml
|
|
3155
|
-
# proagents.config.yaml → testing.mobile section
|
|
3156
|
-
testing:
|
|
3157
|
-
mobile:
|
|
3158
|
-
# React Native / Expo
|
|
3159
|
-
react_native:
|
|
3160
|
-
unit:
|
|
3161
|
-
command: "npm test"
|
|
3162
|
-
framework: "jest"
|
|
3163
|
-
component:
|
|
3164
|
-
command: "npm test -- --testPathPattern=components"
|
|
3165
|
-
framework: "@testing-library/react-native"
|
|
3166
|
-
e2e:
|
|
3167
|
-
command: "maestro test .maestro/"
|
|
3168
|
-
framework: "maestro" # maestro | detox | appium
|
|
3169
|
-
|
|
3170
|
-
# Native Android (Kotlin/Java)
|
|
3171
|
-
android:
|
|
3172
|
-
unit:
|
|
3173
|
-
command: "./gradlew test"
|
|
3174
|
-
framework: "junit"
|
|
3175
|
-
integration:
|
|
3176
|
-
command: "./gradlew connectedAndroidTest"
|
|
3177
|
-
framework: "espresso"
|
|
3178
|
-
e2e:
|
|
3179
|
-
command: "maestro test .maestro/"
|
|
3180
|
-
framework: "maestro"
|
|
3181
|
-
|
|
3182
|
-
# Native iOS (Swift/Objective-C)
|
|
3183
|
-
ios:
|
|
3184
|
-
unit:
|
|
3185
|
-
command: "xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 15'"
|
|
3186
|
-
framework: "xctest"
|
|
3187
|
-
e2e:
|
|
3188
|
-
command: "maestro test .maestro/"
|
|
3189
|
-
framework: "maestro"
|
|
3190
|
-
|
|
3191
|
-
# Flutter
|
|
3192
|
-
flutter:
|
|
3193
|
-
unit:
|
|
3194
|
-
command: "flutter test"
|
|
3195
|
-
framework: "flutter_test"
|
|
3196
|
-
integration:
|
|
3197
|
-
command: "flutter test integration_test/"
|
|
3198
|
-
framework: "integration_test"
|
|
3199
|
-
e2e:
|
|
3200
|
-
command: "maestro test .maestro/"
|
|
3201
|
-
framework: "maestro"
|
|
3202
|
-
```
|
|
3203
|
-
|
|
3204
|
-
**How AI uses mobile tools:**
|
|
3205
|
-
|
|
3206
|
-
1. **Detect platform first:**
|
|
3207
|
-
```
|
|
3208
|
-
Detecting mobile project type...
|
|
3209
|
-
|
|
3210
|
-
Checking for:
|
|
3211
|
-
├── package.json + react-native → React Native
|
|
3212
|
-
├── android/build.gradle (no RN) → Native Android
|
|
3213
|
-
├── ios/*.xcodeproj (no RN) → Native iOS
|
|
3214
|
-
├── pubspec.yaml → Flutter
|
|
3215
|
-
|
|
3216
|
-
Detected: React Native
|
|
3217
|
-
```
|
|
3218
|
-
|
|
3219
|
-
2. **Read platform-specific config:**
|
|
3220
|
-
```
|
|
3221
|
-
Loading config: testing.mobile.react_native
|
|
3222
|
-
|
|
3223
|
-
Tools:
|
|
3224
|
-
├── Unit: npm test (jest)
|
|
3225
|
-
├── Component: npm test -- --testPathPattern=components
|
|
3226
|
-
└── E2E: maestro test .maestro/ (maestro)
|
|
3227
|
-
```
|
|
3228
|
-
|
|
3229
|
-
3. **Run with configured commands:**
|
|
3230
|
-
```
|
|
3231
|
-
Running React Native Test Suite
|
|
3232
|
-
═══════════════════════════════
|
|
3233
|
-
|
|
3234
|
-
Phase 1: Unit Tests
|
|
3235
|
-
> npm test
|
|
3236
|
-
✓ 45 tests passed
|
|
3237
|
-
|
|
3238
|
-
Phase 2: Component Tests
|
|
3239
|
-
> npm test -- --testPathPattern=components
|
|
3240
|
-
✓ 23 tests passed
|
|
3241
|
-
|
|
3242
|
-
Phase 3: E2E Tests
|
|
3243
|
-
> maestro test .maestro/
|
|
3244
|
-
✓ 12 flows passed
|
|
3245
|
-
```
|
|
3246
|
-
|
|
3247
|
-
**Default fallbacks (if no custom config):**
|
|
3248
|
-
|
|
3249
|
-
| Test Type | Detect From | Default Command |
|
|
3250
|
-
|-----------|-------------|-----------------|
|
|
3251
|
-
| Unit | package.json scripts | `npm test` or `npx jest` |
|
|
3252
|
-
| Integration | test files | `npm run test:integration` |
|
|
3253
|
-
| E2E | playwright.config / cypress.json | `npx playwright test` or `npx cypress run` |
|
|
3254
|
-
| Visual | percy.yml / chromatic | `npx percy exec` |
|
|
3255
|
-
| Load | k6 / artillery config | `k6 run` or `artillery run` |
|
|
3256
|
-
| Security | package.json | `npm audit` |
|
|
3257
|
-
|
|
3258
|
-
**Mobile fallbacks (if no custom config):**
|
|
3259
|
-
|
|
3260
|
-
| Platform | Unit | E2E |
|
|
3261
|
-
|----------|------|-----|
|
|
3262
|
-
| React Native | `npm test` (jest) | `maestro test` or `detox test` |
|
|
3263
|
-
| Android | `./gradlew test` | `./gradlew connectedAndroidTest` |
|
|
3264
|
-
| iOS | `xcodebuild test` | `maestro test` |
|
|
3265
|
-
| Flutter | `flutter test` | `flutter test integration_test/` |
|
|
3266
|
-
|
|
3267
|
-
**IMPORTANT:** Always check `proagents.config.yaml` FIRST before using defaults.
|
|
3268
|
-
|
|
3269
|
-
### AI Platform Management
|
|
3270
|
-
| Command | Action |
|
|
3271
|
-
|---------|--------|
|
|
3272
|
-
| `pa:ai-list` | List installed AI platforms |
|
|
3273
|
-
| `pa:ai-add` | Add more AI platforms |
|
|
3274
|
-
| `pa:ai-remove` | Remove AI platforms from config |
|
|
3275
|
-
| `pa:ai-sync` | Sync config with existing files |
|
|
3276
|
-
|
|
3277
|
-
**How to execute AI Platform commands:**
|
|
3278
|
-
|
|
3279
|
-
For `pa:ai-list`:
|
|
3280
|
-
- Read `./.proagents/proagents.config.yaml` and show the `platforms` array
|
|
3281
|
-
- Show which AI instruction files exist in project root
|
|
3282
|
-
|
|
3283
|
-
For `pa:ai-add`:
|
|
3284
|
-
1. Show ALL platforms to user (always show complete list):
|
|
3285
|
-
|
|
3286
|
-
**IDE-based AI Assistants:**
|
|
3287
|
-
| Platform | File Created | Description |
|
|
3288
|
-
|----------|--------------|-------------|
|
|
3289
|
-
| Claude Code | CLAUDE.md | Anthropic Claude in terminal/IDE |
|
|
3290
|
-
| Cursor | .cursorrules | Cursor AI IDE |
|
|
3291
|
-
| Windsurf | .windsurfrules | Codeium Windsurf IDE |
|
|
3292
|
-
| GitHub Copilot | .github/copilot-instructions.md | GitHub Copilot |
|
|
3293
|
-
| AWS Kiro | KIRO.md | AWS Kiro IDE |
|
|
3294
|
-
| Antigravity | ANTIGRAVITY.md | Antigravity IDE (Gemini/Claude) |
|
|
3295
|
-
|
|
3296
|
-
**Web-based AI Platforms:**
|
|
3297
|
-
| Platform | File Created | Description |
|
|
3298
|
-
|----------|--------------|-------------|
|
|
3299
|
-
| ChatGPT | CHATGPT.md | OpenAI ChatGPT |
|
|
3300
|
-
| Gemini | GEMINI.md | Google Gemini |
|
|
3301
|
-
| Replit AI | REPLIT.md | Replit Ghostwriter |
|
|
3302
|
-
| Bolt.new | BOLT.md | StackBlitz Bolt |
|
|
3303
|
-
| Lovable | LOVABLE.md | Lovable (GPT Engineer) |
|
|
3304
|
-
| Groq | GROQ.md | Groq fast inference |
|
|
3305
|
-
|
|
3306
|
-
2. Ask user which platforms to add (show all 12 options)
|
|
3307
|
-
3. For each selected platform:
|
|
3308
|
-
- Copy content from `./.proagents/{PLATFORM}.md` (e.g., `./.proagents/CLAUDE.md`)
|
|
3309
|
-
- If target file exists, wrap new content with markers and append:
|
|
3310
|
-
```
|
|
3311
|
-
<!-- PROAGENTS:START -->
|
|
3312
|
-
{content from proagents folder}
|
|
3313
|
-
<!-- PROAGENTS:END -->
|
|
3314
|
-
```
|
|
3315
|
-
- If target file doesn't exist, create it with the content wrapped in markers
|
|
3316
|
-
4. Update `./.proagents/proagents.config.yaml` to add platform to `platforms` array
|
|
3317
|
-
|
|
3318
|
-
For `pa:ai-remove`:
|
|
3319
|
-
1. Read `./.proagents/proagents.config.yaml` to get current platforms
|
|
3320
|
-
2. Show list and ask which to remove
|
|
3321
|
-
3. For each selected:
|
|
3322
|
-
- Remove the PROAGENTS section (between markers) from the file, OR delete the file if it only contains ProAgents content
|
|
3323
|
-
- Update config to remove from `platforms` array
|
|
3324
|
-
|
|
3325
|
-
For `pa:ai-sync`:
|
|
3326
|
-
1. Scan project root for AI instruction files
|
|
3327
|
-
2. Read current config from `./.proagents/proagents.config.yaml`
|
|
3328
|
-
3. Compare and show differences:
|
|
3329
|
-
- Files that exist but not in config
|
|
3330
|
-
- Config entries that don't have matching files
|
|
3331
|
-
4. Ask user: "Add missing files to config?" or "Remove orphan config entries?"
|
|
3332
|
-
5. Update config to match actual files
|
|
3333
|
-
|
|
3334
|
-
**Platform ID to File Mapping:**
|
|
3335
|
-
| Platform ID | File |
|
|
3336
|
-
|-------------|------|
|
|
3337
|
-
| claude | CLAUDE.md |
|
|
3338
|
-
| cursor | .cursorrules |
|
|
3339
|
-
| windsurf | .windsurfrules |
|
|
3340
|
-
| copilot | .github/copilot-instructions.md |
|
|
3341
|
-
| chatgpt | CHATGPT.md |
|
|
3342
|
-
| gemini | GEMINI.md |
|
|
3343
|
-
| bolt | BOLT.md |
|
|
3344
|
-
| lovable | LOVABLE.md |
|
|
3345
|
-
| replit | REPLIT.md |
|
|
3346
|
-
| kiro | KIRO.md |
|
|
3347
|
-
| groq | GROQ.md |
|
|
3348
|
-
| antigravity | ANTIGRAVITY.md |
|
|
3349
|
-
|
|
3350
|
-
### Configuration
|
|
3351
|
-
| Command | Action |
|
|
3352
|
-
|---------|--------|
|
|
3353
|
-
| `pa:config` | Show current configuration |
|
|
3354
|
-
| `pa:config-list` | List all configurable options |
|
|
3355
|
-
| `pa:config-show` | Show current config values |
|
|
3356
|
-
| `pa:config-set K V` | Set a config value |
|
|
3357
|
-
| `pa:config-get K` | Get a config value |
|
|
3358
|
-
| `pa:config-setup` | Interactive config wizard |
|
|
3359
|
-
| `pa:config-customize` | Copy templates to customize |
|
|
3360
|
-
|
|
3361
|
-
### Custom Commands
|
|
3362
|
-
|
|
3363
|
-
Check `./.proagents/custom-commands.yaml` for project-specific commands.
|
|
3364
|
-
|
|
3365
|
-
Built-in custom commands:
|
|
3366
|
-
| Command | Action |
|
|
3367
|
-
|---------|--------|
|
|
3368
|
-
| `pa:standup` | Generate daily standup summary |
|
|
3369
|
-
| `pa:sprint-review` | Generate sprint review |
|
|
3370
|
-
| `pa:tech-debt` | Scan and document technical debt |
|
|
3371
|
-
| `pa:security-scan` | Run security checklist |
|
|
3372
|
-
|
|
3373
|
-
Users can add their own commands in `custom-commands.yaml`.
|
|
3374
|
-
|
|
3375
|
-
### Utilities
|
|
3376
|
-
| Command | Action |
|
|
3377
|
-
|---------|--------|
|
|
3378
|
-
| `pa:uninstall` | Remove ProAgents from project |
|
|
3379
|
-
|
|
3380
|
-
### Collaboration (Multi-AI)
|
|
3381
|
-
| Command | Action |
|
|
3382
|
-
|---------|--------|
|
|
3383
|
-
| `pa:activity` | Show recent AI activity log |
|
|
3384
|
-
| `pa:lock` | Show current lock status |
|
|
3385
|
-
| `pa:lock-release` | Release lock (if you hold it) |
|
|
3386
|
-
| `pa:lock-override` | Force release lock (requires user confirmation) |
|
|
3387
|
-
| `pa:handoff` | Create handoff notes for other AIs |
|
|
3388
|
-
| `pa:handoff-read` | Read latest handoff notes |
|
|
3389
|
-
| `pa:session-end` | Generate session summary before ending |
|
|
3390
|
-
| `pa:session-history` | Show recent session summaries |
|
|
3391
|
-
| `pa:decision "title"` | Log an architectural/technical decision |
|
|
3392
|
-
| `pa:decisions` | Show all logged decisions |
|
|
3393
|
-
| `pa:error "description"` | Log an error and its solution |
|
|
3394
|
-
| `pa:errors` | Show logged errors (search for solutions) |
|
|
3395
|
-
| `pa:feedback "description"` | Log feedback/correction for AI learning |
|
|
3396
|
-
| `pa:feedback-list` | Show all feedback (learn from past corrections) |
|
|
3397
|
-
|
|
3398
|
-
## How to Execute Commands
|
|
3399
|
-
|
|
3400
|
-
When user types a `pa:` command:
|
|
3401
|
-
|
|
3402
|
-
1. **Read the corresponding prompt file** from `./.proagents/prompts/`
|
|
3403
|
-
2. **Follow the workflow** defined in that prompt
|
|
3404
|
-
3. **Use project context** from `./.proagents/` folder
|
|
3405
|
-
|
|
3406
|
-
### Prompt File Mapping
|
|
3407
|
-
- `pa:feature` → `./.proagents/prompts/00-init.md` + workflow
|
|
3408
|
-
- `pa:fix` → `./.proagents/workflow-modes/entry-modes.md` (Bug Fix section)
|
|
3409
|
-
- `pa:doc*` → `./.proagents/prompts/07-documentation.md`
|
|
3410
|
-
- `pa:qa` → `./.proagents/checklists/code-quality.md`
|
|
3411
|
-
- `pa:test` → `./.proagents/prompts/06-testing.md`
|
|
3412
|
-
- `pa:deploy` → `./.proagents/prompts/08-deployment.md`
|
|
3413
|
-
- `pa:release` → `./.proagents/prompts/07-documentation.md` (Release Notes section)
|
|
330
|
+
## Key Files
|
|
3414
331
|
|
|
3415
|
-
|
|
332
|
+
| File | Purpose |
|
|
333
|
+
|------|---------|
|
|
334
|
+
| `context.md` | Persistent project context |
|
|
335
|
+
| `activity.log` | Recent AI activity |
|
|
336
|
+
| `feedback.md` | Past corrections (learn from these!) |
|
|
337
|
+
| `watchlist.yaml` | Files requiring confirmation |
|
|
338
|
+
| `proagents.config.yaml` | Project config |
|
|
339
|
+
| `active-features/_index.json` | Feature status |
|
|
3416
340
|
|
|
3417
|
-
|
|
3418
|
-
Quick command reference: `./.proagents/PROAGENTS.md`
|
|
341
|
+
---
|
|
3419
342
|
|
|
3420
343
|
## Important
|
|
3421
344
|
|
|
3422
345
|
- Always check `./.proagents/` folder for project-specific configurations
|
|
3423
346
|
- Preserve user's `proagents.config.yaml` settings
|
|
3424
347
|
- Follow existing code patterns found in the project
|
|
348
|
+
- Log all activity for other AIs to see
|
|
349
|
+
- Learn from feedback.md - don't repeat past mistakes
|