moflo 4.10.21 → 4.10.23

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.
@@ -62,12 +62,8 @@ An advanced code quality analysis specialist that performs comprehensive code re
62
62
 
63
63
  ### Phase 1: Initial Scan
64
64
  ```bash
65
- # Comprehensive code scan
66
- # (removed: 'npx claude-flow' invocation does not exist in moflo consumers)
67
-
68
- # Load project context
69
- # (removed: 'npx claude-flow' invocation does not exist in moflo consumers)
70
- # (removed: 'npx claude-flow' invocation does not exist in moflo consumers)
65
+ # Comprehensive code scan + project context via moflo semantic search
66
+ flo-search "<area, symbol, or concern under review>"
71
67
  ```
72
68
 
73
69
  ### Phase 2: Deep Analysis
@@ -90,13 +86,9 @@ An advanced code quality analysis specialist that performs comprehensive code re
90
86
  - Identify security vulnerabilities
91
87
 
92
88
  ### Phase 3: Report Generation
93
- ```bash
94
- # Store analysis results
95
- # (removed: 'npx claude-flow' invocation does not exist in moflo consumers)
96
-
97
- # Generate recommendations
98
- # (removed: 'npx claude-flow' invocation does not exist in moflo consumers)
99
- ```
89
+ Persist analysis results and recommendations to moflo memory (namespace
90
+ `learnings`) via the `mcp__moflo__memory_store` tool, so future reviews build
91
+ on them rather than rediscovering the same issues.
100
92
 
101
93
  ## Integration Points
102
94
 
@@ -17,9 +17,9 @@ Search these namespaces depending on your task:
17
17
 
18
18
  On chunk hits where `navigation` is non-null, traverse via `mcp__moflo__memory_get_neighbors`. Bulk `mcp__moflo__memory_retrieve` is a protocol violation — see `.claude/guidance/moflo-memory-protocol.md`.
19
19
 
20
- # Backend API Developer v2.0.0-alpha
20
+ # Backend API Developer
21
21
 
22
- You are a specialized Backend API Developer agent with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
22
+ You are a specialized Backend API Developer agent with **self-learning** and **continuous improvement** capabilities powered by moflo's memory and ReasoningBank pattern learning.
23
23
 
24
24
  ## 🧠 Self-Learning Protocol
25
25
 
@@ -29,7 +29,7 @@ These drive code changes against GitHub issues and the working tree.
29
29
  | Skill | Use it when |
30
30
  |-------|-------------|
31
31
  | `/flo` (alias `/fl`) | Execute a GitHub issue end to end: research → ticket → implement → test → simplify → PR. Detects and processes epics automatically. |
32
- | `/flo-simplify` | Review the current diff for reuse, quality, and efficiency, then fix what it finds. Effort scales to the diff size. |
32
+ | `/flo-simplify` (alias `/distill`) | Review the current diff for reuse, quality, and efficiency, then fix what it finds. Effort scales to the diff size. |
33
33
 
34
34
  ## Setup, health, and audit skills
35
35
 
@@ -630,7 +630,7 @@ switch (command) {
630
630
  }
631
631
  case 'record-skill-run': {
632
632
  var skName = (process.env.TOOL_INPUT_skill || '');
633
- if (skName === 'simplify' || skName === 'flo-simplify') {
633
+ if (skName === 'simplify' || skName === 'flo-simplify' || skName === 'distill') {
634
634
  var s = readState();
635
635
  var changed = false;
636
636
  if (!s.simplifyRun) { s.simplifyRun = true; changed = true; }
@@ -720,7 +720,7 @@ switch (command) {
720
720
  }
721
721
  var missing = [];
722
722
  if (config.testing_gate && !s.testsRun) missing.push('tests have not run since the last code edit (run npm test, vitest, jest, pytest, or similar)');
723
- if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify has not run since the last code edit');
723
+ if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify (or /distill) has not run since the last code edit');
724
724
  if (config.learnings_gate && !s.learningsStored) missing.push('learnings have not been stored (call mcp__moflo__memory_store)');
725
725
  if (missing.length === 0) break;
726
726
  process.stderr.write('BLOCKED: gh pr create requires the following before opening a PR:\n');
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: distill
3
+ description: Alias for /flo-simplify. Review changed code for reuse, quality, and efficiency, then fix any issues found — effort scales to the diff size.
4
+ ---
5
+
6
+ # /distill is an alias for /flo-simplify
7
+
8
+ This skill is identical to `/flo-simplify`. All documentation and logic lives in `.claude/skills/flo-simplify/SKILL.md`.
9
+
10
+ **Do not duplicate the /flo-simplify skill content here.** Read and follow `.claude/skills/flo-simplify/SKILL.md` in its entirety. Pass all arguments through unchanged.
package/README.md CHANGED
@@ -477,7 +477,7 @@ Beyond `/flo`, `/spell-builder`, and `/eldar`, MoFlo ships a handful of focused
477
477
  | Skill | Purpose |
478
478
  |-------|---------|
479
479
  | `/guidance` | Author and audit guidance docs. Default writes guidance for Claude into `.claude/guidance/` as Markdown applying moflo's universal rules. `-h` switches the audience to humans (lighter ruleset, writes into `docs/`). `--html` emits HTML with a minimal default stylesheet instead of Markdown. `-a` audits every doc in `.claude/guidance/` against the universal rules. |
480
- | `/flo-simplify` | Adaptive code review on the current diff. Tier-based fan-out — trivial edits get a self-review, small diffs get one routed agent, cross-cutting refactors get three parallel agents. Routes through the moflo model router for cost-aware execution. (Named `/flo-simplify` to avoid colliding with Claude Code's built-in `/simplify`.) |
480
+ | `/flo-simplify` (alias `/distill`) | Adaptive code review on the current diff. Tier-based fan-out — trivial edits get a self-review, small diffs get one routed agent, cross-cutting refactors get three parallel agents. Routes through the moflo model router for cost-aware execution. (Named `/flo-simplify` to avoid colliding with Claude Code's built-in `/simplify`; also available as `/distill` for a more wizardy feel.) |
481
481
  | `/commune` | Socratic requirements elicitation. Turns a fuzzy "I'm not sure exactly what I want yet" idea into a concrete spec through a short Q&A, then hands the result off to a `/flo` ticket, a spell, or memory. The pre-execution counterpart to `/meditate` — use it to *open* a unit of work. |
482
482
  | `/divine` | Multi-hop web research with explicit confidence gating. Plans the inquiry, searches the web, scores its own confidence, and keeps digging until the answer is well-supported (or a hop cap is hit) — then returns a cited synthesis and remembers what worked so the next research run starts smarter. |
483
483
  | `/meditate` | Deliberate session retrospective — distills durable lessons into the `learnings` memory namespace, deduped against what's already there. See [Learning From Your Sessions](#learning-from-your-sessions) for the full picture, including its automatic counterpart, auto-meditate. |
package/bin/gate.cjs CHANGED
@@ -630,7 +630,7 @@ switch (command) {
630
630
  }
631
631
  case 'record-skill-run': {
632
632
  var skName = (process.env.TOOL_INPUT_skill || '');
633
- if (skName === 'simplify' || skName === 'flo-simplify') {
633
+ if (skName === 'simplify' || skName === 'flo-simplify' || skName === 'distill') {
634
634
  var s = readState();
635
635
  var changed = false;
636
636
  if (!s.simplifyRun) { s.simplifyRun = true; changed = true; }
@@ -720,7 +720,7 @@ switch (command) {
720
720
  }
721
721
  var missing = [];
722
722
  if (config.testing_gate && !s.testsRun) missing.push('tests have not run since the last code edit (run npm test, vitest, jest, pytest, or similar)');
723
- if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify has not run since the last code edit');
723
+ if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify (or /distill) has not run since the last code edit');
724
724
  if (config.learnings_gate && !s.learningsStored) missing.push('learnings have not been stored (call mcp__moflo__memory_store)');
725
725
  if (missing.length === 0) break;
726
726
  process.stderr.write('BLOCKED: gh pr create requires the following before opening a PR:\n');
@@ -54,6 +54,34 @@ export function fileSha256(absPath) {
54
54
  }
55
55
  }
56
56
 
57
+ /**
58
+ * Compute sha256 of file content with line endings normalized to LF.
59
+ *
60
+ * moflo ships every text asset with LF endings, so `knownContentHashes` are LF
61
+ * hashes. But Windows consumers routinely end up with CRLF copies (git
62
+ * `core.autocrlf=true` on checkout, editors rewriting on save). A raw-byte hash
63
+ * of a CRLF file never matches the LF manifest hash, so the hash-gated prune
64
+ * would silently never fire on Windows — defeating the whole #948/#932 cleanup
65
+ * for the platform where it's needed most. Normalizing CRLF (and lone CR) to LF
66
+ * before hashing recovers those files. This is a Rule #1 (cross-platform)
67
+ * requirement, not an optimization.
68
+ *
69
+ * latin1 round-trips bytes 1:1 (no UTF-8 multibyte corruption) so the digest is
70
+ * byte-identical to hashing a genuinely-LF file.
71
+ *
72
+ * @param {string} absPath
73
+ * @returns {string|null} `sha256:<hex>` of the LF-normalized content, or null
74
+ */
75
+ export function fileSha256NormalizedEol(absPath) {
76
+ try {
77
+ const buf = readFileSync(absPath);
78
+ const normalized = buf.toString('latin1').replace(/\r\n?/g, '\n');
79
+ return 'sha256:' + createHash('sha256').update(normalized, 'latin1').digest('hex');
80
+ } catch {
81
+ return null;
82
+ }
83
+ }
84
+
57
85
  /**
58
86
  * Load + validate the retired-files manifest. Returns `{ entries: [] }` for
59
87
  * any failure mode (missing file, invalid JSON, wrong shape) — the launcher
@@ -108,6 +136,15 @@ export function classifyRetiredFile(projectRoot, entry) {
108
136
  if (entry.knownContentHashes.includes(actualHash)) {
109
137
  return { action: 'prune', actualHash };
110
138
  }
139
+ // Raw bytes didn't match. Retry with LF-normalized content: a Windows
140
+ // consumer's CRLF copy of a known-shipped (LF) file must still be recognized
141
+ // as un-customized and pruned. Without this the prune never fires on Windows
142
+ // (Rule #1 cross-platform). `actualHash` stays the raw on-disk hash so the
143
+ // report reflects what's actually on disk.
144
+ const normalizedHash = fileSha256NormalizedEol(abs);
145
+ if (normalizedHash && entry.knownContentHashes.includes(normalizedHash)) {
146
+ return { action: 'prune', actualHash };
147
+ }
111
148
  return { action: 'preserve', actualHash };
112
149
  }
113
150
 
@@ -37,6 +37,7 @@ export const SKILLS_MAP = {
37
37
  'guidance',
38
38
  'healer',
39
39
  'flo-simplify',
40
+ 'distill', // alias for flo-simplify (pointer skill); installed alongside it
40
41
  'luminarium',
41
42
  'reasoningbank-intelligence',
42
43
  'meditate',
@@ -553,7 +553,7 @@ switch (command) {
553
553
  }
554
554
  case 'record-skill-run': {
555
555
  var skName = (process.env.TOOL_INPUT_skill || '');
556
- if (skName === 'simplify' || skName === 'flo-simplify') {
556
+ if (skName === 'simplify' || skName === 'flo-simplify' || skName === 'distill') {
557
557
  var s = readState();
558
558
  if (!s.simplifyRun) {
559
559
  s.simplifyRun = true;
@@ -587,7 +587,7 @@ switch (command) {
587
587
  var s = readState();
588
588
  var missing = [];
589
589
  if (config.testing_gate && !s.testsRun) missing.push('tests have not run since the last code edit (run npm test, vitest, jest, pytest, or similar)');
590
- if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify has not run since the last code edit');
590
+ if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify (or /distill) has not run since the last code edit');
591
591
  if (config.learnings_gate && !s.learningsStored) missing.push('learnings have not been stored (call mcp__moflo__memory_store)');
592
592
  if (missing.length === 0) break;
593
593
  process.stderr.write('BLOCKED: gh pr create requires the following before opening a PR:\\n');
@@ -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.10.21';
5
+ export const VERSION = '4.10.23';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.10.21",
3
+ "version": "4.10.23",
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",
@@ -95,7 +95,7 @@
95
95
  "@typescript-eslint/eslint-plugin": "^7.18.0",
96
96
  "@typescript-eslint/parser": "^7.18.0",
97
97
  "eslint": "^8.0.0",
98
- "moflo": "^4.10.21-rc.1",
98
+ "moflo": "^4.10.22",
99
99
  "tsx": "^4.21.0",
100
100
  "typescript": "^5.9.3",
101
101
  "vitest": "^4.0.0"