🪐 Session kit · Planet Module System Foundation

2026-05-16 sab · 8h orchestrator session · Opzione B+ AUTONOMOUS

SSoT di tutta la sessione orchestratrice di oggi. Ogni file è autonomo e copy-pasteable. Folder: ops/sessions/2026-05-16-pms-foundation/ Repo target codice: D:\Desktop\Multiverbe\ · branch base master

🔥 MODALITÀ AUTONOMOUS FULL (founder authorization 2026-05-16 sera v2):

  • Pasta 60-kickoff-paste.md → Mother parte da sola · zero wait
  • Auto-merge PR gate-passed (gh pr merge --auto --squash)
  • Auto-push master = prod Vercel deploy
  • Auto-commit + auto-push BOS + auto-deploy multiverbe-bos-app
  • DB migration write AUTORIZZATO con safety rails (test branch ephemeral · UP+DOWN reversibile · RLS scoped · get_advisors diff · ADR · idempotency · NO destructive)

🎯 Obiettivo

Stabilire il Planet Module System (PMS) in D:\Desktop\Multiverbe\ come fondazione plug-in architecture multi-tenant, e migrare Pianeta Web + Pianeta Booking come primi due moduli conformi. Output finale: 2 PR merged + 3 ADR + scaffold script pnpm run scaffold:planet <kind> + 4 quality gate green + scale-readiness +50%.

📂 Indice file (read order)

# File Scope Quando si usa
00 00-preflight-check.sh OBBLIGATORIO ESEGUIRE PRIMA DEL BRIEF · pre-flight check 30sec detecta drift kit→repo (branch · HEAD baseline · monorepo skeleton · PM detection · toolchain · Vercel state). Exit 0 green / 1 yellow / 2 red. Retrofittato 2026-05-17 post-lesson learned. Mother PRIMA AZIONE assoluta
00 00-mother-brief.md Brief completo Mother (Opus 4.7) · <task_spec> + <reasoning_map> + <planning_map> 4-fasi + rischi + acceptance Seconda azione (dopo pre-flight)
01 01-child-1-brief.md Brief standalone Child-1 (Planet Core + Web retrofit) Spawn worktree feat/pms-core-web-retrofit
02 02-child-2-brief.md Brief standalone Child-2 (Adapters + Booking retrofit) Spawn worktree feat/pms-adapters-booking-retrofit
10 10-contracts.ts TypeScript contracts pre-scritti per packages/contracts/src/planet.ts Mother fase-0 commit su feat/pms-foundation-base
20 20-ci-workflow.yml .github/workflows/planet-system-ci.yml template completo Mother fase-0 commit
30 30-tooling-configs.md commitlint + lint-staged + husky + size-limit + stryker + changesets + renovate configs (copy-paste ready) Mother fase-0 commit blocchi
40 40-adr-templates.md 3 ADR seedati (PMS · hexagonal · strangler) · da finalizzare during execution Child finalizzano alla fine
50 50-acceptance-checklist.md Checklist printable per-Child + Mother gate finale Esecuzione (tick durante)
60 60-kickoff-paste.md Prompt corto copia-incolla per nuova sessione Claude START · pasta in Claude Code aperto su D:\Desktop\Multiverbe\

🚀 Come avviare la sessione (AUTONOMOUS)

Azioni (retrofit 2026-05-17):

  1. Apri Claude Code in D:\Desktop\Multiverbe\ con modello Opus 4.7 xhigh effort (/fast OFF)
  2. PRIMA AZIONE Mother: bash D:/Desktop/Multiverbe-Business/ops/sessions/2026-05-16-pms-foundation/00-preflight-check.sh (30sec · detecta drift)
    • Exit 0 green → procedi step 3 Mode A full-kit
    • Exit 1 yellow → procedi step 3 ma in Mode B scope-reduced (flag drift in ACK)
    • Exit 2 red → STOP + AskUserQuestion (Option A/B/C · vedi _template/20-foreground-singleturn-modes.md)
  3. Pasta il contenuto INTEGRALE del blocco ---PASTE START------PASTE END--- di 60-kickoff-paste.md come primo messaggio
  4. Vai a prenderti un caffè ☕ — Mother:
    • ACK 5 righe (no domande)
    • Esegue Fase 0 (75min) usando file pre-scritti del kit
    • Crea worktree + spawn 2 Child paralleli via Task tool
    • Aspetta result Child (5h30)
    • Fase 2: verifica auto-merge gate-passed, full quality gate, Vercel prod deploy, BOS auto-update, improvement loop
    • Output 8-line summary a fine

Tempo totale: ~8h zero-touch · founder può essere completamente AFK.

⏱️ Time budget hard

Fase Durata Mother Child-1 Child-2
0 · Bootstrap 75min execute idle idle
1 · Parallel execution 5h30 check-ins 90min · unblock execute execute
2 · Integration + gates + BOS update 75min merge + gates + update + improvement loop handed-off handed-off

Total 8h. Se si scivola oltre 9h → time-box hard, mergiare solo quello stabile, parcheggiare il resto in nuovo action_item BOS.

✅ Definition of Done sessione

  • [ ] 2 PR merged a master (squash, CI green, Vercel preview green)
  • [ ] L1-L10 test pyramid tutti exit 0 (vedi 00-mother-brief.md §test_strategy)
  • [ ] 3 ADR archiviati in D:\Desktop\Multiverbe\docs\adr/
  • [ ] Scaffold smoke pnpm run scaffold:planet crm <60s success
  • [ ] BOS status.json + decisions-log.md aggiornati + committati + pushed + Vercel deployato (trigger "aggiorna BOS")
  • [ ] <quality_report> §9 archiviato execution/quality-reports/2026-05-16T{HH}-pms-foundation.md
  • [ ] <wow_check> §9-bis appended execution/wow-backlog.md
  • [ ] Memory updated · MEMORY.md ≤200 lines
  • [ ] Self-critique entry su ops/operating-protocol-orchestrator.md se emerge gap protocollo

🛡️ Quality bar (non-negotiable)

  • TypeScript strict: true · zero any · zero @ts-ignore non commentato WHY
  • Coverage public surface ≥80% line · ≥70% branch
  • Mutation score ≥60% (packages/planet-core/)
  • Bundle: core ≤25KB gz · planet ≤80KB gz · adapter ≤15KB gz
  • A11y WCAG 2.2 AA (axe-core 0 critical/serious)
  • Perf: planet boot ≤180ms p95 · LCP ≤2.5s · INP ≤200ms · CLS ≤0.1
  • Security: pnpm audit 0 high/critical · Supabase get_advisors 0 new warning · CSP-strict compatible
  • Conventional commits (commitlint enforced)
  • ZERO INFO LOSS · refactor verbatim · ogni rimozione → ADR justifying

🧭 Ruoli + decisioni

  • Mother = helper risposte · NON decide su naming/dominio/branding/schema/security in autonomia (anche con bulk approve precedente) · prepara opzioni con trade-off + founder picka
  • Child = execute conforme al brief · escalation a Mother se zona grigia · MAI decide unilaterale
  • Founder = decisore unico zona grigia · sblocco zone "decision split feedback memory"

🔄 Continuous improvement loop

A fine sessione, Mother DEVE:

  1. Append ≥1 lesson learned a ops/operating-protocol-orchestrator.md §Lessons-Learned
  2. Aggiornare memoria con feedback_planet_module_system_architecture.md (se non esiste)
  3. Append ≥1 wow_backlog entry a execution/wow-backlog.md
  4. Self-critique: cosa farei meglio next iteration (3 punti minimo)

Generato: 2026-05-16 sab evening · Claude Opus 4.7 · session kit pre-build Founder authorization: explicit autonomy "procedi al meglio che credi" per la creazione di questo kit · commit/push ancora gated