herdr workforce output (6 codex angle-specialists -> claude synthesis): S1 ledger/economy, S2 catalog/registry, S3 storefront (cargstore->M2 Store), S4 Solution Scout (standalone watcher recommended), S5 packaging + 3 seed Solutions (mm-pdf 25cr, agent-scaffold 35cr, competitor-scan 60cr), S6 proposal engine + evidence loop. SPEC-INDEX is the tie-break: 23-row cross-cutting contract table (16 mismatches resolved, e.g. /v1 ledger paths win, m2store://listing/<id> deep link, one m2.market.telemetry.v1 envelope, op_<slug> operator ids, tenant ids from m2-gpt), 8 deduped clarifications with defaults, 4-phase build order where the paid-install wedge does NOT block on fedlearn (local ApplyAdapter until rails land), risk register. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3.5 KiB
3.5 KiB
Spec-Discovery Brief — m2-market (M2 Marketplace)
Mission
Produce implementation-ready SPECs for the M2 Marketplace: operators package repeatable outcomes as installable Solutions, sell them for M2 credits; a Solution Scout proposes packages in-session at the moment of need; Hermes composes build-vs-install proposals. "The unit is not software. The unit is completed work."
READ FIRST (in order):
- /home/m2/m2-market/CONCEPT.md — the unified concept v0.2 (your requirements source)
- /home/m2/m2-market/context/SYSTEM-MAP.md — verified map of m2-gpt, agent.memory.system, m2o
- /home/m2/m2o/.planning/federated-learning/PLAN.md — the fedlearn MVP rails you build upon
Locked decisions (operator-accepted; do NOT relitigate — design WITH them)
- Ledger: standalone
m2-ledgerservice, BUT architected to evolve into a crypto-capable ledger managed under extended m2-gpt billing (tenant keys/metering federate; design the migration path now, ship internal credits first). - Pricing v1: fixed price per install AND job-based pricing where applicable — sometimes another m2o operator takes a JOB to deliver a solution (service-style engagement settling through the same ledger).
- Storefront: MVP = cargstore Electron revival (github.com/machine-machine/cargstore) that connects to Coolify and other parts using credentials from m2-gpt (gateway-issued identity/keys). Web variant later from cargstore's web/ seed.
- Scout: EXPLORE the solution space — standalone supervised watcher vs Hermes plugin vs herdr plugin. Compare honestly, recommend one, spec it.
- Seed Solutions: mm-pdf (branded PDF generator), agent-scaffold (workspace generator), competitor-scan (research report).
- Economy defaults: platform cut 10%, starter grant 100 credits.
Hard constraints (inherited — every spec must respect)
- Tenant isolation: client data (sdjs=GST, nasr, parlobyg, peter) never crosses into shared catalog; commercialization of tenant-derived work is owner-initiated + doubly-scrubbed.
- No secrets in repos/images; keys injected at runtime (M2_GPT_API_KEY pattern).
- Mixed fleet images: runtime-sync (fedlearn m2-core-sync) is the universal install path.
- Host fragility: canary-first, idempotent, reversible; new services deploy as Coolify apps
on the
coolifynetwork. Local registry route is broken (302) — no registry push/pull. - Harness-agnostic where cheap: Hermes is primary, openclaw stays supported; anything speaking OpenAI-wire through m2-gpt should work.
- Forgejo (git.machinemachine.ai, org m2) = system of record; memory-api = semantic index.
Your output — a SPEC, not a plan
Write to /tmp/mktspec/specs/<YOUR_ID>.md. Structure:
- Scope & non-goals (MVP vs later)
- User stories + acceptance criteria (Given/When/Then where useful)
- Interfaces & data contracts — concrete: schemas (JSON), API endpoints (method+path+ payload), CLI verbs, file paths, DB tables, events. This is the heart.
- Integration contract with the other subsystems (name exact touchpoints)
- Options compared where your lane has a genuine fork; recommend one
- Risks/edge cases (tenant, secrets, fragility, abuse)
- [NEEDS CLARIFICATION] markers for anything genuinely undecidable (max 3) Inspect the LIVE system (docker, curl, repos in /home/m2/) — ground every contract in reality. Read-only on all existing repos; your ONLY write is your spec file. Last terminal line: SPEC_DONE_<YOUR_ID>