ai-pipeline
Enterprise Part of the commercial Kumiko Enterprise offering — not in the open framework.
Tenant-editable policy layer for AI pipelines whose step structure lives in code. The app author declares one AiStepSpec per step instance (stable stepKey, a zod params schema, default policy, optional dryRun runner) and passes them to createAiPipelineFeature. A TenantAdmin overrides enabled/params per step: ai-pipeline:write:set-policy saves and activates it in one call (the shipped editor UI’s contract); draft/activate/rollback split that into an explicit review gate — a draft has no run-time effect until activate, and rollback restores an older revision. resolveStepPolicy(ctx, tenantId, spec) always resolves the highest ACTIVE revision, never a draft. Goldens (create-golden/delete-golden/goldens) are curated input/expectedOutput fixtures per step; dry-run executes a step’s declared dryRun runner against one golden with an ad-hoc, never-persisted policy/prompt override and reports whether the output matches, with usage/cost — no domain write. Use this when operators must retune AI behaviour live and preview a change before it goes live; the pipeline’s step order and wiring stay in code. A step’s system prompt belongs in prompt-store, never in a step’s params: params are validated against the step’s paramsSchema as ordinary configuration, not read as an instruction. Every handler, screen and nav entry uses one access rule, default TenantAdmin and SystemAdmin; createAiPipelineFeature(steps, { access }) replaces it.
Build it yourself
Section titled “Build it yourself”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.
How it fits
Section titled “How it fits”What this feature needs to run (Requires, top) and the write commands this feature provides (Provides, bottom).
flowchart TB
n_ai_pipeline["ai-pipeline"]
subgraph how_reqs["Requires"]
n_tenant["tenant"]
n_ai_foundation["ai-foundation"]
n_prompt_store["prompt-store"]
end
subgraph how_provides["Provides"]
n_cmd_ai_pipeline_write_activate(["activate"])
n_cmd_ai_pipeline_write_add_golden(["add-golden"])
n_cmd_ai_pipeline_write_create_golden(["create-golden"])
n_cmd_ai_pipeline_write_delete_golden(["delete-golden"])
n_cmd_ai_pipeline_write_draft(["draft"])
n_cmd_ai_pipeline_write_rollback(["rollback"])
n_cmd_more(["+2 more"])
end
n_tenant --> n_ai_pipeline
n_ai_foundation --> n_ai_pipeline
n_prompt_store --> n_ai_pipeline
n_ai_pipeline --> n_cmd_ai_pipeline_write_activate
n_ai_pipeline --> n_cmd_ai_pipeline_write_add_golden
n_ai_pipeline --> n_cmd_ai_pipeline_write_create_golden
n_ai_pipeline --> n_cmd_ai_pipeline_write_delete_golden
n_ai_pipeline --> n_cmd_ai_pipeline_write_draft
n_ai_pipeline --> n_cmd_ai_pipeline_write_rollback
n_ai_pipeline --> n_cmd_more
Provides — write commands this feature registers (dispatch them through the command bus):
ai-pipeline:write:activateai-pipeline:write:add-goldenai-pipeline:write:create-goldenai-pipeline:write:delete-goldenai-pipeline:write:draftai-pipeline:write:rollbackai-pipeline:write:set-policyai-pipeline:write:start-dry-run
Dependencies
Section titled “Dependencies”- Requires:
tenant,ai-foundation,prompt-store - Activation: always on (not toggleable)