Lexis-Two

Documentation

What each command does, when to use it, and a copy-paste example. Three-step loop plus two passes beside it: design quality and the anti-generic gate.

Loop: /discx defines this MVP and the next stage, /specx turns that into a spec and tasks, /lexis keeps the agent lean. Beside the loop: /desx checks design quality after UI, and /slopx is the gate that keeps output from looking generic. Neither is a Specxis phase. Bugs: skip Discovery, use /lexis plan.

Available on hosts with command adapters: OpenCode, Gemini CLI, pi, Claude Code, and GitHub Copilot.

Intensity levels

/lexis <mode> switches how aggressively the ruleset gates your agent. The active level is injected into every system prompt until you switch again.

Level Use it for
/lexis lite Strict, non-negotiable specs — Builds exactly what is asked, then suggests a lazier alternative in one line.
/lexis full Day-to-day work (default) — Enforces the decision ladder: YAGNI, stdlib, native platform, installed deps, one line, minimum build.
/lexis ultra Refactor and cleanup sprints — YAGNI extremist: challenges requirements, deletes code first, prefers one-liners.
/lexis off Raw sessions — Fully deactivates Lexis rules until you switch back.

/lexis commands

Seven public verbs. plan already clarifies, grounds in sources, compares, and walks scenarios.

Command What it does Example
/lexis plan Technical plan before code: lazy ladder plus clarify (max 3 questions), repo/docs, proposed vs lazy, happy/edge/failure. One shippable slice. /lexis plan add CSV export to the orders page
/lexis review Analyzes recent git changes for over-engineering, dead code, and reinvented stdlib -- run it before every commit or PR. /lexis r
/lexis audit Read-only audit of the whole repository: unused dependencies, speculative features, redundant boilerplate. /lexis a
/lexis debt Collects every // lexis: comment in the codebase into a prioritized debt ledger. /lexis d
/lexis security Focused security audit for your stack: injection, XSS, missing middleware, hardcoded secrets, unvalidated inputs. /lexis s
/lexis help Quick reference: public commands, levels, and configuration. /lexis h

The /discx cycle

Product framing before Specxis. Docs live in docs/discovery/<slug>/. After this cycle ships, run /discx again with the next slug from 06-post-mvp.md.

Command What it does Example
/discx <slug> First cycle: B1–B8, fill 00–06 (MVP + post-MVP next stage). No product code. Alias: /discovery. /discx family-shared-expenses
/discx <next-slug> Scale cycle: do not overwrite the previous folder. Seed 01-mvp.md from the prior 06-post-mvp.md, then write a new post-MVP. /discx family-settlements

The /specx lifecycle

Spec-driven development for features that touch 3+ files. Short command /specx (full /specxis). The spec lives in .specxis/active/<slug>/ as plain Markdown.

Command What it does Example
/specx new <slug> Creates .specxis/active/<slug>/proposal.md. Soft gate: if the idea is a vague new product and docs/discovery/<slug>/01-mvp.md is missing, suggest /discx first. /specx new csv-export
/specx plan <slug> Turns the proposal into spec.md (MUST / SHOULD / MAY, status draft) and tasks.md -- max 10 tasks, each one concern with its own tests. Asks for approval; a yes sets the status to agreed. /specx plan csv-export
/specx implement <slug> Refuses a spec that is not approved. Records the base commit, then implements exactly one unchecked task per run, following spec.md MUSTs and your AGENTS.md rules. /specx implement csv-export
/specx review <slug> Read-only evaluation of the diff since the base commit against the spec; findings (severity, location, issue, fix) are checkboxes in review.md. /specx review csv-export
/specx close <slug> Needs a review and no open Critical/High finding (a criterion nobody can verify needs a written waiver). Sets the status to done, archives the spec, and syncs // lexis: comments into the debt ledger. /specx close csv-export
/specx debt Syncs every // lexis: comment in the codebase into its own block of .specxis/debt.md via a portable Node script. Your notes and ticked entries stay. /specx debt

The /desx pass

Beside the loop, like security-auditor. After UI work: audit design quality, then apply. Not a Specxis phase.

Command What it does Example
/desx audit design-auditor. Detector without a model, then optional prose polish. Writes only DESIGN-AUDIT.md. /desx audit
/desx apply Implementer applies P0 then P1, ticks only fixed items, re-runs the detector. /desx apply

The /slopx gate

Beside the loop, like security-auditor and /desx. After an agent writes something: check code, copy and look, plus the desx quality pass. Read-only: it prints findings and suggestions and writes no file.

Command What it does Example
/slopx Runs four passes on what changed: code leftovers, generic copy, default-looking design, and the desx quality checks. Taste rules are advisory and can be waived with a reason. /slopx
/slopx --all Scans every eligible file instead of only the changes. --base <ref> reviews a branch; --prose adds Markdown prose. /slopx --all
slopx-disable-line <rule>: <reason> Waives one rule on one line, with the reason on record. .slopx.json holds ignores for files, rules and values; every ignore needs a reason. // slopx-disable-line copy/emoji: brand mark

Stack profiles

Philosophy stays stack-agnostic; conventions live in stacks/<id>.md and are detected per task.

The agent scans markers nearest to the task's files and reads only the matching profile. Ambiguous or missing markers fall back to philosophy only.

Profile Status
node-ts Shipped — Next.js, Express, MongoDB, PostgreSQL, TypeScript strict
js-astro Planned — detected, never faked as Next
python Planned — detected from pyproject.toml / requirements.txt
go Planned — detected from go.mod
rust Planned — detected from Cargo.toml

Add a profile: copy stacks/_template.md → stacks/<id>.md, add one row to the AGENTS.md detection table, then run npm test.

Loop: /discx for vague products and scale; /specx for 3+ file coordination; /lexis for intensity. After UI, /desx audits design quality and /slopx keeps the output from looking generic. Skip Discovery for bugs and one-file fixes.

Back to home