Skip to content

prompt-store

Enterprise Part of the commercial Kumiko Enterprise offering — not in the open framework.

Event-sourced store for versioned prompt templates: every edit appends an immutable revision, the highest revision is active, and rollback appends a copy of an older revision so the full history is preserved. Consume it via resolveActivePrompt(ctx, tenantId, promptKey, { fallback }), which returns the active revision or the caller-owned default when no revision exists yet. Use this instead of a plain config-key when you need an audit trail of prompt changes and the ability to roll back without a deploy. TenantAdmins edit and roll back via the prompt-admin screen.

This Enterprise implementation is optional. If you need a narrower or domain-specific version, you can build an app-owned feature, handler, or job with Kumiko’s public extension points.

Use this package when you want the maintained implementation, its existing contracts, and the surrounding operational behavior. A custom implementation is not drop-in compatible automatically: your app owns its authorization, validation, integrations, tests, security review, and production operations.

Start with Features and composition and Custom write handlers.

What this feature needs to run (Requires, top) and the write commands this feature provides (Provides, bottom).

flowchart TB
  n_prompt_store["prompt-store"]
  subgraph how_reqs["Requires"]
    n_tenant["tenant"]
    n_ai_foundation["ai-foundation"]
  end
  subgraph how_provides["Provides"]
    n_cmd_prompt_store_write_edit(["edit"])
    n_cmd_prompt_store_write_revert(["revert"])
  end
  n_tenant --> n_prompt_store
  n_ai_foundation --> n_prompt_store
  n_prompt_store --> n_cmd_prompt_store_write_edit
  n_prompt_store --> n_cmd_prompt_store_write_revert

Provides — write commands this feature registers (dispatch them through the command bus):

  • prompt-store:write:edit
  • prompt-store:write:revert