agentleFS
zenml-iozenml-io/kitaru/.agents/skills/kitaru-adapter-development/SKILL.md

kitaru-adapter-development

Skill300 starsChanged 2 months agoApache-2.0View on GitHub

Add or change a Kitaru framework adapter that records native agent runs or supports bounded replay. Use for Python adapter distributions under plugins/packages or TypeScript adapter packages under packages, not trace importers or core API work.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read AGENTS.md. For Python adapters, also read plugins/AGENTS.md and plugins/DEVELOPMENT.md.

    line 8
  2. Distinctive:

    Start from the closest current adapter and the target framework's public API.

    line 10
  3. Distinctive:

    when sessions and nodes are written, including what the caller observes if recording fails

    line 20
  4. Very specific:

    Document shipped adapters under docs/book/adapters/, update docs/book/adapters/README.md and docs/book/toc.md, and add a runnable example …

    line 41
  5. Distinctive:

    Test the public wrapper, captured node semantics, native result preservation, supported replay, unsupported replay preflight, concurrency, …

    line 59
  6. Distinctive:

    Use live provider or framework tests only when their credentials and external side effects are explicitly in scope.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kitaru Adapter Development

Read AGENTS.md. For Python adapters, also read plugins/AGENTS.md and plugins/DEVELOPMENT.md. For TypeScript adapters, read release/typescript.md before changing package or release metadata. Load the same-name kitaru-dev repo skill for the current host for the general command and PR workflow.

Start from the closest current adapter and the target framework's public API. Do not port a historical adapter wholesale.

Choose the extension point

Recording adapters are independent Python distributions under plugins/packages/<slug>/, with focused tests under plugins/tests/adapters/<slug>/. Importer-backed adapters are different: they live inside the provider's importer package as an ImporterBackedAdapter subclass, never intercept model or tool calls, and follow the kitaru-importer-development skill instead of this section's package rules. Agent versions running them declare runtime_capabilities with overrides: false and tool_policies: false on the run spec. TypeScript framework adapters are packages such as packages/mastra/ and packages/vercel-ai/; shared adapter primitives live under packages/core/src/adapter/.

Before editing, state:

  • which public framework call, hook, callback, or wrapper is intercepted
  • which model, tool, handoff, child-agent, and failure events are observable there
  • when sessions and nodes are written, including what the caller observes if recording fails
  • which replay overrides can be applied at a real framework boundary
  • which streaming, tool, approval, resume, stateful, or dynamic cases remain unsupported

Preserve the framework's ordinary behavior, configured hooks and state, public entrypoint, and native result type. Reject unsupported replay configurations before model or tool execution. Treat passthrough tools as real side effects, not as a reversible transaction. If the framework has no public per-run model replacement point, do not emulate one by mutating shared agent state or reading private fields; stop and report that replay boundary.

Package and documentation work

Python feature PRs follow the version and dependency ownership rules in plugins/AGENTS.md. Leave existing package versions unchanged. Use the exact development dependency from plugins/DEVELOPMENT.md only when the adapter needs unreleased core; release prep selects the published compatibility floor.

For a new Python adapter, complete the new-distribution integration review in the kitaru-dev skill before the PR; it covers worker installation and release wiring beyond the adapter package itself. Inspect the current package inventory and update only the required integration points:

  • plugins/packages/<slug>/pyproject.toml, README, changelog, source package, public exports, and focused tests
  • tool.kitaru.artifact.import-module for standalone artifact-smoke coverage
  • plugins/pyproject.toml only when the adapter must be a workspace development dependency or source
  • release/release-units.toml for an independently released distribution

Python adapters are installed directly by agent projects. Keep default-catalog = false in release/release-units.toml and do not add them to DEFAULT_PLUGIN_DEFINITIONS.

For a new TypeScript adapter, add a separate package instead of framework-specific code in packages/core/. Inspect the root workspace scripts, lockstep version rules, packaging smoke, and .github/workflows/release-typescript.yml; do not assume a newly added package is automatically built or published.

Document shipped adapters under docs/book/adapters/, update docs/book/adapters/README.md and docs/book/toc.md, and add a runnable example only when it exercises a supported path.

Core boundary

An adapter request does not authorize a new core abstraction, server resource, or replay protocol. Stop and surface the missing extension point before changing any of these areas merely to finish the adapter:

  • openapi/
  • src/kitaru/api_models/
  • src/kitaru/client/
  • src/kitaru/server/
  • src/kitaru/worker/
  • CLI or MCP code
  • packages/core/src/adapter/ when the proposed primitive is useful only to one framework package

Explain what the adapter cannot observe or override, why the current public boundary is insufficient, and the smallest separate core decision that would unblock it. Continue only after a maintainer approves that bounded core change; a request to change core "if needed" is not approval to broaden the adapter patch opportunistically.

Validation

Test the public wrapper, captured node semantics, native result preservation, supported replay, unsupported replay preflight, concurrency, and recording-finalization failures as applicable.

For Python adapters, run the focused adapter tests, then the plugin workspace format, lint, typecheck, and test commands from plugins/AGENTS.md. Run just plugin-artifact-smoke after package metadata or artifact-loading changes.

For TypeScript adapters, run the affected package's test, typecheck, lint, and build scripts. Run the root pnpm test, pnpm typecheck, pnpm lint, and pnpm pack:check when shared primitives, workspace metadata, or packaging changes.

Use live provider or framework tests only when their credentials and external side effects are explicitly in scope.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.