Appearance
Getting Started
Install
Install the npm package:
bash
pnpm add -D specra-langThe package name is specra-lang, and the CLI command is also specra-lang.
For a one-off run without installing:
bash
pnpm dlx specra-lang init
# or
npx specra-lang initInitialize a project
After installation, run:
bash
specra-lang initThis creates:
specra/spec.scl.mdspecra/README.md.specra/.gitignore
If you choose the hello-world template, Specra also creates specra/features/hello-world.scl.md.
Daily workflow
bash
specra-lang check
specra-lang refresh
specra-lang proof
specra-lang verifyWhat each command does
specra-lang checkvalidates the contract.specra-lang refreshupdates.specra/ctx.json,.specra/plan.json, and.specra/specra.db.specra-lang proofscaffolds.specra/verify/proof.json.specra-lang verifycompares the proof against contract expectations.
Agent loop
- The agent reads the relevant
.scl.mdfiles underspecra/. - The agent refreshes compact runtime artifacts.
- The agent runs tests or reproduction steps.
- The agent fills
.specra/verify/proof.jsonwith observed values. - The agent runs
specra-lang verify.
Current agent support
Specra currently supports these coding-agent targets:
opencodeclaudefor Claude Codecodexfor Codex CLI and Codex agents
For the full target breakdown, see Agents.
You can install project-local guidance with:
bash
specra-lang install --target opencode
specra-lang install --target claude
specra-lang install --target codexOr install user-wide guidance with:
bash
specra-lang install --target opencode --location global
specra-lang install --target claude --location global
specra-lang install --target codex --location globalSpecra does not yet include first-party support for other agent surfaces such as Cursor rules, Windsurf, or Gemini CLI.
Notes
- The only package most users need is
specra-lang, and it installs thespecra-langcommand. - The hidden
.specra/folder is meant for generated state and verification artifacts. - Legacy
.sclfiles are still supported, but.scl.mdis the preferred format.