From 01694d961d7ade22da61bc8047cb2dbb07d11b2a Mon Sep 17 00:00:00 2001 From: ruv Date: Tue, 16 Jun 2026 14:32:31 -0400 Subject: [PATCH] feat(metaharness): top-level dispatch for audit-list + audit-trend (iter 17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes the symmetry gap. The audit pipeline iters 7/8/15/16 shipped plugin scripts; iters 3/8 surfaced metaharness skills through `npx ruflo metaharness `. This iter brings the audit-list and audit-trend scripts into the same dispatcher so users can run: npx ruflo metaharness audit-list # enumerate records npx ruflo metaharness audit-list --limit 50 --since 30d npx ruflo metaharness audit-list --format json npx ruflo metaharness audit-trend \ # drift detection --baseline-key audit-2026-06-01... \ --current-key audit-2026-06-15... \ --alert-on-worsening WIRED - SUBCOMMANDS table in v3/@claude-flow/cli/src/commands/metaharness.ts gains two entries (`audit-list`, `audit-trend`) with iter-15/16 anchor comments - Help text expanded with one-line descriptions for each - Smoke step 15 broadened from "6 subcommands" to "8 subcommands" required in the dispatch table — drift guard for accidental removal NO ARCHITECTURAL CHANGES - Pure additive expansion of the existing dispatcher pattern - No new TS imports; no @metaharness/* references in the command file - Each subcommand still resolves to a plugin script via the existing locatePluginScripts() walker Smoke step 15 broadens (no count change at 26). Fleet: 33/33. tsc clean. Co-Authored-By: RuFlo --- plugins/ruflo-metaharness/scripts/smoke.sh | 4 ++-- v3/@claude-flow/cli/src/commands/metaharness.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.sh index d6e5fa3db2..1227faf7e5 100755 --- a/plugins/ruflo-metaharness/scripts/smoke.sh +++ b/plugins/ruflo-metaharness/scripts/smoke.sh @@ -151,9 +151,9 @@ F="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts" miss="" [[ -f "$F" ]] || miss="$miss command-file-missing" grep -q "name: 'metaharness'" "$F" 2>/dev/null || miss="$miss no-name-field" -# All 6 subcommands must each be present in the dispatch table. +# All 8 subcommands must each be present in the dispatch table. # Match either quoted ('mcp-scan': ...) or unquoted shorthand (score: ...) keys. -for sub in score genome mcp-scan threat-model oia-audit mint; do +for sub in score genome mcp-scan threat-model oia-audit audit-list audit-trend mint; do grep -qE "(^|[[:space:]])'?${sub}'?:" "$F" 2>/dev/null || miss="$miss missing-$sub" done # Registered in the loader diff --git a/v3/@claude-flow/cli/src/commands/metaharness.ts b/v3/@claude-flow/cli/src/commands/metaharness.ts index efa888cadb..ec546b38b7 100644 --- a/v3/@claude-flow/cli/src/commands/metaharness.ts +++ b/v3/@claude-flow/cli/src/commands/metaharness.ts @@ -51,6 +51,10 @@ const SUBCOMMANDS: Record = { 'threat-model': 'threat-model.mjs', // iter 7 — composite Phase-2 weekly audit worker 'oia-audit': 'oia-audit.mjs', + // iter 15 — diff two oia-audit records (drift detection) + 'audit-trend': 'audit-trend.mjs', + // iter 16 — enumerate metaharness-audit records + 'audit-list': 'audit-list.mjs', mint: 'mint.mjs', }; @@ -122,6 +126,8 @@ export const metaharnessCommand: Command = { output.writeln(' mcp-scan static security scan of declared MCP surface'); output.writeln(' threat-model enterprise-grade threat model'); output.writeln(' oia-audit composite weekly audit (oia + threat + mcp) → memory'); + output.writeln(' audit-list enumerate timestamped audit records'); + output.writeln(' audit-trend diff two audit records (drift detection)'); output.writeln(' mint scaffold a custom harness (dry-run by default)'); output.writeln(''); output.writeln('Each subcommand accepts --format json|table and --help.');