Human-readable spec in, working code out. The spec is the source of truth; the transpiler writes the code.
CaT is OpenSpec's spec format plus a system layer, for projects where the transpiler writes the code.
- SPEC.md: the language.
- GLOSSARY.md: every term, once.
scripts/lint-docs.shenforces it. - docs/design.md: why the language looks like this.
- docs/workflow.md: conversation to CI-generated code, step by step.
- llms.txt: the one-page map for agents.
- catspec-example: TaskFlow, a complete spec for a small app, and the twenty-change experiment.
- skills/:
cat-init,cat-author,cat-transpile. Install withnpx skills add rleroi/catspec. - cli/:
catspec validate | verify | diff | transpile. - action.yml:
uses: rleroi/catspec@masterruns the CLI in GitHub Actions.
| Tier | What | From |
|---|---|---|
| Used unchanged | CommonMark + GFM tables, YAML frontmatter, BCP 14 (RFC 2119/8174), and OpenSpec's ## Purpose / ## Requirements / ### Requirement: / #### Scenario: grammar |
the standards |
| Guidance | EARS sentence templates for requirement bodies | EARS |
| CaT's own | stack:, feature:, using:, references: frontmatter; ## Model:, ## Flow:, ## View: sections; verbatim blocks; the purr transpile record |
SPEC.md |
A CaT feature file with the CaT-only parts removed is a valid OpenSpec
spec. The CLI test suite proves it against the real openspec validate.
---
feature: Authentication
using: [Supabase Auth]
---
## Purpose
Users sign up with email or Google. A Profile is created on first login.
## Model: Profile
| Field | Type | Notes |
|---|---|---|
| id | uuid | primary key |
| display_name | text | |
## Requirements
### Requirement: Password length
Passwords MUST be at least 10 characters.
#### Scenario: Too short
- **WHEN** a visitor submits a 9-character password
- **THEN** sign-up is rejected
### Requirement: Account lockout
IF sign-in fails three times within 10 minutes, THEN the system MUST lock
the account for 15 minutes.
#### Scenario: Third failure locks
- **GIVEN** an account with 2 failed attempts in the last 10 minutes
- **WHEN** a third attempt fails
- **THEN** the account is locked for 15 minutes
## Flow: Sign Up
1. User enters email and password, or clicks "Sign in with Google"
2. System creates the auth account
3. On first login, system creates a Profilehuman + cat-author → edit bacon/ → catspec validate → commit + push
│
CI: catspec validate --strict → cat-transpile → src/ + purr → commit by bot
In GitHub Actions:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: rleroi/catspec@master # validate --strict, verify
- uses: rleroi/catspec@master # on push: transpile, commit as the bot
with:
command: transpile
agent: claude-code
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}bacon/ and cat.config.yaml are human-owned. src/ and purr are
transpiler-owned and committed, so incremental runs have a baseline and
reviewers see what changed. Humans do not edit src/; a fix is a spec
change.
Working draft, version 0.2. Spec-as-source is unproven at scale (see
SPEC.md Appendix B). The next
milestone is the honest test: take catspec-example through twenty real spec
changes with no hand edits to src/.
-
cat-initskill -
cat-authorandcat-transpileskills (split from the previous single skill) -
catspec validate,catspec diff,catspec transpilewith lint-rule tests and OpenSpec conformance - Example project passes
catspec validate --strict(moved to catspec-example; its spec stays here ascli/test/fixtures/taskflow) -
index.htmlmirrors SPEC.md 0.2 -
docs/design.md(rationale moved out ofindex.html) -
docs/workflow.md -
llms.txt -
scripts/lint-docs.sh: grep for banned terms from GLOSSARY.md, runs innpm test -
catspec verify: fail when a human commit touchedsrc/orpurr, or the bot touchedbacon/ -
transpiler.agentbackend switch:cursor,cursor-cli,claude-code - Skills installable:
npx skills add rleroi/catspec(optionally--skill cat-author) - GitHub Action:
uses: rleroi/catspec@master(action.yml), commandcheckortranspile - The twenty-change experiment on catspec-example
- References:
kind: code(brownfield, read-only) andkind: spec(cross-repo), reserved in SPEC.md §7.1