moflo 4.10.22 → 4.10.24
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-skills-reference.md +1 -1
- package/.claude/helpers/gate.cjs +2 -2
- package/.claude/skills/distill/SKILL.md +10 -0
- package/README.md +1 -1
- package/bin/gate.cjs +2 -2
- package/dist/src/cli/commands/agent.js +14 -14
- package/dist/src/cli/commands/analyze.js +52 -52
- package/dist/src/cli/commands/benchmark.js +14 -14
- package/dist/src/cli/commands/claims.js +15 -15
- package/dist/src/cli/commands/completions.js +40 -40
- package/dist/src/cli/commands/config.js +8 -8
- package/dist/src/cli/commands/daemon.js +24 -24
- package/dist/src/cli/commands/deployment.js +15 -15
- package/dist/src/cli/commands/doctor-checks-config.js +6 -6
- package/dist/src/cli/commands/doctor.js +10 -10
- package/dist/src/cli/commands/embeddings.js +49 -49
- package/dist/src/cli/commands/guidance.js +22 -22
- package/dist/src/cli/commands/hive-mind.js +21 -21
- package/dist/src/cli/commands/hooks.js +95 -95
- package/dist/src/cli/commands/init.js +17 -17
- package/dist/src/cli/commands/issues.js +6 -6
- package/dist/src/cli/commands/mcp.js +10 -10
- package/dist/src/cli/commands/memory.js +56 -47
- package/dist/src/cli/commands/migrate.js +5 -5
- package/dist/src/cli/commands/neural.js +31 -31
- package/dist/src/cli/commands/performance.js +13 -13
- package/dist/src/cli/commands/plugins.js +26 -26
- package/dist/src/cli/commands/process.js +32 -32
- package/dist/src/cli/commands/progress.js +5 -5
- package/dist/src/cli/commands/providers.js +13 -13
- package/dist/src/cli/commands/route.js +26 -26
- package/dist/src/cli/commands/security.js +19 -19
- package/dist/src/cli/commands/session.js +13 -13
- package/dist/src/cli/commands/start.js +11 -11
- package/dist/src/cli/commands/status.js +8 -8
- package/dist/src/cli/commands/swarm.js +7 -7
- package/dist/src/cli/commands/task.js +9 -9
- package/dist/src/cli/commands/transfer-store.js +16 -16
- package/dist/src/cli/commands/update.js +2 -2
- package/dist/src/cli/hooks/statusline/index.js +3 -3
- package/dist/src/cli/init/executor.js +7 -6
- package/dist/src/cli/init/helpers-generator.js +6 -6
- package/dist/src/cli/mcp-tools/hooks-tools.js +1 -1
- package/dist/src/cli/memory/auto-memory-bridge.js +1 -1
- package/dist/src/cli/memory/memory-initializer.js +1 -1
- package/dist/src/cli/plugins/tests/demo-plugin-store.js +6 -6
- package/dist/src/cli/version.js +1 -1
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ These drive code changes against GitHub issues and the working tree.
|
|
|
29
29
|
| Skill | Use it when |
|
|
30
30
|
|-------|-------------|
|
|
31
31
|
| `/flo` (alias `/fl`) | Execute a GitHub issue end to end: research → ticket → implement → test → simplify → PR. Detects and processes epics automatically. |
|
|
32
|
-
| `/flo-simplify` | Review the current diff for reuse, quality, and efficiency, then fix what it finds. Effort scales to the diff size. |
|
|
32
|
+
| `/flo-simplify` (alias `/distill`) | Review the current diff for reuse, quality, and efficiency, then fix what it finds. Effort scales to the diff size. |
|
|
33
33
|
|
|
34
34
|
## Setup, health, and audit skills
|
|
35
35
|
|
package/.claude/helpers/gate.cjs
CHANGED
|
@@ -630,7 +630,7 @@ switch (command) {
|
|
|
630
630
|
}
|
|
631
631
|
case 'record-skill-run': {
|
|
632
632
|
var skName = (process.env.TOOL_INPUT_skill || '');
|
|
633
|
-
if (skName === 'simplify' || skName === 'flo-simplify') {
|
|
633
|
+
if (skName === 'simplify' || skName === 'flo-simplify' || skName === 'distill') {
|
|
634
634
|
var s = readState();
|
|
635
635
|
var changed = false;
|
|
636
636
|
if (!s.simplifyRun) { s.simplifyRun = true; changed = true; }
|
|
@@ -720,7 +720,7 @@ switch (command) {
|
|
|
720
720
|
}
|
|
721
721
|
var missing = [];
|
|
722
722
|
if (config.testing_gate && !s.testsRun) missing.push('tests have not run since the last code edit (run npm test, vitest, jest, pytest, or similar)');
|
|
723
|
-
if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify has not run since the last code edit');
|
|
723
|
+
if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify (or /distill) has not run since the last code edit');
|
|
724
724
|
if (config.learnings_gate && !s.learningsStored) missing.push('learnings have not been stored (call mcp__moflo__memory_store)');
|
|
725
725
|
if (missing.length === 0) break;
|
|
726
726
|
process.stderr.write('BLOCKED: gh pr create requires the following before opening a PR:\n');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distill
|
|
3
|
+
description: Alias for /flo-simplify. Review changed code for reuse, quality, and efficiency, then fix any issues found — effort scales to the diff size.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /distill is an alias for /flo-simplify
|
|
7
|
+
|
|
8
|
+
This skill is identical to `/flo-simplify`. All documentation and logic lives in `.claude/skills/flo-simplify/SKILL.md`.
|
|
9
|
+
|
|
10
|
+
**Do not duplicate the /flo-simplify skill content here.** Read and follow `.claude/skills/flo-simplify/SKILL.md` in its entirety. Pass all arguments through unchanged.
|
package/README.md
CHANGED
|
@@ -477,7 +477,7 @@ Beyond `/flo`, `/spell-builder`, and `/eldar`, MoFlo ships a handful of focused
|
|
|
477
477
|
| Skill | Purpose |
|
|
478
478
|
|-------|---------|
|
|
479
479
|
| `/guidance` | Author and audit guidance docs. Default writes guidance for Claude into `.claude/guidance/` as Markdown applying moflo's universal rules. `-h` switches the audience to humans (lighter ruleset, writes into `docs/`). `--html` emits HTML with a minimal default stylesheet instead of Markdown. `-a` audits every doc in `.claude/guidance/` against the universal rules. |
|
|
480
|
-
| `/flo-simplify` | Adaptive code review on the current diff. Tier-based fan-out — trivial edits get a self-review, small diffs get one routed agent, cross-cutting refactors get three parallel agents. Routes through the moflo model router for cost-aware execution. (Named `/flo-simplify` to avoid colliding with Claude Code's built-in `/simplify
|
|
480
|
+
| `/flo-simplify` (alias `/distill`) | Adaptive code review on the current diff. Tier-based fan-out — trivial edits get a self-review, small diffs get one routed agent, cross-cutting refactors get three parallel agents. Routes through the moflo model router for cost-aware execution. (Named `/flo-simplify` to avoid colliding with Claude Code's built-in `/simplify`; also available as `/distill` for a more wizardy feel.) |
|
|
481
481
|
| `/commune` | Socratic requirements elicitation. Turns a fuzzy "I'm not sure exactly what I want yet" idea into a concrete spec through a short Q&A, then hands the result off to a `/flo` ticket, a spell, or memory. The pre-execution counterpart to `/meditate` — use it to *open* a unit of work. |
|
|
482
482
|
| `/divine` | Multi-hop web research with explicit confidence gating. Plans the inquiry, searches the web, scores its own confidence, and keeps digging until the answer is well-supported (or a hop cap is hit) — then returns a cited synthesis and remembers what worked so the next research run starts smarter. |
|
|
483
483
|
| `/meditate` | Deliberate session retrospective — distills durable lessons into the `learnings` memory namespace, deduped against what's already there. See [Learning From Your Sessions](#learning-from-your-sessions) for the full picture, including its automatic counterpart, auto-meditate. |
|
package/bin/gate.cjs
CHANGED
|
@@ -630,7 +630,7 @@ switch (command) {
|
|
|
630
630
|
}
|
|
631
631
|
case 'record-skill-run': {
|
|
632
632
|
var skName = (process.env.TOOL_INPUT_skill || '');
|
|
633
|
-
if (skName === 'simplify' || skName === 'flo-simplify') {
|
|
633
|
+
if (skName === 'simplify' || skName === 'flo-simplify' || skName === 'distill') {
|
|
634
634
|
var s = readState();
|
|
635
635
|
var changed = false;
|
|
636
636
|
if (!s.simplifyRun) { s.simplifyRun = true; changed = true; }
|
|
@@ -720,7 +720,7 @@ switch (command) {
|
|
|
720
720
|
}
|
|
721
721
|
var missing = [];
|
|
722
722
|
if (config.testing_gate && !s.testsRun) missing.push('tests have not run since the last code edit (run npm test, vitest, jest, pytest, or similar)');
|
|
723
|
-
if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify has not run since the last code edit');
|
|
723
|
+
if (config.simplify_gate && !s.simplifyRun) missing.push('/flo-simplify (or /distill) has not run since the last code edit');
|
|
724
724
|
if (config.learnings_gate && !s.learningsStored) missing.push('learnings have not been stored (call mcp__moflo__memory_store)');
|
|
725
725
|
if (missing.length === 0) break;
|
|
726
726
|
process.stderr.write('BLOCKED: gh pr create requires the following before opening a PR:\n');
|
|
@@ -121,8 +121,8 @@ const spawnCommand = {
|
|
|
121
121
|
}
|
|
122
122
|
],
|
|
123
123
|
examples: [
|
|
124
|
-
{ command: '
|
|
125
|
-
{ command: '
|
|
124
|
+
{ command: 'flo agent spawn --type coder --name bot-1', description: 'Spawn a coder agent' },
|
|
125
|
+
{ command: 'flo agent spawn -t researcher --task "Research React 19"', description: 'Spawn researcher with task' }
|
|
126
126
|
],
|
|
127
127
|
action: async (ctx) => {
|
|
128
128
|
let agentType = ctx.flags.type;
|
|
@@ -533,8 +533,8 @@ const poolCommand = {
|
|
|
533
533
|
}
|
|
534
534
|
],
|
|
535
535
|
examples: [
|
|
536
|
-
{ command: '
|
|
537
|
-
{ command: '
|
|
536
|
+
{ command: 'flo agent pool --size 5', description: 'Set pool size' },
|
|
537
|
+
{ command: 'flo agent pool --min 2 --max 15', description: 'Configure auto-scaling' }
|
|
538
538
|
],
|
|
539
539
|
action: async (ctx) => {
|
|
540
540
|
try {
|
|
@@ -614,8 +614,8 @@ const healthCommand = {
|
|
|
614
614
|
}
|
|
615
615
|
],
|
|
616
616
|
examples: [
|
|
617
|
-
{ command: '
|
|
618
|
-
{ command: '
|
|
617
|
+
{ command: 'flo agent health', description: 'Show all agents health' },
|
|
618
|
+
{ command: 'flo agent health -i agent-001 -d', description: 'Detailed health for specific agent' }
|
|
619
619
|
],
|
|
620
620
|
action: async (ctx) => {
|
|
621
621
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -737,9 +737,9 @@ const logsCommand = {
|
|
|
737
737
|
}
|
|
738
738
|
],
|
|
739
739
|
examples: [
|
|
740
|
-
{ command: '
|
|
741
|
-
{ command: '
|
|
742
|
-
{ command: '
|
|
740
|
+
{ command: 'flo agent logs -i agent-001', description: 'Show agent logs' },
|
|
741
|
+
{ command: 'flo agent logs -i agent-001 -f', description: 'Follow agent logs' },
|
|
742
|
+
{ command: 'flo agent logs -l error --since 1h', description: 'Show errors from last hour' }
|
|
743
743
|
],
|
|
744
744
|
action: async (ctx) => {
|
|
745
745
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -806,16 +806,16 @@ export const agentCommand = {
|
|
|
806
806
|
subcommands: [spawnCommand, listCommand, statusCommand, stopCommand, metricsCommand, poolCommand, healthCommand, logsCommand],
|
|
807
807
|
options: [],
|
|
808
808
|
examples: [
|
|
809
|
-
{ command: '
|
|
810
|
-
{ command: '
|
|
811
|
-
{ command: '
|
|
809
|
+
{ command: 'flo agent spawn -t coder', description: 'Spawn a coder agent' },
|
|
810
|
+
{ command: 'flo agent list', description: 'List all agents' },
|
|
811
|
+
{ command: 'flo agent status agent-001', description: 'Show agent status' }
|
|
812
812
|
],
|
|
813
813
|
action: async (ctx) => {
|
|
814
814
|
// Show help if no subcommand
|
|
815
815
|
output.writeln();
|
|
816
816
|
output.writeln(output.bold('Agent Management Commands'));
|
|
817
817
|
output.writeln();
|
|
818
|
-
output.writeln('Usage:
|
|
818
|
+
output.writeln('Usage: flo agent <subcommand> [options]');
|
|
819
819
|
output.writeln();
|
|
820
820
|
output.writeln('Subcommands:');
|
|
821
821
|
output.printList([
|
|
@@ -826,7 +826,7 @@ export const agentCommand = {
|
|
|
826
826
|
`${output.highlight('metrics')} - Show agent metrics`
|
|
827
827
|
]);
|
|
828
828
|
output.writeln();
|
|
829
|
-
output.writeln('Run "
|
|
829
|
+
output.writeln('Run "flo agent <subcommand> --help" for subcommand help');
|
|
830
830
|
return { success: true };
|
|
831
831
|
}
|
|
832
832
|
};
|
|
@@ -80,10 +80,10 @@ const diffCommand = {
|
|
|
80
80
|
},
|
|
81
81
|
],
|
|
82
82
|
examples: [
|
|
83
|
-
{ command: '
|
|
84
|
-
{ command: '
|
|
85
|
-
{ command: '
|
|
86
|
-
{ command: '
|
|
83
|
+
{ command: 'flo analyze diff --risk', description: 'Analyze current diff with risk assessment' },
|
|
84
|
+
{ command: 'flo analyze diff HEAD~1 --classify', description: 'Classify changes from last commit' },
|
|
85
|
+
{ command: 'flo analyze diff main..feature --format json', description: 'Compare branches with JSON output' },
|
|
86
|
+
{ command: 'flo analyze diff --reviewers', description: 'Get recommended reviewers for changes' },
|
|
87
87
|
],
|
|
88
88
|
action: async (ctx) => {
|
|
89
89
|
const ref = ctx.args[0] || 'HEAD';
|
|
@@ -248,8 +248,8 @@ const codeCommand = {
|
|
|
248
248
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
249
249
|
],
|
|
250
250
|
examples: [
|
|
251
|
-
{ command: '
|
|
252
|
-
{ command: '
|
|
251
|
+
{ command: 'flo analyze code -p ./src', description: 'Analyze source directory' },
|
|
252
|
+
{ command: 'flo analyze code --type complexity', description: 'Run complexity analysis' },
|
|
253
253
|
],
|
|
254
254
|
action: async (ctx) => {
|
|
255
255
|
const path = ctx.flags.path || '.';
|
|
@@ -361,10 +361,10 @@ const astCommand = {
|
|
|
361
361
|
},
|
|
362
362
|
],
|
|
363
363
|
examples: [
|
|
364
|
-
{ command: '
|
|
365
|
-
{ command: '
|
|
366
|
-
{ command: '
|
|
367
|
-
{ command: '
|
|
364
|
+
{ command: 'flo analyze ast src/', description: 'Analyze all files in src/' },
|
|
365
|
+
{ command: 'flo analyze ast src/index.ts --complexity', description: 'Analyze with complexity' },
|
|
366
|
+
{ command: 'flo analyze ast . --format json', description: 'JSON output' },
|
|
367
|
+
{ command: 'flo analyze ast src/ --symbols', description: 'Extract symbols' },
|
|
368
368
|
],
|
|
369
369
|
action: async (ctx) => {
|
|
370
370
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -580,8 +580,8 @@ const complexityAstCommand = {
|
|
|
580
580
|
},
|
|
581
581
|
],
|
|
582
582
|
examples: [
|
|
583
|
-
{ command: '
|
|
584
|
-
{ command: '
|
|
583
|
+
{ command: 'flo analyze complexity src/', description: 'Analyze complexity' },
|
|
584
|
+
{ command: 'flo analyze complexity src/ --threshold 15', description: 'Flag high complexity' },
|
|
585
585
|
],
|
|
586
586
|
action: async (ctx) => {
|
|
587
587
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -732,9 +732,9 @@ const symbolsCommand = {
|
|
|
732
732
|
},
|
|
733
733
|
],
|
|
734
734
|
examples: [
|
|
735
|
-
{ command: '
|
|
736
|
-
{ command: '
|
|
737
|
-
{ command: '
|
|
735
|
+
{ command: 'flo analyze symbols src/', description: 'Extract all symbols' },
|
|
736
|
+
{ command: 'flo analyze symbols src/ --type function', description: 'Only functions' },
|
|
737
|
+
{ command: 'flo analyze symbols src/ --format json', description: 'JSON output' },
|
|
738
738
|
],
|
|
739
739
|
action: async (ctx) => {
|
|
740
740
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -872,8 +872,8 @@ const importsCommand = {
|
|
|
872
872
|
},
|
|
873
873
|
],
|
|
874
874
|
examples: [
|
|
875
|
-
{ command: '
|
|
876
|
-
{ command: '
|
|
875
|
+
{ command: 'flo analyze imports src/', description: 'Analyze all imports' },
|
|
876
|
+
{ command: 'flo analyze imports src/ --external', description: 'Only npm packages' },
|
|
877
877
|
],
|
|
878
878
|
action: async (ctx) => {
|
|
879
879
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -1101,8 +1101,8 @@ const depsCommand = {
|
|
|
1101
1101
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
1102
1102
|
],
|
|
1103
1103
|
examples: [
|
|
1104
|
-
{ command: '
|
|
1105
|
-
{ command: '
|
|
1104
|
+
{ command: 'flo analyze deps --outdated', description: 'Show outdated dependencies' },
|
|
1105
|
+
{ command: 'flo analyze deps --security', description: 'Check for vulnerabilities' },
|
|
1106
1106
|
],
|
|
1107
1107
|
action: async (ctx) => {
|
|
1108
1108
|
const showOutdated = ctx.flags.outdated;
|
|
@@ -1158,9 +1158,9 @@ const boundariesCommand = {
|
|
|
1158
1158
|
},
|
|
1159
1159
|
],
|
|
1160
1160
|
examples: [
|
|
1161
|
-
{ command: '
|
|
1162
|
-
{ command: '
|
|
1163
|
-
{ command: '
|
|
1161
|
+
{ command: 'flo analyze boundaries src/', description: 'Find code boundaries in src/' },
|
|
1162
|
+
{ command: 'flo analyze boundaries -p 3 src/', description: 'Find 3 partitions' },
|
|
1163
|
+
{ command: 'flo analyze boundaries -f dot -o graph.dot src/', description: 'Export to DOT format' },
|
|
1164
1164
|
],
|
|
1165
1165
|
action: async (ctx) => {
|
|
1166
1166
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1310,9 +1310,9 @@ const modulesCommand = {
|
|
|
1310
1310
|
},
|
|
1311
1311
|
],
|
|
1312
1312
|
examples: [
|
|
1313
|
-
{ command: '
|
|
1314
|
-
{ command: '
|
|
1315
|
-
{ command: '
|
|
1313
|
+
{ command: 'flo analyze modules src/', description: 'Detect module communities' },
|
|
1314
|
+
{ command: 'flo analyze modules -f dot -o modules.dot src/', description: 'Export colored DOT graph' },
|
|
1315
|
+
{ command: 'flo analyze modules -m 3 src/', description: 'Only show communities with 3+ files' },
|
|
1316
1316
|
],
|
|
1317
1317
|
action: async (ctx) => {
|
|
1318
1318
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1458,9 +1458,9 @@ const dependenciesCommand = {
|
|
|
1458
1458
|
},
|
|
1459
1459
|
],
|
|
1460
1460
|
examples: [
|
|
1461
|
-
{ command: '
|
|
1462
|
-
{ command: '
|
|
1463
|
-
{ command: '
|
|
1461
|
+
{ command: 'flo analyze dependencies src/', description: 'Build dependency graph' },
|
|
1462
|
+
{ command: 'flo analyze dependencies -f dot -o deps.dot src/', description: 'Export to DOT' },
|
|
1463
|
+
{ command: 'flo analyze dependencies -i .ts,.tsx src/', description: 'Only TypeScript files' },
|
|
1464
1464
|
],
|
|
1465
1465
|
action: async (ctx) => {
|
|
1466
1466
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1622,8 +1622,8 @@ const circularCommand = {
|
|
|
1622
1622
|
},
|
|
1623
1623
|
],
|
|
1624
1624
|
examples: [
|
|
1625
|
-
{ command: '
|
|
1626
|
-
{ command: '
|
|
1625
|
+
{ command: 'flo analyze circular src/', description: 'Find circular dependencies' },
|
|
1626
|
+
{ command: 'flo analyze circular -s high src/', description: 'Only high severity cycles' },
|
|
1627
1627
|
],
|
|
1628
1628
|
action: async (ctx) => {
|
|
1629
1629
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1765,16 +1765,16 @@ export const analyzeCommand = {
|
|
|
1765
1765
|
},
|
|
1766
1766
|
],
|
|
1767
1767
|
examples: [
|
|
1768
|
-
{ command: '
|
|
1769
|
-
{ command: '
|
|
1770
|
-
{ command: '
|
|
1771
|
-
{ command: '
|
|
1772
|
-
{ command: '
|
|
1773
|
-
{ command: '
|
|
1774
|
-
{ command: '
|
|
1775
|
-
{ command: '
|
|
1776
|
-
{ command: '
|
|
1777
|
-
{ command: '
|
|
1768
|
+
{ command: 'flo analyze ast src/', description: 'Analyze code with AST parsing' },
|
|
1769
|
+
{ command: 'flo analyze complexity src/ --threshold 15', description: 'Find high-complexity files' },
|
|
1770
|
+
{ command: 'flo analyze symbols src/ --type function', description: 'Extract all functions' },
|
|
1771
|
+
{ command: 'flo analyze imports src/ --external', description: 'List npm dependencies' },
|
|
1772
|
+
{ command: 'flo analyze diff --risk', description: 'Analyze diff with risk assessment' },
|
|
1773
|
+
{ command: 'flo analyze boundaries src/', description: 'Find code boundaries using MinCut' },
|
|
1774
|
+
{ command: 'flo analyze modules src/', description: 'Detect module communities with Louvain' },
|
|
1775
|
+
{ command: 'flo analyze dependencies src/ --format dot', description: 'Export dependency graph as DOT' },
|
|
1776
|
+
{ command: 'flo analyze circular src/', description: 'Find circular dependencies' },
|
|
1777
|
+
{ command: 'flo analyze deps --security', description: 'Check dependency vulnerabilities' },
|
|
1778
1778
|
],
|
|
1779
1779
|
action: async (ctx) => {
|
|
1780
1780
|
// If no subcommand, show help
|
|
@@ -1798,24 +1798,24 @@ export const analyzeCommand = {
|
|
|
1798
1798
|
output.writeln();
|
|
1799
1799
|
output.writeln(output.bold('AST Analysis Examples:'));
|
|
1800
1800
|
output.writeln();
|
|
1801
|
-
output.writeln(` ${output.dim('
|
|
1802
|
-
output.writeln(` ${output.dim('
|
|
1803
|
-
output.writeln(` ${output.dim('
|
|
1804
|
-
output.writeln(` ${output.dim('
|
|
1805
|
-
output.writeln(` ${output.dim('
|
|
1801
|
+
output.writeln(` ${output.dim('flo analyze ast src/')} # Full AST analysis`);
|
|
1802
|
+
output.writeln(` ${output.dim('flo analyze ast src/index.ts -c')} # Include complexity`);
|
|
1803
|
+
output.writeln(` ${output.dim('flo analyze complexity src/ -t 15')} # Flag high complexity`);
|
|
1804
|
+
output.writeln(` ${output.dim('flo analyze symbols src/ --type fn')} # Extract functions`);
|
|
1805
|
+
output.writeln(` ${output.dim('flo analyze imports src/ --external')} # Only npm imports`);
|
|
1806
1806
|
output.writeln();
|
|
1807
1807
|
output.writeln(output.bold('Graph Analysis Examples:'));
|
|
1808
1808
|
output.writeln();
|
|
1809
|
-
output.writeln(` ${output.dim('
|
|
1810
|
-
output.writeln(` ${output.dim('
|
|
1811
|
-
output.writeln(` ${output.dim('
|
|
1812
|
-
output.writeln(` ${output.dim('
|
|
1809
|
+
output.writeln(` ${output.dim('flo analyze boundaries src/')} # Find natural code boundaries`);
|
|
1810
|
+
output.writeln(` ${output.dim('flo analyze modules src/')} # Detect module communities`);
|
|
1811
|
+
output.writeln(` ${output.dim('flo analyze dependencies -f dot src/')} # Export to DOT format`);
|
|
1812
|
+
output.writeln(` ${output.dim('flo analyze circular src/')} # Find circular deps`);
|
|
1813
1813
|
output.writeln();
|
|
1814
1814
|
output.writeln(output.bold('Diff Analysis Examples:'));
|
|
1815
1815
|
output.writeln();
|
|
1816
|
-
output.writeln(` ${output.dim('
|
|
1817
|
-
output.writeln(` ${output.dim('
|
|
1818
|
-
output.writeln(` ${output.dim('
|
|
1816
|
+
output.writeln(` ${output.dim('flo analyze diff --risk')} # Risk assessment`);
|
|
1817
|
+
output.writeln(` ${output.dim('flo analyze diff HEAD~1 --classify')} # Classify changes`);
|
|
1818
|
+
output.writeln(` ${output.dim('flo analyze diff main..feature')} # Compare branches`);
|
|
1819
1819
|
output.writeln();
|
|
1820
1820
|
return { success: true };
|
|
1821
1821
|
},
|
|
@@ -22,9 +22,9 @@ const pretrainCommand = {
|
|
|
22
22
|
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Verbose output', default: 'false' },
|
|
23
23
|
],
|
|
24
24
|
examples: [
|
|
25
|
-
{ command: '
|
|
26
|
-
{ command: '
|
|
27
|
-
{ command: '
|
|
25
|
+
{ command: 'flo benchmark pretrain', description: 'Run pre-training benchmarks' },
|
|
26
|
+
{ command: 'flo benchmark pretrain -i 500 --save results.json', description: 'Extended benchmark with results saved' },
|
|
27
|
+
{ command: 'flo benchmark pretrain -o json', description: 'Output results as JSON' },
|
|
28
28
|
],
|
|
29
29
|
action: async (ctx) => {
|
|
30
30
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -85,8 +85,8 @@ const neuralCommand = {
|
|
|
85
85
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
86
86
|
],
|
|
87
87
|
examples: [
|
|
88
|
-
{ command: '
|
|
89
|
-
{ command: '
|
|
88
|
+
{ command: 'flo benchmark neural', description: 'Run neural benchmarks' },
|
|
89
|
+
{ command: 'flo benchmark neural -d 768 -n 5000', description: 'Higher dimension, more vectors' },
|
|
90
90
|
],
|
|
91
91
|
action: async (ctx) => {
|
|
92
92
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -243,7 +243,7 @@ const memoryCommand = {
|
|
|
243
243
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
244
244
|
],
|
|
245
245
|
examples: [
|
|
246
|
-
{ command: '
|
|
246
|
+
{ command: 'flo benchmark memory', description: 'Run memory benchmarks' },
|
|
247
247
|
],
|
|
248
248
|
action: async (ctx) => {
|
|
249
249
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -358,8 +358,8 @@ const allCommand = {
|
|
|
358
358
|
{ name: 'save', short: 's', type: 'string', description: 'Save results to file' },
|
|
359
359
|
],
|
|
360
360
|
examples: [
|
|
361
|
-
{ command: '
|
|
362
|
-
{ command: '
|
|
361
|
+
{ command: 'flo benchmark all', description: 'Run all benchmarks' },
|
|
362
|
+
{ command: 'flo benchmark all --save full-results.json', description: 'Run all and save results' },
|
|
363
363
|
],
|
|
364
364
|
action: async (ctx) => {
|
|
365
365
|
output.writeln();
|
|
@@ -425,10 +425,10 @@ export const benchmarkCommand = {
|
|
|
425
425
|
allCommand,
|
|
426
426
|
],
|
|
427
427
|
examples: [
|
|
428
|
-
{ command: '
|
|
429
|
-
{ command: '
|
|
430
|
-
{ command: '
|
|
431
|
-
{ command: '
|
|
428
|
+
{ command: 'flo benchmark pretrain', description: 'Benchmark pre-training system' },
|
|
429
|
+
{ command: 'flo benchmark neural', description: 'Benchmark neural operations' },
|
|
430
|
+
{ command: 'flo benchmark memory', description: 'Benchmark memory operations' },
|
|
431
|
+
{ command: 'flo benchmark all', description: 'Run all benchmarks' },
|
|
432
432
|
],
|
|
433
433
|
action: async (_ctx) => {
|
|
434
434
|
output.writeln();
|
|
@@ -442,8 +442,8 @@ export const benchmarkCommand = {
|
|
|
442
442
|
output.writeln(` ${output.highlight('all')} - Run all benchmark suites`);
|
|
443
443
|
output.writeln();
|
|
444
444
|
output.writeln('Examples:');
|
|
445
|
-
output.writeln('
|
|
446
|
-
output.writeln('
|
|
445
|
+
output.writeln(' flo benchmark pretrain -i 200');
|
|
446
|
+
output.writeln(' flo benchmark all --save results.json');
|
|
447
447
|
output.writeln();
|
|
448
448
|
return { success: true, message: 'Use a subcommand to run benchmarks' };
|
|
449
449
|
},
|
|
@@ -16,8 +16,8 @@ const listCommand = {
|
|
|
16
16
|
{ name: 'resource', type: 'string', description: 'Filter by resource' },
|
|
17
17
|
],
|
|
18
18
|
examples: [
|
|
19
|
-
{ command: '
|
|
20
|
-
{ command: '
|
|
19
|
+
{ command: 'flo claims list', description: 'List all claims' },
|
|
20
|
+
{ command: 'flo claims list -u user123', description: 'List user claims' },
|
|
21
21
|
],
|
|
22
22
|
action: async (ctx) => {
|
|
23
23
|
output.writeln();
|
|
@@ -54,8 +54,8 @@ const checkCommand = {
|
|
|
54
54
|
{ name: 'resource', short: 'r', type: 'string', description: 'Resource context' },
|
|
55
55
|
],
|
|
56
56
|
examples: [
|
|
57
|
-
{ command: '
|
|
58
|
-
{ command: '
|
|
57
|
+
{ command: 'flo claims check -c swarm:create', description: 'Check swarm creation permission' },
|
|
58
|
+
{ command: 'flo claims check -c admin:delete -u user123', description: 'Check user permission' },
|
|
59
59
|
],
|
|
60
60
|
action: async (ctx) => {
|
|
61
61
|
const claim = ctx.flags.claim;
|
|
@@ -186,8 +186,8 @@ const grantCommand = {
|
|
|
186
186
|
{ name: 'expires', short: 'e', type: 'string', description: 'Expiration time (e.g., 24h, 7d)' },
|
|
187
187
|
],
|
|
188
188
|
examples: [
|
|
189
|
-
{ command: '
|
|
190
|
-
{ command: '
|
|
189
|
+
{ command: 'flo claims grant -c swarm:create -u user123', description: 'Grant to user' },
|
|
190
|
+
{ command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant to role' },
|
|
191
191
|
],
|
|
192
192
|
action: async (ctx) => {
|
|
193
193
|
const claim = ctx.flags.claim;
|
|
@@ -227,8 +227,8 @@ const revokeCommand = {
|
|
|
227
227
|
{ name: 'role', short: 'r', type: 'string', description: 'Role name' },
|
|
228
228
|
],
|
|
229
229
|
examples: [
|
|
230
|
-
{ command: '
|
|
231
|
-
{ command: '
|
|
230
|
+
{ command: 'flo claims revoke -c swarm:delete -u user123', description: 'Revoke from user' },
|
|
231
|
+
{ command: 'flo claims revoke -c admin:* -r guest', description: 'Revoke from role' },
|
|
232
232
|
],
|
|
233
233
|
action: async (ctx) => {
|
|
234
234
|
const claim = ctx.flags.claim;
|
|
@@ -255,8 +255,8 @@ const rolesCommand = {
|
|
|
255
255
|
{ name: 'name', short: 'n', type: 'string', description: 'Role name' },
|
|
256
256
|
],
|
|
257
257
|
examples: [
|
|
258
|
-
{ command: '
|
|
259
|
-
{ command: '
|
|
258
|
+
{ command: 'flo claims roles', description: 'List all roles' },
|
|
259
|
+
{ command: 'flo claims roles -a show -n admin', description: 'Show role details' },
|
|
260
260
|
],
|
|
261
261
|
action: async (ctx) => {
|
|
262
262
|
const action = ctx.flags.action || 'list';
|
|
@@ -308,8 +308,8 @@ const policiesCommand = {
|
|
|
308
308
|
{ name: 'name', short: 'n', type: 'string', description: 'Policy name' },
|
|
309
309
|
],
|
|
310
310
|
examples: [
|
|
311
|
-
{ command: '
|
|
312
|
-
{ command: '
|
|
311
|
+
{ command: 'flo claims policies', description: 'List policies' },
|
|
312
|
+
{ command: 'flo claims policies -a create -n rate-limit', description: 'Create policy' },
|
|
313
313
|
],
|
|
314
314
|
action: async (ctx) => {
|
|
315
315
|
output.writeln();
|
|
@@ -339,9 +339,9 @@ export const claimsCommand = {
|
|
|
339
339
|
description: 'Claims-based authorization, permissions, and access control',
|
|
340
340
|
subcommands: [listCommand, checkCommand, grantCommand, revokeCommand, rolesCommand, policiesCommand],
|
|
341
341
|
examples: [
|
|
342
|
-
{ command: '
|
|
343
|
-
{ command: '
|
|
344
|
-
{ command: '
|
|
342
|
+
{ command: 'flo claims list', description: 'List all claims' },
|
|
343
|
+
{ command: 'flo claims check -c swarm:create', description: 'Check permission' },
|
|
344
|
+
{ command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant claim' },
|
|
345
345
|
],
|
|
346
346
|
action: async () => {
|
|
347
347
|
output.writeln();
|