Skip to content
SLCR

Sliceable, Linked, Checkable Requirements

A specification for software requirements that agents can read in slices and tools can check.

Give each agent only the requirements its task needs, then verify the result with the tools you already use.

Set up SLCR requirements for this project by following https://slcr.dev/docs/getting-started/quickstart

Why SLCR

Long prose specs cause context rot, and agent errors compound across tasks

Sliceable

Hand an agent one requirement and the context it links to. The rest of the spec stays out of its context window.

Linked

Requirements refine and depend on each other, and combine with AND, OR, and XOR.

Checkable

Acceptance criteria map to validators such as tests, linters, and agent checks. slcr check reports what's met.

Requirements

As agents write more code, teams are moving to spec-driven development. SLCR makes the spec a first-class artifact with a standard format.

One source

Documents for people, slices for agents

Rendered spectodo-api
  • SEC-002Views
  • REQ-001TodoListItem endpoint
  • REQ-002POST creates an item
  • REQ-004Request is authenticated
  • REQ-003GET reads an item
  • SEC-003Controllers
  • REQ-005TodoListItem controller
  • REQ-006Validates the request payload
  • SEC-004Models
  • REQ-007Table todo_list_item exists
Agent sliceREQ-004
REQ-004 · Request is authenticatedMUST · refines REQ-002, REQ-003The request MUST be authenticated.
REQ-002 · POST creates an itemMUST · refines REQ-001
REQ-003 · GET reads an itemMUST · refines REQ-001
Hover a requirement to see where it sits in the full document.

How it works

  1. 01Write a requirement

    In JSON, TOML, or YAML, with acceptance criteria.

    # SPEC.slcr.yaml (excerpt)
    - kind: requirement
      id: REQ-007
      title: Table todo_list_item exists
      body: There MUST be a table `todo_list_item`.
      modality: MUST
      acceptanceCriteria:
        - kind: acceptanceCriterion
          id: AC-001
          title: Table schema is declared
  2. 02Attach a validator

    Use any tool you declare: tests, linters, browser tests, or agents.

    # db/.validators.slcr.toml (excerpt)
    [[validator]]
    requirement = "todo-api/REQ-007"
    criterion = "AC-001"
    tool = "ast-grep"
    with = { rule = "rules/todo-table.yml" }
  3. 03Run the check

    Red before you build it, green after. Runs in CI.

    $ slcr init
    $ slcr check

The project

An open standard with a reference implementation

Specification

JSON Schemas, satisfaction semantics, and slice rules.

slcr CLI (external link)

Reference implementation in Rust.

Agent skill (external link)

Teaches agents to write SLCR and use the CLI.

Contribute

Help shape the standard

Issues, format feedback, tool descriptors, and pull requests are all welcome.