Skip to content

i2mint/acture

Repository files navigation

acture

Get AI-agentic help building a command-dispatch architecture — one schema, and the palette, hotkeys, AI tools, MCP, and tests fall out of it.

acture is a development tool for building, migrating to, and maintaining a command-dispatch architecture in TypeScript/React apps. Define an operation once as a command; it becomes a command palette entry, a keyboard shortcut, an AI tool call, an MCP server tool, a macro step, an end-to-end test action, an undo entry, and a telemetry event — and, via the acture PyPI client, a Python call.

It is delivered primarily as skills, patterns, and codemods an AI agent uses to write command dispatch into your project — adapted to your stack and your preferences. The acture-* npm packages are an optional accelerator: ready-made, tested implementations the agent can reach for instead of hand-writing similar code.

You can use acture without adding a single acture-* dependency to your project. Whether you take on a dependency is always your explicit, per-piece choice — see docs/positioning.md, the canonical statement of what acture is and what it asks of you.

Install (optional — the accelerator packages)

You only install what you decide to reuse. Every package is independently optional; the agent-written path needs none of them.

pnpm add acture                  # core registry + dispatcher + schema bridge (optional even this)
pnpm add acture-state-zustand    # state adapter (or acture-state-redux)
pnpm add acture-palette-react    # command palette UI (on cmdk)
pnpm add acture-hotkeys          # keyboard shortcuts (on tinykeys)
pnpm add acture-mcp-server       # MCP server projection
pnpm add acture-ai-vercel        # AI tool definitions (on the Vercel AI SDK)
pnpm add acture-migration        # strangler-fig adoption primitives
pnpm add acture-telemetry        # observe every dispatch via a sink
pnpm add acture-undo             # patch-based undo/redo over a PatchCapableAdapter
# …plus acture-forms-autoform and acture-forms-rjsf for parameterized commands.

# Dev / CI tooling:
pnpm add -D acture-build-tier              # build-step @stable/@experimental/@internal/@deprecated mirror
pnpm add -D acture-cli                     # `acture compare-schemas` / `acture snapshot` CLI
pnpm add -D acture-devtools                # embeddable <Inspector /> for dev builds
pnpm add -D acture-e2e-playwright          # macro / e2e sequence engine + Playwright fixture
pnpm add -D acture-test-property           # fast-check property tests over the registry
pnpm add -D eslint-plugin-acture-migration  # ESLint rules: stale wrapMutation, .describe() discipline

Python:

pip install acture  # MCP client facade — Mapping[str, Command] over any acture-mcp-server

The 18 sub-packages publish unscoped as acture-* — the @acture npm scope was unavailable. The MCP adapter is published as acture-mcp-server because the unscoped acture-mcp collided with an unrelated project. acture is the single namespace on both npm (the core registry) and PyPI (the Python MCP client).

Status

v1.13 — chain end (2026-05-15). 19 npm packages live + 1 PyPI package (acture, the Python MCP client). 489 npm package tests + 41 example tests + 23 Python tests, all green. 26 agent skills + 7 reproducibility docs. Phases 0–4 of the original v1 plan are complete; work since has been small, tracked increments. See docs/roadmap.md for the live status. Of the post-v1 candidates, the state adapters acture-state-jotai and acture-state-valtio remain; acture-sandbox now ships the isolation-only extension seam (the ExtensionRunner port + in-process transport), with the real isolating transports still deferred.

Package Role
acture core registry, dispatcher, when-clause DSL, schema bridge, state-adapter interface
acture-state-zustand StateAdapter for zustand+immer
acture-state-redux StateAdapter for Redux Toolkit
acture-palette-react command palette with parameterized-command UX (on cmdk)
acture-hotkeys tinykeys-backed keyboard bindings
acture-forms-autoform Zod-native form adapter
acture-forms-rjsf JSON-Schema form adapter (rjsf)
acture-mcp-server MCP server projection (published as acture-mcp-server; acture-mcp was taken)
acture-ai-vercel Vercel AI SDK tool definitions
acture-migration strangler-fig primitives: wrapMutation, actureMiddleware, createDomInterceptor, chooseImplementation, shadowCompare
acture-telemetry observe every dispatch via a sink; optional pass-through redact / sampler
acture-undo patch-based undo/redo over a PatchCapableAdapter; transactions; onEffect host callback
acture-build-tier build-step @stable/@experimental/@internal/@deprecated JSDoc → runtime tier mirror; regex + AST modes
acture-cli acture compare-schemas (CI gating, deep nested diffs) + acture snapshot (registry → JSON)
acture-devtools embeddable <Inspector />, instrumentRegistry dispatch log, enableTierWarnings
acture-codemods five research-4 §B.5 codemods (wrap-handler-with-mutation, extract-onclick-to-command, redux-action-to-command, usestate-mutation-to-command, rtk-thunk-to-command); --dry-run + --json for agents
acture-e2e-playwright pure sequence engine (recordSequence / replaySequence / replayTest) + Playwright fixture; substrate for macros + e2e + property tests
acture-test-property fast-check arbitraries over the registry; random CommandSequences replayed end-to-end with invariant assertions
eslint-plugin-acture-migration acture/no-stale-wrap-mutation + acture/require-param-describe
acture (PyPI) thin MCP-client facade — Mapping[str, Command] over any acture-mcp-server; errors-as-data preserved across the language boundary

Worked examples:

Agent skills live under .claude/skills/: 21 acture-* (dev / foundation / per-consumer-surface) + 5 migration-* (strangler-fig workflow: migration-diagnosemigration-planmigration-scaffoldmigration-wrapmigration-graduate). Reproducibility references for each major package live under docs/hand-written-*.md.

What's new since v1.5

  • v1.13acture on PyPI graduated from name-reservation placeholder to a real thin MCP-client facade per research-6. ActureClient (a Mapping[str, Command]), Command, ActureError, stdio_transport / http_transport. Cross-language semver is lockstep (driven by scripts/sync-python-version.mjs).
  • v1.12acture-test-property. fast-check arbitraries; random CommandSequences replayed through the v1.7 sequence engine; invariants asserted end-of-sequence; shrunk counter-examples replayable verbatim.
  • v1.11acture-telemetry and acture-undo. Telemetry observes every dispatch via a configurable sink (optional redact / sampler). Undo is patch-based over a PatchCapableAdapter, transactions group N dispatches, onEffect routes effect lifecycle to the host.
  • v1.10acture/require-param-describe lint rule (Zod params missing .describe()) and an MCP spec-version pin test.
  • v1.9acture-codemods CLI/README polish + docs/ai-codemod-recipe.md; greenfield agent-track skills (acture-greenfield-state-model, acture-greenfield-bootstrap).
  • v1.8 — per-surface consumer skills for hotkeys, MCP, and AI.
  • v1.7acture-e2e-playwright; macros + e2e tooling under the same sequence engine (docs/hand-written-command-sequence.md).
  • v1.6 — core positioning review; enableTierWarnings moved to acture-devtools; docs/hand-written-registry.md + acture-greenfield skill.
  • v1.5 — repositioning + namespace migration (all @acture/* → unscoped acture-*).

What's next: see docs/roadmap.md for the forward plan and docs/next_session.md for the active handoff.

Two flexibility dimensions

acture adapts along two independent axes — and the agent keeps both open rather than defaulting one. (Full statement in docs/positioning.md.)

  • Core vs strangler-fig — design command dispatch in from day one, or wrap it into an existing codebase incrementally and graduate over time.
  • Agent-written vs package-reuse — have the agent write the integration into your project (zero acture dependency, maximum adaptability), or install an acture-* package (less code to own, tested — at the cost of a dependency). Decided per consumer, not per project.

What it isn't

  • Not a framework you must depend on. acture is a development tool first. An agent wielding its skills can stand up a full command-dispatch architecture in a project whose package.json never gains an acture-* line. Depending on a package is always your explicit, opt-in choice.
  • Not a state library. acture ships an adapter interface (StateAdapter<S>) and reference adapters; your app keeps its existing state library.
  • Not a React library. Core has zero React dependencies; React lives in adapter packages.
  • Not opinionated about your UI kit or your tools. Bring your own design system, your own e2e runner, your own AI SDK — acture's per-tool packages each integrate one known-good choice, never the only choice.

Documentation map

License

Apache-2.0.

What does "acture" mean?

Acture is primarily known as an obsolete term from the early 1600s that means action or the state of doing something.

"Love made them not; with acture they may be, Where neither party is nor true nor kind."

— William Shakespeare, A Lover's Complaint (line 185)

It has also been adopted in specialized movement fields to describe dynamic readiness.

The term "acture" was famously coined by Moshe Feldenkrais, the founder of the Feldenkrais Method, as a direct critique of the traditional, static concept of "posture." In the context of the Feldenkrais Method and movement science, "acture" represents the transition from viewing the body as a structure held in a fixed position to viewing it as a system constantly prepared for action.

About

AI-enabled Tools to Develop Command-Dispatch Architectures

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors