diff --git a/.mosaic/orchestrator/mission.json b/.mosaic/orchestrator/mission.json index 4b17dc1..9175d8a 100644 --- a/.mosaic/orchestrator/mission.json +++ b/.mosaic/orchestrator/mission.json @@ -8,7 +8,7 @@ "status": "active", "task_prefix": "", "quality_gates": "", - "milestone_version": "0.0.1", + "milestone_version": "0.0.20", "milestones": [], "sessions": [] } diff --git a/AGENTS.md b/AGENTS.md index bd92747..9e1ce71 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -46,6 +46,21 @@ pnpm lint pnpm build ``` +## Versioning Protocol (HARD GATE) + +**This project is ALPHA. All versions MUST be `0.0.x`.** + +- The `0.1.0` release is FORBIDDEN until Jason explicitly authorizes it. +- Every milestone bump increments the patch: `0.0.20` → `0.0.21` → `0.0.22`, etc. +- ALL package.json files in the monorepo MUST stay in sync at the same version. +- Use `scripts/version-bump.sh ` to bump — it enforces the alpha constraint and updates all packages atomically. +- The script rejects any version >= `0.1.0`. +- When creating a release tag, the tag MUST match the package version: `v0.0.x`. + +**Milestone-to-version mapping** is defined in the PRD (`docs/PRD.md`) under "Delivery/Milestone Intent". Agents MUST use the version from that table when tagging a milestone release. + +**Violation of this protocol is a blocking error.** If an agent attempts to set a version >= `0.1.0`, stop and escalate. + ## Standards and Quality - Enforce strict typing and no unsafe shortcuts. diff --git a/apps/api/package.json b/apps/api/package.json index d4e3938..910f7a3 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/api", - "version": "0.0.1", + "version": "0.0.20", "private": true, "scripts": { "build": "nest build", diff --git a/apps/orchestrator/package.json b/apps/orchestrator/package.json index 4983a02..95bf1a8 100644 --- a/apps/orchestrator/package.json +++ b/apps/orchestrator/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/orchestrator", - "version": "0.0.6", + "version": "0.0.20", "private": true, "scripts": { "dev": "nest start --watch", diff --git a/apps/web/package.json b/apps/web/package.json index 7ce1534..6aad4f3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/web", - "version": "0.0.1", + "version": "0.0.20", "private": true, "scripts": { "build": "next build", diff --git a/docs/PRD.md b/docs/PRD.md index 2cd7941..8c1937c 100644 --- a/docs/PRD.md +++ b/docs/PRD.md @@ -40,7 +40,7 @@ Design system + app shell + dashboard page. PRs #451-454. - Dashboard page: metrics strip, orchestrator sessions, quick actions, activity feed, token budget - Grain overlay texture -### Go-Live MVP (v0.1.0) — Complete +### Go-Live MVP (v0.0.16) — Complete Dashboard polish, task ingestion pipeline, agent cycle visibility, deploy + smoke test. PRs #458, #460, #462, #464. @@ -51,9 +51,9 @@ Dashboard polish, task ingestion pipeline, agent cycle visibility, deploy + smok - WebSocket emits for job status/progress/step events - Dashboard auto-refresh with polling + progress bars + step status indicators - Deployed to mosaic.woltje.com, auth working via Authentik -- Release tag v0.1.0 +- Release tag v0.0.16 -### MS16+MS17-PagesDataIntegration (v0.1.1) — Complete +### MS16+MS17-PagesDataIntegration (v0.0.17) — Complete All pages built + wired to real API data. PRs #470-484 (15 PRs). Issues #466-469. @@ -69,7 +69,7 @@ All pages built + wired to real API data. PRs #470-484 (15 PRs). Issues #466-469 - All 5125 tests passing, CI pipeline #585 green - Deployed and smoke-tested at mosaic.woltje.com -### MS18-ThemeWidgets (v0.1.2) — Complete +### MS18-ThemeWidgets (v0.0.18) — Complete Theme package system, widget registry, WYSIWYG editor, Kanban filtering. PRs #493-505. Issues #487-491. @@ -86,7 +86,7 @@ Theme package system, widget registry, WYSIWYG editor, Kanban filtering. PRs #49 - Kanban board filtering by project, assignee, priority, search with URL persistence - 1,195 web tests, 3,243 API tests passing -### MS19-ChatTerminal (v0.1.3) — In Progress +### MS19-ChatTerminal (v0.0.19) — Complete Real terminal with PTY backend, chat streaming, orchestrator integration. PRs #515-522. Issues #508-512. @@ -100,7 +100,7 @@ Real terminal with PTY backend, chat streaming, orchestrator integration. PRs #5 - Agent output terminal: SSE streaming from orchestrator, lifecycle indicators, read-only view - Command autocomplete with keyboard navigation in chat input - 328 MS19-specific tests (268 web + 60 API), 4744 total passing -- Pending: deployment and smoke testing +- Deployed and smoke-tested at mosaic.woltje.com (CI #635 green) ### Bugfix: API Global Prefix (post-MS18) — Complete @@ -363,7 +363,7 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar 9. ~~Lint, typecheck, and existing tests pass~~ DONE 10. ~~Grain overlay texture from reference is applied~~ DONE -### Go-Live MVP (v0.1.0) — COMPLETE +### Go-Live MVP (v0.0.16) — COMPLETE 11. ~~Dashboard widgets wired to real API data~~ DONE 12. ~~WebSocket emits for agent job lifecycle~~ DONE @@ -492,14 +492,14 @@ These 19 NestJS modules are already implemented with Prisma and available for fr | Milestone | Version | Focus | Status | | ------------------------------ | ------- | ----------------------------------------------------------------- | ----------- | | MS15-DashboardShell | 0.0.15 | Design system + app shell + dashboard page | COMPLETE | -| Go-Live MVP | 0.1.0 | Dashboard polish, ingestion, agent visibility, deploy | COMPLETE | -| MS16+MS17-PagesDataIntegration | 0.1.1 | All pages built + wired to real API data | COMPLETE | -| MS18-ThemeWidgets | 0.1.2 | Theme package system, widget registry, WYSIWYG, Kanban filtering | COMPLETE | -| MS19-ChatTerminal | 0.1.3 | Global terminal, project chat, master chat session | COMPLETE | -| MS20-MultiTenant | 0.2.0 | Multi-tenant, teams, RBAC, RLS enforcement, break-glass auth | NOT STARTED | -| MS21-Federation | 0.2.x | Federation (M-M, M-S), 3 instances, key exchange, data separation | NOT STARTED | -| MS22-AgentTelemetry | 0.2.x | Agent task mapping, telemetry, wide-event logging | NOT STARTED | -| MS23-Testing | 0.2.x | Playwright E2E, federation tests, documentation finalization | NOT STARTED | +| Go-Live MVP | 0.0.16 | Dashboard polish, ingestion, agent visibility, deploy | COMPLETE | +| MS16+MS17-PagesDataIntegration | 0.0.17 | All pages built + wired to real API data | COMPLETE | +| MS18-ThemeWidgets | 0.0.18 | Theme package system, widget registry, WYSIWYG, Kanban filtering | COMPLETE | +| MS19-ChatTerminal | 0.0.19 | Global terminal, project chat, master chat session | COMPLETE | +| MS20-MultiTenant | 0.0.20 | Multi-tenant, teams, RBAC, RLS enforcement, break-glass auth | NOT STARTED | +| MS21-Federation | 0.0.21 | Federation (M-M, M-S), 3 instances, key exchange, data separation | NOT STARTED | +| MS22-AgentTelemetry | 0.0.22 | Agent task mapping, telemetry, wide-event logging | NOT STARTED | +| MS23-Testing | 0.0.23 | Playwright E2E, federation tests, documentation finalization | NOT STARTED | ## Assumptions diff --git a/package.json b/package.json index dbed5dd..c33fffe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mosaic-stack", - "version": "0.0.1", + "version": "0.0.20", "private": true, "type": "module", "packageManager": "pnpm@10.19.0", diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index e062c19..8883a7e 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/cli-tools", - "version": "0.0.1", + "version": "0.0.20", "description": "CLI tools for Mosaic Stack orchestration - git operations for Gitea/GitHub", "private": true, "bin": { diff --git a/packages/config/package.json b/packages/config/package.json index 8338697..09308e3 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/config", - "version": "0.0.1", + "version": "0.0.20", "private": true, "type": "module", "exports": { diff --git a/packages/shared/package.json b/packages/shared/package.json index 08cf390..013dcef 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/shared", - "version": "0.0.1", + "version": "0.0.20", "private": true, "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/ui/package.json b/packages/ui/package.json index 12a458a..06ee951 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/ui", - "version": "0.0.1", + "version": "0.0.20", "private": true, "type": "module", "exports": { diff --git a/scripts/version-bump.sh b/scripts/version-bump.sh new file mode 100755 index 0000000..498eb00 --- /dev/null +++ b/scripts/version-bump.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# version-bump.sh — Bump version across all workspace packages +# +# Usage: +# scripts/version-bump.sh +# scripts/version-bump.sh 0.0.21 +# +# Enforces: +# - Version MUST be 0.0.x (alpha constraint) +# - All package.json files are updated atomically +# - Rejects 0.1.0+ until explicitly unlocked + +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" + +if [[ $# -ne 1 ]]; then + echo "Usage: $0 " + echo "Example: $0 0.0.21" + exit 1 +fi + +NEW_VERSION="$1" + +# Hard gate: alpha constraint (0.0.x only) +if [[ ! "$NEW_VERSION" =~ ^0\.0\.[0-9]+$ ]]; then + echo "ERROR: Version must be 0.0.x (alpha). Got: $NEW_VERSION" + echo "" + echo "This project is in ALPHA. Versions >= 0.1.0 are not allowed." + echo "If this constraint needs to change, update AGENTS.md and this script." + exit 1 +fi + +# Patch number must be > 0 +PATCH="${NEW_VERSION##0.0.}" +if [[ "$PATCH" -lt 1 ]]; then + echo "ERROR: Patch version must be >= 1. Got: $NEW_VERSION" + exit 1 +fi + +# Find all package.json files in the monorepo +PACKAGE_FILES=( + "$REPO_ROOT/package.json" +) + +for dir in "$REPO_ROOT"/apps/*/package.json "$REPO_ROOT"/packages/*/package.json; do + [[ -f "$dir" ]] && PACKAGE_FILES+=("$dir") +done + +echo "Bumping all packages to $NEW_VERSION" +echo "" + +for pkg in "${PACKAGE_FILES[@]}"; do + REL_PATH="${pkg#"$REPO_ROOT"/}" + OLD_VERSION=$(grep -o '"version": "[^"]*"' "$pkg" | head -1 | cut -d'"' -f4) + # Use node for reliable JSON editing (preserves formatting better than sed) + node -e " + const fs = require('fs'); + const path = '$pkg'; + const raw = fs.readFileSync(path, 'utf8'); + const updated = raw.replace(/\"version\": \"[^\"]*\"/, '\"version\": \"$NEW_VERSION\"'); + fs.writeFileSync(path, updated); + " + echo " $REL_PATH: $OLD_VERSION -> $NEW_VERSION" +done + +echo "" +echo "Done. $NEW_VERSION applied to ${#PACKAGE_FILES[@]} packages." +echo "Next steps: commit, tag (v$NEW_VERSION), push."