YAGNI
Challenge every feature and abstraction before it ships. The ladder below is the gate.
LEXIS-TWO
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).
Lexis-Two treats simplicity as method: skeptical defaults, production stack patterns, and maintainable boundaries -- not clever minimalism for its own sake.
Challenge every feature and abstraction before it ships. The ladder below is the gate.
Stdlib, platform APIs, and boring one-liners beat new dependencies.
One skills/ catalog. Host files route slash commands -- they do not fork behavior.
Clear module and service boundaries. No abstractions nobody asked for.
Before writing any code, stop at the first rung that holds.
Confirm dialog. From examples/nextjs/01-modal-library.
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.
// 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.
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 |
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.
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 # Or let the installer merge opencode.json for you:
npx @draig/lexis-two install --host opencode --scope project --yes
# Manual: add to opencode.json
{
"plugin": ["@draig/lexis-two"]
} git clone https://github.com/nitdraig/lexis-two.git ~/lexis-two
# opencode.json
{
"plugin": ["~/lexis-two/.opencode/plugins/lexis-two.mjs"],
"instructions": ["~/lexis-two/AGENTS.md"]
} # Or use the installer:
npx @draig/lexis-two install --host cursor --scope both --yes
# Manual — project:
cp ~/lexis-two/.cursor/rules/lexis-two.mdc .cursor/rules/lexis-two.mdc
# Manual — global:
cp ~/lexis-two/.cursor/rules/lexis-two.mdc ~/.cursor/rules/lexis-two.mdc git clone https://github.com/nitdraig/lexis-two.git ~/lexis-two
# More hosts: docs/portability.md in the repo
# Default mode: LEXIS_TWO_DEFAULT_MODE=full
# Or ~/.config/lexis-two/config.json → { "defaultMode": "full" } Three files to touch. No new framework required.
Replace stack shortcuts (Python stdlib, Rust crates, Go stdlib). Run node scripts/check-rule-copies.js.
Point audit commands at your tools -- cargo audit, pip-audit, golangci-lint.
Update TOML and OpenCode command descriptions if skill behavior changes.
Optimized patterns for the most common production stacks.
Next.js, React, Express, Fastify, strict types
Schemas, indexes, aggregation, transactions
Utility-first, dark mode, responsive
FastAPI, Django, dataclasses, type hints
Relations, migrations, N+1 prevention
Caching, sessions, rate limiting, pub/sub
Complementary repos -- benchmarks, early patterns, and host-specific extensions.
baseline vs lexis-two — median LOC across 5 coding tasks.
| 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
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 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 ➔