Flower action runtime guide
Use when building, modifying, reviewing, migrating, or testing Java code that uses flower-action-runtime, including ActionProposal and ActionDefinition design, registry/validation/policy/approval/pre-execution controls, tenant-scoped duplicate handling, explicit failure retry policy, synchronous/async/deferred executor selection, ActionRun and RunStore persistence, JDBC CAS concurrency, completion/cancellation/recovery, Flower workflow or event-loop backends, and 0.1/0.2-to-0.3 migration.From its SKILL.md
npx -y skills add flowerjvm/flower-action-runtime-guideAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Flower Action Runtime Guide
Overview
Use this skill to keep business actions behind one explicit control boundary while supporting approval, audit, asynchronous work, durable completion, and safe concurrent state changes.
This skill owns action-runtime guidance. When the host also authors Flower
Flows, Steps, Guards, Workers, event waits, or checkpoints, also load the
sibling flower-app-guide skill and follow both sets of rules.
Start Here
Always read:
references/00-guide-version.mdreferences/01-runtime-quick-rules.mdreferences/90-verification.md
Then read the reference that matches the task.
Reference Routing
- Designing actions, proposal identity, definitions, policy, approval,
pre-execution checks, results, audit, or idempotency: read
references/10-action-model-and-controls.md. - Choosing synchronous, in-process async, or durable deferred execution and
implementing completion/cancellation: read
references/20-execution-modes.md. - Working with
ActionRun, customRunStore, JDBC schema/migrations, CAS, recovery, or multiple server instances: readreferences/30-persistence-and-concurrency.md. - Selecting
DefaultActionRuntime, the workflow backend, or the event-loop backend: readreferences/40-flower-backends.md. - Writing unit, parity, concurrency, persistence, or recovery tests: read
references/50-testing.md. - Integrating the runtime into REST, MCP, schedulers, AI planners, Spring, or a
domain application: read
references/60-host-integration.md.
Workflow
- Identify the business side effect and every entry point that can request it.
- For host integration, pin the published Maven Central
0.3.1artifacts and verify APIs against thev0.3.1source tag. Inspect a mutable checkout only when modifying the runtime itself; its main branch may be a later SNAPSHOT. - Define a stable action id and register exactly one controlled executor.
- Map request channel, proposer type, execution principal, tenant, run id, and
idempotency key without collapsing them into one actor field. In 0.3,
ActionOriginno longer exists. - Configure validation, policy, approval, duplicate handling, audit/trace, and the pre-execution guard before exposing the action.
- Choose the executor mode by lifetime and durability, not by convenience.
- Use a queryable durable
RunStorefor approval, async, deferred, callback, cancellation, or restart-sensitive work. - If Flower drives the backend, keep Worker/EventWorker ticks non-blocking and keep governance semantics in the shared action pipeline.
- Add focused failure, resume, race, and recovery tests, then run the complete verification appropriate to the changed modules.
Non-Negotiable Rules
- Treat UI, REST, batch, MCP, scheduler, and AI output as proposals. Only a
registered
ActionExecutormay perform the controlled side effect. - Never bypass registry, validation, policy, approval, duplicate handling, or audit in a resume, callback, retry, recovery, or admin path.
- Re-resolve, re-validate, re-evaluate policy, and run
PreExecutionGuardafter approval and immediately before dispatch. - Do not block Flower Worker or EventWorker ticks with domain work, HTTP, LLM,
tools, sleeps, or
Future.get(). - Use
ActionExecutionResult.code()andRetryDispositionfor machine decisions. Do not parse human messages or leave failure retry safety implicit. - Give every action request a unique
runId. Use the idempotency key to group transport retries; do not reuse a run id for a new request. - Make every
RunStoretransition versioned CAS. Do not add an unconditional update/upsert path to the runtime SPI. - Authenticate callback callers and verify tenant, run id, and attempt token.
- Make external cancellation hooks idempotent for the same run attempt and operation id.
- Scope duplicate reservations by at least tenant, action id, and idempotency key. Add principal or resource scope when an existing result is not safely shareable within the tenant.
- Resolve, validate, and authorize the current request before duplicate
reservation or
RETURN_EXISTINGresult lookup. - Treat
CANCELLEDas the runtime's terminal acceptance decision, not proof that an external operation physically stopped. - Treat deferred dispatch as at-least-once-capable integration, not an exactly-once guarantee. Require deterministic operation ids, idempotent dispatch, authenticated callbacks, reconciliation, and an orphan policy.
- Treat
ActionRunas runtime lifecycle truth. Flower checkpoints, events, signals, futures, and callback payloads are orchestration or delivery data.
Source Of Truth
For a consuming application, the published 0.3.1 artifacts and the matching
v0.3.1 source tag are authoritative. Never make a distributable guide,
sample, or plugin depend on a mutable checkout, mavenLocal(), or a SNAPSHOT.
When modifying the runtime itself, its checked-out source and tests become the
working source of truth. Useful upstream documents include:
flower-action-runtime/README.md
flower-action-runtime/flower-action-runtime-core/README.md
flower-action-runtime/docs/architecture/DEFERRED_ACTION_EXECUTION.md
flower-action-runtime/docs/architecture/ACTION_RUN_PERSISTENCE.md
flower-action-runtime/docs/architecture/EXECUTION_BACKEND_STRATEGY.md
flower-action-runtime/docs/architecture/V0_2_MIGRATION_AND_MODULE_IMPACT.md
flower-action-runtime/docs/architecture/V0_3_MIGRATION_AND_MODULE_IMPACT.md
What ships with it: 14 files
54.2 KB alongside SKILL.md
agents/
- openai.yaml282 B
references/
- 00-guide-version.md1.4 KB
- 01-runtime-quick-rules.md3.1 KB
- 05-build-and-module-selection.md7.4 KB
- 10-action-model-and-controls.md5.4 KB
- 20-execution-modes.md4.2 KB
- 30-persistence-and-concurrency.md4.1 KB
- 40-flower-backends.md2.2 KB
- 50-testing.md5.2 KB
- 60-host-integration.md4.0 KB
- 90-verification.md3.3 KB