claude-cli-advanced-starter-pack 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +527 -345
- package/package.json +1 -1
- package/src/commands/init.js +270 -38
- package/src/commands/test-setup.js +7 -6
- package/src/data/releases.json +84 -2
- package/src/testing/config.js +213 -84
- package/src/utils/smart-merge.js +457 -0
- package/src/utils/version-check.js +213 -0
- package/templates/commands/create-task-list.template.md +332 -17
- package/templates/commands/project-impl.template.md +13 -0
- package/templates/commands/update-smart.template.md +111 -0
- package/templates/hooks/ccasp-update-check.template.js +75 -0
- package/templates/hooks/usage-tracking.template.js +222 -0
|
@@ -50,15 +50,95 @@ These rules are loaded automatically and apply to ALL task lists created by this
|
|
|
50
50
|
|
|
51
51
|
## EXECUTION FLOW
|
|
52
52
|
|
|
53
|
-
### Step 0:
|
|
53
|
+
### Step 0: Check Testing Configuration (Graceful Degradation)
|
|
54
54
|
|
|
55
|
-
**FIRST ACTION**:
|
|
55
|
+
**FIRST ACTION**: Check what testing configuration is available and display status.
|
|
56
|
+
|
|
57
|
+
**Configuration Check**:
|
|
58
|
+
|
|
59
|
+
1. **Read tech-stack.json** (`.claude/tech-stack.json` or `tech-stack.json`)
|
|
60
|
+
2. **Check testing section** for:
|
|
61
|
+
- `testing.e2e.framework` - E2E framework (playwright, cypress, etc.)
|
|
62
|
+
- `testing.selectors.*` - Login form selectors
|
|
63
|
+
- `testing.credentials.*` - Environment variable names
|
|
64
|
+
- `testing.environment.*` - Base URL and setup
|
|
65
|
+
|
|
66
|
+
3. **Display Configuration Status**:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
70
|
+
║ 📋 Testing Configuration Status ║
|
|
71
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
72
|
+
{{#if testing.e2e.framework}}
|
|
73
|
+
║ ✅ E2E Framework: {{testing.e2e.framework}} ║
|
|
74
|
+
{{else}}
|
|
75
|
+
║ ⚠️ E2E Framework: Not configured ║
|
|
76
|
+
{{/if}}
|
|
77
|
+
{{#if testing.selectors.username}}
|
|
78
|
+
║ ✅ Login Selectors: Configured ║
|
|
79
|
+
{{else}}
|
|
80
|
+
║ ⚠️ Login Selectors: Not configured ║
|
|
81
|
+
{{/if}}
|
|
82
|
+
{{#if testing.credentials.usernameEnvVar}}
|
|
83
|
+
║ ✅ Credentials: Using env vars ║
|
|
84
|
+
{{else}}
|
|
85
|
+
║ ⚠️ Credentials: Not configured ║
|
|
86
|
+
{{/if}}
|
|
87
|
+
{{#if testing.environment.baseUrl}}
|
|
88
|
+
║ ✅ Test URL: {{testing.environment.baseUrl}} ║
|
|
89
|
+
{{else}}
|
|
90
|
+
║ ⚠️ Test URL: Not configured ║
|
|
91
|
+
{{/if}}
|
|
92
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Graceful Degradation Rules**:
|
|
96
|
+
|
|
97
|
+
| Config Status | Behavior |
|
|
98
|
+
|---------------|----------|
|
|
99
|
+
| **Fully configured** | Include all testing tasks (login, verification, E2E) |
|
|
100
|
+
| **Partially configured** | Include available tests, warn about missing pieces |
|
|
101
|
+
| **Not configured** | Skip testing tasks, show setup reminder at end |
|
|
102
|
+
|
|
103
|
+
**If testing is NOT configured**, display this reminder and continue:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
107
|
+
║ ℹ️ Testing not configured - skipping E2E verification ║
|
|
108
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
109
|
+
║ ║
|
|
110
|
+
║ To enable automated testing, run: ║
|
|
111
|
+
║ ║
|
|
112
|
+
║ ccasp test-setup ║
|
|
113
|
+
║ ║
|
|
114
|
+
║ Or configure manually in tech-stack.json under "testing" ║
|
|
115
|
+
║ ║
|
|
116
|
+
║ Task list will be created WITHOUT testing tasks. ║
|
|
117
|
+
║ You can still test manually after implementation. ║
|
|
118
|
+
║ ║
|
|
119
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Store configuration status** for use in later steps:
|
|
123
|
+
- `TESTING_CONFIGURED`: true/false
|
|
124
|
+
- `E2E_ENABLED`: true if framework is set and not 'none'
|
|
125
|
+
- `SELECTORS_AVAILABLE`: true if login selectors exist
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Step 0b: Load Persistent Rules (if configured)
|
|
130
|
+
|
|
131
|
+
{{#if testing.e2e.framework}}
|
|
132
|
+
**Read `.claude/task-lists/TESTING_RULES.md`** to load testing and deployment rules.
|
|
56
133
|
|
|
57
134
|
These rules govern:
|
|
58
135
|
- Which URLs to use ({{devEnvironment.tunnel.service}} vs {{urls.production.frontend}})
|
|
59
136
|
- Login credentials
|
|
60
137
|
- Deployment workflow (delete {{frontend.distDir}}, rebuild, verify SHA)
|
|
61
138
|
- Task completion workflow (curl → {{testing.e2e.framework}} → commit)
|
|
139
|
+
{{else}}
|
|
140
|
+
**Skip loading TESTING_RULES.md** - testing not configured.
|
|
141
|
+
{{/if}}
|
|
62
142
|
|
|
63
143
|
---
|
|
64
144
|
|
|
@@ -164,7 +244,8 @@ Based on my exploration, here's what I found:
|
|
|
164
244
|
|
|
165
245
|
**MANDATORY QUESTIONS** (use AskUserQuestion with multiple questions):
|
|
166
246
|
|
|
167
|
-
|
|
247
|
+
{{#if testing.e2e.framework}}
|
|
248
|
+
**Question 1: Testing Approach** (only if E2E_ENABLED)
|
|
168
249
|
```
|
|
169
250
|
header: "Testing"
|
|
170
251
|
question: "Do you want to use 'Ralph Wiggum Loop' style testing? (Continuous test-fix cycle until all tests pass)"
|
|
@@ -176,8 +257,23 @@ options:
|
|
|
176
257
|
- label: "Minimal Testing"
|
|
177
258
|
description: "Only test at the end of all tasks"
|
|
178
259
|
```
|
|
260
|
+
{{else}}
|
|
261
|
+
**Question 1: Testing Approach** (testing not configured - simplified options)
|
|
262
|
+
```
|
|
263
|
+
header: "Testing"
|
|
264
|
+
question: "Testing is not configured. How would you like to verify your changes?"
|
|
265
|
+
options:
|
|
266
|
+
- label: "Manual verification only"
|
|
267
|
+
description: "I'll test the changes manually - no automated tests"
|
|
268
|
+
- label: "Setup testing first"
|
|
269
|
+
description: "I want to configure automated testing before proceeding (run: ccasp test-setup)"
|
|
270
|
+
```
|
|
179
271
|
|
|
180
|
-
**
|
|
272
|
+
**Note**: If user selects "Setup testing first", provide instructions to run `ccasp test-setup` and restart the task list creation.
|
|
273
|
+
{{/if}}
|
|
274
|
+
|
|
275
|
+
{{#if testing.e2e.framework}}
|
|
276
|
+
**Question 2: {{testing.e2e.framework}} Environment** (only if E2E_ENABLED)
|
|
181
277
|
```
|
|
182
278
|
header: "{{testing.e2e.framework}}"
|
|
183
279
|
question: "Where should {{testing.e2e.framework}} E2E tests run?"
|
|
@@ -189,6 +285,9 @@ options:
|
|
|
189
285
|
- label: "No {{testing.e2e.framework}}"
|
|
190
286
|
description: "Skip E2E tests, use curl/unit tests only"
|
|
191
287
|
```
|
|
288
|
+
{{else}}
|
|
289
|
+
**Question 2: SKIP** (E2E not configured - skip this question)
|
|
290
|
+
{{/if}}
|
|
192
291
|
|
|
193
292
|
**Question 3: GitHub Integration**
|
|
194
293
|
```
|
|
@@ -212,14 +311,30 @@ options:
|
|
|
212
311
|
description: "I'll describe what to change"
|
|
213
312
|
```
|
|
214
313
|
|
|
314
|
+
**Question 5: Task Execution Strategy**
|
|
315
|
+
```
|
|
316
|
+
header: "Execution"
|
|
317
|
+
question: "How would you like to execute tasks?"
|
|
318
|
+
options:
|
|
319
|
+
- label: "Sequential - One at a time (Recommended)"
|
|
320
|
+
description: "Complete each task fully, commit, then move to next. More control, easier rollback"
|
|
321
|
+
- label: "Grouped - Related tasks together"
|
|
322
|
+
description: "Group related tasks, commit after each group. Balanced approach"
|
|
323
|
+
- label: "All at once"
|
|
324
|
+
description: "Execute all tasks, single final commit. Fastest but harder to debug"
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Store the user's execution preference** for use in Step 8.
|
|
328
|
+
|
|
215
329
|
---
|
|
216
330
|
|
|
217
331
|
### Step 5: Create Task List
|
|
218
332
|
|
|
219
333
|
Use **TaskCreate** to build the task list with Claude's native system.
|
|
220
334
|
|
|
221
|
-
**Task List Structure
|
|
335
|
+
**Task List Structure** (adapts based on TESTING_CONFIGURED status):
|
|
222
336
|
|
|
337
|
+
{{#if testing.e2e.framework}}
|
|
223
338
|
```
|
|
224
339
|
Task 0: "Review Testing Rules" (DO NOT MARK COMPLETE)
|
|
225
340
|
description: "Read .claude/task-lists/TESTING_RULES.md before starting. These rules apply to all tasks."
|
|
@@ -244,7 +359,7 @@ Task 2: "[First actual task]"
|
|
|
244
359
|
description: "[What needs to be done]"
|
|
245
360
|
activeForm: "[Present participle form]"
|
|
246
361
|
|
|
247
|
-
Task
|
|
362
|
+
Task 3: "[Second task]"
|
|
248
363
|
...
|
|
249
364
|
|
|
250
365
|
Task N-1: "Run final verification tests"
|
|
@@ -255,11 +370,41 @@ Task N: "Commit all changes"
|
|
|
255
370
|
description: "Create a git commit with all changes from this session"
|
|
256
371
|
activeForm: "Committing changes"
|
|
257
372
|
```
|
|
373
|
+
{{else}}
|
|
374
|
+
```
|
|
375
|
+
Task 0: "Context Reference" (DO NOT MARK COMPLETE)
|
|
376
|
+
description: "Testing not configured. To enable: run 'ccasp test-setup'. Tasks below will NOT include automated testing."
|
|
377
|
+
activeForm: "Maintaining context"
|
|
378
|
+
|
|
379
|
+
Task 1: "[First actual task]"
|
|
380
|
+
description: "[What needs to be done]"
|
|
381
|
+
activeForm: "[Present participle form]"
|
|
382
|
+
|
|
383
|
+
Task 2: "[Second task]"
|
|
384
|
+
...
|
|
385
|
+
|
|
386
|
+
Task N-1: "Manual verification"
|
|
387
|
+
description: "Manually test the changes in your browser/application to verify everything works"
|
|
388
|
+
activeForm: "Manually verifying changes"
|
|
389
|
+
|
|
390
|
+
Task N: "Commit all changes"
|
|
391
|
+
description: "Create a git commit with all changes from this session"
|
|
392
|
+
activeForm: "Committing changes"
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Note**: Since E2E testing is not configured, the task list excludes:
|
|
396
|
+
- Login via Playwright/Puppeteer task
|
|
397
|
+
- Automated E2E verification tests
|
|
398
|
+
|
|
399
|
+
The user should manually verify changes work before committing.
|
|
400
|
+
{{/if}}
|
|
258
401
|
|
|
259
402
|
**IMPORTANT**:
|
|
260
403
|
- Task 0 with persistent instructions should NEVER be marked complete
|
|
261
404
|
- Each task should be atomic and independently verifiable
|
|
405
|
+
{{#if testing.e2e.framework}}
|
|
262
406
|
- Include curl testing tasks BEFORE {{testing.e2e.framework}} tasks when debugging
|
|
407
|
+
{{/if}}
|
|
263
408
|
|
|
264
409
|
---
|
|
265
410
|
|
|
@@ -267,6 +412,49 @@ Task N: "Commit all changes"
|
|
|
267
412
|
|
|
268
413
|
If user selected GitHub integration:
|
|
269
414
|
|
|
415
|
+
#### Step 6a: Preview Issue Before Creation
|
|
416
|
+
|
|
417
|
+
**Present issue preview to user** before creating:
|
|
418
|
+
|
|
419
|
+
```markdown
|
|
420
|
+
## GitHub Issue Preview
|
|
421
|
+
|
|
422
|
+
**Title:** [Generated from user prompt]
|
|
423
|
+
**Priority:** P2-Medium (or determined from analysis)
|
|
424
|
+
**Labels:** [Determined from exploration - frontend, backend, feature, bug, etc.]
|
|
425
|
+
**Stack:** [Frontend only | Backend only | Both]
|
|
426
|
+
|
|
427
|
+
**Description Preview:**
|
|
428
|
+
> [First 200 characters of the analysis from Step 3...]
|
|
429
|
+
|
|
430
|
+
**Task Checklist:**
|
|
431
|
+
- [ ] Task 1: [First task]
|
|
432
|
+
- [ ] Task 2: [Second task]
|
|
433
|
+
- [ ] ...
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**Ask for confirmation using AskUserQuestion:**
|
|
437
|
+
```
|
|
438
|
+
header: "Create GitHub Issue?"
|
|
439
|
+
question: "Ready to create this GitHub issue? Review the preview above."
|
|
440
|
+
options:
|
|
441
|
+
- label: "Yes - Create Issue"
|
|
442
|
+
description: "Create the issue and enable auto-progress tracking"
|
|
443
|
+
- label: "Modify Details"
|
|
444
|
+
description: "I want to change the title, priority, or labels"
|
|
445
|
+
- label: "Skip GitHub"
|
|
446
|
+
description: "Don't create issue, use local TodoWrite only"
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Handle user response:**
|
|
450
|
+
- **"Yes - Create Issue"**: Proceed to create the issue (Step 6b)
|
|
451
|
+
- **"Modify Details"**: Ask which fields to change, then show preview again
|
|
452
|
+
- **"Skip GitHub"**: Skip to Step 7, note that GitHub tracking is disabled
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
#### Step 6b: Create the Issue
|
|
457
|
+
|
|
270
458
|
1. **Create comprehensive issue** using `/github-create-task`:
|
|
271
459
|
```bash
|
|
272
460
|
/github-create-task --batch-mode
|
|
@@ -311,6 +499,43 @@ If user selected GitHub integration:
|
|
|
311
499
|
- Adds a progress comment if significant milestone
|
|
312
500
|
- See `.claude/hooks/tools/github-progress-hook.js`
|
|
313
501
|
|
|
502
|
+
#### Step 6c: Post-Creation Confirmation
|
|
503
|
+
|
|
504
|
+
After the issue is created, **display confirmation and ask how to proceed**:
|
|
505
|
+
|
|
506
|
+
```markdown
|
|
507
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
508
|
+
║ ✅ GitHub Issue Created Successfully ║
|
|
509
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
510
|
+
║ ║
|
|
511
|
+
║ Issue: #[ISSUE_NUMBER] ║
|
|
512
|
+
║ URL: https://github.com/[owner]/[repo]/issues/[number] ║
|
|
513
|
+
║ ║
|
|
514
|
+
║ Auto-progress tracking enabled: ║
|
|
515
|
+
║ • Tasks will auto-update issue as they complete ║
|
|
516
|
+
║ • Checkboxes will be checked off automatically ║
|
|
517
|
+
║ ║
|
|
518
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**Ask user how to proceed using AskUserQuestion:**
|
|
522
|
+
```
|
|
523
|
+
header: "Issue Created"
|
|
524
|
+
question: "GitHub issue #[NUMBER] created. What would you like to do?"
|
|
525
|
+
options:
|
|
526
|
+
- label: "Continue to Task Execution"
|
|
527
|
+
description: "Proceed with creating and executing the task list"
|
|
528
|
+
- label: "View Issue in Browser"
|
|
529
|
+
description: "Open the issue, then come back to continue"
|
|
530
|
+
- label: "Exit for Now"
|
|
531
|
+
description: "Save session state, I'll continue later"
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
**Handle user response:**
|
|
535
|
+
- **"Continue to Task Execution"**: Proceed to Step 7
|
|
536
|
+
- **"View Issue in Browser"**: Provide clickable link, wait for user to return, then proceed
|
|
537
|
+
- **"Exit for Now"**: Save session state to `.claude/task-lists/session-{timestamp}.json` and exit gracefully
|
|
538
|
+
|
|
314
539
|
---
|
|
315
540
|
|
|
316
541
|
### Step 7: Configure Ralph Loop (If Selected)
|
|
@@ -330,9 +555,11 @@ const config = {
|
|
|
330
555
|
|
|
331
556
|
---
|
|
332
557
|
|
|
333
|
-
### Step 8:
|
|
558
|
+
### Step 8: Final Review & Begin Execution
|
|
559
|
+
|
|
560
|
+
#### Step 8a: Display Task Summary
|
|
334
561
|
|
|
335
|
-
1. **Display task summary**:
|
|
562
|
+
1. **Display comprehensive task summary**:
|
|
336
563
|
```
|
|
337
564
|
## Task List Created
|
|
338
565
|
|
|
@@ -343,21 +570,109 @@ const config = {
|
|
|
343
570
|
| 2 | [Task 2 subject] | pending |
|
|
344
571
|
...
|
|
345
572
|
|
|
346
|
-
**
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
573
|
+
**Configuration:**
|
|
574
|
+
{{#if testing.e2e.framework}}
|
|
575
|
+
- Testing Mode: [Ralph Loop / Manual / Minimal]
|
|
576
|
+
- E2E Framework: {{testing.e2e.framework}}
|
|
577
|
+
- Environment: [{{devEnvironment.tunnel.service}} / {{urls.production.frontend}}]
|
|
578
|
+
{{else}}
|
|
579
|
+
- Testing: Not configured (manual verification only)
|
|
580
|
+
- To enable: run `ccasp test-setup`
|
|
581
|
+
{{/if}}
|
|
582
|
+
- Execution Strategy: [Sequential / Grouped / All at once]
|
|
583
|
+
- GitHub Issue: [#123 (if created) | Not tracked]
|
|
351
584
|
```
|
|
352
585
|
|
|
586
|
+
#### Step 8b: Final Confirmation Before Execution
|
|
587
|
+
|
|
588
|
+
**Ask user to confirm before starting using AskUserQuestion:**
|
|
589
|
+
```
|
|
590
|
+
header: "Ready to Begin?"
|
|
591
|
+
question: "Review the task list above. How would you like to proceed?"
|
|
592
|
+
options:
|
|
593
|
+
- label: "Start Task 1 Now"
|
|
594
|
+
description: "Begin executing the first task immediately"
|
|
595
|
+
- label: "Start from Different Task"
|
|
596
|
+
description: "Skip to a specific task number"
|
|
597
|
+
- label: "Modify Task List"
|
|
598
|
+
description: "Add, remove, or edit tasks before starting"
|
|
599
|
+
- label: "Save & Exit"
|
|
600
|
+
description: "Save the task list for later, exit now"
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
**Handle user response:**
|
|
604
|
+
- **"Start Task 1 Now"**: Proceed to Step 8c
|
|
605
|
+
- **"Start from Different Task"**: Ask which task number, validate it exists, start there
|
|
606
|
+
- **"Modify Task List"**: Allow user to describe changes, update TaskList, show summary again
|
|
607
|
+
- **"Save & Exit"**: Save full session state to `.claude/task-lists/session-{timestamp}.json`, display resume instructions, exit
|
|
608
|
+
|
|
609
|
+
#### Step 8c: Begin Execution
|
|
610
|
+
|
|
353
611
|
2. **Compact context** (use /compact if token usage is high)
|
|
354
612
|
|
|
355
|
-
3. **
|
|
613
|
+
3. **Execute based on user's chosen strategy** (from Step 4, Question 5):
|
|
614
|
+
|
|
615
|
+
**Sequential Execution (One at a time):**
|
|
356
616
|
- Use `TaskUpdate` to set Task 1 to `in_progress`
|
|
357
|
-
- Execute the task
|
|
617
|
+
- Execute the task fully
|
|
358
618
|
- Use `TaskUpdate` to set Task 1 to `completed`
|
|
359
|
-
- Commit changes
|
|
360
|
-
-
|
|
619
|
+
- **Commit changes for this task**
|
|
620
|
+
- Ask: "Task 1 complete. Ready for Task 2?" (brief confirmation)
|
|
621
|
+
- Repeat for each task
|
|
622
|
+
|
|
623
|
+
**Grouped Execution:**
|
|
624
|
+
- Identify related task groups (e.g., all frontend tasks, all backend tasks)
|
|
625
|
+
- Execute all tasks in a group
|
|
626
|
+
- Commit after completing each group
|
|
627
|
+
- Brief status update between groups
|
|
628
|
+
|
|
629
|
+
**All at Once Execution:**
|
|
630
|
+
- Execute all tasks without intermediate commits
|
|
631
|
+
- Single comprehensive commit at the end
|
|
632
|
+
- Higher risk but faster for simple changes
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
### Step 9: Post-Execution Summary
|
|
637
|
+
|
|
638
|
+
After all tasks are complete, display a summary:
|
|
639
|
+
|
|
640
|
+
{{#if testing.e2e.framework}}
|
|
641
|
+
```
|
|
642
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
643
|
+
║ ✅ All Tasks Completed ║
|
|
644
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
645
|
+
║ ║
|
|
646
|
+
║ Tasks completed: [N] ║
|
|
647
|
+
║ E2E tests: [Passed/Failed] ║
|
|
648
|
+
║ Commits made: [M] ║
|
|
649
|
+
║ ║
|
|
650
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
651
|
+
```
|
|
652
|
+
{{else}}
|
|
653
|
+
```
|
|
654
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
655
|
+
║ ✅ All Tasks Completed ║
|
|
656
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
657
|
+
║ ║
|
|
658
|
+
║ Tasks completed: [N] ║
|
|
659
|
+
║ Commits made: [M] ║
|
|
660
|
+
║ ║
|
|
661
|
+
║ ℹ️ Testing was skipped (not configured) ║
|
|
662
|
+
║ ║
|
|
663
|
+
║ To enable automated E2E testing for future tasks: ║
|
|
664
|
+
║ ║
|
|
665
|
+
║ ccasp test-setup ║
|
|
666
|
+
║ ║
|
|
667
|
+
║ This will configure: ║
|
|
668
|
+
║ • Playwright/Cypress/Puppeteer integration ║
|
|
669
|
+
║ • Login selectors for authenticated testing ║
|
|
670
|
+
║ • Test environment URLs ║
|
|
671
|
+
║ • Ralph Loop continuous testing ║
|
|
672
|
+
║ ║
|
|
673
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
674
|
+
```
|
|
675
|
+
{{/if}}
|
|
361
676
|
|
|
362
677
|
---
|
|
363
678
|
|
|
@@ -305,6 +305,19 @@ Questions:
|
|
|
305
305
|
After completing any option, ask the user:
|
|
306
306
|
- "Would you like to perform another action? (1-4, B to go back, Q to quit)"
|
|
307
307
|
|
|
308
|
+
## Mark Setup Complete
|
|
309
|
+
|
|
310
|
+
**IMPORTANT:** After the user successfully completes ANY option (1-4), update the state file to mark setup as complete:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Read current state, add projectImplCompleted: true, write back
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Use the Edit tool to update `.claude/config/ccasp-state.json`:
|
|
317
|
+
- Set `"projectImplCompleted": true`
|
|
318
|
+
|
|
319
|
+
This removes the "Run /project-impl" recommendation banner from `/menu`.
|
|
320
|
+
|
|
308
321
|
## Terminal Alternative
|
|
309
322
|
|
|
310
323
|
These operations can also be run from the terminal:
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Smart Update Manager
|
|
2
|
+
|
|
3
|
+
Explore and manage updates for your customized CCASP assets with intelligent merge suggestions.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This command helps you safely update customized commands, skills, agents, and hooks while preserving your modifications. It detects which assets you've customized and used, then provides merge exploration with Claude's analysis.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- After running `npm update -g claude-cli-advanced-starter-pack`
|
|
12
|
+
- When `/menu` shows an update is available with customized assets
|
|
13
|
+
- To review what changes an update would bring before applying
|
|
14
|
+
|
|
15
|
+
## Execution Flow
|
|
16
|
+
|
|
17
|
+
### Step 1: Detect Customized Assets
|
|
18
|
+
|
|
19
|
+
Read `.claude/config/usage-tracking.json` to identify:
|
|
20
|
+
- Assets you've used (commands, skills, agents, hooks)
|
|
21
|
+
- Assets marked as customized (modified from template)
|
|
22
|
+
- Usage frequency and last-used dates
|
|
23
|
+
|
|
24
|
+
### Step 2: Compare with Templates
|
|
25
|
+
|
|
26
|
+
For each customized asset:
|
|
27
|
+
1. Load your local version from `.claude/`
|
|
28
|
+
2. Load the template version from the CCASP package
|
|
29
|
+
3. Generate a diff comparison
|
|
30
|
+
4. Analyze change significance (low/medium/high)
|
|
31
|
+
|
|
32
|
+
### Step 3: Present Merge Options
|
|
33
|
+
|
|
34
|
+
For each asset with differences, offer:
|
|
35
|
+
|
|
36
|
+
| Option | Description |
|
|
37
|
+
|--------|-------------|
|
|
38
|
+
| **Explore** | Show detailed analysis with Claude's explanation of changes |
|
|
39
|
+
| **Replace** | Use the new template version (backup created) |
|
|
40
|
+
| **Skip** | Keep your customized version |
|
|
41
|
+
| **Show Diff** | View raw line-by-line differences |
|
|
42
|
+
|
|
43
|
+
### Step 4: Apply Decisions
|
|
44
|
+
|
|
45
|
+
- Backup files go to `.claude/backups/` with timestamps
|
|
46
|
+
- Update `.claude/config/usage-tracking.json` to reflect changes
|
|
47
|
+
- Generate summary report of actions taken
|
|
48
|
+
|
|
49
|
+
## Usage Examples
|
|
50
|
+
|
|
51
|
+
### Check for updates
|
|
52
|
+
```
|
|
53
|
+
/update-smart
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Force re-check (bypass cache)
|
|
57
|
+
```
|
|
58
|
+
/update-smart --force
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Only show customized assets (no update)
|
|
62
|
+
```
|
|
63
|
+
/update-smart --list
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
### Asset Summary Table
|
|
69
|
+
```
|
|
70
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
71
|
+
│ Customized Assets Detected │
|
|
72
|
+
├────────────────────────────────────────────────────────────────┤
|
|
73
|
+
│ Commands (3) │
|
|
74
|
+
│ • /create-task-list - 🟡 Medium changes - Used 12 times │
|
|
75
|
+
│ • /github-update - 🟢 Minor changes - Used 5 times │
|
|
76
|
+
│ • /e2e-test - 🔴 Major changes - Used 8 times │
|
|
77
|
+
├────────────────────────────────────────────────────────────────┤
|
|
78
|
+
│ Skills (1) │
|
|
79
|
+
│ • dms - 🟡 Medium changes - Used 3 times │
|
|
80
|
+
└────────────────────────────────────────────────────────────────┘
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Change Significance Legend
|
|
84
|
+
- 🟢 **Low**: Comment changes, formatting, minor tweaks
|
|
85
|
+
- 🟡 **Medium**: Configuration changes, new options
|
|
86
|
+
- 🔴 **High**: Structural changes, new features, breaking changes
|
|
87
|
+
|
|
88
|
+
## Related Commands
|
|
89
|
+
|
|
90
|
+
- `/update-check` - Check for CCASP updates
|
|
91
|
+
- `/menu` - View update status in main menu
|
|
92
|
+
- `/ccasp-setup` - Re-run setup wizard
|
|
93
|
+
|
|
94
|
+
## File Locations
|
|
95
|
+
|
|
96
|
+
| File | Purpose |
|
|
97
|
+
|------|---------|
|
|
98
|
+
| `.claude/config/usage-tracking.json` | Asset usage data |
|
|
99
|
+
| `.claude/config/ccasp-state.json` | Update state cache |
|
|
100
|
+
| `.claude/backups/` | Backup directory for replaced files |
|
|
101
|
+
|
|
102
|
+
## Implementation Notes
|
|
103
|
+
|
|
104
|
+
1. Read usage tracking from `.claude/config/usage-tracking.json`
|
|
105
|
+
2. For each customized asset type (commands, skills, agents, hooks):
|
|
106
|
+
- Get local version from `.claude/{type}/`
|
|
107
|
+
- Get template from CCASP package installation
|
|
108
|
+
- Compare contents and generate diff
|
|
109
|
+
3. Display findings and prompt for decisions
|
|
110
|
+
4. Apply updates with backups
|
|
111
|
+
5. Update tracking file to reflect new state
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Automatically checks for npm updates when Claude Code starts.
|
|
5
5
|
* Runs on first UserPromptSubmit per session, caches results for 1 hour.
|
|
6
|
+
* Also detects customized assets that may need smart merge during updates.
|
|
6
7
|
*
|
|
7
8
|
* Event: UserPromptSubmit
|
|
8
9
|
*/
|
|
@@ -14,6 +15,7 @@ const path = require('path');
|
|
|
14
15
|
const PACKAGE_NAME = 'claude-cli-advanced-starter-pack';
|
|
15
16
|
const CACHE_DURATION = 60 * 60 * 1000; // 1 hour
|
|
16
17
|
const STATE_FILE = '.claude/config/ccasp-state.json';
|
|
18
|
+
const USAGE_FILE = '.claude/config/usage-tracking.json';
|
|
17
19
|
const SESSION_MARKER = '.claude/config/.ccasp-session-checked';
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -39,6 +41,7 @@ function loadState() {
|
|
|
39
41
|
updateHighlights: [],
|
|
40
42
|
updateFirstDisplayed: false,
|
|
41
43
|
dismissedUntil: 0,
|
|
44
|
+
projectImplCompleted: false,
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -184,6 +187,65 @@ function markSessionChecked() {
|
|
|
184
187
|
fs.writeFileSync(markerPath, Date.now().toString(), 'utf8');
|
|
185
188
|
}
|
|
186
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Load usage tracking data
|
|
192
|
+
*/
|
|
193
|
+
function loadUsageTracking() {
|
|
194
|
+
const trackingPath = path.join(process.cwd(), USAGE_FILE);
|
|
195
|
+
|
|
196
|
+
if (fs.existsSync(trackingPath)) {
|
|
197
|
+
try {
|
|
198
|
+
return JSON.parse(fs.readFileSync(trackingPath, 'utf8'));
|
|
199
|
+
} catch {
|
|
200
|
+
// Return default
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
version: '1.0.0',
|
|
206
|
+
assets: { commands: {}, skills: {}, agents: {}, hooks: {} },
|
|
207
|
+
_lastModified: null,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Get customized assets that have been used
|
|
213
|
+
*/
|
|
214
|
+
function getCustomizedUsedAssets() {
|
|
215
|
+
const tracking = loadUsageTracking();
|
|
216
|
+
const result = { commands: [], skills: [], agents: [], hooks: [] };
|
|
217
|
+
|
|
218
|
+
for (const [type, assets] of Object.entries(tracking.assets || {})) {
|
|
219
|
+
if (!result[type]) continue;
|
|
220
|
+
|
|
221
|
+
for (const [name, data] of Object.entries(assets || {})) {
|
|
222
|
+
if (data.customized && data.useCount > 0) {
|
|
223
|
+
result[type].push({
|
|
224
|
+
name,
|
|
225
|
+
useCount: data.useCount,
|
|
226
|
+
lastUsed: data.lastUsed,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return result;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Count total customized assets
|
|
237
|
+
*/
|
|
238
|
+
function countCustomizedAssets() {
|
|
239
|
+
const assets = getCustomizedUsedAssets();
|
|
240
|
+
let count = 0;
|
|
241
|
+
|
|
242
|
+
for (const list of Object.values(assets)) {
|
|
243
|
+
count += list.length;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return count;
|
|
247
|
+
}
|
|
248
|
+
|
|
187
249
|
/**
|
|
188
250
|
* Main hook handler
|
|
189
251
|
*/
|
|
@@ -231,8 +293,21 @@ module.exports = async function ccaspUpdateCheck(context) {
|
|
|
231
293
|
state.updateFirstDisplayed = false;
|
|
232
294
|
state.lastSeenUpdateVersion = latestVersion;
|
|
233
295
|
}
|
|
296
|
+
|
|
297
|
+
// Check for customized assets that may need smart merge
|
|
298
|
+
const customizedCount = countCustomizedAssets();
|
|
299
|
+
if (customizedCount > 0) {
|
|
300
|
+
state.customizedAssetsCount = customizedCount;
|
|
301
|
+
state.customizedAssets = getCustomizedUsedAssets();
|
|
302
|
+
state.smartMergeAvailable = true;
|
|
303
|
+
} else {
|
|
304
|
+
state.customizedAssetsCount = 0;
|
|
305
|
+
state.customizedAssets = null;
|
|
306
|
+
state.smartMergeAvailable = false;
|
|
307
|
+
}
|
|
234
308
|
} else {
|
|
235
309
|
state.updateHighlights = [];
|
|
310
|
+
state.smartMergeAvailable = false;
|
|
236
311
|
}
|
|
237
312
|
|
|
238
313
|
// Save state
|