Skip to main content

Modus Operandi 🤌

PyPI version Python versions

Automate spec-driven "planner -> executor" workflows in LLM clients (opencode and cursor): task planning, task implementing and code review.

Quick start

pip install modus-operandi
modus-operandi task "<task-description>"

No configuration needed: the defaults use the free OpenCode Zen model opencode/big-pickle for planning, review and implementation, which works out of the box. To switch models or backends, run modus-operandi edit.

Install

modus-operandi works right after install: the first run renders the pipeline files (agents, scripts, workflows, prompts) into ~/.config/modus-operandi/ and ~/.config/opencode/, and creates ~/.config/modus-operandi/config.yml from the example. Updates arrive through PyPI (pip install -U modus-operandi); the render is re-applied automatically on the next run.

Requirements: Python >= 3.12, and one backend CLI on PATH — opencode (default) or cursor-agent (see --backend cursor below).

The dev flow (python3 install.py from a checkout) additionally installs a checkout-based modus-operandi command into ~/.local/bin and keeps that directory on PATH in your existing shell rc files (~/.bashrc, ~/.zshrc, ~/.profile), so the command is available in every newly opened terminal.

Usage

Task

If you have a workflow like this

1. Studying the motivation of the task with a planner-agent
2. Creating an ADR
3. Writing an implementation plan for the executor
4. The executor-agent asking clarifying questions about the task
5. The planner-agent answering these questions
6. Implementing the task
7. Reviewing for SRP violations
8. Reviewing for bugs
9. General review (correctness and quality)
10. Comment review (readability)
11. Fixing the issues found
12. The executor writing a final summary of what was done

The ADR records the decision (what and why) and is published to the architecture/ directory at the end of the run in its final version; the implementation plan stays internal to the executor.

then you can use this command

modus-operandi task "<task-description>"

The description can also come from a file: modus-operandi task path/to/description.md (a single argument naming an existing file is read as the description; file and inline text input are mutually exclusive).

Review

If you have a workflow like this

1. Reviewing the whole project for SRP violations
2. Reviewing the whole project for bugs
3. Comment review (readability)
4. Fixing the issues found
5. The executor writing a final summary of what was done

then you can use this command

modus-operandi review

To review only the changes between the current branch and the default branch:

modus-operandi review --branch-diff

Backend

By default, opencode is used. If you need the cursor backend, use the --backend cursor flag:

modus-operandi --backend cursor task "<task-description>"

Cursor runs on its default composer-2 model for planning, review and implementation when no cursor: section is configured yet; set your own model slugs with modus-operandi edit.

Config

modus-operandi edit

opens ~/.config/modus-operandi/config.yml in your terminal editor. On save and close it validates the file: a valid config is applied, an invalid one is rolled back and the error is reported with its line number; a config left unchanged is not re-applied.

Uninstall

modus-operandi uninstall
pip uninstall modus-operandi

removes the rendered pipeline files (~/.config/modus-operandi and the modus-operandi files under ~/.config/opencode) — run pip uninstall modus-operandi afterwards to remove the package itself.

Metadata

Release files for modus-operandi 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modus-operandi 0.4.0
File Size Uploaded
modus_operandi-0.4.0.tar.gz 480.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for modus-operandi 0.4.0
File Interpreter ABI Platform
modus_operandi-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / modus_operandi-0.4.0.tar.gz

Download URL modus_operandi-0.4.0.tar.gz
Size 480.3 kB
Tags Source
SHA-256 checksum
How to use checksums
958276437dec928f2300e1b3d711383a3b7c8c68586031ab6dc557a6df67e8c1
BLAKE2b-256 checksum
How to use checksums
63ac3c141d863805d8556bb230779f3defcbf9842c6c7907975cb709eeaba55a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / modus_operandi-0.4.0-py3-none-any.whl

Download URL modus_operandi-0.4.0-py3-none-any.whl
Size 531.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5c4be3fd88779d5eee58f9f42fb5dce903f3a12abb442f44a84549f0e388042
BLAKE2b-256 checksum
How to use checksums
168fe7a059bbe2502717255bc99abb0ed7710addcf55bef766b6ae00c7727408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page