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
@@ -530,6 +530,56 @@ function clearSessionPermissions() {
530
530
  }
531
531
  }
532
532
 
533
+ /**
534
+ * 2026-04-16 honesty-infrastructure: surface claim-vs-state contradictions
535
+ * in ready.json entries. Uses flow-completion-truth-gate.scanForClaimContradictions
536
+ * (Class A: done-word + partial status; Class B: "0 outages" + hotfixes evidence).
537
+ *
538
+ * Mode: surface-and-prompt. Logs findings to stdout at session-end; does NOT
539
+ * hard-fail (hard-fail has no recovery path for the user). A subsequent release
540
+ * can promote to blocking after false-positive calibration.
541
+ */
542
+ function runCompletionContradictionScan() {
543
+ try {
544
+ const { scanForClaimContradictions } = require('./flow-completion-truth-gate');
545
+ const readyPath = path.join(PATHS.state, 'ready.json');
546
+ if (!fs.existsSync(readyPath)) return;
547
+ const ready = safeJsonParse(readyPath, {});
548
+ const toScan = []
549
+ .concat(Array.isArray(ready.inProgress) ? ready.inProgress : [])
550
+ .concat(Array.isArray(ready.recentlyCompleted) ? ready.recentlyCompleted : []);
551
+
552
+ const hits = [];
553
+ for (const task of toScan) {
554
+ if (!task || typeof task !== 'object') continue;
555
+ const res = scanForClaimContradictions(task);
556
+ if (res.scanned && res.contradictions.length > 0) {
557
+ hits.push({ id: task.id, title: task.title, contradictions: res.contradictions });
558
+ }
559
+ }
560
+
561
+ if (hits.length === 0) return;
562
+
563
+ console.log('');
564
+ printSection('Completion-claim honesty scan...');
565
+ for (const h of hits) {
566
+ warn(`${h.id || '(no id)'}: ${h.title || ''}`);
567
+ for (const c of h.contradictions) {
568
+ const classLabel = c.class === 'A' ? 'status-mismatch' : 'negation-vs-evidence';
569
+ console.log(` [${classLabel}] ${c.field}: "${c.snippet}"`);
570
+ console.log(color('dim', ` evidence: ${c.structuralEvidence}`));
571
+ console.log(color('dim', ` suggest : ${c.suggestion}`));
572
+ }
573
+ }
574
+ console.log('');
575
+ console.log(color('dim', ' These are non-blocking hints. Reconcile the text or the status before the next release.'));
576
+ } catch (err) {
577
+ if (process.env.DEBUG) {
578
+ console.error(`[completion-contradiction-scan] ${err.message}`);
579
+ }
580
+ }
581
+ }
582
+
533
583
  /**
534
584
  * v1.7.0: Archive request log if threshold exceeded
535
585
  */
@@ -1200,6 +1250,12 @@ async function main() {
1200
1250
  // v1.9.0: Offer tech debt cleanup
1201
1251
  await offerDebtCleanup();
1202
1252
 
1253
+ // Completion-claim honesty scan (2026-04-16 honesty-infrastructure)
1254
+ // Scan ready.json + recently-completed for notes/result fields that contain
1255
+ // done-words contradicting status, or "0 outages"-class negations contradicting
1256
+ // hotfixes[] evidence. Surface-and-prompt, not hard-fail (calibration first).
1257
+ runCompletionContradictionScan();
1258
+
1203
1259
  console.log('');
1204
1260
 
1205
1261
  // Offer to push
@@ -12,7 +12,7 @@
12
12
  * Called by flow-session-end.js, can also run standalone.
13
13
  */
14
14
 
15
- const fs = require('node:fs');
15
+ const _fs = require('node:fs');
16
16
  const path = require('node:path');
17
17
  const { slugify: _slugify } = require('./flow-output');
18
18
  const slugify = (s) => _slugify(s, { maxLength: 40 });
@@ -331,7 +331,7 @@ function getSemanticMatch() {
331
331
  const score = typeof result === 'object' ? result.combined : result;
332
332
  return score / 100; // Convert to 0-1 scale
333
333
  };
334
- } catch (err) {
334
+ } catch (_err) {
335
335
  // Fallback to simple string matching if semantic module not available
336
336
  _calculateCombinedSimilarity = (a, b) => {
337
337
  const aLower = a.toLowerCase();
@@ -16,7 +16,7 @@
16
16
  const fs = require('node:fs');
17
17
  const path = require('node:path');
18
18
  const {
19
- getProjectRoot,
19
+ getProjectRoot: _getProjectRoot,
20
20
  getConfig, PATHS,
21
21
  getTodayDate
22
22
  } = require('./flow-utils')
@@ -14,8 +14,8 @@
14
14
  const fs = require('node:fs');
15
15
  const path = require('node:path');
16
16
  const readline = require('node:readline/promises');
17
- const { getProjectRoot, colors, PATHS, getTodayDate } = require('./flow-utils');
18
- const { success, warn, error: errorMsg, info, print } = require('./flow-output');
17
+ const { colors, PATHS, getTodayDate } = require('./flow-utils');
18
+ const { success, warn, error: errorMsg } = require('./flow-output');
19
19
  const { getAllSkills, getSkillDir } = require('./flow-skill-matcher');
20
20
 
21
21
  const SKILLS_DIR = path.join(PATHS.root, '.claude', 'skills');
@@ -76,7 +76,7 @@ async function createSkill(name, options = {}) {
76
76
  // Support nested paths like "frontend/react" or "backend/nestjs"
77
77
  const pathParts = name.split('/').filter(Boolean);
78
78
  const skillPath = path.join(SKILLS_DIR, ...pathParts);
79
- const displayName = pathParts[pathParts.length - 1]; // Base name for display
79
+ const _displayName = pathParts[pathParts.length - 1]; // Base name for display
80
80
 
81
81
  if (fs.existsSync(skillPath)) {
82
82
  errorMsg(`Skill '${name}' already exists at ${skillPath}`);
@@ -96,11 +96,11 @@ function getSkillFreshnessReport(projectRoot) {
96
96
  prebuiltVersion: fm.prebuiltVersion || null,
97
97
  context7: fm.context7 || null
98
98
  });
99
- } catch (err) {
99
+ } catch (_err) {
100
100
  // Skip unreadable skills (ENOENT, permission errors, etc.)
101
101
  }
102
102
  }
103
- } catch (err) {
103
+ } catch (_err) {
104
104
  // Skills directory doesn't exist or is unreadable
105
105
  return [];
106
106
  }
@@ -16,7 +16,7 @@ function getTechOptions() {
16
16
  if (!_techOptions) {
17
17
  try {
18
18
  _techOptions = require('./flow-tech-options');
19
- } catch (err) {
19
+ } catch (_err) {
20
20
  _techOptions = { getSkillType: () => 'library', getParentFramework: () => null };
21
21
  }
22
22
  }
@@ -78,7 +78,7 @@ function getPrebuiltSkillPath(techValue) {
78
78
  if (fs.existsSync(prebuiltDir) && fs.existsSync(path.join(prebuiltDir, 'skill.md'))) {
79
79
  return prebuiltDir;
80
80
  }
81
- } catch (err) {
81
+ } catch (_err) {
82
82
  // Silently fail — pre-built not available
83
83
  }
84
84
 
@@ -128,13 +128,13 @@ function copyPrebuiltSkill(prebuiltPath, projectRoot, skillId) {
128
128
  if (entry.name === 'skill.md' && src === prebuiltPath) {
129
129
  try {
130
130
  skillMdContent = fs.readFileSync(srcPath, 'utf8');
131
- } catch (err) {
131
+ } catch (_err) {
132
132
  // Will fall back to default type
133
133
  }
134
134
  }
135
135
  }
136
136
  }
137
- } catch (err) {
137
+ } catch (_err) {
138
138
  // Skip unreadable directories
139
139
  }
140
140
  }
@@ -166,12 +166,12 @@ function listPrebuiltSkills() {
166
166
  try {
167
167
  fs.accessSync(path.join(dir, e.name, 'skill.md'));
168
168
  return true;
169
- } catch (err) {
169
+ } catch (_err) {
170
170
  return false;
171
171
  }
172
172
  })
173
173
  .map(e => e.name);
174
- } catch (err) {
174
+ } catch (_err) {
175
175
  return [];
176
176
  }
177
177
  }
@@ -20,7 +20,7 @@
20
20
  const fs = require('node:fs');
21
21
  const path = require('node:path');
22
22
  const { execSync } = require('node:child_process');
23
- const { getProjectRoot, getConfig, colors, PATHS, getTodayDate } = require('./flow-utils');
23
+ const { getConfig, colors, PATHS, getTodayDate } = require('./flow-utils');
24
24
  const { getAllSkills, getSkillDir } = require('./flow-skill-matcher');
25
25
 
26
26
  const SKILLS_DIR = path.join(PATHS.root, '.claude', 'skills');
@@ -76,7 +76,7 @@ function getChangedFiles(staged = false) {
76
76
  : 'git diff HEAD --name-only';
77
77
  const output = execSync(cmd, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
78
78
  return output.trim().split('\n').filter(Boolean);
79
- } catch (err) {
79
+ } catch (_err) {
80
80
  return [];
81
81
  }
82
82
  }
@@ -86,7 +86,7 @@ function getRecentCommitFiles(count = 1) {
86
86
  const cmd = `git diff HEAD~${count} --name-only`;
87
87
  const output = execSync(cmd, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
88
88
  return output.trim().split('\n').filter(Boolean);
89
- } catch (err) {
89
+ } catch (_err) {
90
90
  return [];
91
91
  }
92
92
  }
@@ -153,7 +153,7 @@ function extractSemanticChanges(files, staged = false) {
153
153
  if (fileChanges.length > 0) {
154
154
  changes.push({ file, changes: fileChanges });
155
155
  }
156
- } catch (err) {
156
+ } catch (_err) {
157
157
  // Skip files that can't be diffed
158
158
  }
159
159
  }
@@ -353,13 +353,13 @@ function detectPatternChanges(added, removed) {
353
353
  return changes;
354
354
  }
355
355
 
356
- function detectNamingChanges(added, removed, filename) {
356
+ function detectNamingChanges(added, removed, _filename) {
357
357
  const changes = [];
358
358
 
359
359
  // Check for consistent naming pattern adoption
360
360
  const camelCaseRegex = /\b[a-z][a-zA-Z0-9]*[A-Z][a-zA-Z0-9]*\b/g;
361
361
  const snakeCaseRegex = /\b[a-z][a-z0-9]*_[a-z][a-z0-9_]*\b/g;
362
- const kebabCaseRegex = /['"][a-z][a-z0-9]*-[a-z][a-z0-9-]*['"]/g;
362
+ const _kebabCaseRegex = /['"][a-z][a-z0-9]*-[a-z][a-z0-9-]*['"]/g;
363
363
 
364
364
  const addedCamel = added.join(' ').match(camelCaseRegex)?.length || 0;
365
365
  const removedCamel = removed.join(' ').match(camelCaseRegex)?.length || 0;
@@ -444,7 +444,7 @@ function extractLearningContext(files, trigger, staged = false) {
444
444
  try {
445
445
  const msg = execSync('git log -1 --format=%B', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
446
446
  context.summary = msg.trim().split('\n')[0];
447
- } catch (err) {
447
+ } catch (_err) {
448
448
  context.summary = `Changed ${files.length} files`;
449
449
  }
450
450
  } else {
@@ -28,7 +28,7 @@ function getSkillFilePath(dir) {
28
28
  const lower = path.join(dir, 'skill.md');
29
29
  return fs.existsSync(lower) ? lower : path.join(dir, 'SKILL.md');
30
30
  }
31
- const { getProjectRoot, getConfig, PATHS, colors } = require('./flow-utils');
31
+ const { getConfig, PATHS, colors } = require('./flow-utils');
32
32
  const { error: errorMsg } = require('./flow-output');
33
33
 
34
34
  const SKILLS_DIR = path.join(PATHS.root, '.claude', 'skills');
@@ -80,7 +80,7 @@ function discoverNestedSkills(baseDir = SKILLS_DIR, prefix = '', depth = 0) {
80
80
  const nestedSkills = discoverNestedSkills(entryPath, skillPath, depth + 1);
81
81
  skills.push(...nestedSkills);
82
82
  }
83
- } catch (err) {
83
+ } catch (_err) {
84
84
  // Silently ignore permission errors, etc.
85
85
  }
86
86
 
@@ -524,7 +524,7 @@ Examples:
524
524
  path: fp,
525
525
  content: fs.readFileSync(fp, 'utf-8')
526
526
  };
527
- } catch (err) {
527
+ } catch (_err) {
528
528
  return null;
529
529
  }
530
530
  }).filter(Boolean);
@@ -15,9 +15,9 @@
15
15
 
16
16
  const fs = require('node:fs');
17
17
  const path = require('node:path');
18
- const { getProjectRoot, getConfig, PATHS, colors, readJson } = require('./flow-utils');
19
- const { success, warn, error: errorMsg, info } = require('./flow-output');
20
- const { matchSkills, loadSkillContext } = require('./flow-skill-matcher');
18
+ const { getConfig, PATHS, colors, readJson } = require('./flow-utils');
19
+ const { success, warn, error: errorMsg } = require('./flow-output');
20
+ const { matchSkills } = require('./flow-skill-matcher');
21
21
  const { getCommand } = require('./flow-script-resolver');
22
22
 
23
23
  // ============================================================
@@ -369,7 +369,7 @@ function generateTestStrategy(taskContext) {
369
369
  * Generate verification commands
370
370
  */
371
371
  function generateVerificationCommands(taskContext) {
372
- const config = getConfig();
372
+ const _config = getConfig();
373
373
  const commands = [];
374
374
 
375
375
  // Add lint command (resolved from package.json / config)
@@ -424,7 +424,7 @@ function generateVerificationCommands(taskContext) {
424
424
  /**
425
425
  * Generate rollback plan
426
426
  */
427
- function generateRollbackPlan(taskContext) {
427
+ function generateRollbackPlan(_taskContext) {
428
428
  return {
429
429
  strategy: 'git-revert',
430
430
  steps: [
@@ -25,8 +25,8 @@ const {
25
25
  success,
26
26
  warn,
27
27
  error,
28
- info,
29
- color,
28
+ info: _info,
29
+ color: _color,
30
30
  safeJsonParse
31
31
  } = require('./flow-utils');
32
32
 
@@ -28,8 +28,8 @@ const {
28
28
  AUTH_OPTIONS,
29
29
  TESTING_OPTIONS,
30
30
  ADDITIONAL_TOOLS,
31
- MOBILE_TOOLS,
32
- ECOSYSTEMS,
31
+ MOBILE_TOOLS: _MOBILE_TOOLS,
32
+ ECOSYSTEMS: _ECOSYSTEMS,
33
33
  BEST_DEFAULTS,
34
34
  getOptionsForFramework,
35
35
  getEcosystemDefaults,
@@ -40,7 +40,7 @@ const {
40
40
  // COLORS & FORMATTING
41
41
  // ============================================
42
42
 
43
- const { colors: COLORS, color: c } = require('./flow-output');
43
+ const { color: c } = require('./flow-output');
44
44
 
45
45
  // ============================================
46
46
  // WIZARD CLASS
@@ -651,7 +651,7 @@ class EnhancedStackWizard {
651
651
  try {
652
652
  const { detectProjectType } = require('./flow-project-analyzer');
653
653
  detected = detectProjectType();
654
- } catch (err) {
654
+ } catch (_err) {
655
655
  // detectProjectType not available — skip auto-detection
656
656
  }
657
657
 
@@ -846,13 +846,13 @@ class EnhancedStackWizard {
846
846
  if (generateCount > 0) {
847
847
  console.log(c('yellow', ` ${generateCount} will be generated (may use Context7)`));
848
848
  }
849
- } catch (err) {
849
+ } catch (_err) {
850
850
  console.log(`\n Creating skills for ${technologies.length} technologies...`);
851
851
  }
852
852
 
853
853
  try {
854
854
  const generator = require('./flow-skill-generator');
855
- const { PATHS } = require('./flow-utils');
855
+ const { } = require('./flow-utils');
856
856
  await generator.generateSkills(technologies, this.selections);
857
857
 
858
858
  console.log(c('green', '\n✅ Skills generated successfully!\n'));
@@ -263,12 +263,12 @@ function loadRulesDir() {
263
263
  content,
264
264
  source: fullPath
265
265
  });
266
- } catch (err) {
266
+ } catch (_err) {
267
267
  // Skip unreadable files
268
268
  }
269
269
  }
270
270
  }
271
- } catch (err) {
271
+ } catch (_err) {
272
272
  // Skip unreadable directories
273
273
  }
274
274
  }
@@ -439,7 +439,7 @@ function checkFunctionDuplication(file, existingFunctions, matchConfig) {
439
439
  * @param {Object[]} securityRules - Security rules from rules dir
440
440
  * @returns {Object[]} Array of violations
441
441
  */
442
- function checkSecurityPatterns(file, securityRules) {
442
+ function checkSecurityPatterns(file, _securityRules) {
443
443
  const violations = [];
444
444
  const content = file.content || '';
445
445
 
@@ -795,7 +795,7 @@ function discoverAllRegistries() {
795
795
  }
796
796
  }
797
797
  }
798
- } catch (err) {
798
+ } catch (_err) {
799
799
  // Fall through to disk scan
800
800
  }
801
801
  }
@@ -818,7 +818,7 @@ function discoverAllRegistries() {
818
818
  seen.add(entry);
819
819
  }
820
820
  }
821
- } catch (err) {
821
+ } catch (_err) {
822
822
  // Disk scan failed — proceed with manifest-only results
823
823
  }
824
824
 
@@ -834,7 +834,7 @@ function discoverAllRegistries() {
834
834
  * @returns {Array<{newItem: string, file: string, domain: string, matches: Object[]}>}
835
835
  */
836
836
  function collectReuseCandidates(files, options = {}) {
837
- const config = getMatchConfig();
837
+ const _config = getMatchConfig();
838
838
  const candidates = [];
839
839
 
840
840
  // Map domain → parser
@@ -862,7 +862,7 @@ function collectReuseCandidates(files, options = {}) {
862
862
  mapPath: path.join(PATHS.state, r.mapFile),
863
863
  source: 'active'
864
864
  }));
865
- } catch (err) {
865
+ } catch (_err) {
866
866
  registries = discoverAllRegistries();
867
867
  }
868
868
  }
@@ -998,7 +998,7 @@ function runStandardsCheck(files, options = {}) {
998
998
  const checksToRun = getCheckTypesForTask(options);
999
999
 
1000
1000
  // Load all standards (lazy load only what's needed)
1001
- const decisions = parseDecisions();
1001
+ const _decisions = parseDecisions();
1002
1002
  const components = checksToRun.includes('components') ? parseAppMap() : [];
1003
1003
  const functions = checksToRun.includes('functions') ? parseFunctionMap() : [];
1004
1004
  const endpoints = checksToRun.includes('api') ? parseApiMap() : [];
@@ -39,7 +39,7 @@ try {
39
39
  let standardsLearner;
40
40
  try {
41
41
  standardsLearner = require('./flow-standards-learner');
42
- } catch (err) {
42
+ } catch (_err) {
43
43
  standardsLearner = null;
44
44
  }
45
45
 
@@ -202,7 +202,7 @@ function runTaskStandardsCheck(taskContext, files, options = {}) {
202
202
  const changedPaths = taskContext?.filesToChange || options.changedPaths || [];
203
203
 
204
204
  // Determine which checks to run based on config
205
- const alwaysCheck = standardsConfig.alwaysCheck || ['naming', 'security'];
205
+ const _alwaysCheck = standardsConfig.alwaysCheck || ['naming', 'security'];
206
206
  const scopeByTaskType = standardsConfig.scopeByTaskType !== false;
207
207
 
208
208
  // Build check options
@@ -240,7 +240,7 @@ function runTaskStandardsCheck(taskContext, files, options = {}) {
240
240
  changedPaths,
241
241
  allRegistries
242
242
  });
243
- } catch (err) {
243
+ } catch (_err) {
244
244
  // Non-blocking — reuse candidate collection is best-effort
245
245
  }
246
246
  }
@@ -337,7 +337,7 @@ function runTaskStandardsCheck(taskContext, files, options = {}) {
337
337
  * @param {string} taskType - Task type for context
338
338
  * @returns {string} Formatted feedback prompt
339
339
  */
340
- function formatViolationsForRetry(violations, taskType) {
340
+ function formatViolationsForRetry(violations, _taskType) {
341
341
  const lines = [];
342
342
 
343
343
  lines.push('');
@@ -16,7 +16,7 @@ const {
16
16
  PATHS,
17
17
  fileExists,
18
18
  readFile,
19
- writeFile,
19
+ writeFile: _writeFile,
20
20
  getConfig,
21
21
  color,
22
22
  escapeRegex
@@ -545,7 +545,7 @@ ${learning.ruleTemplate}
545
545
  );
546
546
  return { content: updated };
547
547
  }, { caller: 'flow-standards-learner/promoteToDecisions-markPromoted', skipDedup: true });
548
- } catch (err) {
548
+ } catch (_err) {
549
549
  // Non-fatal, rule was already promoted to decisions
550
550
  }
551
551
 
@@ -19,7 +19,7 @@ const {
19
19
  getConfig,
20
20
  safeJsonParse
21
21
  } = require('./flow-utils');
22
- const { success, warn, info, printHeader, printSection } = require('./flow-output');
22
+ const { success, warn } = require('./flow-output');
23
23
  const { getCommand: resolveCommand } = require('./flow-script-resolver');
24
24
  // Auto-context module (optional - graceful degradation)
25
25
  let autoContext = null;
@@ -60,14 +60,14 @@ const { setActiveTask: setHookActiveTask } = require('./flow-hook-status');
60
60
  // v2.0 durable session support
61
61
  const {
62
62
  loadDurableSession,
63
- createDurableSession,
63
+ createDurableSession: _createDurableSession,
64
64
  createDurableSessionAsync,
65
65
  canResumeFromStep,
66
- getResumeContext,
66
+ getResumeContext: _getResumeContext,
67
67
  getSuspensionStatus,
68
68
  resumeSession,
69
- isSuspended,
70
- STEP_STATUS,
69
+ isSuspended: _isSuspended,
70
+ STEP_STATUS: _STEP_STATUS,
71
71
  clearPendingSkill // v4.1: Clear pending skill state when task starts
72
72
  } = require('./flow-durable-session');
73
73
 
@@ -103,7 +103,7 @@ const {
103
103
  let contextCompact;
104
104
  try {
105
105
  contextCompact = require('./flow-context-compact');
106
- } catch (err) {
106
+ } catch (_err) {
107
107
  // Module optional - graceful degradation
108
108
  contextCompact = null;
109
109
  }
@@ -539,7 +539,7 @@ async function main() {
539
539
  }
540
540
 
541
541
  // Use async version with file locking to prevent race conditions
542
- const session = await createDurableSessionAsync(taskId, 'task', sessionSteps, {
542
+ const _session = await createDurableSessionAsync(taskId, 'task', sessionSteps, {
543
543
  filesToChange
544
544
  });
545
545
 
@@ -715,8 +715,8 @@ async function main() {
715
715
  // v2.7: Check and suggest function/API registries when relevant
716
716
  const funcRegistryPath = path.join(PATHS.state, 'function-index.json');
717
717
  const apiRegistryPath = path.join(PATHS.state, 'api-index.json');
718
- const funcMapPath = path.join(PATHS.state, 'function-map.md');
719
- const apiMapPath = path.join(PATHS.state, 'api-map.md');
718
+ const _funcMapPath = path.join(PATHS.state, 'function-map.md');
719
+ const _apiMapPath = path.join(PATHS.state, 'api-map.md');
720
720
 
721
721
  const showFunctionRegistry = config.functionRegistry?.enabled !== false && isRelevantToFunctions(taskDescription);
722
722
  const showApiRegistry = config.apiRegistry?.enabled !== false && isRelevantToAPIs(taskDescription);
@@ -19,7 +19,7 @@
19
19
  const fs = require('node:fs');
20
20
  const path = require('node:path');
21
21
  const {
22
- getConfig,
22
+ getConfig: _getConfig,
23
23
  PATHS,
24
24
  readJson,
25
25
  writeJson,
@@ -77,7 +77,7 @@ function getDefaultStats() {
77
77
  *
78
78
  * @param {Object} record - Task performance record
79
79
  * @param {string} record.taskId - Task ID (wf-XXXXXXXX)
80
- * @param {string} record.model - Model used (e.g., 'claude-opus-4-6')
80
+ * @param {string} record.model - Model used (e.g., 'claude-opus-4-7')
81
81
  * @param {string} record.taskType - Task type (feature, bugfix, refactor, etc.)
82
82
  * @param {number} record.iterations - Number of implementation iterations
83
83
  * @param {boolean} record.firstAttemptPass - Whether first attempt passed verification
@@ -14,7 +14,7 @@ const path = require('node:path');
14
14
 
15
15
  const {
16
16
  PATHS,
17
- PROJECT_ROOT,
17
+ PROJECT_ROOT: _PROJECT_ROOT,
18
18
  fileExists,
19
19
  dirExists,
20
20
  getTaskCounts,
@@ -9,7 +9,7 @@
9
9
 
10
10
  const fs = require('node:fs');
11
11
  const path = require('node:path');
12
- const { getProjectRoot, colors, getConfig, PATHS } = require('./flow-utils');
12
+ const { colors, PATHS } = require('./flow-utils');
13
13
 
14
14
  const CHANGELOG_PATH = path.join(PATHS.root, 'CHANGELOG.md');
15
15
 
@@ -83,7 +83,7 @@ async function run(options = {}) {
83
83
  /**
84
84
  * Determine changelog category from task type
85
85
  */
86
- function getChangelogCategory(taskType, taskTitle, files) {
86
+ function getChangelogCategory(taskType, taskTitle, _files) {
87
87
  // Explicit type mapping
88
88
  const typeMap = {
89
89
  feature: 'Added',
@@ -133,7 +133,7 @@ function getChangelogCategory(taskType, taskTitle, files) {
133
133
  /**
134
134
  * Generate a changelog entry
135
135
  */
136
- function generateEntry(taskId, taskTitle, category, files) {
136
+ function generateEntry(taskId, taskTitle, _category, files) {
137
137
  // Clean up title
138
138
  let entry = taskTitle || 'Update';
139
139
 
@@ -72,7 +72,7 @@ class ComplexityStep extends BaseWorkflowStep {
72
72
  * - Base complexity: 1
73
73
  * - +1 for each: if, else if, for, while, case, catch, &&, ||, ?, ??
74
74
  */
75
- function analyzeComplexity(content, fileName) {
75
+ function analyzeComplexity(content, _fileName) {
76
76
  const functions = [];
77
77
 
78
78
  // Match function declarations and expressions
@@ -10,7 +10,7 @@
10
10
  const fs = require('node:fs');
11
11
  const path = require('node:path');
12
12
  const { execSync } = require('node:child_process');
13
- const { getProjectRoot, colors, getConfig, safeJsonParse, readJson, error, PATHS } = require('./flow-utils');
13
+ const { colors, safeJsonParse, readJson, error, PATHS } = require('./flow-utils');
14
14
  const { getCommand, getExec } = require('./flow-script-resolver');
15
15
 
16
16
  // Common coverage output locations
@@ -127,7 +127,7 @@ function findExistingCoverage() {
127
127
  const result = readJson(jsonPath, null);
128
128
  if (result) return result;
129
129
  }
130
- } catch (err) {
130
+ } catch (_err) {
131
131
  // Continue to next path
132
132
  }
133
133
  }
@@ -175,7 +175,7 @@ async function runCoverageTests() {
175
175
  // Try to read the output
176
176
  return findExistingCoverage();
177
177
 
178
- } catch (err) {
178
+ } catch (_err) {
179
179
  // Test run failed or timed out
180
180
  return null;
181
181
  }
@@ -9,7 +9,7 @@
9
9
 
10
10
  const fs = require('node:fs');
11
11
  const path = require('node:path');
12
- const { getProjectRoot, colors, getConfig, PATHS } = require('./flow-utils');
12
+ const { colors, PATHS } = require('./flow-utils');
13
13
 
14
14
  const KNOWLEDGE_DIR = path.join(PATHS.root, '.claude', 'docs', 'knowledge-base');
15
15
 
@@ -167,7 +167,7 @@ function detectLearnings(files, taskTitle) {
167
167
  /**
168
168
  * Suggest knowledge base file based on learnings
169
169
  */
170
- function suggestKnowledgeFile(learnings, taskTitle) {
170
+ function suggestKnowledgeFile(learnings, _taskTitle) {
171
171
  if (learnings.length === 0) return null;
172
172
 
173
173
  const primary = learnings[0];
@@ -185,7 +185,7 @@ async function analyzeTestQuality(sourceFiles, allFiles) {
185
185
  if (qualityChecks.length > 0) {
186
186
  report.concerns.push({ file: testFile, issues: qualityChecks.length });
187
187
  }
188
- } catch (err) {
188
+ } catch (_err) {
189
189
  // Skip unreadable files
190
190
  }
191
191
  }
@@ -199,7 +199,7 @@ async function analyzeTestQuality(sourceFiles, allFiles) {
199
199
  const content = fs.readFileSync(sourcePath, 'utf8');
200
200
  const testabilityIssues = checkTestability(content, sourceFile);
201
201
  issues.push(...testabilityIssues);
202
- } catch (err) {
202
+ } catch (_err) {
203
203
  // Skip unreadable files
204
204
  }
205
205
  }