Soma · Guides

Add a project rule

Install the published binary; no source compilation is required.

With the installed binary, start in a Git repository that does not yet use Soma:

soma init --curator '@maintainer'

The default layout separates files you maintain from files Soma generates:

Create a concern from the template:

soma concerns init invoice-idempotency --severity warning

Edit the generated file to explain:

  1. The rule: retries must preserve the original idempotency key.
  2. The consequence: changing the key could charge a customer twice.
  3. The trigger: changes to the invoice retry code.
  4. The review question: "Does retrying an invoice preserve its original idempotency key?"
  5. The source: the file or symbol implementing retry behavior.

Keep the generated section structure. Make the trigger narrow enough to identify relevant edits, and use explicit [expect: yes] or [expect: no] markers for questions. See concern formats and trigger choices for the details, or repository configuration to change the default paths.

Validate the edited concern and regenerate its index:

soma concerns validate invoice-idempotency
soma concerns lint --polarity
soma concerns index

After checking that the explanation and its linked source agree, record the source pins and verify:

soma docs reconfirm 'concerns/invoice-idempotency.md'
soma verify

Reconfirming records the source you reviewed. It does not establish that the explanation is correct. If a pin later drifts, inspect the source and prose before updating it.