mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Closes #1793, #1652. #1793 — services/worker-daemon.ts: headless worker runs now persist their parsedOutput / output to the same metrics files the local fallback workers write to (.claude-flow/metrics/<name>.json). Previously the AI-mode branch returned the result and exited, leaving rich findings trapped in `.claude-flow/logs/headless/*_result.log` and invisible to `npx ruflo memory stats` and downstream consumers. Mapping mirrors the *Local methods: audit→security-audit.json, optimize→performance.json, testgaps→test-gaps.json, document→documentation.json, etc. Persisted record schema: { timestamp, mode:'headless', workerType, model, durationMs, tokensUsed, executionId, success, findings (= parsedOutput), rawOutputPreview (first 2KB), rawOutputLength }. Persistence is wrapped in try/catch so a write failure logs a warning but doesn't break the worker. #1652 — @claude-flow/guidance/src/analyzer.ts: abBenchmark now throws an actionable error when the provided executor is not content-aware instead of silently producing a guaranteed zero-delta verdict that costs ~$23 per run. The DefaultHeadlessExecutor IS content-aware as of @claude-flow/guidance@3.0.0-alpha.2 (it has `setContext` and physically swaps CLAUDE.md with backup/restore), so the guard only fires for caller-injected bare IHeadlessExecutor implementations. Verification: - @claude-flow/cli: 1963 tests pass / 0 fail / 46 skipped - @claude-flow/guidance: 1331 tests pass / 0 fail - Builds clean for both packages Published @claude-flow/cli@3.7.0-alpha.13, claude-flow@3.7.0-alpha.13, ruflo@3.7.0-alpha.13, and @claude-flow/guidance@3.0.0-alpha.3 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net>