proagents 1.6.10 → 1.6.11

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.
@@ -0,0 +1,510 @@
1
+ # Session Tracking & Cross-AI Continuity
2
+
3
+ Commands for maintaining context across AI platforms.
4
+
5
+ ---
6
+
7
+ ## CRITICAL: Auto-Log Every Code Change
8
+
9
+ **AI MUST automatically log EVERY code change IMMEDIATELY after making it.**
10
+
11
+ This is NOT optional. Do NOT wait for user to ask.
12
+
13
+ ### After EVERY file edit/create/delete, AI does:
14
+
15
+ ```
16
+ 1. Prepend to .proagents/changelog/_recent.md
17
+ 2. Update .proagents/worklog/_context.md
18
+ 3. Update .proagents/changelog/modules/[module].md
19
+ 4. Update .proagents/changelog/features/[feature].md (if on feature)
20
+ ```
21
+
22
+ ### Auto-Detect Module from File Path:
23
+
24
+ | File Path | Module |
25
+ |-----------|--------|
26
+ | `src/api/*`, `routes/*` | api |
27
+ | `src/auth/*` | auth |
28
+ | `src/components/*` | ui |
29
+ | `src/services/*` | services |
30
+ | `src/utils/*`, `lib/*` | utils |
31
+ | `tests/*` | tests |
32
+ | `src/database/*` | database |
33
+
34
+ ### Example Flow:
35
+
36
+ ```
37
+ User: Fix the login bug
38
+
39
+ AI: [Reads src/auth/login.ts]
40
+ AI: [Edits file - fixes bug]
41
+ AI: [IMMEDIATELY updates changelogs:]
42
+ - Prepends to changelog/_recent.md
43
+ - Updates changelog/modules/auth.md
44
+ - Updates worklog/_context.md
45
+ AI: "Fixed the login bug in src/auth/login.ts"
46
+ ```
47
+
48
+ ### _recent.md Entry Format:
49
+
50
+ ```markdown
51
+ ### YYYY-MM-DD - [Change Type]
52
+ **Module:** [auto-detected]
53
+ **AI:** [Platform] ([model])
54
+ **Files:** path/file.ts (+lines, -lines)
55
+ **Summary:** Brief description
56
+
57
+ ---
58
+ ```
59
+
60
+ ### Module Changelog Entry Format:
61
+
62
+ ```markdown
63
+ ### YYYY-MM-DD - [AI Platform]
64
+ **Context:** [Feature name or "Bug fix" or "Enhancement"]
65
+ **Files:** path/file.ts (+lines, -lines)
66
+ **Changes:** What was changed
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Commands
72
+
73
+ | Command | Action |
74
+ |---------|--------|
75
+ | `pa:sync` | Load context (run FIRST) |
76
+ | `pa:session-start` | Begin work session |
77
+ | `pa:session-end` | End session, finalize logs |
78
+ | `pa:handoff` | Create detailed handoff |
79
+
80
+ ---
81
+
82
+ ## pa:sync - Load Project Context
83
+
84
+ **Run this FIRST when starting work on any AI platform.**
85
+
86
+ ### AI Workflow:
87
+
88
+ ```bash
89
+ # 1. Read context summary
90
+ cat .proagents/worklog/_context.md
91
+
92
+ # 2. Read recent changes
93
+ cat .proagents/changelog/_recent.md
94
+
95
+ # 3. Read latest session logs (last 2)
96
+ ls -t .proagents/worklog/*.md | head -3 | xargs cat
97
+
98
+ # 4. Check active features
99
+ cat .proagents/active-features/_index.json
100
+
101
+ # 5. Read activity log
102
+ tail -20 .proagents/activity.log
103
+ ```
104
+
105
+ ### AI Response Format:
106
+
107
+ ```
108
+ ## Project Context Loaded
109
+
110
+ ### Active Work
111
+ - Feature: user-auth (70% complete)
112
+ - Last worked: 2024-03-11 by Claude
113
+
114
+ ### Recent Changes
115
+ 1. Added JWT validation (Claude, Mar 11)
116
+ 2. Fixed login bug (Gemini, Mar 10)
117
+
118
+ ### Pending Tasks
119
+ - [ ] Complete email verification
120
+ - [ ] Add unit tests
121
+
122
+ ### Ready to Continue
123
+ What would you like me to work on?
124
+ ```
125
+
126
+ ---
127
+
128
+ ## pa:session-start - Begin Work Session
129
+
130
+ Creates a new session log file.
131
+
132
+ ### AI Workflow:
133
+
134
+ ```bash
135
+ # Generate session filename
136
+ DATE=$(date '+%Y-%m-%d')
137
+ AI_NAME="claude" # or gemini, chatgpt, etc.
138
+ SESSION_NUM="001" # increment if exists
139
+
140
+ # Create session file
141
+ FILENAME=".proagents/worklog/${DATE}-${AI_NAME}-${SESSION_NUM}.md"
142
+ ```
143
+
144
+ ### Session File Template:
145
+
146
+ ```markdown
147
+ # Work Session: [DATE]-[AI]-[SESSION]
148
+
149
+ **AI Platform:** [Platform] ([Model])
150
+ **Started:** [Timestamp]
151
+ **Duration:** [In progress]
152
+
153
+ ---
154
+
155
+ ## Summary
156
+
157
+ [To be filled at session end]
158
+
159
+ ---
160
+
161
+ ## Tasks Completed
162
+
163
+ [Log each task as completed]
164
+
165
+ ---
166
+
167
+ ## Decisions Made
168
+
169
+ | Decision | Reason |
170
+ |----------|--------|
171
+
172
+ ---
173
+
174
+ ## Files Changed
175
+
176
+ | File | Action | Lines |
177
+ |------|--------|-------|
178
+
179
+ ---
180
+
181
+ ## Next Steps (For Next AI)
182
+
183
+ [To be filled at session end]
184
+ ```
185
+
186
+ ---
187
+
188
+ ## pa:session-end - Finalize Session
189
+
190
+ Updates all tracking files.
191
+
192
+ ### AI Workflow:
193
+
194
+ 1. **Update session log** with summary and next steps
195
+ 2. **Update `_context.md`** with current state
196
+ 3. **Update `_recent.md`** with changes
197
+ 4. **Update feature changelog** if working on feature
198
+ 5. **Update module changelog** for each module touched
199
+ 6. **Log to activity.log**
200
+
201
+ ### Context Update Template:
202
+
203
+ ```markdown
204
+ # Current Project Context
205
+
206
+ Last Updated: [NOW]
207
+ Last AI: [Platform] ([Model])
208
+
209
+ ---
210
+
211
+ ## Active Work
212
+
213
+ - **Feature:** [name] ([phase], [%] complete)
214
+ - Last: [what was done]
215
+ - Next: [what needs doing]
216
+
217
+ ---
218
+
219
+ ## Recent Changes
220
+
221
+ ### [TODAY]
222
+ - [Change 1] - [AI]
223
+ - [Change 2] - [AI]
224
+
225
+ ### [YESTERDAY]
226
+ - [Change 3] - [AI]
227
+
228
+ ---
229
+
230
+ ## Pending Items
231
+
232
+ 1. [ ] [Item from last session's "Next Steps"]
233
+ 2. [ ] [Item 2]
234
+ ```
235
+
236
+ ---
237
+
238
+ ## pa:handoff - Detailed Handoff Notes
239
+
240
+ For major context switches or end of feature.
241
+
242
+ ### Creates: `.proagents/handoff.md`
243
+
244
+ ```markdown
245
+ # Project Handoff
246
+
247
+ Date: [NOW]
248
+ From: [Current AI Platform]
249
+ To: Any AI
250
+
251
+ ---
252
+
253
+ ## Current State
254
+
255
+ ### Completed
256
+ - [List all completed work]
257
+
258
+ ### In Progress
259
+ - [Current work with exact state]
260
+
261
+ ### Not Started
262
+ - [Planned but not begun]
263
+
264
+ ---
265
+
266
+ ## Key Decisions Made
267
+
268
+ | Decision | Reason | Date |
269
+ |----------|--------|------|
270
+ | [Decision] | [Why] | [When] |
271
+
272
+ ---
273
+
274
+ ## Known Issues
275
+
276
+ 1. [Issue description]
277
+ - Status: [open/investigating]
278
+ - Notes: [Any context]
279
+
280
+ ---
281
+
282
+ ## Architecture Notes
283
+
284
+ [Any important architecture decisions or patterns]
285
+
286
+ ---
287
+
288
+ ## File Map
289
+
290
+ Key files and their purposes:
291
+ - `src/auth/` - Authentication logic
292
+ - `src/api/` - API endpoints
293
+
294
+ ---
295
+
296
+ ## How to Continue
297
+
298
+ 1. Run `pa:sync` to load context
299
+ 2. Check `worklog/_context.md` for current state
300
+ 3. Review recent session logs
301
+ 4. Continue from "In Progress" items
302
+
303
+ ---
304
+
305
+ ## Commands History
306
+
307
+ Last 10 commands:
308
+ [From activity.log]
309
+ ```
310
+
311
+ ---
312
+
313
+ ## pa:resume - Quick Resume
314
+
315
+ Fast context loading for returning AI:
316
+
317
+ ```bash
318
+ # AI executes:
319
+ cat .proagents/worklog/_context.md
320
+ cat .proagents/changelog/_recent.md
321
+ ls -t .proagents/worklog/*.md 2>/dev/null | head -2 | tail -1 | xargs cat
322
+ tail -10 .proagents/activity.log
323
+ ```
324
+
325
+ Output:
326
+ ```
327
+ Resume Context
328
+ ══════════════
329
+ Last Session: 2024-03-11 by Claude
330
+ Duration: 45 min
331
+
332
+ What Was Done:
333
+ - Added JWT validation
334
+ - Fixed login bug
335
+
336
+ Pending Tasks:
337
+ 1. [ ] Complete email verification
338
+
339
+ Suggested Next Action:
340
+ → Continue with email verification
341
+ ```
342
+
343
+ ---
344
+
345
+ ## pa:conflict-check - Check File Conflicts
346
+
347
+ Before editing files, check if another AI modified them:
348
+
349
+ ```bash
350
+ grep "Files:.*login.ts" .proagents/changelog/_recent.md
351
+ ```
352
+
353
+ If conflict:
354
+ ```
355
+ ⚠️ CONFLICT WARNING
356
+ File: src/auth/login.ts
357
+ Last modified: 2 hours ago by Gemini
358
+
359
+ Review changes first? [Y/n]
360
+ ```
361
+
362
+ ---
363
+
364
+ ## pa:changelog --from-git
365
+
366
+ Auto-populate changelog from git commits:
367
+
368
+ ```bash
369
+ git log --oneline --since="24 hours ago"
370
+ ```
371
+
372
+ AI parses each commit, detects module from files, extracts issue numbers, and prepends to `_recent.md`.
373
+
374
+ ---
375
+
376
+ ## Issue Linking
377
+
378
+ Auto-detect issue numbers from:
379
+ - User message: "fix #123"
380
+ - Branch: `fix/123-bug`
381
+ - Commit: `Fixes #123`
382
+
383
+ Include in changelog:
384
+ ```markdown
385
+ ### 2024-03-11 - Bug Fix
386
+ **Issue:** #123
387
+ **Closes:** #123
388
+ ```
389
+
390
+ ---
391
+
392
+ ## File-Level Lock
393
+
394
+ Track files being edited:
395
+
396
+ ```bash
397
+ # On edit:
398
+ echo "file.ts|Claude|$(date)" >> .proagents/.active-files
399
+
400
+ # On session end:
401
+ grep -v "|Claude|" .proagents/.active-files > /tmp/af && mv /tmp/af .proagents/.active-files
402
+ ```
403
+
404
+ ---
405
+
406
+ ## Validation Reminder
407
+
408
+ On pa:sync, check if previous session logged properly:
409
+
410
+ ```bash
411
+ # If git shows more changes than changelog:
412
+ echo "⚠️ Previous session may have unlogged changes"
413
+ ```
414
+
415
+ ---
416
+
417
+ ## Automatic Tracking Rules
418
+
419
+ ### After pa:feature "name":
420
+ ```bash
421
+ # Create feature changelog
422
+ touch .proagents/changelog/features/[name].md
423
+
424
+ # Create feature tracking
425
+ mkdir -p .proagents/active-features/feature-[name]
426
+
427
+ # Update _index.json
428
+ # Update _context.md
429
+ ```
430
+
431
+ ### After pa:fix "issue":
432
+ ```bash
433
+ # Log to _recent.md
434
+ # Update relevant module changelog
435
+ # Update _context.md
436
+ ```
437
+
438
+ ### After ANY code change:
439
+ ```bash
440
+ # 1. Identify module from file path
441
+ # 2. Update module changelog
442
+ # 3. Update session log
443
+ # 4. Update _context.md (if significant)
444
+ ```
445
+
446
+ ---
447
+
448
+ ## Module Auto-Detection
449
+
450
+ | File Path Pattern | Module |
451
+ |------------------|--------|
452
+ | `src/api/*`, `routes/*` | api |
453
+ | `src/auth/*`, `**/auth/**` | auth |
454
+ | `src/components/*`, `**/ui/**` | ui |
455
+ | `src/services/*` | services |
456
+ | `src/utils/*`, `lib/*` | utils |
457
+ | `src/database/*`, `**/models/**` | database |
458
+ | `tests/*`, `**/*.test.*` | tests |
459
+
460
+ ---
461
+
462
+ ## Example Session Flow
463
+
464
+ ```
465
+ User: pa:sync
466
+
467
+ AI: [Reads context files]
468
+ Project Context Loaded!
469
+ - Active: user-auth feature (70%)
470
+ - Last: JWT validation added
471
+ - Next: Email verification
472
+
473
+ User: Continue with email verification
474
+
475
+ AI: [Works on task]
476
+ [Creates/updates code]
477
+ [Updates session log]
478
+ [Updates feature changelog]
479
+
480
+ User: pa:session-end
481
+
482
+ AI: [Finalizes session]
483
+ Session Complete!
484
+ - Duration: 45 min
485
+ - Tasks: 2 completed
486
+ - Files: 4 modified
487
+ - Next AI can continue from: [next steps]
488
+
489
+ Updated:
490
+ ✓ worklog/_context.md
491
+ ✓ worklog/2024-03-11-claude-001.md
492
+ ✓ changelog/features/user-auth.md
493
+ ✓ changelog/_recent.md
494
+ ✓ activity.log
495
+ ```
496
+
497
+ ---
498
+
499
+ ## File Locations
500
+
501
+ | File | Purpose |
502
+ |------|---------|
503
+ | `worklog/_context.md` | Quick context for any AI |
504
+ | `worklog/[session].md` | Detailed session logs |
505
+ | `changelog/_recent.md` | Last 10 changes |
506
+ | `changelog/features/*.md` | Per-feature history |
507
+ | `changelog/modules/*.md` | Per-module history |
508
+ | `active-features/_index.json` | Feature status |
509
+ | `activity.log` | Command history |
510
+ | `handoff.md` | Major handoff notes |
@@ -0,0 +1,114 @@
1
+ # Work Session Logs
2
+
3
+ Cross-AI continuity through session-based tracking.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ When multiple AI platforms work on the same project, they need shared context. This directory maintains:
10
+
11
+ 1. **`_context.md`** - Quick summary for any AI starting fresh
12
+ 2. **Session logs** - Detailed record of each work session
13
+ 3. **Continuity** - Next AI knows exactly where to continue
14
+
15
+ ---
16
+
17
+ ## Session Log Format
18
+
19
+ Each session creates: `YYYY-MM-DD-[ai]-[session].md`
20
+
21
+ Example: `2024-03-11-claude-001.md`
22
+
23
+ ```markdown
24
+ # Work Session: 2024-03-11-claude-001
25
+
26
+ **AI Platform:** Claude (opus-4)
27
+ **Started:** 2024-03-11 10:30
28
+ **Duration:** 45 minutes
29
+
30
+ ---
31
+
32
+ ## Summary
33
+
34
+ Brief description of what was accomplished.
35
+
36
+ ---
37
+
38
+ ## Tasks Completed
39
+
40
+ ### 1. [Task Name]
41
+ - **Status:** Completed
42
+ - **Files Modified:**
43
+ - `src/auth/login.ts` - Added validation
44
+ - `src/components/LoginForm.tsx` - UI update
45
+ - **Changes:** Description of changes
46
+ - **Tests:** Added 3 unit tests
47
+
48
+ ### 2. [Task Name]
49
+ ...
50
+
51
+ ---
52
+
53
+ ## Decisions Made
54
+
55
+ | Decision | Reason | Alternatives Considered |
56
+ |----------|--------|------------------------|
57
+ | Used JWT | Industry standard | Session cookies |
58
+ | zxcvbn lib | Lightweight, accurate | custom regex |
59
+
60
+ ---
61
+
62
+ ## Issues Encountered
63
+
64
+ - Issue: API rate limiting
65
+ - Resolution: Added retry logic with backoff
66
+
67
+ ---
68
+
69
+ ## Next Steps (For Next AI)
70
+
71
+ 1. [ ] Connect password meter to signup form
72
+ 2. [ ] Add unit tests for validation
73
+ 3. [ ] Update API documentation
74
+
75
+ ---
76
+
77
+ ## Files Changed Summary
78
+
79
+ | File | Action | Lines |
80
+ |------|--------|-------|
81
+ | src/auth/login.ts | Modified | +25, -5 |
82
+ | src/components/LoginForm.tsx | Modified | +40, -10 |
83
+ | tests/auth.test.ts | Created | +80 |
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Auto-Update Rules
89
+
90
+ After EVERY pa: command that modifies code, AI must:
91
+
92
+ 1. **Update `_context.md`** with current state
93
+ 2. **Create/update session log** for the day
94
+ 3. **Log to `activity.log`** (command only)
95
+
96
+ ---
97
+
98
+ ## Commands
99
+
100
+ | Command | Action |
101
+ |---------|--------|
102
+ | `pa:sync` | Load context, read recent worklogs |
103
+ | `pa:session-start` | Begin new work session |
104
+ | `pa:session-end` | Finalize session, update context |
105
+ | `pa:handoff` | Create detailed handoff notes |
106
+
107
+ ---
108
+
109
+ ## Best Practices
110
+
111
+ 1. **Always run `pa:sync` first** when starting work
112
+ 2. **Log decisions** - Future AI needs to know WHY
113
+ 3. **List next steps** - Make continuation easy
114
+ 4. **Be specific** - File names, line numbers, exact changes
@@ -0,0 +1,43 @@
1
+ # Current Project Context
2
+
3
+ > **For AI Assistants:** Read this file first to understand current state.
4
+ > **Auto-updated** after each code change.
5
+
6
+ Last Updated: [Not yet initialized]
7
+ Last AI: [None]
8
+
9
+ ---
10
+
11
+ ## Active Work
12
+
13
+ No active features yet. Start with `pa:feature "name"` or `pa:fix "issue"`.
14
+
15
+ ---
16
+
17
+ ## Recent Changes
18
+
19
+ No changes recorded yet.
20
+
21
+ ---
22
+
23
+ ## Pending Items
24
+
25
+ None.
26
+
27
+ ---
28
+
29
+ ## Quick Stats
30
+
31
+ | Metric | Value |
32
+ |--------|-------|
33
+ | Active Features | 0 |
34
+ | Completed Today | 0 |
35
+ | Open Issues | 0 |
36
+
37
+ ---
38
+
39
+ ## How to Use
40
+
41
+ 1. **Starting work:** Run `pa:sync` to load this context
42
+ 2. **After code changes:** AI auto-updates this file
43
+ 3. **Check history:** See `./worklog/` for detailed session logs