claude-flow 3.7.0-alpha.3 → 3.7.0-alpha.30
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/agents/dual-mode/codex-coordinator.md +34 -29
- package/.claude/agents/dual-mode/codex-worker.md +39 -32
- package/.claude/helpers/hook-handler.cjs +4 -1
- package/.claude/helpers/statusline.cjs +26 -5
- package/.claude/scheduled_tasks.lock +1 -0
- package/.claude/settings.json +2 -0
- package/.claude/settings.local.json +10 -1
- package/.claude/skills/browser/SKILL.md +204 -0
- package/.claude/skills/github-project-management/SKILL.md +13 -0
- package/.claude/skills/verification-quality/SKILL.md +117 -73
- package/.claude-plugin/hooks/hooks.json +6 -5
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/scripts/ruflo-hook.sh +33 -0
- package/README.md +43 -39
- package/package.json +8 -2
- package/v3/@claude-flow/cli/README.md +43 -39
- package/v3/@claude-flow/cli/bin/cli.js +15 -2
- package/v3/@claude-flow/cli/bin/mcp-server.js +1 -1
- package/v3/@claude-flow/cli/dist/src/commands/agent-wasm.js +2 -2
- package/v3/@claude-flow/cli/dist/src/commands/daemon.d.ts +20 -0
- package/v3/@claude-flow/cli/dist/src/commands/daemon.js +338 -3
- package/v3/@claude-flow/cli/dist/src/commands/doctor.js +224 -46
- package/v3/@claude-flow/cli/dist/src/commands/hive-mind.js +25 -7
- package/v3/@claude-flow/cli/dist/src/commands/hooks.js +56 -29
- package/v3/@claude-flow/cli/dist/src/commands/memory.js +90 -3
- package/v3/@claude-flow/cli/dist/src/commands/start.js +1 -1
- package/v3/@claude-flow/cli/dist/src/commands/swarm.js +1 -1
- package/v3/@claude-flow/cli/dist/src/commands/task.js +8 -4
- package/v3/@claude-flow/cli/dist/src/config-adapter.js +1 -1
- package/v3/@claude-flow/cli/dist/src/index.d.ts +5 -1
- package/v3/@claude-flow/cli/dist/src/index.js +61 -18
- package/v3/@claude-flow/cli/dist/src/init/executor.js +92 -0
- package/v3/@claude-flow/cli/dist/src/init/helpers-generator.js +6 -2
- package/v3/@claude-flow/cli/dist/src/init/mcp-generator.js +4 -4
- package/v3/@claude-flow/cli/dist/src/init/settings-generator.js +44 -17
- package/v3/@claude-flow/cli/dist/src/init/statusline-generator.js +25 -14
- package/v3/@claude-flow/cli/dist/src/init/types.d.ts +7 -0
- package/v3/@claude-flow/cli/dist/src/mcp-client.js +12 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-execute-core.d.ts +3 -2
- package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-execute-core.js +16 -9
- package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js +88 -11
- package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.d.ts +3 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js +206 -21
- package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.js +6 -6
- package/v3/@claude-flow/cli/dist/src/mcp-tools/autopilot-tools.js +10 -10
- package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-session-tools.js +5 -5
- package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.js +23 -23
- package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.js +12 -12
- package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.js +6 -6
- package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js +7 -7
- package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.js +8 -8
- package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.js +10 -10
- package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.js +5 -5
- package/v3/@claude-flow/cli/dist/src/mcp-tools/guidance-tools.js +21 -21
- package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.js +53 -9
- package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.d.ts +2 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +183 -48
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-agent-tools.d.ts +22 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-agent-tools.js +357 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +400 -63
- package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.js +20 -7
- package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js +6 -6
- package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.js +4 -4
- package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.js +10 -10
- package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.js +34 -9
- package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.js +130 -6
- package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.js +76 -7
- package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.js +91 -18
- package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.js +55 -7
- package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.js +5 -5
- package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.js +11 -11
- package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.js +11 -11
- package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.js +118 -10
- package/v3/@claude-flow/cli/dist/src/memory/intelligence.js +28 -3
- package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts +69 -0
- package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +282 -5
- package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +8 -0
- package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js +80 -16
- package/v3/@claude-flow/cli/dist/src/memory/neural-package-bridge.d.ts +48 -0
- package/v3/@claude-flow/cli/dist/src/memory/neural-package-bridge.js +87 -0
- package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.js +3 -0
- package/v3/@claude-flow/cli/dist/src/parser.d.ts +9 -0
- package/v3/@claude-flow/cli/dist/src/parser.js +11 -0
- package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.d.ts +6 -3
- package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.js +11 -8
- package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.js +4 -1
- package/v3/@claude-flow/cli/dist/src/ruvector/coverage-tools.js +6 -6
- package/v3/@claude-flow/cli/dist/src/ruvector/index.d.ts +0 -2
- package/v3/@claude-flow/cli/dist/src/ruvector/index.js +8 -2
- package/v3/@claude-flow/cli/dist/src/ruvector/model-router.d.ts +22 -1
- package/v3/@claude-flow/cli/dist/src/ruvector/model-router.js +125 -5
- package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.d.ts +6 -0
- package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.js +37 -3
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +80 -2
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js +372 -11
- package/v3/@claude-flow/cli/package.json +7 -5
- package/v3/@claude-flow/guidance/dist/analyzer.js +9 -0
- package/v3/@claude-flow/guidance/package.json +1 -1
- package/v3/@claude-flow/shared/dist/events/event-store.js +20 -9
- package/v3/@claude-flow/shared/dist/hooks/executor.js +7 -4
- package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.js +6 -6
- package/v3/@claude-flow/shared/dist/mcp/server.js +3 -6
- package/v3/@claude-flow/shared/dist/mcp/types.d.ts +4 -6
- package/v3/@claude-flow/shared/package.json +1 -1
|
@@ -17,26 +17,70 @@ This skill provides a comprehensive verification and quality assurance system th
|
|
|
17
17
|
- **CI/CD Integration**: Export capabilities for continuous integration pipelines
|
|
18
18
|
- **Real-time Monitoring**: Live dashboards and watch modes for ongoing verification
|
|
19
19
|
|
|
20
|
+
> **Shipped vs. aspirational.** The *concrete, in-CI* verification stack — the 6 regression-guard jobs + the witness manifest + the tool-discoverability audit — is real and runs on every push. The truth-scoring / auto-rollback / WebSocket-dashboard surface described later in this doc is partly shipped (`ruflo verify` runs the witness checks) and partly design — treat the "CI Guards" section below as the authoritative current state.
|
|
21
|
+
|
|
22
|
+
## CI Guards — what's actually shipped (current state)
|
|
23
|
+
|
|
24
|
+
Ruflo's regression protection is three layers, all gated before publish. Authoritative reference: [`verification/README.md`](../../../verification/README.md).
|
|
25
|
+
|
|
26
|
+
| Layer | What | CI job(s) in `.github/workflows/v3-ci.yml` | ADR |
|
|
27
|
+
|---|---|---|---|
|
|
28
|
+
| **1 — install/behavioral smoke** | Exercise user-visible failure modes against a real build | `smoke-install-no-bsqlite` (npm install on platforms w/o prebuilds), `plugin-hooks-smoke` (#1859/#1862 — hook flag parsing), `mcp-protocol-smoke` (#1874 — HTTP MCP wire format), `memory-import-smoke` (#1883/#1884 — WSL path + key sanitization), `mcp-roundtrip-smoke` (#1889 paired-tool round-trip + #1863 cli-no-crash + ADR-095 G2 consensus-transport) | ADR-102 |
|
|
29
|
+
| **1 — discoverability gate** | Every MCP tool description must answer "use this over native when?" | `tool-descriptions-audit` — `scripts/audit-tool-descriptions.mjs`, baseline at `verification/mcp-tool-baseline.json` (monotone-decreasing: noGuidance / tooShort / duplicates) | ADR-112 |
|
|
30
|
+
| **2 — cryptographic witness** | Every documented fix's load-bearing marker must still be present in dist; Ed25519-signed, per-OS bundles | `witness-verify` (ubuntu/macos/windows) — `plugins/ruflo-core/scripts/witness/verify.mjs` against `verification/<os>/manifest.md.json` | ADR-103 |
|
|
31
|
+
| **3 — temporal history** | When was a regression introduced | `verification/<os>/history.jsonl` + `history.mjs` (`summary` / `regressions` / `timeline`) | ADR-103 |
|
|
32
|
+
|
|
33
|
+
### Run the guards locally
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Tool-description discoverability audit (ADR-112)
|
|
37
|
+
node scripts/audit-tool-descriptions.mjs # fails if any baseline count rises
|
|
38
|
+
node scripts/audit-tool-descriptions.mjs --update-baseline # lock the new floor after a fix lands
|
|
39
|
+
|
|
40
|
+
# Behavioral smokes (each builds what it needs; safe to run individually)
|
|
41
|
+
node plugins/ruflo-core/scripts/test-hooks.mjs "node $PWD/v3/@claude-flow/cli/bin/cli.js"
|
|
42
|
+
node plugins/ruflo-core/scripts/test-mcp-protocol.mjs
|
|
43
|
+
node plugins/ruflo-core/scripts/test-memory-import.mjs
|
|
44
|
+
node plugins/ruflo-core/scripts/test-mcp-roundtrips.mjs # #1889 paired-tool round-trip
|
|
45
|
+
node plugins/ruflo-core/scripts/test-cli-no-crash.mjs # #1863 unhandled-exception class
|
|
46
|
+
node plugins/ruflo-core/scripts/test-consensus-transport.mjs # ADR-095 G2 consensus transport
|
|
47
|
+
|
|
48
|
+
# Witness manifest — regenerate + verify
|
|
49
|
+
node scripts/regen-witness.mjs
|
|
50
|
+
node plugins/ruflo-core/scripts/witness/verify.mjs --manifest verification/macos/manifest.md.json
|
|
51
|
+
|
|
52
|
+
# Temporal history
|
|
53
|
+
node plugins/ruflo-core/scripts/witness/history.mjs --history verification/macos/history.jsonl summary
|
|
54
|
+
node plugins/ruflo-core/scripts/witness/history.mjs --history verification/macos/history.jsonl regressions
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Adding a new guard
|
|
58
|
+
|
|
59
|
+
1. **Behavioral smoke** → write `plugins/ruflo-core/scripts/test-<name>.mjs`. Pattern: static dist-scan first (fast, always completes), behavioral probe second with an internal timeout + a process-level watchdog so CI never hangs. Add a step to the relevant job in `v3-ci.yml`.
|
|
60
|
+
2. **Static gate with a baseline** → write `scripts/audit-<name>.mjs` that scans, counts violations, and fails if the count exceeds a monotone-decreasing baseline in `verification/<name>-baseline.json`. Support `--update-baseline`. Add a CI job; wire it into `witness-verify` `needs[]` if it should gate `publish`.
|
|
61
|
+
3. **Documented-fix marker** → append `{ id, desc, file, marker }` to `verification/witness-fixes.json`, run `node scripts/regen-witness.mjs`. The marker must be a substring the fix specifically creates (not a generic pattern like `'function'`).
|
|
62
|
+
|
|
20
63
|
## Prerequisites
|
|
21
64
|
|
|
22
|
-
-
|
|
65
|
+
- Ruflo installed (`npx ruflo@alpha`)
|
|
23
66
|
- Git repository (for rollback features)
|
|
24
67
|
- Node.js 18+ (for dashboard features)
|
|
68
|
+
- `@noble/ed25519` (for the witness verifier — a single runtime dep, `npm i @noble/ed25519`)
|
|
25
69
|
|
|
26
70
|
## Quick Start
|
|
27
71
|
|
|
28
72
|
```bash
|
|
29
73
|
# View current truth scores
|
|
30
|
-
npx
|
|
74
|
+
npx ruflo@alpha truth
|
|
31
75
|
|
|
32
76
|
# Run verification check
|
|
33
|
-
npx
|
|
77
|
+
npx ruflo@alpha verify check
|
|
34
78
|
|
|
35
79
|
# Verify specific file with custom threshold
|
|
36
|
-
npx
|
|
80
|
+
npx ruflo@alpha verify check --file src/app.js --threshold 0.98
|
|
37
81
|
|
|
38
82
|
# Rollback last failed verification
|
|
39
|
-
npx
|
|
83
|
+
npx ruflo@alpha verify rollback --last-good
|
|
40
84
|
```
|
|
41
85
|
|
|
42
86
|
---
|
|
@@ -52,40 +96,40 @@ Display comprehensive quality and reliability metrics for your codebase and agen
|
|
|
52
96
|
**Basic Usage:**
|
|
53
97
|
```bash
|
|
54
98
|
# View current truth scores (default: table format)
|
|
55
|
-
npx
|
|
99
|
+
npx ruflo@alpha truth
|
|
56
100
|
|
|
57
101
|
# View scores for specific time period
|
|
58
|
-
npx
|
|
102
|
+
npx ruflo@alpha truth --period 7d
|
|
59
103
|
|
|
60
104
|
# View scores for specific agent
|
|
61
|
-
npx
|
|
105
|
+
npx ruflo@alpha truth --agent coder --period 24h
|
|
62
106
|
|
|
63
107
|
# Find files/tasks below threshold
|
|
64
|
-
npx
|
|
108
|
+
npx ruflo@alpha truth --threshold 0.8
|
|
65
109
|
```
|
|
66
110
|
|
|
67
111
|
**Output Formats:**
|
|
68
112
|
```bash
|
|
69
113
|
# Table format (default)
|
|
70
|
-
npx
|
|
114
|
+
npx ruflo@alpha truth --format table
|
|
71
115
|
|
|
72
116
|
# JSON for programmatic access
|
|
73
|
-
npx
|
|
117
|
+
npx ruflo@alpha truth --format json
|
|
74
118
|
|
|
75
119
|
# CSV for spreadsheet analysis
|
|
76
|
-
npx
|
|
120
|
+
npx ruflo@alpha truth --format csv
|
|
77
121
|
|
|
78
122
|
# HTML report with visualizations
|
|
79
|
-
npx
|
|
123
|
+
npx ruflo@alpha truth --format html --export report.html
|
|
80
124
|
```
|
|
81
125
|
|
|
82
126
|
**Real-time Monitoring:**
|
|
83
127
|
```bash
|
|
84
128
|
# Watch mode with live updates
|
|
85
|
-
npx
|
|
129
|
+
npx ruflo@alpha truth --watch
|
|
86
130
|
|
|
87
131
|
# Export metrics automatically
|
|
88
|
-
npx
|
|
132
|
+
npx ruflo@alpha truth --export .claude-flow/metrics/truth-$(date +%Y%m%d).json
|
|
89
133
|
```
|
|
90
134
|
|
|
91
135
|
#### Truth Score Dashboard
|
|
@@ -141,40 +185,40 @@ Execute comprehensive verification checks on code, tasks, or agent outputs.
|
|
|
141
185
|
**File Verification:**
|
|
142
186
|
```bash
|
|
143
187
|
# Verify single file
|
|
144
|
-
npx
|
|
188
|
+
npx ruflo@alpha verify check --file src/app.js
|
|
145
189
|
|
|
146
190
|
# Verify directory recursively
|
|
147
|
-
npx
|
|
191
|
+
npx ruflo@alpha verify check --directory src/
|
|
148
192
|
|
|
149
193
|
# Verify with auto-fix enabled
|
|
150
|
-
npx
|
|
194
|
+
npx ruflo@alpha verify check --file src/utils.js --auto-fix
|
|
151
195
|
|
|
152
196
|
# Verify current working directory
|
|
153
|
-
npx
|
|
197
|
+
npx ruflo@alpha verify check
|
|
154
198
|
```
|
|
155
199
|
|
|
156
200
|
**Task Verification:**
|
|
157
201
|
```bash
|
|
158
202
|
# Verify specific task output
|
|
159
|
-
npx
|
|
203
|
+
npx ruflo@alpha verify check --task task-123
|
|
160
204
|
|
|
161
205
|
# Verify with custom threshold
|
|
162
|
-
npx
|
|
206
|
+
npx ruflo@alpha verify check --task task-456 --threshold 0.99
|
|
163
207
|
|
|
164
208
|
# Verbose output for debugging
|
|
165
|
-
npx
|
|
209
|
+
npx ruflo@alpha verify check --task task-789 --verbose
|
|
166
210
|
```
|
|
167
211
|
|
|
168
212
|
**Batch Verification:**
|
|
169
213
|
```bash
|
|
170
214
|
# Verify multiple files in parallel
|
|
171
|
-
npx
|
|
215
|
+
npx ruflo@alpha verify batch --files "*.js" --parallel
|
|
172
216
|
|
|
173
217
|
# Verify with pattern matching
|
|
174
|
-
npx
|
|
218
|
+
npx ruflo@alpha verify batch --pattern "src/**/*.ts"
|
|
175
219
|
|
|
176
220
|
# Integration test suite
|
|
177
|
-
npx
|
|
221
|
+
npx ruflo@alpha verify integration --test-suite full
|
|
178
222
|
```
|
|
179
223
|
|
|
180
224
|
#### Verification Criteria
|
|
@@ -215,7 +259,7 @@ The verification system evaluates:
|
|
|
215
259
|
|
|
216
260
|
```bash
|
|
217
261
|
# Get structured JSON output
|
|
218
|
-
npx
|
|
262
|
+
npx ruflo@alpha verify check --json > verification.json
|
|
219
263
|
|
|
220
264
|
# Example JSON structure:
|
|
221
265
|
{
|
|
@@ -247,25 +291,25 @@ Automatically revert changes that fail verification checks.
|
|
|
247
291
|
**Basic Rollback:**
|
|
248
292
|
```bash
|
|
249
293
|
# Rollback to last known good state
|
|
250
|
-
npx
|
|
294
|
+
npx ruflo@alpha verify rollback --last-good
|
|
251
295
|
|
|
252
296
|
# Rollback to specific commit
|
|
253
|
-
npx
|
|
297
|
+
npx ruflo@alpha verify rollback --to-commit abc123
|
|
254
298
|
|
|
255
299
|
# Interactive rollback with preview
|
|
256
|
-
npx
|
|
300
|
+
npx ruflo@alpha verify rollback --interactive
|
|
257
301
|
```
|
|
258
302
|
|
|
259
303
|
**Smart Rollback:**
|
|
260
304
|
```bash
|
|
261
305
|
# Rollback only failed files (preserve good changes)
|
|
262
|
-
npx
|
|
306
|
+
npx ruflo@alpha verify rollback --selective
|
|
263
307
|
|
|
264
308
|
# Rollback with automatic backup
|
|
265
|
-
npx
|
|
309
|
+
npx ruflo@alpha verify rollback --backup-first
|
|
266
310
|
|
|
267
311
|
# Dry-run mode (preview without executing)
|
|
268
|
-
npx
|
|
312
|
+
npx ruflo@alpha verify rollback --dry-run
|
|
269
313
|
```
|
|
270
314
|
|
|
271
315
|
**Rollback Performance:**
|
|
@@ -282,31 +326,31 @@ Create detailed verification reports with metrics and visualizations.
|
|
|
282
326
|
**Report Formats:**
|
|
283
327
|
```bash
|
|
284
328
|
# JSON report
|
|
285
|
-
npx
|
|
329
|
+
npx ruflo@alpha verify report --format json
|
|
286
330
|
|
|
287
331
|
# HTML report with charts
|
|
288
|
-
npx
|
|
332
|
+
npx ruflo@alpha verify report --export metrics.html --format html
|
|
289
333
|
|
|
290
334
|
# CSV for data analysis
|
|
291
|
-
npx
|
|
335
|
+
npx ruflo@alpha verify report --format csv --export metrics.csv
|
|
292
336
|
|
|
293
337
|
# Markdown summary
|
|
294
|
-
npx
|
|
338
|
+
npx ruflo@alpha verify report --format markdown
|
|
295
339
|
```
|
|
296
340
|
|
|
297
341
|
**Time-based Reports:**
|
|
298
342
|
```bash
|
|
299
343
|
# Last 24 hours
|
|
300
|
-
npx
|
|
344
|
+
npx ruflo@alpha verify report --period 24h
|
|
301
345
|
|
|
302
346
|
# Last 7 days
|
|
303
|
-
npx
|
|
347
|
+
npx ruflo@alpha verify report --period 7d
|
|
304
348
|
|
|
305
349
|
# Last 30 days with trends
|
|
306
|
-
npx
|
|
350
|
+
npx ruflo@alpha verify report --period 30d --include-trends
|
|
307
351
|
|
|
308
352
|
# Custom date range
|
|
309
|
-
npx
|
|
353
|
+
npx ruflo@alpha verify report --from 2025-01-01 --to 2025-01-31
|
|
310
354
|
```
|
|
311
355
|
|
|
312
356
|
**Report Content:**
|
|
@@ -326,16 +370,16 @@ Run interactive web-based verification dashboard with real-time updates.
|
|
|
326
370
|
|
|
327
371
|
```bash
|
|
328
372
|
# Launch dashboard on default port (3000)
|
|
329
|
-
npx
|
|
373
|
+
npx ruflo@alpha verify dashboard
|
|
330
374
|
|
|
331
375
|
# Custom port
|
|
332
|
-
npx
|
|
376
|
+
npx ruflo@alpha verify dashboard --port 8080
|
|
333
377
|
|
|
334
378
|
# Export dashboard data
|
|
335
|
-
npx
|
|
379
|
+
npx ruflo@alpha verify dashboard --export
|
|
336
380
|
|
|
337
381
|
# Dashboard with auto-refresh
|
|
338
|
-
npx
|
|
382
|
+
npx ruflo@alpha verify dashboard --refresh 5s
|
|
339
383
|
```
|
|
340
384
|
|
|
341
385
|
**Dashboard Features:**
|
|
@@ -390,13 +434,13 @@ Set verification preferences in `.claude-flow/config.json`:
|
|
|
390
434
|
**Adjust verification strictness:**
|
|
391
435
|
```bash
|
|
392
436
|
# Strict mode (99% accuracy required)
|
|
393
|
-
npx
|
|
437
|
+
npx ruflo@alpha verify check --threshold 0.99
|
|
394
438
|
|
|
395
439
|
# Lenient mode (90% acceptable)
|
|
396
|
-
npx
|
|
440
|
+
npx ruflo@alpha verify check --threshold 0.90
|
|
397
441
|
|
|
398
442
|
# Set default threshold
|
|
399
|
-
npx
|
|
443
|
+
npx ruflo@alpha config set verification.threshold 0.98
|
|
400
444
|
```
|
|
401
445
|
|
|
402
446
|
**Per-environment thresholds:**
|
|
@@ -433,7 +477,7 @@ jobs:
|
|
|
433
477
|
|
|
434
478
|
- name: Run Verification
|
|
435
479
|
run: |
|
|
436
|
-
npx
|
|
480
|
+
npx ruflo@alpha verify check --json > verification.json
|
|
437
481
|
|
|
438
482
|
- name: Check Truth Score
|
|
439
483
|
run: |
|
|
@@ -455,7 +499,7 @@ jobs:
|
|
|
455
499
|
verify:
|
|
456
500
|
stage: test
|
|
457
501
|
script:
|
|
458
|
-
- npx
|
|
502
|
+
- npx ruflo@alpha verify check --threshold 0.95 --json > verification.json
|
|
459
503
|
- |
|
|
460
504
|
score=$(jq '.overallScore' verification.json)
|
|
461
505
|
if [ $(echo "$score < 0.95" | bc) -eq 1 ]; then
|
|
@@ -475,13 +519,13 @@ Run verification automatically during swarm operations:
|
|
|
475
519
|
|
|
476
520
|
```bash
|
|
477
521
|
# Swarm with verification enabled
|
|
478
|
-
npx
|
|
522
|
+
npx ruflo@alpha swarm --verify --threshold 0.98
|
|
479
523
|
|
|
480
524
|
# Hive Mind with auto-rollback
|
|
481
|
-
npx
|
|
525
|
+
npx ruflo@alpha hive-mind --verify --rollback-on-fail
|
|
482
526
|
|
|
483
527
|
# Training pipeline with verification
|
|
484
|
-
npx
|
|
528
|
+
npx ruflo@alpha train --verify --threshold 0.99
|
|
485
529
|
```
|
|
486
530
|
|
|
487
531
|
#### Pair Programming Integration
|
|
@@ -490,10 +534,10 @@ Enable real-time verification during collaborative development:
|
|
|
490
534
|
|
|
491
535
|
```bash
|
|
492
536
|
# Pair with verification
|
|
493
|
-
npx
|
|
537
|
+
npx ruflo@alpha pair --verify --real-time
|
|
494
538
|
|
|
495
539
|
# Pair with custom threshold
|
|
496
|
-
npx
|
|
540
|
+
npx ruflo@alpha pair --verify --threshold 0.97 --auto-fix
|
|
497
541
|
```
|
|
498
542
|
|
|
499
543
|
### Advanced Workflows
|
|
@@ -504,13 +548,13 @@ Monitor codebase continuously during development:
|
|
|
504
548
|
|
|
505
549
|
```bash
|
|
506
550
|
# Watch directory for changes
|
|
507
|
-
npx
|
|
551
|
+
npx ruflo@alpha verify watch --directory src/
|
|
508
552
|
|
|
509
553
|
# Watch with auto-fix
|
|
510
|
-
npx
|
|
554
|
+
npx ruflo@alpha verify watch --directory src/ --auto-fix
|
|
511
555
|
|
|
512
556
|
# Watch with notifications
|
|
513
|
-
npx
|
|
557
|
+
npx ruflo@alpha verify watch --notify --threshold 0.95
|
|
514
558
|
```
|
|
515
559
|
|
|
516
560
|
#### Monitoring Integration
|
|
@@ -519,18 +563,18 @@ Send metrics to external monitoring systems:
|
|
|
519
563
|
|
|
520
564
|
```bash
|
|
521
565
|
# Export to Prometheus
|
|
522
|
-
npx
|
|
566
|
+
npx ruflo@alpha truth --format json | \
|
|
523
567
|
curl -X POST https://pushgateway.example.com/metrics/job/claude-flow \
|
|
524
568
|
-d @-
|
|
525
569
|
|
|
526
570
|
# Send to DataDog
|
|
527
|
-
npx
|
|
571
|
+
npx ruflo@alpha verify report --format json | \
|
|
528
572
|
curl -X POST "https://api.datadoghq.com/api/v1/series?api_key=${DD_API_KEY}" \
|
|
529
573
|
-H "Content-Type: application/json" \
|
|
530
574
|
-d @-
|
|
531
575
|
|
|
532
576
|
# Custom webhook
|
|
533
|
-
npx
|
|
577
|
+
npx ruflo@alpha truth --format json | \
|
|
534
578
|
curl -X POST https://metrics.example.com/api/truth \
|
|
535
579
|
-H "Content-Type: application/json" \
|
|
536
580
|
-d @-
|
|
@@ -542,16 +586,16 @@ Automatically verify before commits:
|
|
|
542
586
|
|
|
543
587
|
```bash
|
|
544
588
|
# Install pre-commit hook
|
|
545
|
-
npx
|
|
589
|
+
npx ruflo@alpha verify install-hook --pre-commit
|
|
546
590
|
|
|
547
591
|
# .git/hooks/pre-commit example:
|
|
548
592
|
#!/bin/bash
|
|
549
|
-
npx
|
|
593
|
+
npx ruflo@alpha verify check --threshold 0.95 --json > /tmp/verify.json
|
|
550
594
|
|
|
551
595
|
score=$(jq '.overallScore' /tmp/verify.json)
|
|
552
596
|
if (( $(echo "$score < 0.95" | bc -l) )); then
|
|
553
597
|
echo "❌ Verification failed with score: $score"
|
|
554
|
-
echo "Run 'npx
|
|
598
|
+
echo "Run 'npx ruflo@alpha verify check --verbose' for details"
|
|
555
599
|
exit 1
|
|
556
600
|
fi
|
|
557
601
|
|
|
@@ -583,13 +627,13 @@ echo "✅ Verification passed with score: $score"
|
|
|
583
627
|
**Low Truth Scores:**
|
|
584
628
|
```bash
|
|
585
629
|
# Get detailed breakdown
|
|
586
|
-
npx
|
|
630
|
+
npx ruflo@alpha truth --verbose --threshold 0.0
|
|
587
631
|
|
|
588
632
|
# Check specific criteria
|
|
589
|
-
npx
|
|
633
|
+
npx ruflo@alpha verify check --verbose
|
|
590
634
|
|
|
591
635
|
# View agent-specific issues
|
|
592
|
-
npx
|
|
636
|
+
npx ruflo@alpha truth --agent <agent-name> --format json
|
|
593
637
|
```
|
|
594
638
|
|
|
595
639
|
**Rollback Failures:**
|
|
@@ -598,7 +642,7 @@ npx claude-flow@alpha truth --agent <agent-name> --format json
|
|
|
598
642
|
git status
|
|
599
643
|
|
|
600
644
|
# View rollback history
|
|
601
|
-
npx
|
|
645
|
+
npx ruflo@alpha verify rollback --history
|
|
602
646
|
|
|
603
647
|
# Manual rollback
|
|
604
648
|
git reset --hard HEAD~1
|
|
@@ -607,10 +651,10 @@ git reset --hard HEAD~1
|
|
|
607
651
|
**Verification Timeouts:**
|
|
608
652
|
```bash
|
|
609
653
|
# Increase timeout
|
|
610
|
-
npx
|
|
654
|
+
npx ruflo@alpha verify check --timeout 60s
|
|
611
655
|
|
|
612
656
|
# Verify in batches
|
|
613
|
-
npx
|
|
657
|
+
npx ruflo@alpha verify batch --batch-size 10
|
|
614
658
|
```
|
|
615
659
|
|
|
616
660
|
### Exit Codes
|
|
@@ -623,10 +667,10 @@ Verification commands return standard exit codes:
|
|
|
623
667
|
|
|
624
668
|
### Related Commands
|
|
625
669
|
|
|
626
|
-
- `npx
|
|
627
|
-
- `npx
|
|
628
|
-
- `npx
|
|
629
|
-
- `npx
|
|
670
|
+
- `npx ruflo@alpha pair` - Collaborative development with verification
|
|
671
|
+
- `npx ruflo@alpha train` - Training with verification feedback
|
|
672
|
+
- `npx ruflo@alpha swarm` - Multi-agent coordination with quality checks
|
|
673
|
+
- `npx ruflo@alpha report` - Generate comprehensive project reports
|
|
630
674
|
|
|
631
675
|
### Best Practices
|
|
632
676
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"_note": "#1921 — hook commands invoke scripts/ruflo-hook.sh (resilient shim): prefers a locally-installed `ruflo`/`claude-flow` binary, falls back to `npx --prefer-offline`, and always exits 0 so a CLI/install failure (e.g. arborist `Invalid Version` on npm 10.8.x) never surfaces an error in Claude Code or blocks a turn. The trailing `|| true` guards the case where $CLAUDE_PLUGIN_ROOT is unset (older Claude Code) — the hook then no-ops silently. DO NOT revert to a bare `npx <pkg>@alpha hooks …` per fire.",
|
|
2
3
|
"hooks": {
|
|
3
4
|
"PreToolUse": [
|
|
4
5
|
{
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
"hooks": [
|
|
7
8
|
{
|
|
8
9
|
"type": "command",
|
|
9
|
-
"command": "
|
|
10
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/ruflo-hook.sh\" modify-bash || true"
|
|
10
11
|
}
|
|
11
12
|
]
|
|
12
13
|
},
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
"hooks": [
|
|
16
17
|
{
|
|
17
18
|
"type": "command",
|
|
18
|
-
"command": "
|
|
19
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/ruflo-hook.sh\" modify-file || true"
|
|
19
20
|
}
|
|
20
21
|
]
|
|
21
22
|
}
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"hooks": [
|
|
27
28
|
{
|
|
28
29
|
"type": "command",
|
|
29
|
-
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {}
|
|
30
|
+
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} \"${CLAUDE_PLUGIN_ROOT}/scripts/ruflo-hook.sh\" post-command --command '{}' --track-metrics true --store-results true || true"
|
|
30
31
|
}
|
|
31
32
|
]
|
|
32
33
|
},
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"hooks": [
|
|
36
37
|
{
|
|
37
38
|
"type": "command",
|
|
38
|
-
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {}
|
|
39
|
+
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} \"${CLAUDE_PLUGIN_ROOT}/scripts/ruflo-hook.sh\" post-edit --file '{}' --format true --update-memory true || true"
|
|
39
40
|
}
|
|
40
41
|
]
|
|
41
42
|
}
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"hooks": [
|
|
66
67
|
{
|
|
67
68
|
"type": "command",
|
|
68
|
-
"command": "
|
|
69
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/ruflo-hook.sh\" session-end --generate-summary true --persist-state true --export-metrics true || true"
|
|
69
70
|
}
|
|
70
71
|
]
|
|
71
72
|
}
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"description": "Advanced git workflows with diff analysis, risk scoring, and reviewer recommendations"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
"name": "ruflo-
|
|
76
|
-
"source": "./plugins/ruflo-
|
|
77
|
-
"description": "
|
|
75
|
+
"name": "ruflo-agent",
|
|
76
|
+
"source": "./plugins/ruflo-agent",
|
|
77
|
+
"description": "Agent runtimes — local WASM-sandboxed agents (rvagent) + Anthropic Claude Managed Agents (cloud); one interface, local-vs-cloud backends"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "ruflo-workflows",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ruflo-hook.sh — resilient invoker for ruflo CLI hook subcommands (#1921).
|
|
3
|
+
#
|
|
4
|
+
# Hooks fire on EVERY PreToolUse / PostToolUse / Stop. A bare
|
|
5
|
+
# `npx <pkg>@alpha hooks …` re-resolves the @alpha dist-tag and re-installs
|
|
6
|
+
# from cold cache on every fire, and when the install crashes (e.g. an
|
|
7
|
+
# arborist `Invalid Version` on npm 10.8.x) the user sees a hook error in
|
|
8
|
+
# Claude Code after every turn. This shim:
|
|
9
|
+
# 1. prefers an already-installed `ruflo` / `claude-flow` binary (no npx,
|
|
10
|
+
# no install) — the common case for plugin users;
|
|
11
|
+
# 2. falls back to `npx --prefer-offline` so a populated npx cache is
|
|
12
|
+
# reused instead of a fresh registry resolve;
|
|
13
|
+
# 3. ALWAYS exits 0 — hook subcommands are best-effort telemetry/learning;
|
|
14
|
+
# a failure must never surface an error or block a turn.
|
|
15
|
+
#
|
|
16
|
+
# stdin (the hook event JSON) is passed through to the CLI unchanged.
|
|
17
|
+
# Usage: ruflo-hook.sh <hook-subcommand> [args…] (the literal `hooks`
|
|
18
|
+
# word is prepended here, so callers pass e.g. `post-edit -f "$FILE" -s true`).
|
|
19
|
+
|
|
20
|
+
# Swallow all diagnostics — nothing this script prints should reach Claude Code.
|
|
21
|
+
exec 2>/dev/null
|
|
22
|
+
|
|
23
|
+
run() { "$@" || true; }
|
|
24
|
+
|
|
25
|
+
if command -v ruflo >/dev/null 2>&1; then
|
|
26
|
+
run ruflo hooks "$@"
|
|
27
|
+
elif command -v claude-flow >/dev/null 2>&1; then
|
|
28
|
+
run claude-flow hooks "$@"
|
|
29
|
+
else
|
|
30
|
+
run npx --prefer-offline --yes ruflo@alpha hooks "$@"
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
exit 0
|