plan-flow
Reads the code and writes a slice plan.
Use when a change needs a plan before any code.
MIT licensed · 14 skills · no subagent files
Short rules that stay in context, skills that load when the task needs them, and a workflow that ends in a reviewed commit.
npx lean-agent-harness --global
Installs into
01 · The workflow
You start each step. The command spelling follows your tool: /plan-flow in Claude Code, Cursor and OpenCode, /skill:plan-flow in Pi, $plan-flow in Codex.
/plan-flowReads the code without changing it and writes the work as slices in a task file.
Source stays untouched
/orchestrateBuilds one slice at a time, test first. A slice closes when its Definition of Done passes.
Failing test first
/review-auditAudits the diff and only reports. Blocker and Critical findings block the commit.
Blockers stop here
/commitRuns the quality gates first, then writes a Conventional Commit.
Checks, then commit
Ask in your own words and pull-request writes it and publishes it. It never merges.
You do the merge
02 · The catalog
Each skill is a folder with a SKILL.md. Skills marked extra are skipped by --profile core.
plan-flowReads the code and writes a slice plan.
Use when a change needs a plan before any code.
orchestrateBuilds the plan slice by slice with red, green and refactor.
Use when a plan has pending slices.
test-appRuns the application and tests how it behaves.
Use when you want to see it working. Optional.
review-auditAudits the uncommitted diff and records the hash it judged.
Use when the slices are done and nothing is committed.
commitRuns the quality gates and creates a Conventional Commit.
Use when the review approved the diff.
testingTesting standards for PHP, Go, Python, TS/JS and Rust.
Use when writing or fixing tests, mocks or flaky tests.
diagnosing-bugsA six-phase scientific debugging loop.
Use when a defect survives a first fix.
security-auditStatic and architectural security review.
Use when code handles input, authentication or secrets.
pull-requestOpens or updates a structured pull request.
Use when you ask for a PR after committing.
db-migration extraZero-downtime migrations and index tuning for SQL databases.
Use when changing tables, columns or indexes.
memory extraSQLite memory for a project, with a Markdown mirror.
Use when a session starts or a decision must be saved.
impeccable extraInterface layout, spacing, typography and visual polish.
Use when building or reviewing a user interface.
diagram-design extraArchitecture, flow and sequence diagrams as HTML with SVG.
Use when drawing or visualizing a system.
humanizer extraRemoves filler and AI writing habits from prose.
Use when writing docs, changelogs or PR text.
03 · Memory
The memory skill, an extra, keeps decisions, root causes and session summaries between conversations. They live in .memory/ inside your project: a SQLite database with a Markdown mirror you can read. It needs Node.js 24 or later.
contextsavesearchforget# auth-token-expiry
Date: 2026-11-02
Evidence: src/auth/token.js
Access tokens expire after 15 minutes.
Why: refresh tokens carry the session.
The agent treats a memory as a claim to check against the code, not as a fact. Add .memory/ to .gitignore: it is personal.
In Claude Code, optional hooks print the context when a session starts and ask for a summary after the repository changes:
npx lean-agent-harness --global --memory-hook
04 · Why lean
The rules take about 0.9k tokens, plus one line per skill. Longer detail loads only when a skill needs it.
Work is cut into feature-complete slices. Each starts with a failing test and closes on its Definition of Done.
Correctness, readability, architecture and safety are reviewed separately. Slices marked high-risk are reviewed in a fresh context.
An opt-in guard adds permission checks in Claude Code, Pi, OpenCode and Codex. Coverage differs by tool. It is best effort, not a sandbox.
05 · Install
Requires Node.js 24 or later for npx.
npx lean-agent-harness --global
npx lean-agent-harness
curl -fsSL https://raw.githubusercontent.com/lnardev/lean-agent-harness/main/install.sh | bash
This runs the main branch. Pin a version and a checksum if you prefer.
Cursor reads AGENTS.md from a project install only. Every path per tool is in the README.