moflo 4.9.13 → 4.9.15

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 (29) hide show
  1. package/.claude/guidance/shipped/moflo-core-guidance.md +1 -0
  2. package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +45 -0
  3. package/.claude/helpers/gate.cjs +21 -5
  4. package/.claude/helpers/simplify-classify.cjs +211 -0
  5. package/.claude/skills/eldar/SKILL.md +13 -8
  6. package/.claude/skills/fl/phases.md +18 -2
  7. package/.claude/skills/guidance/SKILL.md +1 -1
  8. package/.claude/skills/simplify/SKILL.md +35 -48
  9. package/.claude/skills/spell-schedule/SKILL.md +1 -1
  10. package/bin/gate.cjs +21 -5
  11. package/bin/session-start-launcher.mjs +1 -1
  12. package/bin/simplify-classify.cjs +211 -0
  13. package/dist/src/cli/commands/doctor-checks-config.js +246 -0
  14. package/dist/src/cli/commands/doctor-checks-deep.js +40 -2
  15. package/dist/src/cli/commands/doctor-checks-intelligence.js +197 -0
  16. package/dist/src/cli/commands/doctor-checks-memory.js +207 -0
  17. package/dist/src/cli/commands/doctor-checks-platform.js +138 -0
  18. package/dist/src/cli/commands/doctor-checks-runtime.js +170 -0
  19. package/dist/src/cli/commands/doctor-fixes.js +165 -0
  20. package/dist/src/cli/commands/doctor-registry.js +109 -0
  21. package/dist/src/cli/commands/doctor-render.js +203 -0
  22. package/dist/src/cli/commands/doctor-types.js +9 -0
  23. package/dist/src/cli/commands/doctor-version.js +134 -0
  24. package/dist/src/cli/commands/doctor-zombies.js +201 -0
  25. package/dist/src/cli/commands/doctor.js +35 -1706
  26. package/dist/src/cli/init/helpers-generator.js +21 -5
  27. package/dist/src/cli/version.js +1 -1
  28. package/package.json +2 -2
  29. package/scripts/post-install-bootstrap.mjs +1 -0
@@ -279,7 +279,11 @@ var DANGEROUS = ['rm -rf /', 'format c:', 'del /s /q c:\\\\', ':(){:|:&};:', 'mk
279
279
  var DIRECTIVE_RE = /^(yes|no|yeah|yep|nope|sure|ok|okay|correct|right|exactly|perfect)\\b/i;
280
280
  var TASK_RE = /\\b(fix|bug|error|implement|add|create|build|write|refactor|debug|test|feature|issue|security|optimi)\\b/i;
281
281
  var TEST_RUNNER_RE = /(?:^|[^a-z])(?:npm|yarn|pnpm|bun)\\s+(?:run\\s+)?(?:test|t)(?:[:\\s]|$)|\\b(?:npx|pnpx)\\s+(?:vitest|jest|mocha|ava|tap|jasmine|pytest)\\b|(?:^|;|&&|\\|\\|)\\s*(?:vitest|jest|pytest|mocha|jasmine|tap|ava)\\s|\\b(?:cargo|go|deno|dotnet|mvn)\\s+test\\b|\\bgradle\\w*\\s+test\\b/i;
282
- var EDIT_RESET_SKIP_RE = /\\.(md|markdown|txt|rst|adoc|lock|gitignore)$|(?:^|[\\\\\\/])(CHANGELOG(?:\\.md)?|\\.env\\.example|package-lock\\.json|pnpm-lock\\.yaml|yarn\\.lock|bun\\.lockb)$/i;
282
+ var EDIT_RESET_SKIP_BOTH_RE = /\\.(md|markdown|txt|rst|adoc|lock|gitignore)$|(?:^|[\\\\\\/])(CHANGELOG(?:\\.md)?|\\.env\\.example|package-lock\\.json|pnpm-lock\\.yaml|yarn\\.lock|bun\\.lockb)$/i;
283
+ // Test files: invalidate testsRun but preserve simplifyRun (#908) — /simplify
284
+ // already reviewed the production code, touching tests/fixtures doesn't expose
285
+ // new untested surface for code review.
286
+ var EDIT_RESET_SKIP_SIMPLIFY_ONLY_RE = /(?:^|[\\\\\\/])(__tests__|__mocks__|tests?|spec|specs|cypress|e2e|fixtures?)[\\\\\\/]|\\.(test|spec)\\.[mc]?[jt]sx?$|\\.fixture\\.[mc]?[jt]sx?$/i;
283
287
 
284
288
  switch (command) {
285
289
  case 'check-before-agent': {
@@ -370,11 +374,20 @@ switch (command) {
370
374
  }
371
375
  case 'reset-edit-gates': {
372
376
  var fp = process.env.TOOL_INPUT_file_path || '';
373
- if (fp && EDIT_RESET_SKIP_RE.test(fp)) break;
377
+ // Inert files (markdown, lockfiles, CHANGELOG, .env.example): no gate reset.
378
+ if (fp && EDIT_RESET_SKIP_BOTH_RE.test(fp)) break;
374
379
  var s = readState();
375
- if (!s.testsRun && !s.simplifyRun) break;
376
- s.testsRun = false;
377
- s.simplifyRun = false;
380
+ // Test-only edits invalidate testsRun but preserve simplifyRun (#908).
381
+ var isTestOnly = fp && EDIT_RESET_SKIP_SIMPLIFY_ONLY_RE.test(fp);
382
+ var resetTests = s.testsRun;
383
+ var resetSimplify = s.simplifyRun && !isTestOnly;
384
+ if (!resetTests && !resetSimplify) break;
385
+ var gates = [];
386
+ if (resetTests) { s.testsRun = false; gates.push('tests'); }
387
+ if (resetSimplify) { s.simplifyRun = false; gates.push('simplify'); }
388
+ if (fp) {
389
+ s.lastResetBy = { file: fp, at: new Date().toISOString(), gates: gates };
390
+ }
378
391
  writeState(s);
379
392
  break;
380
393
  }
@@ -391,6 +404,9 @@ switch (command) {
391
404
  for (var i = 0; i < missing.length; i++) {
392
405
  process.stderr.write(' - ' + missing[i] + '\\n');
393
406
  }
407
+ if (s.lastResetBy && s.lastResetBy.file) {
408
+ process.stderr.write('Last gate reset: ' + s.lastResetBy.file + ' (' + (s.lastResetBy.gates || []).join(', ') + ')\\n');
409
+ }
394
410
  process.stderr.write('Disable per-gate via moflo.yaml:\\n');
395
411
  process.stderr.write(' gates:\\n testing_gate: false\\n simplify_gate: false\\n learnings_gate: false\\n');
396
412
  process.exit(2);
@@ -2,5 +2,5 @@
2
2
  * Auto-generated by build. Do not edit manually.
3
3
  * Source of truth: root package.json → scripts/sync-version.mjs
4
4
  */
5
- export const VERSION = '4.9.13';
5
+ export const VERSION = '4.9.15';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.9.13",
3
+ "version": "4.9.15",
4
4
  "description": "MoFlo — AI agent orchestration for Claude Code. A standalone, opinionated toolkit with semantic memory, learned routing, gates, spells, and the /flo issue-execution skill.",
5
5
  "main": "dist/src/cli/index.js",
6
6
  "type": "module",
@@ -81,7 +81,7 @@
81
81
  "@typescript-eslint/eslint-plugin": "^7.18.0",
82
82
  "@typescript-eslint/parser": "^7.18.0",
83
83
  "eslint": "^8.0.0",
84
- "moflo": "^4.9.12",
84
+ "moflo": "^4.9.14",
85
85
  "tsx": "^4.21.0",
86
86
  "typescript": "^5.9.3",
87
87
  "vitest": "^4.0.0"
@@ -73,6 +73,7 @@ export const BIN_HELPER_FILES = [
73
73
  'gate-hook.mjs',
74
74
  'prompt-hook.mjs',
75
75
  'hook-handler.cjs',
76
+ 'simplify-classify.cjs',
76
77
  ];
77
78
 
78
79
  export const SOURCE_HELPER_FILES = [