From ec98e294a7e1dd372e61b948a31048396365397e Mon Sep 17 00:00:00 2001 From: "m2 (AI Agent)" Date: Thu, 2 Jul 2026 02:19:47 +0200 Subject: [PATCH] wedge(T001-T003): monorepo skeleton, uv workspaces, ruff+pytest config Co-Authored-By: Claude Fable 5 --- README.md | 8 ++++---- cli/pyproject.toml | 24 ++++++++++++++++++++++++ cli/tests/.gitkeep | 0 docs/.gitkeep | 0 indexer/pyproject.toml | 21 +++++++++++++++++++++ ledger/pyproject.toml | 20 ++++++++++++++++++++ ledger/tests/.gitkeep | 0 pyproject.toml | 19 +++++++++++++++++++ schemas/tests/.gitkeep | 0 scout/.gitkeep | 0 solutions/agent-scaffold/.gitkeep | 0 solutions/competitor-scan/.gitkeep | 0 solutions/mm-pdf-report/.gitkeep | 0 specs/001-market-first-wedge/tasks.md | 6 +++--- store/README.md | 13 +++++++++++++ 15 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 cli/pyproject.toml create mode 100644 cli/tests/.gitkeep create mode 100644 docs/.gitkeep create mode 100644 indexer/pyproject.toml create mode 100644 ledger/pyproject.toml create mode 100644 ledger/tests/.gitkeep create mode 100644 pyproject.toml create mode 100644 schemas/tests/.gitkeep create mode 100644 scout/.gitkeep create mode 100644 solutions/agent-scaffold/.gitkeep create mode 100644 solutions/competitor-scan/.gitkeep create mode 100644 solutions/mm-pdf-report/.gitkeep create mode 100644 store/README.md diff --git a/README.md b/README.md index 14db47f..4c205da 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,10 @@ genuinely new services: `m2-ledger` (append-only internal credits) and the `Solu (surface) · cargstore (storefront) · Forgejo (registry) · Coolify (deploys). ## Open forks (need operator decision — CONCEPT.md §14) -1. Ledger substrate: standalone m2-ledger (rec.) vs extend m2-gpt billing vs Forgejo-as-ledger -2. Pricing v1: fixed per install (rec.) vs metered vs both -3. Storefront: cargstore Electron revival (rec.) vs web-first vs both -4. Scout host: standalone supervised watcher (rec.) vs Hermes plugin vs herdr plugin +1. Ledger substrate: standalone m2-ledger , could become a crypto ledger that is managed in extended m2-gpt billing +2. Pricing v1: fixed per install (rec.) vs metered vs both (when applicable, sometimes othe m2o take a job for a solution) +3. Storefront: cargstore Electron revival (rec.) vs web-first vs both MVP electron app that connects to coolify or other parts with credentials from m2-gpt +4. Scout host: standalone supervised watcher (rec.) vs Hermes plugin vs herdr plugin (explore solution) 5. Seed Solutions: mm-pdf · agent-scaffold · competitor-scan (proposed) 6. Platform cut % + starter grant (defaults 10% / 100 cr) diff --git a/cli/pyproject.toml b/cli/pyproject.toml new file mode 100644 index 0000000..9b13448 --- /dev/null +++ b/cli/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "m2-market" +version = "0.1.0" +description = "M2 Marketplace CLI — search | show | install | wallet | publish (contracts/cli.md)" +requires-python = ">=3.12" +dependencies = [ + "click>=8.1", + "httpx>=0.27", + "jsonschema>=4.23", + "pyyaml>=6", +] + +[project.scripts] +m2-market = "m2_market.cli:main" + +[dependency-groups] +dev = ["pytest>=8"] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/m2_market"] diff --git a/cli/tests/.gitkeep b/cli/tests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/indexer/pyproject.toml b/indexer/pyproject.toml new file mode 100644 index 0000000..60b8764 --- /dev/null +++ b/indexer/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "m2-market-indexer" +version = "0.1.0" +description = "Registry → market:catalog sync; reindex = full rebuild (contracts/catalog-index.md)" +requires-python = ">=3.12" +dependencies = [ + "httpx>=0.27", +] + +[project.scripts] +m2-market-indexer = "m2_market_indexer.reindex:main" + +[dependency-groups] +dev = ["pytest>=8"] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/m2_market_indexer"] diff --git a/ledger/pyproject.toml b/ledger/pyproject.toml new file mode 100644 index 0000000..5b3554e --- /dev/null +++ b/ledger/pyproject.toml @@ -0,0 +1,20 @@ +[project] +name = "m2-ledger" +version = "0.1.0" +description = "M2 credits ledger — append-only transactions, derived balances (contracts/ledger-api.md)" +requires-python = ">=3.12" +dependencies = [ + "fastapi>=0.115", + "uvicorn>=0.30", + "httpx>=0.27", +] + +[dependency-groups] +dev = ["pytest>=8", "hypothesis>=6"] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/m2_ledger"] diff --git a/ledger/tests/.gitkeep b/ledger/tests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d5a456d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[project] +name = "m2-market-workspace" +version = "0.1.0" +description = "M2 Marketplace monorepo — schemas, ledger, CLI, indexer (spec 001-market-first-wedge)" +requires-python = ">=3.12" + +[tool.uv.workspace] +members = ["ledger", "cli", "indexer"] + +[tool.ruff] +line-length = 100 +target-version = "py312" + +[tool.ruff.lint] +select = ["E", "F", "I", "UP", "B"] + +[tool.pytest.ini_options] +testpaths = ["schemas/tests", "ledger/tests", "cli/tests"] +addopts = "-q" diff --git a/schemas/tests/.gitkeep b/schemas/tests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scout/.gitkeep b/scout/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/solutions/agent-scaffold/.gitkeep b/solutions/agent-scaffold/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/solutions/competitor-scan/.gitkeep b/solutions/competitor-scan/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/solutions/mm-pdf-report/.gitkeep b/solutions/mm-pdf-report/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/specs/001-market-first-wedge/tasks.md b/specs/001-market-first-wedge/tasks.md index ea84cf7..647d679 100644 --- a/specs/001-market-first-wedge/tasks.md +++ b/specs/001-market-first-wedge/tasks.md @@ -16,9 +16,9 @@ at the end of Phase 5 — Store (US4) and Scout (US5) are NOT on that path. **Purpose**: monorepo scaffolding per plan.md Project Structure -- [ ] T001 Create monorepo skeleton: `schemas/`, `ledger/`, `cli/`, `indexer/`, `solutions/`, `scout/`, `store/README.md` (pointer file) per plan.md structure -- [ ] T002 Initialize uv workspaces: `ledger/pyproject.toml` (fastapi, uvicorn, pytest), `cli/pyproject.toml` (click, httpx, pytest), `indexer/pyproject.toml` (httpx) — Python 3.12 -- [ ] T003 [P] Configure ruff + pytest defaults at repo root (`pyproject.toml` tool sections shared via workspace) +- [x] T001 Create monorepo skeleton: `schemas/`, `ledger/`, `cli/`, `indexer/`, `solutions/`, `scout/`, `store/README.md` (pointer file) per plan.md structure +- [x] T002 Initialize uv workspaces: `ledger/pyproject.toml` (fastapi, uvicorn, pytest), `cli/pyproject.toml` (click, httpx, pytest), `indexer/pyproject.toml` (httpx) — Python 3.12 +- [x] T003 [P] Configure ruff + pytest defaults at repo root (`pyproject.toml` tool sections shared via workspace) --- diff --git a/store/README.md b/store/README.md new file mode 100644 index 0000000..494d627 --- /dev/null +++ b/store/README.md @@ -0,0 +1,13 @@ +# M2 Store — pointer + +The M2 Store is NOT developed in this repo. It evolves from **cargstore** +(github.com/machine-machine/cargstore), branch `m2-store` — see plan.md Structure Decision +and research.md R7. + +Contracts it consumes from this repo: + +- `specs/001-market-first-wedge/contracts/catalog-index.md` — catalog reads +- `specs/001-market-first-wedge/contracts/cli.md` — installs shell `m2-market install --json` +- `schemas/listing.schema.json` — listing shape + +Tasks: T037–T040 (US4), canary-only (chris-m2o, gunnar-m2o).