accountsis the SDK of Tempo ID (id.tempo.xyz). Apps use it to sign users in, keep their session and access key, and act on Tempo with it.tempoxyz/idholds the server, its HTTP API, and its docs. This repository holds the package, its docs, andexamples/. The playgrounds live intempoxyz/id.- The package runs in browsers, React Native, Node, and Workers. Entries stay free of platform imports, except
accounts/cloudflare,accounts/expo, andindex.native.ts. - Tempo ID issues every token, except the placeholder tokens of
accounts/test, which only test builds import. The package holds tokens and access keys only in the instance'sstore. - Tokens, refresh tokens, client secrets, private keys, and DPoP keys never appear in errors, events, or logs.
- Redirect or post only to a configured
redirectUrior Tempo ID's own origin. - Loopback redirects are banned. CLIs use device grants. Web apps use popups, redirects, or the dialog.
- Use Viem's TIP-1130 APIs (
Oidc,Actions.oidc.prove,Relay.oidc,Relay.feePayer) and ox. Do not reimplement protocol logic from Viem, ox, or wata. - Call precompiles through
viem/tempoactions (Actions.token.transferSync) andwagmi/tempohooks (Hooks.token.useTransferSync). Never encode a precompile call witherc20Abi,parseAbi, orencodeFunctionData, anywhere.
-
Treat
exactOptionalPropertyTypesandnoUncheckedIndexedAccessas constraints. Add| undefinedwhere an optional property can receiveundefined. Narrow indexed reads. -
Use
readonly T[], unless mutation is part of the contract. -
Use
type. Useinterfaceonly for declaration merging, such ascloudflare:workersinsrc/cloudflare/workers.d.ts. -
Use
.jsextensions on relative imports. -
Write everything in TypeScript.
.jsfiles are banned, except themetro.config.jsof an Expo app, since Metro fails to load the TypeScript form of Expo 58. Run scripts withnode script.ts. -
Import internal modules as namespaces (
import * as Session from './Session.js'). Named imports are fine for types, leaf helpers, and third-party APIs. -
Import Node built-ins as namespaces, unless a named import is clearer.
-
Use static imports. Use dynamic imports only at a real runtime or bundle boundary, such as
Accounts.handler's server. -
Load Node built-ins in shared code with
process.getBuiltinModule, asStore.filedoes. Webpack fails on eachnode:import, also a dynamic one. -
Use
import typeandexport typefor type-only imports and exports. -
Use functions and plain data. Classes are only for errors and framework entrypoints such as Durable Objects.
-
Put error classes at the top of the module, after imports, in alphabetical order. Name them in namespaced form, such as
Accounts.RequestError. -
Use unions or
as constobjects, not enums. -
Use
camelCaseconstants, unless the name mirrors an external protocol. -
Use
constgenerics when callers keep literal or tuple types. -
Default option bags in the signature:
options: fn.Options = {}. -
Name option bags
options. -
Take at most two positional parameters: an optional receiver (
accounts,client,store) or the inspected value (error,session), then one options object.Actions.authorize(accounts, { permissions }) // not authorize(accounts, permissions) Store.postgres(client, { table }) // not postgres(client, table)
Exempt: framework-dictated signatures, such as callbacks and Durable Object methods.
-
Put a function's types in a matching
declare namespace(create.Options,create.ReturnType,create.ErrorType). -
Do not annotate locals with inline object types. Name the type above the use instead.
-
Give each module that owns a public data type a
frominstantiator (Permissions.from({ ... })). Do not annotate,as, orsatisfiesthe binding. -
Extract a named type only when it is reused or clarifies a hard shape.
-
Keep shared domain types beside the module that owns the concept.
-
Group Zod schemas in a
schemanamespace, with derived types beside them. Export it only when another module validates the same shape. -
Let declared return types constrain expressions. Avoid redundant annotations.
-
Return values directly unless a binding is reused or names a complex expression.
-
Use an IIFE with early returns instead of nested ternaries, or a mutable variable across
try/catch. -
Never destructure parameters in definitions. Destructure in the body.
-
Declare props as
Component.Propsin the component's namespace. -
Prefer short names clear from context:
options,client,entry,fn. -
On a name conflict, keep the existing name and suffix the new one, such as
revoke_remote. No synonyms or past tenses. -
Keep order-sensitive shapes (wire formats, tuples, protocol fields) in their order.
-
Avoid new
any. -
Separate logical steps with one blank line: setup, guards, derivation, mutation, return.
-
Keep a lookup with its guard, and consecutive assertions together. Avoid both dense blocks and a blank line after every statement.
-
Separate test setup, execution, and assertions.
-
No section-divider comments.
-
Comment invariants and non-obvious reasons only. Never reference plans, task IDs, or prior versions.
- Alphabetize imports, specifiers, exports, type and object properties, union members, unordered lists, config maps, scripts, and dependencies. Case-insensitive.
- Keep docs with their declaration, and overloads with their namespace. Never reorder execution or cause use-before-initialization.
- Preserve meaningful order: plugin arrays, Vite plugins, CSS declarations, tuples, workflow steps. Comment intentional exceptions.
- In GitHub workflows, keep
nameandonfirst, then alphabetize.
- One module is one namespace of types, constants, functions, and errors, read as
Module.operation(...). - Name every module file in PascalCase, after its namespace, in
src/internal/too:Session.ts,Popup.ts. Folders stay lowercase, such asactions/andinternal/viem/. - The root entry exports only
AccessToken,Accounts,Challenge,LogoutToken,Permissions,Plugin,Session, andStore, which sit at the top ofsrc/. Every other module goes insrc/internal/, andaccounts/internalexports those that apps can use. - The root entry's
Accountsissrc/internal/DefaultAccounts.ts:src/Accounts.tswith acreatethat adds thedialog,funding, andmppplugins.accounts/liteexportssrc/Accounts.tsitself.src/Accounts.tsnever imports a default plugin, so the bundle ofaccounts/liteholds none. - Prefer stateless functions. Create an instance only for dependencies or lifecycle state, through
Module.create(options)returning a plain object. Accounts.createis the authoritative instance. Plugins and actions derive from it. No module-scope singletons, except a lock or aconnecton a resource of the whole device that no instance owns, such as theexpopreset's lock andconnecton the device's secure store.- Inject platform capabilities (fetch, storage, clock,
open) through options. Keep them out of pure modules. - Type dependencies by the smallest capability used.
- Factory operations close over state. Never depend on
this. - Keep caches and registries private to the instance.
- No side-effect registration.
sideEffectsinpackage.jsonlists the only exceptions, the React Native polyfills. - Framework classes, such as Durable Objects, stay thin and delegate to module functions.
- Preserve literal inputs through helpers when they affect the output type.
- Keep generics flowing through callbacks and returns. Never erase them to
any. - Plugins extend the instance's type. Keep each plugin's additions inferred from
Plugin.from.
- Start concrete. Extract after three uses reveal a stable contract.
- Prefer small duplication over an abstraction with flags or modes.
- Optimize for change, not DRYness.
- Keep state, config, schemas, and constants in one place, and derive the rest.
- No wrappers that only rename a function or mirror an SDK.
Use XState v5 for lifecycles and @xstate/store for event-driven stores. Zustand, Redux, and let-flag stores are banned. machines.session in src/internal/Session.ts is the reference.
| State | Model |
|---|---|
| One value with two or three cases | A union let |
| Several values that change together, with no states | An @xstate/store store |
| A lifecycle with async events, timers, overlaps, or guards | An XState machine |
| A value that combines two or more flags or statuses | A state of an XState machine |
| Server data in an app | TanStack Query, in the app, not here |
-
A compound conditional over state is an unnamed state. Lift it into a machine:
- A value that combines flags with
&&,||, or a ternary, such asrestoring = status === 'pending' || (status === 'idle' && stored). - A guard that combines flags, such as
if (!session || closing || closed) return.
- A value that combines flags with
-
State is a value that changes over time:
let,useState,useRef, and snapshot reads. -
Rate a conditional by its state operands, the reads of state that it combines. Count a read once, however often it repeats:
Complexity The conditional Model Low Reads one or two state operands with one operator, such as closed || !sessionInline Medium Reads three state operands, or mixes &&and||, or reads another derived flagA machine state, tag, or guard High Reads four or more state operands, nests a ternary, or repeats across several functions A machine state, tag, or guard -
If a conditional rates medium or high, use a machine. If a low conditional grows, rate it again.
-
Name each combination as a state or tag. Read it with a selector, such as
machines.status(snapshot). -
Input validation, type guards, and checks of request fields are not state. Compound conditionals there are acceptable.
-
Do not write a machine for a linear async function, such as a retry loop.
-
Replace
letflags with one machine. The snapshot is the only source of state. -
Never hold one value in both a store and a machine.
Persistence
- Persist a store with
persistfrom@xstate/store/persist, withskipHydration: true. CallrehydrateStorein the owning lifecycle. - Persist a machine through a provided action, such as
save. Never usegetPersistedSnapshot. - The session's write queue lives in
src/internal/Session.ts. Its non-extractableCryptoKeyneeds IndexedDB. A failed save rejects its change.
Structure
- Put each machine in
export namespace machinesat the bottom of the module that runs it. - Define each machine as
export const <name> = setup(...).createMachine(...)inmachines, read asmachines.session. - Merge a type-only
export namespace <name>with it forContext,Event,Actor, andSnapshot, read asmachines.session.Snapshot. DeriveActorfromtypeof <name>. - Put readers and pure decisions beside the machine, as
export functions ofmachines, such asmachines.status(snapshot). - Inside
machines, refer to a machine's types through its namespace, such assession.Event. A bareEventnames the DOM's. - Module-scope code above
machinesruns before it, so it never readsmachines. Keep a constant it needs at the top of the module. - Keep machines pure: no I/O, clock, or bindings. The runner provides effects with
machine.provide({ actions }). - Define with
setup({ actions, guards, types }).createMachine({...}). Name every action and guard, includingassigns. - Callbacks take one parameter,
args, and narrow withassertEvent(args.event, type). - Declare provided actions as no-ops in
setup, with TSDoc naming the provider. - Type with
types: { context: {} as Context, events: {} as Event }. ExportContextandEventwith TSDoc on every member. - Export
type Actor,type Snapshot, and snapshot readers such asstatus(snapshot). Never comparesnapshot.valueacross modules. - Export pure decisions that transitions do not express, such as which session a sign-out revokes.
States, events, and context
- Name states for what is true, in camelCase:
pending,signedIn. App-read states are public API. - Name events for what happened, in dot notation:
authorize.start,signOut.join. Events carry only what the transition needs. contextholds only what states cannot express. Never a promise, stub, or client.- Change
contextonly withassign. - Derive a multi-value status in one exported
select(context), with its priority table in TSDoc. Route changes through a transient state, such assettling, with one parameterized guard. - Prefer per-state transitions. Use root
ononly for events every state handles the same way. - Use
afterfor timers, andinvokewithfromPromiseorfromCallbackfor state-owned work. No timer IDs orAbortControllers beside a machine.
Running a machine
- Create actors with
createActor(machine).start()in the owning lifecycle, never at module scope. sendis synchronous.- Wait with
waitFor(actor, predicate). - Expose actors read-only. For common reads, expose a stable
{ get, subscribe }pair, such asaccounts.session.status. accountsdoes not depend on@xstate/react. It reads{ get, subscribe }withuseSyncExternalStore.
Testing
- Test a module's machines in its
<module>.test.ts, in adescribe('machines.<name>')per machine, without I/O or a harness. - Arrange, act, assert: start the actor, send a flow's events, assert
snapshot.valueand changedcontext. - Assert effects by recording provided actions' arguments in an array. No
vi.fn. Never replace a guard. - Provide invoked actors with scripted
fromPromiseresults, and assert their inputs. - Cover the graph with
getShortestPathsfromxstate/graph:- Build
eventsfrom aRecordkeyed by everyEventtype, offering only events the runner sends from each state. - Assert with
snapshot.can(event)that every type is handled somewhere. - Give
serializeStatethe status values, not growing counters.
- Build
- At each path's end, assert the state is
select(context), and the raw context agrees with the state. - Never use
getSimplePaths. - Assert that no path ends in a transient state.
- Test pure decision functions with a table, one
testper row.
- Module scope holds only constants and immutable data. Never cache a
Request,Response, stream, or session there. - Read
Date.now()inside the call, never at module scope. - Use
crypto.getRandomValues()andcrypto.randomUUID().Math.random()is banned. - Compare secrets in constant time with
crypto.subtle.timingSafeEqual, after SHA-256 for variable lengths. - Await or return every promise. Mark
voidonly with a reason. - Run independent calls in
Promise.all. - Never add a round trip to a flow. Return the next step's data from the step that has it.
- Check the waterfall of each changed action. See
docs/development/waterfall.md. - A change adds no duplicate call, no round, and no sequential call without a dependency. State the reason for each exception in the PR body.
- Fix a waterfall finding in code that a change touches.
consoleis banned insrc/. Report failures through errors.
- Each refusal from Tempo ID surfaces as
Accounts.RequestError, with itsreason. - Mirror each
reasonof Tempo ID's OpenAPI document inRequestError.Reason. - List each action's
reasonvalues in its TSDoc, on@throws {Accounts.RequestError}. - Write messages as the fault, then the fix. No product or library names.
- Start every module with a
@moduleTSDoc comment, before imports, including tests and scripts. - Add TSDoc to every export and every property of an exported type.
- A function's
Options,ReturnType,ErrorType,Parameters, andPropsshare its TSDoc. Each property has its own. Overloads share the first signature's TSDoc. - A property comment states meaning, units, default, or absence. Never repeat the name or type.
- Document purpose, inputs, output, defaults, errors, and side effects.
- TSDoc is the API reference. No Markdown page repeats it. State each fact once, on the declaration it describes.
- A plugin member's TSDoc, such as
email.signIn, holds the facts an app needs. The action ofsrc/actions/holds only its own. - State a default as a sentence: "Defaults to
x." - Name each error with
@throws {ErrorClass}, and its condition. - Each export's TSDoc holds one
tsexample that imports from the package entry, such asaccounts/plugins.
Applies to docs, comments, TSDoc, interface copy, commits, and pull requests.
- Write about the code, not the reader. No second person outside interface copy.
- Write formally and technically. Use precise verbs ("returns", "rejects", "issues"), not conversational ones ("gets", "gives", "tells").
- State invariants and reasons the code cannot show.
- Follow ASD-STE100 writing rules, not its dictionary.
- Use short words: "use", "start", "before", not "utilize", "commence", "prior to".
- Use one word per concept. No synonyms for variety.
- Write "access key", never "key" alone. Identifiers keep their names.
- Keep instructions to 20 words, descriptions to 25.
- Keep paragraphs to one topic and six sentences.
- Put conditions first: "If the code expires, request a new one."
- Use active voice and simple tenses. No progressive or perfect main verbs.
- Stack at most three nouns.
- Keep articles ("the", "a").
- Use diagrams for flows: Mermaid
sequenceDiagram,flowchart, orstateDiagram-v2. Keep each to about 12 nodes or 15 arrows. - Use tables for comparisons and mappings.
- Write "Viem" in prose,
viemin code. - No semicolons or em dashes in prose.
site/ documents the package for app developers. Tempo ID's own docs, in tempoxyz/id, describe the service over HTTP. Link to them by absolute URL.
Structure
-
site/vocs.config.ts: the sidebar. Each item names a page ofsite/src/pages/, and is disabled until the page exists. -
site/src/pages/index.mdx: "Getting started", the home page, and the model of a page. -
site/src/pages/docs/introduction/: other plain pages. -
site/src/pages/docs/guides/: one guide per page. A topic with more guides is a group of the sidebar, and each guide is an item of its group, atguides/<topic>/<guide>.mdx. -
In "Tasks after sign-in", a group of the sidebar starts with the "Overview" item of its topic, at
guides/<topic>.mdx. The overview states what the topic is for and when to use it, then shows each guide as aPageCard. A topic with one page holds its overview in the page's Overview section. -
Each topic of "Sign-in flows" is one page. A variant of its flow is a use case of the page.
-
A topic label is a noun phrase, such as "Access keys". A guide label starts with a verb, ends with a noun, and holds at most three words, such as "Revoke access keys".
-
A guide page holds these parts in order:
Part Content Overview What the guide builds, and an interactive end-to-end example Walkthrough The steps from Accounts.create, with a link to the example that runs the flowUse cases Each option of the guide's API that an app uses, as one use case with a snippet Next steps Cards of the pages that follow -
site/src/demos/: one module for each interactive example.Demoofsite/src/components/Demo.tsxshows it on a page. -
A walkthrough is one steps block. If the steps differ by platform, one tab holds the steps of each platform.
-
A walkthrough mirrors an app of
examples/, if one runs the flow. Import plugins fromaccounts/plugins. -
A walkthrough holds only the steps that the flow needs. A task that is the same on each platform, such as a sign-out, is a use case below the walkthrough.
-
Each web snippet is a React component. No snippet reads the DOM, such as with
document.querySelector. -
Each server snippet runs on any JavaScript server: a Fetch handler, such as a Hono app, with secrets from
process.envand state in aStore. No page names a hosting platform or its APIs, also where the example of the flow runs on one. -
A demo runs in the page against Tempo ID and Tempo testnet. If its flow needs a server, it calls a route of
site/src/server/, under/api/<topic>. -
The Worker of the site implements the
DurableStoreDurable Object, for the values that a demo takes once. Cloudflare gives a Worker with one no preview URL, so a pull request of the site gets no preview. -
site/README.mddescribes the sidebar, the elements of a page, the guide pages, and the demos. -
The API reference is the TSDoc of each export, as Code Documentation describes. A page names an export in code, and
SourceLinklinks it to its declaration at the commit of the build.
Writing
- Third person, imperative for instructions.
- Sentence-case headings. A section heading is a noun phrase, and a step heading is an imperative. No questions or gerunds.
- Define terms once. Use "app", "API", "Tempo Account", "access token", "access key", "OAuth app".
- At its first use, a guide links a term to the overview of its topic, or else to the guide that covers it, if one exists.
- Write for a reader who knows OAuth, crypto, and payments, but not Tempo ID. Explain a Tempo mechanism through the standard that it resembles.
- Name an API or a concept first in the step that uses it. Do not foreshadow it, so the reader holds less context.
- No future work outside Limitations.
- Use
:::warningand:::noteonly for security caveats and environment pitfalls. Use:::tiponly for an option of a step, in place of a step of its own. - Link at the point of use, with deep anchors.
- Link each API or interface of the package that prose names in inline code to its declaration with
SourceLink, at each use. A code block holds no link. - Keep a paragraph to two or three sentences.
- Keep inline code in prose rare. Put details in the snippet, a table, or a later step.
- Keep a code block to about 60 lines. Split a longer file into a code group of complete files.
- If a walkthrough mixes server and client steps, end each step heading with
<StepTag kind="server" />or<StepTag kind="client" />, with no space before it, so the anchor ends with the heading text. - Under Use cases, give each option of the guide's API that an app uses one
###use case: one or two sentences, aSourceLinkto the option, and a short complete snippet. Derive the options fromsrc/, and skip internal ones. - Walkthroughs keep state in
Store.memory(), so the reader installs no database. One:::noteper page names a shared store for production, such asStore.postgresorStore.redis. - Link a page of the site only once it exists.
PageCardstays disabled until then. - Show a list of pages or examples as cards (
PageCard,ExampleCard), not as a table. - Check facts against the code. Update guides and TSDoc in the same change as the behavior.
- Check each step against its example and the current
src/. Run each demo in a browser. - Each snippet is a complete file that runs as copied.
tempo.config.tsexports theaccountsinstance. Each later snippet that uses it is a code group of its file, which imports./tempo.config.js, andtempo.config.ts.
- Test behavior: API contracts, flows, security boundaries, errors.
src/holds machine tests and other tests that need no server.- Integration tests run the package against a real Tempo ID. They live in
tempoxyz/id. - Develop a change in the
accountssubmodule oftempoxyz/id, whose integration and end-to-end suites run against it. CI here runs the tests insrc/and the end-to-end suite. - No mocks, stubs, fakes, fake timers, stubbed globals, or MSW in
src/. - Keep a module's tests in one
Module.test.tsbeside it. Never split into variant files. - Group tests in a
describenamed for the entrypoint. - Use inline snapshots, one value each. Use property matchers only for nondeterministic fields. Never derive expectations from the implementation.
- Add a regression test for every bug fix.
- Use bounded waits (
expect.poll). No sleeps or retries.
End-to-end
- The end-to-end suite runs the test apps of
test/apps/in Chromium against a local Tempo ID and Tempo node. Seedocs/development/e2e.md. - The suite targets only local services.
TEMPO_RPC_URLandTEMPO_ID_URLname running ones, and the*_IMAGEvariables name other images. - If a change alters what a browser shows of a flow, add or extend the flow's spec in
test/e2e/. - Write each phase as a
test.stepthat ends withcapture(name), so the proof shows it. - Select Tempo ID's own elements only through
test/Playwright.ts. - Each pull request's
Test (e2e)run holds its proof: the video, steps, and screenshots of every test. Never skip the job, or a spec, to merge.
- Run focused tests while iterating.
- Run
pnpm check:typesafter TypeScript changes. - If a change touches an action, a request, a storage call, or an RPC call, run
pnpm waterfallon the affected tests. Compare with the base commit's summary throughpnpm waterfall:report --base. - If a change alters a flow that a spec of
test/e2e/covers, runpnpm test:e2e. - Run
pnpm check, and keep only task-related fixes. - Run
git diff --checkand review the diff before finishing.
- Conventional commits, lowercase, no trailing period:
feat:,fix:,perf:,refactor:,docs:,test:,ci:,chore:. Mark a breaking change with!, such asfeat(dialog)!:. - Name what changed, with codebase identifiers. State the change, not the reason.
- Each message stands alone.
- Keep the PR title accurate, since it becomes the squash commit.
- Keep PR bodies short. Open with the release note: one or two sentences in the past tense that start with the verb, such as "Added
loginHinttodialog.signIn." or "Fixedaccounts.payto throwAccounts.SignedOutErrorfor a session whose access keys expired." No "now", "before", or background. Name exports in backticks. For a breaking change, add the migration and at most one shorttsblock. - Put the problem, the example, and the validation under
##headings, such as## API changesand## How to test, also for the sections below. The release notes take the body only up to its first heading. - Never force push or amend a pushed commit.
State machine
- If a PR adds or alters a machine in a
machinesnamespace, add a State machine section before API changes, one subsection per machine. - Show a
stateDiagram-v2with event names on arrows and guards in brackets (set [renewing]). - For a changed machine, add a table of changed states, events, and transitions, and of new or changed context properties.
Waterfall
- If a PR changes an action's I/O, add a Waterfall section before API changes.
- Add a table of each changed action's calls, rounds, and ideal rounds, before and after.
- List each new finding that the PR keeps, with its reason.
API changes
- If a PR changes the public API, add an API changes section before How to test. The public API is the exports of
accountsand its entries. - Show each change in its own
tsfence, as used, not as adiff. Follow with one sentence. - Mark breaking changes with Breaking, with the old shape and migration.
- End with one
tsfence that uses the change fromAccounts.create.
src/is the published packageaccounts. Its entries are inpackage.jsonexports:.,./cloudflare,./expo,./internal,./lite,./mpp,./plugins,./react,./test, and./wagmi.src/actions/holds the actions thatActionsexports.src/plugins/holds the plugins.src/stores/holds each store thatStoreexports, such asStore.memory.Store.tsholds only theStoretype andStore.from.src/internal/handlers/holds each route handler, such asRelay.ts, the relay route.src/internal/Handler.tsholds theHandlertype that each returns.docs/development/holds the development notes of the repository.site/is the documentation site ofaccounts.tempo.xyz, a Vocs project. Its pages are insite/src/pages/, its demos insite/src/demos/, the routes of its demos insite/src/server/, its components insite/src/components/, and the icons of its sidebar insite/icons/..github/workflows/site.ymldeploys it toaccounts.tempo.xyzthrough the Cloudflare Deploy Broker, and builds each pull request.examples/holds one small app per platform (backend,cli,mobile,wagmi,web). Each names a published range, so a copy installs as it is. CI type-checks them.test/holds the end-to-end suite: the specs intest/e2e/, the test apps intest/apps/, and one module per local service.test/waterfall/holds the waterfall.
- Pin every dependency in the
pnpm-workspace.yamlcatalog, and reference it ascatalog:. - Optional platform libraries (React, wagmi, Expo) are optional peers.
mppxis a peer, since every instance holds themppplugin. - zile builds the package.
postinstallrunszile dev. - Each push to
mainpublishes<breaking>.<minor>.<commit time>underlatest, such as1.2.20261118194700, soaccountsinstalls the current commit ofmain, without waiting on CI, with a GitHub release that lists the description of eachfeat,fix,perf, and breaking pull request since the last one..github/workflows/release.ymldescribes the release, andscripts/release.tspicks the version. - The pull request title's type decides whether the release notes list the pull request, and under which section. Its description is the entry. A breaking title (
feat!:, orBREAKING CHANGE:in the commit body) or afeat:title raises<minor>. No title raises<breaking>. Describe a breaking change in the pull request body with each change in adifffence: the old usage as removed lines, and the new usage as added lines. ci:andtest:commits release nothing alone. Running Main by hand releases main's tip anyway.- Add no changeset.
.changeset/keeps the notes written for1.0.0before this scheme, and no workflow reads it. - Prettier is banned. Vite+ runs oxfmt, oxlint, and Vitest from
vite.config.ts.
| Command | Description |
|---|---|
pnpm build |
Builds the package. Run pnpm exec zile dev after. |
pnpm check |
Formats and lints with fixes. |
pnpm check:types |
Runs tsc on the package and the examples. |
pnpm size |
Measures each entry's browser bundle with Rolldown. |
pnpm test |
Runs the tests in src/. |
pnpm test:e2e |
Runs the end-to-end suite in Chromium, and writes its proof. |
pnpm waterfall |
Records each action's async calls. pnpm waterfall:report writes the report. |
- Log papercuts and friction (tooling, docs, APIs, tests, conventions) as they occur with
pnpx frog log. - Do not add global, system, or internal friction.
- Run
pnpx frog listfirst to see what is already known.