agentleFS
superdurablesuperdurable/dex-skills/dex-sdk/SKILL.md

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.

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
  1. Distinctive:

    Before the first substantive Dex-related response, follow the Dex Skills version check once.

    line 12
  2. Distinctive:

    If the user explicitly invokes this skill, stay in it.

    line 22
  3. Distinctive:

    Treat the project's source, lockfile, installed SDK doc comments, and the matching runnable examples as authoritative for exact code.

    line 69
  4. Distinctive:

    If you cannot verify an exact API for the installed version, stop at the version-independent Flow model and ask to inspect the installed …

    line 70
  5. Distinctive:

    Write Flow state only through typed RPCs.

    line 76
  6. Distinctive:

    Do not present Dex Server internals as application requirements.

    line 78
  7. Distinctive:

    Read the language entry file for the project: Go, Python, Java, TypeScript, or Rust.

    line 83
  8. Distinctive:

    Before you write any Client boundary (start, RPC, wait, cleanup, admission, Stream write), read error handling and the language's error …

    line 84
  9. Distinctive:

    One owning Flow: Start one domain-named Flow at the API boundary for a multi-step mutation.

    line 118
  10. Distinctive:

    No SubFlows by default: Use parallel Steps in one lifecycle, or a separate top-level Flow for a separate owner.

    line 119
  11. Distinctive:

    Dex-first state: Default durable state to Attributes and AttributeMaps, not a new database.

    line 120
  12. Distinctive:

    Start first: Call StartFlow first with stable identity.

    line 121
  13. Distinctive:

    Typed failures: Keep typed Dex errors until domain policy can tell a business rejection, a closed-Flow race, a retryable failure, and a …

    line 122
  14. Distinctive:

    Terminal reads: Read retained state with a Client Attribute read or a query-only RPC.

    line 123
  15. Distinctive:

    Open Flows: Keep stable names compatible with open Flow runs.

    line 124
  16. Distinctive:

    Before handoff, run the code check.

    line 130

≈ “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.

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

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

RequestSkill
A Dex product, application, or business process, end to enddex-app-builder. It loads this skill's core and Go references for the backend.
Add or change an official Connector, operation, Trigger, or UI unitdex-connector-contributor
Implement, debug, test, or operate code that uses the Dex SDKthis 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.

ConceptWhat it isKey rule
Flowdurable execution with identity, schema, and RPCsone Flow per business lifecycle; name it after the domain
StepWaitFor plus Execute; options set durability, timeouts, retries, loads, lockssplit Steps by recovery boundary; external effects idempotent
Attributetyped durable state; AttributeMap for keyed instancesthe default home of application state
Channeldurable FIFO queue consumed by WaitForqueued intent, not storage
RPCtyped synchronous handler on a Flowthe only external write path for Flow state
Streambest-effort, resumable messagesprogress only; never the record
Timerdurable delay Conditionbusiness delays and deadlines; never for polling
SubFlowchild Flow started from WaitFornot in a first design; pass the evolution gate
Clientthe application's boundary to Dexstart, invoke, read, wait; no direct state write
Connectorreleased provider integration: ready-made Connector Steps (Query or Mutation) and Triggersuse 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:

NeedUse
Current state that later Steps, reads, or search needAttribute or AttributeMap
Queued command, approval, or event for the FlowChannel, published through an RPC
Synchronous change or computed read from outsideRPC
Read stored values from outsideClient Attribute read
Wait for a state change from outsideAttribute-match or Step-completion wait
Live progressStream, with durable state in Attributes
Parallel work in one lifecycleparallel Steps (GoToMany)
Separate owner and lifecycleanother top-level Flow, started by a Step through a Client
Wait for an external systemthe 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.

  1. Find the installed SDK version in the project manifest or lockfile: go.mod (Go), pyproject.toml or the lockfile (Python), pom.xml or build.gradle (Java), package.json or the lockfile (TypeScript), Cargo.toml or Cargo.lock (Rust). Note its minor version.
  2. Open the Developer reference for that component. https://docs.superdurable.io/reference/<component>/ is the latest version; components are go, python, java, typescript, rust, server, cli, and web.
  3. 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.
  4. 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-developer is this skill's former name. If a direct dex-developer install 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

  1. Read the language entry file for the project: Go, Python, Java, TypeScript, or Rust. Load only that language.
  2. Before you write any Client boundary (start, RPC, wait, cleanup, admission, Stream write), read error handling and the language's error handling file.
  3. For a write followed by a read or a completion check, read read-after-write.
  4. Then load what the task needs:
TaskCore reference
New application, wiring, Workers, deployment rolloutsapplication.md
Flow boundary, start options, Flow timeoutflow.md
Step graph, waits, decisions, durability, retries, heartbeats, locksstep.md
State, maps, indexes, search, hard-delete secrets, SQL projection of Attributes (Attribute Store sync)attribute.md
Queues, approvals, moving pending messageschannel.md
RPC design, transactions, cancellation from an RPCrpc.md
Progress, LLM token streamingstream.md
Delays, deadlines, SkipTimertimer.md
Child Flowssubflow.md
Provider integrations, local or deployed Connector configurationconnector.md
Client calls, reads, waits, lifecycle APIsclient.md
Errors, recovery types, diagnosis, operator recoveryerror-handling.md
Large values, BlobCache, whether to add a databasedata-handling.md
Pattern choice and skeletons, durable AI agentspatterns.md
Integration teststesting.md
Server behavior, search backends, deploymentserver.md
dexcli, dexcli dev, visualizationcli.md
Dex Webweb.md
Go FDG annotations, Summary and Display, Start forms, ActionsFDG authoring in dex-app-builder
Design review and handoffself-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 as Get, Update, Manager, Data, or Handler.
  • 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

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.