Skip to main content

Minimalist autonomous agent runner

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Zen Mode 🧘

A minimalist, file-based autonomous agent runner. Orchestrates claude to scout, plan, code, and verify tasks using the file system as memory.

The Philosophy:

  1. Files are Database: No SQL, no vector stores, no hidden state.
  2. Markdown is API: Plans, logs, and context are just markdown files you can read and edit.
  3. Aggressive Cleanup: Designed for legacy codebases. It deletes old code rather than deprecating it.
  4. Contract First: Enforces architectural rules via a "psychological linter."

Prerequisites

1. Install Claude CLI (Required): The agent uses the official Anthropic CLI to interface with the LLM.

npm install -g @anthropic-ai/claude-cli
claude login

Installation

Option A: The Package (Recommended)

Best for general use. Zero dependencies.

pip install zen-mode

Option B: The Scripts (For Hackers)

Best if you want to modify the agent's internal logic.

Download zen.py and zen_lint.py from the scripts folder to your project root.


Workflow

1. Initialize

Run this in your project root to generate the config.

zen init

Creates .zen/ directory and CLAUDE.md (The Constitution).

2. Define the Task

Create a simple text file (e.g., task.md) describing what you want:

"Refactor the auth module to use JWTs instead of sessions. Delete the old session middleware."

3. Run the Agent

zen task.md

The agent will loop through four phases:

  1. Scout: Maps relevant code (writes to .zen/scout.md).
  2. Plan: Drafts a step-by-step plan (writes to .zen/plan.md).
  3. Implement: Executes steps one by one.
  4. Verify: Runs tests to confirm.

4. Intervention (The "Human in the Loop")

Since state is just files, you are in control:

  • Don't like the plan? Open .zen/plan.md, edit the text, and run zen task.md again. It resumes automatically.
  • Stuck on a step? Run zen task.md --retry to clear the step completion marker.
  • Total restart? Run zen task.md --reset to nuke the .zen folder.

Advanced

The Eject Button

Started with the package but want to hack the source code?

zen eject

This copies the internal logic (zen.py and zen_lint.py) into your local directory. The zen command will now use your local versions.

Configuration

Env vars (optional):

export ZEN_MODEL_BRAIN=opus       # For planning
export ZEN_MODEL_HANDS=sonnet     # For coding
export ZEN_MODEL_EYES=haiku       # For summaries
export ZEN_TIMEOUT=600            # Max seconds per step
export ZEN_LINTER_TIMEOUT=120     # Max seconds for linter
export ZEN_RETRIES=2              # Max retries per step

Upgrade After Eject

After ejecting, you're on your own for updates. Compare your local files against the scripts folder to see what changed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zen_mode-0.1.1.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zen_mode-0.1.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file zen_mode-0.1.1.tar.gz.

File metadata

  • Download URL: zen_mode-0.1.1.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for zen_mode-0.1.1.tar.gz
Algorithm Hash digest
SHA256 359e1b8712a7f67c5fd901b6eb9de69c4614742470c746c8d3a31a21321443fb
MD5 092a960b71c296ede0ef8a992d16c040
BLAKE2b-256 d98147d9b8542b8488057c1ea53a8ccafe009cceae520a38a6a4195d4375c48b

See more details on using hashes here.

File details

Details for the file zen_mode-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zen_mode-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for zen_mode-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 87a84d2a873f8376a73ea0e2f6d9ee0a1be5116abf5d33302b5c918bdb473113
MD5 ef0e1cc0e374a78ddbfe9e48435a4c70
BLAKE2b-256 78652d8a830d3d8e3d9bedf87c4a0e68bc2f33d0a40a47cb16d519b005043352

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page