@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
@@ -54,7 +54,7 @@
54
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
55
  "implementation": ["schema/maggie-booking-install.sql", "scripts/validate-booking-schema.mjs"],
56
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/DELIVERY-PLAN.md", "docs/maggiedash-booking/PROGRESS.md"],
57
+ "docs": ["docs/maggiedash-booking/DATA-MODEL.md", "docs/maggiedash-booking/CURRENT-STATE.md", "docs/maggiedash-booking/PROGRESS.md"],
58
58
  "acceptance": ["Migration is repeatable", "Tenant scope and active allocation overlap constraints are enforced", "Schema evidence is sanitized and reproducible"]
59
59
  },
60
60
  {
@@ -79,7 +79,7 @@
79
79
  "status": "passed",
80
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
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 40 routes", "safe error and redaction tests", "project authorization fixtures"],
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
83
  "docs": ["docs/maggiedash-booking/HOST-ADAPTER.md", "backend/README.md"],
84
84
  "acceptance": ["Host routes return canonical DTOs", "No SQL/provider/raw credentials cross the boundary", "All failures use the versioned safe error shape"]
85
85
  },
@@ -182,8 +182,8 @@
182
182
  "dependsOn": ["BK-020", "BK-021", "BK-024", "BK-026"],
183
183
  "status": "needs-evidence",
184
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/*"],
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 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"],
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
187
  "docs": ["docs/maggiedash-booking/RUNTIME-OPERATIONS.md", "ops/README.md"],
188
188
  "acceptance": ["Workers never point production at fixture JSON", "Jobs are idempotent and observable", "Rollback disables new writes without deleting history"]
189
189
  },
@@ -198,7 +198,7 @@
198
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
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
200
  "docs": ["docs/maggiedash-booking/QA-TEST-PLAN.md", "docs/maggiedash-booking/PROGRESS.md"],
201
- "acceptance": ["All 40 manager endpoints have 2xx evidence", "All 15 manager screens pass at 3 viewports", "No console errors, failed requests, overflow, or login leakage"]
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
202
  },
203
203
  {
204
204
  "id": "BK-032",
@@ -210,7 +210,7 @@
210
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
211
  "implementation": ["tools/clis/maggie_booking.py release-gate", "tools/tests/test_maggie_booking.py", "README files", "docs/maggiedash-booking/PROGRESS.md"],
212
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/DELIVERY-PLAN.md", "docs/maggiedash-booking/PROGRESS.md"],
213
+ "docs": ["docs/maggiedash-booking/README.md", "docs/maggiedash-booking/CURRENT-STATE.md", "docs/maggiedash-booking/PROGRESS.md"],
214
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
215
  },
216
216
  {
@@ -223,7 +223,7 @@
223
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
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
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/DELIVERY-PLAN.md", "docs/maggiedash-booking/HOST-ADAPTER.md", "docs/maggiedash-booking/PROGRESS.md", "MaggieDash/README.md", "MaggieDash/backend/README.md"],
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
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
228
  },
229
229
  {
@@ -315,7 +315,7 @@
315
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
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
317
  "docs": ["docs/maggiedash-booking/SKILLS-AND-CLI.md", "docs/maggiedash-booking/PROGRESS.md"],
318
- "acceptance": ["The compact contract maps all 40 manager endpoints and nine 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"]
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
319
  },
320
320
  {
321
321
  "id": "BK-041",
@@ -715,12 +715,14 @@
715
715
  "docs/maggiedash-booking/PROGRESS.md",
716
716
  "skills/maggie-booking/SKILL.md"
717
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
- "Central and ORA Booking UI builds remain valid"
723
- ]
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
+ ]
724
726
  },
725
727
  {
726
728
  "id": "BK-065",
@@ -752,11 +754,12 @@
752
754
  "docs/maggiedash-booking/PROGRESS.md",
753
755
  "skills/maggie-booking/SKILL.md"
754
756
  ],
755
- "acceptance": [
756
- "A short token is reported as invalid and causes setup to require configuration",
757
- "Only one Stripe key is reported as degraded with a paired-key next step",
758
- "Secret values never appear in the JSON result or test output"
759
- ]
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
+ ]
760
763
  },
761
764
  {
762
765
  "id": "BK-066",
@@ -1218,7 +1221,7 @@
1218
1221
  "acceptance": [
1219
1222
  "A blank host can create its first location without a fixture ID",
1220
1223
  "Location writes validate timezone, scope, permission, uniqueness, and idempotent replay",
1221
- "The central and ORA location screen, 40-route contract, reference host, and configuration gates pass"
1224
+ "The central and ORA location screen, 47-route contract, reference host, and configuration gates pass"
1222
1225
  ]
1223
1226
  },
1224
1227
  {
@@ -1230,7 +1233,7 @@
1230
1233
  "status": "passed",
1231
1234
  "plan": [
1232
1235
  "Add the location capability and two location endpoint IDs to the public installer contract",
1233
- "Align service-method mappings and the CLI detailed-contract count with MaggieDash's 40-route contract",
1236
+ "Align service-method mappings and the CLI detailed-contract count with MaggieDash's 47-route contract",
1234
1237
  "Add regression coverage so future route additions cannot leave the installer contract stale"
1235
1238
  ],
1236
1239
  "implementation": [
@@ -1252,7 +1255,7 @@
1252
1255
  "docs/maggiedash-booking/README.md"
1253
1256
  ],
1254
1257
  "acceptance": [
1255
- "The ai-cmo-skills installer contract declares all 40 manager endpoints",
1258
+ "The ai-cmo-skills installer contract declares all 47 manager endpoints",
1256
1259
  "The location capability and list/update service methods are present",
1257
1260
  "The public CLI and MaggieDash contract validators agree without host secrets or database access"
1258
1261
  ]
@@ -1291,7 +1294,7 @@
1291
1294
  "acceptance": [
1292
1295
  "The default public source declares an Astro host bootstrap under hostBootstrap.astro",
1293
1296
  "A fresh Astro project can install Booking without a local MaggieDash checkout",
1294
- "The released source contains the same 40-route contract and worker/schema artifacts as the validated local source"
1297
+ "The released source contains the same 47-route contract and worker/schema artifacts as the validated local source"
1295
1298
  ]
1296
1299
  },
1297
1300
  {
@@ -1326,8 +1329,8 @@
1326
1329
  "docs/maggiedash-booking/EXECUTION-BOARD.json"
1327
1330
  ],
1328
1331
  "acceptance": [
1329
- "The npm CLI validates the current 40-route Booking contract from bundled-contracts",
1330
- "The npm CLI can validate Stripe and the packaged 69-task execution board",
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",
1331
1334
  "Source-checkout and npm-package path layouts both remain supported"
1332
1335
  ]
1333
1336
  },
@@ -1369,7 +1372,7 @@
1369
1372
  "Notification list results are tenant-scoped and omit raw recipient email/provider payloads",
1370
1373
  "Only an authorized owner/manager can replay a dead-letter notification",
1371
1374
  "Replay requires reason and idempotency, resets delivery state, and records event plus audit evidence",
1372
- "Central, installer contract, package bundle, ORA mirror, and build evidence agree on 40 manager routes"
1375
+ "Central, installer contract, package bundle, ORA mirror, and build evidence agree on 47 manager routes"
1373
1376
  ]
1374
1377
  },
1375
1378
  {
@@ -1882,6 +1885,503 @@
1882
1885
  "Resend delivery continues to use the existing secret-safe outbox and dead-letter recovery path",
1883
1886
  "Preview and provider send paths never expose API keys, recipient email addresses, or raw customer tokens"
1884
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
+ ]
1885
2385
  }
1886
2386
  ]
1887
2387
  }