dex-sdk
Skill2 starsChanged 2 months agoMITView on GitHub
Implement, debug, test, and operate applications with the Superdurable Dex SDK in Python, Go, Java, TypeScript, or Rust. Use for standalone SDK work and when dex-app-builder or dex-connector-contributor loads it. Do not use as the primary workflow for Dex product, application, or business-process requests.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/dex-skills.mdcCursor rule
- dex-app-builderSkill
- dex-connector-contributorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before the first substantive Dex-related response, follow the Dex Skills version check once.
- Distinctive: line 22
If the user explicitly invokes this skill, stay in it.
- Distinctive: line 69
Treat the project's source, lockfile, installed SDK doc comments, and the matching runnable examples as authoritative for exact code.
- Distinctive: line 70
If you cannot verify an exact API for the installed version, stop at the version-independent Flow model and ask to inspect the installed …
- Distinctive: line 76
Write Flow state only through typed RPCs.
- Distinctive: line 78
Do not present Dex Server internals as application requirements.
- Distinctive: line 83
Read the language entry file for the project: Go, Python, Java, TypeScript, or Rust.
- Distinctive: line 84
Before you write any Client boundary (start, RPC, wait, cleanup, admission, Stream write), read error handling and the language's error …
- Distinctive: line 118
One owning Flow: Start one domain-named Flow at the API boundary for a multi-step mutation.
- Distinctive: line 119
No SubFlows by default: Use parallel Steps in one lifecycle, or a separate top-level Flow for a separate owner.
- Distinctive: line 120
Dex-first state: Default durable state to Attributes and AttributeMaps, not a new database.
- Distinctive: line 121
Start first: Call StartFlow first with stable identity.
- Distinctive: line 122
Typed failures: Keep typed Dex errors until domain policy can tell a business rejection, a closed-Flow race, a retryable failure, and a …
- Distinctive: line 123
Terminal reads: Read retained state with a Client Attribute read or a query-only RPC.
- Distinctive: line 124
Open Flows: Keep stable names compatible with open Flow runs.
- Distinctive: line 130
Before handoff, run the code check.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Dex SDK
Build reliable applications through Dex's public programming model. Keep the user's experience in Dex terms and Dex APIs.
Session start
Before the first substantive Dex-related response, follow the Dex Skills version check once. Prefer the lifecycle hook status. Never delay or block the task for it.
Which skill
| Request | Skill |
| A Dex product, application, or business process, end to end | dex-app-builder. It loads this skill's core and Go references for the backend. |
| Add or change an official Connector, operation, Trigger, or UI unit | dex-connector-contributor |
| Implement, debug, test, or operate code that uses the Dex SDK | this skill |
If the user explicitly invokes this skill, stay in it.
Mental model
A Flow is one durable run of a business process, with a stable Flow ID. It is a graph of Steps. Each Step has WaitFor, which returns the Conditions to wait on, and Execute, which does the work and returns a decision: the next Steps, or how the Flow closes. Each method call is one commit boundary. Dex persists every committed change and retries failed methods, so the Flow survives Worker and Server restarts.
| Concept | What it is | Key rule |
| Flow | durable execution with identity, schema, and RPCs | one Flow per business lifecycle; name it after the domain |
| Step | WaitFor plus Execute; options set durability, timeouts, retries, loads, locks | split Steps by recovery boundary; external effects idempotent |
| Attribute | typed durable state; AttributeMap for keyed instances | the default home of application state |
| Channel | durable FIFO queue consumed by WaitFor | queued intent, not storage |
| RPC | typed synchronous handler on a Flow | the only external write path for Flow state |
| Stream | best-effort, resumable messages | progress only; never the record |
| Timer | durable delay Condition | business delays and deadlines; never for polling |
| SubFlow | child Flow started from WaitFor | not in a first design; pass the evolution gate |
| Client | the application's boundary to Dex | start, invoke, read, wait; no direct state write |
| Connector | released provider integration: ready-made Connector Steps (Query or Mutation) and Triggers | use released official modules only; credentials never enter Flow state |
The Components are the processes that run this model: application (Worker and Client), server, dexcli and local development, Dex Web.
Choose the mechanism:
| Need | Use |
| Current state that later Steps, reads, or search need | Attribute or AttributeMap |
| Queued command, approval, or event for the Flow | Channel, published through an RPC |
| Synchronous change or computed read from outside | RPC |
| Read stored values from outside | Client Attribute read |
| Wait for a state change from outside | Attribute-match or Step-completion wait |
| Live progress | Stream, with durable state in Attributes |
| Parallel work in one lifecycle | parallel Steps (GoToMany) |
| Separate owner and lifecycle | another top-level Flow, started by a Step through a Client |
| Wait for an external system | the Polling pattern |
Find the right reference version
Skills hold stable rules only. Exact API names, signatures, options, defaults, limits, configuration, and version differences live in the SDK doc comments and the versioned Developer reference.
- Find the installed SDK version in the project manifest or lockfile:
go.mod(Go),pyproject.tomlor the lockfile (Python),pom.xmlorbuild.gradle(Java),package.jsonor the lockfile (TypeScript),Cargo.tomlorCargo.lock(Rust). Note its minor version. - Open the Developer reference for that component.
https://docs.superdurable.io/reference/<component>/is the latest version; components arego,python,java,typescript,rust,server,cli, andweb. - Select the project's version with the version selector in the left sidebar, or open
https://docs.superdurable.io/reference/<component>/<version>/directly. The reference overview has the compatibility matrix. - For the Server, the CLI, and Dex Web, use the version that is deployed or installed (
dexcli version).
Rules:
- Preserve the installed SDK version unless the user asks to upgrade.
- Treat the project's source, lockfile, installed SDK doc comments, and the matching runnable examples as authoritative for exact code. Examples on the default branch track the newest release; check them against the installed version.
- If you cannot verify an exact API for the installed version, stop at the version-independent Flow model and ask to inspect the installed package. Never invent a Dex API.
dex-developeris this skill's former name. If a directdex-developerinstall is also present, tell the user to remove it and install the plugin, then start a new session. Do not delete it yourself.
Stay at the application boundary
- Model behavior with Flows, Steps, Waits, Attributes, Channels, Streams, RPCs, Timers, SubFlows, Connectors, Workers, and the Client.
- Write Flow state only through typed RPCs. Read stored Attributes with the Client Attribute read, and use a read-only RPC when the read needs Flow code, pending messages, or a whole AttributeMap. Wait with Attribute match, not polling.
- Inspect and recover with Dex Web, dexcli, SDK errors, and application logs.
- Do not present Dex Server internals as application requirements. Discuss them only when the user develops or operates Dex itself.
- Diagnose read-only. Do not stop, time travel, publish, invoke, delete, edit, or otherwise mutate a Flow unless the user authorizes it.
Load references
- Read the language entry file for the project: Go, Python, Java, TypeScript, or Rust. Load only that language.
- Before you write any Client boundary (start, RPC, wait, cleanup, admission, Stream write), read error handling and the language's error handling file.
- For a write followed by a read or a completion check, read read-after-write.
- Then load what the task needs:
| Task | Core reference |
| New application, wiring, Workers, deployment rollouts | application.md |
| Flow boundary, start options, Flow timeout | flow.md |
| Step graph, waits, decisions, durability, retries, heartbeats, locks | step.md |
| State, maps, indexes, search, hard-delete secrets, SQL projection of Attributes (Attribute Store sync) | attribute.md |
| Queues, approvals, moving pending messages | channel.md |
| RPC design, transactions, cancellation from an RPC | rpc.md |
| Progress, LLM token streaming | stream.md |
| Delays, deadlines, SkipTimer | timer.md |
| Child Flows | subflow.md |
| Provider integrations, local or deployed Connector configuration | connector.md |
| Client calls, reads, waits, lifecycle APIs | client.md |
| Errors, recovery types, diagnosis, operator recovery | error-handling.md |
| Large values, BlobCache, whether to add a database | data-handling.md |
| Pattern choice and skeletons, durable AI agents | patterns.md |
| Integration tests | testing.md |
| Server behavior, search backends, deployment | server.md |
dexcli, dexcli dev, visualization | cli.md |
| Dex Web | web.md |
| Go FDG annotations, Summary and Display, Start forms, Actions | FDG authoring in dex-app-builder |
| Design review and handoff | self-check.md |
Model before implementation
For non-trivial work, run the design review, then write the Flow model before code. These rules apply everywhere:
- Names. Name Flow types after their domain. Start every RPC name with a concrete action verb and its subject, such as
getQueuedMessages. Prefer complete, precise names to short or generic ones such asGet,Update,Manager,Data, orHandler. - WaitFor versus Execute. Execute does work; WaitFor only declares the wait and may write Dex state for it. WaitFor never calls an external system. Keep every provider call in Execute, idempotent or compensatable. Never poll a provider from WaitFor or with a Timer loop; use the Polling pattern.
- Commit boundaries. Each WaitFor, Execute, and RPC call commits separately. Give a provider action its own Step when its success deserves its own checkpoint, retry policy, failure route, or audit boundary.
- One owning Flow. Start one domain-named Flow at the API boundary for a multi-step mutation. Never chain dependent starts in the API handler. See flow.md.
- No SubFlows by default. Use parallel Steps in one lifecycle, or a separate top-level Flow for a separate owner. See subflow.md.
- Dex-first state. Default durable state to Attributes and AttributeMaps, not a new database. See data-handling.md.
- Start first. Call StartFlow first with stable identity. Do not read before or after a successful start to guard duplicates. See error-handling.md.
- Typed failures. Keep typed Dex errors until domain policy can tell a business rejection, a closed-Flow race, a retryable failure, and a local defect apart.
- Terminal reads. Read retained state with a Client Attribute read or a query-only RPC. Never decode Step outputs from history for a business read.
- Open Flows. Keep stable names compatible with open Flow runs. See application.md.
Complete the vertical slice
A change includes typed inputs, outputs, and failures; Flow and Step definitions; every persistence schema entry; constructor-injected dependencies; registry, Worker, and Client wiring; an application boundary; and a real Dex Server integration test with unique Flow IDs and bounded waits instead of sleeps.
Before handoff, run the code check.
Links
- Developer reference: https://docs.superdurable.io/reference/
- Runnable examples: https://github.com/superdurable/dex/tree/main/examples
- Connector catalog: https://connectors.superdurable.io/catalog.yaml
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
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.

