Skip to main content

When to Use

When authoring, validating, publishing, or executing STRATT prompt units. The CLI is the primary interface — every lifecycle operation is a stratt command.

Command Table

CommandDescriptionExit CodesKey Flags
stratt new <type> <domain> <slug>Scaffold a unit with valid schema skeleton0 success, 1 collision
stratt validate <path>Schema + imports + constraints0 pass, 1 schema fail, 3 broken import--strict
stratt fingerprint <path>Compute/verify Blake3 fingerprint0 computed, 2 tampered--verify
stratt publish <path>Validate → fingerprint → R2 → Git0 published, 1 validation, 4 R2 error--dry-run
stratt run <uri>Execute chain via Anthropic API0 complete, 1 validation, 2 tampered--gate-mode, --input
stratt deprecate <path>Set deprecated + tombstone0 deprecated--reason, --successor (required)
stratt verify <path>Re-verify fingerprint against R20 verified, 2 tampered
Global flags: --verbose (debug output), --json (structured JSON output).

Lifecycle Pipeline

stratt new task dev extract-logs     # scaffold
# ... author the prompt body ...
stratt validate units/dev/task/extract-logs.yaml   # check
stratt fingerprint units/dev/task/extract-logs.yaml  # compute
stratt publish units/dev/task/extract-logs.yaml      # ship
stratt run strat://dev/chain/sol-1-boot@1.0.0 --input '{...}'  # execute

Exit Code Contract

CodeMeaningRecovery
0Success
1Validation failureFix schema errors, missing fields, invalid lifecycle transition
2Fingerprint tamperedRe-publish via authorised author to recompute fingerprint
3Broken importPublish missing unit or fix the import URI
4R2 errorRetry — operation is atomic, no partial state

Publish Saga (FM-09)

The publish command follows R2-first-then-Git ordering:
  1. Validate → fail fast (exit 1)
  2. Compute fingerprint → write to file
  3. Upload to R2 → if fails, revert fingerprint, exit 4
  4. Git commit → if fails, warn (R2 already correct)
--dry-run shows the plan without writing anything.

Gate Enforcement

stratt run pauses at gate steps by default (--gate-mode manual). Gates are architectural invariants per P-04 — they cannot be removed without a major version bump. --gate-mode auto exists for local testing only.