moflo 4.8.45 → 4.8.47

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.
@@ -438,4 +438,4 @@ npx flo swarm init --topology hierarchical-mesh --max-agents 15 --strategy speci
438
438
 
439
439
  - `.claude/guidance/moflo-subagents.md` - Subagents guide
440
440
  - `.claude/guidance/moflo-memory-strategy.md` - Memory architecture and search
441
- - `.claude/guidance/moflo.md` - Full CLI/MCP reference
441
+ - `.claude/guidance/moflo-core-guidance.md` - Full CLI/MCP reference
@@ -274,4 +274,4 @@ npx flo memory search --query "your domain query" --namespace guidance # Verify
274
274
  - `moflo-memorydb-maintenance.md` — Database location, schema, purge/reindex procedures
275
275
  - `moflo-subagents.md` — Subagents guide
276
276
  - `moflo-claude-swarm-cohesion.md` — Task & swarm coordination
277
- - `moflo.md` — Full CLI/MCP reference
277
+ - `moflo-core-guidance.md` — Full CLI/MCP reference
@@ -241,6 +241,21 @@ try {
241
241
  }
242
242
  } catch { /* non-fatal */ }
243
243
 
244
+ // ── 3c. Clean up double-prefixed guidance files from pre-4.8.45 upgrade ─────
245
+ // Before 4.8.45, session-start dynamically prepended "moflo-" to shipped filenames.
246
+ // When upgrading to 4.8.45+ (where files already have the prefix), the old in-memory
247
+ // code runs once and produces "moflo-moflo-*" duplicates. Remove them here.
248
+ try {
249
+ const guidanceDir = resolve(projectRoot, '.claude/guidance');
250
+ if (existsSync(guidanceDir)) {
251
+ for (const file of readdirSync(guidanceDir)) {
252
+ if ((file.startsWith('moflo-moflo-') || file === 'moflo-moflo.md' || file === 'moflo.md') && file.endsWith('.md')) {
253
+ try { unlinkSync(resolve(guidanceDir, file)); } catch { /* non-fatal */ }
254
+ }
255
+ }
256
+ }
257
+ } catch { /* non-fatal */ }
258
+
244
259
  // ── 4. Spawn background tasks ───────────────────────────────────────────────
245
260
  const localCli = resolve(projectRoot, 'node_modules/moflo/src/@claude-flow/cli/bin/cli.js');
246
261
  const hasLocalCli = existsSync(localCli);
@@ -241,6 +241,21 @@ try {
241
241
  }
242
242
  } catch { /* non-fatal */ }
243
243
 
244
+ // ── 3c. Clean up double-prefixed guidance files from pre-4.8.45 upgrade ─────
245
+ // Before 4.8.45, session-start dynamically prepended "moflo-" to shipped filenames.
246
+ // When upgrading to 4.8.45+ (where files already have the prefix), the old in-memory
247
+ // code runs once and produces "moflo-moflo-*" duplicates. Remove them here.
248
+ try {
249
+ const guidanceDir = resolve(projectRoot, '.claude/guidance');
250
+ if (existsSync(guidanceDir)) {
251
+ for (const file of readdirSync(guidanceDir)) {
252
+ if ((file.startsWith('moflo-moflo-') || file === 'moflo-moflo.md' || file === 'moflo.md') && file.endsWith('.md')) {
253
+ try { unlinkSync(resolve(guidanceDir, file)); } catch { /* non-fatal */ }
254
+ }
255
+ }
256
+ }
257
+ } catch { /* non-fatal */ }
258
+
244
259
  // ── 4. Spawn background tasks ───────────────────────────────────────────────
245
260
  const localCli = resolve(projectRoot, 'node_modules/moflo/src/@claude-flow/cli/bin/cli.js');
246
261
  const hasLocalCli = existsSync(localCli);
@@ -37,7 +37,7 @@ const LEGACY_STARTS = ['<!-- MOFLO:SUBAGENT-PROTOCOL:START -->', '<!-- MOFLO:STA
37
37
  const LEGACY_ENDS = ['<!-- MOFLO:SUBAGENT-PROTOCOL:END -->', '<!-- MOFLO:END -->'];
38
38
 
39
39
  // Minimal injection — just enough for Claude to work with moflo.
40
- // All detailed docs live in .claude/guidance/shipped/moflo.md.
40
+ // All detailed docs live in .claude/guidance/shipped/moflo-core-guidance.md.
41
41
  const CLAUDE_MD_SECTION = `${MARKER_START}
42
42
  ## MoFlo — AI Agent Orchestration
43
43
 
@@ -81,7 +81,7 @@ npx flo doctor --fix # Health check
81
81
  ### Full Reference
82
82
 
83
83
  For CLI commands, hooks, agents, swarm config, memory commands, and moflo.yaml options, see:
84
- \`.claude/guidance/shipped/moflo.md\`
84
+ \`.claude/guidance/shipped/moflo-core-guidance.md\`
85
85
  ${MARKER_END}`;
86
86
 
87
87
  function log(msg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.8.45",
3
+ "version": "4.8.47",
4
4
  "description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -89,7 +89,7 @@
89
89
  "@types/bcrypt": "^5.0.2",
90
90
  "@types/node": "^20.19.37",
91
91
  "eslint": "^8.0.0",
92
- "moflo": "^4.8.44",
92
+ "moflo": "^4.8.45",
93
93
  "tsx": "^4.21.0",
94
94
  "typescript": "^5.9.3",
95
95
  "vitest": "^4.0.0"
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates ONLY the MoFlo section to inject into a project's CLAUDE.md.
5
5
  * This must be minimal — just enough for Claude to work with moflo.
6
- * All detailed docs live in .claude/guidance/shipped/moflo.md (copied at install).
6
+ * All detailed docs live in .claude/guidance/shipped/moflo-core-guidance.md (copied at install).
7
7
  *
8
8
  * Principle: we are guests in the user's CLAUDE.md. Keep it small.
9
9
  */
@@ -11,7 +11,7 @@ const MARKER_START = '<!-- MOFLO:INJECTED:START -->';
11
11
  const MARKER_END = '<!-- MOFLO:INJECTED:END -->';
12
12
  /**
13
13
  * The single moflo section injected into CLAUDE.md.
14
- * ~40 lines. Points to moflo.md for everything else.
14
+ * ~40 lines. Points to moflo-core-guidance.md for everything else.
15
15
  */
16
16
  function mofloSection() {
17
17
  return `${MARKER_START}
@@ -58,7 +58,7 @@ npx flo doctor --fix # Health check
58
58
 
59
59
  - **Subagents protocol:** \`.claude/guidance/shipped/moflo-subagents.md\`
60
60
  - **Task + swarm coordination:** \`.claude/guidance/shipped/moflo-claude-swarm-cohesion.md\`
61
- - **CLI, hooks, swarm, memory, moflo.yaml:** \`.claude/guidance/shipped/moflo.md\`
61
+ - **CLI, hooks, swarm, memory, moflo.yaml:** \`.claude/guidance/shipped/moflo-core-guidance.md\`
62
62
  ${MARKER_END}`;
63
63
  }
64
64
  // --- Public API ---
@@ -80,11 +80,11 @@ export function generateMinimalClaudeMd(options) {
80
80
  /** Available template names for CLI wizard (kept for backward compat, all produce same output) */
81
81
  export const CLAUDE_MD_TEMPLATES = [
82
82
  { name: 'minimal', description: 'Recommended — memory search, workflow gates, MCP tools (~40 lines injected)' },
83
- { name: 'standard', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo.md)' },
84
- { name: 'full', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo.md)' },
85
- { name: 'security', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo.md)' },
86
- { name: 'performance', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo.md)' },
87
- { name: 'solo', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo.md)' },
83
+ { name: 'standard', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo-core-guidance.md)' },
84
+ { name: 'full', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo-core-guidance.md)' },
85
+ { name: 'security', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo-core-guidance.md)' },
86
+ { name: 'performance', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo-core-guidance.md)' },
87
+ { name: 'solo', description: 'Same as minimal (detailed docs in .claude/guidance/shipped/moflo-core-guidance.md)' },
88
88
  ];
89
89
  export default generateClaudeMd;
90
90
  //# sourceMappingURL=claudemd-generator.js.map
@@ -658,7 +658,7 @@ function generateClaudeMd(root, force) {
658
658
  }
659
659
  }
660
660
  // Minimal injection — just enough for Claude to work with moflo.
661
- // All detailed docs live in .claude/guidance/shipped/moflo.md.
661
+ // All detailed docs live in .claude/guidance/shipped/moflo-core-guidance.md.
662
662
  const mofloSection = `
663
663
  ${MOFLO_MARKER}
664
664
  ## MoFlo — AI Agent Orchestration
@@ -702,7 +702,7 @@ npx flo doctor --fix # Health check
702
702
  ### Full Reference
703
703
 
704
704
  For CLI commands, hooks, agents, swarm config, memory commands, and moflo.yaml options, see:
705
- \`.claude/guidance/shipped/moflo.md\`
705
+ \`.claude/guidance/shipped/moflo-core-guidance.md\`
706
706
  ${MOFLO_MARKER_END}
707
707
  `;
708
708
  const finalContent = existing.trimEnd() + '\n' + mofloSection;
@@ -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.8.45';
5
+ export const VERSION = '4.8.47';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.45",
3
+ "version": "4.8.47",
4
4
  "type": "module",
5
5
  "description": "MoFlo CLI — AI agent orchestration with specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",