moflo 4.9.20 → 4.9.22

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 (240) hide show
  1. package/.claude/agents/analysis/analyze-code-quality.md +0 -121
  2. package/.claude/agents/analysis/code-analyzer.md +5 -26
  3. package/.claude/agents/architecture/system-design/arch-system-design.md +0 -119
  4. package/.claude/agents/base-template-generator.md +0 -1
  5. package/.claude/agents/core/coder.md +0 -22
  6. package/.claude/agents/core/planner.md +0 -16
  7. package/.claude/agents/core/researcher.md +0 -16
  8. package/.claude/agents/core/reviewer.md +0 -17
  9. package/.claude/agents/core/tester.md +0 -19
  10. package/.claude/agents/custom/test-long-runner.md +0 -2
  11. package/.claude/agents/development/dev-backend-api.md +0 -167
  12. package/.claude/agents/development/dev-database.md +43 -0
  13. package/.claude/agents/development/dev-frontend.md +42 -0
  14. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -112
  15. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -111
  16. package/.claude/agents/security/security-auditor.md +45 -0
  17. package/.claude/guidance/shipped/moflo-agent-rules.md +172 -0
  18. package/.claude/guidance/shipped/moflo-claude-swarm-cohesion.md +73 -265
  19. package/.claude/guidance/shipped/moflo-cli-reference.md +6 -6
  20. package/.claude/guidance/shipped/moflo-core-guidance.md +66 -184
  21. package/.claude/guidance/shipped/moflo-cross-platform.md +1 -1
  22. package/.claude/guidance/shipped/moflo-error-handling.md +3 -3
  23. package/.claude/guidance/shipped/moflo-guidance-rules.md +17 -7
  24. package/.claude/guidance/shipped/moflo-memory-strategy.md +76 -182
  25. package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +6 -8
  26. package/.claude/guidance/shipped/moflo-settings-injection.md +7 -9
  27. package/.claude/guidance/shipped/moflo-source-hygiene.md +5 -5
  28. package/.claude/guidance/shipped/moflo-spell-connectors.md +3 -4
  29. package/.claude/guidance/shipped/moflo-spell-custom-steps.md +3 -4
  30. package/.claude/guidance/shipped/moflo-spell-engine.md +40 -162
  31. package/.claude/guidance/shipped/moflo-spell-runner.md +134 -0
  32. package/.claude/guidance/shipped/moflo-spell-sandboxing.md +10 -57
  33. package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +149 -0
  34. package/.claude/guidance/shipped/moflo-subagents.md +43 -114
  35. package/.claude/guidance/shipped/moflo-task-icons.md +4 -4
  36. package/.claude/guidance/shipped/moflo-user-facing-language.md +3 -3
  37. package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +3 -3
  38. package/.claude/guidance/shipped/moflo-yaml-reference.md +4 -5
  39. package/.claude/helpers/gate.cjs +192 -15
  40. package/.claude/helpers/prompt-hook.mjs +4 -38
  41. package/.claude/helpers/simplify-classify.cjs +32 -11
  42. package/.claude/helpers/subagent-bootstrap.json +1 -1
  43. package/.claude/helpers/subagent-start.cjs +1 -1
  44. package/.claude/skills/connector-builder/SKILL.md +42 -429
  45. package/.claude/skills/connector-builder/templates/connector.md +189 -0
  46. package/.claude/skills/connector-builder/templates/step-command.md +176 -0
  47. package/.claude/skills/eldar/SKILL.md +7 -7
  48. package/.claude/skills/fl/SKILL.md +3 -3
  49. package/.claude/skills/fl/execution-modes.md +39 -16
  50. package/.claude/skills/fl/phases.md +3 -3
  51. package/.claude/skills/{simplify → flo-simplify}/SKILL.md +11 -11
  52. package/.claude/skills/guidance/SKILL.md +17 -9
  53. package/.claude/skills/memory-patterns/SKILL.md +1 -1
  54. package/.claude/skills/publish/SKILL.md +121 -36
  55. package/.claude/skills/reset-epic/SKILL.md +2 -2
  56. package/.claude/skills/spell-builder/SKILL.md +39 -226
  57. package/.claude/skills/spell-builder/architecture.md +1 -1
  58. package/.claude/skills/spell-builder/permissions.md +107 -0
  59. package/.claude/skills/spell-builder/preflight.md +101 -0
  60. package/.claude/skills/spell-schedule/SKILL.md +2 -3
  61. package/bin/gate.cjs +192 -15
  62. package/bin/lib/retired-files.mjs +146 -0
  63. package/bin/prompt-hook.mjs +4 -38
  64. package/bin/session-start-launcher.mjs +120 -1
  65. package/bin/setup-project.mjs +63 -69
  66. package/bin/simplify-classify.cjs +32 -11
  67. package/dist/src/cli/appliance/rvfa-builder.js +1 -1
  68. package/dist/src/cli/commands/agent.js +3 -9
  69. package/dist/src/cli/commands/doctor-checks-deep.js +4 -0
  70. package/dist/src/cli/commands/hooks.js +1 -3
  71. package/dist/src/cli/commands/index.js +2 -0
  72. package/dist/src/cli/commands/retire.js +111 -0
  73. package/dist/src/cli/hooks/reasoningbank/index.js +7 -7
  74. package/dist/src/cli/init/claudemd-generator.js +30 -33
  75. package/dist/src/cli/init/executor.js +53 -69
  76. package/dist/src/cli/init/helpers-generator.js +165 -52
  77. package/dist/src/cli/init/moflo-init.js +41 -114
  78. package/dist/src/cli/init/settings-generator.js +44 -14
  79. package/dist/src/cli/mcp-tools/agent-tools.js +9 -27
  80. package/dist/src/cli/mcp-tools/hooks-tools.js +23 -21
  81. package/dist/src/cli/memory/controllers/semantic-router.js +18 -12
  82. package/dist/src/cli/memory/sona-optimizer.js +6 -6
  83. package/dist/src/cli/neural/domain/services/learning-service.js +3 -3
  84. package/dist/src/cli/services/agent-router.js +2 -5
  85. package/dist/src/cli/services/hook-block-hash.js +11 -2
  86. package/dist/src/cli/services/hook-wiring.js +86 -3
  87. package/dist/src/cli/services/subagent-bootstrap.js +1 -1
  88. package/dist/src/cli/shared/events/example-usage.js +6 -6
  89. package/dist/src/cli/shared/hooks/task-hooks.js +8 -8
  90. package/dist/src/cli/version.js +1 -1
  91. package/package.json +3 -2
  92. package/retired-files.json +1989 -0
  93. package/scripts/post-install-bootstrap.mjs +19 -0
  94. package/src/cli/data/model-registry.json +2 -2
  95. package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
  96. package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
  97. package/.claude/agents/consensus/gossip-coordinator.md +0 -63
  98. package/.claude/agents/consensus/performance-benchmarker.md +0 -851
  99. package/.claude/agents/consensus/quorum-manager.md +0 -823
  100. package/.claude/agents/consensus/raft-manager.md +0 -63
  101. package/.claude/agents/consensus/security-manager.md +0 -622
  102. package/.claude/agents/data/ml/data-ml-model.md +0 -193
  103. package/.claude/agents/github/code-review-swarm.md +0 -538
  104. package/.claude/agents/github/github-modes.md +0 -172
  105. package/.claude/agents/github/issue-tracker.md +0 -311
  106. package/.claude/agents/github/multi-repo-swarm.md +0 -551
  107. package/.claude/agents/github/pr-manager.md +0 -183
  108. package/.claude/agents/github/project-board-sync.md +0 -508
  109. package/.claude/agents/github/release-manager.md +0 -360
  110. package/.claude/agents/github/release-swarm.md +0 -580
  111. package/.claude/agents/github/repo-architect.md +0 -391
  112. package/.claude/agents/github/swarm-issue.md +0 -566
  113. package/.claude/agents/github/swarm-pr.md +0 -414
  114. package/.claude/agents/github/sync-coordinator.md +0 -426
  115. package/.claude/agents/github/workflow-automation.md +0 -606
  116. package/.claude/agents/goal/code-goal-planner.md +0 -440
  117. package/.claude/agents/goal/goal-planner.md +0 -168
  118. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -127
  119. package/.claude/agents/hive-mind/queen-coordinator.md +0 -198
  120. package/.claude/agents/hive-mind/scout-explorer.md +0 -233
  121. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -184
  122. package/.claude/agents/hive-mind/worker-specialist.md +0 -208
  123. package/.claude/agents/neural/safla-neural.md +0 -73
  124. package/.claude/agents/optimization/benchmark-suite.md +0 -665
  125. package/.claude/agents/optimization/load-balancer.md +0 -431
  126. package/.claude/agents/optimization/performance-monitor.md +0 -672
  127. package/.claude/agents/optimization/resource-allocator.md +0 -674
  128. package/.claude/agents/optimization/topology-optimizer.md +0 -808
  129. package/.claude/agents/reasoning/goal-planner.md +0 -67
  130. package/.claude/agents/sona/sona-learning-optimizer.md +0 -74
  131. package/.claude/agents/sparc/architecture.md +0 -472
  132. package/.claude/agents/sparc/pseudocode.md +0 -318
  133. package/.claude/agents/sparc/refinement.md +0 -525
  134. package/.claude/agents/sparc/specification.md +0 -276
  135. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -225
  136. package/.claude/agents/swarm/adaptive-coordinator.md +0 -391
  137. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -321
  138. package/.claude/agents/swarm/mesh-coordinator.md +0 -383
  139. package/.claude/agents/testing/production-validator.md +0 -395
  140. package/.claude/agents/testing/tdd-london-swarm.md +0 -244
  141. package/.claude/agents/v3/adr-architect.md +0 -184
  142. package/.claude/agents/v3/aidefence-guardian.md +0 -277
  143. package/.claude/agents/v3/claims-authorizer.md +0 -208
  144. package/.claude/agents/v3/collective-intelligence-coordinator.md +0 -988
  145. package/.claude/agents/v3/ddd-domain-expert.md +0 -220
  146. package/.claude/agents/v3/injection-analyst.md +0 -232
  147. package/.claude/agents/v3/memory-specialist.md +0 -987
  148. package/.claude/agents/v3/performance-engineer.md +0 -1225
  149. package/.claude/agents/v3/pii-detector.md +0 -146
  150. package/.claude/agents/v3/reasoningbank-learner.md +0 -213
  151. package/.claude/agents/v3/security-architect-aidefence.md +0 -405
  152. package/.claude/agents/v3/security-architect.md +0 -865
  153. package/.claude/agents/v3/security-auditor.md +0 -771
  154. package/.claude/agents/v3/sparc-orchestrator.md +0 -182
  155. package/.claude/agents/v3/swarm-memory-manager.md +0 -142
  156. package/.claude/agents/v3/v3-integration-architect.md +0 -205
  157. package/.claude/commands/claude-flow-help.md +0 -103
  158. package/.claude/commands/claude-flow-memory.md +0 -107
  159. package/.claude/commands/claude-flow-swarm.md +0 -205
  160. package/.claude/commands/github/README.md +0 -11
  161. package/.claude/commands/github/code-review-swarm.md +0 -514
  162. package/.claude/commands/github/code-review.md +0 -25
  163. package/.claude/commands/github/github-modes.md +0 -146
  164. package/.claude/commands/github/github-swarm.md +0 -113
  165. package/.claude/commands/github/issue-tracker.md +0 -284
  166. package/.claude/commands/github/issue-triage.md +0 -25
  167. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  168. package/.claude/commands/github/pr-enhance.md +0 -26
  169. package/.claude/commands/github/pr-manager.md +0 -164
  170. package/.claude/commands/github/project-board-sync.md +0 -471
  171. package/.claude/commands/github/release-manager.md +0 -332
  172. package/.claude/commands/github/release-swarm.md +0 -544
  173. package/.claude/commands/github/repo-analyze.md +0 -25
  174. package/.claude/commands/github/repo-architect.md +0 -361
  175. package/.claude/commands/github/swarm-issue.md +0 -482
  176. package/.claude/commands/github/swarm-pr.md +0 -285
  177. package/.claude/commands/github/sync-coordinator.md +0 -294
  178. package/.claude/commands/github/workflow-automation.md +0 -442
  179. package/.claude/commands/hooks/README.md +0 -11
  180. package/.claude/commands/hooks/overview.md +0 -58
  181. package/.claude/commands/hooks/post-edit.md +0 -117
  182. package/.claude/commands/hooks/post-task.md +0 -112
  183. package/.claude/commands/hooks/pre-edit.md +0 -113
  184. package/.claude/commands/hooks/pre-task.md +0 -111
  185. package/.claude/commands/hooks/session-end.md +0 -118
  186. package/.claude/commands/hooks/setup.md +0 -103
  187. package/.claude/commands/simplify.md +0 -101
  188. package/.claude/commands/sparc/analyzer.md +0 -42
  189. package/.claude/commands/sparc/architect.md +0 -43
  190. package/.claude/commands/sparc/ask.md +0 -86
  191. package/.claude/commands/sparc/batch-executor.md +0 -44
  192. package/.claude/commands/sparc/code.md +0 -78
  193. package/.claude/commands/sparc/coder.md +0 -44
  194. package/.claude/commands/sparc/debug.md +0 -72
  195. package/.claude/commands/sparc/debugger.md +0 -44
  196. package/.claude/commands/sparc/designer.md +0 -43
  197. package/.claude/commands/sparc/devops.md +0 -98
  198. package/.claude/commands/sparc/docs-writer.md +0 -69
  199. package/.claude/commands/sparc/documenter.md +0 -44
  200. package/.claude/commands/sparc/innovator.md +0 -44
  201. package/.claude/commands/sparc/integration.md +0 -72
  202. package/.claude/commands/sparc/mcp.md +0 -106
  203. package/.claude/commands/sparc/memory-manager.md +0 -44
  204. package/.claude/commands/sparc/optimizer.md +0 -44
  205. package/.claude/commands/sparc/orchestrator.md +0 -116
  206. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -72
  207. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -72
  208. package/.claude/commands/sparc/researcher.md +0 -44
  209. package/.claude/commands/sparc/reviewer.md +0 -44
  210. package/.claude/commands/sparc/security-review.md +0 -69
  211. package/.claude/commands/sparc/sparc-modes.md +0 -139
  212. package/.claude/commands/sparc/sparc.md +0 -99
  213. package/.claude/commands/sparc/spec-pseudocode.md +0 -69
  214. package/.claude/commands/sparc/spell-manager.md +0 -44
  215. package/.claude/commands/sparc/supabase-admin.md +0 -337
  216. package/.claude/commands/sparc/swarm-coordinator.md +0 -44
  217. package/.claude/commands/sparc/tdd.md +0 -44
  218. package/.claude/commands/sparc/tester.md +0 -44
  219. package/.claude/commands/sparc/tutorial.md +0 -68
  220. package/.claude/commands/sparc.md +0 -151
  221. package/.claude/guidance/shipped/moflo-session-start.md +0 -154
  222. package/.claude/guidance/shipped/moflo-spell-engine-architecture.md +0 -145
  223. package/.claude/skills/browser/SKILL.md +0 -204
  224. package/.claude/skills/github-code-review/SKILL.md +0 -1140
  225. package/.claude/skills/github-multi-repo/SKILL.md +0 -866
  226. package/.claude/skills/github-project-management/SKILL.md +0 -1272
  227. package/.claude/skills/github-release-management/SKILL.md +0 -1074
  228. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1060
  229. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  230. package/.claude/skills/hooks-automation/SKILL.md +0 -1193
  231. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  232. package/.claude/skills/performance-analysis/SKILL.md +0 -563
  233. package/.claude/skills/skill-builder/SKILL.md +0 -910
  234. package/.claude/skills/sparc-methodology/SKILL.md +0 -904
  235. package/.claude/skills/stream-chain/SKILL.md +0 -563
  236. package/.claude/skills/swarm-advanced/SKILL.md +0 -811
  237. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  238. package/.claude/skills/verification-quality/SKILL.md +0 -649
  239. package/.claude/skills/worker-benchmarks/skill.md +0 -135
  240. package/.claude/skills/worker-integration/skill.md +0 -154
@@ -1,57 +1,28 @@
1
1
  # Memory & Semantic Search Strategy
2
2
 
3
- **Purpose:** How memory, embeddings, and semantic search work in moflo. Reference when writing guidance documents, debugging search quality, configuring memory for a consumer project, or extending the system.
4
-
5
- ---
6
-
7
- ## Problem Statement
8
-
9
- Claude Code agents need project-specific knowledge — coding rules, architecture patterns, entity templates, testing conventions — delivered at the right moment. Without a retrieval system, agents either miss critical rules or require massive CLAUDE.md files that waste context window tokens.
10
-
11
- **Goals:**
12
- - Agents find relevant guidance automatically via semantic search
13
- - Subagents spawned by the coordinator inherit memory access
14
- - Search quality is high enough that agents don't need to read whole files
15
- - The system survives `npm install` (indexing runs on session start)
3
+ **Purpose:** How memory, embeddings, and semantic search work in moflo. Reference when debugging search quality, configuring memory for a project, or extending the indexing pipeline. Authoring rules for guidance docs themselves live in `.claude/guidance/moflo-guidance-rules.md` — read those first.
16
4
 
17
5
  ---
18
6
 
19
7
  ## Architecture Overview
20
8
 
21
- ```
22
- Source Files (.claude/guidance/*.md, docs/*.md)
23
- |
24
- v
25
- index-guidance.mjs --- Chunk on ## headers, build RAG links
26
- | (prev/next, siblings, parent/child, context overlap)
27
- v
28
- .swarm/memory.db ----- SQLite (entries + metadata + embedding vectors)
29
- |
30
- v
31
- build-embeddings.mjs - Generate 384-dim vectors per entry
32
- | (Xenova/all-MiniLM-L6-v2 neural, or domain-aware hash fallback)
33
- v
34
- HNSW index ----------- Approximate nearest-neighbor search
35
- v
36
- Search layer ---------- Three access paths:
37
- 1. MCP tools (mcp__moflo__memory_search) -- preferred
38
- 2. CLI (npx flo memory search) -- fallback
39
- 3. Script (semantic-search.mjs) -- detailed output
40
- ```
9
+ Source files (`.claude/guidance/*.md`, `docs/**/*.md`, code, tests) flow through four stages:
41
10
 
42
- **Key files:**
11
+ 1. **Index** — `bin/index-*.mjs` chunks markdown on `##` headers and walks code/tests for structural facts
12
+ 2. **Store** — entries land in `.moflo/moflo.db` (SQLite via sql.js) with metadata + RAG links
13
+ 3. **Embed** — `bin/build-embeddings.mjs` generates 384-dim vectors via `fastembed` (mandatory, see ADR-EMB-001)
14
+ 4. **Search** — `mcp__moflo__memory_search` (preferred), `npx flo memory search` (fallback), or `npx flo-search` (verbose) hit an HNSW index for nearest-neighbor lookup
43
15
 
44
16
  | File | Purpose |
45
17
  |------|---------|
46
- | `.swarm/memory.db` | SQLite database with all entries, embeddings, metadata |
47
- | `.swarm/code-map-hash.txt` | SHA-256 hash for incremental code map skip |
18
+ | `.moflo/moflo.db` | SQLite DB entries, embeddings, metadata |
48
19
  | `.moflo/neural/patterns.json` | ReasoningBank learned patterns |
49
- | `bin/build-embeddings.mjs` | Generates 384-dim embeddings |
50
- | `bin/index-guidance.mjs` | Indexes guidance files with RAG linking |
51
- | `bin/generate-code-map.mjs` | Generates structural code map (projects, dirs, types, interfaces) |
52
- | `bin/index-patterns.mjs` | Extracts per-file code patterns |
53
- | `bin/index-tests.mjs` | Indexes test structure and patterns |
54
- | `bin/index-all.mjs` | Runs the full indexing chain sequentially |
20
+ | `bin/index-guidance.mjs` | Indexes guidance with RAG linking |
21
+ | `bin/generate-code-map.mjs` | Structural code map (projects, dirs, types) |
22
+ | `bin/index-patterns.mjs` | Per-file code patterns |
23
+ | `bin/index-tests.mjs` | Test structure |
24
+ | `bin/index-all.mjs` | Runs the full chain sequentially |
25
+ | `bin/build-embeddings.mjs` | Generates 384-dim vectors |
55
26
 
56
27
  ---
57
28
 
@@ -59,104 +30,44 @@ Search layer ---------- Three access paths:
59
30
 
60
31
  | Namespace | Content | Indexed By |
61
32
  |-----------|---------|------------|
62
- | `guidance` | Indexed guidance and docs | `index-guidance.mjs` |
63
- | `code-map` | Structural codebase index (projects, directories, types, interfaces) | `generate-code-map.mjs` |
64
- | `patterns` | Per-file code patterns (services, routes, error handling, exports) | `index-patterns.mjs` |
33
+ | `guidance` | Markdown guidance and docs | `index-guidance.mjs` |
34
+ | `code-map` | Structural codebase index (projects, dirs, types, interfaces) | `generate-code-map.mjs` |
35
+ | `patterns` | Per-file code patterns (services, routes, exports) | `index-patterns.mjs` |
65
36
  | `tests` | Test structure and patterns | `index-tests.mjs` |
37
+ | `learnings` | User-stored patterns from work sessions | `mcp__moflo__memory_store` |
66
38
 
67
- ---
68
-
69
- ## Guidance Document Optimization Rules
70
-
71
- These rules determine how well your guidance documents retrieve via semantic search:
72
-
73
- ### 1. Every file needs a Purpose line
74
-
75
- Add `**Purpose:**` as the first meaningful line after the title. Claude checks this first for relevance scoring. Without it, the chunk has no summary signal.
76
-
77
- ### 2. H2 headings are the primary retrieval signal
78
-
79
- The indexer splits on `##`. Each heading becomes the chunk title, prepended to searchable content. Domain-specific keywords in headings dramatically improve recall.
80
-
81
- **Bad:** `## Overview`, `## Rules`, `## Pattern`
82
- **Good:** `## Soft Delete Rules`, `## JWT Authentication Pattern`, `## Database Entity Migration`
83
-
84
- ### 3. Ideal chunk size: 1000-4000 characters
85
-
86
- Below 50 chars the chunk is dropped. Above 6000 the indexer force-splits on paragraphs, which breaks mid-thought. The sweet spot produces focused embeddings.
87
-
88
- ### 4. Self-contained chunks
89
-
90
- Each H2 section must answer a question without needing the rest of the document. Include: the rule, a code example, and a cross-reference.
91
-
92
- ### 5. Tables over prose
93
-
94
- Claude parses structured data more accurately than paragraphs. DO/DON'T tables, field reference tables, and command tables all retrieve better.
95
-
96
- ### 6. Cross-references create a navigation graph
97
-
98
- The RAG indexer stores `prevChunk`/`nextChunk`/`siblings` metadata. Cross-references between documents let Claude follow chains: `core.md -> coding-rules.md -> database.md`.
99
-
100
- ### 7. No decorative formatting
101
-
102
- ASCII boxes, excessive emoji, rhetorical questions, and motivational text all waste tokens without improving retrieval or comprehension.
39
+ Namespaces are independent indexes. Search defaults to `all`; pass `namespace: "guidance"` to target one.
103
40
 
104
41
  ---
105
42
 
106
43
  ## Embedding Strategy
107
44
 
108
- ### Embedding Model
109
-
110
- | Model | Runtime | Speed | Notes |
111
- |-------|---------|-------|-------|
112
- | `fast-all-MiniLM-L6-v2` | `fastembed` (native ONNX + Rust tokenizer) | ~3s for 1000 entries | The only supported model — neural embeddings are mandatory (ADR-EMB-001) |
113
-
114
- **Neural embeddings (fast-all-MiniLM-L6-v2):**
115
- - Uses the `fastembed` npm package (Qdrant's embeddings-only ONNX client)
116
- - 384-dimensional vectors, L2-normalized
117
- - True semantic understanding — "soft delete" matches "mark as deleted" without keyword overlap
118
- - Model auto-downloads to `~/.cache/fastembed` on first use; cached for subsequent queries
119
- - For offline / air-gapped / sandboxed runs, pre-populate the cache or set `FASTEMBED_CACHE` — see `docs/modules/embeddings.md` "Sandbox & air-gapped first-run"
120
-
121
- **Legacy-compatible model names:** Entries embedded by earlier moflo versions may be tagged `Xenova/all-MiniLM-L6-v2` or `onnx`. These share the same vector space as `fast-all-MiniLM-L6-v2`, so search treats them as compatible (`semantic-search.mjs` `COMPATIBLE_MODELS`).
122
-
123
- **No hash fallback.** Epic #527 removed every hash-embedding path. If the `fastembed` model cannot load, memory operations fail loudly rather than silently degrading to FNV-1a pseudo-vectors. See [ADR-EMB-001](../../../docs/adr/ADR-EMB-001-neural-embeddings-mandatory.md).
45
+ **Model:** `fast-all-MiniLM-L6-v2` via `fastembed` (Qdrant's ONNX client). 384-dim, L2-normalized vectors. ~3 s for 1000 entries.
124
46
 
125
- ### The Embedding Alignment Problem
47
+ **Mandatory.** Hash-based fallback was removed (ADR-EMB-001) — if `fastembed` cannot load, memory operations fail loudly rather than silently degrading. Model auto-downloads to `~/.cache/fastembed` on first use; for offline / sandboxed runs pre-populate the cache or set `FASTEMBED_CACHE`.
126
48
 
127
- **Critical rule:** Query embeddings MUST match stored embeddings. Computing cosine similarity between vectors from different models produces meaningless scores.
49
+ **Legacy aliases.** Entries embedded by earlier moflo versions may be tagged `Xenova/all-MiniLM-L6-v2` or `onnx`. They share the same vector space and are treated as compatible at search time (`semantic-search.mjs` `COMPATIBLE_MODELS`).
128
50
 
129
- Both the search scripts and the MCP memory tools use `fastembed` for query vectors and filter stored entries by `embedding_model` (via the legacy-compatible alias list above), so a mixed-version database remains coherent.
51
+ **Embedding alignment is critical.** Query embeddings MUST match stored embeddings — cosine similarity across model families produces meaningless scores. Both the search scripts and the MCP memory tools use `fastembed` for queries and filter stored entries by `embedding_model`.
130
52
 
131
53
  ---
132
54
 
133
55
  ## RAG Indexing Pipeline
134
56
 
135
- ### How `index-guidance.mjs` Works
57
+ `index-guidance.mjs`:
136
58
 
137
- 1. **Scan** configured directories for `.md` files
138
- 2. **Hash check**Skip files whose content hash hasn't changed (unless `--force`)
139
- 3. **Store full document** as `doc-{prefix}-{name}` (for complete retrieval)
140
- 4. **Chunk on `##` headers**Each H2 section becomes a separate entry
141
- 5. **H3 subsections** become child chunks with parent H2 as context prefix
142
- 6. **Force-split** sections over 4000 chars on paragraph boundaries
143
- 7. **Build RAG metadata** for every chunk:
59
+ 1. Scan configured directories for `.md` files
60
+ 2. Hash check — skip files whose content hash hasn't changed (`--force` overrides)
61
+ 3. Store the full document as `doc-{prefix}-{name}` for complete retrieval
62
+ 4. Chunk on `##` headers — each H2 becomes a separate entry
63
+ 5. H3 subsections become child chunks with the parent H2 as context prefix
64
+ 6. Force-split sections over 4000 chars on paragraph boundaries
65
+ 7. Build RAG metadata (`parentDoc`, `prevChunk`, `nextChunk`, `siblings`, `hierarchicalParent/Children`, `contextBefore/After`)
66
+ 8. Prepend 20% overlapping context from neighbors
67
+ 9. Stale-cleanup pass — drop entries for files no longer on disk
68
+ 10. Spawn `build-embeddings.mjs` to vectorize new entries
144
69
 
145
- | Metadata Field | Purpose |
146
- |---------------|---------|
147
- | `parentDoc` | Link back to full document |
148
- | `prevChunk` / `nextChunk` | Sequential navigation |
149
- | `siblings` | All chunk keys from same document |
150
- | `hierarchicalParent` / `hierarchicalChildren` | H2->H3 relationships |
151
- | `contextBefore` / `contextAfter` | 20% overlapping text from adjacent chunks |
152
-
153
- 8. **Prepend context** — Each chunk's searchable content includes overlap from neighbors
154
- 9. **Stale cleanup** — After indexing, remove entries for files that no longer exist on disk
155
- 10. **Background embedding** — Spawn `build-embeddings.mjs` to generate vectors
156
-
157
- ### Configuring Indexed Directories
158
-
159
- In `moflo.yaml`:
70
+ **Configuration in `moflo.yaml`:**
160
71
 
161
72
  ```yaml
162
73
  guidance:
@@ -165,80 +76,62 @@ guidance:
165
76
  - docs/guides
166
77
  ```
167
78
 
168
- Default directories (when no config): `.claude/guidance`, `docs/guides`
169
-
170
- Moflo also automatically indexes its own bundled guidance from `node_modules/moflo/.claude/guidance/` when installed as a dependency.
79
+ Default (when no config): `.claude/guidance`, `docs/guides`. Moflo also auto-indexes its own bundled guidance from `node_modules/moflo/.claude/guidance/` when installed as a dependency.
171
80
 
172
81
  ---
173
82
 
174
83
  ## Search Commands
175
84
 
176
- All methods auto-detect the stored embedding model and generate matching query vectors:
85
+ All entry points auto-detect the stored model and generate matching query vectors.
177
86
 
178
- **MCP (Preferred):** `mcp__moflo__memory_search` — `query: "your query", namespace: "guidance"`
87
+ **MCP (preferred):** `mcp__moflo__memory_search` — `query`, `namespace`, `limit`, `threshold`.
179
88
 
180
- **CLI (Fallback):**
89
+ **CLI (fallback):**
181
90
  ```bash
182
- npx flo memory search --query "your query" --namespace guidance
91
+ npx flo memory search --query "your query" --namespace guidance --limit 5 --threshold 0.3
183
92
  ```
184
93
 
185
- **Search options:**
186
-
187
- | Flag | Default | Purpose |
188
- |------|---------|---------|
189
- | `--namespace` | all | Filter to specific namespace |
190
- | `--limit` | 5 | Number of results |
191
- | `--threshold` | 0.3 | Minimum similarity score |
192
- | `--json` | false | Output as JSON |
94
+ **Code map search.** When you need to find where a type, service, entity, or component lives, search `code-map` BEFORE Glob/Grep:
193
95
 
194
- ### Code Map Search (for codebase navigation)
195
-
196
- When you need to find where a type, service, entity, or component lives — search `code-map` BEFORE using Glob/Grep:
197
-
198
- **MCP:** `mcp__moflo__memory_search` — `query: "payment service", namespace: "code-map"`
199
-
200
- **What code-map contains:**
201
-
202
- | Chunk prefix | What it answers |
203
- |--------------|-----------------|
96
+ | Chunk prefix | Answers |
97
+ |--------------|---------|
204
98
  | `project:` | "What's in the api project?" |
205
- | `dir:` | "What types are in the entities directory?" |
99
+ | `dir:` | "What types are in entities/?" |
206
100
  | `iface-map:` | "What implements IPaymentService?" |
207
101
  | `type-index:` | "Where is Service defined?" |
208
102
 
103
+ Use `mcp__moflo__memory_search` with `namespace: "code-map"`.
104
+
209
105
  ---
210
106
 
211
107
  ## Session Start Indexing
212
108
 
213
- On every session start, `hooks.mjs` spawns `index-all.mjs` which runs the full chain:
214
-
215
- | Indexer | Namespace | What it does |
216
- |---------|-----------|--------------|
217
- | `index-guidance.mjs` | `guidance` | Chunks markdown, builds RAG links |
218
- | `generate-code-map.mjs` | `code-map` | Scans source for types, interfaces, directories |
219
- | `index-tests.mjs` | `tests` | Indexes test structure |
220
- | `index-patterns.mjs` | `patterns` | Extracts per-file code patterns |
221
- | `build-embeddings.mjs` | all | Generates vectors for any unembedded entries |
109
+ On every session start, `hooks.mjs` spawns `index-all.mjs`, which runs the full chain incrementally — files whose hash hasn't changed are skipped. Use `--force` to reindex everything.
222
110
 
223
- Indexing is incremental by default — files whose content hash hasn't changed are skipped. Use `--force` to reindex everything.
111
+ | Indexer | Namespace |
112
+ |---------|-----------|
113
+ | `index-guidance.mjs` | `guidance` |
114
+ | `generate-code-map.mjs` | `code-map` |
115
+ | `index-tests.mjs` | `tests` |
116
+ | `index-patterns.mjs` | `patterns` |
117
+ | `build-embeddings.mjs` | (generates vectors for any unembedded entries) |
224
118
 
225
119
  ---
226
120
 
227
- ## Replication Guide
121
+ ## Writing Guidance That Indexes Well
228
122
 
229
- To set up this system in a new project:
123
+ Authoring rules Purpose line, imperative voice, 5–30-line H2 sections, decision tables, no decorative headings, See Also block — live in `.claude/guidance/moflo-guidance-rules.md`. Follow that file when writing or editing any guidance.
230
124
 
231
- ```bash
232
- npm install moflo
233
- npx flo init
234
- ```
235
-
236
- Create `.claude/guidance/` with markdown files following the optimization rules above, then:
125
+ The retrieval-specific rules below only apply to docs you want surfaced via `memory_search`:
237
126
 
238
- ```bash
239
- npx flo-index --force # Index documents
240
- npx flo memory search --query "your domain query" --namespace guidance # Verify
241
- ```
127
+ | Signal | Why it matters |
128
+ |--------|----------------|
129
+ | `**Purpose:**` line after H1 | First chunk of every doc; primary relevance signal |
130
+ | Domain-specific H2 headings (`## JWT Authentication Pattern`, not `## Pattern`) | Heading text is the chunk's embedding anchor |
131
+ | 1000–4000 char H2 sections | Below 50 chars chunks are dropped; above 6000 chars get force-split mid-thought |
132
+ | Self-contained H2 sections | Each chunk must answer a question without the surrounding doc |
133
+ | Tables over prose for decisions | Structured data parses more reliably than paragraphs |
134
+ | Cross-references in See Also | Builds the navigation graph (`prevChunk`/`nextChunk`/`siblings`) |
242
135
 
243
136
  ---
244
137
 
@@ -246,19 +139,20 @@ npx flo memory search --query "your domain query" --namespace guidance # Verify
246
139
 
247
140
  | Symptom | Cause | Fix |
248
141
  |---------|-------|-----|
249
- | Search returns irrelevant results | Query/stored embedding model mismatch | Auto-detected now; verify with `--verbose` flag |
250
- | Low similarity scores | Query doesn't match domain terms | Include domain keywords in query |
251
- | "Vector: No" in list | Entry lacks embedding | Run `node bin/build-embeddings.mjs` |
252
- | Entries not found after adding file | Indexer hasn't run yet | Run `node bin/index-all.mjs` or restart session |
253
- | Bundled moflo guidance not indexed | Not installed as dependency | Only indexes when `node_modules/moflo/.claude/guidance/` exists |
254
- | Empty namespace | Indexer never ran or DB was purged | See `moflo-memorydb-maintenance.md` for reindex/purge procedures |
142
+ | Search returns irrelevant results | Query/stored embedding model mismatch (legacy entry) | Auto-detected; verify with `npx flo-search --verbose` |
143
+ | Low similarity scores | Query missing domain terms | Include domain keywords in the query |
144
+ | `"Vector: No"` in `memory_list` | Entry lacks embedding | Run `node bin/build-embeddings.mjs` |
145
+ | Entries not found after editing a file | Indexer hasn't run yet | Restart session or `node bin/index-all.mjs` |
146
+ | Bundled moflo guidance not indexed | Running inside the moflo repo (same dir) | Bundled guidance only indexes when installed as a dependency |
147
+ | Empty namespace | Indexer never ran or DB was purged | See `.claude/guidance/moflo-memorydb-maintenance.md` |
148
+ | Embeddings fail offline | `fastembed` model cache missing | Pre-populate `~/.cache/fastembed` or set `FASTEMBED_CACHE` (see `docs/modules/embeddings.md`) |
255
149
 
256
150
  ---
257
151
 
258
152
  ## See Also
259
153
 
260
- - `moflo-memorydb-maintenance.md` — Database location, schema, purge/reindex procedures
261
- - `moflo-subagents.md` — Subagents guide
262
- - `moflo-claude-swarm-cohesion.md` — Task & swarm coordination
263
- - `moflo-core-guidance.md` — Full CLI/MCP reference
264
- - Internal-only: `internal/guidance-sync.md` — Mechanics of how shipped guidance reaches the DB and the search index, including cleanup paths for stale content
154
+ - `.claude/guidance/moflo-memorydb-maintenance.md` — Database location, schema, purge/reindex procedures
155
+ - `.claude/guidance/moflo-guidance-rules.md` — Universal authoring rules every guidance doc must follow
156
+ - `.claude/guidance/moflo-subagents.md` — Memory-first subagent protocol that uses these search paths
157
+ - `.claude/guidance/moflo-claude-swarm-cohesion.md` — Task & swarm coordination layered on top of memory
158
+ - `.claude/guidance/moflo-core-guidance.md` — Full CLI/MCP reference and Auto-Learning protocol
@@ -6,10 +6,10 @@
6
6
 
7
7
  ## Database Location
8
8
 
9
- - **Path:** `.moflo/moflo.db` — canonical post-#727 location
9
+ - **Path:** `.moflo/moflo.db` — canonical location
10
10
  - **Engine:** sql.js (WASM-based SQLite — no native binaries needed)
11
11
  - **Single table:** `memory_entries` — stores content, embeddings, and metadata in one table
12
- - **Legacy path:** `.swarm/memory.db` — pre-#727 consumers may still have this. The launcher migrates it to `.moflo/moflo.db` automatically on session start. After migration the legacy file is renamed `.swarm/memory.db.bak` and is safe to delete once you've verified the canonical DB is healthy (`flo doctor`).
12
+ - **Legacy path:** `.swarm/memory.db` — older consumers may still have this. The launcher migrates it to `.moflo/moflo.db` automatically on session start. After migration the legacy file is renamed `.swarm/memory.db.bak` and is safe to delete once you've verified the canonical DB is healthy (`flo doctor`).
13
13
 
14
14
  ## Schema
15
15
 
@@ -109,7 +109,7 @@ node bin/build-embeddings.mjs
109
109
 
110
110
  ## Auto-Reindex on Session Start
111
111
 
112
- `hooks.mjs` spawns `index-all.mjs` on session start, which runs the full chain. This only works if `index-all.mjs` is in the `scriptFiles` array in `session-start-launcher.mjs` (see `moflo-session-start.md` § "Helper script sync").
112
+ `hooks.mjs` spawns `index-all.mjs` on session start, which runs the full chain. The session-start launcher syncs the indexer scripts into `.claude/scripts/` on every version change so the chain always points at current code.
113
113
 
114
114
  ## Recovering From a Legacy DB
115
115
 
@@ -131,8 +131,6 @@ flo memory restore-learnings --from .swarm/memory.db.bak
131
131
 
132
132
  ## See Also
133
133
 
134
- - `.claude/guidance/shipped/moflo-memory-strategy.md` — When to use which namespace; semantic search query patterns
135
- - `.claude/guidance/shipped/moflo-core-guidance.md` — `flo memory` CLI subcommands and `flo doctor` output
136
- - `.claude/guidance/shipped/moflo-session-start.md` — Where the auto-reindex chain runs in the launcher lifecycle
137
- - `.claude/guidance/shipped/moflo-subagents.md` — Memory-first protocol that depends on these indexes being healthy
138
- - `.claude/guidance/internal/guidance-sync.md` — Internal: how guidance content actually flows from `shipped/` into the DB and out to search (three-layer pipeline + cleanup paths)
134
+ - `.claude/guidance/moflo-memory-strategy.md` — When to use which namespace; semantic search query patterns
135
+ - `.claude/guidance/moflo-core-guidance.md` — `flo memory` CLI subcommands and `flo doctor` output
136
+ - `.claude/guidance/moflo-subagents.md` — Memory-first protocol that depends on these indexes being healthy
@@ -66,7 +66,7 @@ A rewrite rule looks like:
66
66
 
67
67
  ```ts
68
68
  {
69
- name: '#879: record-memory-searched → gate-hook.mjs',
69
+ name: 'record-memory-searched → gate-hook.mjs',
70
70
  from: 'node "$CLAUDE_PROJECT_DIR/.claude/helpers/gate.cjs" record-memory-searched',
71
71
  to: 'node "$CLAUDE_PROJECT_DIR/.claude/helpers/gate-hook.mjs" record-memory-searched',
72
72
  }
@@ -100,25 +100,23 @@ Failures land on stderr and similarly surface to the agent. If something silentl
100
100
  | Customise a hook command moflo doesn't manage | Add it to a separate matcher block in `.claude/settings.json` — surgical rewrites only touch the specific `from` strings on the rule list |
101
101
  | Disable a moflo gate | Edit the matching block in `moflo.yaml` (e.g., `gates.memory_first: false`); the gate scripts honor these flags |
102
102
 
103
- Future versions may add hook-block-level locking to suppress drift detection wholesale — track [#881](https://github.com/eric-cielo/moflo/issues/881) for that umbrella.
103
+ Future versions may add hook-block-level locking to suppress drift detection wholesale.
104
104
 
105
105
  ---
106
106
 
107
107
  ## Troubleshooting
108
108
 
109
- **"My `.claude/settings.json` was modified after a session restart."** — Look at the launcher's stdout in the session-start additionalContext. The line beginning `moflo: updated .claude/settings.json` lists every change in plain English. If you don't recognise a rewrite, check the moflo issue tracker for the rule name (each `HOOK_REWRITE_RULES` entry includes the issue number, e.g. `#879`).
109
+ **"My `.claude/settings.json` was modified after a session restart."** — Look at the launcher's stdout in the session-start additionalContext. The line beginning `moflo: updated .claude/settings.json` lists every change in plain English. If you don't recognise a rewrite, the rule name in the launcher source (`HOOK_REWRITE_RULES`) describes what each fix does.
110
110
 
111
111
  **"Helper scripts disappeared from `.claude/helpers/`."** — The launcher tracks installed files via `.moflo/installed-files.json` and re-syncs missing ones on every start. Open and close a Claude Code session; if the file doesn't come back, check `.moflo/manifest` write permissions or run `flo doctor --fix`.
112
112
 
113
- **"Hooks ran but the gate isn't reset on new prompts."** — Verify `UserPromptSubmit` includes a hook calling `gate-hook.mjs prompt-reminder`. If missing, `repairHookWiring()` adds it on next session start. If still missing after restart, the gate may be running through `gate.cjs` directly — see issue [#879](https://github.com/eric-cielo/moflo/issues/879) for the wrapper-vs-direct distinction.
113
+ **"Hooks ran but the gate isn't reset on new prompts."** — Verify `UserPromptSubmit` includes a hook calling `gate-hook.mjs prompt-reminder`. If missing, `repairHookWiring()` adds it on next session start. If still missing after restart, the gate may be running through `gate.cjs` directly — `gate-hook.mjs` is the wrapper that adds prompt-submit reset behavior; `gate.cjs` direct calls bypass it.
114
114
 
115
- **"I want to inspect what would be rewritten without actually changing my settings."** — The current launcher applies rewrites on every start. Manual dry-run isn't yet exposed; track [#881](https://github.com/eric-cielo/moflo/issues/881) for the planned drift-detection mode that surfaces diffs without applying them.
115
+ **"I want to inspect what would be rewritten without actually changing my settings."** — The current launcher applies rewrites on every start. A manual dry-run mode is planned but not yet exposed.
116
116
 
117
117
  ---
118
118
 
119
119
  ## See Also
120
120
 
121
- - `moflo-core-guidance.md` (Helper Script Auto-Sync section) file lists and the static-files rule.
122
- - `moflo-cross-platform.md` — why hook commands always use `node "$CLAUDE_PROJECT_DIR/..."` paths.
123
- - Internal-only: `internal/upgrade-contract.md` documents the contract from a moflo-developer perspective, including the historical violations (sandbox, settings.json drift) that motivated the self-heal mechanism.
124
- - Internal-only: `internal/guidance-sync.md` — Sibling self-heal mechanism for shipped guidance content (this doc covers settings.json; that one covers the guidance pipeline).
121
+ - `.claude/guidance/moflo-core-guidance.md` Session-start cost expectations and what the launcher syncs into `.claude/`.
122
+ - `.claude/guidance/moflo-cross-platform.md` — Why hook commands always use `node "$CLAUDE_PROJECT_DIR/..."` paths.
@@ -20,14 +20,14 @@
20
20
 
21
21
  ## Single Source Tree Under `src/cli/`
22
22
 
23
- **The entire moflo source lives at `src/cli/`** after the workspace-collapse epic ([#586](https://github.com/eric-cielo/moflo/issues/586) / [ADR-0001](../../docs/adr/0001-collapse-moflo-workspace-packages.md)). There is no longer a `src/modules/<pkg>/` workspace tree, no per-package `tsconfig.json`/`package.json`, and no `@moflo/<pkg>` workspace-package specifiers.
23
+ **The entire moflo source lives at `src/cli/`** after the workspace-collapse refactor (ADR-0001). There is no longer a `src/modules/<pkg>/` workspace tree, no per-package `tsconfig.json`/`package.json`, and no `@moflo/<pkg>` workspace-package specifiers.
24
24
 
25
25
  | Pattern | Status |
26
26
  |---------|--------|
27
27
  | `import { Foo } from '../bar.js'` | CORRECT — same-tree relative import |
28
28
  | `import { Foo } from '@moflo/neural'` | WRONG — that workspace package no longer exists |
29
29
  | `import { Foo } from '../../../../modules/<pkg>/...'` | WRONG — fixed-depth pre-collapse paths (banned by ESLint per [feedback_no_fixed_depth_paths.md](../../docs/adr/0001-collapse-moflo-workspace-packages.md)) |
30
- | `import { Foo } from 'src/modules/...'` | WRONG — that tree was deleted in #602 |
30
+ | `import { Foo } from 'src/modules/...'` | WRONG — that tree was deleted during the workspace collapse |
31
31
 
32
32
  The drift guard at `src/cli/__tests__/services/published-package-drift-guard.test.ts` enforces that no `@moflo/*` bare specifiers reappear in source.
33
33
 
@@ -70,13 +70,13 @@ Compiled output is generated by `npm run build` (single `tsc` run from repo root
70
70
 
71
71
  ## Async-Eligible Operations Must Be Async By Default
72
72
 
73
- **Use the async API for any operation that has one, unless a documented reason forces sync.** Sync IO and busy-waits block the event loop — on a hot path that pins a CPU core, stalls timers, and turns a "best-effort" failure into a hang. Issue #854 burned 5s of CPU to a `while (Date.now() < end)` busy-wait inside an already-async launcher.
73
+ **Use the async API for any operation that has one, unless a documented reason forces sync.** Sync IO and busy-waits block the event loop — on a hot path that pins a CPU core, stalls timers, and turns a "best-effort" failure into a hang. A representative incident burned ~5s of CPU per session to a `while (Date.now() < end)` busy-wait that had been pasted into an already-async launcher.
74
74
 
75
75
  | Operation | Use | Avoid |
76
76
  |-----------|-----|-------|
77
77
  | File IO inside an `async` function | `fs/promises` (`readFile`, `copyFile`, `mkdir`) | `*Sync` variants |
78
78
  | Delays | `await new Promise(r => setTimeout(r, ms))` | `while (Date.now() < end)` busy-wait |
79
- | Spawning long-running children | `await new Promise` around `spawn`/`execFile` | `execFileSync`/`spawnSync` (Windows timeouts orphan children — #744) |
79
+ | Spawning long-running children | `await new Promise` around `spawn`/`execFile` | `execFileSync`/`spawnSync` (on Windows, timeouts orphan child processes) |
80
80
 
81
81
  **Sync is OK only when:** the function cannot be `async` (top-level config reader before any await; certain CommonJS hooks); the IO is microscopic on a known-fast path (one `existsSync` probe, one tiny `readFileSync`); or conversion churn outweighs the benefit. Document the reason in a one-line comment.
82
82
 
@@ -98,6 +98,6 @@ Before creating any new source file, verify:
98
98
  ## See Also
99
99
 
100
100
  - `CLAUDE.md` — Project-wide rules, consumer project checklist
101
- - `.claude/guidance/shipped/moflo-guidance-rules.md` — Rules for writing guidance docs
101
+ - `.claude/guidance/moflo-guidance-rules.md` — Rules for writing guidance docs
102
102
  - `docs/BUILD.md` — Build and publish process
103
103
  - `docs/adr/0001-collapse-moflo-workspace-packages.md` — The ADR that documents the collapse
@@ -16,7 +16,7 @@
16
16
 
17
17
  **Do NOT create a connector for each external service.** Instead, compose the built-in connectors in spell steps. A Slack integration is an `http` connector call with the Slack API URL and token — not a `slack` connector.
18
18
 
19
- This design was established in issues #233–#259: the original per-service connector approach (Slack, OneDrive, Gmail, Google Drive — #234–#237) was superseded by generalized wrappers with capability enforcement (#254, #257, #258, #259).
19
+ This design replaced an earlier per-service connector approach (Slack, OneDrive, Gmail, Google Drive) with generalized wrappers backed by capability enforcement.
20
20
 
21
21
  ---
22
22
 
@@ -128,6 +128,5 @@ If you do need one:
128
128
 
129
129
  ## See Also
130
130
 
131
- - `.claude/guidance/shipped/moflo-spell-sandboxing.md` — CapabilityGateway and enforcement rules
132
- - `.claude/guidance/shipped/moflo-spell-engine.md` — Running spells, step command types
133
- - `.claude/guidance/shipped/moflo-spell-engine-architecture.md` — Architecture decisions
131
+ - `.claude/guidance/moflo-spell-sandboxing.md` — CapabilityGateway and enforcement rules
132
+ - `.claude/guidance/moflo-spell-engine.md` — Running spells, step command types
@@ -120,7 +120,6 @@ const runner = createRunner({
120
120
 
121
121
  ## See Also
122
122
 
123
- - `.claude/guidance/shipped/moflo-spell-engine.md` — Built-in step types, spell definition format, runner lifecycle, error codes
124
- - `.claude/guidance/shipped/moflo-spell-sandboxing.md` — Capability declarations a custom step must include and how the sandbox enforces them
125
- - `.claude/guidance/shipped/moflo-spell-connectors.md` — When to write a connector instead of a custom step (resource-shaped vs. action-shaped extension)
126
- - `.claude/guidance/shipped/moflo-spell-engine-architecture.md` — Architecture decisions for the pluggable step loader
123
+ - `.claude/guidance/moflo-spell-engine.md` — Built-in step types, spell definition format, runner lifecycle, error codes
124
+ - `.claude/guidance/moflo-spell-sandboxing.md` — Capability declarations a custom step must include and how the sandbox enforces them
125
+ - `.claude/guidance/moflo-spell-connectors.md` — When to write a connector instead of a custom step (resource-shaped vs. action-shaped extension)