Skip to content

v4: @pacphi/agentic-kit — npm-installable cross-platform kit (ak setup/status/sync/uninstall), shell kit removed, CI matrix + npm release - #14

Merged
pacphi merged 6 commits into
mainfrom
npm-kit
Jul 14, 2026
Merged

pacphi merged 6 commits into
mainfrom
npm-kit

Conversation

@pacphi

@pacphi pacphi commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

v4: the kit becomes an npm-installable, cross-platform CLI. The bash era (install.sh, uninstall.sh, sourced shell functions, six bash bin scripts) is deleted; in its place: npm i -g + one zero-dependency Node ≥22 CLI, ruflo-kit, with four porcelain verbs and a plumbing namespace. The shell kit's final state is preserved at tag v3-shell-final as the retreat point.

Command surface (state-convergence model)

ruflo-kit              status + one suggested next action
ruflo-kit setup        machine and/or project first-time setup
ruflo-kit status       read-only dashboard (--json, --deep); every drift row names its fix
ruflo-kit sync         converge: upgrade + heal + re-verify (--dry-run prints the plan)
ruflo-kit uninstall    clean removal incl. legacy shell-kit migration
ruflo-kit x …          plumbing: daemon-gc, mcp pick|off|status, reference diff|sync,
                       verify learning|security|aqe, improvement-eval

Design rules: every mutating verb has --dry-run; prompts persist to ~/.config/ruflo/kit.json (ask once); drift nudge on every invocation (cached, 24h TTL); --help shows 4 verbs, --help --all shows plumbing.

What ported (behavior-preserving)

Docs simplified (per review direction)

BACKGROUND, TROUBLESHOOTING, CONDITIONAL-BLOCKS, and the old README archived as docs/archive/2026-07-14-shell-kit-* (index updated). New README (~90 lines: why + four commands) and a short symptom→command TROUBLESHOOTING table.

CI/CD

  • ci.yml — ubuntu/macos/windows × Node 22/24/26: zero-dep test run + sandboxed-HOME CLI smoke (status JSON shape, block round-trip, dry-run uninstall)
  • nightly.yml — installs REAL latest ruflo+agentic-qe and gates on the kit healing them (would have caught #2670 the day 3.28 shipped)
  • release.yml — v4* tag → test gate → tag↔version guard → npm publish --provenance (NPM_TOKEN secret; prereleases → next)
  • dependabot.yml — weekly grouped updates (github-actions + npm)
  • Actions pinned at July-2026 latest: checkout@v7, setup-node@v6

Verified live on this machine

  • 19 unit tests (node:test) + the 20-case statusline suite: green
  • status caught real drift (ruflo 3.29.0 release nudge; a genuine natives regression; recurring FLVR brain.rvf corruption) and sync converged it — natives cross-checked against the bash ruflo-patch-native --check before its deletion
  • x verify learning (real train cycle → patterns persist) and x verify security (defend exit 1=threat / 0=clean) pass
  • npm i -g . → global ruflo-kit bin works; CI smoke sequence replicated locally in a sandbox HOME

Known debt (deliberate)

Windows is CI-tested from this PR onward but hasn't run on real hardware; the 20-check parity test wasn't ported (tracked for a later phase); setup's fresh-machine path hasn't run on a clean VM (nightly lane approximates it).

Before first npm release (repo owner)

  1. Create the NPM_TOKEN Actions secret (npm Automation token).
  2. Confirm ruflo-machine-kit is free on npm or switch to a scoped name.

🤖 Generated with Claude Code

pacphi added 5 commits July 14, 2026 10:13
BREAKING: install.sh/uninstall.sh/shell functions/bash bin scripts are gone.
The kit is now 'npm i -g' + one Node >=22 CLI with four porcelain verbs
(setup/status/sync/uninstall) and an x-plumbing namespace, per the definitive
command surface. Zero runtime dependencies (node:sqlite, node:test).

- src/lib: paths (XDG/%APPDATA%), exec (argv-only, .cmd shims), settings
  (backup-first merges), blocks (sentinel upsert/strip, CRLF-safe, user-
  extensible registry w/ declarative detectors in kit.json), sqlite, daemons
  (pidfile-first + ps/CIM sweep), versions (drift cache), mcp (family
  enumeration + deny rules), natives, rvf (FLVR quarantine), statusline
  (footer inject; template extracted verbatim from the shell heredoc), heal
- commands: status (dashboard, --json/--hint), sync (plan->apply->prove,
  --dry-run/--no-upgrade), setup (machine+project), uninstall (incl. legacy
  shell-kit migration); x: daemon-gc, mcp, reference, verify, improvement-eval
- docs: BACKGROUND/TROUBLESHOOTING/CONDITIONAL-BLOCKS/README archived as
  2026-07-14-shell-kit-*; new short README + npm-command TROUBLESHOOTING
- claude/ templates re-pointed at ruflo-kit verbs; installed CLAUDE.md
  blocks reconciled via 'x reference sync'
- tests: 19 node:test units + statusline suite (reads the extracted template)

Verified live: status caught real drift (3.29.0 release, natives regression
after the aidefence install, recurring FLVR brain.rvf corruption); sync
converged it; x verify learning/security green; golden parity vs the bash
patch-native checker before its removal.
… workflow

- ci.yml: unit + statusline tests (zero-dep, no install step) + a sandboxed-HOME
  CLI smoke (status --json shape, managed-block round-trip, uninstall --dry-run)
  on ubuntu/macos/windows × Node 22/24/26
- nightly.yml: installs REAL latest ruflo+agentic-qe (allow-scripts) and gates on
  the kit being able to heal them (sync --no-upgrade → status; x verify
  security/learning) — catches upstream drift like ruvnet/ruflo#2670 the day it ships
- release.yml: tag-driven npm publish with provenance; NPM_TOKEN repo secret;
  tag↔package.json version guard; prereleases → 'next' dist-tag, releases → 'latest'
  (github.ref_name passed via env, no inline event interpolation)
…on-setup v6, pnpm publish --provenance)

Runtime surface deliberately stays npm: the kit heals npm-managed global
ruflo/agentic-qe trees (lib/heal.mjs, paths.mjs globalRoot) — that is the target
environment, and the nightly lane keeps simulating it with npm i -g.
pnpm-managed-globals support is a tracked follow-up.
…entic-kit

- package: @pacphi/agentic-kit, bins agentic-kit + ak (AutoKitteh's 'ak' noted
  in README as a known PATH neighbor; full command always works)
- GitHub repo renamed (old ruflo-machine-ref URLs redirect)
- command references swept to 'ak …' across src/, bin help, README,
  TROUBLESHOOTING, claude/ templates (republished to the live CLAUDE.md);
  archive files stay frozen
- config dir migrates ~/.config/ruflo → ~/.config/agentic-kit (read-fallback in
  loadKitConfig; saves land at the new path); uninstall's legacy cleanup keeps
  targeting the ruflo-era dir and now removes all shell-era ruflo-* bins
- compat surfaces intentionally unchanged: CLAUDE.md sentinel slugs (ruflo-*),
  statusline ruflo-seg marker, runtime npm calls
@pacphi pacphi changed the title v4: npm-installable cross-platform ruflo-kit (setup/status/sync/uninstall) — shell kit removed, CI matrix + npm release v4: @pacphi/agentic-kit — npm-installable cross-platform kit (ak setup/status/sync/uninstall), shell kit removed, CI matrix + npm release Jul 14, 2026
@pacphi
pacphi merged commit 5aba6bf into main Jul 14, 2026
18 checks passed
@pacphi
pacphi deleted the npm-kit branch July 14, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant