LeanLane

LeanLane

MCP server that keeps AI agents from over-engineering by providing decision ladders, diff scoring, and prune reviews. It helps enforce minimal-code discipline through CLI, SDKs, and MCP tools.

Category
Visit Server

README

LeanLane

Stop AI agents from over-building. Decision ladder, diff scoreboard, prune review, MCP tools, and installable agent skills — local-first, measurable, and safe.

Part of Talocode. Optional cloud routes under /v1/leanlane/*.

npm npm install -g @talocode/leanlane
PyPI pip install talocode-leanlane
CLI leanlane
MCP leanlane mcp
Cloud https://api.talocode.site/v1/leanlane/*
Auth TALOCODE_API_KEY (cloud only)
Repo https://github.com/talocode/leanlane
License MIT

Why LeanLane?

Coding agents often solve a ticket by inventing frameworks: new packages, wrappers, abstractions, and hundreds of lines nobody asked for. That burns tokens, slows reviews, and leaves brittle code.

LeanLane puts a senior “write less” discipline into the loop:

  1. Decide before writing — climb a fixed ladder (skip → reuse → stdlib → native → installed dep → one-liner → minimum new code).
  2. Score the diff — LOC, new files, dependencies, abstraction signals, grade A–F.
  3. Review for over-engineering — delete-list, not vibe comments.
  4. Rules / skill — always-on agent instructions with modes (lite / full / ultra / off).
  5. Safety floor — never cut validation, security, accessibility, or understanding for fewer lines.

Open tool people can trust. Hosted power when teams want shared scoreboards and API metering.

Install

npm install -g @talocode/leanlane
# or
npx @talocode/leanlane --help

pip install talocode-leanlane

Quickstart (CLI)

# What should the agent do *before* coding?
leanlane decide --task "add a date picker to the form"

# Score the working tree diff
leanlane score --git

# Review a file for bloat
leanlane review --file src/app.ts

# Export always-on rules into the repo
leanlane rules --mode full --out AGENTS.leanlane.md

# Export SKILL.md for agent hosts
leanlane skill --mode full --out skills/leanlane/SKILL.md

# Default mode for new sessions
leanlane mode set full

# MCP stdio server for agents
leanlane mcp

Example: decide

leanlane decide --task "add a date picker" --mode full

Returns a recommended rung (often native_platform for date pickers), rationale, full ladder, safety floor, and agent instructions.

Example: score a diff

leanlane score --diff "$(git diff HEAD~1)" --mode full
{
  "ok": false,
  "score": 42,
  "grade": "D",
  "metrics": {
    "filesTouched": 4,
    "linesAdded": 280,
    "newDependencies": 1,
    "newFiles": 2
  },
  "findings": [ ... ]
}

Exit code 2 when the score fails the mode threshold (useful in CI).

TypeScript SDK

import {
  decide,
  scoreDiff,
  reviewCode,
  getRuleset,
  createLeanLaneClient,
} from '@talocode/leanlane'

const plan = decide({
  task: 'add a date picker',
  nativeCandidate: '<input type="date">',
})

const score = scoreDiff({
  diff: await Deno.readTextFile('patch.diff'), // or any unified diff string
  mode: 'full',
})

const client = createLeanLaneClient() // uses TALOCODE_API_KEY for cloud
await client.health()

Local engine calls need no API key. The client is for optional Talocode Cloud routes.

Python SDK

import os
from leanlane import LeanLaneClient, decide, score_diff

print(decide(task="add a date picker"))
print(score_diff(diff=open("patch.diff").read()))

client = LeanLaneClient(api_key=os.environ.get("TALOCODE_API_KEY"))
print(client.health())

MCP

leanlane mcp

Exposes:

Tool Purpose
leanlane_decide Ladder decision before coding
leanlane_score_diff Score unified diffs
leanlane_review Over-engineering review + delete-list
leanlane_rules Mode ruleset markdown
leanlane_health Version + capabilities

Example host config (stdio):

{
  "mcpServers": {
    "leanlane": {
      "command": "leanlane",
      "args": ["mcp"]
    }
  }
}

Modes

Mode Behavior
off No lean pressure
lite Prefer reuse/stdlib; fail only on high/critical bloat
full Default ladder + fail on high findings or weak score
ultra Aggressive minimalism; medium findings fail
export LEANLANE_MODE=full
# or
leanlane mode set ultra

Safety floor (never cut)

  • Input validation at trust boundaries
  • Error handling that prevents data loss
  • Security-sensitive paths
  • Accessibility for user-facing UI
  • Understanding the problem before shrinking the diff
  • One runnable check for non-trivial logic

Cloud routes (optional)

Base: https://api.talocode.site

Path Credits (indicative)
GET /v1/leanlane/health 0
GET /v1/leanlane/pricing 0
GET /v1/leanlane/capabilities 0
POST /v1/leanlane/decide 2
POST /v1/leanlane/score 5
POST /v1/leanlane/review 5
POST /v1/leanlane/rules 1
GET /v1/leanlane/skill 1

Auth: Authorization: Bearer $TALOCODE_API_KEY or X-Api-Key.

Agent skill

leanlane skill --out skills/leanlane/SKILL.md

Compatible with Codra, Cursor-style skill folders, Claude Code-style skills, and OpenCode-style workflows. Copy into your agent’s skills directory or keep under .agents/skills/leanlane/.

CI gate example

leanlane score --git --mode full || exit 1

Related packages

Package Install
LeanLane (this) npm i @talocode/leanlane · pip install talocode-leanlane
VerifyLane npm i @talocode/verifylane · pip install talocode-verifylane
PolicyLane npm i @talocode/policylane
StyleLane npm i @talocode/stylelane
EvalLane npm i @talocode/evallane
TraceLane npm i @talocode/tracelane
GateLane npm i @talocode/gatelane

Talocode ecosystem

Product Role
LeanLane (this package) stop agent over-building
VerifyLane · pip install talocode-verifylane Deterministic code verification
PolicyLane Allow/deny + redaction
StyleLane Constitution packs
EvalLane Assertion eval suites
TraceLane Agent run tracing
RetryLane Retries & circuit breakers
PromptLane Prompt versioning
HandoffLane Schema handoffs
GateLane MCP gateway
SearchLane · pip install talocode-searchlane Agent web search
ContextLane · pip install contextlane Shared agent context
MemoryLane Agent memory
Tera · pip install talocode-tera Capability API
Codra · pip install talocode-codra Coding agent
StackLane · pip install talocode Keys, wallet, metering
Tradia · pip install tradia Trading agents
ScreenLane · pip install talocode-screenlane Screen context
XSearchLane · npm i @talocode/xsearchlane X search
XProLane · pip install talocode-xprolane X pro workflows
Agent Browser Browser automation
ClipLoop Clip / media loops
InvoiceLane Invoicing
GeoLane Geo utilities
DevTool · pip install talocode-devtool Dev tooling

More: github.com/talocode · talocode.site · docs.talocode.site

License

MIT © Talocode

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured