moflo 4.3.1 → 4.5.0
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/guidance/agent-bootstrap.md +2 -2
- package/.claude/guidance/guidance-memory-strategy.md +262 -0
- package/.claude/guidance/memory-strategy.md +204 -0
- package/.claude/guidance/moflo.md +594 -0
- package/.claude/guidance/task-swarm-integration.md +348 -0
- package/.claude/helpers/hook-handler.cjs +83 -1
- package/.claude/helpers/metrics-db.mjs +492 -488
- package/.claude/helpers/statusline.cjs +85 -16
- package/.claude/settings.json +10 -25
- package/.claude/settings.local.json +14 -0
- package/README.md +279 -181
- package/bin/build-embeddings.mjs +2 -2
- package/bin/generate-code-map.mjs +1 -1
- package/bin/index-guidance.mjs +85 -15
- package/bin/semantic-search.mjs +6 -6
- package/bin/setup-project.mjs +9 -9
- package/package.json +8 -7
- package/src/@claude-flow/cli/dist/src/commands/config.js +2 -2
- package/src/@claude-flow/cli/dist/src/commands/gate.d.ts +8 -8
- package/src/@claude-flow/cli/dist/src/commands/gate.js +13 -13
- package/src/@claude-flow/cli/dist/src/commands/orc.d.ts +4 -4
- package/src/@claude-flow/cli/dist/src/commands/orc.js +13 -13
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +180 -179
- package/src/@claude-flow/memory/package.json +44 -42
|
@@ -130,55 +130,55 @@ function generateConfig(root, force, answers) {
|
|
|
130
130
|
const detectedExts = extensions.size > 0
|
|
131
131
|
? [...extensions].sort()
|
|
132
132
|
: ['.ts', '.tsx', '.js', '.jsx'];
|
|
133
|
-
const yaml = `# MoFlo — Project Configuration
|
|
134
|
-
# Generated by: moflo init
|
|
135
|
-
# Docs: https://github.com/eric-cielo/moflo
|
|
136
|
-
|
|
137
|
-
project:
|
|
138
|
-
name: "${projectName}"
|
|
139
|
-
|
|
140
|
-
# Guidance/knowledge docs to index for semantic search
|
|
141
|
-
guidance:
|
|
142
|
-
directories:
|
|
143
|
-
${guidanceDirs.map(d => ` - ${d}`).join('\n')}
|
|
144
|
-
namespace: guidance
|
|
145
|
-
|
|
146
|
-
# Source directories for code navigation map
|
|
147
|
-
code_map:
|
|
148
|
-
directories:
|
|
149
|
-
${srcDirs.map(d => ` - ${d}`).join('\n')}
|
|
150
|
-
extensions: [${detectedExts.map(e => `"${e}"`).join(', ')}]
|
|
151
|
-
exclude: [node_modules, dist, .next, coverage, build, __pycache__, target, .git]
|
|
152
|
-
namespace: code-map
|
|
153
|
-
|
|
154
|
-
# Workflow gates (enforced via Claude Code hooks)
|
|
155
|
-
gates:
|
|
156
|
-
memory_first: ${gatesEnabled}
|
|
157
|
-
task_create_first: ${gatesEnabled}
|
|
158
|
-
context_tracking: ${gatesEnabled}
|
|
159
|
-
|
|
160
|
-
# Auto-index on session start
|
|
161
|
-
auto_index:
|
|
162
|
-
guidance: ${answers?.guidance ?? true}
|
|
163
|
-
code_map: ${answers?.codeMap ?? true}
|
|
164
|
-
|
|
165
|
-
# Memory backend
|
|
166
|
-
memory:
|
|
167
|
-
backend: sql.js
|
|
168
|
-
embedding_model: Xenova/all-MiniLM-L6-v2
|
|
169
|
-
namespace: default
|
|
170
|
-
|
|
171
|
-
# Hook toggles
|
|
172
|
-
hooks:
|
|
173
|
-
pre_edit: true
|
|
174
|
-
gate: ${gatesEnabled}
|
|
175
|
-
stop_hook: ${answers?.stopHook ?? true}
|
|
176
|
-
session_restore: true
|
|
177
|
-
|
|
178
|
-
# Model preferences
|
|
179
|
-
models:
|
|
180
|
-
default: opus
|
|
181
|
-
review: opus
|
|
133
|
+
const yaml = `# MoFlo — Project Configuration
|
|
134
|
+
# Generated by: moflo init
|
|
135
|
+
# Docs: https://github.com/eric-cielo/moflo
|
|
136
|
+
|
|
137
|
+
project:
|
|
138
|
+
name: "${projectName}"
|
|
139
|
+
|
|
140
|
+
# Guidance/knowledge docs to index for semantic search
|
|
141
|
+
guidance:
|
|
142
|
+
directories:
|
|
143
|
+
${guidanceDirs.map(d => ` - ${d}`).join('\n')}
|
|
144
|
+
namespace: guidance
|
|
145
|
+
|
|
146
|
+
# Source directories for code navigation map
|
|
147
|
+
code_map:
|
|
148
|
+
directories:
|
|
149
|
+
${srcDirs.map(d => ` - ${d}`).join('\n')}
|
|
150
|
+
extensions: [${detectedExts.map(e => `"${e}"`).join(', ')}]
|
|
151
|
+
exclude: [node_modules, dist, .next, coverage, build, __pycache__, target, .git]
|
|
152
|
+
namespace: code-map
|
|
153
|
+
|
|
154
|
+
# Workflow gates (enforced via Claude Code hooks)
|
|
155
|
+
gates:
|
|
156
|
+
memory_first: ${gatesEnabled}
|
|
157
|
+
task_create_first: ${gatesEnabled}
|
|
158
|
+
context_tracking: ${gatesEnabled}
|
|
159
|
+
|
|
160
|
+
# Auto-index on session start
|
|
161
|
+
auto_index:
|
|
162
|
+
guidance: ${answers?.guidance ?? true}
|
|
163
|
+
code_map: ${answers?.codeMap ?? true}
|
|
164
|
+
|
|
165
|
+
# Memory backend
|
|
166
|
+
memory:
|
|
167
|
+
backend: sql.js
|
|
168
|
+
embedding_model: Xenova/all-MiniLM-L6-v2
|
|
169
|
+
namespace: default
|
|
170
|
+
|
|
171
|
+
# Hook toggles
|
|
172
|
+
hooks:
|
|
173
|
+
pre_edit: true
|
|
174
|
+
gate: ${gatesEnabled}
|
|
175
|
+
stop_hook: ${answers?.stopHook ?? true}
|
|
176
|
+
session_restore: true
|
|
177
|
+
|
|
178
|
+
# Model preferences
|
|
179
|
+
models:
|
|
180
|
+
default: opus
|
|
181
|
+
review: opus
|
|
182
182
|
`;
|
|
183
183
|
fs.writeFileSync(configPath, yaml, 'utf-8');
|
|
184
184
|
return { name: 'moflo.yaml', status: 'created', detail: `Detected: ${srcDirs.join(', ')} | ${detectedExts.join(', ')}` };
|
|
@@ -215,7 +215,8 @@ function generateHooks(root, force, answers) {
|
|
|
215
215
|
}
|
|
216
216
|
catch { /* start fresh */ }
|
|
217
217
|
// Check if MoFlo hooks already set up
|
|
218
|
-
const
|
|
218
|
+
const settingsStr = JSON.stringify(existing);
|
|
219
|
+
const hasGateHooks = settingsStr.includes('flo gate') || settingsStr.includes('moflo gate');
|
|
219
220
|
if (hasGateHooks && !force) {
|
|
220
221
|
return { name: '.claude/settings.json', status: 'skipped', detail: 'MoFlo hooks already configured' };
|
|
221
222
|
}
|
|
@@ -227,21 +228,21 @@ function generateHooks(root, force, answers) {
|
|
|
227
228
|
"matcher": "Glob|Grep",
|
|
228
229
|
"hooks": [{
|
|
229
230
|
"type": "command",
|
|
230
|
-
"command": "npx
|
|
231
|
+
"command": "npx flo gate check-before-scan"
|
|
231
232
|
}]
|
|
232
233
|
},
|
|
233
234
|
{
|
|
234
235
|
"matcher": "Read",
|
|
235
236
|
"hooks": [{
|
|
236
237
|
"type": "command",
|
|
237
|
-
"command": "npx
|
|
238
|
+
"command": "npx flo gate check-before-read"
|
|
238
239
|
}]
|
|
239
240
|
},
|
|
240
241
|
{
|
|
241
242
|
"matcher": "Agent",
|
|
242
243
|
"hooks": [{
|
|
243
244
|
"type": "command",
|
|
244
|
-
"command": "npx
|
|
245
|
+
"command": "npx flo gate check-before-agent"
|
|
245
246
|
}]
|
|
246
247
|
}
|
|
247
248
|
],
|
|
@@ -250,21 +251,21 @@ function generateHooks(root, force, answers) {
|
|
|
250
251
|
"matcher": "TaskCreate",
|
|
251
252
|
"hooks": [{
|
|
252
253
|
"type": "command",
|
|
253
|
-
"command": "npx
|
|
254
|
+
"command": "npx flo gate record-task-created"
|
|
254
255
|
}]
|
|
255
256
|
},
|
|
256
257
|
{
|
|
257
258
|
"matcher": "Bash",
|
|
258
259
|
"hooks": [{
|
|
259
260
|
"type": "command",
|
|
260
|
-
"command": "npx
|
|
261
|
+
"command": "npx flo gate check-bash-memory"
|
|
261
262
|
}]
|
|
262
263
|
},
|
|
263
264
|
{
|
|
264
265
|
"matcher": "mcp__claude-flow__memory_search",
|
|
265
266
|
"hooks": [{
|
|
266
267
|
"type": "command",
|
|
267
|
-
"command": "npx
|
|
268
|
+
"command": "npx flo gate record-memory-searched"
|
|
268
269
|
}]
|
|
269
270
|
}
|
|
270
271
|
],
|
|
@@ -272,7 +273,7 @@ function generateHooks(root, force, answers) {
|
|
|
272
273
|
{
|
|
273
274
|
"hooks": [{
|
|
274
275
|
"type": "command",
|
|
275
|
-
"command": "npx
|
|
276
|
+
"command": "npx flo gate prompt-reminder"
|
|
276
277
|
}]
|
|
277
278
|
}
|
|
278
279
|
]
|
|
@@ -294,70 +295,70 @@ function generateSkill(root, force) {
|
|
|
294
295
|
if (!fs.existsSync(skillDir)) {
|
|
295
296
|
fs.mkdirSync(skillDir, { recursive: true });
|
|
296
297
|
}
|
|
297
|
-
const skillContent = `---
|
|
298
|
-
name: mf
|
|
299
|
-
description: MoFlo ticket workflow - analyze and execute GitHub issues
|
|
300
|
-
arguments: "[options] <issue-number>"
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
# /mf - MoFlo Ticket Workflow
|
|
304
|
-
|
|
305
|
-
Execute GitHub issues through a full automated workflow.
|
|
306
|
-
|
|
307
|
-
**Arguments:** $ARGUMENTS
|
|
308
|
-
|
|
309
|
-
## Usage
|
|
310
|
-
|
|
311
|
-
\`\`\`
|
|
312
|
-
/mf <issue-number> # Full workflow (default: swarm mode)
|
|
313
|
-
/mf -e <issue-number> # Enhance only: research and update ticket
|
|
314
|
-
/mf -r <issue-number> # Research only: analyze issue
|
|
315
|
-
/mf -n <issue-number> # Naked mode: single Claude, no agents
|
|
316
|
-
/mf -sw <issue-number> # Swarm mode (explicit, default)
|
|
317
|
-
\`\`\`
|
|
318
|
-
|
|
319
|
-
## Workflow
|
|
320
|
-
|
|
321
|
-
1. **Research** — Fetch issue, search memory, read guidance, explore codebase
|
|
322
|
-
2. **Enhance** — Update issue with implementation plan, affected files, test plan
|
|
323
|
-
3. **Implement** — Create branch, implement changes following the plan
|
|
324
|
-
4. **Test** — Write and run unit/integration/E2E tests (ALL must pass)
|
|
325
|
-
5. **Simplify** — Run /simplify on changed code for quality review
|
|
326
|
-
6. **PR** — Commit, create PR, update issue status, store learnings
|
|
327
|
-
|
|
328
|
-
## Parse Arguments
|
|
329
|
-
|
|
330
|
-
\`\`\`javascript
|
|
331
|
-
const args = "$ARGUMENTS".trim().split(/\\s+/);
|
|
332
|
-
let workflowMode = "full";
|
|
333
|
-
let execMode = "swarm";
|
|
334
|
-
let issueNumber = null;
|
|
335
|
-
|
|
336
|
-
for (let i = 0; i < args.length; i++) {
|
|
337
|
-
const arg = args[i];
|
|
338
|
-
if (arg === "-e" || arg === "--enhance") workflowMode = "enhance";
|
|
339
|
-
else if (arg === "-r" || arg === "--research") workflowMode = "research";
|
|
340
|
-
else if (arg === "-sw" || arg === "--swarm") execMode = "swarm";
|
|
341
|
-
else if (arg === "-n" || arg === "--naked") execMode = "naked";
|
|
342
|
-
else if (/^\\d+$/.test(arg)) issueNumber = arg;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (!issueNumber) throw new Error("Issue number required. Usage: /mf <issue-number>");
|
|
346
|
-
\`\`\`
|
|
347
|
-
|
|
348
|
-
## Execution
|
|
349
|
-
|
|
350
|
-
Full mode executes without prompts:
|
|
351
|
-
1. Fetch issue via \`gh issue view\`
|
|
352
|
-
2. Search memory for relevant patterns
|
|
353
|
-
3. Research codebase with Explore agents
|
|
354
|
-
4. Enhance issue with implementation plan
|
|
355
|
-
5. Create branch, assign issue, implement
|
|
356
|
-
6. Run tests (unit + integration + E2E)
|
|
357
|
-
7. Run /simplify on changed code
|
|
358
|
-
8. Create PR, update issue, store learnings
|
|
359
|
-
|
|
360
|
-
All testing, linting, and quality gates are mandatory. PR cannot be created until all tests pass.
|
|
298
|
+
const skillContent = `---
|
|
299
|
+
name: mf
|
|
300
|
+
description: MoFlo ticket workflow - analyze and execute GitHub issues
|
|
301
|
+
arguments: "[options] <issue-number>"
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
# /mf - MoFlo Ticket Workflow
|
|
305
|
+
|
|
306
|
+
Execute GitHub issues through a full automated workflow.
|
|
307
|
+
|
|
308
|
+
**Arguments:** $ARGUMENTS
|
|
309
|
+
|
|
310
|
+
## Usage
|
|
311
|
+
|
|
312
|
+
\`\`\`
|
|
313
|
+
/mf <issue-number> # Full workflow (default: swarm mode)
|
|
314
|
+
/mf -e <issue-number> # Enhance only: research and update ticket
|
|
315
|
+
/mf -r <issue-number> # Research only: analyze issue
|
|
316
|
+
/mf -n <issue-number> # Naked mode: single Claude, no agents
|
|
317
|
+
/mf -sw <issue-number> # Swarm mode (explicit, default)
|
|
318
|
+
\`\`\`
|
|
319
|
+
|
|
320
|
+
## Workflow
|
|
321
|
+
|
|
322
|
+
1. **Research** — Fetch issue, search memory, read guidance, explore codebase
|
|
323
|
+
2. **Enhance** — Update issue with implementation plan, affected files, test plan
|
|
324
|
+
3. **Implement** — Create branch, implement changes following the plan
|
|
325
|
+
4. **Test** — Write and run unit/integration/E2E tests (ALL must pass)
|
|
326
|
+
5. **Simplify** — Run /simplify on changed code for quality review
|
|
327
|
+
6. **PR** — Commit, create PR, update issue status, store learnings
|
|
328
|
+
|
|
329
|
+
## Parse Arguments
|
|
330
|
+
|
|
331
|
+
\`\`\`javascript
|
|
332
|
+
const args = "$ARGUMENTS".trim().split(/\\s+/);
|
|
333
|
+
let workflowMode = "full";
|
|
334
|
+
let execMode = "swarm";
|
|
335
|
+
let issueNumber = null;
|
|
336
|
+
|
|
337
|
+
for (let i = 0; i < args.length; i++) {
|
|
338
|
+
const arg = args[i];
|
|
339
|
+
if (arg === "-e" || arg === "--enhance") workflowMode = "enhance";
|
|
340
|
+
else if (arg === "-r" || arg === "--research") workflowMode = "research";
|
|
341
|
+
else if (arg === "-sw" || arg === "--swarm") execMode = "swarm";
|
|
342
|
+
else if (arg === "-n" || arg === "--naked") execMode = "naked";
|
|
343
|
+
else if (/^\\d+$/.test(arg)) issueNumber = arg;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (!issueNumber) throw new Error("Issue number required. Usage: /mf <issue-number>");
|
|
347
|
+
\`\`\`
|
|
348
|
+
|
|
349
|
+
## Execution
|
|
350
|
+
|
|
351
|
+
Full mode executes without prompts:
|
|
352
|
+
1. Fetch issue via \`gh issue view\`
|
|
353
|
+
2. Search memory for relevant patterns
|
|
354
|
+
3. Research codebase with Explore agents
|
|
355
|
+
4. Enhance issue with implementation plan
|
|
356
|
+
5. Create branch, assign issue, implement
|
|
357
|
+
6. Run tests (unit + integration + E2E)
|
|
358
|
+
7. Run /simplify on changed code
|
|
359
|
+
8. Create PR, update issue, store learnings
|
|
360
|
+
|
|
361
|
+
All testing, linting, and quality gates are mandatory. PR cannot be created until all tests pass.
|
|
361
362
|
`;
|
|
362
363
|
fs.writeFileSync(skillFile, skillContent, 'utf-8');
|
|
363
364
|
return { name: '.claude/skills/mf/', status: 'created', detail: '/mf skill ready' };
|
|
@@ -385,64 +386,64 @@ function generateClaudeMd(root, force) {
|
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
|
-
const mofloSection = `
|
|
389
|
-
${MOFLO_MARKER}
|
|
390
|
-
## MoFlo — AI Agent Orchestration
|
|
391
|
-
|
|
392
|
-
This project uses [MoFlo](https://github.com/eric-cielo/moflo) for AI-assisted development workflows.
|
|
393
|
-
|
|
394
|
-
### FIRST ACTION ON EVERY PROMPT: Search Memory
|
|
395
|
-
|
|
396
|
-
Your first tool call for every new user prompt MUST be a memory search. Do this BEFORE Glob, Grep, Read, or any file exploration.
|
|
397
|
-
|
|
398
|
-
\`\`\`
|
|
399
|
-
mcp__claude-flow__memory_search — query: "<task description>", namespace: "guidance" or "patterns" or "code-map"
|
|
400
|
-
\`\`\`
|
|
401
|
-
|
|
402
|
-
For codebase navigation, search the \`code-map\` namespace first. For patterns and domain knowledge, search \`patterns\` and \`guidance\`.
|
|
403
|
-
|
|
404
|
-
### Workflow Gates (enforced automatically)
|
|
405
|
-
|
|
406
|
-
These are enforced by hooks — you cannot bypass them:
|
|
407
|
-
- **Memory-first**: Must search memory before Glob/Grep/Read on guidance files
|
|
408
|
-
- **TaskCreate-first**: Must call TaskCreate before spawning Agent tool
|
|
409
|
-
- **Context tracking**: Session tracked as FRESH → MODERATE → DEPLETED → CRITICAL
|
|
410
|
-
|
|
411
|
-
### /mf Skill — Issue Execution
|
|
412
|
-
|
|
413
|
-
Use \`/mf <issue-number>\` to execute GitHub issues through the full workflow:
|
|
414
|
-
Research → Enhance → Implement → Test → Simplify → PR
|
|
415
|
-
|
|
416
|
-
### MCP Tools Reference
|
|
417
|
-
|
|
418
|
-
| Tool | Purpose |
|
|
419
|
-
|------|---------|
|
|
420
|
-
| \`mcp__claude-flow__memory_search\` | Semantic search across indexed knowledge |
|
|
421
|
-
| \`mcp__claude-flow__memory_store\` | Store patterns and decisions |
|
|
422
|
-
| \`mcp__claude-flow__hooks_route\` | Route task to optimal agent type |
|
|
423
|
-
| \`mcp__claude-flow__hooks_pre-task\` | Record task start |
|
|
424
|
-
| \`mcp__claude-flow__hooks_post-task\` | Record task completion for learning |
|
|
425
|
-
|
|
426
|
-
### Agent Icon Mapping
|
|
427
|
-
|
|
428
|
-
| Icon | Agent Type | Use For |
|
|
429
|
-
|------|------------|---------|
|
|
430
|
-
| 🔍 | Explore | Research, codebase exploration |
|
|
431
|
-
| 📐 | Plan | Architecture, design |
|
|
432
|
-
| ⚙️ | General | General coding tasks |
|
|
433
|
-
| 🧪 | Test | Writing tests |
|
|
434
|
-
| 🔬 | Analyzer | Code review, analysis |
|
|
435
|
-
| 🔧 | Backend | API implementation |
|
|
436
|
-
|
|
437
|
-
### Non-Trivial Task Workflow
|
|
438
|
-
|
|
439
|
-
For any task beyond a single-line fix:
|
|
440
|
-
1. Search memory first (mandatory gate)
|
|
441
|
-
2. Create tasks with TaskCreate (mandatory gate)
|
|
442
|
-
3. Spawn agents in waves (Explore first, then Implement + Test)
|
|
443
|
-
4. Update task status as you go
|
|
444
|
-
5. Store learnings after completion
|
|
445
|
-
${MOFLO_MARKER_END}
|
|
389
|
+
const mofloSection = `
|
|
390
|
+
${MOFLO_MARKER}
|
|
391
|
+
## MoFlo — AI Agent Orchestration
|
|
392
|
+
|
|
393
|
+
This project uses [MoFlo](https://github.com/eric-cielo/moflo) for AI-assisted development workflows.
|
|
394
|
+
|
|
395
|
+
### FIRST ACTION ON EVERY PROMPT: Search Memory
|
|
396
|
+
|
|
397
|
+
Your first tool call for every new user prompt MUST be a memory search. Do this BEFORE Glob, Grep, Read, or any file exploration.
|
|
398
|
+
|
|
399
|
+
\`\`\`
|
|
400
|
+
mcp__claude-flow__memory_search — query: "<task description>", namespace: "guidance" or "patterns" or "code-map"
|
|
401
|
+
\`\`\`
|
|
402
|
+
|
|
403
|
+
For codebase navigation, search the \`code-map\` namespace first. For patterns and domain knowledge, search \`patterns\` and \`guidance\`.
|
|
404
|
+
|
|
405
|
+
### Workflow Gates (enforced automatically)
|
|
406
|
+
|
|
407
|
+
These are enforced by hooks — you cannot bypass them:
|
|
408
|
+
- **Memory-first**: Must search memory before Glob/Grep/Read on guidance files
|
|
409
|
+
- **TaskCreate-first**: Must call TaskCreate before spawning Agent tool
|
|
410
|
+
- **Context tracking**: Session tracked as FRESH → MODERATE → DEPLETED → CRITICAL
|
|
411
|
+
|
|
412
|
+
### /mf Skill — Issue Execution
|
|
413
|
+
|
|
414
|
+
Use \`/mf <issue-number>\` to execute GitHub issues through the full workflow:
|
|
415
|
+
Research → Enhance → Implement → Test → Simplify → PR
|
|
416
|
+
|
|
417
|
+
### MCP Tools Reference
|
|
418
|
+
|
|
419
|
+
| Tool | Purpose |
|
|
420
|
+
|------|---------|
|
|
421
|
+
| \`mcp__claude-flow__memory_search\` | Semantic search across indexed knowledge |
|
|
422
|
+
| \`mcp__claude-flow__memory_store\` | Store patterns and decisions |
|
|
423
|
+
| \`mcp__claude-flow__hooks_route\` | Route task to optimal agent type |
|
|
424
|
+
| \`mcp__claude-flow__hooks_pre-task\` | Record task start |
|
|
425
|
+
| \`mcp__claude-flow__hooks_post-task\` | Record task completion for learning |
|
|
426
|
+
|
|
427
|
+
### Agent Icon Mapping
|
|
428
|
+
|
|
429
|
+
| Icon | Agent Type | Use For |
|
|
430
|
+
|------|------------|---------|
|
|
431
|
+
| 🔍 | Explore | Research, codebase exploration |
|
|
432
|
+
| 📐 | Plan | Architecture, design |
|
|
433
|
+
| ⚙️ | General | General coding tasks |
|
|
434
|
+
| 🧪 | Test | Writing tests |
|
|
435
|
+
| 🔬 | Analyzer | Code review, analysis |
|
|
436
|
+
| 🔧 | Backend | API implementation |
|
|
437
|
+
|
|
438
|
+
### Non-Trivial Task Workflow
|
|
439
|
+
|
|
440
|
+
For any task beyond a single-line fix:
|
|
441
|
+
1. Search memory first (mandatory gate)
|
|
442
|
+
2. Create tasks with TaskCreate (mandatory gate)
|
|
443
|
+
3. Spawn agents in waves (Explore first, then Implement + Test)
|
|
444
|
+
4. Update task status as you go
|
|
445
|
+
5. Store learnings after completion
|
|
446
|
+
${MOFLO_MARKER_END}
|
|
446
447
|
`;
|
|
447
448
|
const finalContent = existing.trimEnd() + '\n' + mofloSection;
|
|
448
449
|
fs.writeFileSync(claudeMdPath, finalContent, 'utf-8');
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@claude-flow/memory",
|
|
3
|
-
"version": "3.0.0-alpha.11",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Memory module - AgentDB unification, HNSW indexing, vector search, hybrid SQLite+AgentDB backend (ADR-009)",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./dist/index.js",
|
|
10
|
-
"./*": "./dist/*.js"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "vitest run",
|
|
14
|
-
"bench": "vitest bench",
|
|
15
|
-
"build": "tsc"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@claude-flow/memory",
|
|
3
|
+
"version": "3.0.0-alpha.11",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Memory module - AgentDB unification, HNSW indexing, vector search, hybrid SQLite+AgentDB backend (ADR-009)",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./*": "./dist/*.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"bench": "vitest bench",
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"prebuild": "rm -rf dist",
|
|
17
|
+
"prepublishOnly": "npm run build && node -e \"const m = await import('./dist/index.js'); const required = ['ControllerRegistry','HnswLite','PersistentSonaCoordinator','RvfBackend','RvfLearningStore','RvfMigrator']; const missing = required.filter(k => !m[k]); if (missing.length) { console.error('Missing exports:', missing); process.exit(1); } console.log('All required exports present');\""
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"agentdb": "^3.0.0-alpha.10",
|
|
21
|
+
"sql.js": "^1.10.3"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/sql.js": "^1.4.9",
|
|
25
|
+
"vitest": "^4.0.16"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"tag": "v3alpha"
|
|
34
|
+
},
|
|
35
|
+
"os": [
|
|
36
|
+
"darwin",
|
|
37
|
+
"linux",
|
|
38
|
+
"win32"
|
|
39
|
+
],
|
|
40
|
+
"cpu": [
|
|
41
|
+
"x64",
|
|
42
|
+
"arm64"
|
|
43
|
+
]
|
|
44
|
+
}
|