Write the rule
A rule is a short YAML document. The SDK has builders for common rules, and you can also write the document by hand.
Stage and commit
Staging checks the document and returns warnings that you can show to the user. Committing asks the wallet to sign.
The wallet shows one approval for each token the rule spends, then one transaction for the commit.