@topy-ai/maggie 0.7.47 → 0.7.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README-zh-TW.md +2 -2
  2. package/README.md +49 -15
  3. package/bin/maggie.js +6 -2
  4. package/bundled-contracts/maggie-design/palette-roles-v1.schema.json +47 -0
  5. package/bundled-contracts/maggie-marketplace/template-content-v1.schema.json +103 -0
  6. package/bundled-contracts/maggiedash/booking-browser-evidence-v1.json +21 -0
  7. package/bundled-contracts/maggiedash/booking-browser-evidence-v2.json +191 -0
  8. package/bundled-contracts/maggiedash/booking-email-templates-v1.json +3 -1
  9. package/bundled-contracts/maggiedash/booking-voucher-lifecycle-v1.json +85 -0
  10. package/bundled-contracts/maggiedash/execution-board.json +4629 -1553
  11. package/bundled-contracts/maggiedash/stripe-booking-capabilities-v1.json +1 -0
  12. package/bundled-marketplace/README.md +17 -0
  13. package/bundled-marketplace/catalog.json +56 -7
  14. package/bundled-references/browser-inspection.md +25 -0
  15. package/bundled-references/maggiedash-booking/CURRENT-STATE.md +128 -10
  16. package/bundled-references/maggiedash-booking/EXECUTION-BOARD.json +4629 -1553
  17. package/bundled-references/maggiedash-booking/HOST-ADAPTER.md +5 -0
  18. package/bundled-references/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md +64 -21
  19. package/bundled-references/maggiedash-booking/PRD.md +9 -1
  20. package/bundled-references/maggiedash-booking/PROGRESS.md +244 -2399
  21. package/bundled-references/maggiedash-booking/QA-TEST-PLAN.md +37 -6
  22. package/bundled-references/maggiedash-booking/README.md +23 -6
  23. package/bundled-references/maggiedash-booking/RUNTIME-OPERATIONS.md +64 -8
  24. package/bundled-references/maggiedash-booking/SKILLS-AND-CLI.md +11 -2
  25. package/bundled-references/maggiedash-booking/STRIPE-INTEGRATION.md +66 -2
  26. package/bundled-references/maggiedash-booking/TASK-RUNBOOK.md +1 -1
  27. package/bundled-references/maggiedash-booking/TASKS.md +44 -3
  28. package/bundled-references/maggiedash-booking/VOUCHERS.md +47 -0
  29. package/bundled-references/provider-adapter-contract.md +33 -0
  30. package/bundled-skills/maggie-booking/SKILL.md +8 -0
  31. package/bundled-skills/maggie-clone-to-template/SKILL.md +26 -0
  32. package/bundled-skills/maggie-deployment/SKILL.md +53 -1
  33. package/bundled-skills/maggie-deployment/references/vps.md +41 -0
  34. package/bundled-skills/maggie-design/SKILL.md +99 -0
  35. package/bundled-skills/maggie-feedback/SKILL.md +38 -1
  36. package/bundled-skills/maggie-marketplace/SKILL.md +91 -0
  37. package/bundled-skills/maggie-qa-workflow/SKILL.md +41 -1
  38. package/bundled-skills/maggie-service-booking/SKILL.md +23 -0
  39. package/bundled-skills/maggie-social-share/SKILL.md +37 -5
  40. package/bundled-skills/maggie-social-share/references/queue-and-connections.md +101 -0
  41. package/bundled-skills/maggie-template/SKILL.md +57 -3
  42. package/bundled-skills/maggie-template/references/template-content-v1.example.json +34 -0
  43. package/bundled-tools/clis/maggie_booking.py +199 -26
  44. package/bundled-tools/clis/maggie_booking_vouchers.py +185 -0
  45. package/bundled-tools/clis/maggie_clone_to_template.py +14 -0
  46. package/bundled-tools/clis/maggie_deployment.py +249 -1
  47. package/bundled-tools/clis/maggie_design.py +9 -0
  48. package/bundled-tools/clis/maggie_design_lint.py +277 -0
  49. package/bundled-tools/clis/maggie_feedback.py +106 -3
  50. package/bundled-tools/clis/maggie_marketplace.py +199 -5
  51. package/bundled-tools/clis/maggie_palette.py +280 -0
  52. package/bundled-tools/clis/maggie_qa_workflow.py +156 -1
  53. package/bundled-tools/clis/maggie_social_queue.py +338 -0
  54. package/bundled-tools/clis/maggie_social_share.py +42 -9
  55. package/bundled-tools/clis/maggie_template_package.py +1141 -0
  56. package/package.json +1 -1
  57. package/references/browser-inspection.md +25 -0
  58. package/references/provider-adapter-contract.md +33 -0
@@ -30,6 +30,7 @@
30
30
  ],
31
31
  "x-webhook-events": [
32
32
  { "eventType": "checkout.session.completed", "requiredFor": "hosted checkout completion", "officialDocs": ["https://docs.stripe.com/api/events/types"] },
33
+ { "eventType": "checkout.session.expired", "requiredFor": "release an unpaid pending booking when its hosted Checkout expires", "officialDocs": ["https://docs.stripe.com/api/events/types"] },
33
34
  { "eventType": "checkout.session.async_payment_succeeded", "requiredFor": "delayed payment completion", "officialDocs": ["https://docs.stripe.com/api/events/types"] },
34
35
  { "eventType": "checkout.session.async_payment_failed", "requiredFor": "delayed payment failure", "officialDocs": ["https://docs.stripe.com/api/events/types"] },
35
36
  { "eventType": "payment_intent.processing", "requiredFor": "payment pending", "officialDocs": ["https://docs.stripe.com/api/events/types"] },
@@ -15,3 +15,20 @@ complete:
15
15
 
16
16
  - Template: `medical-spa-landing-001`
17
17
  - Region: United Kingdom
18
+
19
+ ## Package quality
20
+
21
+ Every entry carries a neutral `displayName`/`displayDescription` for
22
+ customer-facing pickers, measured `designTokens`, a `screenshotReview`, and a
23
+ `generated-asset-manifest.json` that lists every file under `assets/` with its
24
+ provenance. Run the read-only gate with:
25
+
26
+ ```bash
27
+ python3 tools/clis/maggie_marketplace.py audit-package <template-id>
28
+ ```
29
+
30
+ Current known gaps (2026-10-10): `medical-spa-landing-001` screenshots are
31
+ corrupt (PNG CRC failures) and must be recaptured; captured source images in
32
+ `reflexolog-spa-7-001`, `stillpoint2-001`, and `thai-massage-49-001` are listed
33
+ as `captured-source` with `reuse: false` and must be replaced before
34
+ publishing; no entry has a recorded generated-image text review yet.
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "version": "1.0",
3
- "updatedAt": "2026-09-03T09:37:16.124426+00:00",
3
+ "updatedAt": "2026-10-10T01:45:35.149462+00:00",
4
4
  "templates": [
5
5
  {
6
6
  "id": "atma-wellness-15-001",
7
7
  "name": "Atma Wellness 15 001",
8
+ "displayName": "Sandstone Retreat",
9
+ "displayDescription": "A warm stone-toned wellness homepage with khaki accents and calm, airy sections.",
8
10
  "status": "draft",
9
11
  "framework": "astro",
10
12
  "industry": [
@@ -41,6 +43,8 @@
41
43
  {
42
44
  "id": "beauty-studio-20-001",
43
45
  "name": "Beauty Studio 20 001",
46
+ "displayName": "Olive Atelier",
47
+ "displayDescription": "A light editorial beauty homepage with Cormorant Garamond display type and olive accents.",
44
48
  "status": "draft",
45
49
  "framework": "astro",
46
50
  "industry": [
@@ -50,7 +54,11 @@
50
54
  "homepage",
51
55
  "landing-page"
52
56
  ],
53
- "styleTags": [],
57
+ "styleTags": [
58
+ "light-canvas",
59
+ "serif-display",
60
+ "warm-neutral"
61
+ ],
54
62
  "source": {
55
63
  "provider": "internal",
56
64
  "templateUrl": "https://www.aura.build/templates/beauty-studio-20",
@@ -71,6 +79,8 @@
71
79
  {
72
80
  "id": "gold-pearl-resort-oyugis-k-001",
73
81
  "name": "Gold Pearl Resort Oyugis K 001",
82
+ "displayName": "Monochrome Resort",
83
+ "displayDescription": "A crisp black-and-white resort homepage with Playfair Display headings and photo-led sections.",
74
84
  "status": "draft",
75
85
  "framework": "astro",
76
86
  "industry": [
@@ -107,6 +117,8 @@
107
117
  {
108
118
  "id": "korean-head-spa-52-001",
109
119
  "name": "Korean Head Spa 52 001",
120
+ "displayName": "Cocoa Ivory",
121
+ "displayDescription": "A soft ivory spa homepage with deep cocoa text, a dark hero and generous whitespace.",
110
122
  "status": "draft",
111
123
  "framework": "astro",
112
124
  "industry": [
@@ -116,7 +128,11 @@
116
128
  "homepage",
117
129
  "landing-page"
118
130
  ],
119
- "styleTags": [],
131
+ "styleTags": [
132
+ "light-canvas",
133
+ "sans-display",
134
+ "neutral"
135
+ ],
120
136
  "source": {
121
137
  "provider": "internal",
122
138
  "templateUrl": "https://www.aura.build/templates/korean-head-spa-52",
@@ -137,6 +153,8 @@
137
153
  {
138
154
  "id": "lillies-spa-beauty-salon-001",
139
155
  "name": "Maggie Studio Beauty Salon 001",
156
+ "displayName": "Midnight Slate",
157
+ "displayDescription": "A dark slate beauty homepage with Cinzel capitals and a deep blue hero.",
140
158
  "status": "draft",
141
159
  "framework": "astro",
142
160
  "industry": [
@@ -173,6 +191,8 @@
173
191
  {
174
192
  "id": "luxury-medspa-27-001",
175
193
  "name": "Luxury Medspa 27 001",
194
+ "displayName": "Teal Clinic",
195
+ "displayDescription": "A clean clinical spa homepage with IBM Plex Sans type and teal accents.",
176
196
  "status": "draft",
177
197
  "framework": "astro",
178
198
  "industry": [
@@ -209,6 +229,8 @@
209
229
  {
210
230
  "id": "maggie-card-restoration-001",
211
231
  "name": "Maggie Studio Card Restoration",
232
+ "displayName": "Gilded Workshop",
233
+ "displayDescription": "An ivory and charcoal service homepage with gold accents and before-and-after showcases.",
212
234
  "status": "draft",
213
235
  "framework": "astro",
214
236
  "industry": [
@@ -246,6 +268,8 @@
246
268
  {
247
269
  "id": "medical-spa-landing-001",
248
270
  "name": "Medical Spa Landing 001",
271
+ "displayName": "Champagne Clinic",
272
+ "displayDescription": "A bright clinical landing page with charcoal type and champagne-gold accents.",
249
273
  "status": "draft",
250
274
  "framework": "astro",
251
275
  "industry": [
@@ -266,7 +290,8 @@
266
290
  "provider": "internal",
267
291
  "region": "United Kingdom",
268
292
  "capturedAt": "2026-08-29T02:12:25.279793+00:00",
269
- "captureInput": "local-export"
293
+ "captureInput": "local-export",
294
+ "captureFile": "Medical Aesthetics & Wellness Landing Page Template.html"
270
295
  },
271
296
  "supports": {
272
297
  "blog": true,
@@ -280,6 +305,8 @@
280
305
  {
281
306
  "id": "reflexolog-spa-7-001",
282
307
  "name": "Reflexolog Spa 7 001",
308
+ "displayName": "Pebble Serenity",
309
+ "displayDescription": "A pale stone spa homepage with Playfair Display body copy and quiet neutral tones.",
283
310
  "status": "draft",
284
311
  "framework": "astro",
285
312
  "industry": [
@@ -289,7 +316,11 @@
289
316
  "homepage",
290
317
  "landing-page"
291
318
  ],
292
- "styleTags": [],
319
+ "styleTags": [
320
+ "light-canvas",
321
+ "sans-display",
322
+ "neutral"
323
+ ],
293
324
  "source": {
294
325
  "provider": "internal",
295
326
  "templateUrl": "https://www.aura.build/templates/reflexolog-spa-7",
@@ -310,6 +341,8 @@
310
341
  {
311
342
  "id": "spa-wellness-1227-001",
312
343
  "name": "Spa Wellness 1227 001",
344
+ "displayName": "Warm Sand Spa",
345
+ "displayDescription": "A sand-toned spa homepage with Montserrat headings and soft clay accents.",
313
346
  "status": "draft",
314
347
  "framework": "astro",
315
348
  "industry": [
@@ -346,6 +379,8 @@
346
379
  {
347
380
  "id": "stillpoint2-001",
348
381
  "name": "Stillpoint2 001",
382
+ "displayName": "Gallery White",
383
+ "displayDescription": "A minimal white homepage with black type and large photographic panels.",
349
384
  "status": "draft",
350
385
  "framework": "astro",
351
386
  "industry": [
@@ -382,6 +417,8 @@
382
417
  {
383
418
  "id": "thai-massage-49-001",
384
419
  "name": "Thai Massage 49 001",
420
+ "displayName": "Gold Leaf Massage",
421
+ "displayDescription": "A light massage homepage with Lato type, dark brown text and gold accents.",
385
422
  "status": "draft",
386
423
  "framework": "astro",
387
424
  "industry": [
@@ -391,7 +428,11 @@
391
428
  "homepage",
392
429
  "landing-page"
393
430
  ],
394
- "styleTags": [],
431
+ "styleTags": [
432
+ "light-canvas",
433
+ "sans-display",
434
+ "neutral"
435
+ ],
395
436
  "source": {
396
437
  "provider": "internal",
397
438
  "templateUrl": "https://www.aura.build/templates/thai-massage-49",
@@ -412,6 +453,8 @@
412
453
  {
413
454
  "id": "wellness-booking-72-001",
414
455
  "name": "Wellness Booking 72 001",
456
+ "displayName": "Fern Directory",
457
+ "displayDescription": "A cream wellness booking homepage with a search-led hero and fern-green accents.",
415
458
  "status": "draft",
416
459
  "framework": "astro",
417
460
  "industry": [
@@ -422,7 +465,11 @@
422
465
  "homepage",
423
466
  "landing-page"
424
467
  ],
425
- "styleTags": [],
468
+ "styleTags": [
469
+ "light-canvas",
470
+ "sans-display",
471
+ "warm-neutral"
472
+ ],
426
473
  "source": {
427
474
  "provider": "internal",
428
475
  "templateUrl": "https://www.aura.build/templates/wellness-booking-72",
@@ -443,6 +490,8 @@
443
490
  {
444
491
  "id": "wellness-float-11-001",
445
492
  "name": "Wellness Float 11 001",
493
+ "displayName": "Still Water",
494
+ "displayDescription": "A near-white minimal wellness homepage with charcoal type and restrained detail.",
446
495
  "status": "draft",
447
496
  "framework": "astro",
448
497
  "industry": [
@@ -75,3 +75,28 @@ appearance. For every stateful component capture state A and state B and
75
75
  record the trigger and transition. Keep screenshots and extracted data under
76
76
  the target's namespaced research root so multiple URLs cannot overwrite one
77
77
  another.
78
+
79
+ ## Network interception and write safety
80
+
81
+ Any skill that drives a browser against a running app (QA, clone, design
82
+ review) must assume the app may talk to a real API. A local development build
83
+ is often configured with the production API base URL, so a click in local QA
84
+ can change live accounts.
85
+
86
+ - Do not rely on page-level stubs such as overriding `window.fetch` from the
87
+ console or an injected script. Bundled API clients usually capture `fetch`
88
+ at module load, use `XMLHttpRequest`, or run in a service worker, so the
89
+ override never sees their requests.
90
+ - Intercept at the network layer instead: Playwright `page.route()` /
91
+ `context.route()`, Puppeteer request interception, or CDP `Fetch.enable`.
92
+ Deny by default every non-GET request to a production origin and let only
93
+ explicitly listed reads through.
94
+ - Verify the interception before any write flow: trigger one harmless request
95
+ and confirm in the browser's network log that it was intercepted, not sent.
96
+ - Without network-layer interception, run write flows only against a
97
+ non-production API, or after the user gives explicit consent naming the
98
+ account and the data that will change. Record a backup or restore path first.
99
+
100
+ `maggie qa start --api-base URL --production-api URL` records the API target.
101
+ Scenarios marked `"mutates": true` are blocked against a production API unless
102
+ `--allow-production-writes` is given. See the `maggie-qa-workflow` skill.
@@ -1,6 +1,6 @@
1
1
  # MaggieDash Booking current state and gaps
2
2
 
3
- Status: current snapshot, 2026-09-21
3
+ Status: current snapshot, 2026-09-29
4
4
 
5
5
  This is the canonical status document for the Booking implementation. The
6
6
  append-only [`PROGRESS.md`](./PROGRESS.md) keeps historical counts and decisions
@@ -11,14 +11,39 @@ current contract.
11
11
 
12
12
  | Surface | Current state | Authoritative evidence |
13
13
  |---|---|---|
14
- | MaggieDash source | Package `0.2.9`, with host capability, site-structure, and treatment-group contracts; the working tree contains the current Booking release changes | `/home/balalior/Dev/MaggieDash/package.json`, `maggiedash.json`, `git status` |
14
+ | MaggieDash source | Package `0.2.11`, with the current Booking source, ten-event email-template contract, unknown-template outbox hold, and voucher lifecycle contract | `/home/balalior/Dev/MaggieDash/package.json`, `contracts/booking-email-templates-v1.json` |
15
15
  | Manager host contract | 47 endpoint IDs, email/password session, server-side role/capability checks | `MaggieDash/contracts/booking-host-adapter-v1.json` |
16
+ | Manager appointment time handling | Calendar, overview, booking list/detail, waitlist, and dated schedule rules display in venue time. Booking create/reschedule/waitlist conversion and shift/time-off/closure datetime inputs convert in the selected location zone; DST gaps reject, repeated times expose fold choices, and dated schedule intervals are ordered by UTC instant. Local regressions, ORA build, and source parity pass. | BK-141 in [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), venue-time and UI validators, ORA build |
17
+ | Manager Booking route hydration and draft form | Bookings query/page/new state renders deterministically during SSR and applies URL state after mount; a shared URL-state helper normalizes malformed pages to page 1 and has canonical/ORA tests against the same implementation. The New booking form's dirty state is declared and passed through the modal guard; local Chrome verified the direct `?new=1` route, venue-zone Calendar, pristine open/close, dirty-draft confirm/keep/discard behavior, and `?page=abc` without a visible error. Local HTTP is supplemental only; authenticated HTTPS host evidence remains missing. | MaggieDash `booking/src/booking-url-state.mjs`, `scripts/validate-booking-url-state.mjs`, `scripts/validate-booking-ui.mjs`; ORA `_maggie/booking/booking-url-state.mjs`, `maggiedash/scripts/validate-booking-url-state.mjs`, UI mirror validator, ORA `.maggie/qa-runs/bk031-local-bookings-followup-2026-09-29/summary.json`; BK-031 local Chrome follow-up in [`PROGRESS.md`](./PROGRESS.md) |
18
+ | Local staging cleanup safety | Staging entrypoints reject production URL aliases by normalized PostgreSQL target; count-only audit confirms zero synthetic rows while retaining the seeded house and Stripe test configuration. | ORA `scripts/booking-staging-safety.mjs`, `scripts/booking-staging-audit.mjs`; BK-030 remains `needs-evidence` for host operations proof |
16
19
  | Public customer contract | 11 endpoint IDs, separate noindex/no-store boundary and token policy | `MaggieDash/contracts/booking-customer-surface-v1.json` |
17
20
  | Booking access contract | 4 administrator-only access endpoints, staff/manager/finance roles and granular permissions | `MaggieDash/contracts/booking-access-v1.json` |
18
21
  | Resend template contract | 10 tenant-scoped events, allowlisted variables, preview/publish/rollback and server-only recipient/provider data | `MaggieDash/contracts/booking-email-templates-v1.json` |
19
- | Browser evidence contract | 15 manager routes × 3 viewports = 45 screens | `MaggieDash/contracts/booking-browser-evidence-v1.json` |
20
- | Execution board | 87 tasks: 84 `passed`, 3 `needs-evidence` (`BK-030`, `BK-031`, `BK-032`) | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json) |
21
- | Local regression | AI-CMO Python suite: 364 tests passed; MaggieDash `npm test`, ORA contract checks, and ORA Astro build passed | recorded in the current verification output and [`PROGRESS.md`](./PROGRESS.md) |
22
+ | Browser evidence contract | v2 covers 17 manager routes × 3 viewports = 51 screens; every screen reports its final pathname and expected primary heading. Capture records HTTP responses >= 400 and network request failures without URL paths/query strings or raw console/exception text. Runtime/browser CLI errors preserve only allowlisted target codes or a generic capture code. CI uploads only browser evidence JSON and screenshots, excluding protected browser storage state. | `MaggieDash/contracts/booking-browser-evidence-v2.json`, `MaggieDash/scripts/booking-browser-evidence.mjs`, evidence workflow regressions |
23
+ | Execution board | 125 tasks: 122 `passed` and 3 `needs-evidence` (`BK-030`, `BK-031`, `BK-032`) | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json) |
24
+ | Read-only release gate | All 16 static source/contract checks pass. Runtime, authenticated HTTPS browser, and ops evidence are still missing for BK-030/031/032, so the release gate remains `blocked`. No migration, booking, payment, or deployment operation was performed. | `maggie booking release-gate --project /home/balalior/Dev/clients/orawellness.uk --board docs/maggiedash-booking/EXECUTION-BOARD.json` |
25
+ | Ops evidence validation | The canonical JavaScript validator and both Python CLI copies require valid UTC timestamps ending in `Z`, nonblank identity labels, host environment allowlist compliance, and chronological backup/restore/report times. Non-object roots are rejected by direct validators; the CLI input loader reports a bounded `BOOKING_CHECK_FAILED`, and `release-gate` returns structured `blocked` output. Host alert delivery and recovery evidence are still pending. | `tools/clis/maggie_booking.py`, ORA `tools/clis/maggie_booking.py`, `tools/tests/test_maggie_booking.py` |
26
+ | Worker freshness reporting | Successful PostgreSQL writes return the committed last-success timestamp. Generic adapter, Astro, and ORA workers feed that value into the current health report; generic adapter dry-runs report stale stored time, successful writes clear stale alerts, and structured errors retain the prior timestamp. | `backend/booking/postgres-worker-repository.mjs`, `backend/booking/run-booking-jobs.mjs`, host worker scripts, `scripts/validate-booking-health.mjs` |
27
+ | Customer mutation authorization | BK-138 requires a valid `manage` token scoped to the target booking for cancel/reschedule, and validates purpose, expiry, revocation, and booking association before any idempotency replay. BK-139 brings the MaggieDash reference host into parity: checkout separates the 60-minute payment token from the 30-day manage token, and mutation replay validates manage authorization first. BK-140 synchronized those fixtures into ORA's manifest-projected source. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), canonical and ORA PostgreSQL customer-adapter validators, reference-host journey |
28
+ | Package payment-return expiry | BK-140 keeps reference-host behavior aligned with PostgreSQL: package-return tokens require a finite future expiry before purchase lookup. The canonical/ORA fixture journey covers valid, revoked, expired, malformed-expiry, and unknown tokens. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), canonical and ORA reference-host validators |
29
+ | Closed-gate customer page | BK-137 removes the raw query-token page exception. While closed, the Astro page renders only for one validated, unexpired, unrevoked booking payment/manage token or package purchase token; malformed, ambiguous, and unknown tokens fail closed. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), adapter and host route validators |
30
+ | Closed-gate reschedule availability | BK-136 removes the raw query-token exception. When public booking is closed, the host only permits availability continuation after validating a bearer manage token; the adapter checks purpose, expiry, revocation, booking association, and lifecycle. The customer UI sends the token in `Authorization`, not the URL. Canonical and ORA validators cover forged/missing/wrong-purpose/expired/revoked/terminal tokens. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), gate, adapter, and UI validators |
31
+ | Paid package fulfillment | BK-134 preserves fulfillment after a successful Checkout even if new sales were disabled. BK-135 retries idempotent settlement on duplicate webhook deliveries, marks package events processed only after fulfillment, and propagates failures so Stripe can retry. Canonical and ORA runtime/host checks cover both behaviors. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), runtime and host validators |
32
+ | Async Checkout webhook reference | BK-133 normalizes supported `checkout.session.*` events with the PaymentIntent reference when present, so immediate refund operations do not receive a Checkout Session ID as `payment_intent`; the Session ID remains the fallback. Canonical and ORA runtime validators cover async success/failure. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), runtime validators |
33
+ | Checkout Session lifecycle | BK-132 creates Checkout Sessions with a 31-minute expiry and reconciles `cs_` IDs via the Checkout API: open remains pending, paid succeeds and upgrades to the PaymentIntent reference, and expired becomes cancelled. This matches ORA source behavior; local validator evidence only. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), Stripe adapter validator |
34
+ | Hosted customer Checkout flow | BK-131 carries hosted intent from public booking checkout through the payment repository into Stripe, where it selects Checkout Session. Validators cover each seam and hosted/non-hosted intent is part of idempotency identity. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), customer/payment/Stripe validators |
35
+ | Reconciliation provider-reference persistence | BK-130 persists a refreshed `providerPaymentRef` returned by payment reconciliation for both payment attempts and package purchases, preserving existing values when the provider omits one. The PostgreSQL payment-adapter regression verifies the returned attempt carries the refreshed reference. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), payment-adapter validator |
36
+ | Package-purchase repository seam | BK-129 routes manager purchase listing through the composed payment repository, outside the PostgreSQL core-only transaction callback; a service regression asserts routing and DTO redaction. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), Booking service validator |
37
+ | ORA availability follow-up | BK-124 closes a source gap: persisted manager location closures now feed the same planner used by public availability and customer holds. Pure and PostgreSQL-adapter regressions cover overlap, exact edges, tenant/location scope, and date bounds. Local source evidence only; production remains unreconciled. | ORA `docs/booking-v27-tasks.md` and `maggiedash/backend/booking/host-availability.mjs` |
38
+ | Dated staff shift follow-up | BK-125 applies dated staff shifts in public availability and hold revalidation as additional constraints on recurring venue/staff hours. Dates without shifts preserve the existing fallback. Pure and customer-adapter regressions plus the ORA build pass; production remains unreconciled. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), ORA Booking runtime |
39
+ | Manager booking schedule follow-up | BK-126 is implemented in ORA and canonical MaggieDash. Direct manager creation and waitlist conversion use the shared planner; canonical tests, a fresh local-source install, and the PostgreSQL 16 disposable integration confirm the implementation and pre-write schedule guards. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), MaggieDash source and installer projection |
40
+ | Reschedule schedule follow-up | BK-127 is implemented in ORA and canonical MaggieDash. Proposed segments are checked against configured schedules while excluding the booking's prior allocations; canonical tests, install projection, and PostgreSQL 16 disposable integration pass. | [`EXECUTION-BOARD.json`](./EXECUTION-BOARD.json), MaggieDash source and installer projection |
41
+ | Local regression | MaggieDash `npm test` and all 439 AI-CMO Python tests passed; fresh CLI source install/inspect and installed worker validators passed; ORA customer/core/worker PostgreSQL staging integrations, six-job non-dispatch worker preview with versioned health output and error redaction, 234-file Astro check/build, and BK-116 tests passed. BK-030's disposable PostgreSQL 16 worker cycle asserts the accepted Resend `providerRef` persists to `maggiedash_booking_notifications.provider_ref`; a new local-only backup/restore rehearsal restored a synthetic confirmed booking and its location/service dependencies into an empty PostgreSQL 16 target, with all six monitored table counts matching (evidence in ORA local evidence folder). BK-128's new disposable PostgreSQL 16 worker cycle also confirms `checkout.session.expired` cancels the unpaid attempt and booking, processes the webhook, and releases its reserved allocation. BK-135's canonical and ORA runtime regressions verify duplicate package webhooks retry settlement and propagate failures. BK-136 canonical/ORA gate, customer-adapter, UI, host contract, `npm test`, and Astro check/build regressions prove raw query tokens cannot bypass the public exposure gate and valid reschedule authorization uses a bearer header. BK-137 canonical/ORA page-continuation adapter, route, and contract checks prove the closed-gate customer page validates a single booking or package token before rendering. BK-138 canonical/ORA customer-adapter regressions verify manage-purpose, expiry, revocation, and booking binding before cancel/reschedule idempotency replays. BK-139 aligns the canonical fixture host with separate 60-minute payment and 30-day manage tokens and validates purpose, expiry, revocation, and booking scope before mutation replays; the full MaggieDash suite passes. BK-140 adds expiry checks to package-return tokens in both reference-host copies; canonical and ORA customer journeys reject expired and malformed expiries while preserving valid pending returns. Canonical and ORA runtime/Stripe/contract checks and the 124-task board validator pass. The BK-126/127 core integration also passed all 23 checks on disposable PostgreSQL 16, including schedule-eligible manager creation and pre-write rejection of shift/closure/waitlist/reschedule cases. BK-030 now persists the last successful write cycle per tenant and supplies it to `worker.stale`; canonical and staging PostgreSQL integrations passed with the status table. The additive schema is applied to ORA staging; a fresh six-job preview passed healthy with zero alerts/no dispatch, and the real staging integration proved last-success persistence in an isolated tenant then verified its cleanup. The approved cleanup then removed all synthetic staging customers/bookings/holds/payment attempts/notifications/events and the temporary owner; staging now has zero owners and zero customer/booking/payment rows, with first-owner registration open. Stripe test connection was refreshed in Chrome and remains degraded (`charges_enabled=false`, `payouts_enabled=false`); the prior £128 test payment was refunded and four unpaid sessions expired. Production migration and host evidence remain open. | [`PROGRESS.md`](./PROGRESS.md), ORA `.maggie/evidence/booking-v27/local-postgres-backup-restore-2026-09-29.json`, staging cleanup, worker preview/integration evidence |
42
+ | ORA Stripe test account identity | Read-only Chrome dashboard confirms the configured API account is `APHRODITE FASHION LIMITED sandbox` in Test mode; Stripe API reports charges and payouts disabled. The client has not confirmed it as ORA's intended test account. | [`PROGRESS.md`](./PROGRESS.md); ORA client questions at `clients/orawellness.uk/docs/client-questions-v27.md` in the workspace |
43
+ | ORA production worker schedule | Read-only VPS systemd inspection confirms the one-minute Booking worker timer is enabled and its service runs with `--write --confirm`; the last observed process exit was successful. Local source now acquires the tenant lock before state reads and treats contention as a skipped warning cycle; this is unreleased and does not establish deployed behavior. It may dispatch queued notifications. Provider activity, alerts, and booking backup/recovery have not been verified. | [`PROGRESS.md`](./PROGRESS.md), ORA `.maggie/evidence/booking-v27/production-worker-schedule-readonly-2026-09-28.json` |
44
+ | ORA local responsive manager QA | Local Chrome v2 route/heading/layout checks now pass 51/51 screens across 17 manager routes and three viewport overrides, with zero captured console errors and no horizontal document overflow. The browser control surface did not expose failed request events; screenshot bitmap dimensions vary by route and do not form canonical release captures. The temporary owner is removed, staging has zero owners and booking/customer/payment rows, and first-owner registration is open. This local run does not satisfy the HTTPS real-host 47-endpoint BK-031 gate. | [`PROGRESS.md`](./PROGRESS.md), ORA `.maggie/qa-runs/bk031-local-v2-2026-09-29/summary.json` |
45
+ | ORA local staging Checkout | Verified the Stripe test connection in the authenticated manager UI; API acceptance passed 9/9; Chrome completed a £128 hosted test payment and rendered the confirmed customer return. No worker was running and no email was sent. This used the public hold/Checkout API to create the test session; the public date picker was not verified end-to-end in that pass. The payment has since been fully refunded, four unpaid sessions expired, and the synthetic staging records and temporary owner were removed. | [`PROGRESS.md`](./PROGRESS.md), ORA `.maggie/evidence/booking-v27/staging-cleanup-and-owner-qa-2026-09-29.json` |
46
+ | Production manager browser spot check | A prior read-only Chrome observation showed the production Booking manager dashboard. The current Chrome control has no open tabs; no cookies, customer details, or API payloads were inspected. This historical spot check does not satisfy BK-031's dedicated tenant, 47 endpoint, or current 51-screen evidence requirements. | [`PROGRESS.md`](./PROGRESS.md) |
22
47
 
23
48
  ## What is implemented locally
24
49
 
@@ -39,20 +64,113 @@ current contract.
39
64
  - PostgreSQL repository seams, schema/preflight tooling, worker scheduling
40
65
  artifacts, reference-host validators, runtime/browser/ops evidence contracts,
41
66
  and the ai-cmo-skills installer/inspect/release gates.
67
+ - Customer payment-return reconciliation now projects terminal provider state
68
+ onto the booking itself and re-reads it before returning the public response.
69
+ The ORA and generic Astro hosts queue idempotent confirmation or cancellation
70
+ notifications only for matching terminal provider/booking state. Repeated
71
+ return reads remain idempotent; queued notifications do not imply that a mail
72
+ worker has delivered the message.
73
+ - A verified payment return hands the customer page its long-lived manage token;
74
+ the page replaces the short-lived return token in the URL for history,
75
+ cancellation, and rescheduling. Public DTOs expose allowlisted guest and
76
+ segment-pricing details, while ORA holds store only the suitability-cleared
77
+ marker. BK-115 source, staging, install, and build evidence is in
78
+ [`PROGRESS.md`](./PROGRESS.md).
79
+ - The generic PostgreSQL customer adapter enforces variant
80
+ `metadata.rules.firstVisitOnly` and `standaloneOnly` server-side when creating
81
+ a hold, and rechecks first-visit eligibility before checkout conversion.
82
+ The core repository repeats that check in the booking transaction and
83
+ serializes conversions by tenant plus normalized email. Cancelled and expired
84
+ booking history does not consume the first-visit offer.
85
+ - Generic per-person pricing is now in the MaggieDash source candidate.
86
+ Variants can declare `metadata.pricing` with a mode and guest limits; the
87
+ public catalogue exposes only those safe fields, the customer page collects
88
+ party size and estimates totals, and PostgreSQL recalculates prices from
89
+ catalogue unit prices during hold creation and booking conversion. Booking
90
+ and segment metadata retain guest counts and unit prices. The current local
91
+ source manifest install passes byte parity; registry release parity remains
92
+ open.
93
+ - Generic suitability gating is now in the MaggieDash source candidate.
94
+ Variants may require a yes/no answer and expose bounded question/contact
95
+ copy. The customer adapter and core hold/conversion path refuse a positive
96
+ answer and require a negative answer. Holds persist only a passed-check
97
+ marker, not the health answer. Full local validators and the isolated ORA
98
+ staging PostgreSQL integration passed; current local source install parity
99
+ passed, while registry release parity remains open.
100
+ - The PostgreSQL core now auto-assigns public holds to a mapped free staff
101
+ member/resource when the request does not name one. Candidate selection
102
+ excludes overlapping reserved allocations plus variant buffers and locks
103
+ the chosen row inside the hold transaction. ORA staging integration with
104
+ two staff/resources verified fallback to the second free pair; current local
105
+ source install parity passed, while registry release parity remains open.
106
+ - Public exposure now has a provider-neutral host policy module. A host supplies
107
+ location/catalogue/capacity/schedule/live-payment readiness, while the shared
108
+ gate handles test overrides, short caching, fail-closed behavior, and the
109
+ classification of new-booking routes versus customer continuations. The Astro
110
+ scaffold gates its customer page and public API boundary. The ai-cmo-skills
111
+ CLI installed the current checkout into a disposable Astro project with
112
+ byte-for-byte parity across all 202 manifest-projected admin, runtime,
113
+ workspace, and Astro host files; its installed gate validator passed. Gate
114
+ tests directly verify deny/allow behavior for new-booking routes, preserve
115
+ continuation access, and fail closed on readiness errors. Published release
116
+ and production-host parity remain pending.
117
+ - ORA's local public availability adapter now uses the same host schedule
118
+ planner as customer holds, including location hours, staff/resource capacity,
119
+ and the online-booking service flag. Its focused adapter regression, ORA
120
+ availability/rules suites, public-route gate, contract check, and 233-file
121
+ build passed. A read-only staging API recheck returned assessment starts
122
+ 17:45–20:15 local, ending by 20:50 before the 21:00 close. The production
123
+ browser finding remains unresolved on the live host; this host-specific
124
+ correction is not deployment evidence.
125
+ - The manager Overview now shows the host-provided Stripe API, webhook, charges,
126
+ and payouts checks. When the account is reachable but `charges_enabled` is
127
+ false, the setup checklist explains that it cannot accept payments and keeps
128
+ the connection degraded. Check labels/status values are allowlisted and
129
+ provider secrets are never copied into the UI summary.
130
+ - Stripe `onlinePayment` is now derived from a verified credential plus
131
+ `charges_enabled=true`; first-run bootstrap no longer treats credential
132
+ presence as payment readiness. Off-session charges follow the same gate, and
133
+ the generic Astro host and ORA mirror use the same tested helper.
134
+ - The PostgreSQL manager repository also requires the stored capability to be
135
+ explicitly `true` before Overview or payment-health reports online payments
136
+ enabled. Missing settings and explicit `false` both remain disabled in
137
+ MaggieDash and ORA regression coverage.
138
+ - Worker PostgreSQL state reads now run sequentially on the injected host
139
+ client, avoiding concurrent `client.query()` calls. Runtime preview mode
140
+ reports queued notifications as `previewed` and never calls the external
141
+ notification dispatcher; both behaviors have MaggieDash and ORA regressions.
142
+ - The shared provider-neutral payment starter and reference host now follow the
143
+ same strict boolean rule. Missing values and truthy strings/numbers cannot
144
+ report payment readiness or start a payment.
145
+ - The generic Stripe adapter defaults payment, refunds, off-session charges,
146
+ and webhook verification to disabled. The Astro host enables these gateway
147
+ flags only when the active secret fingerprint and configured account scope
148
+ match the verified payment-account record and its stored capability is true.
149
+ Missing verification data, secret rotation, and account mismatch fail closed.
150
+ - The latest `maggiedash.json` source manifest was installed through the
151
+ canonical ai-cmo-skills CLI into a blank disposable Astro project. All 207
152
+ projected files matched byte-for-byte; CLI inspect and the installed payment
153
+ gateway, reference-host, and PostgreSQL core validators passed. This proves
154
+ local source install parity, not registry-published or production-host parity.
42
155
 
43
156
  “Implemented locally” means source, contract, fixture, and local/reference-host
44
157
  evidence exist. It does not mean a production tenant has been migrated or that
45
158
  provider delivery has been proven on the live host.
46
159
 
160
+ The confirmed-booking template also allows the host-provided `arrivalNote`
161
+ variable; the fallback renderer escapes it before inserting it into HTML.
162
+
47
163
  ## Open gaps
48
164
 
49
165
  | Priority | Gap | Current evidence | Exit evidence |
50
166
  |---|---|---|---|
51
- | P0 | ORA Booking schema and access tables are not installed in the configured database | Read-only schema check reported `needs-migration`; core exists, Booking/access tables do not | Owner-approved backup/restore rehearsal, then `node scripts/maggie-booking-schema.mjs --apply --confirm` and a post-migration check |
52
- | P0 | Stripe test account is not fully verified for Booking | ORA `.env` has the existing `ST_SECRECT_KEY` test secret alias and `ST_PUB_KEY`; `STRIPE_WEBHOOK_SECRET` is absent | Add webhook signing secret, run the authenticated **Verify Stripe connection** action, and capture signed success/failure/delayed/duplicate/refund/no-show test evidence |
53
- | P0 | Worker and alerting are not enabled on the real host | systemd/cron artifacts are generated, but no host schedule, lock, alert route, or recovery evidence has been supplied | Enable one scheduler, run a disposable/staging worker cycle, prove lock/retry/dead-letter/recovery alerts, and retain sanitized ops evidence |
54
- | P0 | Real-host runtime and browser conformance is missing | Reference-host, fixture, and local build evidence pass; no authenticated HTTPS runtime/browser artifact exists | Run all 47 manager endpoints and all 45 browser screens against a dedicated staging/test tenant, then pass `release-gate --require-runtime --require-browser --require-ops` |
55
- | P1 | Published npm package is behind the current Booking contracts | Local AI-CMO package source is `0.7.40`; publish and registry readback are the remaining release actions | Verify the installed public tarball, and rerun `maggie booking inspect` against ORA |
167
+ | P0 | Production Booking schema and access tables are not verified | Explicit read-only check against `BOOKING_STAGING_DATABASE_URL` reports core, Booking, and access tables ready. `DATABASE_URL` is not clearly classified as staging or production, so that check is not treated as release evidence. | Confirm the approved production target and backup/restore plan, then run a target-bound check; apply schema only after explicit approval |
168
+ | P0 | Reconcile live public Booking exposure and out-of-hours availability | Chrome still finds `/book` advertising online booking and Assessment starts 18:30–00:20, after the published 21:00 close. Read-only VPS inspection confirms the service is active but `src/lib/booking/online.ts` is absent; deployed route/adapter source hashes match committed `HEAD` while current working-tree hashes differ. The host has no `.git` or build-version marker, so the current revision remains unknown. The working tree now adds a SHA-256 build identity endpoint and deploy rollback check; production readback awaits an approved deploy. Current production-mode preview closes the updated source. No booking was submitted. | Reconcile the deployed source and production readiness, then close the exposure through the approved release process, verify `/api/build-info.json`, and recheck hours |
169
+ | P0 | Review Resend activity after the staging worker preview incident | Two pre-fix staging previews each reported one provider-accepted notification without persisting outbox state; a duplicate submission is possible. The fixed preview now skips provider dispatch. | Review Resend activity and assess any duplicate before a worker `--write` run |
170
+ | P0 | Stripe test-mode coverage and intended account confirmation remain open | Authenticated staging Booking setup retained API “reachable” and webhook “configured” after refresh, with charges and payouts disabled. Chrome completed a £128 Stripe test Checkout; Stripe readback recorded `livemode=false`, a succeeded £128 PaymentIntent, and a confirmed customer return. The test payment was fully refunded, four other unpaid sessions expired, and all synthetic app records were removed. This proves test-mode Checkout, not live payment readiness; the configured sandbox/account is still awaiting client confirmation. Signed webhook/reconciliation failure, duplicate, refund, and no-show cases are not complete host evidence. | Confirm that the sandbox is ORA’s intended test account; capture the remaining authenticated provider-event scenarios. Production remains disabled until the intended live account has verified live charges and passes the production readiness gate |
171
+ | P0 | Production worker activity, alert routing, and recovery evidence need reconciliation | Read-only VPS inspection confirms a one-minute systemd timer is enabled and its service runs with `--write --confirm`; the last observed exit succeeded. Current local worker fixes are unreleased. Two earlier staging previews ran before the dry-run guard and each reported one provider-accepted notification without persisted outbox state, so a duplicate may exist. Alert delivery and backup/restore/recovery have not been verified. Sanitized summary: ORA `.maggie/evidence/booking-v27/worker-preview-side-effect-summary.json`. | Review Resend activity and assess any duplicate before changing or rerunning the worker; reconcile the deployed worker revision, then prove alert delivery, backup/restore, and recovery with sanitized host evidence |
172
+ | P0 | Real-host runtime and browser conformance is missing | Local Chrome v2 checks cover all 51 paths/headings/layouts, but failed-request events were unavailable and screenshot dimensions vary; no authenticated HTTPS runtime or canonical v2 browser artifact exists. The ORA repository `.env` has no dedicated HTTPS staging base URL; its `PUBLIC_SITE_URL` is the production origin. Protected-workflow secrets were not inspected. Canonical MaggieDash and ORA root runtime/browser workflows now run the exact `BOOKING_TEST_HOST_ALLOWLIST` preflight before writing protected session/plan inputs and pass the allowlist into capture for a second check; direct capture commands enforce it independently. | Configure an exact test-host allowlist and provide a dedicated HTTPS test tenant, then run all 47 manager endpoints and all 51 route/viewport screens with route-specific path/headings and no console/request/layout/login-leak failures; pass `release-gate --require-runtime --require-browser --require-ops` |
173
+ | P1 | Installed global CLI contains a stale Booking email-template contract | Source candidate `0.7.48` passes the exact-tarball ORA inspect gate; published/global `0.7.47` still reports nine events | Publish the reviewed candidate, verify registry/install contents, then rerun `maggie booking inspect` against ORA |
56
174
  | P1 | ORA staging data and legacy allocation backfill need approval | `maggie-booking-buffer-backfill.sql` is present but not applied; active locations/catalogue/staff/schedule/payment policy still need real data verification | Apply the reviewed additive/backfill migration in staging, seed a test location/catalogue/staff schedule, and prove readiness plus conflict behavior |
57
175
  | P1 | End-to-end Resend delivery is unproven | Outbox/worker code and validators pass, but invitation, reset, reminder, waitlist, package, refund, and no-show messages have not been observed in a staging mailbox | Capture redacted delivery, retry, dead-letter, replay, and duplicate-suppression evidence |
58
176
  | P1 | Release/canary ownership is incomplete | `BK-032` remains `needs-evidence`; no final release artifact or canary report is recorded | Produce the board-complete release report, rollback rehearsal, canary window, and feedback closure |