wogiflow 2.20.1 → 2.22.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 (255) hide show
  1. package/.claude/commands/wogi-finalize.md +83 -0
  2. package/.claude/rules/_internal/self-maintenance.md +1 -1
  3. package/.claude/settings.json +1 -1
  4. package/lib/commands/login.js +1 -1
  5. package/lib/installer.js +5 -5
  6. package/lib/release-channel.js +1 -1
  7. package/lib/skill-registry.js +3 -3
  8. package/lib/workspace-events.js +1 -1
  9. package/lib/workspace-gates.js +2 -2
  10. package/lib/workspace-intelligence.js +1 -1
  11. package/lib/workspace-routing.js +1 -1
  12. package/lib/workspace.js +16 -17
  13. package/package.json +2 -2
  14. package/scripts/base-workflow-step.js +2 -2
  15. package/scripts/flow-adaptive-learning.js +6 -6
  16. package/scripts/flow-api-index.js +2 -2
  17. package/scripts/flow-architect-pass.js +1 -1
  18. package/scripts/flow-ask.js +1 -1
  19. package/scripts/flow-assumption-detector.js +1 -1
  20. package/scripts/flow-audit-gates.js +38 -12
  21. package/scripts/flow-audit.js +4 -4
  22. package/scripts/flow-auto-context.js +3 -3
  23. package/scripts/flow-background.js +1 -1
  24. package/scripts/flow-best-of-n.js +7 -7
  25. package/scripts/flow-bridge.js +3 -3
  26. package/scripts/flow-bug.js +2 -2
  27. package/scripts/flow-bulk-loop.js +7 -7
  28. package/scripts/flow-cascade-completion.js +2 -2
  29. package/scripts/flow-cascade.js +1 -1
  30. package/scripts/flow-checkpoint.js +2 -2
  31. package/scripts/flow-clarifying-questions.js +2 -2
  32. package/scripts/flow-cli.js +2 -2
  33. package/scripts/flow-code-intelligence.js +4 -4
  34. package/scripts/flow-community-sync.js +6 -6
  35. package/scripts/flow-community.js +1 -1
  36. package/scripts/flow-completion-truth-gate.js +161 -5
  37. package/scripts/flow-complexity.js +1 -1
  38. package/scripts/flow-config-defaults.js +16 -4
  39. package/scripts/flow-config-interactive.js +2 -2
  40. package/scripts/flow-config-loader.js +1 -1
  41. package/scripts/flow-config-migrate.js +5 -6
  42. package/scripts/flow-consistency-check.js +5 -5
  43. package/scripts/flow-context-compact/expander.js +1 -1
  44. package/scripts/flow-context-compact/index.js +2 -2
  45. package/scripts/flow-context-compact/section-extractor.js +3 -3
  46. package/scripts/flow-context-compact/summary-tree.js +1 -1
  47. package/scripts/flow-context-estimator.js +1 -1
  48. package/scripts/flow-context-gatherer.js +6 -6
  49. package/scripts/flow-context-generator.js +6 -6
  50. package/scripts/flow-context-init.js +2 -2
  51. package/scripts/flow-context-manager.js +1 -1
  52. package/scripts/flow-context-manifest.js +1 -1
  53. package/scripts/flow-context-monitor.js +5 -5
  54. package/scripts/flow-context-orchestrator.js +2 -2
  55. package/scripts/flow-context-scoring.js +4 -4
  56. package/scripts/flow-contract-scan.js +1 -1
  57. package/scripts/flow-correct.js +3 -3
  58. package/scripts/flow-damage-control.js +2 -2
  59. package/scripts/flow-deploy-gate.js +2 -2
  60. package/scripts/flow-deploy-history.js +1 -1
  61. package/scripts/flow-diff.js +3 -3
  62. package/scripts/flow-done-gates.js +1 -1
  63. package/scripts/flow-done.js +7 -7
  64. package/scripts/flow-durable-session.js +1 -1
  65. package/scripts/flow-entropy-monitor.js +3 -3
  66. package/scripts/flow-epics.js +5 -5
  67. package/scripts/flow-error-recovery.js +4 -4
  68. package/scripts/flow-eval-judge.js +5 -5
  69. package/scripts/flow-eval.js +7 -7
  70. package/scripts/flow-export-scanner.js +5 -5
  71. package/scripts/flow-extraction-review.js +1 -1
  72. package/scripts/flow-failure-learning.js +9 -9
  73. package/scripts/flow-feature.js +5 -5
  74. package/scripts/flow-figma-confirm.js +1 -1
  75. package/scripts/flow-figma-extract.js +2 -2
  76. package/scripts/flow-figma-index.js +2 -2
  77. package/scripts/flow-figma-match.js +1 -1
  78. package/scripts/flow-figma-mcp-server.js +3 -3
  79. package/scripts/flow-figma-orchestrator.js +1 -1
  80. package/scripts/flow-figma-registry.js +2 -2
  81. package/scripts/flow-function-index.js +2 -2
  82. package/scripts/flow-gate-confidence.js +2 -2
  83. package/scripts/flow-gate-telemetry.js +1 -1
  84. package/scripts/flow-gitignore.js +1 -1
  85. package/scripts/flow-guided-edit.js +3 -3
  86. package/scripts/flow-health.js +95 -8
  87. package/scripts/flow-hooks.js +3 -3
  88. package/scripts/flow-hybrid-detect.js +2 -2
  89. package/scripts/flow-hybrid-interactive.js +1 -1
  90. package/scripts/flow-hybrid-test.js +1 -1
  91. package/scripts/flow-hypothesis-generator.js +4 -4
  92. package/scripts/flow-instruction-richness.js +11 -11
  93. package/scripts/flow-intent-bootstrap.js +1 -1
  94. package/scripts/flow-intent-framing.js +1 -1
  95. package/scripts/flow-item-link.js +2 -2
  96. package/scripts/flow-knowledge-router.js +7 -7
  97. package/scripts/flow-knowledge-sync.js +3 -3
  98. package/scripts/flow-learning-orchestrator.js +1 -1
  99. package/scripts/flow-links.js +2 -2
  100. package/scripts/flow-log-manager.js +2 -2
  101. package/scripts/flow-logic-adversary.js +5 -4
  102. package/scripts/flow-long-input-chunking.js +1 -1
  103. package/scripts/flow-long-input-cli.js +3 -3
  104. package/scripts/flow-long-input.js +18 -18
  105. package/scripts/flow-loop-retry-learning.js +2 -2
  106. package/scripts/flow-lsp.js +4 -4
  107. package/scripts/flow-mcp-docs.js +1 -1
  108. package/scripts/flow-memory-blocks.js +5 -5
  109. package/scripts/flow-memory-compactor.js +3 -3
  110. package/scripts/flow-memory-db.js +4 -4
  111. package/scripts/flow-memory-sync.js +3 -3
  112. package/scripts/flow-metrics.js +2 -2
  113. package/scripts/flow-migrate-igr.js +2 -2
  114. package/scripts/flow-migrate.js +2 -2
  115. package/scripts/flow-model-adapter.js +4 -4
  116. package/scripts/flow-model-caller.js +8 -8
  117. package/scripts/flow-model-config.js +5 -5
  118. package/scripts/flow-model-profile.js +7 -7
  119. package/scripts/flow-model-router.js +5 -5
  120. package/scripts/flow-model-types.js +3 -3
  121. package/scripts/flow-models.js +8 -8
  122. package/scripts/flow-morning.js +1 -1
  123. package/scripts/flow-multi-approach.js +1 -1
  124. package/scripts/flow-orchestrate-context.js +2 -2
  125. package/scripts/flow-orchestrate-llm.js +4 -4
  126. package/scripts/flow-orchestrate-rollback.js +1 -1
  127. package/scripts/flow-orchestrate-state.js +6 -6
  128. package/scripts/flow-orchestrate-templates.js +1 -1
  129. package/scripts/flow-orchestrate-validation.js +2 -2
  130. package/scripts/flow-orchestrate-validator.js +1 -1
  131. package/scripts/flow-orchestrate.js +25 -25
  132. package/scripts/flow-parallel.js +1 -1
  133. package/scripts/flow-pattern-enforcer.js +7 -7
  134. package/scripts/flow-pattern-extractor.js +3 -3
  135. package/scripts/flow-peer-review.js +8 -8
  136. package/scripts/flow-pending.js +1 -1
  137. package/scripts/flow-permissions.js +1 -1
  138. package/scripts/flow-phased-task.js +1 -1
  139. package/scripts/flow-plan.js +1 -1
  140. package/scripts/flow-prd-manager.js +2 -2
  141. package/scripts/flow-product-scanner.js +2 -2
  142. package/scripts/flow-progress-tracker.js +2 -2
  143. package/scripts/flow-progress.js +1 -1
  144. package/scripts/flow-project-analyzer.js +3 -3
  145. package/scripts/flow-prompt-capture.js +2 -2
  146. package/scripts/flow-prompt-composer.js +3 -3
  147. package/scripts/flow-prompt-template.js +4 -4
  148. package/scripts/flow-providers.js +31 -23
  149. package/scripts/flow-queue.js +1 -1
  150. package/scripts/flow-registry-manager.js +4 -4
  151. package/scripts/flow-regression.js +1 -1
  152. package/scripts/flow-response-parser.js +1 -1
  153. package/scripts/flow-resume.js +1 -1
  154. package/scripts/flow-review-passes/index.js +2 -2
  155. package/scripts/flow-review-passes/integration.js +3 -3
  156. package/scripts/flow-review-passes/logic.js +3 -3
  157. package/scripts/flow-review-passes/security.js +2 -2
  158. package/scripts/flow-review-passes/structure.js +1 -1
  159. package/scripts/flow-review.js +11 -11
  160. package/scripts/flow-revision-tracker.js +2 -2
  161. package/scripts/flow-roadmap.js +2 -2
  162. package/scripts/flow-run-trace.js +1 -1
  163. package/scripts/flow-safety.js +3 -3
  164. package/scripts/flow-scanner-base.js +1 -1
  165. package/scripts/flow-scenario-engine.js +7 -7
  166. package/scripts/flow-schema-drift.js +4 -3
  167. package/scripts/flow-section-index.js +2 -2
  168. package/scripts/flow-section-resolver.js +4 -4
  169. package/scripts/flow-semantic-match.js +3 -3
  170. package/scripts/flow-session-end.js +56 -0
  171. package/scripts/flow-session-learning.js +2 -2
  172. package/scripts/flow-setup-hooks.js +1 -1
  173. package/scripts/flow-skill-create.js +3 -3
  174. package/scripts/flow-skill-freshness.js +2 -2
  175. package/scripts/flow-skill-generator.js +6 -6
  176. package/scripts/flow-skill-learn.js +7 -7
  177. package/scripts/flow-skill-matcher.js +2 -2
  178. package/scripts/flow-solution-optimizer.js +1 -1
  179. package/scripts/flow-spec-generator.js +5 -5
  180. package/scripts/flow-spec-verifier.js +2 -2
  181. package/scripts/flow-stack-wizard.js +6 -6
  182. package/scripts/flow-standards-checker.js +8 -8
  183. package/scripts/flow-standards-gate.js +4 -4
  184. package/scripts/flow-standards-learner.js +2 -2
  185. package/scripts/flow-start.js +9 -9
  186. package/scripts/flow-stats-collector.js +2 -2
  187. package/scripts/flow-status.js +1 -1
  188. package/scripts/flow-step-changelog.js +3 -3
  189. package/scripts/flow-step-complexity.js +1 -1
  190. package/scripts/flow-step-coverage.js +3 -3
  191. package/scripts/flow-step-knowledge.js +2 -2
  192. package/scripts/flow-step-pr-tests.js +2 -2
  193. package/scripts/flow-step-regression.js +3 -3
  194. package/scripts/flow-step-review.js +5 -5
  195. package/scripts/flow-story.js +2 -2
  196. package/scripts/flow-strict-adherence.js +2 -2
  197. package/scripts/flow-structure-sensor.js +283 -0
  198. package/scripts/flow-sync-anonymizer.js +3 -3
  199. package/scripts/flow-task-checkpoint.js +2 -2
  200. package/scripts/flow-task-classifier.js +2 -2
  201. package/scripts/flow-task-completion-summary.js +1 -1
  202. package/scripts/flow-task-enforcer.js +5 -5
  203. package/scripts/flow-tech-debt.js +3 -3
  204. package/scripts/flow-template-extractor.js +3 -3
  205. package/scripts/flow-templates.js +1 -1
  206. package/scripts/flow-test-api.js +12 -12
  207. package/scripts/flow-test-discovery.js +9 -9
  208. package/scripts/flow-test-generate.js +5 -5
  209. package/scripts/flow-test-integrity.js +3 -3
  210. package/scripts/flow-test-ui.js +8 -8
  211. package/scripts/flow-testing-deps.js +4 -4
  212. package/scripts/flow-tiered-learning.js +3 -3
  213. package/scripts/flow-todowrite-sync.js +1 -1
  214. package/scripts/flow-trap-zone.js +1 -1
  215. package/scripts/flow-verification-profile.js +9 -9
  216. package/scripts/flow-verify.js +2 -2
  217. package/scripts/flow-version-check.js +2 -2
  218. package/scripts/flow-webmcp-generator.js +3 -3
  219. package/scripts/flow-wiring-verifier.js +13 -13
  220. package/scripts/flow-worker-question-classifier.js +256 -0
  221. package/scripts/flow-workflow-steps.js +3 -3
  222. package/scripts/flow-workflow.js +1 -1
  223. package/scripts/flow-worktree.js +1 -1
  224. package/scripts/hooks/adapters/base-adapter.js +2 -2
  225. package/scripts/hooks/core/commit-log-gate.js +2 -2
  226. package/scripts/hooks/core/component-check.js +3 -3
  227. package/scripts/hooks/core/config-change.js +1 -1
  228. package/scripts/hooks/core/deploy-gate.js +2 -1
  229. package/scripts/hooks/core/git-safety-gate.js +1 -1
  230. package/scripts/hooks/core/instructions-loaded.js +1 -1
  231. package/scripts/hooks/core/loop-check.js +1 -1
  232. package/scripts/hooks/core/manager-boundary-gate.js +3 -2
  233. package/scripts/hooks/core/observation-capture.js +6 -6
  234. package/scripts/hooks/core/phase-gate.js +4 -4
  235. package/scripts/hooks/core/pre-compact.js +1 -1
  236. package/scripts/hooks/core/pre-tool-orchestrator.js +1 -1
  237. package/scripts/hooks/core/routing-gate.js +2 -84
  238. package/scripts/hooks/core/session-context.js +1 -1
  239. package/scripts/hooks/core/session-end.js +3 -3
  240. package/scripts/hooks/core/session-history.js +1 -1
  241. package/scripts/hooks/core/setup-handler.js +1 -1
  242. package/scripts/hooks/core/task-boundary-reset.js +2 -4
  243. package/scripts/hooks/core/task-completed.js +13 -7
  244. package/scripts/hooks/core/task-created.js +1 -1
  245. package/scripts/hooks/core/worktree-lifecycle.js +1 -1
  246. package/scripts/hooks/entry/claude-code/permission-denied.js +4 -2
  247. package/scripts/hooks/entry/claude-code/stop.js +60 -0
  248. package/scripts/hooks/entry/claude-code/user-prompt-submit.js +1 -1
  249. package/scripts/hooks/git/post-commit.js +1 -1
  250. package/scripts/postinstall.js +7 -7
  251. package/scripts/preuninstall.js +5 -5
  252. package/scripts/registries/component-registry.js +2 -2
  253. package/scripts/registries/contract-scanner.js +11 -11
  254. package/scripts/registries/schema-registry.js +5 -5
  255. package/scripts/registries/service-registry.js +9 -9
@@ -13,7 +13,7 @@
13
13
  * 4. Respect token budget constraints
14
14
  */
15
15
 
16
- const path = require('node:path');
16
+ const _path = require('node:path');
17
17
  const { getConfig } = require('../flow-utils');
18
18
  const { loadTree, estimateTokens, calculateTreeTokens } = require('./summary-tree');
19
19
 
@@ -88,7 +88,7 @@ function scoreNodeRelevance(node, query, queryKeywords) {
88
88
  }
89
89
 
90
90
  // Type-based bonus for certain queries
91
- const queryLower = query.toLowerCase();
91
+ const _queryLower = query.toLowerCase();
92
92
 
93
93
  if (node.type === 'task' && /task|progress|status|work/i.test(query)) {
94
94
  score += 0.1;
@@ -125,7 +125,7 @@ function selectNodes(tree, options = {}) {
125
125
  } = options;
126
126
 
127
127
  const config = getConfig();
128
- const compactionConfig = config.contextManagement?.compaction || config.context?.compaction || {};
128
+ const _compactionConfig = config.contextManagement?.compaction || config.context?.compaction || {};
129
129
 
130
130
  const queryKeywords = extractKeywords(query);
131
131
  const selected = [];
@@ -61,7 +61,7 @@ const DEFAULT_COMPACTION_CONFIG = {
61
61
  // ============================================================
62
62
 
63
63
  // Token estimation constant (rough approximation for English text)
64
- const CHARS_PER_TOKEN = 4;
64
+ const _CHARS_PER_TOKEN = 4;
65
65
 
66
66
  /**
67
67
  * Generate a unique node ID
@@ -71,7 +71,7 @@ function getSmartCompactionConfig() {
71
71
  }
72
72
  }
73
73
  }
74
- } catch (err) {
74
+ } catch (_err) {
75
75
  // Non-blocking — fall back to default thresholds
76
76
  }
77
77
 
@@ -23,17 +23,17 @@
23
23
  * });
24
24
  */
25
25
 
26
- const fs = require('node:fs');
27
- const path = require('node:path');
26
+ const _fs = require('node:fs');
27
+ const _path = require('node:path');
28
28
 
29
29
  const {
30
- PATHS,
30
+ PATHS: _PATHS,
31
31
  getConfig,
32
- fileExists,
33
- readFile,
32
+ fileExists: _fileExists,
33
+ readFile: _readFile,
34
34
  estimateTokens,
35
35
  info,
36
- warn,
36
+ warn: _warn,
37
37
  success
38
38
  } = require('./flow-utils');
39
39
 
@@ -286,7 +286,7 @@ function scanDirectory(dir, extensions, excludePatterns) {
286
286
  }
287
287
  }
288
288
  }
289
- } catch (err) {
289
+ } catch (_err) {
290
290
  // Ignore permission errors
291
291
  }
292
292
 
@@ -347,7 +347,7 @@ function extractExportsScript(files) {
347
347
  if (exports.namedExports.length > 0 || exports.defaultExport || exports.typeExports.length > 0) {
348
348
  result.files.push(exports);
349
349
  }
350
- } catch (err) {
350
+ } catch (_err) {
351
351
  // Skip files we can't read
352
352
  }
353
353
  }
@@ -450,7 +450,7 @@ async function runContextTask(taskName, input, options = {}) {
450
450
  }
451
451
  return parsed;
452
452
  }
453
- } catch (err) {
453
+ } catch (_err) {
454
454
  // Return raw response if not JSON
455
455
  }
456
456
 
@@ -468,7 +468,7 @@ async function runContextTask(taskName, input, options = {}) {
468
468
  * @param {Object} options - Options
469
469
  * @returns {*} - Fallback result
470
470
  */
471
- function runScriptFallback(taskName, input, options = {}) {
471
+ function runScriptFallback(taskName, input, _options = {}) {
472
472
  switch (taskName) {
473
473
  case 'extractExports':
474
474
  return extractExportsScript(input);
@@ -699,7 +699,7 @@ function saveContextCache(context) {
699
699
 
700
700
  try {
701
701
  writeFile(CONTEXT_CACHE_PATH, JSON.stringify(cache, null, 2));
702
- } catch (err) {
702
+ } catch (_err) {
703
703
  // Not critical
704
704
  }
705
705
  }
@@ -727,7 +727,7 @@ function clearContextCache() {
727
727
  try {
728
728
  fs.unlinkSync(CONTEXT_CACHE_PATH);
729
729
  return true;
730
- } catch (err) {
730
+ } catch (_err) {
731
731
  return false;
732
732
  }
733
733
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  const fs = require('node:fs');
21
21
  const path = require('node:path');
22
- const { getProjectRoot, colors: c, readJson, PATHS } = require('./flow-utils');
22
+ const { colors: c, readJson, PATHS } = require('./flow-utils');
23
23
  const { success: printSuccess } = require('./flow-output');
24
24
  const { detectPackageManager } = require('./flow-script-resolver');
25
25
 
@@ -188,7 +188,7 @@ function detectStack() {
188
188
  stack.dependencies[dep] = deps[dep].replace(/[\^~]/g, '');
189
189
  }
190
190
  }
191
- } catch (err) {
191
+ } catch (_err) {
192
192
  console.error(`${c.yellow}Warning: Could not parse package.json${c.reset}`);
193
193
  }
194
194
  }
@@ -47,7 +47,7 @@ async function gatherContext(taskId, options = {}) {
47
47
  if (taskId) {
48
48
  try {
49
49
  return await orchestrator.getContextForTaskId(taskId);
50
- } catch (err) {
50
+ } catch (_err) {
51
51
  // Fall through to auto-context
52
52
  }
53
53
  }
@@ -20,7 +20,7 @@
20
20
 
21
21
  const path = require('node:path');
22
22
  const fs = require('node:fs');
23
- const { PATHS, safeJsonParse } = require('./flow-utils');
23
+ const { PATHS } = require('./flow-utils');
24
24
 
25
25
  /** Maximum chars per summary line in the manifest */
26
26
  const MAX_SUMMARY_LEN = 120;
@@ -15,12 +15,12 @@ const {
15
15
  getConfig,
16
16
  PATHS,
17
17
  STATE_DIR,
18
- PROJECT_ROOT,
19
- colors,
18
+ PROJECT_ROOT: _PROJECT_ROOT,
19
+ colors: _colors,
20
20
  color,
21
- warn,
21
+ warn: _warn,
22
22
  success,
23
- readFile,
23
+ readFile: _readFile,
24
24
  fileExists,
25
25
  printHeader,
26
26
  safeJsonParse,
@@ -195,7 +195,7 @@ function writeNativeContextInfo(usedPercentage, remainingPercentage) {
195
195
  };
196
196
  fs.writeFileSync(NATIVE_CONTEXT_FILE, JSON.stringify(data, null, 2));
197
197
  return true;
198
- } catch (err) {
198
+ } catch (_err) {
199
199
  return false;
200
200
  }
201
201
  }
@@ -25,7 +25,7 @@ const {
25
25
  readFile,
26
26
  parseFlags,
27
27
  outputJson,
28
- info,
28
+ info: _info,
29
29
  warn,
30
30
  safeJsonParse,
31
31
  estimateTokens
@@ -185,7 +185,7 @@ function getProductOverview() {
185
185
  tagline: taglineMatch ? taglineMatch[1].trim() : null,
186
186
  type: typeMatch ? typeMatch[1].trim() : null
187
187
  };
188
- } catch (err) {
188
+ } catch (_err) {
189
189
  return null;
190
190
  }
191
191
  }
@@ -28,9 +28,9 @@ const PROJECT_ROOT = path.resolve(__dirname, '..');
28
28
  const {
29
29
  getConfig,
30
30
  parseFlags,
31
- info,
32
- success,
33
- warn,
31
+ info: _info,
32
+ success: _success,
33
+ warn: _warn,
34
34
  error,
35
35
  color,
36
36
  outputJson,
@@ -589,7 +589,7 @@ function analyzeFile(filePath) {
589
589
  const tokens = estimateTokens(content, { useLineEstimate: true });
590
590
 
591
591
  // Determine file type
592
- const ext = path.extname(filePath);
592
+ const _ext = path.extname(filePath);
593
593
  let fileType = 'full_files';
594
594
 
595
595
  if (/\.(d\.ts|types\.ts)$/.test(filePath)) {
@@ -16,7 +16,7 @@
16
16
 
17
17
  const fs = require('node:fs');
18
18
  const path = require('node:path');
19
- const { getProjectRoot, getConfig, PATHS } = require('./flow-utils');
19
+ const { getConfig, PATHS } = require('./flow-utils');
20
20
 
21
21
  const DEFAULT_OUTPUT = path.join(PATHS.state, 'contract-surface.json');
22
22
 
@@ -19,7 +19,7 @@ const readline = require('node:readline/promises');
19
19
  const {
20
20
  PATHS,
21
21
  PROJECT_ROOT,
22
- fileExists,
22
+ fileExists: _fileExists,
23
23
  dirExists,
24
24
  readFile,
25
25
  writeFile,
@@ -42,7 +42,7 @@ function getCorrectionsDir() {
42
42
  if (detailPath) {
43
43
  return path.isAbsolute(detailPath) ? detailPath : path.join(PROJECT_ROOT, detailPath);
44
44
  }
45
- } catch (err) {
45
+ } catch (_err) {
46
46
  // Fall back to default if config can't be read
47
47
  }
48
48
  return PATHS.corrections;
@@ -169,7 +169,7 @@ _Generated by \`flow correct\`_
169
169
  /**
170
170
  * Update feedback-patterns.md with the correction
171
171
  */
172
- function updateFeedbackPatterns(brief, taskId, skillName) {
172
+ function updateFeedbackPatterns(brief, _taskId, skillName) {
173
173
  const date = getTodayDate();
174
174
 
175
175
  let content = readFile(PATHS.feedbackPatterns, '');
@@ -23,7 +23,7 @@
23
23
 
24
24
  const fs = require('node:fs');
25
25
  const path = require('node:path');
26
- const { getProjectRoot, colors, getConfig, PATHS, getTodayDate } = require('./flow-utils');
26
+ const { colors, getConfig, PATHS } = require('./flow-utils');
27
27
 
28
28
  const PATTERNS_FILE = path.join(PATHS.workflow, 'damage-control.yaml');
29
29
 
@@ -853,7 +853,7 @@ Configuration (config.json):
853
853
  if (contextStr) {
854
854
  try {
855
855
  context = JSON.parse(contextStr);
856
- } catch (err) {
856
+ } catch (_err) {
857
857
  log('red', 'Error: Context must be valid JSON');
858
858
  process.exit(1);
859
859
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  const fs = require('node:fs');
18
18
  const path = require('node:path');
19
- const { PATHS, getConfig, safeJsonParse, writeJson } = require('./flow-utils');
19
+ const { PATHS, getConfig, safeJsonParse } = require('./flow-utils');
20
20
  const {
21
21
  isDeployGateEnabled,
22
22
  getDeployGateConfig,
@@ -24,7 +24,7 @@ const {
24
24
  getRouteInventory,
25
25
  addRoute,
26
26
  getLastGoodDeploy,
27
- DEPLOY_ROUTES_PATH,
27
+ DEPLOY_ROUTES_PATH: _DEPLOY_ROUTES_PATH,
28
28
  DEPLOY_HISTORY_PATH
29
29
  } = require('./hooks/core/deploy-gate');
30
30
 
@@ -98,7 +98,7 @@ function detectProductionCrash(description, config) {
98
98
  * @param {boolean} [options.hasDeployHistory] - Whether deploy history exists
99
99
  * @returns {string} Formatted recommendation message
100
100
  */
101
- function generateRevertRecommendation(options) {
101
+ function generateRevertRecommendation(_options) {
102
102
  const lastDeploy = getLastGoodDeploy();
103
103
  const revertConfig = getRevertFirstConfig();
104
104
 
@@ -18,7 +18,7 @@
18
18
  const fs = require('node:fs');
19
19
  const path = require('node:path');
20
20
  const readline = require('node:readline/promises');
21
- const { colors: c, getProjectRoot, readJson, PATHS } = require('./flow-utils');
21
+ const { colors: c, getProjectRoot, readJson } = require('./flow-utils');
22
22
  const { success: printSuccess, warn: printWarn, error: printError } = require('./flow-output');
23
23
 
24
24
  /**
@@ -219,7 +219,7 @@ function generateDiffsForOperations(operations) {
219
219
  * Format diffs for terminal display
220
220
  */
221
221
  function formatDiffsForDisplay(diffs, options = {}) {
222
- const showLineNumbers = options.showLineNumbers !== false;
222
+ const _showLineNumbers = options.showLineNumbers !== false;
223
223
  let output = '';
224
224
 
225
225
  for (const d of diffs) {
@@ -456,7 +456,7 @@ function applyDiffs(operations) {
456
456
  /**
457
457
  * Interactive confirmation prompt
458
458
  */
459
- async function confirmApply(diffs) {
459
+ async function confirmApply(_diffs) {
460
460
  const rl = readline.createInterface({
461
461
  input: process.stdin,
462
462
  output: process.stdout
@@ -857,7 +857,7 @@ function unknownGate(ctx, gateName) {
857
857
  * This is a single gate entry in GATE_REGISTRY that runs all applicable
858
858
  * workspace sub-gates based on task type.
859
859
  */
860
- function workspaceGate(ctx, gateName) {
860
+ function workspaceGate(ctx, _gateName) {
861
861
  const wsGates = getWorkspaceGates();
862
862
  if (!wsGates) {
863
863
  return { passed: true, skipped: true };
@@ -66,15 +66,15 @@ const getTodoWriteStats = todoWriteSync?.getTodoWriteStats || (() => null);
66
66
  const clearTodoWriteState = todoWriteSync?.clearTodoWriteState || (() => {});
67
67
 
68
68
  // v3.0 epic progress propagation
69
- const { updateEpicProgress, listEpics, getEpic } = require('./flow-epics');
69
+ const { updateEpicProgress, listEpics } = require('./flow-epics');
70
70
 
71
71
  // v3.2 cascade completion (extracted to flow-cascade-completion.js)
72
72
  const {
73
- findParentFeature, findParentEpic, findParentPlan,
74
- allStoriesComplete, allFeaturesComplete, allEpicsComplete,
75
- markFeatureComplete, markEpicComplete, markPlanComplete,
76
- archiveByType, archiveCompletedParent, cascadeCompletion,
77
- CASCADE_MAX_DEPTH, VALID_CASCADE_TYPES
73
+ findParentFeature: _findParentFeature, findParentEpic: _findParentEpic, findParentPlan: _findParentPlan,
74
+ allStoriesComplete: _allStoriesComplete, allFeaturesComplete: _allFeaturesComplete, allEpicsComplete: _allEpicsComplete,
75
+ markFeatureComplete: _markFeatureComplete, markEpicComplete: _markEpicComplete, markPlanComplete: _markPlanComplete,
76
+ archiveByType: _archiveByType, archiveCompletedParent: _archiveCompletedParent, cascadeCompletion,
77
+ CASCADE_MAX_DEPTH: _CASCADE_MAX_DEPTH, VALID_CASCADE_TYPES
78
78
  } = require('./flow-cascade-completion');
79
79
 
80
80
  // v3.1 spec verification gate
@@ -625,7 +625,7 @@ async function main() {
625
625
  console.log(`Criteria: ${stats.completed}/${stats.total} completed (${completionPercent}%)`);
626
626
 
627
627
  if (todoStats.criteria && todoStats.criteria.length > 0) {
628
- todoStats.criteria.forEach((c, i) => {
628
+ todoStats.criteria.forEach((c, _i) => {
629
629
  const icon = c.status === 'completed' ? color('green', '●') :
630
630
  c.status === 'in_progress' ? color('yellow', '◐') : color('dim', '○');
631
631
  const statusColor = c.status === 'completed' ? 'green' :
@@ -112,7 +112,7 @@ function cleanupLegacyHybridSession() {
112
112
  * @returns {Object} Created session
113
113
  */
114
114
  function createDurableSession(taskId, taskType, steps = []) {
115
- const sessionPath = getSessionPath();
115
+ const _sessionPath = getSessionPath();
116
116
 
117
117
  // Check if session already exists for this task
118
118
  const existing = loadDurableSession();
@@ -14,12 +14,12 @@
14
14
  * Part of v1.8.0 - Automatic Memory Management
15
15
  */
16
16
 
17
- const fs = require('node:fs');
18
- const path = require('node:path');
17
+ const _fs = require('node:fs');
18
+ const _path = require('node:path');
19
19
  const memoryDb = require('./flow-memory-db');
20
20
  const { getConfig } = require('./flow-config-loader');
21
21
  const { color } = require('./flow-output');
22
- const { getProjectRoot, PATHS } = require('./flow-paths');
22
+ const { } = require('./flow-paths');
23
23
 
24
24
  // ============================================================
25
25
  // Configuration
@@ -21,14 +21,14 @@ const {
21
21
  readJson,
22
22
  writeJson,
23
23
  ensureDir,
24
- color,
24
+ color: _color,
25
25
  success,
26
- warn,
26
+ warn: _warn,
27
27
  error,
28
28
  info,
29
29
  findAllWithParent,
30
- normalizeTask,
31
- generateEpicId,
30
+ normalizeTask: _normalizeTask,
31
+ generateEpicId: _generateEpicId,
32
32
  getReadyData,
33
33
  } = require('./flow-utils');
34
34
 
@@ -443,7 +443,7 @@ function deleteEpic(epicId) {
443
443
  ensureDir(archiveDir);
444
444
  fs.renameSync(mdPath, path.join(archiveDir, `${epicId}.md`));
445
445
  archived = true;
446
- } catch (err) {
446
+ } catch (_err) {
447
447
  // Fallback: delete if archive fails
448
448
  try { fs.unlinkSync(mdPath); } catch (_err) { /* ignore */ }
449
449
  }
@@ -23,7 +23,7 @@ const {
23
23
  readJson,
24
24
  writeJson,
25
25
  ensureDir,
26
- color,
26
+ color: _color,
27
27
  success,
28
28
  warn,
29
29
  error,
@@ -34,7 +34,7 @@ const {
34
34
  let adaptiveLearning;
35
35
  try {
36
36
  adaptiveLearning = require('./flow-adaptive-learning');
37
- } catch (err) {
37
+ } catch (_err) {
38
38
  // Module not available - adaptive learning is optional
39
39
  adaptiveLearning = null;
40
40
  }
@@ -421,12 +421,12 @@ function recordFixAttempt(level, strategy, newOutput) {
421
421
  * @param {Object} state - Error recovery state
422
422
  * @returns {Object} Reassessment result
423
423
  */
424
- function checkArchitecturalReassessment(session, currentLevel, state) {
424
+ function checkArchitecturalReassessment(session, currentLevel, _state) {
425
425
  // Get config for architectural reassessment
426
426
  let config;
427
427
  try {
428
428
  config = require('./flow-utils').getConfig();
429
- } catch (err) {
429
+ } catch (_err) {
430
430
  config = {};
431
431
  }
432
432
 
@@ -16,13 +16,13 @@
16
16
  * Part of S3: Eval System
17
17
  */
18
18
 
19
- const path = require('node:path');
19
+ const _path = require('node:path');
20
20
  const {
21
21
  getConfig,
22
- PATHS,
23
- readJson,
24
- writeJson,
25
- fileExists,
22
+ PATHS: _PATHS,
23
+ readJson: _readJson,
24
+ writeJson: _writeJson,
25
+ fileExists: _fileExists,
26
26
  safeJsonParse
27
27
  } = require('./flow-utils');
28
28
 
@@ -14,20 +14,20 @@ const fs = require('node:fs');
14
14
  const path = require('node:path');
15
15
  const { execFileSync } = require('node:child_process');
16
16
  const {
17
- getConfig,
17
+ getConfig: _getConfig,
18
18
  PATHS,
19
19
  readJson,
20
20
  writeJson,
21
- fileExists,
22
- safeJsonParse,
21
+ fileExists: _fileExists,
22
+ safeJsonParse: _safeJsonParse,
23
23
  validateTaskId
24
24
  } = require('./flow-utils');
25
25
  const { loadStats } = require('./flow-stats-collector');
26
26
  const {
27
- buildJudgePrompt,
28
- aggregateScores,
29
- getEvalConfig,
30
- getJudgeComposition,
27
+ buildJudgePrompt: _buildJudgePrompt,
28
+ aggregateScores: _aggregateScores,
29
+ getEvalConfig: _getEvalConfig,
30
+ getJudgeComposition: _getJudgeComposition,
31
31
  formatEvalResults
32
32
  } = require('./flow-eval-judge');
33
33
 
@@ -133,7 +133,7 @@ function extractExports(filePath) {
133
133
  result.defaultExport = defaultAtEnd[1];
134
134
  }
135
135
 
136
- } catch (err) {
136
+ } catch (_err) {
137
137
  // Ignore read errors
138
138
  }
139
139
 
@@ -227,7 +227,7 @@ function extractComponentDetails(filePath) {
227
227
  // Pattern 5: type Props = { ... } (object type alias - treat like interface)
228
228
  const typeObjectMatches = content.matchAll(/type\s+(\w+Props)\s*=\s*\{/g);
229
229
  for (const match of typeObjectMatches) {
230
- const typeName = match[1];
230
+ const _typeName = match[1];
231
231
  const startIndex = match.index + match[0].length;
232
232
 
233
233
  let braceCount = 1;
@@ -285,7 +285,7 @@ function extractComponentDetails(filePath) {
285
285
  result.typeAliases[`_fcProps_${propsTypeName}`] = propsTypeName;
286
286
  }
287
287
 
288
- } catch (err) {
288
+ } catch (_err) {
289
289
  // Ignore read errors
290
290
  }
291
291
 
@@ -590,7 +590,7 @@ function scanDirectory(dirPath, baseImportPath, target, includeDetails = false)
590
590
  target[entry.name] = result;
591
591
  }
592
592
  }
593
- } catch (err) {
593
+ } catch (_err) {
594
594
  // Ignore scan errors
595
595
  }
596
596
  }
@@ -630,7 +630,7 @@ function scanDirectoryFlat(dirPath, baseImportPath, target, typesOnly = false) {
630
630
  }
631
631
  }
632
632
  }
633
- } catch (err) {
633
+ } catch (_err) {
634
634
  // Ignore scan errors
635
635
  }
636
636
  }
@@ -23,7 +23,7 @@ const REVIEW_FILE = path.join(TMP_DIR, 'review-session.json');
23
23
 
24
24
  // Colors
25
25
  const { colors: c } = require('./flow-output');
26
- const { PATHS } = require('./flow-utils');
26
+ const { } = require('./flow-utils');
27
27
 
28
28
  // =============================================================================
29
29
  // REVIEW SESSION MANAGEMENT
@@ -26,22 +26,22 @@ const fs = require('node:fs');
26
26
  const path = require('node:path');
27
27
  const {
28
28
  PATHS,
29
- PROJECT_ROOT,
30
- readFile,
29
+ PROJECT_ROOT: _PROJECT_ROOT,
30
+ readFile: _readFile,
31
31
  writeFile,
32
32
  fileExists,
33
33
  dirExists,
34
34
  info,
35
35
  warn,
36
- success,
36
+ success: _success,
37
37
  error: logError,
38
38
  parseFlags,
39
39
  outputJson,
40
40
  safeJsonParse
41
41
  } = require('./flow-utils');
42
42
 
43
- const { updateModelProfile, getModelProfile } = require('./flow-model-profile');
44
- const { classifyTask } = require('./flow-task-classifier');
43
+ const { updateModelProfile } = require('./flow-model-profile');
44
+ const { } = require('./flow-task-classifier');
45
45
 
46
46
  // ============================================================
47
47
  // Configuration
@@ -415,7 +415,7 @@ function saveLearning(result) {
415
415
  if (!dirExists(LEARNINGS_DIR)) {
416
416
  try {
417
417
  fs.mkdirSync(LEARNINGS_DIR, { recursive: true });
418
- } catch (err) {
418
+ } catch (_err) {
419
419
  return; // Can't save, not critical
420
420
  }
421
421
  }
@@ -426,7 +426,7 @@ function saveLearning(result) {
426
426
 
427
427
  try {
428
428
  writeFile(filepath, JSON.stringify(result, null, 2));
429
- } catch (err) {
429
+ } catch (_err) {
430
430
  // Not critical
431
431
  }
432
432
 
@@ -467,7 +467,7 @@ function updateLearningStats(result) {
467
467
  try {
468
468
  fs.writeFileSync(tempPath, JSON.stringify(stats, null, 2), 'utf-8');
469
469
  fs.renameSync(tempPath, statsPath);
470
- } catch (err) {
470
+ } catch (_err) {
471
471
  // Clean up temp file if rename failed
472
472
  try {
473
473
  if (fs.existsSync(tempPath)) fs.unlinkSync(tempPath);
@@ -516,7 +516,7 @@ function getRecentLearnings(modelId, limit = 10) {
516
516
  const filePath = path.join(LEARNINGS_DIR, f);
517
517
  return safeJsonParse(filePath, null);
518
518
  }).filter(Boolean);
519
- } catch (err) {
519
+ } catch (_err) {
520
520
  return [];
521
521
  }
522
522
  }
@@ -19,12 +19,12 @@ const fs = require('node:fs');
19
19
  const path = require('node:path');
20
20
  const {
21
21
  PATHS,
22
- readJson,
22
+ readJson: _readJson,
23
23
  writeJson,
24
- readFile,
24
+ readFile: _readFile,
25
25
  ensureDir,
26
- fileExists,
27
- color,
26
+ fileExists: _fileExists,
27
+ color: _color,
28
28
  success,
29
29
  warn,
30
30
  error,
@@ -126,7 +126,7 @@ function parseFeatureFile(featureId) {
126
126
 
127
127
  try {
128
128
  const content = fs.readFileSync(filePath, 'utf-8');
129
- const lines = content.split('\n');
129
+ const _lines = content.split('\n');
130
130
 
131
131
  const feature = {
132
132
  id: featureId,