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:
- Files are Database: No SQL, no vector stores, no hidden state.
- Markdown is API: Plans, logs, and context are just markdown files you can read and edit.
- Aggressive Cleanup: Designed for legacy codebases. It deletes old code rather than deprecating it.
- 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:
- Scout: Maps relevant code (writes to
.zen/scout.md). - Plan: Drafts a step-by-step plan (writes to
.zen/plan.md). - Implement: Executes steps one by one.
- 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 runzen task.mdagain. It resumes automatically. - Stuck on a step? Run
zen task.md --retryto clear the step completion marker. - Total restart? Run
zen task.md --resetto nuke the.zenfolder.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zen_mode-1.0.0.tar.gz.
File metadata
- Download URL: zen_mode-1.0.0.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d08e24351ecd419230510e5c3e628a2f8107f349e484a03bdb714b93e6883cfe
|
|
| MD5 |
d27367cf84624e806661b569672017fc
|
|
| BLAKE2b-256 |
54849573871e9a4ae00cc7e613f0094d5a489f4fe0dc0ddd6865a071a624098f
|
File details
Details for the file zen_mode-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zen_mode-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5244e410040ab110807d7e50e3fa57ac46a8e01970fcc5a538f0ca2afb53cfdb
|
|
| MD5 |
024f88573ba2e1ff4e17524088d70007
|
|
| BLAKE2b-256 |
c700997d90476c08854393df896376da4209ca25f27f16858b2372a741ef525a
|