@topy-ai/maggie 0.7.38 → 0.7.41

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 (95) hide show
  1. package/README-zh-TW.md +82 -6
  2. package/README.md +99 -7
  3. package/bin/maggie.js +30 -3
  4. package/bundled-contracts/maggie-clone/interaction-state-v1.schema.json +26 -0
  5. package/bundled-contracts/maggie-content/provenance-v1.schema.json +20 -0
  6. package/bundled-contracts/maggie-design/brand-kit-v1.schema.json +18 -0
  7. package/bundled-contracts/maggie-design/browser-interactions-v1.schema.json +27 -0
  8. package/bundled-contracts/maggie-design/css-utility-evidence-v1.schema.json +10 -0
  9. package/bundled-contracts/maggie-design/dashboard-surface-v1.schema.json +11 -0
  10. package/bundled-contracts/maggie-design/progressive-enhancement-v1.schema.json +12 -0
  11. package/bundled-contracts/maggie-design/sample-surface-v1.schema.json +13 -0
  12. package/bundled-contracts/maggie-design/style-editing-v1.schema.json +35 -0
  13. package/bundled-contracts/maggie-media/image-generation-policy-v1.json +28 -0
  14. package/bundled-contracts/maggie-media/video-generation-policy-v1.json +40 -0
  15. package/bundled-contracts/maggie-media/video-job-v1.schema.json +20 -0
  16. package/bundled-contracts/maggie-media/video-playback-evidence-v1.schema.json +15 -0
  17. package/bundled-contracts/maggie-ops/npm11-preflight-v1.schema.json +17 -0
  18. package/bundled-contracts/maggie-scaffold/host-scaffold-v1.schema.json +25 -0
  19. package/bundled-contracts/maggie-seo/gsc-readiness-v1.schema.json +19 -0
  20. package/bundled-contracts/maggie-seo/privacy-origin-evidence-v1.schema.json +11 -0
  21. package/bundled-contracts/maggie-service-booking/delivery-provider-default-v1.json +8 -0
  22. package/bundled-contracts/maggie-service-booking/delivery-provider-v1.schema.json +16 -0
  23. package/bundled-contracts/maggiedash/booking-access-v1.json +5 -4
  24. package/bundled-contracts/maggiedash/booking-customer-surface-v1.json +12 -1
  25. package/bundled-contracts/maggiedash/booking-email-templates-v1.json +2 -0
  26. package/bundled-contracts/maggiedash/booking-host-adapter-v1.json +14 -2
  27. package/bundled-contracts/maggiedash/booking-runtime.v1.json +41 -0
  28. package/bundled-contracts/maggiedash/browser-session-v1.schema.json +18 -0
  29. package/bundled-contracts/maggiedash/content-overrides-v1.schema.json +19 -0
  30. package/bundled-contracts/maggiedash/execution-board.json +526 -26
  31. package/bundled-contracts/maggiedash/host-capabilities-v1.schema.json +10 -0
  32. package/bundled-contracts/maggiedash/public-session-cache-v1.schema.json +17 -0
  33. package/bundled-contracts/maggiedash/site-structure-v1.schema.json +13 -0
  34. package/bundled-references/browser-inspection.md +21 -0
  35. package/bundled-references/maggiedash-booking/ARCHITECTURE.md +218 -0
  36. package/bundled-references/maggiedash-booking/CURRENT-STATE.md +92 -0
  37. package/bundled-references/maggiedash-booking/DATA-FLOW.md +143 -0
  38. package/bundled-references/maggiedash-booking/DATA-MODEL.md +367 -0
  39. package/bundled-references/maggiedash-booking/DECISIONS.md +94 -0
  40. package/bundled-references/maggiedash-booking/EXECUTION-BOARD.json +2387 -0
  41. package/bundled-references/maggiedash-booking/HOST-ADAPTER.md +314 -0
  42. package/bundled-references/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md +227 -0
  43. package/bundled-references/maggiedash-booking/PAYMENT-GATEWAY.md +267 -0
  44. package/bundled-references/maggiedash-booking/PRD.md +228 -0
  45. package/bundled-references/maggiedash-booking/PROGRESS.md +2434 -0
  46. package/bundled-references/maggiedash-booking/QA-TEST-PLAN.md +235 -0
  47. package/bundled-references/maggiedash-booking/README.md +271 -0
  48. package/bundled-references/maggiedash-booking/RUNTIME-OPERATIONS.md +152 -0
  49. package/bundled-references/maggiedash-booking/SECURITY-COMPLIANCE.md +158 -0
  50. package/bundled-references/maggiedash-booking/SKILLS-AND-CLI.md +542 -0
  51. package/bundled-references/maggiedash-booking/STRIPE-INTEGRATION.md +129 -0
  52. package/bundled-references/maggiedash-booking/TASK-RUNBOOK.md +107 -0
  53. package/bundled-references/maggiedash-booking/TASKS.md +137 -0
  54. package/bundled-references/maggiedash-booking/USER-JOURNEYS.md +224 -0
  55. package/bundled-references/maggiedash-booking/diagrams/booking-dfd.excalidraw +1 -0
  56. package/bundled-references/maggiedash-booking/diagrams/booking-dfd.mmd +16 -0
  57. package/bundled-references/maggiedash-booking/diagrams/booking-dfd.png +0 -0
  58. package/bundled-references/maggiedash-booking/diagrams/booking-dfd.svg +1 -0
  59. package/bundled-references/maggiedash-booking/diagrams/booking-state-machine.mmd +19 -0
  60. package/bundled-references/maggiedash-booking/diagrams/booking-state-machine.png +0 -0
  61. package/bundled-references/maggiedash-booking/diagrams/booking-state-machine.svg +1 -0
  62. package/bundled-references/maggiedash-booking/diagrams/manager-journey.excalidraw +1 -0
  63. package/bundled-references/maggiedash-booking/diagrams/manager-journey.mmd +11 -0
  64. package/bundled-references/maggiedash-booking/diagrams/manager-journey.png +0 -0
  65. package/bundled-references/maggiedash-booking/diagrams/manager-journey.svg +1 -0
  66. package/bundled-references/maggiedash-booking/diagrams/payment-sequence.mmd +20 -0
  67. package/bundled-references/maggiedash-booking/diagrams/payment-sequence.png +0 -0
  68. package/bundled-references/maggiedash-booking/diagrams/payment-sequence.svg +1 -0
  69. package/bundled-references/maggiedash-booking/diagrams/system-context.excalidraw +1 -0
  70. package/bundled-references/maggiedash-booking/diagrams/system-context.mmd +10 -0
  71. package/bundled-references/maggiedash-booking/diagrams/system-context.png +0 -0
  72. package/bundled-references/maggiedash-booking/diagrams/system-context.svg +1 -0
  73. package/bundled-skills/maggie-blog/SKILL.md +12 -0
  74. package/bundled-skills/maggie-blog-bootstrap/SKILL.md +39 -0
  75. package/bundled-skills/maggie-booking/SKILL.md +112 -18
  76. package/bundled-skills/maggie-clone/SKILL.md +13 -0
  77. package/bundled-skills/maggie-deployment/SKILL.md +6 -0
  78. package/bundled-skills/maggie-design/SKILL.md +64 -3
  79. package/bundled-skills/maggie-ops/SKILL.md +12 -0
  80. package/bundled-skills/maggie-seo-geo/SKILL.md +45 -0
  81. package/bundled-skills/maggie-service-booking/SKILL.md +14 -0
  82. package/bundled-tools/clis/maggie_analytics.py +43 -1
  83. package/bundled-tools/clis/maggie_booking.py +161 -26
  84. package/bundled-tools/clis/maggie_browser_audit.py +99 -3
  85. package/bundled-tools/clis/maggie_clone.py +46 -1
  86. package/bundled-tools/clis/maggie_contracts.py +393 -0
  87. package/bundled-tools/clis/maggie_dash.py +22 -6
  88. package/bundled-tools/clis/maggie_design.py +84 -12
  89. package/bundled-tools/clis/maggie_service_booking.py +50 -1
  90. package/bundled-tools/clis/maggie_workflows.py +387 -0
  91. package/bundled-tools/clis/site_audit.py +77 -1
  92. package/bundled-tools/integrations/analytics.md +14 -0
  93. package/bundled-tools/runtime/site_baseline.py +3 -0
  94. package/package.json +1 -1
  95. package/references/browser-inspection.md +21 -0
@@ -0,0 +1,2387 @@
1
+ {
2
+ "schemaVersion": "maggiedash-booking-execution-board.v1",
3
+ "product": "MaggieDash Booking",
4
+ "workspace": "_maggie/booking",
5
+ "sourceOfTruth": "MaggieDash owns implementation; ai-cmo-skills/docs owns the delivery board and progress record.",
6
+ "workflow": ["task", "plan", "implement", "test", "update-docs", "record-progress"],
7
+ "tasks": [
8
+ {
9
+ "id": "BK-017",
10
+ "epic": "delivery-control",
11
+ "title": "Create an executable Booking delivery board",
12
+ "repository": "both",
13
+ "dependsOn": ["BK-010"],
14
+ "status": "passed",
15
+ "plan": ["Convert the product documents into leaf tasks", "Give every task a concrete gate and evidence file", "Expose read-only task inspection through Maggie CLI"],
16
+ "implementation": ["docs/maggiedash-booking/EXECUTION-BOARD.json", "tools/clis/maggie_booking.py tasks"],
17
+ "tests": ["python3 tools/clis/maggie_booking.py tasks validate", "python3 tools/clis/maggie_booking.py tasks list"],
18
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/PROGRESS.md"],
19
+ "acceptance": ["All tasks have dependencies, plan, implementation, tests, docs, and acceptance evidence", "No task is marked done without a passing gate"]
20
+ },
21
+ {
22
+ "id": "BK-018",
23
+ "epic": "contract",
24
+ "title": "Reconcile host adapter routes with UI and host documentation",
25
+ "repository": "MaggieDash",
26
+ "dependsOn": ["BK-017"],
27
+ "status": "passed",
28
+ "plan": ["Inventory every UI request and documented endpoint", "Add missing customer/detail and configuration mutation routes", "Choose one canonical refund and health route", "Generate a contract fixture from the same endpoint inventory"],
29
+ "implementation": ["contracts/booking-host-adapter-v1.json", "backend/booking-adapter-contract.d.ts", "fixtures/booking-host-contract.v1.json"],
30
+ "tests": ["npm test", "node scripts/validate-booking-host-contract.mjs"],
31
+ "docs": ["docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
32
+ "acceptance": ["The UI, JSON contract, TypeScript contract, and docs expose the same route IDs", "All mutations declare idempotency and authorization", "Contract fixture validates required response fields"]
33
+ },
34
+ {
35
+ "id": "BK-019",
36
+ "epic": "reference-host",
37
+ "title": "Build a deterministic reference host adapter",
38
+ "repository": "MaggieDash",
39
+ "dependsOn": ["BK-018"],
40
+ "status": "passed",
41
+ "plan": ["Create a secret-free in-memory host state", "Implement authenticated JSON routes for every Booking endpoint", "Use the real domain functions for holds, availability, lifecycle, and idempotency", "Expose a local server only for tests and browser development"],
42
+ "implementation": ["fixtures/booking-host-state.v1.json", "backend/booking/reference-host.mjs", "scripts/validate-booking-reference-host.mjs", "scripts/run-booking-reference-host.mjs"],
43
+ "tests": ["node scripts/validate-booking-reference-host.mjs", "node scripts/run-booking-reference-host.mjs --self-test", "HTTP GET /api/maggie/booking/overview.json with fixture session"],
44
+ "docs": ["backend/booking/README.md", "adapters/astro/README.md", "docs/maggiedash-booking/HOST-ADAPTER.md"],
45
+ "acceptance": ["Protected routes reject missing session", "Tenant and role scope are checked", "Same idempotency key returns the original mutation result", "No provider secret or raw payload is present"]
46
+ },
47
+ {
48
+ "id": "BK-020",
49
+ "epic": "data-foundation",
50
+ "title": "Harden PostgreSQL migration and migration evidence",
51
+ "repository": "MaggieDash",
52
+ "dependsOn": ["BK-018"],
53
+ "status": "passed",
54
+ "plan": ["Compare SQL tables with DATA-MODEL.md", "Add missing tenant/location/policy fields or document intentional simplifications", "Run migration twice and inspect constraints/indexes", "Add rollback and backup evidence instructions"],
55
+ "implementation": ["schema/maggie-booking-install.sql", "scripts/validate-booking-schema.mjs"],
56
+ "tests": ["npm run booking:schema:validate", "node scripts/validate-booking-schema.mjs --database-url <disposable-db> --confirm", "temporary PostgreSQL migration twice", "rolled-back overlapping allocation regression"],
57
+ "docs": ["docs/maggiedash-booking/DATA-MODEL.md", "docs/maggiedash-booking/CURRENT-STATE.md", "docs/maggiedash-booking/PROGRESS.md"],
58
+ "acceptance": ["Migration is repeatable", "Tenant scope and active allocation overlap constraints are enforced", "Schema evidence is sanitized and reproducible"]
59
+ },
60
+ {
61
+ "id": "BK-021",
62
+ "epic": "booking-domain",
63
+ "title": "Complete availability, timezone, hold, and booking lifecycle rules",
64
+ "repository": "MaggieDash",
65
+ "dependsOn": ["BK-019", "BK-020"],
66
+ "status": "passed",
67
+ "plan": ["Add local-time to UTC conversion with DST gap/fold rules", "Add hold create/release/convert and reschedule commands", "Add multi-segment allocation validation", "Return exclusion diagnostics without leaking tenant data"],
68
+ "implementation": ["backend/booking/domain.mjs", "backend/booking/commands.mjs", "backend/booking/time.mjs"],
69
+ "tests": ["npm run booking:domain:test", "DST gap/fold fixtures", "idempotency and overlap fixtures", "multi-segment allocation fixtures", "cross-project rejection fixtures"],
70
+ "docs": ["docs/maggiedash-booking/DATA-FLOW.md", "docs/maggiedash-booking/DATA-MODEL.md", "docs/maggiedash-booking/USER-JOURNEYS.md"],
71
+ "acceptance": ["No double allocation is possible at the command boundary", "DST nonexistent and ambiguous times are explicit", "Every mutation produces event and audit intent"]
72
+ },
73
+ {
74
+ "id": "BK-022",
75
+ "epic": "host-api",
76
+ "title": "Implement host adapter service boundaries and safe DTOs",
77
+ "repository": "MaggieDash",
78
+ "dependsOn": ["BK-019", "BK-021"],
79
+ "status": "passed",
80
+ "plan": ["Define request validation and safe error mapping", "Implement read DTO builders", "Implement mutation command dispatch with transaction hooks", "Keep host database/credentials injected"],
81
+ "implementation": ["backend/booking/service.mjs", "backend/booking/dto.mjs", "backend/booking/request.mjs", "backend/booking/route-handler.mjs"],
82
+ "tests": ["reference host endpoint conformance", "booking service validator including canonical list-object responses", "booking route-handler validator across all 47 routes", "safe error and redaction tests", "project authorization fixtures"],
83
+ "docs": ["docs/maggiedash-booking/HOST-ADAPTER.md", "backend/README.md"],
84
+ "acceptance": ["Host routes return canonical DTOs", "No SQL/provider/raw credentials cross the boundary", "All failures use the versioned safe error shape"]
85
+ },
86
+ {
87
+ "id": "BK-023",
88
+ "epic": "configuration",
89
+ "title": "Implement catalog, staff, resource, schedule, and policy configuration",
90
+ "repository": "MaggieDash",
91
+ "dependsOn": ["BK-020", "BK-022"],
92
+ "status": "passed",
93
+ "plan": ["Add validated configuration commands", "Add draft-first writes and audit reasons", "Make configuration changes invalidate availability safely", "Return readiness checks to the UI"],
94
+ "implementation": ["backend/booking/configuration.mjs", "contracts/booking-configuration-v1.json"],
95
+ "tests": ["npm run booking:configuration:test", "configuration contract tests", "resource/staff eligibility tests", "schedule/DST tests", "idempotent update tests"],
96
+ "docs": ["docs/maggiedash-booking/DATA-MODEL.md", "docs/maggiedash-booking/PRD.md"],
97
+ "acceptance": ["A service cannot be bookable without valid duration, price, location, and policy", "Staff/resource eligibility is enforced", "Every configuration mutation is audited"]
98
+ },
99
+ {
100
+ "id": "BK-024",
101
+ "epic": "payments",
102
+ "title": "Implement provider-neutral payment orchestration and fake gateway",
103
+ "repository": "MaggieDash",
104
+ "dependsOn": ["BK-021", "BK-022"],
105
+ "status": "passed",
106
+ "plan": ["Freeze PaymentGateway input/output types", "Create fake gateway for action-required, delayed, success, failure, and refund flows", "Separate attempts, transactions, refunds, and webhook events", "Make provider health and capability checks explicit"],
107
+ "implementation": ["backend/booking/payment-gateway.mjs", "backend/booking/fake-payment-gateway.mjs", "fixtures/payment-gateway.v1.json"],
108
+ "tests": ["npm run booking:payment:test", "payment contract suite", "duplicate/out-of-order event tests", "refund upper-bound tests", "capability-disabled tests"],
109
+ "docs": ["docs/maggiedash-booking/PAYMENT-GATEWAY.md", "docs/maggiedash-booking/QA-TEST-PLAN.md"],
110
+ "acceptance": ["Payment and booking states remain independent", "No redirect can mark a payment paid", "Refund totals cannot exceed captured totals"]
111
+ },
112
+ {
113
+ "id": "BK-025",
114
+ "epic": "stripe",
115
+ "title": "Implement a host-owned Stripe adapter against the current contract",
116
+ "repository": "host-owned with MaggieDash contract",
117
+ "dependsOn": ["BK-024"],
118
+ "status": "passed",
119
+ "plan": ["Use official Stripe SDK only in the host", "Pin account/API version and inject secrets server-side", "Implement Checkout Sessions, PaymentIntents, SetupIntents, Refunds, and webhook verification", "Run sandbox conformance before enabling live capture"],
120
+ "implementation": ["host adapter implementation", "contracts/stripe-booking-capabilities-v1.json", "backend/booking/stripe.mjs"],
121
+ "tests": ["npm run booking:stripe-adapter:test", "Stripe test/sandbox seam", "signature/replay tests", "delayed payment/refund tests", "redaction scan"],
122
+ "docs": ["docs/maggiedash-booking/STRIPE-INTEGRATION.md", "docs/maggiedash-booking/PAYMENT-GATEWAY.md"],
123
+ "acceptance": ["MaggieDash has no live secret dependency", "Every enabled Stripe capability has conformance evidence", "Unknown events fail safe"]
124
+ },
125
+ {
126
+ "id": "BK-026",
127
+ "epic": "notifications",
128
+ "title": "Complete outbox notifications and recovery",
129
+ "repository": "both",
130
+ "dependsOn": ["BK-021", "BK-022"],
131
+ "status": "passed",
132
+ "plan": ["Define notification templates and recipient redaction", "Persist outbox and notification state transactionally", "Implement lease, retry, backoff, dead-letter, and replay commands", "Make provider delivery injectable"],
133
+ "implementation": ["backend/booking/notifications.mjs", "backend/booking/notification-adapter.d.ts"],
134
+ "tests": ["npm run booking:notifications:test", "lease race tests", "retry/dead-letter tests", "idempotent dispatch tests", "safe recipient tests"],
135
+ "docs": ["docs/maggiedash-booking/RUNTIME-OPERATIONS.md", "docs/maggiedash-booking/USER-JOURNEYS.md"],
136
+ "acceptance": ["A delivery failure cannot roll back booking truth", "A retry cannot send the same notification twice", "Operator can inspect and replay a safe failed notification"]
137
+ },
138
+ {
139
+ "id": "BK-027",
140
+ "epic": "workspace-ui",
141
+ "title": "Finish Booking UI data loading, navigation, forms, and action feedback",
142
+ "repository": "MaggieDash",
143
+ "dependsOn": ["BK-018", "BK-022", "BK-023"],
144
+ "status": "passed",
145
+ "plan": ["Replace generic collection placeholders with typed screen models", "Add URL filter state and pagination", "Add accessible action dialogs and pending/error feedback", "Add real forms for catalog/staff/resource/schedule settings"],
146
+ "implementation": ["booking/src/booking.tsx", "booking/src/http.ts", "scripts/validate-booking-ui.mjs", "contracts/booking-ui-v1.json"],
147
+ "tests": ["npm run booking:ui:test", "esbuild parse", "reference-host Chrome smoke at 390/768/1440", "keyboard/focus checks"],
148
+ "docs": ["booking/README.md", "docs/maggiedash-booking/HOST-ADAPTER.md"],
149
+ "acceptance": ["Every screen is backed by a typed endpoint", "Mutations show pending/success/failure states", "No native browser dialogs or unsafe action defaults"]
150
+ },
151
+ {
152
+ "id": "BK-028",
153
+ "epic": "workspace-ui",
154
+ "title": "Finish manager daily operations journeys",
155
+ "repository": "MaggieDash",
156
+ "dependsOn": ["BK-021", "BK-023", "BK-027"],
157
+ "status": "passed",
158
+ "plan": ["Implement calendar day/week/filter views", "Implement booking detail, reschedule, cancel, no-show, check-in, complete", "Implement payment/reconciliation/refund actions", "Implement audit/event operational views"],
159
+ "implementation": ["booking/src/booking.tsx", "contracts/booking-browser-evidence-v1.json"],
160
+ "tests": ["reference-host Chrome lifecycle/reschedule/payment smoke", "permission/capability UI tests", "responsive screenshots"],
161
+ "docs": ["docs/maggiedash-booking/USER-JOURNEYS.md", "docs/maggiedash-booking/QA-TEST-PLAN.md"],
162
+ "acceptance": ["A manager can operate a normal day from Booking without leaving the workspace", "Pending payment and provider outage are explicit", "Audit trail is visible for material actions"]
163
+ },
164
+ {
165
+ "id": "BK-029",
166
+ "epic": "access-control",
167
+ "title": "Verify authentication, tenancy, roles, and privacy boundaries",
168
+ "repository": "both",
169
+ "dependsOn": ["BK-019", "BK-022", "BK-027"],
170
+ "status": "passed",
171
+ "plan": ["Use host email/password session only", "Test owner/manager/staff/finance permission matrix", "Test cross-project IDs, location scope, and public/admin route separation", "Scan HTML, props, logs, fixtures, and evidence for secrets/PII"],
172
+ "implementation": ["backend/booking/request.mjs", "backend/booking/reference-host.mjs", "backend/booking/route-handler.mjs", "scripts/validate-booking-security.mjs", "contracts/booking-host-adapter-v1.json"],
173
+ "tests": ["npm run booking:security:test", "authorization matrix including staff lifecycle scope", "cross-tenant hostile ID tests", "secret/PII scan", "noindex/auth redirect test"],
174
+ "docs": ["docs/maggiedash-booking/SECURITY-COMPLIANCE.md", "docs/maggiedash-booking/HOST-ADAPTER.md"],
175
+ "acceptance": ["Unauthorized users cannot render manager UI", "Staff cannot perform finance actions", "No provider secrets or raw payment data reach the browser"]
176
+ },
177
+ {
178
+ "id": "BK-030",
179
+ "epic": "runtime",
180
+ "title": "Wire the production worker and operational controls",
181
+ "repository": "both",
182
+ "dependsOn": ["BK-020", "BK-021", "BK-024", "BK-026"],
183
+ "status": "needs-evidence",
184
+ "plan": ["Implement PostgreSQL host worker adapter", "Acquire advisory/distributed lock", "Run availability, holds, payments, and notification jobs", "Emit safe metrics and alerts with rollback controls"],
185
+ "implementation": ["backend/booking/worker-contract.d.ts", "backend/booking/postgres-worker-adapter.mjs", "backend/booking/postgres-worker-repository.mjs", "backend/booking/health.mjs", "backend/booking/runtime.mjs", "backend/booking/run-booking-jobs.mjs", "contracts/booking-ops-evidence-v1.json", "scripts/validate-booking-ops-evidence.mjs", ".github/workflows/booking-ops-evidence.yml", "schema/maggie-booking-install.sql", "ops/systemd/*", "ops/cron/*", "tools/clis/maggie_booking.py"],
186
+ "tests": ["npm run booking:worker-adapter:test", "npm run booking:postgres-repository:test", "npm run booking:health:test", "npm run booking:ops:evidence:test", "npm run booking:ops:evidence:regression:test", "python3 -m unittest tools.tests.test_maggie_booking", "maggie booking worker-schedule --project <host> --scheduler systemd --confirm", "maggie booking ops-validate --evidence <sanitized-ops-evidence>", "maggie booking ops-validate --require-host --evidence <host-ops-evidence>", "npm run booking:schema:validate -- --database-url <disposable-db> --confirm", "npm run booking:postgres-repository:integration -- --database-url <disposable-or-staging-url> --confirm", "npm run booking:postgres-backup-restore:integration -- --source-database-url <source> --restore-database-url <empty-target> --pg-bin-dir <matching-postgres-bin-dir> --confirm", "reference-host rollback write-guard test", "worker dry-run with correlation ID and health report", "production fixture-store guard", "host alert routing integration pending", "lock/retry/dead-letter tests"],
187
+ "docs": ["docs/maggiedash-booking/RUNTIME-OPERATIONS.md", "ops/README.md"],
188
+ "acceptance": ["Workers never point production at fixture JSON", "Jobs are idempotent and observable", "Rollback disables new writes without deleting history"]
189
+ },
190
+ {
191
+ "id": "BK-031",
192
+ "epic": "evidence",
193
+ "title": "Capture real host conformance and browser evidence",
194
+ "repository": "both",
195
+ "dependsOn": ["BK-019", "BK-022", "BK-028", "BK-029", "BK-030"],
196
+ "status": "needs-evidence",
197
+ "plan": ["Run all host endpoints against a dedicated test tenant", "Capture sanitized runtime evidence", "Run Playwright at mobile/tablet/desktop widths", "Fix every console/network/layout failure before release"],
198
+ "implementation": ["scripts/capture-booking-runtime-evidence.mjs", "scripts/validate-booking-runtime-plan.mjs", "scripts/validate-booking-runtime-evidence.mjs", "scripts/capture-booking-browser-evidence.mjs", "scripts/validate-booking-browser-evidence.mjs", ".github/workflows/booking-runtime-evidence.yml", ".github/workflows/booking-browser-evidence.yml"],
199
+ "tests": ["maggie booking runtime-validate", "npm run booking:runtime:plan:test", "runtime evidence validator", "browser evidence validator including console/request/layoutErrors", "real host runtime plan run", "real host Playwright run"],
200
+ "docs": ["docs/maggiedash-booking/QA-TEST-PLAN.md", "docs/maggiedash-booking/PROGRESS.md"],
201
+ "acceptance": ["All 47 manager endpoints have 2xx evidence", "All 15 manager screens pass at 3 viewports", "No console errors, failed requests, overflow, or login leakage"]
202
+ },
203
+ {
204
+ "id": "BK-032",
205
+ "epic": "release",
206
+ "title": "Run release gate, canary, documentation, and feedback closure",
207
+ "repository": "both",
208
+ "dependsOn": ["BK-025", "BK-030", "BK-031", "BK-033", "BK-034", "BK-035", "BK-036", "BK-037", "BK-038"],
209
+ "status": "needs-evidence",
210
+ "plan": ["Run full repository and installed-project gates", "Run migration backup/restore and canary checks", "Update README, contracts, docs, and progress with evidence", "Create regression tests for every discovered defect"],
211
+ "implementation": ["tools/clis/maggie_booking.py release-gate", "tools/tests/test_maggie_booking.py", "README files", "docs/maggiedash-booking/PROGRESS.md"],
212
+ "tests": ["npm test", "python skill/link tests", "release gate with required runtime, browser, ops, and board evidence", "release gate missing-artifact structured blocked regression", "browser artifact parity and layoutErrors rejection", "canary and rollback rehearsal"],
213
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/CURRENT-STATE.md", "docs/maggiedash-booking/PROGRESS.md"],
214
+ "acceptance": ["No required task remains planned/blocked", "Release evidence comes from the real host boundary", "Docs describe the shipped behavior and remaining explicit limitations"]
215
+ },
216
+ {
217
+ "id": "BK-033",
218
+ "epic": "customer-surface",
219
+ "title": "Freeze and validate the public customer booking boundary",
220
+ "repository": "both",
221
+ "dependsOn": ["BK-021", "BK-024", "BK-026"],
222
+ "status": "passed",
223
+ "plan": ["Separate public customer traffic from manager session routes", "Define redacted catalogue, availability, hold, checkout, payment-return, and cancellation DTOs", "Define allowlisted notification intents and fail-closed tenant binding", "Document host-owned origin, rate-limit, bot, persistence, and provider responsibilities"],
224
+ "implementation": ["contracts/booking-customer-surface-v1.json", "backend/booking/customer-flow.mjs", "backend/booking/customer-route-handler.mjs", "fixtures/booking-customer-flow.v1.json", "scripts/validate-booking-customer-flow.mjs"],
225
+ "tests": ["npm run booking:customer-flow:test", "npm test", "public DTO redaction", "noindex/no-store headers", "mutation idempotency", "missing tenant rejection"],
226
+ "docs": ["docs/maggiedash-booking/PRD.md", "docs/maggiedash-booking/CURRENT-STATE.md", "docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md", "MaggieDash/README.md", "MaggieDash/backend/README.md"],
227
+ "acceptance": ["Public customer routes have a versioned contract separate from manager routes", "Customer DTOs exclude tenant, customer, provider, and credential internals", "A payment redirect cannot advance payment truth", "Host tenant binding and public request controls fail closed"]
228
+ },
229
+ {
230
+ "id": "BK-034",
231
+ "epic": "customer-surface",
232
+ "title": "Ship the public customer booking page and pending-payment recovery UI",
233
+ "repository": "MaggieDash",
234
+ "dependsOn": ["BK-033"],
235
+ "status": "passed",
236
+ "plan": ["Add a public page source inside the Booking workspace", "Load catalog and date-scoped availability through the public API", "Create an idempotent hold before checkout and show bounded pending/error states", "Add a payment-return page that never treats a redirect as proof"],
237
+ "implementation": ["booking/src/customer.tsx", "adapters/astro/customer-booking-page.astro", "scripts/validate-booking-customer-ui.mjs", "maggiedash.json"],
238
+ "tests": ["npm run booking:customer-ui:test", "customer-flow validator", "manifest/install validation", "TSX bundle parse with esbuild", "public credentials-omit and noindex source scan"],
239
+ "docs": ["booking/README.md", "adapters/astro/README.md", "README.md", "docs/maggiedash-booking/USER-JOURNEYS.md", "docs/maggiedash-booking/PROGRESS.md"],
240
+ "acceptance": ["A host can mount a public customer route from the installed projection", "The page covers catalog, availability, hold, checkout, and payment-return pending states", "Public requests omit manager credentials and mutations carry idempotency keys", "No browser redirect is rendered as payment confirmation"]
241
+ },
242
+ {
243
+ "id": "BK-035",
244
+ "epic": "customer-surface",
245
+ "title": "Exercise the public customer flow against the reference host",
246
+ "repository": "MaggieDash",
247
+ "dependsOn": ["BK-034"],
248
+ "status": "passed",
249
+ "plan": ["Wrap the existing manager reference state with a public customer host", "Exercise catalog, date-scoped availability, hold, checkout, payment return, and token-bound cancellation", "Prove public routes do not inherit manager session access", "Ship the validator through the install manifest"],
250
+ "implementation": ["backend/booking/customer-reference-host.mjs", "scripts/validate-booking-customer-reference-host.mjs", "maggiedash.json", "package.json"],
251
+ "tests": ["npm run booking:customer-reference-host:test", "npm test", "installed projection validator", "manager session isolation", "notification intent assertions"],
252
+ "docs": ["docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/PROGRESS.md"],
253
+ "acceptance": ["Public customer journey passes against a deterministic reference host", "Hold replay is idempotent and checkout yields bounded pending state", "Cancellation requires an opaque booking token", "The reference host remains explicitly non-production"]
254
+ },
255
+ {
256
+ "id": "BK-036",
257
+ "epic": "customer-surface",
258
+ "title": "Harden customer input validation and mutation replay",
259
+ "repository": "both",
260
+ "dependsOn": ["BK-035"],
261
+ "status": "passed",
262
+ "plan": ["Define bounded customer email validation and mandatory booking-update consent", "Preserve stable validation error ordering and safe error fields", "Use customer-scoped idempotency storage for checkout and cancellation replay", "Add regression assertions before changing the public contract"],
263
+ "implementation": ["backend/booking/customer-flow.mjs", "backend/booking/customer-reference-host.mjs", "scripts/validate-booking-customer-flow.mjs", "scripts/validate-booking-customer-reference-host.mjs"],
264
+ "tests": ["npm run booking:customer-flow:test", "npm run booking:customer-reference-host:test", "npm test", "invalid email rejection", "missing consent rejection", "cancel replay without duplicate notification"],
265
+ "docs": ["README.md", "backend/README.md", "docs/maggiedash-booking/PROGRESS.md"],
266
+ "acceptance": ["Invalid email and missing consent fail with validation_failed", "Existing empty-payload validation ordering remains stable", "Repeated customer checkout/cancel keys return the original result without duplicate side effects"]
267
+ },
268
+ {
269
+ "id": "BK-037",
270
+ "epic": "customer-surface",
271
+ "title": "Reject public idempotency-key payload mismatches",
272
+ "repository": "MaggieDash",
273
+ "dependsOn": ["BK-036"],
274
+ "status": "passed",
275
+ "plan": ["Hash normalized public mutation input without retaining customer payloads", "Replay only when the same key carries the same request", "Return a safe conflict for key reuse with a different payload", "Exercise hold, checkout, and cancellation paths"],
276
+ "implementation": ["backend/booking/customer-reference-host.mjs", "scripts/validate-booking-customer-reference-host.mjs"],
277
+ "tests": ["node scripts/validate-booking-customer-reference-host.mjs", "node --check backend/booking/customer-reference-host.mjs", "npm test"],
278
+ "docs": ["docs/maggiedash-booking/PROGRESS.md", "contracts/maggiedash/booking-customer-surface-v1.json"],
279
+ "acceptance": ["Same-key same-payload retries replay the original result", "Same-key different-payload retries return HTTP 409 conflict", "No raw customer payload is retained in the idempotency record"]
280
+ },
281
+ {
282
+ "id": "BK-038",
283
+ "epic": "ci",
284
+ "title": "Run all public customer gates in the runtime workflow",
285
+ "repository": "MaggieDash",
286
+ "dependsOn": ["BK-037"],
287
+ "status": "passed",
288
+ "plan": ["Inspect the installed/source runtime workflow for customer coverage", "Add customer flow, reference-host, UI, and syntax checks", "Add a static workflow regression so future edits cannot silently remove them"],
289
+ "implementation": [".github/workflows/booking-runtime.yml", "scripts/validate-booking.mjs"],
290
+ "tests": ["npm test", "workflow marker validation", "installed projection inspect", "customer flow/reference-host/UI validators"],
291
+ "docs": ["docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/TASKS.md"],
292
+ "acceptance": ["Source and installed runtime workflows execute all public customer validators", "Customer backend syntax is checked in CI", "The manifest includes the workflow and validators"]
293
+ },
294
+ {
295
+ "id": "BK-039",
296
+ "epic": "host-adapter",
297
+ "title": "Freeze the complete manager and customer service adapter surface",
298
+ "repository": "MaggieDash",
299
+ "dependsOn": ["BK-022", "BK-033", "BK-038"],
300
+ "status": "passed",
301
+ "plan": ["Map every versioned manager endpoint to its injected service method", "Type every repository method consumed by the transaction-injected service", "Type the six public customer methods without exposing provider or tenant internals", "Add an installable drift validator and run it in the repository gate"],
302
+ "implementation": ["backend/booking-adapter-contract.d.ts", "contracts/booking-host-adapter-v1.json", "scripts/validate-booking-service-contract.mjs", "maggiedash.json", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
303
+ "tests": ["npm run booking:service-contract:test", "npm test", "manifest/install validation", "endpoint-to-service mapping check", "repository/service/customer method surface check"],
304
+ "docs": ["backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
305
+ "acceptance": ["Every manager endpoint has one explicit serviceMethod mapping", "Host implementers can type-check all repository methods required by createBookingService", "Public customer service methods are separately typed", "The contract validator is included in the installed projection"]
306
+ },
307
+ {
308
+ "id": "BK-040",
309
+ "epic": "host-adapter",
310
+ "title": "Expose the service contract through the Booking CLI gates",
311
+ "repository": "ai-cmo-skills",
312
+ "dependsOn": ["BK-039"],
313
+ "status": "passed",
314
+ "plan": ["Mirror service and customer method declarations in the compact ai-cmo contract", "Make inspect and release-gate require the installed type contract and validator", "Add Python regression coverage and document the stable command"],
315
+ "implementation": ["contracts/maggiedash/booking-host-adapter-v1.json", "tools/clis/maggie_booking.py", "tools/tests/test_maggie_booking.py", "docs/maggiedash-booking/SKILLS-AND-CLI.md"],
316
+ "tests": ["python3 -m unittest tools.tests.test_maggie_booking -v", "maggie booking contract", "maggie booking tasks validate", "maggie booking inspect --project <installed-projection>", "python3 -m py_compile"],
317
+ "docs": ["docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/PROGRESS.md"],
318
+ "acceptance": ["The compact contract maps all 47 manager endpoints and eleven customer methods", "Installed inspect fails when service types or validator are missing", "Release gate includes the service contract checks", "A regression test prevents service surface drift"]
319
+ },
320
+ {
321
+ "id": "BK-041",
322
+ "epic": "customer-surface",
323
+ "title": "Complete the public customer cancellation journey",
324
+ "repository": "MaggieDash",
325
+ "dependsOn": ["BK-035", "BK-040"],
326
+ "status": "passed",
327
+ "plan": ["Add token-bound cancellation action to the payment-return page", "Send public cancellation with credentials omitted and an idempotency key", "Show bounded pending, success, and error states without native dialogs", "Extend the source/install UI gate and customer documentation"],
328
+ "implementation": ["booking/src/customer.tsx", "scripts/validate-booking-customer-ui.mjs", "README.md"],
329
+ "tests": ["npm run booking:customer-ui:test", "customer UI marker gate", "node --check scripts/validate-booking-customer-ui.mjs", "MaggieDash npm test", "installed customer UI validator"],
330
+ "docs": ["README.md", "docs/maggiedash-booking/USER-JOURNEYS.md", "docs/maggiedash-booking/PROGRESS.md"],
331
+ "acceptance": ["A customer can cancel from the opaque payment-return flow", "Cancellation carries an idempotency key and never uses manager credentials", "Success and failure states are accessible and bounded", "The UI validator protects the cancellation endpoint marker"]
332
+ },
333
+ {
334
+ "id": "BK-042",
335
+ "epic": "persistence",
336
+ "title": "Implement the tenant-scoped PostgreSQL manager core repository",
337
+ "repository": "MaggieDash",
338
+ "dependsOn": ["BK-020", "BK-021", "BK-022", "BK-039"],
339
+ "status": "passed",
340
+ "plan": ["Add an additive settings table for persisted booking configuration", "Implement host-injected parameterized reads for catalogue, availability, bookings, customers, audit, events, and runtime", "Implement transactional booking/hold/lifecycle writes with row locking, event/audit records, and idempotency replay", "Add a fake-executor regression gate that verifies tenant scope, same-client transactions, typed SQL parameters, and persistence calls"],
341
+ "implementation": ["schema/maggie-booking-install.sql", "backend/booking/postgres-core-repository.mjs", "backend/booking-adapter-contract.d.ts", "scripts/validate-booking-postgres-core-repository.mjs", "tools/clis/maggie_booking.py", "skills/maggie-booking/SKILL.md", "maggiedash.json", "README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
342
+ "tests": ["npm run booking:postgres-core-repository:test", "npm run booking:postgres-core-repository:integration -- --database-url <disposable-db> --confirm", "npm test", "node --check backend/booking/postgres-core-repository.mjs", "schema validator", "same-key replay test", "cross-tenant rejection test", "fresh install projection"],
343
+ "docs": ["README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
344
+ "acceptance": ["A host can compose a tenant-scoped PostgreSQL core repository without importing pg or reading secrets", "Core reads and booking/hold/lifecycle writes use a same-client transaction seam", "Idempotency, event, audit, overlap, and tenant scope are persisted through parameterized SQL", "Provider payment and public checkout boundaries remain explicit rather than being silently faked"]
345
+ },
346
+ {
347
+ "id": "BK-043",
348
+ "epic": "persistence",
349
+ "title": "Complete PostgreSQL manager configuration and operational reads",
350
+ "repository": "MaggieDash",
351
+ "dependsOn": ["BK-042"],
352
+ "status": "passed",
353
+ "plan": ["Persist catalog, staff, resource, schedule, closure, and settings mutations without deleting referenced booking data", "Expose tenant-scoped staff, resource, schedule, payment, health, and payment-health reads", "Add an explicit manager-method regression gate while keeping payment provider and webhook methods injected", "Exercise the configuration writes, idempotent audit/event records, and cleanup through real PostgreSQL"],
354
+ "implementation": ["schema/maggie-booking-install.sql", "backend/booking/postgres-core-repository.mjs", "backend/booking-adapter-contract.d.ts", "scripts/validate-booking-postgres-manager-methods.mjs", "scripts/validate-booking-postgres-core-repository.integration.mjs", "maggiedash.json", "scripts/validate-booking.mjs", "package.json", "README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
355
+ "tests": ["npm run booking:postgres-manager-methods:test", "npm run booking:postgres-core-repository:integration -- --database-url <disposable-db> --confirm", "npm test", "schema validator", "fresh install projection"],
356
+ "docs": ["README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
357
+ "acceptance": ["Configuration writes are tenant-scoped, idempotent, audited, and preserve variants referenced by existing bookings", "Schedule closures and operational reads are persisted through the same transaction seam", "The shipped manager repository exposes 29 database-backed methods", "Payment SDK operations and webhook verification remain explicit injected boundaries"]
358
+ },
359
+ {
360
+ "id": "BK-044",
361
+ "epic": "payments",
362
+ "title": "Persist provider-injected payment operations through PostgreSQL",
363
+ "repository": "MaggieDash",
364
+ "dependsOn": ["BK-024", "BK-025", "BK-043"],
365
+ "status": "passed",
366
+ "plan": ["Add a provider-neutral PostgreSQL payment adapter for start, reconcile, and refund operations", "Keep provider SDK calls outside database transactions and persist only normalized payment truth", "Make the service bypass long manager transactions for provider calls while preserving safe DTOs", "Exercise fake-gateway and real disposable PostgreSQL payment start/reconcile/refund cycles"],
367
+ "implementation": ["backend/booking/postgres-payment-adapter.mjs", "backend/booking/service.mjs", "backend/booking-adapter-contract.d.ts", "scripts/validate-booking-postgres-payment-adapter.mjs", "scripts/validate-booking-postgres-core-repository.integration.mjs", "maggiedash.json", "package.json", "README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
368
+ "tests": ["npm run booking:postgres-payment-adapter:test", "npm run booking:service:test", "npm run booking:postgres-core-repository:integration -- --database-url <disposable-db> --confirm", "npm test", "fresh install projection"],
369
+ "docs": ["README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
370
+ "acceptance": ["Payment start, reconciliation, and refund persistence require an injected provider gateway", "Provider calls do not execute while the manager core transaction is held", "Payment idempotency, booking payment status, event/audit, refund, and transaction records are persisted", "Raw provider payloads and credentials never cross the repository or DTO boundary"]
371
+ },
372
+ {
373
+ "id": "BK-045",
374
+ "epic": "customer",
375
+ "title": "Persist the public customer Booking journey",
376
+ "repository": "MaggieDash",
377
+ "dependsOn": ["BK-033", "BK-034", "BK-041", "BK-044"],
378
+ "status": "passed",
379
+ "plan": ["Add a customer token table storing only token hashes and host-sealed ciphertext", "Compose public catalog, availability, hold, checkout, payment-return, and cancellation methods with manager/payment adapters", "Require an injected token codec, namespaced idempotency replay, and manager transaction seam while keeping public DTOs free of customer/project/provider internals", "Exercise the six public methods through the adapter gate and real disposable PostgreSQL replay coverage while keeping real-host security controls explicit"],
380
+ "implementation": ["schema/maggie-booking-install.sql", "backend/booking/postgres-customer-adapter.mjs", "backend/booking-adapter-contract.d.ts", "scripts/validate-booking-postgres-customer-adapter.mjs", "maggiedash.json", "package.json", "README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
381
+ "tests": ["npm run booking:postgres-customer-adapter:test", "npm run booking:customer-flow:test", "npm run booking:customer-reference-host:test", "npm run booking:postgres-core-repository:integration -- --database-url <disposable-db> --confirm", "npm test", "schema validator", "fresh install projection"],
382
+ "docs": ["README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md"],
383
+ "acceptance": ["Public holds and checkout are tenant-bound and idempotent", "Return and cancellation require a short-lived token whose raw value is never persisted", "Customer responses use the public DTO boundary and never expose provider/customer internals", "The host still owns origin/CSRF, abuse, notification, token-key, and real browser/runtime evidence"]
384
+ },
385
+ {
386
+ "id": "BK-046",
387
+ "epic": "customer",
388
+ "title": "Recover customer checkout after provider failure",
389
+ "repository": "MaggieDash",
390
+ "dependsOn": ["BK-044", "BK-045"],
391
+ "status": "passed",
392
+ "plan": ["Reproduce the crash window where hold conversion succeeds but the provider call fails", "Keep the manager conversion idempotency key namespaced to the customer checkout", "Reuse a valid sealed token and provider idempotency key when retrying the pending booking", "Reject genuinely expired holds while allowing an already-converted checkout to recover"],
393
+ "implementation": ["backend/booking/postgres-customer-adapter.mjs", "scripts/validate-booking-postgres-customer-adapter.mjs", "package.json"],
394
+ "tests": ["npm run booking:postgres-customer-adapter:test", "npm run booking:postgres-core-repository:integration -- --database-url <disposable-db> --confirm", "node --check backend/booking/postgres-customer-adapter.mjs", "npm test"],
395
+ "docs": ["README.md", "backend/README.md", "docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/PRD.md"],
396
+ "acceptance": ["A provider failure after hold conversion leaves one pending booking that can be retried", "A retry replays the conversion and does not create another booking or token when a valid token exists", "Payment retry uses a stable provider idempotency key", "Active expired holds still fail closed and no public manager/provider internals are exposed"]
397
+ },
398
+ {
399
+ "id": "BK-047",
400
+ "epic": "operations",
401
+ "title": "Fail closed on a non-empty backup restore target",
402
+ "repository": "MaggieDash",
403
+ "dependsOn": ["BK-030"],
404
+ "status": "passed",
405
+ "plan": ["Inspect the restore public schema before any restore command", "Refuse a non-empty target before creating or applying the dump", "Preflight PostgreSQL server/client major-version compatibility and support an explicit client directory", "Prove the pre-existing target row remains unchanged after refusal", "Re-run the empty-target backup/restore parity path with matching client binaries"],
406
+ "implementation": ["scripts/validate-booking-postgres-backup-restore.integration.mjs", "README.md", "ops/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
407
+ "tests": ["disposable backup/restore integration with an empty target and --pg-bin-dir <matching-postgres-bin-dir>", "disposable backup/restore integration with a non-empty target", "default PATH version-mismatch failure names --pg-bin-dir", "node --check scripts/validate-booking-postgres-backup-restore.integration.mjs", "npm test"],
408
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/PROGRESS.md", "ops/README.md", "docs/BOOKING-HOST-ADAPTER.md"],
409
+ "acceptance": ["A target with public application tables is rejected before pg_restore", "The command does not delete, truncate, or modify the rejected target", "Matching PostgreSQL client binaries can be selected explicitly and incompatible defaults fail with remediation", "An empty target still produces custom-format restore and protected-table row-count parity", "The result exposes the empty-target preflight and client selection as named checks"]
410
+ },
411
+ {
412
+ "id": "BK-048",
413
+ "epic": "reporting",
414
+ "title": "Add tenant-scoped manager reporting",
415
+ "repository": "both",
416
+ "dependsOn": ["BK-043", "BK-027"],
417
+ "status": "passed",
418
+ "plan": ["Add a read-only reports route to the manager contract", "Aggregate totals and day/service/staff/location breakdowns inside the tenant and staff scope", "Add the Reports screen with date filters and permission handling", "Verify reference-host, route, repository, and installed-host projections"],
419
+ "implementation": ["contracts/booking-host-adapter-v1.json", "backend/booking/postgres-core-repository.mjs", "backend/booking/route-handler.mjs", "booking/src/booking.tsx", "scripts/validate-booking-postgres-core-repository.mjs", "scripts/validate-booking-route-handler.mjs", "docs/maggiedash-booking/README.md"],
420
+ "tests": ["npm run booking:postgres-core-repository:test", "npm run booking:reference-host:test", "npm run booking:ui:test", "npm test", "maggie booking inspect --project <host>"],
421
+ "docs": ["docs/BOOKING-HOST-ADAPTER.md", "docs/maggiedash-booking/README.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md", "docs/maggiedash-booking/PROGRESS.md"],
422
+ "acceptance": ["Reports are tenant-scoped and staff assignment scoped", "Date range validation rejects invalid and overlong ranges", "The screen renders totals and four breakdown tables with permission/error states", "The route count and installed host projection remain synchronized"]
423
+ },
424
+ {
425
+ "id": "BK-049",
426
+ "epic": "notifications",
427
+ "title": "Automate 24-hour booking reminders",
428
+ "repository": "both",
429
+ "dependsOn": ["BK-026"],
430
+ "status": "passed",
431
+ "plan": ["Select future confirmed bookings in the next 24 hours", "Queue one email reminder per booking with a stable tenant-scoped idempotency key", "Persist new outbox rows through the PostgreSQL worker transaction", "Keep recipient resolution server-side and document the production scheduler"],
432
+ "implementation": ["backend/booking/notifications.mjs", "backend/booking/runtime.mjs", "backend/booking/postgres-worker-repository.mjs", "contracts/booking-runtime-v1.json", "backend/booking/worker-contract.d.ts", "deploy/ora-maggie-booking-worker.service", "deploy/ora-maggie-booking-worker.timer"],
433
+ "tests": ["npm run booking:runtime:test", "npm run booking:postgres-worker-repository:test", "node --check backend/booking/runtime.mjs", "ORA Astro build", "reminder replay regression"],
434
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggie-booking-integration.md"],
435
+ "acceptance": ["A confirmed booking inside the 24-hour window queues exactly one booking.reminder", "A repeated worker cycle queues zero duplicates", "The PostgreSQL worker persists the new notification without raw customer email", "The host dispatcher can send the reminder through the existing Resend path"]
436
+ },
437
+ {
438
+ "id": "BK-050",
439
+ "epic": "payments",
440
+ "title": "Implement payment policies, deposits, and outstanding balances",
441
+ "repository": "both",
442
+ "dependsOn": ["BK-024", "BK-044", "BK-045", "BK-049"],
443
+ "status": "passed",
444
+ "plan": ["Normalize full, deposit, pay-later, and no-payment service policies", "Label attempts by deposit, balance, full, or adjustment purpose", "Project captured attempts and refunds into paid and balance-due fields", "Expose due amounts and payment purpose in checkout and manager screens", "Keep payment replay idempotent before mutable balance validation"],
445
+ "implementation": ["backend/booking/payment-gateway.mjs", "backend/booking/postgres-payment-adapter.mjs", "backend/booking/runtime.mjs", "schema/maggie-booking-install.sql", "booking/src/booking.tsx", "backend/booking/postgres-worker-repository.mjs"],
446
+ "tests": ["npm run booking:payment:test", "npm run booking:runtime:test", "npm run booking:postgres-payment-adapter:test", "npm run booking:reference-host:test", "npm test", "ORA Astro build"],
447
+ "docs": ["docs/maggiedash-booking/PAYMENT-GATEWAY.md", "docs/maggiedash-booking/DATA-MODEL.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
448
+ "acceptance": ["A deposit capture confirms the booking while leaving a balance due", "A later balance payment can never exceed the current balance", "Captured and refundable totals are aggregated rather than inferred from only the latest attempt", "A repeated payment command returns its original result even after the balance changes", "Host staging still requires migration and real Stripe evidence"]
449
+ },
450
+ {
451
+ "id": "BK-051",
452
+ "epic": "customer-operations",
453
+ "title": "Add manager customer history workspace",
454
+ "repository": "both",
455
+ "dependsOn": ["BK-039", "BK-045"],
456
+ "status": "passed",
457
+ "plan": ["Add a searchable customer directory without exposing raw provider or token fields", "Load one selected customer through the existing tenant-scoped detail route", "Show consent state and appointment history with bounded loading, empty, and error states", "Keep the installed ORA host projection aligned with the MaggieDash source"],
458
+ "implementation": ["booking/src/booking.tsx", "scripts/validate-booking-ui.mjs", "_maggie/booking/booking.tsx"],
459
+ "tests": ["npm run booking:ui:test", "npm test", "maggie booking inspect --project <host>", "ORA Astro build"],
460
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggie-booking-integration.md"],
461
+ "acceptance": ["The Customers screen searches the tenant-scoped directory", "Selecting a customer loads only that customer's safe details and booking history", "The screen exposes consent, loading, empty, retry, and error states", "The installed host projection and source UI retain the customer-history markers"]
462
+ },
463
+ {
464
+ "id": "BK-052",
465
+ "epic": "availability",
466
+ "title": "Complete schedule rule management without destructive UI writes",
467
+ "repository": "both",
468
+ "dependsOn": ["BK-023", "BK-027"],
469
+ "status": "passed",
470
+ "plan": ["Read the nested schedule response shape consistently", "Preserve all existing working hours, shifts, time-off rows, and closures when adding one rule", "Expose four rule types from the Schedule screen with validation for owner and time range", "Keep the installed ORA projection aligned with the MaggieDash UI"],
471
+ "implementation": ["booking/src/booking.tsx", "_maggie/booking/booking.tsx", "scripts/validate-booking-ui.mjs"],
472
+ "tests": ["npm run booking:ui:test", "npm test", "ORA Astro build"],
473
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
474
+ "acceptance": ["Adding one schedule rule does not delete unrelated schedule rows", "Working hours, shifts, time off, and closures use the existing audited schedule endpoint", "Invalid owner and interval inputs fail with bounded UI feedback", "The schedule screen renders the API's nested schedule response"]
475
+ },
476
+ {
477
+ "id": "BK-053",
478
+ "epic": "installation",
479
+ "title": "Merge Maggie rewrites into existing Astro middleware during install",
480
+ "repository": "ai-cmo-skills + MaggieDash",
481
+ "dependsOn": ["BK-006", "BK-008"],
482
+ "status": "passed",
483
+ "plan": ["Detect an existing conventional Astro defineMiddleware callback", "Insert an idempotent Booking/login/register/reset rewrite block without replacing host auth logic", "Record updated files and unsupported middleware warnings in install state", "Make Booking inspect fail when Astro middleware integration remains unresolved"],
484
+ "implementation": ["tools/clis/maggie_dash.py", "tools/clis/maggie_booking.py", "tools/tests/test_maggie_dash_install.py", "adapters/astro/host/src/middleware.ts"],
485
+ "tests": ["python3 -m unittest tools.tests.test_maggie_dash_install -v", "maggie booking inspect --project <host>", "git diff --check"],
486
+ "docs": ["docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/PROGRESS.md", "adapters/astro/README.md"],
487
+ "acceptance": ["A conventional existing middleware receives the rewrites automatically", "Repeating install does not duplicate the block", "A non-conventional middleware is preserved and reported as needs-attention", "The installer never writes secrets or replaces host-owned auth/redirect logic"]
488
+ },
489
+ {
490
+ "id": "BK-054",
491
+ "epic": "catalogue",
492
+ "title": "Add editable service and treatment catalogue management",
493
+ "repository": "both",
494
+ "dependsOn": ["BK-023", "BK-027"],
495
+ "status": "passed",
496
+ "plan": ["Add a specialized catalogue view with service and variant rows", "Keep stable service and variant IDs when editing an existing service", "Expose duration, price, currency, payment policy, and active/inactive controls", "Keep the installed ORA projection aligned with the MaggieDash UI"],
497
+ "implementation": ["booking/src/booking.tsx", "_maggie/booking/booking.tsx", "scripts/validate-booking-ui.mjs", "scripts/validate-booking-configuration.mjs"],
498
+ "tests": ["npm run booking:ui:test", "npm test", "ORA Astro build"],
499
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/README.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
500
+ "acceptance": ["Managers can select a service and edit its existing variant instead of creating a new record", "Changing active status updates the service and variant while preserving their IDs", "Payment policy and treatment pricing are written through the existing audited idempotent endpoint", "The source UI and installed ORA host pass their UI/configuration/build gates"]
501
+ },
502
+ {
503
+ "id": "BK-055",
504
+ "epic": "team-and-resources",
505
+ "title": "Add editable staff and resource management",
506
+ "repository": "both",
507
+ "dependsOn": ["BK-023", "BK-027"],
508
+ "status": "passed",
509
+ "plan": ["Add dedicated staff and resource views with search and stable selection", "Keep existing staff/resource IDs when editing profile, assignment, capacity, or status", "Expose staff active/bookable state and resource active state through the existing audited endpoints", "Keep the installed ORA projection aligned with the MaggieDash UI"],
510
+ "implementation": ["booking/src/booking.tsx", "_maggie/booking/booking.tsx", "scripts/validate-booking-ui.mjs", "scripts/validate-booking-configuration.mjs"],
511
+ "tests": ["npm run booking:ui:test", "npm run booking:configuration:test", "npm test", "ORA Astro build"],
512
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/README.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
513
+ "acceptance": ["Managers can select and edit an existing staff profile without creating a replacement ID", "Staff location/service assignments, active state, and bookable state are editable", "Managers can select and edit an existing resource name, type, location, capacity, and active state", "The source UI and installed ORA host pass their UI/configuration/build gates"]
514
+ },
515
+ {
516
+ "id": "BK-056",
517
+ "epic": "availability",
518
+ "title": "Add editable schedule-rule management",
519
+ "repository": "both",
520
+ "dependsOn": ["BK-023", "BK-027", "BK-052"],
521
+ "status": "passed",
522
+ "plan": ["Flatten working hours, shifts, time off, and closures into a searchable rule list", "Keep stable rule IDs when editing and allow safe rule-type changes", "Preserve unrelated schedule rows in every write", "Keep the installed ORA projection aligned with the MaggieDash UI"],
523
+ "implementation": ["booking/src/booking.tsx", "_maggie/booking/booking.tsx", "scripts/validate-booking-ui.mjs"],
524
+ "tests": ["npm run booking:ui:test", "npm test", "ORA Astro build"],
525
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/README.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
526
+ "acceptance": ["Managers can search and select each schedule rule type", "Editing a rule preserves its ID and does not remove unrelated rows", "Working-hours and interval validation fails with bounded UI feedback", "The source UI and installed ORA host pass their UI/configuration/build gates"]
527
+ },
528
+ {
529
+ "id": "BK-057",
530
+ "epic": "manager-operations",
531
+ "title": "Make manager booking creation use live configuration",
532
+ "repository": "both",
533
+ "dependsOn": ["BK-023", "BK-027", "BK-028"],
534
+ "status": "passed",
535
+ "plan": ["Load catalogue, staff, and resource data for the manager booking form", "Replace manual service/location IDs with live selectors", "Require a staff or resource allocation before submitting a manager booking", "Keep the installed ORA projection aligned with the MaggieDash UI"],
536
+ "implementation": ["booking/src/booking.tsx", "_maggie/booking/booking.tsx", "scripts/validate-booking-reference-host.mjs", "scripts/validate-booking-ui.mjs"],
537
+ "tests": ["npm run booking:ui:test", "npm run booking:reference-host:test", "npm test", "ORA Astro build"],
538
+ "docs": ["docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/README.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"],
539
+ "acceptance": ["Manager booking creation selects active service variants from the live catalogue", "Location, staff, and resource choices come from the tenant-scoped host", "Submission includes a staffId or resourceId and fails with bounded feedback when neither is selected", "The source UI and installed ORA host pass their UI/reference-host/build gates"]
540
+ },
541
+ {
542
+ "id": "BK-058",
543
+ "epic": "installation",
544
+ "title": "Add safe first-run Booking setup checklist",
545
+ "repository": "ai-cmo-skills",
546
+ "dependsOn": ["BK-006", "BK-008"],
547
+ "status": "passed",
548
+ "plan": ["Inspect installation artifacts and Astro middleware integration", "Check only the presence of required environment keys without printing values", "Report schema, owner-registration, Stripe webhook, and worker next steps", "Keep the command read-only and preserve host-owned migration and deployment decisions"],
549
+ "implementation": ["tools/clis/maggie_booking.py", "packages/maggie-cli/bin/maggie.js", "tools/tests/test_maggie_booking.py"],
550
+ "tests": ["python3 -m unittest tools.tests.test_maggie_booking -v", "maggie booking setup --project <host>", "maggie booking inspect --project <host>", "git diff --check"],
551
+ "docs": ["skills/maggie-booking/SKILL.md", "docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/PROGRESS.md", "docs/maggiedash-booking/README.md"],
552
+ "acceptance": ["A fresh install receives actionable setup status and next steps", "Reports never contain DATABASE_URL, Resend, Stripe, or other secret values", "The checklist does not connect to PostgreSQL, apply schema, create an owner, send email, configure Stripe, or deploy", "Escaped Astro regex path markers are recognized by both setup and inspect"]
553
+ },
554
+ {
555
+ "id": "BK-059",
556
+ "epic": "installation",
557
+ "title": "Add explicit one-command host bootstrap",
558
+ "repository": "ai-cmo-skills",
559
+ "dependsOn": ["BK-058"],
560
+ "status": "passed",
561
+ "plan": ["Add an explicit bootstrap flag to the Booking installer", "Run only the installed host schema script with the existing project environment", "Reject bootstrap with dry-run/diff and preserve the default read-only migration behavior", "Document the backup and owner-registration boundaries"],
562
+ "implementation": ["tools/clis/maggie_booking.py", "tools/tests/test_maggie_booking.py", "skills/maggie-booking/SKILL.md"],
563
+ "tests": ["python3 -m unittest tools.tests.test_maggie_booking -v", "npm pack --dry-run", "maggie booking setup --project <host>", "git diff --check"],
564
+ "docs": ["README.md", "packages/maggie-cli/README.md", "docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/TASKS.md", "docs/maggiedash-booking/PROGRESS.md"],
565
+ "acceptance": ["A reviewed new Astro host can install and apply the idempotent schema with one explicit `--bootstrap` command", "Default install remains non-migrating", "Bootstrap never creates an owner, sends email, configures Stripe, or deploys", "A failed or incompatible bootstrap returns a non-zero status without hiding the host script error"]
566
+ },
567
+ {
568
+ "id": "BK-060",
569
+ "epic": "customer experience",
570
+ "title": "Add token-bound customer self-service rescheduling",
571
+ "repository": "MaggieDash + ai-cmo-skills",
572
+ "dependsOn": ["BK-033", "BK-041", "BK-059"],
573
+ "status": "passed",
574
+ "plan": ["Extend the public customer contract with a reschedule endpoint", "Validate token, future time, booking status, tenant scope, conflict, and idempotency", "Expose available slots and reschedule controls on the payment-return page", "Queue the existing Resend rescheduled notification and mirror the host adapter"],
575
+ "implementation": ["backend/booking/customer-flow.mjs", "backend/booking/customer-route-handler.mjs", "backend/booking/postgres-customer-adapter.mjs", "backend/booking/customer-reference-host.mjs", "booking/src/customer.tsx", "adapters/astro/host/src/lib/maggie/booking.ts"],
576
+ "tests": ["npm run booking:customer-flow:test", "npm run booking:customer-reference-host:test", "npm run booking:postgres-customer-adapter:test", "npm run booking:customer-ui:test", "npm test", "git diff --check"],
577
+ "docs": ["docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/USER-JOURNEYS.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md", "docs/maggiedash-booking/PROGRESS.md"],
578
+ "acceptance": ["A customer with a valid booking token can choose a future available slot and move the booking", "Wrong/expired tokens, terminal booking states, past times, conflicts, and cross-tenant requests fail closed", "Repeated requests with the same idempotency key replay the original result", "A booking.rescheduled email is queued through the host Resend outbox", "Manager rescheduling remains available and the public DTO contains only safe slot-selection fields"]
579
+ },
580
+ {
581
+ "id": "BK-061",
582
+ "epic": "customer experience",
583
+ "title": "Add Resend customer-manage links with separate token lifetimes",
584
+ "repository": "MaggieDash + ai-cmo-skills",
585
+ "dependsOn": ["BK-026", "BK-033", "BK-060"],
586
+ "status": "passed",
587
+ "plan": ["Separate short-lived payment-return tokens from long-lived customer-manage tokens", "Persist token purpose with a backwards-compatible schema migration and lookup index", "Create or reuse a 30-day sealed manage token for checkout and manager-created booking notifications", "Include the manage link in the Astro/ORA Resend worker without exposing raw tokens in the outbox"],
588
+ "implementation": ["schema/maggie-booking-install.sql", "backend/booking/postgres-customer-adapter.mjs", "adapters/astro/host/scripts/maggie-booking-worker.mjs", "scripts/maggie-booking-worker.mjs", "scripts/validate-booking-schema.mjs", "scripts/validate-booking-postgres-customer-adapter.mjs"],
589
+ "tests": ["npm run booking:postgres-customer-adapter:test", "npm run booking:schema:validate", "npm test", "ORA customer adapter validator", "ORA Astro build"],
590
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md", "docs/maggiedash-booking/PROGRESS.md"],
591
+ "acceptance": ["Payment-return tokens remain short-lived and manage tokens are separately identified", "Resend workers include a safe customer-manage link for booking notifications", "Expired, revoked, or malformed tokens fail closed", "The migration is idempotent and existing payment tokens remain compatible"]
592
+ },
593
+ {
594
+ "id": "BK-062",
595
+ "epic": "customer experience",
596
+ "title": "Add tenant-scoped waitlist and Resend availability notification",
597
+ "repository": "MaggieDash + ai-cmo-skills",
598
+ "dependsOn": ["BK-033", "BK-043", "BK-054", "BK-061"],
599
+ "status": "passed",
600
+ "plan": [
601
+ "Add an idempotent tenant-scoped waitlist table with service, location, staff, preferred time, priority, and status fields",
602
+ "Expose a public noindex join route that returns only safe waitlist data",
603
+ "Add manager queue filtering and audited notify, convert, cancel, and priority actions with staff scope",
604
+ "Queue a Resend availability notification through the existing host outbox and worker"
605
+ ],
606
+ "implementation": [
607
+ "schema/maggie-booking-install.sql",
608
+ "backend/booking/customer-flow.mjs",
609
+ "backend/booking/customer-route-handler.mjs",
610
+ "backend/booking/postgres-customer-adapter.mjs",
611
+ "backend/booking/postgres-core-repository.mjs",
612
+ "backend/booking/notifications.mjs",
613
+ "backend/booking/postgres-worker-repository.mjs",
614
+ "backend/booking/route-handler.mjs",
615
+ "booking/src/booking.tsx",
616
+ "booking/src/customer.tsx",
617
+ "adapters/astro/host/scripts/maggie-booking-worker.mjs",
618
+ "adapters/astro/host/src/lib/maggie/booking.ts"
619
+ ],
620
+ "tests": [
621
+ "npm test",
622
+ "npm run booking:customer-flow:test",
623
+ "npm run booking:schema:validate",
624
+ "ORA service/route/customer/schema/UI/host validators",
625
+ "ORA Astro build"
626
+ ],
627
+ "docs": [
628
+ "docs/maggiedash-booking/README.md",
629
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
630
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
631
+ "docs/maggiedash-booking/PROGRESS.md",
632
+ "skills/maggie-booking/SKILL.md"
633
+ ],
634
+ "acceptance": [
635
+ "A customer can join a tenant-scoped waitlist when no suitable slot is available and repeated idempotency keys replay safely",
636
+ "Managers can filter the queue and notify, convert, cancel, or reprioritize entries within their staff scope",
637
+ "Waitlist changes are audited and notification intents never expose bearer tokens in the outbox",
638
+ "The host worker can send a safe availability email through Resend; real delivery and scheduler evidence remain host release gates"
639
+ ]
640
+ },
641
+ {
642
+ "id": "BK-063",
643
+ "epic": "customer experience",
644
+ "title": "Make waitlist conversion create and link a real booking",
645
+ "repository": "MaggieDash + ai-cmo-skills",
646
+ "dependsOn": ["BK-062"],
647
+ "status": "passed",
648
+ "plan": [
649
+ "Add an additive converted-booking link to the waitlist schema",
650
+ "Create the booking, segment, allocation, payment-policy projection, event, and audit record in the same transaction as the queue update",
651
+ "Recheck tenant, staff/resource eligibility, availability conflicts, and idempotency before conversion",
652
+ "Expose a manager conversion form and queue the normal confirmation email when the created booking is confirmed"
653
+ ],
654
+ "implementation": [
655
+ "schema/maggie-booking-install.sql",
656
+ "backend/booking/postgres-core-repository.mjs",
657
+ "backend/booking/reference-host.mjs",
658
+ "booking/src/booking.tsx",
659
+ "adapters/astro/host/src/lib/maggie/booking.ts",
660
+ "scripts/validate-booking-postgres-core-repository.mjs",
661
+ "scripts/validate-booking-reference-host.mjs"
662
+ ],
663
+ "tests": [
664
+ "npm test",
665
+ "npm run booking:postgres-core-repository:test",
666
+ "npm run booking:reference-host:test",
667
+ "ORA reference-host/host validators",
668
+ "ORA Astro build",
669
+ "git diff --check"
670
+ ],
671
+ "docs": [
672
+ "docs/maggiedash-booking/README.md",
673
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
674
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
675
+ "docs/maggiedash-booking/PROGRESS.md",
676
+ "skills/maggie-booking/SKILL.md"
677
+ ],
678
+ "acceptance": [
679
+ "A manager conversion creates exactly one booking and links convertedBookingId to it",
680
+ "The server rejects missing times, unavailable allocations, invalid staff/resources, cross-tenant data, and repeat conversion with a different idempotency key",
681
+ "The waitlist and booking changes share one transaction and produce auditable event records",
682
+ "Confirmed conversions use the existing host Resend confirmation path; real email delivery remains a host release gate"
683
+ ]
684
+ },
685
+ {
686
+ "id": "BK-064",
687
+ "epic": "onboarding and operations",
688
+ "title": "Expose first-run payment readiness in the Booking overview",
689
+ "repository": "MaggieDash + ai-cmo-skills",
690
+ "dependsOn": ["BK-058", "BK-059", "BK-063"],
691
+ "status": "passed",
692
+ "plan": [
693
+ "Read the existing payment-health contract without exposing Stripe secrets",
694
+ "Add an overview setup panel with Stripe status, test/live mode, and the exact webhook URL",
695
+ "Allow the operator to copy the webhook URL and link to Booking settings",
696
+ "Mirror the component into the ORA host and document the remaining host-owned configuration"
697
+ ],
698
+ "implementation": [
699
+ "booking/src/booking.tsx",
700
+ "_maggie/booking/booking.tsx",
701
+ "docs/maggiedash-booking/README.md",
702
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
703
+ "docs/maggiedash-booking/PROGRESS.md",
704
+ "skills/maggie-booking/SKILL.md"
705
+ ],
706
+ "tests": [
707
+ "npm test",
708
+ "booking UI validator",
709
+ "ORA Astro build",
710
+ "git diff --check"
711
+ ],
712
+ "docs": [
713
+ "docs/maggiedash-booking/README.md",
714
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
715
+ "docs/maggiedash-booking/PROGRESS.md",
716
+ "skills/maggie-booking/SKILL.md"
717
+ ],
718
+ "acceptance": [
719
+ "The manager overview shows Stripe connection status without rendering secret values",
720
+ "The operator can copy the current host webhook URL and see test/live mode",
721
+ "An unconfigured Stripe account gets actionable secret-store and webhook guidance",
722
+ "Secret presence reports pending until server-side verification explicitly confirms Stripe charges and payouts",
723
+ "A verified account remains connected across requests only while the server-secret fingerprint is unchanged",
724
+ "Central and ORA Booking UI builds remain valid"
725
+ ]
726
+ },
727
+ {
728
+ "id": "BK-065",
729
+ "epic": "onboarding and operations",
730
+ "title": "Fail the Booking setup checklist on invalid secrets",
731
+ "repository": "ai-cmo-skills",
732
+ "dependsOn": ["BK-058", "BK-064"],
733
+ "status": "passed",
734
+ "plan": [
735
+ "Read environment values only in memory for length/pair validation",
736
+ "Mark short BOOKING_TOKEN_SECRET values invalid and partially configured Stripe values degraded",
737
+ "Add actionable next steps without serializing any secret values",
738
+ "Add regression coverage for invalid configuration and preserve the read-only contract"
739
+ ],
740
+ "implementation": [
741
+ "tools/clis/maggie_booking.py",
742
+ "tools/tests/test_maggie_booking.py",
743
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
744
+ "docs/maggiedash-booking/PROGRESS.md",
745
+ "skills/maggie-booking/SKILL.md"
746
+ ],
747
+ "tests": [
748
+ "python3 -m unittest tools.tests.test_maggie_booking -q",
749
+ "maggie booking tasks validate",
750
+ "git diff --check"
751
+ ],
752
+ "docs": [
753
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
754
+ "docs/maggiedash-booking/PROGRESS.md",
755
+ "skills/maggie-booking/SKILL.md"
756
+ ],
757
+ "acceptance": [
758
+ "A short token is reported as invalid and causes setup to require configuration",
759
+ "Only one Stripe key is reported as degraded with a paired-key next step",
760
+ "Secret values never appear in the JSON result or test output",
761
+ "Replacing a Stripe secret invalidates the previous connected state"
762
+ ]
763
+ },
764
+ {
765
+ "id": "BK-066",
766
+ "epic": "onboarding and operations",
767
+ "title": "Make installed Booking UI validators resolve the installed workspace",
768
+ "repository": "MaggieDash + ORA host",
769
+ "dependsOn": ["BK-064", "BK-065"],
770
+ "status": "passed",
771
+ "plan": [
772
+ "Detect the source workspace when running inside MaggieDash",
773
+ "Fall back to the installed sibling _maggie/booking workspace on a host project",
774
+ "Keep the failure message explicit when neither workspace exists",
775
+ "Run central and ORA UI/customer validators after the path correction"
776
+ ],
777
+ "implementation": [
778
+ "scripts/validate-booking-ui.mjs",
779
+ "maggiedash/scripts/validate-booking-ui.mjs",
780
+ "docs/maggiedash-booking/PROGRESS.md",
781
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"
782
+ ],
783
+ "tests": [
784
+ "MaggieDash npm test",
785
+ "MaggieDash booking:ui:test",
786
+ "ORA validate-booking-ui.mjs",
787
+ "ORA validate-booking-customer-ui.mjs",
788
+ "git diff --check"
789
+ ],
790
+ "docs": [
791
+ "docs/maggiedash-booking/PROGRESS.md",
792
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"
793
+ ],
794
+ "acceptance": [
795
+ "Central validators read booking/src",
796
+ "Installed host validators read _maggie/booking",
797
+ "Missing workspaces fail with a bounded diagnostic instead of an ENOENT stack"
798
+ ]
799
+ },
800
+ {
801
+ "id": "BK-067",
802
+ "epic": "waitlist and notifications",
803
+ "title": "Automatically match newly available slots to the waitlist",
804
+ "repository": "MaggieDash + ORA host",
805
+ "dependsOn": ["BK-062", "BK-063", "BK-066"],
806
+ "status": "passed",
807
+ "plan": [
808
+ "Add a provider-neutral worker matcher ordered by priority then FIFO",
809
+ "Require explicit service/location scope and preserve staff/time preferences",
810
+ "Queue one idempotent booking.waitlist.available Resend notification per offered slot",
811
+ "Persist notified and offered-slot state without auto-reserving or auto-creating a booking"
812
+ ],
813
+ "implementation": [
814
+ "backend/booking/waitlist.mjs",
815
+ "backend/booking/runtime.mjs",
816
+ "backend/booking/postgres-worker-repository.mjs",
817
+ "schema/maggie-booking-install.sql",
818
+ "adapters/astro/host/scripts/maggie-booking-worker.mjs",
819
+ "maggiedash/backend/booking/waitlist.mjs",
820
+ "maggiedash/backend/booking/postgres-worker-repository.mjs",
821
+ "maggiedash/schema/maggie-booking-install.sql",
822
+ "scripts/maggie-booking-worker.mjs"
823
+ ],
824
+ "tests": [
825
+ "MaggieDash npm test",
826
+ "waitlist priority/FIFO and idempotent replay regression",
827
+ "ORA worker/runtime/UI validators",
828
+ "git diff --check"
829
+ ],
830
+ "docs": [
831
+ "docs/maggiedash-booking/README.md",
832
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
833
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
834
+ "docs/maggiedash-booking/PROGRESS.md",
835
+ "skills/maggie-booking/SKILL.md"
836
+ ],
837
+ "acceptance": [
838
+ "Only waiting entries matching service, location, staff, and preferred time receive an offer",
839
+ "Priority is descending with FIFO tie-break",
840
+ "The same offered slot is not repeatedly sent to the next customer on every worker tick",
841
+ "A notification only enters the Resend outbox; the customer must claim the live slot"
842
+ ]
843
+ },
844
+ {
845
+ "id": "BK-068",
846
+ "epic": "customer self-service",
847
+ "title": "Add customer self-service booking history",
848
+ "repository": "MaggieDash + ORA host",
849
+ "dependsOn": ["BK-061", "BK-066"],
850
+ "status": "passed",
851
+ "plan": [
852
+ "Add a GET manage endpoint authenticated by the existing 30-day manage token",
853
+ "Resolve the token's tenant/customer scope and return only safe booking DTOs",
854
+ "Render current and historical appointments on the optional customer page",
855
+ "Cover fixture, PostgreSQL adapter, route, UI, and installed-host regressions"
856
+ ],
857
+ "implementation": [
858
+ "backend/booking/customer-flow.mjs",
859
+ "backend/booking/customer-route-handler.mjs",
860
+ "backend/booking/postgres-customer-adapter.mjs",
861
+ "backend/booking/customer-reference-host.mjs",
862
+ "booking/src/customer.tsx",
863
+ "contracts/booking-customer-surface-v1.json",
864
+ "maggiedash/backend/booking/customer-flow.mjs",
865
+ "maggiedash/backend/booking/postgres-customer-adapter.mjs",
866
+ "_maggie/booking/customer.tsx"
867
+ ],
868
+ "tests": [
869
+ "MaggieDash customer-flow/reference-host/PostgreSQL/UI validators",
870
+ "ORA customer-flow/reference-host/PostgreSQL/UI validators",
871
+ "MaggieDash npm test",
872
+ "ORA npm run build",
873
+ "git diff --check"
874
+ ],
875
+ "docs": [
876
+ "docs/maggiedash-booking/README.md",
877
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
878
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
879
+ "docs/maggiedash-booking/PROGRESS.md",
880
+ "skills/maggie-booking/SKILL.md"
881
+ ],
882
+ "acceptance": [
883
+ "A valid, unexpired manage token returns current and historical bookings for one tenant/customer",
884
+ "Payment tokens and invalid/revoked/expired tokens cannot read customer history",
885
+ "Public history DTOs omit customer identity, project, and token fields",
886
+ "The customer page shows appointment history without requiring manager credentials"
887
+ ]
888
+ },
889
+ {
890
+ "id": "BK-069",
891
+ "epic": "installation and first-run setup",
892
+ "title": "Make reviewed Booking bootstrap provision its implementation secret",
893
+ "repository": "ai-cmo-skills",
894
+ "dependsOn": ["BK-058", "BK-059", "BK-065"],
895
+ "status": "passed",
896
+ "plan": [
897
+ "Generate a cryptographically random public-booking secret only during explicit bootstrap",
898
+ "Preserve valid existing values and fail closed on short configured values",
899
+ "Keep the secret out of command output, reports, tests, and documentation values",
900
+ "Document the local .env and external secret-store boundaries"
901
+ ],
902
+ "implementation": [
903
+ "tools/clis/maggie_booking.py",
904
+ "packages/maggie-cli/README.md",
905
+ "skills/maggie-booking/SKILL.md",
906
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
907
+ "tools/tests/test_maggie_booking.py"
908
+ ],
909
+ "tests": [
910
+ "python3 -m unittest tools.tests.test_maggie_booking -v",
911
+ "generated secret is at least 32 characters and idempotent",
912
+ "short configured secret is rejected without replacement",
913
+ "git diff --check"
914
+ ],
915
+ "docs": [
916
+ "docs/maggiedash-booking/TASKS.md",
917
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
918
+ "docs/maggiedash-booking/PROGRESS.md",
919
+ "packages/maggie-cli/README.md",
920
+ "skills/maggie-booking/SKILL.md",
921
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
922
+ ],
923
+ "acceptance": [
924
+ "A reviewed bootstrap creates BOOKING_TOKEN_SECRET in the local host .env when absent",
925
+ "A valid existing secret remains byte-for-byte unchanged",
926
+ "A short existing secret returns a bounded failure instead of being overwritten",
927
+ "No CLI output or serialized checklist contains the generated secret"
928
+ ]
929
+ },
930
+ {
931
+ "id": "BK-070",
932
+ "epic": "installation and first-run setup",
933
+ "title": "Add transactional Booking schema dry-run",
934
+ "repository": "MaggieDash + ORA host",
935
+ "dependsOn": ["BK-059", "BK-069"],
936
+ "status": "passed",
937
+ "plan": [
938
+ "Add --dry-run to the installed host schema command",
939
+ "Run all core, host-extension, and Booking SQL in one transaction",
940
+ "Rollback after successful validation and rollback on errors",
941
+ "Document the preflight and preserve explicit --apply --confirm semantics"
942
+ ],
943
+ "implementation": [
944
+ "adapters/astro/host/scripts/maggie-booking-schema.mjs",
945
+ "scripts/maggie-booking-schema.mjs",
946
+ "docs/maggie-booking-integration.md",
947
+ "skills/maggie-booking/SKILL.md",
948
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
949
+ ],
950
+ "tests": [
951
+ "node --check adapters/astro/host/scripts/maggie-booking-schema.mjs",
952
+ "node --check scripts/maggie-booking-schema.mjs",
953
+ "ORA live migration dry-run passed and rolled back",
954
+ "git diff --check"
955
+ ],
956
+ "docs": [
957
+ "docs/maggiedash-booking/TASKS.md",
958
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
959
+ "docs/maggiedash-booking/PROGRESS.md",
960
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"
961
+ ],
962
+ "acceptance": [
963
+ "--dry-run validates all three migration files against the host PostgreSQL server",
964
+ "A successful dry-run leaves the database schema unchanged",
965
+ "--dry-run and --apply cannot be combined",
966
+ "Only --apply --confirm commits the migration"
967
+ ]
968
+ },
969
+ {
970
+ "id": "BK-071",
971
+ "epic": "email delivery and host compatibility",
972
+ "title": "Accept the existing Resend sender-key convention in the generic host",
973
+ "repository": "MaggieDash + ORA host",
974
+ "dependsOn": ["BK-026", "BK-058"],
975
+ "status": "passed",
976
+ "plan": [
977
+ "Resolve EMAIL_FROM first and RESEND_FROM_EMAIL as the compatible fallback",
978
+ "Use the same sender resolution for account invitations and worker delivery",
979
+ "Keep the secret-safe setup/readiness contract aligned with both names",
980
+ "Add source validator coverage and verify the ORA mirror build"
981
+ ],
982
+ "implementation": [
983
+ "adapters/astro/host/src/lib/maggie/auth.ts",
984
+ "adapters/astro/host/scripts/maggie-booking-worker.mjs",
985
+ "scripts/validate-astro-host-bootstrap.mjs",
986
+ "src/lib/maggie/booking.ts"
987
+ ],
988
+ "tests": [
989
+ "MaggieDash booking:host-bootstrap:test",
990
+ "ORA npm run build",
991
+ "node --check adapters/astro/host/scripts/maggie-booking-worker.mjs",
992
+ "git diff --check"
993
+ ],
994
+ "docs": [
995
+ "docs/maggiedash-booking/TASKS.md",
996
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
997
+ "docs/maggiedash-booking/PROGRESS.md",
998
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"
999
+ ],
1000
+ "acceptance": [
1001
+ "Hosts with only RESEND_FROM_EMAIL pass account-email and worker sender configuration",
1002
+ "EMAIL_FROM remains the first-choice override",
1003
+ "No Resend API key or sender value is exposed in a DTO or readiness report"
1004
+ ]
1005
+ },
1006
+ {
1007
+ "id": "BK-072",
1008
+ "epic": "manager booking operations",
1009
+ "title": "Add multi-treatment manager appointments",
1010
+ "repository": "MaggieDash + ORA host",
1011
+ "dependsOn": ["BK-021", "BK-027", "BK-057", "BK-071"],
1012
+ "status": "passed",
1013
+ "plan": [
1014
+ "Accept a bounded segments array while preserving the single-treatment request shape",
1015
+ "Validate exact duration, same location/currency, allocation eligibility, availability, and internal overlap",
1016
+ "Persist one booking with segment rows and per-segment allocations in the existing idempotent transaction",
1017
+ "Expose add/remove treatment controls in the manager form and mirror the host implementation in ORA"
1018
+ ],
1019
+ "implementation": [
1020
+ "backend/booking/postgres-core-repository.mjs",
1021
+ "backend/booking/reference-host.mjs",
1022
+ "booking/src/booking.tsx",
1023
+ "scripts/validate-booking-reference-host.mjs",
1024
+ "scripts/validate-booking-ui.mjs",
1025
+ "_maggie/booking/booking.tsx"
1026
+ ],
1027
+ "tests": [
1028
+ "npm test",
1029
+ "node scripts/validate-booking-reference-host.mjs",
1030
+ "ORA node scripts/validate-booking-reference-host.mjs",
1031
+ "ORA npm run build",
1032
+ "git diff --check"
1033
+ ],
1034
+ "docs": [
1035
+ "docs/maggiedash-booking/TASKS.md",
1036
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1037
+ "docs/maggiedash-booking/PROGRESS.md",
1038
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1039
+ "skills/maggie-booking/SKILL.md",
1040
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
1041
+ ],
1042
+ "acceptance": [
1043
+ "A manager can create a booking with up to 12 treatment segments from the live catalogue",
1044
+ "Every segment has a server-validated time range, price/currency, and staff/resource allocation",
1045
+ "Segments share one location and currency and cannot overlap on the same staff member or resource",
1046
+ "Booking, segments, allocations, event, and audit writes replay safely under one idempotency key",
1047
+ "The central and ORA reference-host regressions and host build pass"
1048
+ ]
1049
+ },
1050
+ {
1051
+ "id": "BK-073",
1052
+ "epic": "public customer booking",
1053
+ "title": "Add public multi-treatment booking",
1054
+ "repository": "MaggieDash + ORA host",
1055
+ "dependsOn": ["BK-033", "BK-034", "BK-045", "BK-072"],
1056
+ "status": "passed",
1057
+ "plan": [
1058
+ "Accept a bounded public segments array while preserving the single-treatment request shape",
1059
+ "Expose combined-duration availability for a selected treatment sequence",
1060
+ "Persist segment metadata on the customer hold and convert every segment into booking rows and allocations",
1061
+ "Add a public treatment picker, total estimate, and contiguous segment construction to the customer page"
1062
+ ],
1063
+ "implementation": [
1064
+ "backend/booking/customer-flow.mjs",
1065
+ "backend/booking/customer-route-handler.mjs",
1066
+ "backend/booking/postgres-core-repository.mjs",
1067
+ "backend/booking/postgres-customer-adapter.mjs",
1068
+ "backend/booking/customer-reference-host.mjs",
1069
+ "backend/booking/reference-host.mjs",
1070
+ "schema/maggie-booking-install.sql",
1071
+ "booking/src/customer.tsx",
1072
+ "_maggie/booking/customer.tsx"
1073
+ ],
1074
+ "tests": [
1075
+ "npm test",
1076
+ "npm run booking:customer-reference-host:test",
1077
+ "npm run booking:postgres-customer-adapter:test",
1078
+ "ORA customer-flow/reference-host/UI validators",
1079
+ "ORA npm run build",
1080
+ "git diff --check"
1081
+ ],
1082
+ "docs": [
1083
+ "docs/maggiedash-booking/TASKS.md",
1084
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1085
+ "docs/maggiedash-booking/PROGRESS.md",
1086
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1087
+ "skills/maggie-booking/SKILL.md",
1088
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
1089
+ ],
1090
+ "acceptance": [
1091
+ "A public customer can select multiple active treatments and see a combined-duration availability result",
1092
+ "The public hold validates ordered segments, one location/currency/payment policy, exact durations, assignments, and conflicts",
1093
+ "Checkout returns one booking containing every segment with the summed price and token-bound customer controls",
1094
+ "Single-treatment requests remain backward compatible and central/ORA reference-host plus host build gates pass"
1095
+ ]
1096
+ },
1097
+ {
1098
+ "id": "BK-074",
1099
+ "epic": "booking lifecycle",
1100
+ "title": "Make multi-treatment rescheduling segment-safe",
1101
+ "repository": "MaggieDash + ORA host",
1102
+ "dependsOn": ["BK-072", "BK-073"],
1103
+ "status": "passed",
1104
+ "plan": [
1105
+ "Preserve segment-to-allocation identity when creating manager and converted customer bookings",
1106
+ "Shift every treatment segment and its allocation by the same reschedule delta",
1107
+ "Check conflicts independently for every staff/resource segment and preserve single-treatment compatibility",
1108
+ "Exercise customer and PostgreSQL repository multi-treatment rescheduling in central and ORA validators"
1109
+ ],
1110
+ "implementation": [
1111
+ "backend/booking/postgres-core-repository.mjs",
1112
+ "backend/booking/customer-reference-host.mjs",
1113
+ "scripts/validate-booking-postgres-core-repository.mjs",
1114
+ "scripts/validate-booking-customer-reference-host.mjs"
1115
+ ],
1116
+ "tests": [
1117
+ "npm run booking:postgres-core-repository:test",
1118
+ "npm run booking:customer-reference-host:test",
1119
+ "ORA customer reference-host validator",
1120
+ "ORA npm run build",
1121
+ "git diff --check"
1122
+ ],
1123
+ "docs": [
1124
+ "docs/maggiedash-booking/TASKS.md",
1125
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1126
+ "docs/maggiedash-booking/PROGRESS.md",
1127
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1128
+ "skills/maggie-booking/SKILL.md",
1129
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
1130
+ "docs/maggiedash-booking/README.md"
1131
+ ],
1132
+ "acceptance": [
1133
+ "New manager and customer-converted bookings link each allocation to its segment",
1134
+ "Rescheduling a multi-treatment booking shifts all segment and allocation intervals without collapsing them into one resource",
1135
+ "Each target segment is conflict-checked and the original total duration is preserved",
1136
+ "Single-treatment rescheduling remains compatible and central/ORA lifecycle validators pass"
1137
+ ]
1138
+ },
1139
+ {
1140
+ "id": "BK-075",
1141
+ "epic": "installation and configuration",
1142
+ "title": "Remove install-time hardcoded Booking IDs",
1143
+ "repository": "MaggieDash + ORA host",
1144
+ "dependsOn": ["BK-054", "BK-055", "BK-056", "BK-057"],
1145
+ "status": "passed",
1146
+ "plan": [
1147
+ "Return tenant-scoped locations from catalog and schedule reads",
1148
+ "Default new booking, staff, resource, and schedule forms from live bootstrap data",
1149
+ "Persist resource service assignments and reject fixture ID regressions"
1150
+ ],
1151
+ "implementation": [
1152
+ "backend/booking/postgres-core-repository.mjs",
1153
+ "backend/booking/reference-host.mjs",
1154
+ "booking/src/booking.tsx",
1155
+ "scripts/validate-booking-ui.mjs",
1156
+ "ORA _maggie/booking mirror"
1157
+ ],
1158
+ "tests": [
1159
+ "npm run booking:ui:test",
1160
+ "npm run booking:reference-host:test",
1161
+ "npm run booking:postgres-core-repository:test",
1162
+ "npm run booking:configuration:test",
1163
+ "ORA syntax checks and npm run build",
1164
+ "git diff --check"
1165
+ ],
1166
+ "docs": [
1167
+ "docs/maggiedash-booking/TASKS.md",
1168
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1169
+ "docs/maggiedash-booking/PROGRESS.md",
1170
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1171
+ "docs/maggiedash-booking/README.md"
1172
+ ],
1173
+ "acceptance": [
1174
+ "A fresh bootstrap location is selectable without knowing a fixture ID",
1175
+ "Staff and resource forms default from tenant catalog data",
1176
+ "Resource writes include service assignments and central/ORA validators plus host build pass"
1177
+ ]
1178
+ },
1179
+ {
1180
+ "id": "BK-076",
1181
+ "epic": "installation and configuration",
1182
+ "title": "Add install-time location management",
1183
+ "repository": "MaggieDash + ORA host",
1184
+ "dependsOn": ["BK-023", "BK-054", "BK-055", "BK-075"],
1185
+ "status": "passed",
1186
+ "plan": [
1187
+ "Add tenant-scoped location validation and audited idempotent writes",
1188
+ "Expose location list/update methods in the manager service, repository, route handler, and host contract",
1189
+ "Add a Locations screen so a blank project can create its first venue before configuring dependent booking data",
1190
+ "Mirror the source and validators into ORA's installed Booking workspace"
1191
+ ],
1192
+ "implementation": [
1193
+ "backend/booking/configuration.mjs",
1194
+ "backend/booking/service.mjs",
1195
+ "backend/booking/route-handler.mjs",
1196
+ "backend/booking/reference-host.mjs",
1197
+ "backend/booking/postgres-core-repository.mjs",
1198
+ "contracts/booking-host-adapter-v1.json",
1199
+ "booking/src/booking.tsx",
1200
+ "ORA installed Booking mirror"
1201
+ ],
1202
+ "tests": [
1203
+ "npm run booking:service-contract:test",
1204
+ "npm run booking:route-handler:test",
1205
+ "npm run booking:configuration:test",
1206
+ "npm run booking:reference-host:test",
1207
+ "npm run booking:ui:test",
1208
+ "ORA matching validators",
1209
+ "ORA npm run build",
1210
+ "git diff --check"
1211
+ ],
1212
+ "docs": [
1213
+ "docs/maggiedash-booking/TASKS.md",
1214
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1215
+ "docs/maggiedash-booking/PROGRESS.md",
1216
+ "docs/maggiedash-booking/README.md",
1217
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1218
+ "skills/maggie-booking/SKILL.md",
1219
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
1220
+ ],
1221
+ "acceptance": [
1222
+ "A blank host can create its first location without a fixture ID",
1223
+ "Location writes validate timezone, scope, permission, uniqueness, and idempotent replay",
1224
+ "The central and ORA location screen, 47-route contract, reference host, and configuration gates pass"
1225
+ ]
1226
+ },
1227
+ {
1228
+ "id": "BK-077",
1229
+ "epic": "installation and contract integrity",
1230
+ "title": "Synchronize the install-time Booking contract",
1231
+ "repository": "ai-cmo-skills + MaggieDash",
1232
+ "dependsOn": ["BK-076"],
1233
+ "status": "passed",
1234
+ "plan": [
1235
+ "Add the location capability and two location endpoint IDs to the public installer contract",
1236
+ "Align service-method mappings and the CLI detailed-contract count with MaggieDash's 47-route contract",
1237
+ "Add regression coverage so future route additions cannot leave the installer contract stale"
1238
+ ],
1239
+ "implementation": [
1240
+ "contracts/maggiedash/booking-host-adapter-v1.json",
1241
+ "tools/clis/maggie_booking.py",
1242
+ "tools/tests/test_maggie_booking.py"
1243
+ ],
1244
+ "tests": [
1245
+ "python3 tools/clis/maggie.py booking contract",
1246
+ "python3 -m unittest tools.tests.test_maggie_booking -v",
1247
+ "MaggieDash npm run booking:contract:validate",
1248
+ "python3 tools/clis/maggie_booking.py tasks validate",
1249
+ "git diff --check"
1250
+ ],
1251
+ "docs": [
1252
+ "docs/maggiedash-booking/TASKS.md",
1253
+ "docs/maggiedash-booking/EXECUTION-BOARD.json",
1254
+ "docs/maggiedash-booking/PROGRESS.md",
1255
+ "docs/maggiedash-booking/README.md"
1256
+ ],
1257
+ "acceptance": [
1258
+ "The ai-cmo-skills installer contract declares all 47 manager endpoints",
1259
+ "The location capability and list/update service methods are present",
1260
+ "The public CLI and MaggieDash contract validators agree without host secrets or database access"
1261
+ ]
1262
+ },
1263
+ {
1264
+ "id": "BK-078",
1265
+ "epic": "release and installation",
1266
+ "title": "Verify and release the public MaggieDash install source",
1267
+ "repository": "MaggieDash + release owner",
1268
+ "dependsOn": ["BK-077"],
1269
+ "status": "passed",
1270
+ "plan": [
1271
+ "Commit and publish the local MaggieDash manifest hostBootstrap declaration and Booking source changes",
1272
+ "Run the default GitHub-source installer against a disposable Astro project",
1273
+ "Compare the public-source projection with the local-source projection and record the release commit/tag"
1274
+ ],
1275
+ "implementation": [
1276
+ "MaggieDash/maggiedash.json",
1277
+ "MaggieDash/adapters/astro/host",
1278
+ "MaggieDash/booking",
1279
+ "MaggieDash/contracts",
1280
+ "MaggieDash/schema"
1281
+ ],
1282
+ "tests": [
1283
+ "maggie booking install --project <disposable> --host astro --dry-run",
1284
+ "maggie booking install --project <disposable> --source <released-MaggieDash> --host astro --dry-run",
1285
+ "MaggieDash host bootstrap validator",
1286
+ "MaggieDash npm test",
1287
+ "release commit/tag evidence"
1288
+ ],
1289
+ "docs": [
1290
+ "docs/maggiedash-booking/README.md",
1291
+ "docs/maggiedash-booking/PROGRESS.md",
1292
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md"
1293
+ ],
1294
+ "acceptance": [
1295
+ "The default public source declares an Astro host bootstrap under hostBootstrap.astro",
1296
+ "A fresh Astro project can install Booking without a local MaggieDash checkout",
1297
+ "The released source contains the same 47-route contract and worker/schema artifacts as the validated local source"
1298
+ ]
1299
+ },
1300
+ {
1301
+ "id": "BK-079",
1302
+ "epic": "installation and package integrity",
1303
+ "title": "Fix npm CLI Booking contract paths",
1304
+ "repository": "ai-cmo-skills",
1305
+ "dependsOn": ["BK-077"],
1306
+ "status": "passed",
1307
+ "plan": [
1308
+ "Resolve Booking contract paths from source checkout contracts or npm bundled-contracts",
1309
+ "Package the Booking execution board alongside bundled contracts",
1310
+ "Exercise the actual package wrapper for contract, Stripe, task, and setup commands"
1311
+ ],
1312
+ "implementation": [
1313
+ "tools/clis/maggie_booking.py",
1314
+ "scripts/package-cli.mjs",
1315
+ "packages/maggie-cli/bundled-contracts/maggiedash"
1316
+ ],
1317
+ "tests": [
1318
+ "node packages/maggie-cli/bin/maggie.js booking contract",
1319
+ "node packages/maggie-cli/bin/maggie.js booking stripe-audit",
1320
+ "node packages/maggie-cli/bin/maggie.js booking tasks validate",
1321
+ "node packages/maggie-cli/bin/maggie.js booking setup --project <host>",
1322
+ "package Node/Python syntax checks",
1323
+ "git diff --check"
1324
+ ],
1325
+ "docs": [
1326
+ "docs/maggiedash-booking/README.md",
1327
+ "docs/maggiedash-booking/PROGRESS.md",
1328
+ "docs/maggiedash-booking/TASKS.md",
1329
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1330
+ ],
1331
+ "acceptance": [
1332
+ "The npm CLI validates the current 47-route Booking contract from bundled-contracts",
1333
+ "The npm CLI can validate Stripe and the packaged 87-task execution board",
1334
+ "Source-checkout and npm-package path layouts both remain supported"
1335
+ ]
1336
+ },
1337
+ {
1338
+ "id": "BK-080",
1339
+ "epic": "notifications",
1340
+ "title": "Add tenant-scoped notification delivery management",
1341
+ "repository": "both",
1342
+ "dependsOn": ["BK-026", "BK-077"],
1343
+ "status": "passed",
1344
+ "plan": [
1345
+ "Expose a redacted tenant-scoped notification list for delivery-state inspection",
1346
+ "Allow owner/manager-only dead-letter replay with a required reason and idempotency key",
1347
+ "Record replay event/audit evidence and keep recipient/provider secrets out of the dashboard",
1348
+ "Synchronize the central source, ORA installation, contract, validators, and package docs"
1349
+ ],
1350
+ "implementation": [
1351
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
1352
+ "MaggieDash/backend/booking/route-handler.mjs",
1353
+ "MaggieDash/booking/src/booking.tsx",
1354
+ "ai-cmo-skills/contracts/maggiedash/booking-host-adapter-v1.json",
1355
+ "ORA installed Booking workspace"
1356
+ ],
1357
+ "tests": [
1358
+ "MaggieDash npm test",
1359
+ "ai-cmo-skills Booking CLI contract and Python tests",
1360
+ "ORA Booking validators",
1361
+ "ORA npm run build",
1362
+ "git diff --check"
1363
+ ],
1364
+ "docs": [
1365
+ "docs/maggiedash-booking/README.md",
1366
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md",
1367
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
1368
+ "docs/maggiedash-booking/PROGRESS.md",
1369
+ "packages/maggie-cli/README.md"
1370
+ ],
1371
+ "acceptance": [
1372
+ "Notification list results are tenant-scoped and omit raw recipient email/provider payloads",
1373
+ "Only an authorized owner/manager can replay a dead-letter notification",
1374
+ "Replay requires reason and idempotency, resets delivery state, and records event plus audit evidence",
1375
+ "Central, installer contract, package bundle, ORA mirror, and build evidence agree on 47 manager routes"
1376
+ ]
1377
+ },
1378
+ {
1379
+ "id": "BK-081",
1380
+ "epic": "authentication and bootstrap safety",
1381
+ "title": "Harden first-owner registration",
1382
+ "repository": "both",
1383
+ "dependsOn": ["BK-058", "BK-071"],
1384
+ "status": "passed",
1385
+ "plan": [
1386
+ "Serialize first-owner registration per project with a PostgreSQL transaction lock",
1387
+ "Require the existing account password before granting an existing email the first owner role",
1388
+ "Prevent registration from overwriting a password or re-enabling a disabled account",
1389
+ "Synchronize the generic Astro host, ORA installation, validator, and integration docs"
1390
+ ],
1391
+ "implementation": [
1392
+ "MaggieDash/adapters/astro/host/src/pages/api/maggie/auth/register.json.ts",
1393
+ "MaggieDash/scripts/validate-astro-host-bootstrap.mjs",
1394
+ "ORA src/pages/api/maggie/auth/register.json.ts"
1395
+ ],
1396
+ "tests": [
1397
+ "MaggieDash npm test",
1398
+ "MaggieDash Astro host bootstrap validator",
1399
+ "ORA npm run contract:check",
1400
+ "ORA npm run build",
1401
+ "git diff --check"
1402
+ ],
1403
+ "docs": [
1404
+ "docs/maggiedash-booking/PROGRESS.md",
1405
+ "ORA docs/maggie-booking-integration.md"
1406
+ ],
1407
+ "acceptance": [
1408
+ "The owner count and membership write run in one transaction under a project-scoped advisory lock",
1409
+ "Existing passwords are verified but never replaced by first-run registration",
1410
+ "Disabled accounts cannot be silently re-enabled",
1411
+ "The generic installer source and ORA host build contain the same safety boundary"
1412
+ ]
1413
+ },
1414
+ {
1415
+ "id": "BK-082",
1416
+ "epic": "authentication and bootstrap safety",
1417
+ "title": "Harden Booking access defaults and disabled-account boundary",
1418
+ "repository": "both",
1419
+ "dependsOn": ["BK-026", "BK-081"],
1420
+ "status": "passed",
1421
+ "plan": [
1422
+ "Give invited staff and finance accounts safe role defaults while preserving explicit capability overrides",
1423
+ "Reject disabled existing accounts during Booking access creation",
1424
+ "Prevent the access endpoint from clearing disabled_at as a side effect",
1425
+ "Synchronize the generic host, ORA endpoint, and Booking integration evidence"
1426
+ ],
1427
+ "implementation": [
1428
+ "MaggieDash/adapters/astro/host/src/pages/api/maggie/booking/access.json.ts",
1429
+ "ORA src/pages/api/maggie/booking/access.json.ts"
1430
+ ],
1431
+ "tests": [
1432
+ "MaggieDash Astro host bootstrap validator",
1433
+ "MaggieDash npm test",
1434
+ "ORA npm run contract:check",
1435
+ "ORA npm run build",
1436
+ "git diff --check"
1437
+ ],
1438
+ "docs": [
1439
+ "docs/maggiedash-booking/PROGRESS.md",
1440
+ "ORA docs/maggie-booking-integration.md"
1441
+ ],
1442
+ "acceptance": [
1443
+ "New staff and finance invitations persist their role defaults instead of an empty permission object",
1444
+ "Explicit permission changes remain tenant-scoped and server-enforced",
1445
+ "Disabled existing accounts are rejected and their disabled_at value is never cleared by access creation"
1446
+ ]
1447
+ },
1448
+ {
1449
+ "id": "BK-083",
1450
+ "epic": "runtime and operations",
1451
+ "title": "Add worker migration preflight",
1452
+ "repository": "both",
1453
+ "dependsOn": ["BK-030", "BK-070"],
1454
+ "status": "passed",
1455
+ "plan": [
1456
+ "Check core, Booking, and access table presence before worker lock or repository reads",
1457
+ "Return a bounded needs-migration report with a non-zero exit code",
1458
+ "Keep the preflight read-only and free of secrets or raw database stack traces",
1459
+ "Synchronize generic Astro and ORA worker entrypoints and operations docs"
1460
+ ],
1461
+ "implementation": [
1462
+ "MaggieDash/adapters/astro/host/scripts/maggie-booking-worker.mjs",
1463
+ "ORA scripts/maggie-booking-worker.mjs",
1464
+ "MaggieDash/scripts/validate-astro-host-bootstrap.mjs"
1465
+ ],
1466
+ "tests": [
1467
+ "node --check for both worker entrypoints",
1468
+ "MaggieDash Astro bootstrap validator",
1469
+ "ORA worker run against an unmigrated database",
1470
+ "git diff --check"
1471
+ ],
1472
+ "docs": [
1473
+ "docs/maggiedash-booking/RUNTIME-OPERATIONS.md",
1474
+ "docs/maggiedash-booking/PROGRESS.md",
1475
+ "ORA docs/maggie-booking-integration.md"
1476
+ ],
1477
+ "acceptance": [
1478
+ "Missing core, Booking, or access tables produce status needs-migration and exit code 1",
1479
+ "The worker does not acquire a lock, load state, or write business rows when migration is missing",
1480
+ "The report contains no DATABASE_URL, provider secret, recipient, or raw stack trace"
1481
+ ]
1482
+ },
1483
+ {
1484
+ "id": "BK-084",
1485
+ "epic": "quality and release evidence",
1486
+ "title": "Synchronize browser evidence with the complete manager workspace",
1487
+ "repository": "both",
1488
+ "dependsOn": ["BK-080", "BK-083"],
1489
+ "status": "passed",
1490
+ "plan": [
1491
+ "Compare the current manager navigation and screens with the browser evidence route inventory",
1492
+ "Expand contract, capture, validator, and installed-host coverage to every current manager route",
1493
+ "Add UI regression markers so new operational screens cannot silently disappear from the installed workspace"
1494
+ ],
1495
+ "implementation": [
1496
+ "MaggieDash/contracts/booking-browser-evidence-v1.json",
1497
+ "MaggieDash/scripts/capture-booking-browser-evidence.mjs",
1498
+ "MaggieDash/scripts/validate-booking-browser-evidence.mjs",
1499
+ "MaggieDash/scripts/validate-booking-ui.mjs",
1500
+ "ORA installed maggiedash browser evidence and UI validators",
1501
+ "ai-cmo-skills/tools/clis/maggie_booking.py"
1502
+ ],
1503
+ "tests": [
1504
+ "MaggieDash npm test",
1505
+ "ORA npm run contract:check",
1506
+ "ORA npm run build",
1507
+ "ai-cmo-skills Booking Python tests",
1508
+ "packaged Booking task validation",
1509
+ "git diff --check"
1510
+ ],
1511
+ "docs": [
1512
+ "docs/maggiedash-booking/README.md",
1513
+ "docs/maggiedash-booking/PROGRESS.md",
1514
+ "docs/maggiedash-booking/TASKS.md",
1515
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1516
+ ],
1517
+ "acceptance": [
1518
+ "The browser contract requires all 15 current manager routes at mobile, tablet, and desktop viewports",
1519
+ "Capture and validation both require 45 route/viewport screens with no console, request, or layout errors",
1520
+ "Installed UI validation covers waitlist, notification, location, and report screen markers",
1521
+ "A fresh authenticated host capture remains a separate production evidence requirement"
1522
+ ]
1523
+ },
1524
+ {
1525
+ "id": "BK-085",
1526
+ "epic": "customer lifecycle and policy",
1527
+ "title": "Make cancellation and refund policy tenant-configurable and booking-scoped",
1528
+ "repository": "both",
1529
+ "dependsOn": [
1530
+ "BK-064",
1531
+ "BK-084"
1532
+ ],
1533
+ "status": "passed",
1534
+ "plan": [
1535
+ "Add a normalized cancellation policy to catalogue configuration with deterministic defaults and validation",
1536
+ "Copy the policy into every manager, customer, and waitlist-created booking so later edits cannot change historical intent",
1537
+ "Enforce the configured customer cancellation cutoff in both the PostgreSQL and reference customer boundaries",
1538
+ "Expose the policy controls in the installed manager catalogue screen and keep refund execution provider-neutral"
1539
+ ],
1540
+ "implementation": [
1541
+ "MaggieDash/backend/booking/payment-gateway.mjs",
1542
+ "MaggieDash/backend/booking/configuration.mjs",
1543
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
1544
+ "MaggieDash/backend/booking/postgres-customer-adapter.mjs",
1545
+ "MaggieDash/backend/booking/reference-host.mjs",
1546
+ "MaggieDash/backend/booking/customer-reference-host.mjs",
1547
+ "MaggieDash/schema/maggie-booking-install.sql",
1548
+ "MaggieDash/booking/src/booking.tsx",
1549
+ "ORA installed Booking mirror and contract"
1550
+ ],
1551
+ "tests": [
1552
+ "MaggieDash npm test",
1553
+ "ORA npm run contract:check",
1554
+ "ORA npm run build",
1555
+ "ORA Booking policy, customer, schema, and UI validators",
1556
+ "git diff --check"
1557
+ ],
1558
+ "docs": [
1559
+ "docs/maggiedash-booking/README.md",
1560
+ "docs/maggiedash-booking/PRD.md",
1561
+ "docs/maggiedash-booking/PROGRESS.md",
1562
+ "docs/maggiedash-booking/TASKS.md",
1563
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1564
+ ],
1565
+ "acceptance": [
1566
+ "Catalog configuration normalizes free, cutoff-window, and non-refundable modes with refund outcome and no-show fee fields",
1567
+ "The normalized policy snapshot is persisted on manager, customer, and waitlist-converted bookings",
1568
+ "Customer cancellation is rejected inside the configured cutoff in PostgreSQL and reference-host flows with an actionable conflict response",
1569
+ "Provider refund execution remains an explicit Stripe/host operation; this task does not claim automatic refunds or live payment evidence",
1570
+ "Migration, authenticated browser capture, worker scheduling, and live Resend/Stripe delivery remain separate host release gates"
1571
+ ]
1572
+ },
1573
+ {
1574
+ "id": "BK-086",
1575
+ "epic": "calendar and availability operations",
1576
+ "title": "Make calendar day and week views honor their requested venue-local range",
1577
+ "repository": "both",
1578
+ "dependsOn": [
1579
+ "BK-084",
1580
+ "BK-085"
1581
+ ],
1582
+ "status": "passed",
1583
+ "plan": [
1584
+ "Trace the manager Day/Week query through the route handler, PostgreSQL repository, reference host, and installed UI",
1585
+ "Use a venue-timezone half-open range for day and Monday-to-Sunday week queries while preserving staff data scope",
1586
+ "Filter reference-host fixtures by the same range and show an accurate period label in the manager calendar",
1587
+ "Add regression coverage for day exclusion, week inclusion, and cross-day appointment boundaries"
1588
+ ],
1589
+ "implementation": [
1590
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
1591
+ "MaggieDash/backend/booking/reference-host.mjs",
1592
+ "MaggieDash/booking/src/booking.tsx",
1593
+ "MaggieDash/scripts/validate-booking-reference-host.mjs",
1594
+ "MaggieDash/scripts/validate-booking-postgres-core-repository.mjs",
1595
+ "ORA installed Booking mirror and validators"
1596
+ ],
1597
+ "tests": [
1598
+ "MaggieDash npm test",
1599
+ "MaggieDash reference-host and PostgreSQL repository validators",
1600
+ "ORA reference-host and PostgreSQL repository validators",
1601
+ "ORA npm run contract:check",
1602
+ "ORA npm run build",
1603
+ "git diff --check"
1604
+ ],
1605
+ "docs": [
1606
+ "docs/maggiedash-booking/README.md",
1607
+ "docs/maggiedash-booking/PROGRESS.md",
1608
+ "docs/maggiedash-booking/TASKS.md",
1609
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1610
+ ],
1611
+ "acceptance": [
1612
+ "Day view excludes appointments outside the selected venue-local calendar date",
1613
+ "Week view returns the Monday-to-Sunday range containing the selected date and does not fall back to a single-day query",
1614
+ "Staff sessions remain scoped to their assigned staff profile in both calendar modes",
1615
+ "Reference and installed UI evidence cover the corrected response shape without weakening the production host evidence gate"
1616
+ ]
1617
+ },
1618
+ {
1619
+ "id": "BK-087",
1620
+ "epic": "customer lifecycle and payment settlement",
1621
+ "title": "Execute cancellation refunds through the provider boundary and Resend outbox",
1622
+ "repository": "both",
1623
+ "dependsOn": [
1624
+ "BK-080",
1625
+ "BK-085",
1626
+ "BK-086"
1627
+ ],
1628
+ "status": "passed",
1629
+ "plan": [
1630
+ "Calculate a bounded refund settlement from the booking-scoped cancellation policy, captured attempts, and prior refunds",
1631
+ "Run provider refunds after the lifecycle transaction with per-attempt idempotency and a manual_required fallback",
1632
+ "Return a redacted settlement result to customer flows and queue payment.refunded only when a provider refund was accepted or is pending",
1633
+ "Keep no-show fee calculation provider-neutral without enabling unsafe automatic off-session charging"
1634
+ ],
1635
+ "implementation": [
1636
+ "MaggieDash/backend/booking/payment-gateway.mjs",
1637
+ "MaggieDash/backend/booking/postgres-cancellation-settlement.mjs",
1638
+ "MaggieDash/backend/booking/postgres-payment-adapter.mjs",
1639
+ "MaggieDash/backend/booking/postgres-customer-adapter.mjs",
1640
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
1641
+ "MaggieDash/adapters/astro/host/scripts/maggie-booking-worker.mjs",
1642
+ "MaggieDash/scripts/validate-astro-host-bootstrap.mjs",
1643
+ "ORA installed Booking mirror and Resend outbox wrapper"
1644
+ ],
1645
+ "tests": [
1646
+ "MaggieDash npm test",
1647
+ "cancellation policy allocation and no-show fee regression",
1648
+ "PostgreSQL customer cancellation refund settlement regression",
1649
+ "ORA npm run contract:check",
1650
+ "ORA npm run build",
1651
+ "git diff --check"
1652
+ ],
1653
+ "docs": [
1654
+ "docs/maggiedash-booking/README.md",
1655
+ "docs/maggiedash-booking/PRD.md",
1656
+ "docs/maggiedash-booking/PAYMENT-GATEWAY.md",
1657
+ "docs/maggiedash-booking/PROGRESS.md",
1658
+ "docs/maggiedash-booking/TASKS.md",
1659
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1660
+ ],
1661
+ "acceptance": [
1662
+ "Full and deposit refund policies allocate only the still-refundable captured amount and cannot exceed policy or payment limits",
1663
+ "A cancelled booking remains cancelled if the provider is unavailable; the result is manual_required and does not claim a successful refund",
1664
+ "Provider refund calls use booking/payment-attempt idempotency and customer retries do not create duplicate refunds",
1665
+ "Accepted or pending refund outcomes queue one redacted payment.refunded email through the existing tenant-scoped Resend outbox",
1666
+ "Generic Astro and ORA workers use a dedicated refund subject and abort hung Resend requests after the delivery timeout",
1667
+ "No-show fee is reported as a bounded amount only; automatic off-session charging remains a separate provider-consent task",
1668
+ "Database migration, live Stripe keys, authenticated browser capture, worker scheduling, and live Resend delivery remain host release gates"
1669
+ ]
1670
+ },
1671
+ {
1672
+ "id": "BK-088",
1673
+ "epic": "manager exception handling",
1674
+ "title": "Expose no-show fee review without automatic charging",
1675
+ "repository": "both",
1676
+ "dependsOn": [
1677
+ "BK-087"
1678
+ ],
1679
+ "status": "passed",
1680
+ "plan": [
1681
+ "Return a redacted no-show settlement preview from the manager lifecycle transition",
1682
+ "Mark the outcome review_required with a bounded policy-derived fee and no refund items",
1683
+ "Keep the provider refund boundary completely unused for no-show transitions",
1684
+ "Show the review state in the manager booking detail and mirror it in ORA"
1685
+ ],
1686
+ "implementation": [
1687
+ "MaggieDash/backend/booking/postgres-cancellation-settlement.mjs",
1688
+ "MaggieDash/backend/booking/service.mjs",
1689
+ "MaggieDash/backend/booking/reference-host.mjs",
1690
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
1691
+ "MaggieDash/booking/src/booking.tsx",
1692
+ "MaggieDash/scripts/validate-booking-no-show-review.mjs",
1693
+ "ORA installed Booking mirror and validators"
1694
+ ],
1695
+ "tests": [
1696
+ "MaggieDash npm test",
1697
+ "no-show review validator",
1698
+ "reference-host no-show transition regression",
1699
+ "Astro/ORA TypeScript and build checks",
1700
+ "git diff --check"
1701
+ ],
1702
+ "docs": [
1703
+ "docs/maggiedash-booking/README.md",
1704
+ "docs/maggiedash-booking/PRD.md",
1705
+ "docs/maggiedash-booking/PAYMENT-GATEWAY.md",
1706
+ "docs/maggiedash-booking/PROGRESS.md",
1707
+ "docs/maggiedash-booking/TASKS.md",
1708
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1709
+ ],
1710
+ "acceptance": [
1711
+ "A no-show transition returns review_required and the policy-derived noShowFeeMinor",
1712
+ "No-show settlement returns zero refund amount and no refund items even when payment was captured",
1713
+ "The injected refund provider is never called for a no-show transition",
1714
+ "Manager UI visibly states that no automatic charge or refund was made",
1715
+ "The behavior is covered by central and ORA validators without weakening production release gates"
1716
+ ]
1717
+ },
1718
+ {
1719
+ "id": "BK-089",
1720
+ "epic": "access-control",
1721
+ "title": "Make Booking team access an installable and verifiable contract",
1722
+ "repository": "both",
1723
+ "dependsOn": ["BK-082", "BK-084"],
1724
+ "status": "passed",
1725
+ "plan": [
1726
+ "Define a versioned administrator access contract for email/password staff accounts, roles, permissions, invitations, password reset, and revocation",
1727
+ "Include the access contract and validator in the MaggieDash distribution manifest and ai-cmo-skills package",
1728
+ "Validate the generic Astro access route, Booking schema, Team access UI, Resend invitation seam, and disabled-account policy together",
1729
+ "Expose a stable CLI access-contract check and include the capability in install and release gates"
1730
+ ],
1731
+ "implementation": [
1732
+ "MaggieDash/contracts/booking-access-v1.json",
1733
+ "MaggieDash/scripts/validate-booking-access.mjs",
1734
+ "MaggieDash/maggiedash.json",
1735
+ "MaggieDash/adapters/astro/host/src/pages/api/maggie/booking/access.json.ts",
1736
+ "MaggieDash/booking/src/booking.tsx",
1737
+ "contracts/maggiedash/booking-access-v1.json",
1738
+ "tools/clis/maggie_booking.py"
1739
+ ],
1740
+ "tests": [
1741
+ "npm run booking:access:test",
1742
+ "MaggieDash npm test",
1743
+ "maggie booking access-contract",
1744
+ "maggie booking inspect --project <installed-project>",
1745
+ "Python Booking CLI tests and packaged-contract validation"
1746
+ ],
1747
+ "docs": [
1748
+ "MaggieDash/docs/BOOKING-HOST-ADAPTER.md",
1749
+ "docs/maggiedash-booking/README.md",
1750
+ "docs/maggiedash-booking/PROGRESS.md",
1751
+ "docs/maggiedash-booking/TASKS.md",
1752
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1753
+ ],
1754
+ "acceptance": [
1755
+ "A fresh Astro installation contains the access contract, access schema, generic access route, and Team access UI",
1756
+ "Only an owner or administrator can create, update, reset, invite, or revoke Booking access",
1757
+ "Roles manager/staff/finance and granular permissions are tenant-scoped and audited",
1758
+ "Resend invitations use the host email/password flow and disabled accounts are never silently reactivated",
1759
+ "The installed CLI can validate access independently before a real database or provider run"
1760
+ ]
1761
+ },
1762
+ {
1763
+ "id": "BK-090",
1764
+ "epic": "access-control",
1765
+ "title": "Make the reference host exercise Team access CRUD and role denial",
1766
+ "repository": "MaggieDash",
1767
+ "dependsOn": ["BK-089"],
1768
+ "status": "passed",
1769
+ "plan": [
1770
+ "Add a deterministic in-memory access user fixture without passwords, raw tokens, or email payloads",
1771
+ "Expose owner-only GET/POST/PATCH/DELETE access behavior to the reference host",
1772
+ "Exercise invitation intent, permission update, revocation, audit, and staff denial in the reference-host validator",
1773
+ "Keep the provider-neutral access fixture separate from the production PostgreSQL/Resend implementation"
1774
+ ],
1775
+ "implementation": [
1776
+ "MaggieDash/backend/booking/reference-host.mjs",
1777
+ "MaggieDash/scripts/validate-booking-reference-host.mjs",
1778
+ "MaggieDash/fixtures/booking-host-state.v1.json"
1779
+ ],
1780
+ "tests": [
1781
+ "node scripts/validate-booking-reference-host.mjs",
1782
+ "MaggieDash npm test",
1783
+ "secret/PII fixture scan"
1784
+ ],
1785
+ "docs": [
1786
+ "docs/maggiedash-booking/README.md",
1787
+ "docs/maggiedash-booking/PROGRESS.md",
1788
+ "docs/maggiedash-booking/TASKS.md",
1789
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1790
+ ],
1791
+ "acceptance": [
1792
+ "Owner fixture access can read, invite, update, and revoke a staff account",
1793
+ "Staff fixture sessions receive 403 for access management",
1794
+ "Invitation is represented only as a safe intent and never includes a password or raw token",
1795
+ "Access mutations are audited and idempotent",
1796
+ "The test remains independent from PostgreSQL, Stripe, and Resend network calls"
1797
+ ]
1798
+ },
1799
+ {
1800
+ "id": "BK-091",
1801
+ "epic": "installation",
1802
+ "title": "Make fresh Astro Booking installation dependency-complete",
1803
+ "repository": "ai-cmo-skills",
1804
+ "dependsOn": ["BK-078", "BK-089"],
1805
+ "status": "passed",
1806
+ "plan": [
1807
+ "Detect the host project's existing npm, pnpm, yarn, or bun lockfile",
1808
+ "Add only missing React, Phosphor, Tailwind, PostgreSQL, Stripe, and SSR adapter packages through the selected package manager",
1809
+ "Keep dependency installation explicit and incompatible with read-only install modes",
1810
+ "Cover idempotency, package-manager selection, and failure-safe output in the CLI tests"
1811
+ ],
1812
+ "implementation": [
1813
+ "tools/clis/maggie_booking.py",
1814
+ "tools/tests/test_maggie_booking.py",
1815
+ "skills/maggie-booking/SKILL.md",
1816
+ "docs/maggiedash-booking/SKILLS-AND-CLI.md"
1817
+ ],
1818
+ "tests": [
1819
+ "python3 -m unittest tools.tests.test_maggie_booking -q",
1820
+ "maggie booking tasks validate",
1821
+ "packaged CLI install help and task validation",
1822
+ "git diff --check"
1823
+ ],
1824
+ "docs": [
1825
+ "README.md",
1826
+ "packages/maggie-cli/README.md",
1827
+ "packages/maggie-cli/README-zh-TW.md",
1828
+ "docs/maggiedash-booking/README.md",
1829
+ "docs/maggiedash-booking/PROGRESS.md",
1830
+ "docs/maggiedash-booking/TASKS.md",
1831
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1832
+ ],
1833
+ "acceptance": [
1834
+ "A fresh Astro host can opt into one-command dependency completion without replacing existing versions",
1835
+ "A blank Astro host receives a server-rendered Node adapter/config while an existing deployment adapter remains host-owned",
1836
+ "The selected package manager and missing package names are visible without printing secrets",
1837
+ "No package install occurs during --dry-run or --diff",
1838
+ "A project with all required packages is unchanged and no package-manager process runs"
1839
+ ]
1840
+ },
1841
+ {
1842
+ "id": "BK-092",
1843
+ "epic": "notifications",
1844
+ "title": "Add tenant-scoped Booking email template management",
1845
+ "repository": "both",
1846
+ "dependsOn": ["BK-080", "BK-091"],
1847
+ "status": "passed",
1848
+ "plan": [
1849
+ "Define a versioned event-to-template contract for confirmation, reminder, reschedule, cancellation, refund, payment-action, and waitlist emails",
1850
+ "Support safe tenant-scoped template overrides with an allowlisted variable renderer and the current generic fallback",
1851
+ "Expose owner/manager template edit, preview, publish, and rollback actions without exposing recipients or provider secrets",
1852
+ "Let the Resend worker resolve the published template and retain outbox idempotency, retries, and dead-letter behavior"
1853
+ ],
1854
+ "implementation": [
1855
+ "MaggieDash/contracts/booking-email-templates-v1.json",
1856
+ "MaggieDash/schema/maggie-booking-install.sql",
1857
+ "MaggieDash/backend/booking/email-templates.mjs",
1858
+ "MaggieDash/adapters/astro/host/src/pages/api/maggie/booking/email-templates.json.ts",
1859
+ "MaggieDash/backend/booking/reference-host.mjs",
1860
+ "MaggieDash/booking/src/booking.tsx",
1861
+ "MaggieDash/adapters/astro/host/scripts/maggie-booking-worker.mjs",
1862
+ "MaggieDash/backend/booking/postgres-worker-repository.mjs",
1863
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
1864
+ "MaggieDash/schema/maggie-booking-install.sql",
1865
+ "ai-cmo-skills/tools/clis/maggie_booking.py"
1866
+ ],
1867
+ "tests": [
1868
+ "template contract validator",
1869
+ "variable allowlist and HTML escaping tests",
1870
+ "tenant/publish/rollback permission tests",
1871
+ "Resend worker fallback and published-template tests",
1872
+ "PostgreSQL notification-variable persistence regression",
1873
+ "reference-host and ORA build regressions"
1874
+ ],
1875
+ "docs": [
1876
+ "docs/maggiedash-booking/README.md",
1877
+ "docs/maggiedash-booking/PROGRESS.md",
1878
+ "docs/maggiedash-booking/TASKS.md",
1879
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1880
+ ],
1881
+ "acceptance": [
1882
+ "Each supported Booking event has a published tenant template or an explicit generic fallback",
1883
+ "Only allowlisted booking variables can be rendered and all user-controlled values are escaped",
1884
+ "Template mutations are tenant-scoped, permission-checked, audited, idempotent, and reversible",
1885
+ "Resend delivery continues to use the existing secret-safe outbox and dead-letter recovery path",
1886
+ "Preview and provider send paths never expose API keys, recipient email addresses, or raw customer tokens"
1887
+ ]
1888
+ },
1889
+ {
1890
+ "id": "BK-093",
1891
+ "epic": "configuration",
1892
+ "title": "Expose complete Booking defaults in manager Settings",
1893
+ "repository": "both",
1894
+ "dependsOn": ["BK-023", "BK-092"],
1895
+ "status": "passed",
1896
+ "plan": [
1897
+ "Reuse the existing audited settings endpoint rather than introducing a second configuration store",
1898
+ "Expose venue currency, booking-enabled state, and payment capture policy alongside timezone",
1899
+ "Keep provider credentials and Stripe/Resend secrets outside the dashboard and browser bundle",
1900
+ "Synchronize the central workspace, ORA installed mirror, and UI regression markers"
1901
+ ],
1902
+ "implementation": [
1903
+ "MaggieDash/booking/src/booking.tsx",
1904
+ "MaggieDash/scripts/validate-booking-ui.mjs",
1905
+ "ORA/_maggie/booking/booking.tsx",
1906
+ "ORA/maggiedash/scripts/validate-booking-ui.mjs"
1907
+ ],
1908
+ "tests": [
1909
+ "MaggieDash npm test",
1910
+ "central and ORA Booking UI validators",
1911
+ "central and ORA reference-host settings regression validators",
1912
+ "ORA contract check and Astro build",
1913
+ "git diff --check"
1914
+ ],
1915
+ "docs": [
1916
+ "MaggieDash/README.md",
1917
+ "docs/maggiedash-booking/README.md",
1918
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1919
+ "docs/maggiedash-booking/TASKS.md",
1920
+ "docs/maggiedash-booking/PROGRESS.md",
1921
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1922
+ ],
1923
+ "acceptance": [
1924
+ "Settings loads existing currency, booking-enabled, and capture-policy values",
1925
+ "Saving settings sends all four supported defaults through the existing idempotent audited endpoint",
1926
+ "Disabling new bookings keeps history readable while the backend rejects new holds and bookings",
1927
+ "No provider credentials are accepted or rendered by the new controls",
1928
+ "Central and ORA installed workspace validators enforce the new settings surface"
1929
+ ]
1930
+ },
1931
+ {
1932
+ "id": "BK-094",
1933
+ "epic": "catalogue and monetization",
1934
+ "title": "Add tenant-scoped treatment package catalogue",
1935
+ "repository": "both",
1936
+ "dependsOn": ["BK-023", "BK-093"],
1937
+ "status": "passed",
1938
+ "plan": [
1939
+ "Add tenant-scoped package and package-item tables with price, currency, optional expiry, active state, and included service-variant quantities",
1940
+ "Expose idempotent/audited manager read and write routes and reject cross-tenant or inactive service-variant references",
1941
+ "Add the Packages manager screen and deterministic reference-host fixture without exposing customer balances or payment secrets",
1942
+ "Synchronize central MaggieDash, the ORA installed mirror, the detailed/compact contracts, validators, and booking docs"
1943
+ ],
1944
+ "implementation": [
1945
+ "MaggieDash/schema/maggie-booking-install.sql",
1946
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
1947
+ "MaggieDash/backend/booking/service.mjs",
1948
+ "MaggieDash/backend/booking/route-handler.mjs",
1949
+ "MaggieDash/backend/booking/reference-host.mjs",
1950
+ "MaggieDash/booking/src/booking.tsx",
1951
+ "MaggieDash/contracts/booking-host-adapter-v1.json",
1952
+ "MaggieDash/contracts/booking-access-v1.json",
1953
+ "ai-cmo-skills/contracts/maggiedash/booking-host-adapter-v1.json",
1954
+ "ORA installed Booking mirror"
1955
+ ],
1956
+ "tests": [
1957
+ "MaggieDash npm test",
1958
+ "central and ORA schema, service, route, reference-host, and UI validators",
1959
+ "central and ORA contract checks and Astro build",
1960
+ "ai-cmo-skills Booking Python tests and bundled contract validation",
1961
+ "git diff --check"
1962
+ ],
1963
+ "docs": [
1964
+ "docs/maggiedash-booking/README.md",
1965
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
1966
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
1967
+ "docs/maggiedash-booking/PROGRESS.md",
1968
+ "docs/maggiedash-booking/TASKS.md",
1969
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
1970
+ ],
1971
+ "acceptance": [
1972
+ "A manager can list and idempotently create/update a package within the current tenant",
1973
+ "Package items can reference only active service variants in the same tenant and quantities are positive integers",
1974
+ "All package mutations emit an audit event and the UI supports search plus edit without provider credentials",
1975
+ "Central and ORA mirrors plus compact/detailed contracts agree on the two package endpoints",
1976
+ "The docs explicitly keep Stripe package purchase and package refund settlement outside this catalogue task"
1977
+ ]
1978
+ },
1979
+ {
1980
+ "id": "BK-095",
1981
+ "epic": "catalogue and monetization",
1982
+ "title": "Add customer package balances and redemption",
1983
+ "repository": "both",
1984
+ "dependsOn": ["BK-094", "BK-087"],
1985
+ "status": "passed",
1986
+ "plan": [
1987
+ "Add tenant-scoped customer package entitlement, per-variant balance, and redemption-ledger tables",
1988
+ "Expose idempotent audited manager grant and balance-read routes with customer and tenant scope",
1989
+ "Lock entitlement rows during manager booking creation, redeem matching treatment visits atomically, enforce expiry/exhaustion, and return the package settlement",
1990
+ "Add the Packages balance panel, reference-host regression, synchronized ORA mirror, compact/detailed contracts, validators, and docs"
1991
+ ],
1992
+ "implementation": [
1993
+ "MaggieDash/schema/maggie-booking-install.sql",
1994
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
1995
+ "MaggieDash/backend/booking/service.mjs",
1996
+ "MaggieDash/backend/booking/route-handler.mjs",
1997
+ "MaggieDash/backend/booking/reference-host.mjs",
1998
+ "MaggieDash/booking/src/booking.tsx",
1999
+ "MaggieDash/contracts/booking-host-adapter-v1.json",
2000
+ "ai-cmo-skills/contracts/maggiedash/booking-host-adapter-v1.json",
2001
+ "ORA installed Booking mirror"
2002
+ ],
2003
+ "tests": [
2004
+ "MaggieDash npm test",
2005
+ "reference-host grant, balance, expiry, and redemption regression",
2006
+ "central and ORA schema, service, route, contract, and UI validators",
2007
+ "ai-cmo-skills Booking Python tests and bundled contract validation"
2008
+ ],
2009
+ "docs": [
2010
+ "docs/maggiedash-booking/README.md",
2011
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
2012
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
2013
+ "docs/maggiedash-booking/PROGRESS.md",
2014
+ "docs/maggiedash-booking/TASKS.md"
2015
+ ],
2016
+ "acceptance": [
2017
+ "A manager can grant an active package to an existing customer within the current tenant and read remaining quantities",
2018
+ "Expired and exhausted entitlements cannot be redeemed",
2019
+ "Manager booking creation locks and decrements matching package quantities in the same transaction, records a redemption, and zero-prices covered segments",
2020
+ "Reference host, central/ORA mirrors, and compact/detailed contracts agree on the two entitlement routes",
2021
+ "The docs distinguish implemented manual entitlement/redemption from future Stripe package purchase and refund settlement"
2022
+ ]
2023
+ },
2024
+ {
2025
+ "id": "BK-096",
2026
+ "epic": "catalogue and monetization",
2027
+ "title": "Add customer package checkout and refund settlement",
2028
+ "repository": "both",
2029
+ "dependsOn": [
2030
+ "BK-095",
2031
+ "BK-087"
2032
+ ],
2033
+ "status": "passed",
2034
+ "plan": [
2035
+ "Add a separate package purchase and refund aggregate with idempotency, provider references, and entitlement linkage",
2036
+ "Expose public package checkout and payment-return routes with safe DTOs and a customer purchase form",
2037
+ "Reconcile package provider status through Stripe metadata/webhooks and transactionally fulfill customer package balances",
2038
+ "Expose manager package purchase listing and guarded refund actions, blocking refunds after redeemed visits",
2039
+ "Synchronize central/ORA sources, compact/detailed/bundled contracts, validators, docs, and regression fixtures"
2040
+ ],
2041
+ "implementation": [
2042
+ "MaggieDash/schema/maggie-booking-install.sql",
2043
+ "MaggieDash/backend/booking/postgres-payment-adapter.mjs",
2044
+ "MaggieDash/backend/booking/payment-webhook.mjs",
2045
+ "MaggieDash/backend/booking/customer-flow.mjs",
2046
+ "MaggieDash/backend/booking/customer-route-handler.mjs",
2047
+ "MaggieDash/backend/booking/customer-reference-host.mjs",
2048
+ "MaggieDash/backend/booking/reference-host.mjs",
2049
+ "MaggieDash/backend/booking/route-handler.mjs",
2050
+ "MaggieDash/booking/src/customer.tsx",
2051
+ "MaggieDash/booking/src/booking.tsx",
2052
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
2053
+ "ai-cmo-skills/contracts/maggiedash/booking-host-adapter-v1.json",
2054
+ "ORA installed Booking mirror"
2055
+ ],
2056
+ "tests": [
2057
+ "MaggieDash npm test",
2058
+ "central and ORA package checkout, payment-return, schema, webhook, reference-host, and UI validators",
2059
+ "ai-cmo-skills Booking Python tests and bundled contract validation",
2060
+ "ORA contract check and Astro build",
2061
+ "git diff --check"
2062
+ ],
2063
+ "docs": [
2064
+ "docs/maggiedash-booking/README.md",
2065
+ "docs/maggiedash-booking/HOST-ADAPTER.md",
2066
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
2067
+ "docs/maggiedash-booking/PROGRESS.md",
2068
+ "docs/maggiedash-booking/TASKS.md",
2069
+ "docs/maggiedash-booking/EXECUTION-BOARD.json"
2070
+ ],
2071
+ "acceptance": [
2072
+ "A public customer can start an idempotent package checkout and recover its pending or confirmed state with a token-bound return URL",
2073
+ "A verified Stripe package event updates the separate purchase aggregate and creates one customer entitlement with the package balances",
2074
+ "A manager can list package purchases and request a provider refund while a redeemed purchase is rejected",
2075
+ "Central, ORA, and ai-cmo-skills contracts agree on 47 manager endpoints and 11 public customer methods",
2076
+ "Local regression gates pass; real database migration, Stripe webhook, Resend delivery, and authenticated staging evidence remain explicit host gates"
2077
+ ]
2078
+ },
2079
+ {
2080
+ "id": "BK-097",
2081
+ "epic": "notifications and monetization",
2082
+ "title": "Add package lifecycle Resend notifications",
2083
+ "repository": "both",
2084
+ "dependsOn": [
2085
+ "BK-096",
2086
+ "BK-092"
2087
+ ],
2088
+ "status": "passed",
2089
+ "plan": [
2090
+ "Add package purchase confirmation and refund events to the allowlisted email-template contract",
2091
+ "Queue idempotent tenant-scoped notifications linked to package purchases after verified Stripe state transitions",
2092
+ "Resolve package recipient, name, amount, and expiry at worker delivery time without booking-only manage links",
2093
+ "Synchronize the PostgreSQL schema, repositories, generic host worker, ORA worker, validators, and docs"
2094
+ ],
2095
+ "implementation": [
2096
+ "MaggieDash/schema/maggie-booking-install.sql",
2097
+ "MaggieDash/backend/booking/email-templates.mjs",
2098
+ "MaggieDash/backend/booking/notifications.mjs",
2099
+ "MaggieDash/backend/booking/postgres-worker-repository.mjs",
2100
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
2101
+ "MaggieDash/adapters/astro/host/scripts/maggie-booking-worker.mjs",
2102
+ "ORA installed Booking mirror"
2103
+ ],
2104
+ "tests": [
2105
+ "MaggieDash npm test",
2106
+ "package template render and notification outbox regression",
2107
+ "ORA contract check and Astro build",
2108
+ "git diff --check"
2109
+ ],
2110
+ "docs": [
2111
+ "docs/maggiedash-booking/README.md",
2112
+ "docs/maggiedash-booking/DATA-MODEL.md",
2113
+ "docs/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md",
2114
+ "docs/maggiedash-booking/PROGRESS.md",
2115
+ "docs/maggiedash-booking/TASKS.md"
2116
+ ],
2117
+ "acceptance": [
2118
+ "A verified succeeded package purchase queues one confirmation notification with package_purchase_id",
2119
+ "A verified package refund queues one refund notification and remains idempotent on replay",
2120
+ "Stored notifications contain only recipient_hash, never the recipient address",
2121
+ "Generic and ORA workers can render package events without appointment manage links",
2122
+ "Real Stripe webhook, Resend delivery, and authenticated staging evidence remain explicit host gates"
2123
+ ]
2124
+ },
2125
+ {
2126
+ "id": "BK-098",
2127
+ "epic": "customer-surface and monetization",
2128
+ "title": "Add public customer package redemption",
2129
+ "repository": "both",
2130
+ "dependsOn": ["BK-095", "BK-096"],
2131
+ "status": "passed",
2132
+ "plan": [
2133
+ "Carry a confirmed package entitlement into the public booking page without exposing customer credentials",
2134
+ "Bind the entitlement to the tenant customer record and persist it on the booking hold",
2135
+ "Lock the entitlement and item balances while converting the hold, writing the redemption ledger, and updating exhausted status",
2136
+ "Expose a safe package summary and a deterministic reference-host regression across central and ORA mirrors"
2137
+ ],
2138
+ "implementation": [
2139
+ "MaggieDash/schema/maggie-booking-install.sql",
2140
+ "MaggieDash/backend/booking/customer-flow.mjs",
2141
+ "MaggieDash/backend/booking/postgres-customer-adapter.mjs",
2142
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
2143
+ "MaggieDash/backend/booking/customer-reference-host.mjs",
2144
+ "MaggieDash/backend/booking/reference-host.mjs",
2145
+ "MaggieDash/booking/src/customer.tsx",
2146
+ "ORA installed Booking mirror"
2147
+ ],
2148
+ "tests": [
2149
+ "MaggieDash npm test",
2150
+ "public reference-host package hold/checkout regression",
2151
+ "customer DTO/UI and PostgreSQL adapter syntax gates",
2152
+ "ORA contract check and Astro build",
2153
+ "git diff --check"
2154
+ ],
2155
+ "docs": [
2156
+ "docs/maggiedash-booking/README.md",
2157
+ "docs/maggiedash-booking/DATA-FLOW.md",
2158
+ "docs/maggiedash-booking/DATA-MODEL.md",
2159
+ "docs/maggiedash-booking/PROGRESS.md",
2160
+ "docs/maggiedash-booking/TASKS.md"
2161
+ ],
2162
+ "acceptance": [
2163
+ "A confirmed package return can open the public booking page with an opaque entitlement identifier",
2164
+ "The server rejects cross-customer, expired, inactive, currency-mismatched, and insufficient-credit redemption",
2165
+ "A fully covered public booking is confirmed at zero price and has one auditable redemption per treatment",
2166
+ "Hold and checkout idempotency remain safe and central/ORA mirrors stay synchronized",
2167
+ "Memberships, gift cards, recurring appointments, and automatic no-show charging remain explicitly out of scope"
2168
+ ]
2169
+ },
2170
+ {
2171
+ "id": "BK-099",
2172
+ "epic": "customer-surface and monetization",
2173
+ "title": "Restore package credits on cancellation",
2174
+ "repository": "both",
2175
+ "dependsOn": ["BK-095", "BK-098"],
2176
+ "status": "passed",
2177
+ "plan": [
2178
+ "Add an additive package-redemption reversal state without deleting the original ledger row",
2179
+ "Restore each active per-variant credit in the same transaction as a successful cancellation",
2180
+ "Keep completed and no-show package visits consumed and leave an audit/event trail",
2181
+ "Synchronize the deterministic manager/customer hosts, ORA mirror, schema, and docs"
2182
+ ],
2183
+ "implementation": [
2184
+ "MaggieDash/schema/maggie-booking-install.sql",
2185
+ "MaggieDash/backend/booking/postgres-core-repository.mjs",
2186
+ "MaggieDash/backend/booking/reference-host.mjs",
2187
+ "MaggieDash/backend/booking/customer-reference-host.mjs",
2188
+ "ORA installed Booking mirror"
2189
+ ],
2190
+ "tests": [
2191
+ "MaggieDash npm test",
2192
+ "manager and public customer reference-host cancellation-credit regressions",
2193
+ "disposable PostgreSQL integration including package-credit restoration",
2194
+ "schema validation and PostgreSQL query syntax checks",
2195
+ "ORA contract check and Astro build",
2196
+ "ai-cmo task validation and git diff --check"
2197
+ ],
2198
+ "docs": [
2199
+ "docs/maggiedash-booking/README.md",
2200
+ "docs/maggiedash-booking/DATA-FLOW.md",
2201
+ "docs/maggiedash-booking/DATA-MODEL.md",
2202
+ "docs/maggiedash-booking/USER-JOURNEYS.md",
2203
+ "docs/maggiedash-booking/PROGRESS.md",
2204
+ "docs/maggiedash-booking/TASKS.md"
2205
+ ],
2206
+ "acceptance": [
2207
+ "An eligible manager or customer cancellation restores each active package redemption exactly once",
2208
+ "The redemption row is marked reversed with reason/time/actor and the entitlement status is recalculated safely",
2209
+ "Inconsistent balances fail closed and the transaction cannot partially restore credit",
2210
+ "Completed and no-show bookings do not restore credits",
2211
+ "Real database migration and authenticated staging evidence remain explicit host gates"
2212
+ ]
2213
+ },
2214
+ {
2215
+ "id": "BK-100",
2216
+ "epic": "payments and first-run setup",
2217
+ "title": "Allow secure dashboard-managed Stripe connection",
2218
+ "repository": "both",
2219
+ "dependsOn": ["BK-064", "BK-065"],
2220
+ "status": "passed",
2221
+ "plan": [
2222
+ "Accept a Stripe secret key and webhook secret only from an owner or manager over the authenticated Booking endpoint",
2223
+ "Verify the credentials with Stripe before persistence and retain deployment secret precedence",
2224
+ "Seal dashboard-managed credentials with AES-256-GCM using a key derived from BOOKING_TOKEN_SECRET",
2225
+ "Synchronize the generic Astro host, ORA mirror, schema, UI, CLI checklist, and integration documentation"
2226
+ ],
2227
+ "implementation": [
2228
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
2229
+ "MaggieDash/schema/maggie-booking-install.sql",
2230
+ "MaggieDash/booking/src/booking.tsx",
2231
+ "ORA src/lib/maggie/booking.ts and _maggie/booking/booking.tsx",
2232
+ "ORA maggiedash schema mirrors",
2233
+ "ai-cmo-skills/tools/clis/maggie_booking.py"
2234
+ ],
2235
+ "tests": [
2236
+ "MaggieDash npm test",
2237
+ "MaggieDash Astro host bootstrap and schema validators",
2238
+ "ORA contract check and Astro build",
2239
+ "ai-cmo-skills Booking unit tests, packaged inspect/setup, and task validation",
2240
+ "git diff --check"
2241
+ ],
2242
+ "docs": [
2243
+ "MaggieDash/docs/STRIPE-INTEGRATION.md",
2244
+ "MaggieDash/backend/booking/README.md",
2245
+ "ai-cmo-skills/docs/maggiedash-booking/README.md",
2246
+ "ai-cmo-skills/docs/maggiedash-booking/HOST-ADAPTER.md",
2247
+ "ai-cmo-skills/docs/maggiedash-booking/SKILLS-AND-CLI.md",
2248
+ "ai-cmo-skills/docs/maggiedash-booking/PROGRESS.md",
2249
+ "ORA docs/maggie-booking-integration.md"
2250
+ ],
2251
+ "acceptance": [
2252
+ "A signed-in owner or manager can submit both Stripe credentials from Booking Overview and receive only a redacted verification result",
2253
+ "Invalid credentials are rejected before storage and finance/staff cannot add provider credentials",
2254
+ "Dashboard credentials are encrypted at rest, never returned or logged, and are loaded by payments/webhooks/workers after restart",
2255
+ "Deployment STRIPE_SECRET_KEY remains authoritative and rejects dashboard override attempts",
2256
+ "Production migration, live Stripe verification, and scheduler enablement remain explicit host evidence gates"
2257
+ ]
2258
+ },
2259
+ {
2260
+ "id": "BK-101",
2261
+ "epic": "access-control",
2262
+ "title": "Complete server-enforced Booking capability permissions",
2263
+ "repository": "both",
2264
+ "dependsOn": ["BK-089", "BK-100"],
2265
+ "status": "passed",
2266
+ "plan": [
2267
+ "Reconcile the access permission registry with every manager route capability",
2268
+ "Allow explicitly granted staff capabilities while retaining safe role defaults for legacy rows",
2269
+ "Synchronize generic Astro, ORA, reference-host, contract, CLI, and documentation surfaces",
2270
+ "Add regression coverage for scoped customer, location, waitlist, and notification reads"
2271
+ ],
2272
+ "implementation": [
2273
+ "MaggieDash/backend/booking/route-handler.mjs",
2274
+ "MaggieDash/adapters/astro/host/src/pages/api/maggie/booking/access.json.ts",
2275
+ "MaggieDash/backend/booking/reference-host.mjs",
2276
+ "MaggieDash/contracts/booking-access-v1.json",
2277
+ "ORA installed Booking mirror",
2278
+ "ai-cmo-skills/tools/clis/maggie_booking.py"
2279
+ ],
2280
+ "tests": [
2281
+ "MaggieDash npm test",
2282
+ "Booking access contract validator",
2283
+ "scoped staff route-handler regression",
2284
+ "ORA contract check and Astro build",
2285
+ "git diff --check"
2286
+ ],
2287
+ "docs": [
2288
+ "MaggieDash/docs/BOOKING-HOST-ADAPTER.md",
2289
+ "ai-cmo-skills/docs/maggiedash-booking/HOST-ADAPTER.md",
2290
+ "ai-cmo-skills/docs/maggiedash-booking/PROGRESS.md",
2291
+ "ORA docs/maggie-booking-integration.md"
2292
+ ],
2293
+ "acceptance": [
2294
+ "The administrator permission list exactly matches the route capability registry",
2295
+ "A staff or finance account without permissions receives only its safe role defaults",
2296
+ "An explicitly granted staff capability is honored by the server for the corresponding read route",
2297
+ "Central and ORA mirrors return the same permission registry",
2298
+ "Production migration and authenticated staging evidence remain explicit host gates"
2299
+ ]
2300
+ },
2301
+ {
2302
+ "id": "BK-102",
2303
+ "epic": "payments",
2304
+ "title": "Persist provider customer identity for real Stripe payments",
2305
+ "repository": "both",
2306
+ "dependsOn": ["BK-025", "BK-100"],
2307
+ "status": "passed",
2308
+ "plan": [
2309
+ "Add a tenant-scoped provider customer reference to the Booking customer schema",
2310
+ "Resolve or idempotently create Stripe Customer objects at the host boundary",
2311
+ "Use the resolved provider ID for Checkout, PaymentIntent, and SetupIntent requests",
2312
+ "Mirror the adapter, schema, validator, and docs in ORA without exposing credentials"
2313
+ ],
2314
+ "implementation": [
2315
+ "MaggieDash/backend/booking/stripe-adapter.mjs",
2316
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
2317
+ "MaggieDash/schema/maggie-booking-install.sql",
2318
+ "ORA installed Booking mirror",
2319
+ "MaggieDash/scripts/validate-stripe-adapter.mjs"
2320
+ ],
2321
+ "tests": [
2322
+ "MaggieDash Stripe adapter validator",
2323
+ "ORA Stripe adapter validator",
2324
+ "MaggieDash npm test",
2325
+ "ORA contract check and Astro build",
2326
+ "git diff --check"
2327
+ ],
2328
+ "docs": [
2329
+ "MaggieDash/docs/STRIPE-INTEGRATION.md",
2330
+ "ai-cmo-skills/docs/maggiedash-booking/PROGRESS.md",
2331
+ "ORA docs/maggie-booking-integration.md"
2332
+ ],
2333
+ "acceptance": [
2334
+ "A local Booking customer UUID is never sent to Stripe as a cus_* reference",
2335
+ "Concurrent retries use a stable Stripe idempotency key and persist the returned provider customer ID",
2336
+ "Provider customer references remain tenant-scoped and are not exposed in public DTOs",
2337
+ "Central and ORA adapter/schema/validator surfaces remain behaviorally aligned",
2338
+ "Live Stripe verification and production migration remain explicit host evidence gates"
2339
+ ]
2340
+ },
2341
+ {
2342
+ "id": "BK-103",
2343
+ "epic": "payments",
2344
+ "title": "Add consented Stripe no-show fee charging",
2345
+ "repository": "both",
2346
+ "dependsOn": ["BK-088", "BK-102"],
2347
+ "status": "passed",
2348
+ "plan": [
2349
+ "Use a policy-derived fee and require explicit manager or finance confirmation",
2350
+ "Charge only through Stripe off-session PaymentIntent with a saved consented payment method",
2351
+ "Persist an adjustment payment attempt, audit/event evidence, and idempotent replay state",
2352
+ "Notify the customer through the existing Resend outbox and mirror the flow in ORA"
2353
+ ],
2354
+ "implementation": [
2355
+ "MaggieDash/backend/booking/postgres-payment-adapter.mjs",
2356
+ "MaggieDash/backend/booking/stripe-adapter.mjs",
2357
+ "MaggieDash/backend/booking/route-handler.mjs",
2358
+ "MaggieDash/adapters/astro/host/src/lib/maggie/booking.ts",
2359
+ "MaggieDash/booking/src/booking.tsx",
2360
+ "MaggieDash/booking/src/customer.tsx",
2361
+ "ORA installed Booking mirror",
2362
+ "ai-cmo-skills/contracts/maggiedash/booking-host-adapter-v1.json"
2363
+ ],
2364
+ "tests": [
2365
+ "Stripe adapter saved-payment and off-session conformance",
2366
+ "manager route/reference-host contract coverage",
2367
+ "MaggieDash npm test",
2368
+ "ORA contract check and Astro build",
2369
+ "git diff --check"
2370
+ ],
2371
+ "docs": [
2372
+ "MaggieDash/docs/STRIPE-INTEGRATION.md",
2373
+ "MaggieDash/docs/BOOKING-HOST-ADAPTER.md",
2374
+ "ai-cmo-skills/docs/maggiedash-booking/HOST-ADAPTER.md",
2375
+ "ai-cmo-skills/docs/maggiedash-booking/PROGRESS.md",
2376
+ "ORA docs/maggie-booking-integration.md"
2377
+ ],
2378
+ "acceptance": [
2379
+ "No-show transition remains review-only until a separate explicit charge action is confirmed",
2380
+ "The charge is rejected without a saved provider payment method, customer consent, or verified off-session capability",
2381
+ "Successful/pending/failed provider outcomes are persisted as adjustment attempts with idempotent replay and audit evidence",
2382
+ "Resend notification is queued only after a successful no-show fee charge",
2383
+ "Production schema migration, Stripe verification, webhook setup, and worker scheduling remain explicit host gates"
2384
+ ]
2385
+ }
2386
+ ]
2387
+ }