agileflow 2.72.0 → 2.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,9 +36,9 @@ ROLE: Auto-Archival Configurator
36
36
  "header": "Threshold",
37
37
  "multiSelect": false,
38
38
  "options": [
39
- {"label": "7 days (Recommended)", "description": "Archive after 1 week"},
39
+ {"label": "30 days (Recommended)", "description": "Archive after 1 month"},
40
40
  {"label": "14 days", "description": "Archive after 2 weeks"},
41
- {"label": "30 days", "description": "Archive after 1 month"}
41
+ {"label": "7 days", "description": "Archive after 1 week"}
42
42
  ]
43
43
  }]</parameter>
44
44
  </invoke>
@@ -71,20 +71,20 @@ Use AskUserQuestion tool to get user preference:
71
71
  "multiSelect": false,
72
72
  "options": [
73
73
  {
74
- "label": "3 days",
75
- "description": "Very aggressive - keeps status.json very small (best for large teams)"
74
+ "label": "30 days (Recommended)",
75
+ "description": "Monthly archival - default, keeps recent context visible"
76
76
  },
77
77
  {
78
- "label": "7 days",
79
- "description": "Weekly archival - recommended for fast-moving teams"
78
+ "label": "14 days",
79
+ "description": "Bi-weekly archival - good balance for fast-moving projects"
80
80
  },
81
81
  {
82
- "label": "14 days",
83
- "description": "Bi-weekly archival - good balance for most projects"
82
+ "label": "7 days",
83
+ "description": "Weekly archival - for large teams with many stories"
84
84
  },
85
85
  {
86
- "label": "30 days",
87
- "description": "Monthly archival - default, keeps recent context visible"
86
+ "label": "3 days",
87
+ "description": "Very aggressive - keeps status.json very small"
88
88
  }
89
89
  ]
90
90
  }]</parameter>
@@ -1,38 +1,47 @@
1
1
  ---
2
2
  description: Configure advanced AgileFlow features (git, hooks, archival, CI, status line)
3
- argument-hint: [--profile=full|basic|minimal|none] [--enable/--disable=features] [--migrate]
3
+ argument-hint: [--profile=full|basic|minimal|none] [--enable/--disable=features] [--migrate] [--upgrade] [--repair] [--version] [--list-scripts]
4
4
  ---
5
5
 
6
6
  <!-- COMPACT_SUMMARY_START -->
7
7
 
8
8
  ## Compact Summary
9
9
 
10
- Configuration management with **profiles**, **enable/disable**, and **format migration**.
10
+ Configuration management with **profiles**, **enable/disable**, **format migration**, and **upgrade detection**.
11
11
 
12
12
  ### Workflow (MUST FOLLOW)
13
13
 
14
14
  1. **Run detection**: `node .agileflow/scripts/agileflow-configure.js --detect`
15
15
  2. **If ⚠️ INVALID FORMAT shown**: Ask user to fix with `--migrate` BEFORE anything else
16
- 3. **Present options**: Profiles, enable/disable, or check status
16
+ 3. **If 🔄 OUTDATED shown**: Ask user to upgrade with `--upgrade`
17
+ 4. **Present options**: Profiles, enable/disable, or check status
17
18
 
18
19
  ### Quick Commands
19
20
 
20
21
  ```bash
21
- node .agileflow/scripts/agileflow-configure.js --detect # Check status
22
- node .agileflow/scripts/agileflow-configure.js --migrate # Fix format issues
23
- node .agileflow/scripts/agileflow-configure.js --profile=full # Enable all
24
- node .agileflow/scripts/agileflow-configure.js --profile=none # Disable all
25
- node .agileflow/scripts/agileflow-configure.js --enable=stop # Enable specific
26
- node .agileflow/scripts/agileflow-configure.js --disable=archival # Disable specific
22
+ node .agileflow/scripts/agileflow-configure.js --detect # Check status
23
+ node .agileflow/scripts/agileflow-configure.js --migrate # Fix format issues
24
+ node .agileflow/scripts/agileflow-configure.js --upgrade # Update outdated scripts
25
+ node .agileflow/scripts/agileflow-configure.js --profile=full # Enable all
26
+ node .agileflow/scripts/agileflow-configure.js --profile=none # Disable all
27
+ node .agileflow/scripts/agileflow-configure.js --enable=sessionstart # Enable specific
28
+ node .agileflow/scripts/agileflow-configure.js --disable=archival # Disable specific
29
+ node .agileflow/scripts/agileflow-configure.js --list-scripts # Show all scripts status
30
+ node .agileflow/scripts/agileflow-configure.js --version # Version info
31
+ node .agileflow/scripts/agileflow-configure.js --repair # Fix missing scripts
32
+ node .agileflow/scripts/agileflow-configure.js --repair=statusline # Fix specific feature
27
33
  ```
28
34
 
35
+ **Note:** All scripts are located in `.agileflow/scripts/` - no files in project root `scripts/`.
36
+
29
37
  ### Features
30
38
 
31
- `sessionstart`, `precompact`, `stop`, `archival`, `statusline`, `autoupdate`
39
+ `sessionstart`, `precompact`, `archival`, `statusline`, `autoupdate`
32
40
 
33
41
  ### Critical Rules
34
42
 
35
43
  - **Check for format issues FIRST** - offer to fix before other options
44
+ - **Check for outdated scripts** - offer to upgrade if versions differ
36
45
  - **Backup created** on migrate: `.claude/settings.json.backup`
37
46
  - **Restart required** - always show red banner after changes
38
47
 
@@ -54,10 +63,9 @@ node .agileflow/scripts/agileflow-configure.js --detect
54
63
 
55
64
  **CRITICAL**: Check the output for format issues (⚠️ INVALID FORMAT).
56
65
 
57
- ## STEP 2: If Format Issues Detected Offer Migration FIRST
58
-
59
- If you see `⚠️ INVALID FORMAT` in the detection output, **immediately ask user about fixing**:
66
+ ## STEP 2: Handle Issues (Migration or Upgrade)
60
67
 
68
+ ### If ⚠️ INVALID FORMAT detected → Offer Migration
61
69
  ```xml
62
70
  <invoke name="AskUserQuestion">
63
71
  <parameter name="questions">[{
@@ -77,6 +85,26 @@ If user says yes:
77
85
  node .agileflow/scripts/agileflow-configure.js --migrate
78
86
  ```
79
87
 
88
+ ### If 🔄 OUTDATED detected → Offer Upgrade
89
+ ```xml
90
+ <invoke name="AskUserQuestion">
91
+ <parameter name="questions">[{
92
+ "question": "Outdated scripts detected! Your features were configured with an older AgileFlow version. Update them?",
93
+ "header": "Upgrade",
94
+ "multiSelect": false,
95
+ "options": [
96
+ {"label": "Yes, upgrade scripts (Recommended)", "description": "Re-deploy all enabled features with latest scripts."},
97
+ {"label": "No, keep current versions", "description": "Continue with older scripts (may miss bug fixes)."}
98
+ ]
99
+ }]</parameter>
100
+ </invoke>
101
+ ```
102
+
103
+ If user says yes:
104
+ ```bash
105
+ node .agileflow/scripts/agileflow-configure.js --upgrade
106
+ ```
107
+
80
108
  ## STEP 3: Configuration Options
81
109
 
82
110
  After fixing issues (or if no issues), present main options:
@@ -120,13 +148,13 @@ node .agileflow/scripts/agileflow-configure.js --profile=none
120
148
 
121
149
  ```bash
122
150
  # Enable features
123
- node .agileflow/scripts/agileflow-configure.js --enable=sessionstart,precompact,stop
151
+ node .agileflow/scripts/agileflow-configure.js --enable=sessionstart,precompact
124
152
 
125
153
  # Disable features
126
154
  node .agileflow/scripts/agileflow-configure.js --disable=statusline
127
155
 
128
156
  # Both at once
129
- node .agileflow/scripts/agileflow-configure.js --enable=stop --disable=archival
157
+ node .agileflow/scripts/agileflow-configure.js --enable=statusline --disable=archival
130
158
 
131
159
  # With custom archival days
132
160
  node .agileflow/scripts/agileflow-configure.js --enable=archival --archival-days=14
@@ -134,12 +162,12 @@ node .agileflow/scripts/agileflow-configure.js --enable=archival --archival-days
134
162
 
135
163
  ## Profile Details
136
164
 
137
- | Profile | SessionStart | PreCompact | Stop | Archival | StatusLine |
138
- |---------|-------------|------------|------|----------|------------|
139
- | `full` | ✅ | ✅ | ✅ | ✅ 7 days | ✅ |
140
- | `basic` | ✅ | ✅ | ❌ | 7 days | ❌ |
141
- | `minimal` | ✅ | ❌ | ❌ | 7 days | ❌ |
142
- | `none` | ❌ | ❌ | ❌ | ❌ | ❌ |
165
+ | Profile | SessionStart | PreCompact | Archival | StatusLine |
166
+ |---------|-------------|------------|----------|------------|
167
+ | `full` | ✅ | ✅ | ✅ 30 days | ✅ |
168
+ | `basic` | ✅ | ✅ | ✅ 30 days | ❌ |
169
+ | `minimal` | ✅ | ❌ | ✅ 30 days | ❌ |
170
+ | `none` | ❌ | ❌ | ❌ | ❌ |
143
171
 
144
172
  ## Interactive Mode (via /configure command)
145
173
 
@@ -176,7 +204,6 @@ Based on selection, run appropriate command.
176
204
  "options": [
177
205
  {"label": "SessionStart Hook", "description": "Welcome display with project status"},
178
206
  {"label": "PreCompact Hook", "description": "Context preservation on compact"},
179
- {"label": "Stop Hook", "description": "Warns about uncommitted git changes"},
180
207
  {"label": "Archival", "description": "Auto-archive old completed stories"},
181
208
  {"label": "Status Line", "description": "Custom status bar"},
182
209
  {"label": "Auto-Update", "description": "Automatically update AgileFlow on session start"}
@@ -188,7 +215,6 @@ Based on selection, run appropriate command.
188
215
  Map selections:
189
216
  - "SessionStart Hook" → `sessionstart`
190
217
  - "PreCompact Hook" → `precompact`
191
- - "Stop Hook" → `stop`
192
218
  - "Archival" → `archival`
193
219
  - "Status Line" → `statusline`
194
220
  - "Auto-Update" → `autoupdate`
@@ -243,18 +269,17 @@ The script updates `docs/00-meta/agileflow-metadata.json`:
243
269
 
244
270
  ```json
245
271
  {
246
- "version": "2.41.0",
247
- "updated": "2025-12-22T...",
272
+ "version": "2.71.0",
273
+ "updated": "2025-12-29T...",
248
274
  "archival": {
249
275
  "enabled": true,
250
276
  "threshold_days": 7
251
277
  },
252
278
  "features": {
253
- "sessionstart": {"enabled": true, "version": "2.41.0", "at": "..."},
254
- "precompact": {"enabled": true, "version": "2.41.0", "at": "..."},
255
- "stop": {"enabled": true, "version": "2.41.0", "at": "..."},
256
- "archival": {"enabled": true, "version": "2.41.0", "at": "..."},
257
- "statusline": {"enabled": true, "version": "2.41.0", "at": "..."}
279
+ "sessionstart": {"enabled": true, "version": "2.71.0", "at": "..."},
280
+ "precompact": {"enabled": true, "version": "2.71.0", "at": "..."},
281
+ "archival": {"enabled": true, "version": "2.71.0", "at": "..."},
282
+ "statusline": {"enabled": true, "version": "2.71.0", "at": "..."}
258
283
  }
259
284
  }
260
285
  ```
@@ -296,10 +321,9 @@ After configuration:
296
321
  Enabled:
297
322
  ✅ sessionstart
298
323
  ✅ precompact
299
- stop
324
+ archival
300
325
 
301
326
  Disabled:
302
- ❌ archival
303
327
  ❌ statusline
304
328
 
305
329
  ═══════════════════════════════════════════════════════
@@ -307,3 +331,102 @@ Disabled:
307
331
  Quit completely, wait 5 seconds, restart
308
332
  ═══════════════════════════════════════════════════════
309
333
  ```
334
+
335
+ After upgrade:
336
+
337
+ ```
338
+ 🔄 Upgrading Outdated Features...
339
+
340
+ Upgrading sessionstart...
341
+ ✅ Deployed agileflow-welcome.js
342
+ ✅ SessionStart hook enabled
343
+
344
+ Upgrading precompact...
345
+ ✅ Deployed precompact-context.sh
346
+ ✅ PreCompact hook enabled
347
+
348
+ ✅ Upgraded 2 feature(s) to v2.71.0
349
+ ```
350
+
351
+ ## Repair & Diagnostics
352
+
353
+ When scripts are accidentally deleted or corrupted, use these commands:
354
+
355
+ ### List Scripts Status
356
+
357
+ ```bash
358
+ node .agileflow/scripts/agileflow-configure.js --list-scripts
359
+ ```
360
+
361
+ Shows all scripts with their status (present/missing/modified):
362
+
363
+ ```
364
+ 📋 Installed Scripts
365
+ ✅ agileflow-welcome.js: present
366
+ ✅ precompact-context.sh: present
367
+ ❌ agileflow-statusline.sh: MISSING
368
+ └─ Feature: statusline
369
+ ⚠️ obtain-context.js: modified (local changes)
370
+
371
+ Summary: 15 present, 1 modified, 1 missing
372
+
373
+ 💡 Run with --repair to restore missing scripts
374
+ ```
375
+
376
+ ### Show Version Info
377
+
378
+ ```bash
379
+ node .agileflow/scripts/agileflow-configure.js --version
380
+ ```
381
+
382
+ Shows installed vs latest versions:
383
+
384
+ ```
385
+ 📊 Version Information
386
+ Installed: v2.71.0
387
+ CLI: v2.73.0
388
+ Latest: v2.73.0
389
+
390
+ 🔄 Update available! Run: npx agileflow update
391
+
392
+ Feature Versions:
393
+ ✅ sessionstart: v2.73.0
394
+ 🔄 precompact: v2.68.0 → v2.73.0
395
+ ✅ archival: v2.73.0
396
+ ❌ statusline: disabled
397
+ ```
398
+
399
+ ### Repair Missing Scripts
400
+
401
+ ```bash
402
+ # Repair all missing scripts
403
+ node .agileflow/scripts/agileflow-configure.js --repair
404
+
405
+ # Repair scripts for a specific feature only
406
+ node .agileflow/scripts/agileflow-configure.js --repair=statusline
407
+ ```
408
+
409
+ Output:
410
+
411
+ ```
412
+ 🔧 Repairing Scripts...
413
+ ✅ Restored agileflow-statusline.sh
414
+
415
+ Repaired: 1, Errors: 0, Skipped: 18
416
+
417
+ ═══════════════════════════════════════════════════════
418
+ 🔴 RESTART CLAUDE CODE NOW!
419
+ Quit completely, wait 5 seconds, restart
420
+ ═══════════════════════════════════════════════════════
421
+ ```
422
+
423
+ ### When to Use Each Command
424
+
425
+ | Scenario | Command |
426
+ |----------|---------|
427
+ | Accidentally deleted a script | `--repair` |
428
+ | Want to see what's installed | `--list-scripts` |
429
+ | Check if update is available | `--version` |
430
+ | Scripts outdated (feature version differs) | `--upgrade` |
431
+ | Settings format broken | `--migrate` |
432
+ | Major corruption/reinstall needed | `npx agileflow update --force`
@@ -46,11 +46,11 @@ class Installer {
46
46
 
47
47
  /**
48
48
  * Clean up existing content directories before installing.
49
- * Removes agents/, commands/, skills/, templates/ but preserves _cfg/ and config.yaml.
49
+ * Removes agents/, commands/, skills/, scripts/, templates/ but preserves _cfg/ and config.yaml.
50
50
  * @param {string} agileflowDir - AgileFlow installation directory
51
51
  */
52
52
  async cleanup(agileflowDir) {
53
- const dirsToRemove = ['agents', 'commands', 'skills', 'templates'];
53
+ const dirsToRemove = ['agents', 'commands', 'skills', 'scripts', 'templates'];
54
54
 
55
55
  for (const dir of dirsToRemove) {
56
56
  const dirPath = path.join(agileflowDir, dir);
@@ -243,14 +243,6 @@ class Installer {
243
243
  await fs.ensureDir(skillsDest);
244
244
  await this.copyContent(skillsSource, skillsDest, agileflowFolder, policy);
245
245
  }
246
-
247
- // Copy templates
248
- const templatesSource = path.join(packageRoot, 'templates');
249
- const templatesDest = path.join(agileflowDir, 'templates');
250
- if (await fs.pathExists(templatesSource)) {
251
- await fs.ensureDir(templatesDest);
252
- await this.copyContent(templatesSource, templatesDest, agileflowFolder, policy);
253
- }
254
246
  }
255
247
 
256
248
  /**
@@ -430,7 +422,7 @@ class Installer {
430
422
  const backupRoot = path.join(cfgDir, 'backups', timestamp);
431
423
  await fs.ensureDir(backupRoot);
432
424
 
433
- const candidates = ['agents', 'commands', 'skills', 'templates', 'config.yaml'];
425
+ const candidates = ['agents', 'commands', 'skills', 'scripts', 'templates', 'config.yaml'];
434
426
  for (const name of candidates) {
435
427
  const srcPath = path.join(agileflowDir, name);
436
428
  if (await fs.pathExists(srcPath)) {