Skip to main content

Ritualized AI agent workflows - multi-pass prompt pipelines for Cursor and beyond

Project description

macrocycle

Your StarCraft macro loop for code.

Ritualized AI agent workflows - multi-pass prompt pipelines for Cursor and beyond.

⚡ Why Macros?

  • Burn tokens, not time. Let AI iterate through analysis, planning, and implementation while you context-switch.
  • Scale horizontally. Run 10 agents on 10 Sentry errors. Review the PRs over lunch.
  • Artifacts you can audit. Every cycle saves outputs to disk. Review before merging.

📦 Installation

pipx install macrocycle

Or: pip install macrocycle / uv tool install macrocycle

🚀 Quick Start

cd your-project
macrocycle init

git checkout -b fix/your-issue
macrocycle run fix "Paste your error context here"

🔁 Run at Scale

Loop through problems and let agents work in parallel:

# Fix all Sentry errors from today
for error in $(sentry-cli issues list --status unresolved); do
  git checkout -b fix/$error
  macrocycle run fix "$(sentry-cli issues get $error)" &
done

Each agent runs the full ritual: impact → plan → review → implement → PR.

🛠 CLI Commands

macrocycle init                      # Initialize .macrocycle folder
macrocycle list                      # List available macros
macrocycle run <macro> <input>       # Run a macro
macrocycle run fix "..." --yes       # Skip gate approvals
macrocycle run fix "..." --until impact  # Stop after specific step

📁 Artifacts

.macrocycle/
  macros/fix.json           # Workflow definitions
  cycles/                   # Execution history
    2026-01-15_fix_abc123/
      input.txt
      steps/01-impact.md
      steps/02-plan.md
      ...

🧑‍💻 Development

git clone https://github.com/MilanPecov/macrocycle.git
cd macrocycle

# Using uv (recommended)
uv venv && source .venv/bin/activate
uv pip install -e .[dev]

# Or using standard venv
python -m venv .venv && source .venv/bin/activate
pip install -e .[dev]

🧪 Test

pytest

🚀 Release

make release            # Auto-bump based on commits
make release-patch      # 0.1.0 → 0.1.1
make release-minor      # 0.1.0 → 0.2.0
make release-major      # 0.1.0 → 1.0.0

Pushing a tag triggers CI → tests → PyPI publish → GitHub release.

License

MIT

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

macrocycle-0.1.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

macrocycle-0.1.1-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: macrocycle-0.1.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for macrocycle-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a722572733194f1489ef57c331c01b21d8ac42af88d2f701058f9cb7322b956b
MD5 ed550a8e52ca15a3b0af9c581f6a5453
BLAKE2b-256 714827d6a9b523ff89a6be15f331c30ab47cc504ca0d3ecd9ddde102cdc677ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for macrocycle-0.1.1.tar.gz:

Publisher: publish.yml on MilanPecov/macrocycle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: macrocycle-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for macrocycle-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22043fa162deca8b033941627ccef6da725265dc2eda472643b31358e56dbbf9
MD5 de63c53555556fba245bec391e5b8878
BLAKE2b-256 7ef99d370e390f63557bf337c56e670ae97fec55e16d8fed2bf0472738c0c089

See more details on using hashes here.

Provenance

The following attestation bundles were made for macrocycle-0.1.1-py3-none-any.whl:

Publisher: publish.yml on MilanPecov/macrocycle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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