moflo 4.9.9 → 4.9.11
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/shipped/moflo-cli-reference.md +201 -0
- package/.claude/guidance/shipped/moflo-core-guidance.md +30 -391
- package/.claude/guidance/shipped/moflo-cross-platform.md +20 -1
- package/.claude/guidance/shipped/moflo-guidance-rules.md +144 -0
- package/.claude/guidance/shipped/moflo-memory-strategy.md +1 -0
- package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +33 -6
- package/.claude/guidance/shipped/moflo-session-start.md +154 -0
- package/.claude/guidance/shipped/moflo-settings-injection.md +124 -0
- package/.claude/guidance/shipped/moflo-source-hygiene.md +1 -1
- package/.claude/guidance/shipped/moflo-spell-custom-steps.md +126 -0
- package/.claude/guidance/shipped/moflo-spell-engine.md +4 -101
- package/.claude/guidance/shipped/moflo-subagents.md +10 -0
- package/.claude/guidance/shipped/moflo-task-icons.md +9 -0
- package/.claude/guidance/shipped/moflo-user-facing-language.md +8 -0
- package/.claude/guidance/shipped/moflo-yaml-reference.md +191 -0
- package/.claude/helpers/prompt-hook.mjs +16 -2
- package/.claude/skills/connector-builder/SKILL.md +1 -1
- package/.claude/skills/guidance/SKILL.md +158 -0
- package/.claude/skills/publish/SKILL.md +16 -0
- package/.claude/skills/simplify/SKILL.md +82 -0
- package/.claude/skills/spell-builder/SKILL.md +2 -2
- package/.claude/skills/spell-builder/architecture.md +1 -1
- package/.claude/skills/spell-schedule/SKILL.md +167 -0
- package/bin/generate-code-map.mjs +4 -5
- package/bin/hooks.mjs +4 -14
- package/bin/index-all.mjs +2 -10
- package/bin/index-guidance.mjs +5 -7
- package/bin/index-patterns.mjs +7 -9
- package/bin/index-tests.mjs +4 -5
- package/bin/lib/resolve-bin.mjs +62 -0
- package/bin/session-start-launcher.mjs +32 -24
- package/dist/src/cli/commands/doctor.js +30 -0
- package/dist/src/cli/index.js +18 -0
- package/dist/src/cli/init/moflo-init.js +14 -1
- package/dist/src/cli/init/settings-generator.js +18 -3
- package/dist/src/cli/services/daemon-readiness.js +12 -0
- package/dist/src/cli/services/hook-wiring.js +54 -1
- package/dist/src/cli/services/process-registry.js +58 -0
- package/dist/src/cli/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Moflo CLI Surface — Commands, Agents, Hooks
|
|
2
|
+
|
|
3
|
+
**Purpose:** Reference for moflo's CLI command surface, available agents, hooks, and consensus topologies. Use this when picking a command/agent/hook by name; for higher-level workflow guidance see `moflo-core-guidance.md`, and for `moflo.yaml` knobs that gate this surface see `moflo-yaml-reference.md`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## CLI Commands (26 Commands, 140+ Subcommands)
|
|
8
|
+
|
|
9
|
+
### Core Commands
|
|
10
|
+
|
|
11
|
+
| Command | Subcommands | Description |
|
|
12
|
+
|-------------|-------------|--------------------------------------------------------------------------|
|
|
13
|
+
| `init` | 4 | Project initialization with wizard, presets, skills, hooks |
|
|
14
|
+
| `agent` | 8 | Agent lifecycle (spawn, list, status, stop, metrics, pool, health, logs) |
|
|
15
|
+
| `swarm` | 6 | Multi-agent swarm coordination and orchestration |
|
|
16
|
+
| `memory` | 11 | sql.js + HNSW vector search, 150x-12,500x faster |
|
|
17
|
+
| `mcp` | 9 | MCP server management and tool execution |
|
|
18
|
+
| `task` | 6 | Task creation, assignment, and lifecycle |
|
|
19
|
+
| `session` | 7 | Session state management and persistence |
|
|
20
|
+
| `config` | 7 | Configuration management and provider setup |
|
|
21
|
+
| `status` | 3 | System status monitoring with watch mode |
|
|
22
|
+
| `workflow` | 6 | Workflow execution and template management |
|
|
23
|
+
| `hooks` | 17 | Self-learning hooks + 12 background workers |
|
|
24
|
+
| `hive-mind` | 6 | Queen-led Byzantine fault-tolerant consensus |
|
|
25
|
+
|
|
26
|
+
### Advanced Commands
|
|
27
|
+
|
|
28
|
+
| Command | Subcommands | Description |
|
|
29
|
+
|---------------|-------------|-------------------------------------------------------------------------------|
|
|
30
|
+
| `daemon` | 5 | Background worker daemon (start, stop, status, trigger, enable) |
|
|
31
|
+
| `neural` | 5 | Neural pattern training (train, status, patterns, predict, optimize) |
|
|
32
|
+
| `security` | 6 | Security scanning (scan, audit, cve, threats, validate, report) |
|
|
33
|
+
| `performance` | 5 | Performance profiling (benchmark, profile, metrics, optimize, report) |
|
|
34
|
+
| `providers` | 5 | AI providers (list, add, remove, test, configure) |
|
|
35
|
+
| `plugins` | 5 | Plugin management (list, install, uninstall, enable, disable) |
|
|
36
|
+
| `deployment` | 5 | Deployment management (deploy, rollback, status, environments, release) |
|
|
37
|
+
| `embeddings` | 4 | Vector embeddings (embed, batch, search, init) — fastembed runtime |
|
|
38
|
+
| `claims` | 4 | Claims-based authorization (check, grant, revoke, list) |
|
|
39
|
+
| `migrate` | 5 | V2 to V3 migration with rollback support |
|
|
40
|
+
| `epic` | 3 | Epic orchestrator — run/status/reset with single-branch or auto-merge strategy |
|
|
41
|
+
| `doctor` | 1 | System diagnostics with health checks |
|
|
42
|
+
| `completions` | 4 | Shell completions (bash, zsh, fish, powershell) |
|
|
43
|
+
|
|
44
|
+
### Quick Examples (MCP Preferred)
|
|
45
|
+
|
|
46
|
+
| Task | MCP Tool | CLI Fallback |
|
|
47
|
+
|------|----------|-------------|
|
|
48
|
+
| Search memory | `mcp__moflo__memory_search` | `memory search --query "..."` |
|
|
49
|
+
| Spawn agent | `mcp__moflo__agent_spawn` | `agent spawn -t coder --name my-coder` |
|
|
50
|
+
| Init swarm | `mcp__moflo__swarm_init` | `swarm init --v3-mode` |
|
|
51
|
+
| System health | `mcp__moflo__system_health` | `doctor --fix` |
|
|
52
|
+
| Benchmark | `mcp__moflo__performance_benchmark` | `performance benchmark --suite all` |
|
|
53
|
+
|
|
54
|
+
**CLI-only (no MCP equivalent — setup tasks):**
|
|
55
|
+
```bash
|
|
56
|
+
npx flo init --wizard
|
|
57
|
+
npx flo daemon start
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Available Agents (60+ Types)
|
|
63
|
+
|
|
64
|
+
### Core Development
|
|
65
|
+
`coder`, `reviewer`, `tester`, `planner`, `researcher`
|
|
66
|
+
|
|
67
|
+
### Specialized Agents
|
|
68
|
+
`security-architect`, `security-auditor`, `memory-specialist`, `performance-engineer`
|
|
69
|
+
|
|
70
|
+
### Swarm Coordination
|
|
71
|
+
`hierarchical-coordinator`, `mesh-coordinator`, `adaptive-coordinator`, `collective-intelligence-coordinator`, `swarm-memory-manager`
|
|
72
|
+
|
|
73
|
+
### Consensus & Distributed
|
|
74
|
+
`byzantine-coordinator`, `raft-manager`, `gossip-coordinator`, `consensus-builder`, `crdt-synchronizer`, `quorum-manager`, `security-manager`
|
|
75
|
+
|
|
76
|
+
### Performance & Optimization
|
|
77
|
+
`perf-analyzer`, `performance-benchmarker`, `task-orchestrator`, `memory-coordinator`, `smart-agent`
|
|
78
|
+
|
|
79
|
+
### GitHub & Repository
|
|
80
|
+
`github-modes`, `pr-manager`, `code-review-swarm`, `issue-tracker`, `release-manager`, `workflow-automation`, `project-board-sync`, `repo-architect`, `multi-repo-swarm`
|
|
81
|
+
|
|
82
|
+
### SPARC Methodology
|
|
83
|
+
`sparc-coord`, `sparc-coder`, `specification`, `pseudocode`, `architecture`, `refinement`
|
|
84
|
+
|
|
85
|
+
### Specialized Development
|
|
86
|
+
`backend-dev`, `mobile-dev`, `ml-developer`, `cicd-engineer`, `api-docs`, `system-architect`, `code-analyzer`, `base-template-generator`
|
|
87
|
+
|
|
88
|
+
### Testing & Validation
|
|
89
|
+
`tdd-london-swarm`, `production-validator`
|
|
90
|
+
|
|
91
|
+
### Agent Routing (Anti-Drift)
|
|
92
|
+
|
|
93
|
+
| Code | Task | Agents |
|
|
94
|
+
|------|-------------|-------------------------------------------------|
|
|
95
|
+
| 1 | Bug Fix | coordinator, researcher, coder, tester |
|
|
96
|
+
| 3 | Feature | coordinator, architect, coder, tester, reviewer |
|
|
97
|
+
| 5 | Refactor | coordinator, architect, coder, reviewer |
|
|
98
|
+
| 7 | Performance | coordinator, perf-engineer, coder |
|
|
99
|
+
| 9 | Security | coordinator, security-architect, auditor |
|
|
100
|
+
| 11 | Docs | researcher, api-docs |
|
|
101
|
+
|
|
102
|
+
**Codes 1-9: hierarchical/specialized (anti-drift). Code 11: mesh/balanced.**
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Hooks System (27 Hooks + 12 Workers)
|
|
107
|
+
|
|
108
|
+
### All Available Hooks
|
|
109
|
+
|
|
110
|
+
| Hook | Description | Key Options |
|
|
111
|
+
|--------------------|------------------------------------------|---------------------------------------------|
|
|
112
|
+
| `pre-edit` | Get context before editing files | `--file`, `--operation` |
|
|
113
|
+
| `post-edit` | Record editing outcome for learning | `--file`, `--success`, `--train-neural` |
|
|
114
|
+
| `pre-command` | Assess risk before commands | `--command`, `--validate-safety` |
|
|
115
|
+
| `post-command` | Record command execution outcome | `--command`, `--track-metrics` |
|
|
116
|
+
| `pre-task` | Record task start, get agent suggestions | `--description`, `--coordinate-swarm` |
|
|
117
|
+
| `post-task` | Record task completion for learning | `--task-id`, `--success`, `--store-results` |
|
|
118
|
+
| `session-start` | Start/restore session | `--session-id`, `--auto-configure` |
|
|
119
|
+
| `session-end` | End session and persist state | `--generate-summary`, `--export-metrics` |
|
|
120
|
+
| `session-restore` | Restore a previous session | `--session-id`, `--latest` |
|
|
121
|
+
| `route` | Route task to optimal agent | `--task`, `--context`, `--top-k` |
|
|
122
|
+
| `explain` | Explain routing decision | `--topic`, `--detailed` |
|
|
123
|
+
| `pretrain` | Bootstrap intelligence from repo | `--model-type`, `--epochs` |
|
|
124
|
+
| `build-agents` | Generate optimized agent configs | `--agent-types`, `--focus` |
|
|
125
|
+
| `metrics` | View learning metrics dashboard | `--v3-dashboard`, `--format` |
|
|
126
|
+
| `transfer` | Transfer patterns via IPFS registry | `store`, `from-project` |
|
|
127
|
+
| `intelligence` | RuVector intelligence system | `trajectory-*`, `pattern-*`, `stats` |
|
|
128
|
+
| `worker` | Background worker management | `list`, `dispatch`, `status`, `detect` |
|
|
129
|
+
| `coverage-route` | Route based on test coverage gaps | `--task`, `--path` |
|
|
130
|
+
| `coverage-suggest` | Suggest coverage improvements | `--path` |
|
|
131
|
+
| `coverage-gaps` | List coverage gaps with priorities | `--format`, `--limit` |
|
|
132
|
+
|
|
133
|
+
### 12 Background Workers
|
|
134
|
+
|
|
135
|
+
| Worker | Priority | Description |
|
|
136
|
+
|---------------|----------|----------------------------|
|
|
137
|
+
| `ultralearn` | normal | Deep knowledge acquisition |
|
|
138
|
+
| `optimize` | high | Performance optimization |
|
|
139
|
+
| `consolidate` | low | Memory consolidation |
|
|
140
|
+
| `predict` | normal | Predictive preloading |
|
|
141
|
+
| `audit` | critical | Security analysis |
|
|
142
|
+
| `map` | normal | Codebase mapping |
|
|
143
|
+
| `preload` | low | Resource preloading |
|
|
144
|
+
| `deepdive` | normal | Deep code analysis |
|
|
145
|
+
| `document` | normal | Auto-documentation |
|
|
146
|
+
| `refactor` | normal | Refactoring suggestions |
|
|
147
|
+
| `benchmark` | normal | Performance benchmarking |
|
|
148
|
+
| `testgaps` | normal | Test coverage analysis |
|
|
149
|
+
|
|
150
|
+
### Essential Hook Commands (MCP Preferred)
|
|
151
|
+
|
|
152
|
+
| Hook | MCP Tool | Key Params |
|
|
153
|
+
|------|----------|------------|
|
|
154
|
+
| Pre-task | `mcp__moflo__hooks_pre-task` | `description` |
|
|
155
|
+
| Post-task | `mcp__moflo__hooks_post-task` | `taskId`, `success` |
|
|
156
|
+
| Post-edit | `mcp__moflo__hooks_post-edit` | `file`, `trainNeural` |
|
|
157
|
+
| Session-start | `mcp__moflo__hooks_session-start` | `sessionId` |
|
|
158
|
+
| Session-end | `mcp__moflo__hooks_session-end` | `exportMetrics` |
|
|
159
|
+
| Route | `mcp__moflo__hooks_route` | `task` |
|
|
160
|
+
| Worker-dispatch | `mcp__moflo__hooks_worker-dispatch` | `trigger` |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Hive-Mind Consensus
|
|
165
|
+
|
|
166
|
+
### Topologies
|
|
167
|
+
|
|
168
|
+
- `hierarchical` — Queen controls workers directly
|
|
169
|
+
- `mesh` — Fully connected peer network
|
|
170
|
+
- `hierarchical-mesh` — Hybrid (recommended)
|
|
171
|
+
- `adaptive` — Dynamic based on load
|
|
172
|
+
|
|
173
|
+
### Consensus Strategies
|
|
174
|
+
|
|
175
|
+
- `byzantine` — BFT (tolerates f < n/3 faulty)
|
|
176
|
+
- `raft` — Leader-based (tolerates f < n/2)
|
|
177
|
+
- `gossip` — Epidemic for eventual consistency
|
|
178
|
+
- `crdt` — Conflict-free replicated data types
|
|
179
|
+
- `quorum` — Configurable quorum-based
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## RuVector Integration (HNSW Vector Search)
|
|
184
|
+
|
|
185
|
+
| Feature | Performance | Description |
|
|
186
|
+
|---------|-------------|-------------|
|
|
187
|
+
| **HNSW Index** | 150x–12,500x faster | Hierarchical Navigable Small World search |
|
|
188
|
+
| **MicroLoRA** | <100µs adaptation | Fast model adaptation (508k+ ops/sec) |
|
|
189
|
+
| **FlashAttention** | 2.49x–7.47x speedup | Optimized attention computation |
|
|
190
|
+
| **Int8 Quantization** | 3.92x memory reduction | Compressed weight storage |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## See Also
|
|
195
|
+
|
|
196
|
+
- `.claude/guidance/shipped/moflo-core-guidance.md` — Hub: getting started, MCP setup, troubleshooting, comparison table
|
|
197
|
+
- `.claude/guidance/shipped/moflo-yaml-reference.md` — `moflo.yaml` schema and runtime env-var overrides for the surfaces listed here
|
|
198
|
+
- `.claude/guidance/shipped/moflo-claude-swarm-cohesion.md` — How TaskCreate + swarm coordinators cooperate (uses the agent codes above)
|
|
199
|
+
- `.claude/guidance/shipped/moflo-subagents.md` — Subagent memory-first protocol and store-back rules
|
|
200
|
+
- `.claude/guidance/shipped/moflo-memory-strategy.md` — Memory namespaces, RAG linking, and search query patterns
|
|
201
|
+
- `.claude/guidance/shipped/moflo-memorydb-maintenance.md` — How the namespaces above are populated and refreshed
|