Files
ruflo/.github/workflows
ruv ab745decf9 ci(metaharness): similarity-tests job + CLAUDE.md surface docs (iter 40)
Iter 39 added the unit-test contract to smoke. This iter promotes it
into a dedicated CI job so the contract survives even if smoke is
restructured. Plus closes the discoverability gap: until now CLAUDE.md
listed 7 MCP tools and 7 subcommands; the iter-36 similarity surface
was invisible to agents reading the file as their tool catalog.

WHAT SHIPPED

1. .github/workflows/metaharness-ci.yml — new `similarity-tests` job
   (5 steps, runs on ubuntu-latest with no @metaharness/* installed):

   a. node test-similarity.mjs                 — 53 unit assertions
   b. node _spike-similarity.mjs               — iter-35 regression anchor
   c. CLI skill file-input round-trip          — produces valid JSON
   d. audit-trend structural-distance          — produces verdict in
                                                  {near-identical, minor-drift}
                                                  AND distance ∈ (0, 0.2)
   e. Graceful fallback                        — old fingerprint-less
                                                  records → verdict=unavailable,
                                                  no crash
   f. --alert-on-distance-below gate           — exits 1 below threshold

   The job runs WITHOUT installing any @metaharness/* package — proving
   architectural constraint #4 at the CI level (not just smoke level).

2. CLAUDE.md MetaHarness section now lists:
   - `npx ruflo metaharness similarity --a a.json --b b.json [...]`
   - `--alert-on-distance-below` on audit-trend
   - `mcp__claude-flow__metaharness_similarity`

   Agents reading the file as their tool catalog now see the surface
   ADR-152 §3.1 ships.

3. plugins/ruflo-metaharness/scripts/smoke.sh — step 17z3:
   - Workflow file presence + 6 step-name guards (anti-deletion)
   - CLAUDE.md mentions: mcp tool, subcommand, distance flag

GATES THIS ITER
   smoke:     43 → 44 (step 17z3 green)
   fleet:     33/33
   yaml:      python yaml.safe_load passes
   dry-run:   all 5 CI steps green locally:
                step:unit-tests OK
                step:spike OK
                step:cli-skill OK
                step:structural-distance OK near-identical
                step:alert-gate OK (exit 1 as expected)

ARCHITECTURAL CONSTRAINT REINFORCEMENT
The new CI job carries no `npm install` step — it runs `node` against
checked-in source directly. Demonstrates that ADR-152 §3.1 has zero
runtime dependencies (architectural constraint #1: removable) and is
unit-runnable without any package install (architectural constraint
#4: CI-gate). The same module imports from oia-audit + audit-trend
in production.

ITERS 36-40 ARC (ADR-152 §3.1 complete deep-integration sequence)
   35 — spike with 2 invariants on synthetic fixtures
   36 — production module + CLI skill + MCP tool + dispatcher
   37 — MCP-registry runtime contract enrolment (74 assertions)
   38 — oia-audit fingerprint capture + audit-trend structural distance
   39 — 53 unit-test assertions, 8 phases, spike regression anchor
   40 — dedicated CI job + CLAUDE.md discoverability  ◀ this iter

The dep is now: shippable (module), runnable (CLI), agent-callable (MCP),
piped through (audit-trend), library-tested (unit), CI-gated (workflow),
and documented (CLAUDE.md). Five surfaces × five proofs = textbook.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-16 16:46:16 -04:00
..