Discover
Understand the problem before writing code.
Lexis-Two is an open framework for agent workflows where AI plans, builds and reviews — while humans stay in control of the critical turns.
npx @draig/lexis-two install Agents can plan, write, review and operate tools. The question is not whether they can act alone, but where human judgment should enter the system.
Structure agent work into explicit stages so the system knows what to do, what to check and when to involve a human.
Understand the problem before writing code.
Define the smallest valid solution.
Agent executes one task, then stops.
Check implementation against intent.
Same: define the MVP before specifying.
Generate spec and tasks without intermediate pause.
Run the full task list in one pass, scoped by Discovery.
One review over the whole batch before closing.
Not every action needs approval. Critical decisions do. This is where the human moves from supervisor to decision-maker.
I found two valid approaches for this feature.
Use the native platform API. No new dependency. Smaller implementation.
Add a modal library. Less implementation code, but introduces a dependency.
Separate responsibilities without losing a shared workflow. Each role has explicit permissions — auditors are read-only by design.
lexis-one writes Implements, edits, runs bash inside the gate.
lexis-review read-only Evaluates changes against the spec. Never edits.
ui-architect read-only Advises on design. Does not implement.
refactor-agent writes Large-scale restructuring within a scoped task.
security-auditor read-only Runs audits. Reports, does not fix.
design-auditor read-only Detects generic AI UI drift. Only writes DESIGN-AUDIT.md.
Lexis biases the loop toward simpler, smaller and more maintainable solutions.
Don't introduce functionality before there is a concrete need.
Use native capabilities before adding an abstraction.
Avoid duplicated knowledge and parallel implementations.
Clear responsibilities, maintainable interfaces.
Each command controls a different layer of the workflow.
/lexis Intensity Changes how aggressively the lazy ruleset gates the agent. Use it to keep daily work lean, during refactors, or to turn rules off.
/specx Specs The spec-driven lifecycle for features that touch 3+ files: proposal, plan, implement one task at a time, review, close.
/desx Design A read-only design audit after UI work. Detects visual slop and token drift, then applies fixes outside the spec loop.
A representative decision: use a native browser capability instead of adding an abstraction.
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">
<h2>{title}</h2>
{children}
</div>
</div>,
document.body,
);
}// lexis: native <dialog> — focus trap
// and backdrop already included
<dialog ref={dialogRef}>
<h2>Confirm deletion</h2>
<form method="dialog">
<button value="cancel">Cancel</button>
<button value="confirm">Delete</button>
</form>
</dialog> The agent chose the platform before the library — without being asked every turn.
Lexis-Two doesn't replace the agent you already use. It gives it a shared way of working.
Lexis-Two doesn't lock you into a framework, an editor, or an orchestrator. The core stays universal; the specifics are detected per task and per host.
Philosophy lives in AGENTS.md. Conventions live in stacks/<id>.md and are detected from the task's files — Node/TS shipped, Python/Go/Rust/Astro planned.
One skills/ catalog and thin adapters across OpenCode, Claude Code, Cursor, Codex, Gemini CLI, Copilot, pi, and plain AGENTS.md.
A portable ruleset, not a product lock-in. Any agent that reads instructions can follow the loop without a private orchestrator.
OpenCode Go benchmark, median LOC across 5 coding tasks, 3 runs per cell.
Results from a single run — model- and task-specific, not a universal promise.
Lexis-Two is the portable foundation. The longer-term direction is a programmable orchestration layer for human + agent workflows.
Principles, skills, commands, adapters and structured agent workflows.
Orchestration, state, agent coordination, shared context and configurable human checkpoints.
A programmable layer for intelligent workflows that know when to act and when to ask.
The goal is not maximum autonomy. It is useful autonomy with explicit human control at the right moments.
npx @draig/lexis-two install