MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-3

1.0.0 Scaffold `motir-ai` repo (the closed-source AI service stub)

Done
Description

Estimate: 6m

Create the second repo of Motir's open-core architecture: motir-ai, closed-source, commercial, and headless — a backend service with no UI. It will eventually hold the planning agent, prompt-generation agent, async expansion loop, and shared-context retrieval. For now it's a minimal stub — just enough to have a deployable HTTP service that motir-core can call into server-to-server via the API contract defined in Epic 7 Story 7.1 (Core ↔ AI API contract).

Why headless (no UI): all user-facing UI lives in motir-core. The browser never talks to motir-ai directly; only motir-core's server-side handlers do. This is what keeps the user experience unified (one app, one domain, one cookie) while preserving the GPL boundary (clean network service interface, not a derivative work).

Why a separate repo from day one (not "split later"): see feasibility.html ADR-008. Splitting a mature codebase retroactively is expensive and rarely happens cleanly. Two repos from the start enforce the GPL boundary and give each codebase its own CI, deploy, and version pipeline.

What you'll do: Create the motir-ai repo on GitHub as private (not public — this code is closed-source). Add a minimal backend-only service: Hono or Express with a single GET /health endpoint returning { "status": "ok" }. No React, no Next.js, no UI dependencies — this is server code only. Add package.json with start script, .env.example documenting ANTHROPIC_API_KEY (used later), .gitignore, and a proprietary LICENSE notice at the repo root saying "Copyright © Motir Inc. All rights reserved. This software is proprietary and confidential." Add a README naming the repo's purpose ("headless AI backend, no UI, called server-to-server from motir-core") and explicitly pointing at motir-core for the open-source PM substrate and all UI.

Acceptance criteria

  • GitHub repo moooon-B-V/motir-ai exists, private (visibility = private).
  • A LICENSE file is at the repo root with a proprietary notice: "Copyright © Motir Inc. All rights reserved. This software is proprietary and confidential." — explicitly NOT GPL or any open-source license.
  • A README.md exists, naming the repo's purpose ("closed-source AI service for Motir's planning intelligence"), pointing at motir-core as the companion open-source repo, and saying clearly: "this repo is intentionally not open-source — see motir-core for the GPL-3.0 PM substrate."
  • Minimal Node service exists: pnpm dev starts a server on localhost:8001 (different port from motir-core's 3000) and GET /health returns 200 OK with a JSON body.
  • TypeScript strict mode configured.
  • .env.example has ANTHROPIC_API_KEY and PORT=8001.
  • .gitignore excludes node_modules, .env, and build output.
  • No web framework choice baked in deeply yet — Hono or Express is fine; the choice can be revisited when real AI code starts arriving in Epic 4.

Context refs

  • feasibility.html ADR-008 — the open-core architecture rationale
  • vision.html principle #19 — the open-core decision
  • Hono v4 docs OR Express docs (URL, fetched at prompt-gen time)
Status
Done
Type
Sub-task