agileflow 2.90.7 → 2.92.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 (144) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -6
  3. package/lib/README.md +178 -0
  4. package/lib/codebase-indexer.js +818 -0
  5. package/lib/colors.js +190 -12
  6. package/lib/consent.js +232 -0
  7. package/lib/correlation.js +277 -0
  8. package/lib/error-codes.js +46 -0
  9. package/lib/errors.js +48 -6
  10. package/lib/file-cache.js +182 -0
  11. package/lib/format-error.js +156 -0
  12. package/lib/path-resolver.js +155 -7
  13. package/lib/paths.js +212 -20
  14. package/lib/placeholder-registry.js +205 -0
  15. package/lib/registry-di.js +358 -0
  16. package/lib/result-schema.js +363 -0
  17. package/lib/result.js +210 -0
  18. package/lib/session-registry.js +13 -0
  19. package/lib/session-state-machine.js +465 -0
  20. package/lib/validate-commands.js +308 -0
  21. package/lib/validate-names.js +3 -3
  22. package/lib/validate.js +116 -52
  23. package/package.json +4 -1
  24. package/scripts/af +34 -0
  25. package/scripts/agent-loop.js +63 -9
  26. package/scripts/agileflow-configure.js +2 -2
  27. package/scripts/agileflow-welcome.js +435 -23
  28. package/scripts/archive-completed-stories.sh +57 -11
  29. package/scripts/claude-tmux.sh +102 -0
  30. package/scripts/damage-control-bash.js +3 -70
  31. package/scripts/damage-control-edit.js +3 -20
  32. package/scripts/damage-control-write.js +3 -20
  33. package/scripts/dependency-check.js +310 -0
  34. package/scripts/get-env.js +11 -4
  35. package/scripts/lib/configure-detect.js +23 -1
  36. package/scripts/lib/configure-features.js +43 -2
  37. package/scripts/lib/context-formatter.js +771 -0
  38. package/scripts/lib/context-loader.js +699 -0
  39. package/scripts/lib/damage-control-utils.js +107 -0
  40. package/scripts/lib/json-utils.sh +162 -0
  41. package/scripts/lib/state-migrator.js +353 -0
  42. package/scripts/lib/story-state-machine.js +437 -0
  43. package/scripts/obtain-context.js +118 -1048
  44. package/scripts/pre-push-check.sh +46 -0
  45. package/scripts/precompact-context.sh +36 -11
  46. package/scripts/query-codebase.js +538 -0
  47. package/scripts/ralph-loop.js +5 -5
  48. package/scripts/session-manager.js +220 -42
  49. package/scripts/spawn-parallel.js +651 -0
  50. package/scripts/tui/blessed/data/watcher.js +180 -0
  51. package/scripts/tui/blessed/index.js +244 -0
  52. package/scripts/tui/blessed/panels/output.js +101 -0
  53. package/scripts/tui/blessed/panels/sessions.js +150 -0
  54. package/scripts/tui/blessed/panels/trace.js +97 -0
  55. package/scripts/tui/blessed/ui/help.js +77 -0
  56. package/scripts/tui/blessed/ui/screen.js +52 -0
  57. package/scripts/tui/blessed/ui/statusbar.js +47 -0
  58. package/scripts/tui/blessed/ui/tabbar.js +99 -0
  59. package/scripts/tui/index.js +38 -30
  60. package/scripts/validators/README.md +143 -0
  61. package/scripts/validators/component-validator.js +239 -0
  62. package/scripts/validators/json-schema-validator.js +186 -0
  63. package/scripts/validators/markdown-validator.js +152 -0
  64. package/scripts/validators/migration-validator.js +129 -0
  65. package/scripts/validators/security-validator.js +380 -0
  66. package/scripts/validators/story-format-validator.js +197 -0
  67. package/scripts/validators/test-result-validator.js +114 -0
  68. package/scripts/validators/workflow-validator.js +247 -0
  69. package/src/core/agents/accessibility.md +6 -0
  70. package/src/core/agents/adr-writer.md +6 -0
  71. package/src/core/agents/analytics.md +6 -0
  72. package/src/core/agents/api.md +6 -0
  73. package/src/core/agents/ci.md +6 -0
  74. package/src/core/agents/codebase-query.md +261 -0
  75. package/src/core/agents/compliance.md +6 -0
  76. package/src/core/agents/configuration-damage-control.md +6 -0
  77. package/src/core/agents/configuration-visual-e2e.md +6 -0
  78. package/src/core/agents/database.md +10 -0
  79. package/src/core/agents/datamigration.md +6 -0
  80. package/src/core/agents/design.md +6 -0
  81. package/src/core/agents/devops.md +6 -0
  82. package/src/core/agents/documentation.md +6 -0
  83. package/src/core/agents/epic-planner.md +6 -0
  84. package/src/core/agents/integrations.md +6 -0
  85. package/src/core/agents/mentor.md +6 -0
  86. package/src/core/agents/mobile.md +6 -0
  87. package/src/core/agents/monitoring.md +6 -0
  88. package/src/core/agents/multi-expert.md +6 -0
  89. package/src/core/agents/performance.md +6 -0
  90. package/src/core/agents/product.md +6 -0
  91. package/src/core/agents/qa.md +6 -0
  92. package/src/core/agents/readme-updater.md +6 -0
  93. package/src/core/agents/refactor.md +6 -0
  94. package/src/core/agents/research.md +6 -0
  95. package/src/core/agents/security.md +6 -0
  96. package/src/core/agents/testing.md +10 -0
  97. package/src/core/agents/ui.md +6 -0
  98. package/src/core/commands/adr.md +114 -0
  99. package/src/core/commands/agent.md +120 -0
  100. package/src/core/commands/assign.md +145 -0
  101. package/src/core/commands/audit.md +401 -0
  102. package/src/core/commands/babysit.md +32 -5
  103. package/src/core/commands/board.md +1 -0
  104. package/src/core/commands/changelog.md +118 -0
  105. package/src/core/commands/configure.md +42 -6
  106. package/src/core/commands/diagnose.md +114 -0
  107. package/src/core/commands/epic.md +205 -1
  108. package/src/core/commands/handoff.md +128 -0
  109. package/src/core/commands/help.md +76 -0
  110. package/src/core/commands/metrics.md +1 -0
  111. package/src/core/commands/pr.md +96 -0
  112. package/src/core/commands/research/analyze.md +1 -0
  113. package/src/core/commands/research/ask.md +2 -0
  114. package/src/core/commands/research/import.md +1 -0
  115. package/src/core/commands/research/list.md +2 -0
  116. package/src/core/commands/research/synthesize.md +584 -0
  117. package/src/core/commands/research/view.md +2 -0
  118. package/src/core/commands/roadmap/analyze.md +400 -0
  119. package/src/core/commands/session/new.md +113 -6
  120. package/src/core/commands/session/spawn.md +197 -0
  121. package/src/core/commands/sprint.md +22 -0
  122. package/src/core/commands/status.md +200 -1
  123. package/src/core/commands/story/list.md +9 -9
  124. package/src/core/commands/story/view.md +1 -0
  125. package/src/core/commands/story.md +143 -4
  126. package/src/core/experts/codebase-query/expertise.yaml +190 -0
  127. package/src/core/experts/codebase-query/question.md +73 -0
  128. package/src/core/experts/codebase-query/self-improve.md +105 -0
  129. package/src/core/templates/agileflow-metadata.json +55 -2
  130. package/src/core/templates/plan-template.md +125 -0
  131. package/src/core/templates/story-lifecycle.md +213 -0
  132. package/src/core/templates/story-template.md +4 -0
  133. package/src/core/templates/tdd-test-template.js +241 -0
  134. package/tools/cli/commands/setup.js +86 -0
  135. package/tools/cli/installers/core/installer.js +94 -0
  136. package/tools/cli/installers/ide/_base-ide.js +20 -11
  137. package/tools/cli/installers/ide/codex.js +29 -47
  138. package/tools/cli/lib/config-manager.js +17 -2
  139. package/tools/cli/lib/content-transformer.js +271 -0
  140. package/tools/cli/lib/error-handler.js +14 -22
  141. package/tools/cli/lib/ide-error-factory.js +421 -0
  142. package/tools/cli/lib/ide-health-monitor.js +364 -0
  143. package/tools/cli/lib/ide-registry.js +114 -1
  144. package/tools/cli/lib/ui.js +14 -25
@@ -48,6 +48,13 @@ function detectConfig(version) {
48
48
  outdated: false,
49
49
  mode: null,
50
50
  },
51
+ tmuxautospawn: {
52
+ enabled: true, // Default to enabled (opt-out feature)
53
+ valid: true,
54
+ issues: [],
55
+ version: null,
56
+ outdated: false,
57
+ },
51
58
  },
52
59
  metadata: { exists: false, version: null },
53
60
  currentVersion: version,
@@ -242,9 +249,16 @@ function detectMetadata(status, version) {
242
249
  status.features.askuserquestion.mode = meta.features.askUserQuestion.mode || 'all';
243
250
  }
244
251
 
252
+ // TmuxAutoSpawn metadata (default to true if not explicitly set)
253
+ if (meta.features?.tmuxAutoSpawn !== undefined) {
254
+ status.features.tmuxautospawn.enabled = meta.features.tmuxAutoSpawn.enabled !== false;
255
+ } else {
256
+ status.features.tmuxautospawn.enabled = true; // Default enabled
257
+ }
258
+
245
259
  // Read feature versions and check if outdated
246
260
  if (meta.features) {
247
- const featureKeyMap = { askUserQuestion: 'askuserquestion' };
261
+ const featureKeyMap = { askUserQuestion: 'askuserquestion', tmuxAutoSpawn: 'tmuxautospawn' };
248
262
  Object.entries(meta.features).forEach(([feature, data]) => {
249
263
  const statusKey = featureKeyMap[feature] || feature.toLowerCase();
250
264
  if (status.features[statusKey] && data.version) {
@@ -351,6 +365,14 @@ function printStatus(status) {
351
365
  log(` AskUserQuestion: disabled`, c.dim);
352
366
  }
353
367
 
368
+ // TmuxAutoSpawn
369
+ const tas = status.features.tmuxautospawn;
370
+ if (tas.enabled) {
371
+ log(` Tmux Auto-Spawn: enabled`, c.green);
372
+ } else {
373
+ log(` Tmux Auto-Spawn: disabled`, c.dim);
374
+ }
375
+
354
376
  // Metadata version
355
377
  if (status.metadata.exists) {
356
378
  log(`\nMetadata: v${status.metadata.version}`, c.dim);
@@ -38,6 +38,7 @@ const FEATURES = {
38
38
  patternsFile: 'damage-control-patterns.yaml',
39
39
  },
40
40
  askuserquestion: { metadataOnly: true },
41
+ tmuxautospawn: { metadataOnly: true },
41
42
  };
42
43
 
43
44
  const PROFILES = {
@@ -51,19 +52,20 @@ const PROFILES = {
51
52
  'ralphloop',
52
53
  'selfimprove',
53
54
  'askuserquestion',
55
+ 'tmuxautospawn',
54
56
  ],
55
57
  archivalDays: 30,
56
58
  },
57
59
  basic: {
58
60
  description: 'Essential hooks + archival (SessionStart + PreCompact + Archival)',
59
- enable: ['sessionstart', 'precompact', 'archival', 'askuserquestion'],
61
+ enable: ['sessionstart', 'precompact', 'archival', 'askuserquestion', 'tmuxautospawn'],
60
62
  disable: ['statusline', 'ralphloop', 'selfimprove'],
61
63
  archivalDays: 30,
62
64
  },
63
65
  minimal: {
64
66
  description: 'SessionStart + archival only',
65
67
  enable: ['sessionstart', 'archival'],
66
- disable: ['precompact', 'statusline', 'ralphloop', 'selfimprove', 'askuserquestion'],
68
+ disable: ['precompact', 'statusline', 'ralphloop', 'selfimprove', 'askuserquestion', 'tmuxautospawn'],
67
69
  archivalDays: 30,
68
70
  },
69
71
  none: {
@@ -76,6 +78,7 @@ const PROFILES = {
76
78
  'ralphloop',
77
79
  'selfimprove',
78
80
  'askuserquestion',
81
+ 'tmuxautospawn',
79
82
  ],
80
83
  },
81
84
  };
@@ -214,6 +217,25 @@ function enableFeature(feature, options = {}, version) {
214
217
  return true;
215
218
  }
216
219
 
220
+ // Handle tmuxautospawn (metadata only)
221
+ if (feature === 'tmuxautospawn') {
222
+ updateMetadata(
223
+ {
224
+ features: {
225
+ tmuxAutoSpawn: {
226
+ enabled: true,
227
+ version,
228
+ at: new Date().toISOString(),
229
+ },
230
+ },
231
+ },
232
+ version
233
+ );
234
+ success('Tmux auto-spawn enabled');
235
+ info('Running "af" or "agileflow" will auto-start Claude in tmux session');
236
+ return true;
237
+ }
238
+
217
239
  // Handle damage control
218
240
  if (feature === 'damagecontrol') {
219
241
  return enableDamageControl(settings, options, version);
@@ -499,6 +521,25 @@ function disableFeature(feature, version) {
499
521
  return true;
500
522
  }
501
523
 
524
+ // Disable tmuxautospawn
525
+ if (feature === 'tmuxautospawn') {
526
+ updateMetadata(
527
+ {
528
+ features: {
529
+ tmuxAutoSpawn: {
530
+ enabled: false,
531
+ version,
532
+ at: new Date().toISOString(),
533
+ },
534
+ },
535
+ },
536
+ version
537
+ );
538
+ success('Tmux auto-spawn disabled');
539
+ info('Running "af" or "agileflow" will start Claude directly without tmux');
540
+ return true;
541
+ }
542
+
502
543
  // Disable damage control
503
544
  if (feature === 'damagecontrol') {
504
545
  if (settings.hooks?.PreToolUse && Array.isArray(settings.hooks.PreToolUse)) {