@wewiselabs/slc
v0.1.7
Published
SLC — spec-driven generation for AI builders. Uses your own LLM to turn one requirements file into a complete, validated SLC spec tree. Generates specs, never code.
Maintainers
Readme
SLC CLI
Spec-driven generation for AI builders. SLC reads your
requirement.md, uses your own LLM, and generates a complete, validated SLC spec tree — for 100% faithful, decision-accurate specs. It generates specs, never application code.
Terminal UI built on Ink (React for terminals). Requires Node ≥22.
Run it
npx @wewiselabs/slc # or: pnpm dlx @wewiselabs/slc · bunx @wewiselabs/slcWant the bare slc command? Install it globally once:
npm install -g @wewiselabs/slc
slc --helpHeads-up: always use the full scoped name with npx.
npx slc(unscoped) is a different, unrelated package on npm.
New here? GROUNDWORK.md is the field guide — step-by-step scenarios (bridge mode with Claude Code, local Ollama, resuming after Ctrl+C, CI validation) and a troubleshooting table for every known "it won't run" situation.
What it does
- Uses your LLM. Pick Anthropic (Claude) or any OpenAI-compatible endpoint (OpenAI, Google, OpenRouter, Ollama, …). Your model, your key, your decisions.
- Finds your requirement, any name, any format. Common names first, a content-scored scan of
the folder if not,
slc --file <path>if you'd rather just say where it is — or takes a raw idea typed into the terminal and drafts one. Your file's structure is never judged against SLC's own template, only whether it covers the essentials. - Scrutinizes before it builds — reviews, never rewrites. Your LLM audits the idea like a principal engineer — contradictions, feasibility, stack compatibility, security footguns, scale/cost for your ambition level (hobby · growth · business) — then asks about every decision that genuinely matters (no artificial cap). If the brief is already solid, nothing changes — no reflow, no menu. If there are real fixes, you see the exact diff before anything is written. Skipped decisions become explicit assumptions, never silent inventions. Nothing generates until you confirm.
- Splits scope — a single full-app requirement becomes backend + frontend work.
- Backend first. Generates the backend spec tree, validates it, and stops at a review gate.
- Frontend second. Only after you confirm the backend, it generates the frontend specs with their CONTRACT derived from the backend (FE-derives-from-BE).
- Validates everything with
slc doctor.
Companion files count too: if your requirement says "authoritative data model: schema.sql",
SLC finds that file and sends it alongside the brief — so the specs derive from the real column
names, not from a prose paraphrase of them.
Without the CLI (legacy mode)
The format does not depend on the tool. Drop SLC.md + slc_universal_structure.md in your
project root, write requirement.md, and hand all three to any capable LLM using the prompts in
SLC_GETTING_STARTED.md. That path is fully supported and unchanged. npx @wewiselabs/slc doctor
still validates the result — no key, no config, no terminal needed.
Commands
| Command | Does |
|---|---|
| slc | The guided generator (the flow above). |
| slc feature "<desc>" | Add one feature to an existing spec tree — additive only, never regenerates or touches frozen files. |
| slc estimate | Token/cost report for an existing spec tree — real numbers labelled measured vs. derived vs. estimated, no built-in pricing. |
| slc db | Data model view from your backend ARCH — entities, fields, inferred relationships. No LLM call. |
| slc audit | Security/architecture review of the generated specs — read-only report. Run it, fix what it finds, then run it again: a fix can introduce a finding of its own. |
| slc doctor | Validate an existing spec/ tree — structure, references, secrets, and post-merge damage (conflict markers, duplicate ids/blocks, stale counts). Run it after every merge. --json for CI, --fix to recompute derived counters. |
| slc bridge | Write AGENTS.md + CLAUDE.md so any agent opening the repo auto-loads SPEC.md and its read order. Needs no terminal. |
| slc --no-open | The guided flow, but never launch a browser for the taste demo. |
| slc --help / --version | Help / version. |
Driving SLC from an agent
The guided flow renders interactive prompts, so it needs a real terminal — which an
agent's shell usually isn't. slc doctor, slc db and slc bridge work anywhere, and
the two commands you run repeatedly have a headless file-in / file-out pair:
slc audit --emit # writes .slc/run/audit.prompt.md, exits
# …your agent follows that file and saves .slc/run/audit.output.json…
slc audit --consume # prints the findings, exits non-zero on a blocker
slc feature "<desc>" --emit
slc feature --consume --yes # --yes is required before anything is writtenslc audit --reconfigure re-asks which AI to use; otherwise audit reuses the saved one
silently, because it is a command you run repeatedly.
Config
Your provider + key are saved to .slc/config.json (auto-gitignored). ANTHROPIC_API_KEY or
OPENAI_API_KEY in the environment are picked up automatically.
Develop
npm install
npm run build
node dist/index.js --help