agileflow 2.92.1 → 2.94.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/scripts/agileflow-statusline.sh +106 -0
  5. package/scripts/agileflow-welcome.js +54 -0
  6. package/scripts/document-repl.js +793 -0
  7. package/scripts/session-manager.js +230 -16
  8. package/scripts/spawn-parallel.js +53 -14
  9. package/src/core/agents/accessibility.md +19 -125
  10. package/src/core/agents/adr-writer.md +18 -1
  11. package/src/core/agents/analytics.md +19 -125
  12. package/src/core/agents/api.md +5 -130
  13. package/src/core/agents/ci.md +26 -131
  14. package/src/core/agents/compliance.md +21 -125
  15. package/src/core/agents/database.md +20 -125
  16. package/src/core/agents/datamigration.md +20 -125
  17. package/src/core/agents/design.md +19 -125
  18. package/src/core/agents/devops.md +12 -129
  19. package/src/core/agents/documentation.md +18 -1
  20. package/src/core/agents/epic-planner.md +31 -10
  21. package/src/core/agents/integrations.md +19 -125
  22. package/src/core/agents/mobile.md +19 -125
  23. package/src/core/agents/monitoring.md +19 -125
  24. package/src/core/agents/performance.md +19 -125
  25. package/src/core/agents/product.md +18 -1
  26. package/src/core/agents/qa.md +21 -125
  27. package/src/core/agents/readme-updater.md +18 -1
  28. package/src/core/agents/refactor.md +19 -125
  29. package/src/core/agents/research.md +3 -1
  30. package/src/core/agents/rlm-subcore.md +202 -0
  31. package/src/core/agents/security.md +7 -125
  32. package/src/core/agents/testing.md +20 -125
  33. package/src/core/agents/ui.md +14 -135
  34. package/src/core/commands/adr/list.md +20 -0
  35. package/src/core/commands/adr/update.md +24 -1
  36. package/src/core/commands/adr/view.md +23 -1
  37. package/src/core/commands/adr.md +2 -2
  38. package/src/core/commands/agent.md +11 -1
  39. package/src/core/commands/assign.md +15 -6
  40. package/src/core/commands/auto.md +11 -1
  41. package/src/core/commands/babysit.md +15 -4
  42. package/src/core/commands/baseline.md +11 -1
  43. package/src/core/commands/batch.md +11 -1
  44. package/src/core/commands/blockers.md +11 -1
  45. package/src/core/commands/board.md +11 -1
  46. package/src/core/commands/changelog.md +11 -0
  47. package/src/core/commands/choose.md +16 -1
  48. package/src/core/commands/ci.md +11 -1
  49. package/src/core/commands/configure.md +73 -2
  50. package/src/core/commands/context/export.md +8 -0
  51. package/src/core/commands/context/full.md +8 -0
  52. package/src/core/commands/context/note.md +8 -0
  53. package/src/core/commands/debt.md +11 -0
  54. package/src/core/commands/deploy.md +10 -0
  55. package/src/core/commands/deps.md +11 -1
  56. package/src/core/commands/diagnose.md +10 -0
  57. package/src/core/commands/docs.md +12 -2
  58. package/src/core/commands/epic/list.md +20 -0
  59. package/src/core/commands/epic/view.md +25 -0
  60. package/src/core/commands/epic.md +5 -6
  61. package/src/core/commands/feedback.md +11 -0
  62. package/src/core/commands/handoff.md +12 -2
  63. package/src/core/commands/help.md +10 -0
  64. package/src/core/commands/ideate.md +10 -0
  65. package/src/core/commands/impact.md +11 -1
  66. package/src/core/commands/metrics.md +11 -1
  67. package/src/core/commands/multi-expert.md +11 -1
  68. package/src/core/commands/packages.md +11 -0
  69. package/src/core/commands/pr.md +10 -0
  70. package/src/core/commands/readme-sync.md +10 -5
  71. package/src/core/commands/research/analyze.md +60 -3
  72. package/src/core/commands/research/ask.md +9 -1
  73. package/src/core/commands/research/import.md +8 -0
  74. package/src/core/commands/research/list.md +8 -0
  75. package/src/core/commands/research/synthesize.md +9 -1
  76. package/src/core/commands/research/view.md +8 -0
  77. package/src/core/commands/retro.md +12 -2
  78. package/src/core/commands/review.md +11 -1
  79. package/src/core/commands/rlm.md +363 -0
  80. package/src/core/commands/roadmap/analyze.md +1 -1
  81. package/src/core/commands/rpi.md +9 -1
  82. package/src/core/commands/session/cleanup.md +250 -0
  83. package/src/core/commands/session/end.md +10 -0
  84. package/src/core/commands/session/history.md +11 -1
  85. package/src/core/commands/session/init.md +10 -0
  86. package/src/core/commands/session/new.md +113 -13
  87. package/src/core/commands/session/resume.md +10 -0
  88. package/src/core/commands/session/spawn.md +8 -0
  89. package/src/core/commands/session/status.md +10 -0
  90. package/src/core/commands/skill/create.md +1 -1
  91. package/src/core/commands/skill/delete.md +11 -1
  92. package/src/core/commands/skill/edit.md +11 -1
  93. package/src/core/commands/skill/test.md +11 -1
  94. package/src/core/commands/skill/upgrade.md +11 -1
  95. package/src/core/commands/sprint.md +14 -3
  96. package/src/core/commands/status.md +15 -6
  97. package/src/core/commands/story/list.md +23 -0
  98. package/src/core/commands/story/view.md +24 -0
  99. package/src/core/commands/story.md +4 -5
  100. package/src/core/commands/template.md +10 -0
  101. package/src/core/commands/tests.md +10 -0
  102. package/src/core/commands/update.md +10 -0
  103. package/src/core/commands/validate-expertise.md +10 -1
  104. package/src/core/commands/velocity.md +11 -1
  105. package/src/core/commands/verify.md +13 -1
  106. package/src/core/commands/whats-new.md +8 -0
  107. package/src/core/commands/workflow.md +16 -1
  108. package/src/core/templates/agent-coordination-pattern.md +38 -0
  109. package/src/core/templates/agileflow-metadata.json +25 -0
  110. package/src/core/templates/preserve-rules-common.md +107 -0
  111. package/src/core/templates/preserve-rules.json +42 -0
  112. package/src/core/templates/proactive-action-spec.md +29 -0
  113. package/src/core/templates/quality-gate-priorities.md +34 -0
  114. package/src/core/templates/session-harness-protocol.md +128 -0
  115. package/tools/cli/lib/content-injector.js +338 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.94.0] - 2026-01-24
11
+
12
+ ### Added
13
+ - Shared docs/ across sessions via symlink for multi-session coordination
14
+
15
+ ## [2.93.0] - 2026-01-24
16
+
17
+ ### Added
18
+ - RLM document analysis and session health improvements
19
+
10
20
  ## [2.92.1] - 2026-01-23
11
21
 
12
22
  ### Added
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  </p>
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/agileflow?color=brightgreen)](https://www.npmjs.com/package/agileflow)
6
- [![Commands](https://img.shields.io/badge/commands-77-blue)](docs/04-architecture/commands.md)
6
+ [![Commands](https://img.shields.io/badge/commands-78-blue)](docs/04-architecture/commands.md)
7
7
  [![Agents/Experts](https://img.shields.io/badge/agents%2Fexperts-31-orange)](docs/04-architecture/subagents.md)
8
8
  [![Skills](https://img.shields.io/badge/skills-dynamic-purple)](docs/04-architecture/skills.md)
9
9
 
@@ -65,7 +65,7 @@ AgileFlow combines three proven methodologies:
65
65
 
66
66
  | Component | Count | Description |
67
67
  |-----------|-------|-------------|
68
- | [Commands](docs/04-architecture/commands.md) | 77 | Slash commands for agile workflows |
68
+ | [Commands](docs/04-architecture/commands.md) | 78 | Slash commands for agile workflows |
69
69
  | [Agents/Experts](docs/04-architecture/subagents.md) | 31 | Specialized agents with self-improving knowledge bases |
70
70
  | [Skills](docs/04-architecture/skills.md) | Dynamic | Generated on-demand with `/agileflow:skill:create` |
71
71
 
@@ -76,7 +76,7 @@ AgileFlow combines three proven methodologies:
76
76
  Full documentation lives in [`docs/04-architecture/`](docs/04-architecture/):
77
77
 
78
78
  ### Reference
79
- - [Commands](docs/04-architecture/commands.md) - All 77 slash commands
79
+ - [Commands](docs/04-architecture/commands.md) - All 78 slash commands
80
80
  - [Agents/Experts](docs/04-architecture/subagents.md) - 31 specialized agents with self-improving knowledge
81
81
  - [Skills](docs/04-architecture/skills.md) - Dynamic skill generator with MCP integration
82
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "2.92.1",
3
+ "version": "2.94.0",
4
4
  "description": "AI-driven agile development system for Claude Code, Cursor, Windsurf, and more",
5
5
  "keywords": [
6
6
  "agile",
@@ -381,6 +381,91 @@ PYTHON
381
381
  fi
382
382
  fi
383
383
 
384
+ # ============================================================================
385
+ # Task Complexity Assessment (RLM-inspired)
386
+ # ============================================================================
387
+ # Detects task complexity based on:
388
+ # - Current story dependencies and blockers
389
+ # - File count affected
390
+ # - Cross-references needed
391
+ #
392
+ # Maps to context threshold recommendations:
393
+ # - LOW complexity: 70% context is fine
394
+ # - MEDIUM complexity: stay under 60%
395
+ # - HIGH complexity: stay under 40% (dumb zone starts sooner)
396
+ #
397
+ COMPLEXITY_DISPLAY=""
398
+ SHOW_COMPLEXITY=true
399
+
400
+ # Check component setting
401
+ if [ "$COMPONENTS" != "null" ] && [ -n "$COMPONENTS" ]; then
402
+ SHOW_COMPLEXITY=$(echo "$COMPONENTS" | jq -r '.complexity | if . == null then true else . end')
403
+ fi
404
+
405
+ if [ "$SHOW_COMPLEXITY" = "true" ]; then
406
+ TASK_COMPLEXITY="LOW"
407
+ COMPLEXITY_SCORE=0
408
+
409
+ # Check session-state.json for active task info
410
+ if [ -f "docs/09-agents/session-state.json" ]; then
411
+ SESSION_STATE=$(cat docs/09-agents/session-state.json 2>/dev/null)
412
+
413
+ # Check active commands (some commands are inherently complex)
414
+ # Get most recent active command name from array
415
+ ACTIVE_CMD=$(echo "$SESSION_STATE" | jq -r '.active_commands[-1].name // empty' 2>/dev/null)
416
+ case "$ACTIVE_CMD" in
417
+ babysit|mentor|orchestrator|multi-expert|rlm)
418
+ COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 2))
419
+ ;;
420
+ research*|ideate|rpi)
421
+ COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 1))
422
+ ;;
423
+ esac
424
+
425
+ # Check current story's dependencies
426
+ CURRENT_STORY=$(echo "$SESSION_STATE" | jq -r '.current_story // empty' 2>/dev/null)
427
+ if [ -n "$CURRENT_STORY" ] && [ -f "docs/09-agents/status.json" ]; then
428
+ STATUS_JSON=$(cat docs/09-agents/status.json 2>/dev/null)
429
+
430
+ # Count dependencies
431
+ DEP_COUNT=$(echo "$STATUS_JSON" | jq -r ".stories[\"$CURRENT_STORY\"].depends_on // [] | length" 2>/dev/null)
432
+ [ -n "$DEP_COUNT" ] && [ "$DEP_COUNT" -gt 2 ] 2>/dev/null && COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 1))
433
+
434
+ # Count acceptance criteria
435
+ AC_COUNT=$(echo "$STATUS_JSON" | jq -r ".stories[\"$CURRENT_STORY\"].acceptance_criteria // [] | length" 2>/dev/null)
436
+ [ -n "$AC_COUNT" ] && [ "$AC_COUNT" -gt 5 ] 2>/dev/null && COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 1))
437
+
438
+ # Check for blockers
439
+ BLOCKER_COUNT=$(echo "$STATUS_JSON" | jq -r ".stories[\"$CURRENT_STORY\"].blockers // [] | length" 2>/dev/null)
440
+ [ -n "$BLOCKER_COUNT" ] && [ "$BLOCKER_COUNT" -gt 0 ] 2>/dev/null && COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 1))
441
+ fi
442
+
443
+ # Check ralph loop mode (more complex)
444
+ LOOP_ENABLED=$(echo "$SESSION_STATE" | jq -r '.ralph_loop.enabled // false' 2>/dev/null)
445
+ [ "$LOOP_ENABLED" = "true" ] && COMPLEXITY_SCORE=$((COMPLEXITY_SCORE + 1))
446
+ fi
447
+
448
+ # Determine complexity level
449
+ if [ "$COMPLEXITY_SCORE" -ge 4 ]; then
450
+ TASK_COMPLEXITY="HIGH"
451
+ COMPLEXITY_COLOR="$RED"
452
+ COMPLEXITY_ICON="◆" # Diamond for high complexity
453
+ elif [ "$COMPLEXITY_SCORE" -ge 2 ]; then
454
+ TASK_COMPLEXITY="MED"
455
+ COMPLEXITY_COLOR="$YELLOW"
456
+ COMPLEXITY_ICON="◇" # Outline diamond for medium
457
+ else
458
+ TASK_COMPLEXITY="LOW"
459
+ COMPLEXITY_COLOR="$GREEN"
460
+ COMPLEXITY_ICON="○" # Circle for low
461
+ fi
462
+
463
+ # Only show if not LOW (to reduce noise)
464
+ if [ "$TASK_COMPLEXITY" != "LOW" ]; then
465
+ COMPLEXITY_DISPLAY="${COMPLEXITY_COLOR}${COMPLEXITY_ICON}${TASK_COMPLEXITY}${RESET}"
466
+ fi
467
+ fi
468
+
384
469
  # ============================================================================
385
470
  # AgileFlow Status - Read from status.json
386
471
  # ============================================================================
@@ -583,6 +668,21 @@ if [ "$SHOW_SESSION" = "true" ] && [ -n "$SESSION_INFO" ]; then
583
668
  fi
584
669
  fi
585
670
 
671
+ # Session health indicator (shows warning icon + count if issues exist)
672
+ if [ "$SHOW_SESSION" = "true" ]; then
673
+ SCRIPTS_DIR="$(dirname "$0")"
674
+ HEALTH_OUTPUT=$(node "$SCRIPTS_DIR/session-manager.js" health 2>/dev/null)
675
+ if [ -n "$HEALTH_OUTPUT" ]; then
676
+ HEALTH_ISSUES=$(echo "$HEALTH_OUTPUT" | jq -r '
677
+ (.uncommitted | length) + (.stale | length) + (.orphanedRegistry | length)
678
+ ' 2>/dev/null)
679
+ if [ -n "$HEALTH_ISSUES" ] && [ "$HEALTH_ISSUES" != "0" ] && [ "$HEALTH_ISSUES" != "null" ]; then
680
+ [ -n "$OUTPUT" ] && OUTPUT="${OUTPUT} "
681
+ OUTPUT="${OUTPUT}${YELLOW}⚠${HEALTH_ISSUES}${RESET}"
682
+ fi
683
+ fi
684
+ fi
685
+
586
686
  # Model with subtle styling (if enabled and available)
587
687
  if [ "$SHOW_MODEL" = "true" ] && [ -n "$MODEL_DISPLAY" ]; then
588
688
  [ -n "$OUTPUT" ] && OUTPUT="${OUTPUT}${SEP}"
@@ -623,6 +723,12 @@ if [ "$SHOW_CONTEXT" = "true" ] && [ -n "$CTX_DISPLAY" ]; then
623
723
  fi
624
724
  fi
625
725
 
726
+ # Add task complexity indicator (if enabled and not LOW)
727
+ if [ "$SHOW_COMPLEXITY" = "true" ] && [ -n "$COMPLEXITY_DISPLAY" ]; then
728
+ [ -n "$OUTPUT" ] && OUTPUT="${OUTPUT}${SEP}"
729
+ OUTPUT="${OUTPUT}${COMPLEXITY_DISPLAY}"
730
+ fi
731
+
626
732
  # Add session time remaining (if enabled and available)
627
733
  if [ "$SHOW_SESSION_TIME" = "true" ] && [ -n "$SESSION_DISPLAY" ]; then
628
734
  [ -n "$OUTPUT" ] && OUTPUT="${OUTPUT}${SEP}"
@@ -1753,6 +1753,60 @@ async function main() {
1753
1753
  );
1754
1754
  }
1755
1755
 
1756
+ // === SESSION HEALTH WARNINGS ===
1757
+ // Check for forgotten sessions with uncommitted changes, stale sessions, orphaned entries
1758
+ try {
1759
+ const healthResult = spawnSync('node', [SESSION_MANAGER_PATH, 'health'], {
1760
+ encoding: 'utf8',
1761
+ timeout: 10000,
1762
+ });
1763
+
1764
+ if (healthResult.stdout) {
1765
+ const health = JSON.parse(healthResult.stdout);
1766
+ const hasIssues =
1767
+ health.uncommitted.length > 0 ||
1768
+ health.stale.length > 0 ||
1769
+ health.orphanedRegistry.length > 0;
1770
+
1771
+ if (hasIssues) {
1772
+ console.log('');
1773
+
1774
+ // Uncommitted changes - MOST IMPORTANT (potential data loss)
1775
+ if (health.uncommitted.length > 0) {
1776
+ console.log(
1777
+ `${c.coral}⚠️ ${health.uncommitted.length} session(s) have uncommitted changes:${c.reset}`
1778
+ );
1779
+ health.uncommitted.slice(0, 3).forEach(sess => {
1780
+ const name = sess.nickname ? `"${sess.nickname}"` : `Session ${sess.id}`;
1781
+ console.log(`${c.dim} └─ ${name}: ${sess.changeCount} file(s)${c.reset}`);
1782
+ });
1783
+ if (health.uncommitted.length > 3) {
1784
+ console.log(`${c.dim} └─ ... and ${health.uncommitted.length - 3} more${c.reset}`);
1785
+ }
1786
+ console.log(
1787
+ `${c.slate} Run: ${c.skyBlue}/agileflow:session:status${c.slate} to see details${c.reset}`
1788
+ );
1789
+ }
1790
+
1791
+ // Stale sessions (inactive 7+ days)
1792
+ if (health.stale.length > 0) {
1793
+ console.log(
1794
+ `${c.amber}📅 ${health.stale.length} session(s) inactive for 7+ days${c.reset}`
1795
+ );
1796
+ }
1797
+
1798
+ // Orphaned registry entries (path doesn't exist)
1799
+ if (health.orphanedRegistry.length > 0) {
1800
+ console.log(
1801
+ `${c.peach}🗑️ ${health.orphanedRegistry.length} session(s) have missing directories${c.reset}`
1802
+ );
1803
+ }
1804
+ }
1805
+ }
1806
+ } catch (e) {
1807
+ // Health check failed, skip silently
1808
+ }
1809
+
1756
1810
  // Story claiming: cleanup stale claims and show warnings
1757
1811
  if (storyClaiming) {
1758
1812
  try {