mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
35ac888ebf
* feat(mcp): integrate agenticow@~0.2.3 — Copy-On-Write memory branching (4 MCP tools)
Adds 4 MCP tools wrapping agenticow's COW vector primitives:
- agenticow_branch fork a base .rvf at ~162 bytes regardless of size
- agenticow_checkpoint freeze a restore point on a memory file
- agenticow_rollback discard edits since most recent checkpoint
- agenticow_promote merge a branch's edits into a base
Architectural rule (mirrors ADR-150 metaharness pattern):
agenticow is in optionalDependencies — never a hard runtime dep.
Missing package → `{success: true, degraded: true, reason: 'agenticow-not-found'}`.
Motivating use case: the v3.14.4 release uncovered a 3.3 GB tarball-bloat
regression where Darwin loops' git-worktree-per-agent pattern accumulated
full-copy snapshots. Measured agenticow branches are exactly 162 bytes
regardless of base size — the structural fix.
Verified perf vs published claims (docs/agenticow/findings.md):
✅ 162-byte branches — confirmed exact at N=1k, 10k, 50k
✅ 3,200×–180,000× smaller than full-copy across N
❌ "0.5ms branch" — measured ~10ms (fixed cost, not size-proportional)
❌ "83× faster" — crossover ≈ N=30k; below that, full-copy wins
Tests: 7/7 in __tests__/agenticow-tools.test.ts
Smoke: 8/8 in scripts/smoke-agenticow.sh (registration + end-to-end cycle)
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WbBa4nccx5aGhXphoHxcni
* fix(mcp): comply with ADR-112 tool-discoverability lint on agenticow tools
The audit-tool-descriptions.mjs regex only captures the first quoted string
in a `'foo ' + 'bar'` concat, so my multi-line descriptions hid the "Use when"
guidance from the linter. Collapsed all 4 agenticow tool descriptions to single
string literals; ADR-112 audit now reports 345/345 pass.
No behavior change — descriptions are byte-identical at runtime.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WbBa4nccx5aGhXphoHxcni