lean

lean is a command for coding agents from studioKjm/ai-harness-template. It costs 0 tokens per session (929 once invoked), scanned A, original, MIT.

A command-line tracker for the Lean MVP method: build a small version of an idea, measure one result, then decide whether to continue, change direction, or stop. MVP means minimum viable product, and TDD here means a test-driven development document link.

In plain words
What is it for?
Use it to create and track hypotheses, record MVPs and measured results, make persist-or-pivot decisions, check status, and link work to stories or documents.
Why use it?
It keeps assumptions, measurements, decisions, and related project records connected instead of leaving experiments in scattered notes.

Command

Part of the harness plugin — 44 commands, 11 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/studiokjm/ai-harness-template/lean
Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lean

README.md
[![agentmods](https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/lean.svg)](https://agentmods.dev/commands/studiokjm/ai-harness-template/lean)
Your own site
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/lean"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/lean.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00929
Opus 5 $0.00000 $0.00464
Sonnet 5 $0.00000 $0.00186
Haiku 4.5 $0.00000 $0.00093

Measured 4d ago against content hash b2bf44801346, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

methodologies/lean-mvp/commands/lean.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/lean — Lean MVP Hypothesis Manager

Methodology: lean-mvp
Purpose: Build→Measure→Learn cycle. One metric. Pivot or persist.


Usage

/lean new --title <title> [--statement <text>] [--metric <name>] [--target <threshold>]
           [--window <days>] [--story <id>] [--tags <tag1,tag2>]
/lean build <hyp-id> [--mvp <description>] [--metric <name>] [--target <value>]
/lean measure <hyp-id> --actual <value> [--source <data-source>]
/lean decide <hyp-id> persist|pivot|abandon --rationale <text> [--decided-by <name>]
/lean status <hyp-id>
/lean list [--state proposed|testing|measuring|decided]
/lean link <hyp-id> [--story <id>] [--rfc <id>] [--tdd <id>] [--parent <id>]

State Machine

      new
       ↓
  💡 proposed  ──build──→  🔨 testing  ──measure──→  📏 measuring
                                                           │
                                                         decide
                                                    ┌──────┴──────┐
                                               persist          pivot / abandon
                                                    │               │
                                                ✅ decided     💡 new hypothesis

Key invariant: decided requires metric_actual to be populated.
A pivot creates a new hypothesis via --next-hyp.


Workflow

1. Define the hypothesis

python3 methodologies/lean-mvp/scripts/lean.py new \
  --title "email-nudge-increases-retention" \
  --statement "We believe that a 3-day re-engagement email will increase 30-day retention by 5% for inactive users" \
  --metric "30d_retention_rate" \
  --target "> 40% (currently 35%)" \
  --window 14

2. Build the MVP

# After shipping minimal feature:
python3 methodologies/lean-mvp/scripts/lean.py build hyp-20260430-001 \
  --mvp "3-day inactive user email with personalized content"

3. Collect data

# After measurement window closes:
python3 methodologies/lean-mvp/scripts/lean.py measure hyp-20260430-001 \
  --actual "38.2%" \
  --source "Mixpanel 30d retention report"

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 109 lines · 0 tokens per session scan A b2bf44801346

Subscribe to this mod's changes

lean is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 929 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.