Skip to main content

Economics runtime and implementation reference for agents: workspace-first compute, run(ctx), and cloud execution guidance.

Project description

maestro-economics

maestro-economics is the canonical repository for the Maestro economics skill, the mecon CLI, the run(ctx) runtime contract, and the Modal worker used by RA Compute.

This repo exists to keep four things aligned:

  • agent guidance
  • packaging and PyPI release
  • workspace/runtime execution
  • cloud worker implementation

Scope

This repository currently contains:

  • mecon CLI for setup, workspace tracking, sync, submit, watch, logs, download
  • run(ctx) runtime with progress, logs, checkpoints, data loading, and transform helpers
  • Modal worker entrypoints for GPU execution
  • economics method registry and analysis scaffolding
  • agent skill documentation used to guide professor-facing and agent-facing workflows

Canonical flow

The contract is doctor-first. Treat the host plugin or skill, the Python runtime, and the local workspace as separate layers that must be refreshed and verified in order.

# 1. Refresh the host plugin or skill for this repo.
#    Use the host-native install or refresh command when available.

# 2. Upgrade the runtime package.
python3 -m pip install --upgrade maestro-economics

# 3. Run the readiness gate immediately.
mecon doctor

# 4. If doctor says the API key is missing:
mecon setup
mecon doctor

# 5. If doctor says the workspace is missing or incomplete:
mecon workspace init
mecon add run.py data.parquet
mecon sync
mecon doctor

# 6. Only submit after doctor passes.
mecon submit run.py --gpu l4
mecon watch <job_id>
mecon logs -f <job_id>
mecon sync

download still exists, but workspace mode should normally use sync to pull output/ artifacts back.

mecon doctor is the gate. It checks API configuration, connectivity, run.py, run(ctx), workspace manifest state, tracked files, and sync state. Use mecon doctor --json when a host or automation layer needs machine-readable results.

Worker contract

Jobs must expose run(ctx).

def run(ctx):
    ctx.log("Loading data")
    ctx.progress(0.1, "Loading data")

    # read from ctx.data_dir
    # write artifacts to ctx.output_dir

    ctx.save_checkpoint(step=1)
    ctx.progress(1.0, "Done")
    return {"diagnostics": {"converged": True}}

Available helpers:

  • ctx.progress(pct, message)
  • ctx.log(message)
  • ctx.save_checkpoint(**arrays)
  • ctx.load_checkpoint()
  • ctx.has_checkpoint
  • ctx.data_dir
  • ctx.output_dir
  • ctx.config
  • ctx.gpu

Install and verify

python3 -m pip install -e .
pytest -q
python3 -m compileall src/maestro_economics

Plugin packaging

This repository now includes root-level plugin manifests for both ecosystems:

The repository itself is the plugin root. A separate Codex marketplace catalog is intentionally not added here because this repo is a single plugin source, not a multi-plugin catalog.

Claude Code bootstrap:

/plugin marketplace add maestro-ai-stack/maestro-economics
/plugin marketplace update maestro-economics
/plugin install maestro-economics@maestro-economics
/reload-plugins

If Claude reports Plugin "maestro-economics" not found in marketplace "maestro-economics", the local marketplace cache is stale or incomplete. Repair it with:

/plugin marketplace remove maestro-economics
/plugin marketplace add maestro-ai-stack/maestro-economics
/plugin install maestro-economics@maestro-economics
/reload-plugins

Bootstrap rule

/help/compute should stay bootstrap-only. It must tell the agent to:

  1. refresh or install the host plugin or skill
  2. upgrade the maestro-economics runtime package
  3. run mecon doctor
  4. follow the installed skill only after the doctor output identifies the next missing step

Do not duplicate the full workspace and submit flow on the website. The installed skill is the only operational source of truth.

Repository rule

Do not introduce a second runtime repo. If the skill, CLI, PyPI package, and worker drift apart again, the product becomes unreliable immediately.

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

maestro_economics-0.3.2.tar.gz (318.8 kB view details)

Uploaded Source

Built Distribution

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

maestro_economics-0.3.2-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file maestro_economics-0.3.2.tar.gz.

File metadata

  • Download URL: maestro_economics-0.3.2.tar.gz
  • Upload date:
  • Size: 318.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for maestro_economics-0.3.2.tar.gz
Algorithm Hash digest
SHA256 a1213ff87a2ddd9b8f3fd4debdf8a261890cabf2bf624cb0344f95d6b76f9a54
MD5 c05c7c55fce84cd7a78442e2965118b6
BLAKE2b-256 882d53eb0b0274cde815cdd4182f896052757a0433f9a02edb49bb17de339ed4

See more details on using hashes here.

File details

Details for the file maestro_economics-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for maestro_economics-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f6246804193a95952042466627f80056e21589cd3e1770acf43d1a564d1b413
MD5 d8c2d7c10b4e5062a3a669315a77fe5d
BLAKE2b-256 cab4eeb0e18f35c466fff1483a972c3a9cf6468d8ed823b1a08ee32cd4438670

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