Lexis-Two

LEXIS-TWO

The simple way to obtain the best code.

Portable rules, skills, and slash commands -- YAGNI, KISS, DRY, and SOLID before every line of code. Multi-agent workflows, one skill source, thin adapters.

Benchmark with your OpenCode Go models, then publish results -- View benchmarks · OpenCode Go harness (npm run benchmark:opencode-go).

Engineering discipline

Lexis-Two treats simplicity as method: skeptical defaults, production stack patterns, and maintainable boundaries -- not clever minimalism for its own sake.

YAGNI

Challenge every feature and abstraction before it ships. The ladder below is the gate.

KISS

Stdlib, platform APIs, and boring one-liners beat new dependencies.

DRY

One skills/ catalog. Host files route slash commands -- they do not fork behavior.

SOLID

Clear module and service boundaries. No abstractions nobody asked for.

The decision ladder

Before writing any code, stop at the first rung that holds.

  1. Does this need to exist at all? (YAGNI)
  2. Does the standard library already do this?
  3. Does a native platform feature cover it?
  4. Does an already-installed dependency solve it?
  5. Can it be one line?
  6. Only then: write the minimum code that works.

One example

Confirm dialog. From examples/nextjs/01-modal-library.

Without Lexis-Two
function Modal({ open, onClose, title, children }) {
  useEffect(() => {
    document.addEventListener("keydown", onEscape);
    document.body.style.overflow = "hidden";
    return () => { /* cleanup */ };
  }, [open]);
  return createPortal(
    <div className="modal-overlay" onClick={onClose}>
      <div role="dialog" onClick={(e) => e.stopPropagation()}>
        <h2>{title}</h2>
        {children}
      </div>
    </div>,
    document.body,
  );
}

Portal, overlay, scroll lock, and Escape handler for a yes/no.

With Lexis-Two
// lexis: native <dialog> — backdrop + focus trap built in
<dialog ref={dialogRef}>
  <h2>Confirm delete</h2>
  <form method="dialog">
    <button value="cancel">Cancel</button>
    <button value="confirm">Delete</button>
  </form>
</dialog>

74 lines → 24. Native <dialog> ships focus trap and backdrop.

Works where you code

Thin adapters. One skill source. skills/ is the core -- principles stay centralized, hosts stay dumb.

Host Level Entry point
OpenCode Full .opencode/plugins/lexis-two.mjs
Claude Code Full .claude-plugin/ + hooks/
GitHub Copilot (plugin) Full .github/plugin/plugin.json
Gemini CLI Full gemini-extension.json
pi Full pi-extension/
Codex Full .codex-plugin/ + AGENTS.md
Cursor Full .cursor/rules/ + .cursor/skills/
Windsurf / Cline / Kiro Rules lexis-two.md in host rules folder
Any agent Rules AGENTS.md or skills/*/SKILL.md

Slash commands

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

/lexis status

Shows the current plugin status, active intensity level, and default configuration.

/lexis <lite|full|ultra|off>

Switches the intensity level of the smart-lazy ruleset for the AI agent.

/lexis plan (or /lexis p)

Plans a technical solution step-by-step applying the minimalist hierarchy before writing code.

/lexis review (or /lexis r)

Reviews recent git changes (diff) to detect over-engineering and suggest simplifications.

/lexis audit (or /lexis a)

Audits the entire repository for dead code, unnecessary dependencies, or premature abstractions.

/lexis debt (or /lexis d)

Harvests and prioritizes all // lexis: comments across the codebase into a tracked debt ledger.

/lexis security (or /lexis s)

Runs a focused security audit targeting vulnerabilities in the stack (Node.js/Next.js/MongoDB).

/lexis doubt

Clarifies ambiguous requirements with up to three questions — no code.

/lexis incremental (or /lexis inc)

Ships the smallest vertical slice first; defers the rest.

/lexis debug (or /lexis triage)

Minimal repro, smallest fix, verify — no drive-by refactors.

/lexis source (or /lexis src)

Grounds design in repo code and official docs before inventing APIs.

/lexis predict

Compares proposed vs lazy approach (LOC, dependencies, maintenance).

/lexis scenario

Walks happy, edge, and failure scenarios before design.

/lexis help (or /lexis h)

Displays the quick reference card with all commands and levels.

/specxis status

Monitors the status, task progress, and technical debt of active specifications.

/specxis new <slug>

Creates a new spec folder and proposal.md applying the initial lazy check to validate if the feature should exist.

/specxis plan <slug>

Generates spec.md (MUST/SHOULD/MAY) and tasks.md (technical task list) from the proposal.

/specxis implement <slug>

Guides the agent to implement the next unchecked task, one by one, in a controlled manner.

/specxis review <slug>

Evaluates the current implementation against the specification requirements and AGENTS.md rules.

/specxis close <slug>

Archives the completed spec and syncs its // lexis: comments to the technical debt ledger.

/specxis debt

Syncs all // lexis: comments across the codebase portably into .specxis/debt.md.

Install

One command for rules-only hosts — or configure plugins manually.

Detects Cursor, Windsurf, Cline, Kiro, OpenCode, and AGENTS.md. Safe to re-run.

# Interactive — from your project directory
npx @draig/lexis-two install

# Non-interactive: Cursor + OpenCode + AGENTS.md
npx @draig/lexis-two install --host cursor,opencode,agents --scope project --yes

# Plugin hosts (setup hints for Claude, Copilot, Gemini, pi)
npx @draig/lexis-two install --host claude,gemini,copilot --yes

# Preview without writing files
npx @draig/lexis-two install --dry-run --yes

# Uninstall Lexis-Two files from the project
npx @draig/lexis-two install --uninstall --host cursor,opencode --scope project --yes

Adapt to any stack

Three files to touch. No new framework required.

1. AGENTS.md

Replace stack shortcuts (Python stdlib, Rust crates, Go stdlib). Run node scripts/check-rule-copies.js.

2. skills/

Point audit commands at your tools -- cargo audit, pip-audit, golangci-lint.

3. commands/

Update TOML and OpenCode command descriptions if skill behavior changes.

Focused stacks

Optimized patterns for the most common production stacks.

TypeScript / Node.js

Next.js, React, Express, Fastify, strict types

MongoDB / Mongoose

Schemas, indexes, aggregation, transactions

Tailwind CSS

Utility-first, dark mode, responsive

Python

FastAPI, Django, dataclasses, type hints

PostgreSQL / Prisma

Relations, migrations, N+1 prevention

Redis

Caching, sessions, rate limiting, pub/sub

OpenCode Go benchmark

baseline vs lexis-two — median LOC across 5 coding tasks.

Run date: 2026-06-16 · 3 runs per cell · source: opencode-go-2026-06-16.json

Total code LOC (median, 5 tasks)

LOC reduction vs baseline

Wall time (median total seconds)

LOC by task — lexis-two arm

Summary table

Model Baseline LOC Lexis-Two LOC Reduction Correct (lexis)

Results are from one OpenCode Go run (5 tasks, 3 repeats per cell). Model- and task-specific — not universal marketing claims.

Regenerate: npm run benchmark:opencode-go && npm run benchmark:report

Ecosystem

Lexis-Two is the public portable package -- principles, skills, and adapters. Lexis-One is private orchestration. Lexis-Core is future.

Lexis-One (private) ──extracts the best──▶ Lexis-Two (public)
     │                                           │
     │ personal configuration                    │ portable rules + skills
     │ providers & API keys                      │ multi-host adapters
     └───────────────────────────────────────────┘
                          │
                    Lexis-Core (future)
                    public orchestrator

Excelso Open

This project is proud to be part of Excelso Open, our open-source and community-focused branch, championing collaborative technology and social impact projects.

Visit excelso.xyz ➔