moflo 4.12.8 → 4.12.9
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.
- package/.claude/helpers/gate-hook.mjs +16 -0
- package/.claude/helpers/gate.cjs +170 -13
- package/.claude/skills/flfl/SKILL.md +50 -0
- package/bin/gate-hook.mjs +16 -0
- package/bin/gate.cjs +170 -13
- package/bin/lib/internal-skills.mjs +5 -3
- package/dist/src/cli/init/claudemd-generator.js +9 -4
- package/dist/src/cli/init/embedded-helpers.js +2 -2
- package/dist/src/cli/init/executor.js +3 -0
- package/dist/src/cli/version.js +1 -1
- package/package.json +2 -2
|
@@ -21,15 +21,19 @@ const LEGACY_MARKER_ENDS = [
|
|
|
21
21
|
];
|
|
22
22
|
/**
|
|
23
23
|
* The single moflo section injected into CLAUDE.md.
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
|
+
* This lands in EVERY consumer's CLAUDE.md and is read on every prompt, so it
|
|
26
|
+
* is a running token cost, not a doc. Keep it terse: state the rule, then point
|
|
27
|
+
* at moflo-core-guidance.md for the detail. Prefer cutting words over adding a
|
|
28
|
+
* line — anything needing a paragraph belongs in guidance, not here.
|
|
25
29
|
*/
|
|
26
30
|
function mofloSection() {
|
|
27
31
|
return `${MARKER_START}
|
|
28
32
|
## MoFlo — AI Agent Orchestration
|
|
29
33
|
|
|
30
|
-
### FIRST ACTION ON EVERY PROMPT: Search Memory
|
|
34
|
+
### FIRST ACTION ON EVERY PROMPT — AND EVERY TOPIC CHANGE: Search Memory
|
|
31
35
|
|
|
32
|
-
Your first tool call MUST be \`mcp__moflo__memory_search\` — before any Glob/Grep/Read. Pick the namespace by question shape: \`code-map\` for "where is symbol X defined", \`tests\` for "what tests cover Y", \`patterns\` for "what's our pattern for Z", \`guidance\` for project rules, \`learnings\` for "did we hit this before". Pivot on the bare symbol/keyword (not a natural-language question), and trust similarity ≥ 0.80 as a confident hit. When the user says "remember this", call \`mcp__moflo__memory_store\` with namespace \`learnings\`.
|
|
36
|
+
Your first tool call MUST be \`mcp__moflo__memory_search\` — before any Glob/Grep/Read or read-like Bash (\`cat\`, \`grep\`, \`node -e\`). **Search again on every new subject, mid-prompt** — new symbol, area, subsystem, or sub-question. A long task is many searches, not one. Pick the namespace by question shape: \`code-map\` for "where is symbol X defined", \`tests\` for "what tests cover Y", \`patterns\` for "what's our pattern for Z", \`guidance\` for project rules, \`learnings\` for "did we hit this before". Pivot on the bare symbol/keyword (not a natural-language question), and trust similarity ≥ 0.80 as a confident hit. When the user says "remember this", call \`mcp__moflo__memory_store\` with namespace \`learnings\`.
|
|
33
37
|
|
|
34
38
|
### Traverse chunks, don't bulk-retrieve
|
|
35
39
|
|
|
@@ -37,8 +41,9 @@ Search results carry a compact \`navigation\` crumb (parentDoc, prev/next, chunk
|
|
|
37
41
|
|
|
38
42
|
### Gates
|
|
39
43
|
|
|
40
|
-
- **Blocking** (hook exits non-zero): memory search before Glob/Grep/guidance Read; tests + \`/flo-simplify\` + learnings + \`/verify\` before \`gh pr create\`; \`swarm_init\`/\`hive-mind_init\` before Agent under \`/fl -s|-h\`.
|
|
44
|
+
- **Blocking** (hook exits non-zero): memory search before Glob/Grep/guidance Read and before read-like Bash/PowerShell commands; tests + \`/flo-simplify\` + learnings + \`/verify\` before \`gh pr create\`; \`swarm_init\`/\`hive-mind_init\` before Agent under \`/fl -s|-h\`.
|
|
41
45
|
- **Advisory** (reminder only): \`TaskCreate\` before spawning the Agent tool, entries in ICON+[Role] format — see \`.claude/guidance/moflo-task-icons.md\`.
|
|
46
|
+
- **Not enforced**: re-searching after a mid-prompt topic change — no hook sees the pivot. Do it anyway.
|
|
42
47
|
|
|
43
48
|
### Tools
|
|
44
49
|
|