Lexis-Two Lexis-Two

How to use the tools

What each command does, when to use it, and a copy-paste example. Three-step loop plus a design pass after UI.

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

Loop: /discx defines this MVP and the next stage, /specx turns that into a spec and tasks, /lexis keeps the agent lean. After UI, /desx is a design pass beside the loop — not a Specxis phase. Bugs: skip Discovery, use /lexis plan.

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 What it does
/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. Extra v1.2 names still route.

/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 (immediate / next sprint / backlog / permanent).

/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.

/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.

  1. /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 (bypass: sin discovery).

  2. /specx plan <slug>

    Turns the proposal into spec.md (MUST / SHOULD / MAY) and tasks.md -- max 10 tasks, each mapped to exactly one file or function. Prefer 02-priorities.md when Discovery exists.

  3. /specx implement <slug>

    Implements exactly one unchecked task per run, following spec.md MUSTs and your AGENTS.md rules. Full control, no surprises.

  4. /specx review <slug>

    Read-only evaluation against the spec; findings (severity, location, issue, fix) are written to review.md.

  5. /specx close <slug>

    Verifies all tasks are done and no Critical/High findings remain, archives the spec, and harvests // lexis: comments into the debt ledger.

  6. /specx debt

    Syncs every // lexis: comment in the codebase with .specxis/debt.md via a portable Node script.

The /desx pass

Beside the loop, like security-auditor. After UI work: detect slop, then apply. Not a Specxis phase.

/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

Loop: /discx for vague products and scale; /specx for 3+ file coordination; /lexis for intensity. After UI, /desx is a design pass. Skip Discovery for bugs and one-file fixes. More in DISCOVERY.md, docs/specxis.md, and DESX.md.