Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

feat(metaharness): oia-audit reachable via `ruflo metaharness oia-audit` + weekly cron (iter 8)

ruv6f33662fecb1
diff --git a/.github/workflows/oia-audit-weekly.yml b/.github/workflows/oia-audit-weekly.yml
new file mode 100644
index 0000000000..651da7ce20
--- /dev/null
+++ b/.github/workflows/oia-audit-weekly.yml
@@ -0,0 +1,68 @@
+# Weekly composite audit (ADR-150 Phase 2 β€” iter 7).
+#
+# Runs `harness oia-audit` against the ruflo repo every Sunday at
+# 04:17 UTC (off-peak, off-the-hour to avoid the global :00 thundering
+# herd; see CronCreate "Avoid the :00 and :30 minute marks").
+#
+# The audit bundles three orthogonal MetaHarness static-analysis
+# surfaces β€” oia-manifest + threat-model + mcp-scan β€” into one
+# timestamped record uploaded as a CI artifact. Failure threshold:
+# composite worst severity >= HIGH fails the workflow.
+#
+# Accumulated artifacts (retained 90 days) enable drift detection
+# over time without needing a persistent memory store in CI.
+#
+# ADR-150 graceful degradation: when metaharness is unavailable, the
+# script emits a degraded payload and exits 0 β€” the workflow
+# continues, and the artifact records the degraded state.
+name: oia-audit-weekly
+
+on:
+ schedule:
+ - cron: '17 4 * * 0' # Sundays at 04:17 UTC
+ workflow_dispatch: # manual trigger for ad-hoc audits
+ push:
+ branches: [main]
+ paths:
+ - 'plugins/ruflo-metaharness/scripts/oia-audit.mjs'
+ - 'plugins/ruflo-metaharness/scripts/_harness.mjs'
+ - '.github/workflows/oia-audit-weekly.yml'
+
+jobs:
+ audit:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Run composite audit (alert on HIGH)
+ # --dry-run because CI has no persistent memory store; the
+ # artifact upload below is the durability mechanism.
+ # --alert-on-worst high fails the job on any composite HIGH
+ # finding; medium/low/clean pass.
+ run: |
+ node plugins/ruflo-metaharness/scripts/oia-audit.mjs \
+ --path . \
+ --dry-run \
+ --alert-on-worst high \
+ --format json \
+ > /tmp/oia-audit.json
+ cat /tmp/oia-audit.json | head -80
+ # Extract composite severity for the workflow summary
+ WORST=$(node -e "
+ const j = JSON.parse(require('fs').readFileSync('/tmp/oia-audit.json'));
+ console.log(j.composite?.worst || 'unknown');
+ ")
+ echo "## Composite worst severity: \`$WORST\`" >> $GITHUB_STEP_SUMMARY
+ echo "Artifact uploaded under \`oia-audit-$(date -u +%Y-%m-%d)\`." >> $GITHUB_STEP_SUMMARY
+
+ - name: Upload audit artifact (90-day retention for drift tracking)
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: oia-audit-${{ github.run_id }}
+ path: /tmp/oia-audit.json
+ retention-days: 90
diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.sh
index ebcc890636..09c29fa4bc 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"
-# The 5 subcommands must each be present in the dispatch table.
+# All 6 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 mint; do
+for sub in score genome mcp-scan threat-model oia-audit 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 5aef396e4c..efa888cadb 100644
--- a/v3/@claude-flow/cli/src/commands/metaharness.ts
+++ b/v3/@claude-flow/cli/src/commands/metaharness.ts
@@ -49,6 +49,8 @@ const SUBCOMMANDS: Record<string, string> = {
genome: 'genome.mjs',
'mcp-scan': 'mcp-scan.mjs',
'threat-model': 'threat-model.mjs',
+ // iter 7 β€” composite Phase-2 weekly audit worker
+ 'oia-audit': 'oia-audit.mjs',
mint: 'mint.mjs',
};
@@ -119,6 +121,7 @@ export const metaharnessCommand: Command = {
output.writeln(' genome 7-section categorical readiness report');
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(' mint scaffold a custom harness (dry-run by default)');
output.writeln('');
output.writeln('Each subcommand accepts --format json|table and --help.');