Skip to main content

Continuum

Rule engine so coding agents obey repo rules across Cursor, Claude, and ChatGPT: they get blocked, warned, or asked before breaking rules, with clear explanations of which rule fired and how to fix.

v0.1 promise

  • Add continuum.yaml to your repo.
  • Run continuum check locally and in CI.
  • Cursor (MCP) agents are gated: blocked / warned / clarification_required before breaking rules.
  • The system explains which rule fired and how to fix it.

Install

pip install -e .   # from repo
# or when published:
pip install continuum-code

Requires Python 3.10+. The CLI is installed as continuum. If another tool named continuum is in your PATH, use continuum-code instead (e.g. continuum-code --version, continuum-code init --pack data-dbt-airflow), or run python -m continuum.

Development on Windows (WSL2)

Keep the repo on the WSL filesystem (e.g. ~/repos/continuum) for best compatibility.

One-time (PowerShell as Admin):

wsl --install -d Ubuntu-24.04

After WSL install, open Ubuntu and run:

# Base (keep repo under WSL, e.g. ~/repos/continuum)
sudo apt update && sudo apt install -y build-essential git curl

# Python via uv (fast, clean venvs)
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env  # or restart shell

Per clone (inside WSL, in repo root):

cd ~/repos/continuum   # or your path
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

Run tests:

pytest

Run CLI:

continuum check
continuum init --pack python-fastapi

For a broader Windows + WSL2 dev setup (Terminal, Docker, Antigravity safety), see your preferred guide.

Quick start

# Create config (optional: use a pack)
continuum init
continuum init --pack python-fastapi   # or node-backend, typescript-monorepo

# Check current changes (git diff)
continuum check
continuum check --staged              # only staged
continuum check --base origin/main    # diff against branch

# Explain why a rule fired
continuum explain
continuum explain ban_lodash

# List active contracts
continuum inspect

Config: continuum.yaml

version: 0.1
scopes:
  - id: repo
    match: ["**/*"]
    contracts:
      - type: ban
        id: ban_lodash
        match:
          deps: ["lodash"]
        message: "Use native JS or approved utils."
      - type: ask_first
        id: confirm_migrations
        match:
          paths: ["**/migrations/**"]
        prompt: "Touching migrations. Confirm: (A) add-only (B) destructive (C) refactor"
  - id: backend
    match: ["backend/**"]
    precedence: 10
    contracts:
      - type: require
        id: require_tests
        match:
          paths: ["backend/**"]
        require:
          - kind: tests
            hint: "Add or adjust unit tests for changed modules."

Contract types: ban (deps/paths/commands), require (tests/logging/ADR), ask_first (confirmation gate), define (metadata).

Escape hatch

To skip checks (e.g. emergency hotfix), set CONTINUUM_SKIP=1; continuum check will exit 0 without running contracts. Prefer adjusting rules (e.g. severity: warn) in continuum.yaml when possible. See docs/adoption.md.

CI (GitHub Action)

- uses: actions/checkout@v4
  with:
    fetch-depth: 0
- uses: ./actions/continuum-check
  with:
    base_ref: ${{ github.event.pull_request.base.sha }}

Or in another repo: uses: your-org/continuum/actions/continuum-check@v0.1 (and install continuum via pip in the action).

Cursor / MCP

Run the MCP server so the Cursor agent can call continuum_check before applying changes:

continuum mcp --transport stdio

Add to Cursor MCP config:

{
  "mcpServers": {
    "continuum": {
      "command": "continuum",
      "args": ["mcp", "--transport", "stdio"]
    }
  }
}

See docs/cursor-mcp.md and docs/demo.md for setup and the “Refactor auth middleware” demo.

Golden demo: Run the 3 scenarios in demo/README.md (dbt marts require, airflow ask-first, banned command) in under 10 minutes.

Packs

Starter configs:

  • node-backend – Node/JS backend (ban lodash, require tests, ask on migrations).
  • python-fastapi – FastAPI app (ban requests in favor of httpx, require tests, ask on migrations).
  • typescript-monorepo – TS monorepo (ban lodash, require tests in packages).
  • data-dbt-airflow – dbt + Airflow repos (ask_first on marts/DAGs, require tests on marts, ban risky commands).
continuum init --pack python-fastapi
continuum init --pack data-dbt-airflow   # dbt + Airflow

5-minute adoption (dbt + Airflow)

  1. pip install continuum-code (or pip install -e . from repo).
  2. continuum init --pack data-dbt-airflow → writes continuum.yaml.
  3. continuum validate → confirm the file is valid.
  4. continuum check (or continuum check --base origin/main for PRs).
  5. Add the GitHub Action for CI; optionally run continuum mcp --transport stdio for Cursor.

Next steps (after v0.1)

  • Richer dependency detection (poetry, pnpm, pip-tools).
  • Pattern bans (regex on diffs).
  • Stricter “require” checks (e.g. tests touched when src touched).
  • Decision diffs / supersession (v0.2).

License

MIT.

Release files for continuum-code 0.2.1

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

Source distribution (sdist)

Source distribution for continuum-code 0.2.1
File Size Uploaded
continuum_code-0.2.1.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for continuum-code 0.2.1
File Interpreter ABI Platform
continuum_code-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.3 kB

Release files / continuum_code-0.2.1.tar.gz

Download URL continuum_code-0.2.1.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
50b90e61514ef3229a6a445dcb65c4429ad0ab663022f5a0c2d989c2791a197e
BLAKE2b-256 checksum
How to use checksums
a60674bb25aaf8bc4aca6e4bacaec5b803eb3e05f89fded5a247270cad5ea608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / continuum_code-0.2.1-py3-none-any.whl

Download URL continuum_code-0.2.1-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acb29a093b642d8d35d83a083886c501159534c0bc6b62b41f40fc74eef68f22
BLAKE2b-256 checksum
How to use checksums
aff7e95d8a10b324a48176acb7a4330596d447c26d81a55c9588a0d547eba139
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.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