create-mercato-app 0.6.8-develop.6963.1.04a6d320e9 → 0.6.8-develop.6969.1.7a32706312

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 (129) hide show
  1. package/README.md +1 -1
  2. package/agentic/guides/framework-contracts.md +82 -0
  3. package/agentic/shared/AGENTS.md.template +3 -3
  4. package/agentic/shared/ai/agentic.config.json +1 -0
  5. package/agentic/shared/ai/harness/README.md +4 -4
  6. package/agentic/shared/ai/harness/RELEASE.md +4 -4
  7. package/agentic/shared/ai/harness/cases.json +93 -14
  8. package/agentic/shared/ai/harness/cases.schema.json +4 -4
  9. package/agentic/shared/ai/harness/fixtures/index.json +2 -1
  10. package/agentic/shared/ai/harness/fixtures/seeds.json +5 -0
  11. package/agentic/shared/ai/harness/release-matrix.json +5 -4
  12. package/agentic/shared/ai/harness/source-link-inventory.json +196 -4
  13. package/agentic/shared/ai/harness/validators.json +4 -3
  14. package/agentic/shared/ai/harness/writable-ast-oracles.mjs +9 -1
  15. package/agentic/shared/ai/harness/writable-spec-oracles.mjs +72 -4
  16. package/agentic/shared/ai/skills/om-auto-implement-spec/SKILL.md +2 -0
  17. package/agentic/shared/ai/skills/om-evolve-harness/references/case-template.md +1 -1
  18. package/agentic/shared/ai/skills/om-evolve-harness/references/case-workflow.md +1 -1
  19. package/agentic/shared/ai/skills/om-implement-spec/SKILL.md +2 -1
  20. package/agentic/shared/ai/skills/om-implement-spec/references/planning-and-progress.md +13 -1
  21. package/agentic/shared/ai/skills/om-implement-spec/references/resume.md +17 -0
  22. package/agentic/shared/ai/skills/om-judge-agent-session/references/input-normalization.md +3 -0
  23. package/agentic/shared/ai/skills/om-judge-agent-session/references/judge-workflow.md +2 -0
  24. package/agentic/shared/ai/skills/om-judge-agent-session/references/report-template.md +1 -0
  25. package/agentic/shared/ai/skills/om-share-this-session/references/report-templates.md +4 -0
  26. package/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +36 -1
  27. package/agentic/shared/scripts/evaluate-agent-harness.mjs +61 -8
  28. package/agentic/shared/scripts/run-agent-harness-release.mjs +1 -1
  29. package/dist/agentic/guides/framework-contracts.md +82 -0
  30. package/dist/agentic/guides/module-facts.json +112 -112
  31. package/dist/agentic/guides/module-facts.v2.json +112 -112
  32. package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
  33. package/dist/agentic/guides/modules/api_docs/index.md +1 -1
  34. package/dist/agentic/guides/modules/api_keys/index.md +1 -1
  35. package/dist/agentic/guides/modules/attachments/index.md +1 -1
  36. package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
  37. package/dist/agentic/guides/modules/auth/index.md +1 -1
  38. package/dist/agentic/guides/modules/business_rules/index.md +1 -1
  39. package/dist/agentic/guides/modules/catalog/index.md +1 -1
  40. package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
  41. package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
  42. package/dist/agentic/guides/modules/checkout/index.md +1 -1
  43. package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
  44. package/dist/agentic/guides/modules/configs/index.md +1 -1
  45. package/dist/agentic/guides/modules/content/index.md +1 -1
  46. package/dist/agentic/guides/modules/currencies/index.md +1 -1
  47. package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
  48. package/dist/agentic/guides/modules/customers/index.md +1 -1
  49. package/dist/agentic/guides/modules/dashboards/index.md +1 -1
  50. package/dist/agentic/guides/modules/data_sync/index.md +1 -1
  51. package/dist/agentic/guides/modules/design_system/index.md +1 -1
  52. package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
  53. package/dist/agentic/guides/modules/directory/index.md +1 -1
  54. package/dist/agentic/guides/modules/entities/index.md +1 -1
  55. package/dist/agentic/guides/modules/eudr/index.md +1 -1
  56. package/dist/agentic/guides/modules/events/index.md +1 -1
  57. package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
  58. package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
  59. package/dist/agentic/guides/modules/generators/index.md +1 -1
  60. package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
  61. package/dist/agentic/guides/modules/integrations/index.md +1 -1
  62. package/dist/agentic/guides/modules/messages/index.md +1 -1
  63. package/dist/agentic/guides/modules/notifications/index.md +1 -1
  64. package/dist/agentic/guides/modules/onboarding/index.md +1 -1
  65. package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
  66. package/dist/agentic/guides/modules/perspectives/index.md +1 -1
  67. package/dist/agentic/guides/modules/planner/index.md +1 -1
  68. package/dist/agentic/guides/modules/portal/index.md +1 -1
  69. package/dist/agentic/guides/modules/progress/index.md +1 -1
  70. package/dist/agentic/guides/modules/query_index/index.md +1 -1
  71. package/dist/agentic/guides/modules/record_locks/index.md +1 -1
  72. package/dist/agentic/guides/modules/resources/index.md +1 -1
  73. package/dist/agentic/guides/modules/sales/index.md +1 -1
  74. package/dist/agentic/guides/modules/scheduler/index.md +1 -1
  75. package/dist/agentic/guides/modules/search/index.md +1 -1
  76. package/dist/agentic/guides/modules/security/index.md +1 -1
  77. package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
  78. package/dist/agentic/guides/modules/sso/index.md +1 -1
  79. package/dist/agentic/guides/modules/staff/index.md +1 -1
  80. package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
  81. package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
  82. package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
  83. package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
  84. package/dist/agentic/guides/modules/translations/index.md +1 -1
  85. package/dist/agentic/guides/modules/webhooks/index.md +1 -1
  86. package/dist/agentic/guides/modules/wms/index.md +1 -1
  87. package/dist/agentic/guides/modules/workflows/index.md +1 -1
  88. package/dist/agentic/guides/reference-module-facts.json +1 -1
  89. package/dist/agentic/guides/upstream/manifest.json +1 -1
  90. package/dist/agentic/shared/AGENTS.md.template +3 -3
  91. package/dist/agentic/shared/ai/agentic.config.json +1 -0
  92. package/dist/agentic/shared/ai/harness/README.md +4 -4
  93. package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
  94. package/dist/agentic/shared/ai/harness/cases.json +93 -14
  95. package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
  96. package/dist/agentic/shared/ai/harness/fixtures/index.json +2 -1
  97. package/dist/agentic/shared/ai/harness/fixtures/seeds.json +5 -0
  98. package/dist/agentic/shared/ai/harness/release-matrix.json +5 -4
  99. package/dist/agentic/shared/ai/harness/source-link-inventory.json +196 -4
  100. package/dist/agentic/shared/ai/harness/validators.json +4 -3
  101. package/dist/agentic/shared/ai/harness/writable-ast-oracles.mjs +9 -1
  102. package/dist/agentic/shared/ai/harness/writable-spec-oracles.mjs +72 -4
  103. package/dist/agentic/shared/ai/skills/om-auto-implement-spec/SKILL.md +2 -0
  104. package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-template.md +1 -1
  105. package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-workflow.md +1 -1
  106. package/dist/agentic/shared/ai/skills/om-implement-spec/SKILL.md +2 -1
  107. package/dist/agentic/shared/ai/skills/om-implement-spec/references/planning-and-progress.md +13 -1
  108. package/dist/agentic/shared/ai/skills/om-implement-spec/references/resume.md +17 -0
  109. package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/input-normalization.md +3 -0
  110. package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/judge-workflow.md +2 -0
  111. package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/report-template.md +1 -0
  112. package/dist/agentic/shared/ai/skills/om-share-this-session/references/report-templates.md +4 -0
  113. package/dist/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +36 -1
  114. package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +61 -8
  115. package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +1 -1
  116. package/package.json +3 -3
  117. package/template/.ds-check-ignore +1217 -0
  118. package/template/AGENTS.md +3 -3
  119. package/template/package.json.template +3 -1
  120. package/template/scripts/ds-check.mjs +247 -0
  121. package/template/scripts/i18n-check-hardcoded.mjs +187 -0
  122. package/template/src/app/api/docs/__tests__/routes.test.ts +85 -0
  123. package/template/src/app/api/docs/markdown/route.ts +12 -17
  124. package/template/src/app/api/docs/openapi/route.ts +11 -17
  125. package/template/src/i18n/de.json +1 -0
  126. package/template/src/i18n/en.json +1 -0
  127. package/template/src/i18n/es.json +1 -0
  128. package/template/src/i18n/ko.json +1 -0
  129. package/template/src/i18n/pl.json +1 -0
package/README.md CHANGED
@@ -144,7 +144,7 @@ yarn install-skills
144
144
  yarn harness:release --runner codex --prepare-targets /absolute/empty-release-targets --acknowledge-writes
145
145
  ```
146
146
 
147
- The target directory must be absolute, new or empty, and outside the controller app. Select one blocking primary runner with `--runner codex` or `--runner claude`; it owns all 229 routing cases and every writable/review lane, with no per-case fallback. Optionally add the different authenticated runner through `--portability-runner` for the exact 48-case representative read-only lane. Omitting it is valid and recorded as not requested; once requested, its failures are blocking. Use a fresh, sanitized controller: automatic preparation fails before copying `.env`/`.env.*` local configuration (safe example/sample/template files remain allowed), credential files, or private-key files. The complete gate requires Linux with trusted system Bubblewrap (`bwrap`) and user namespaces because its Playwright API/browser lanes need a loopback namespace isolated from the host. Preflight rejects untrusted/no-op/pass-through executables and proves isolated loopback plus a capability-free payload before target preparation, provider invocation, or writes; native macOS and Windows therefore fail closed. The command also fails closed when a required runner, browser, or test runtime is unavailable. The 229-case catalog includes 93 framework-neutral business prompts and 48 writable implementation/regression cases (21.0%). The release command runs live routing, writable trusted oracles, per-target `generate`/`typecheck`/`lint`/`build`, any declared generated test, and isolated generated-code review for every writable result. Foundation and target validation—including `yarn build`—receive a minimal environment with network access denied, and persisted diagnostics redact sensitive environment values and URL userinfo. Test-authoring coverage executes a Jest unit test plus Linux/Bubblewrap loopback-only Playwright API and browser tests through fixed controller-owned commands against a read-only target; runtime reports must attest at least one passed test and zero skipped, todo, focused, flaky, or expected-failure tests. The suite then writes a schema-valid sanitized mode-`0600` report under `.ai/harness/results/` with the selected primary and optional portability runner policy.
147
+ The target directory must be absolute, new or empty, and outside the controller app. Select one blocking primary runner with `--runner codex` or `--runner claude`; it owns all 231 routing cases and every writable/review lane, with no per-case fallback. Optionally add the different authenticated runner through `--portability-runner` for the exact 49-case representative read-only lane. Omitting it is valid and recorded as not requested; once requested, its failures are blocking. Use a fresh, sanitized controller: automatic preparation fails before copying `.env`/`.env.*` local configuration (safe example/sample/template files remain allowed), credential files, or private-key files. The complete gate requires Linux with trusted system Bubblewrap (`bwrap`) and user namespaces because its Playwright API/browser lanes need a loopback namespace isolated from the host. Preflight rejects untrusted/no-op/pass-through executables and proves isolated loopback plus a capability-free payload before target preparation, provider invocation, or writes; native macOS and Windows therefore fail closed. The command also fails closed when a required runner, browser, or test runtime is unavailable. The 231-case catalog includes 93 framework-neutral business prompts and 49 writable implementation/regression cases (21.2%). The release command runs live routing, writable trusted oracles, per-target `generate`/`typecheck`/`lint`/`build`, any declared generated test, and isolated generated-code review for every writable result. Foundation and target validation—including `yarn build`—receive a minimal environment with network access denied, and persisted diagnostics redact sensitive environment values and URL userinfo. Test-authoring coverage executes a Jest unit test plus Linux/Bubblewrap loopback-only Playwright API and browser tests through fixed controller-owned commands against a read-only target; runtime reports must attest at least one passed test and zero skipped, todo, focused, flaky, or expected-failure tests. The suite then writes a schema-valid sanitized mode-`0600` report under `.ai/harness/results/` with the selected primary and optional portability runner policy.
148
148
 
149
149
  Use the bundled `om-evolve-harness` skill to add a real case: reproduce failure first, select one smallest knowledge owner, run any generated unit/integration tests plus target checks, require code review, and finish with the full release suite. Open Mercato framework maintainers use the monorepo-only `$om-refresh-standalone-harness --from <ref> --to <ref>` workflow for every release range and retain its sanitized maintenance report.
150
150
 
@@ -0,0 +1,82 @@
1
+ # Installed Framework Contracts
2
+
3
+ Use this digest after app call sites and generated facts identify a named framework contract. Links are read-only version evidence: never edit or enumerate `node_modules`. If a question is unanswered, invoke `om-framework-context` for only that contract.
4
+
5
+ ## Command handler and registry
6
+
7
+ [`CommandHandler`](../../node_modules/@open-mercato/shared/src/lib/commands/types.ts) has a stable `id` and one required operation, `execute(input, ctx)`. Its optional lifecycle is deliberately split:
8
+
9
+ - `prepare(input, ctx)` captures the before snapshot before execution.
10
+ - `execute(input, ctx)` performs the durable operation and returns the public result.
11
+ - `captureAfter(input, result, ctx)` can capture the after snapshot.
12
+ - `buildLog({ input, result, ctx, snapshots })` returns action-log metadata; returning `null` or `skipLog` suppresses a normal log entry.
13
+ - `undo({ input, ctx, logEntry })` and `redo(...)` are only valid when the handler owns a reversible contract. Undo payload is stored under `commandPayload`, not `logEntry.payload`; use the shared undo extractor.
14
+
15
+ `CommandRuntimeContext` carries authentication, selected organization scope, the DI container, optional request and sync origin, bulk-import suppression, and an optional `transactionalEm`. A handler must preserve this scope and reuse `transactionalEm` when supplied instead of opening an independent transaction.
16
+
17
+ [The command registry and `registerCommand`](../../node_modules/@open-mercato/shared/src/lib/commands/registry.ts) own handler discovery. Register through the normal `commands.ts` discovery surface. IDs are global and stable: duplicates throw outside development; development permits HMR replacement. Never silently replace a production ID or call registry internals from a module.
18
+
19
+ ## Atomic CRUD command writes
20
+
21
+ [`runCrudCommandWrite`](../../node_modules/@open-mercato/shared/src/lib/commands/runCrudCommandWrite.ts) is the command-owned persistence seam for CRUD-backed handlers. It:
22
+
23
+ It resolves or reuses an entity manager; passes all phases through transactional-by-default `withAtomicFlush`; applies custom fields after durable phases; and emits configured CRUD/index side effects from `sideEffect()`.
24
+
25
+ Every phase must use the callback's entity manager. Set `transaction: false` only when an enclosing transaction already provides the atomic boundary. `sideEffect()` must return the final entity and stable identifiers after phases have completed. Commands using this helper own generic event/reindex emission; their route must not repeat it.
26
+
27
+ ## `makeCrudRoute`
28
+
29
+ [`makeCrudRoute`](../../node_modules/@open-mercato/shared/src/lib/crud/factory.ts) is the installed HTTP factory. Its `metadata.GET/POST/PUT/DELETE` gates authentication, immutable feature requirements, and rate limits per method. The factory also retains tenant/organization selection checks, interceptors, mutation guards, synchronous before/after lifecycle subscribers, response shaping, command operation headers, and errors. Command-backed actions extend that envelope; they do not replace it.
30
+
31
+ ORM defaults are `id`, `organizationId`, `tenantId`, and `deletedAt`; `null` disables an automatic field. Do not disable scope merely because a handler checks it too. With the specialized read-only `omitAutomaticTenantOrgScope`, `buildFilters` must encode all visibility and fail closed; update/delete scoping remains automatic.
32
+
33
+ ### List sequence
34
+
35
+ - The list zod schema parses query parameters; before interceptors may rewrite it, followed by another parse.
36
+ - `hooks.beforeList(validatedQuery, ctx)` runs after rewriting and before the query. Resolve request-specific state through `ctx`, never module-global mutable state.
37
+ - `list.transformItem(item)` is a synchronous per-row projection. On the Query Engine path it runs before custom-field decoration, translation overlay, and response enrichment. It must not perform async I/O.
38
+ - `hooks.afterList(payload, { ...ctx, query })` receives the mutable response payload on cache, query-engine, ORM-fallback, export, and empty-result branches. Response enrichers configured by `enrichers.entityId` run after `afterList`; after interceptors also remain part of the factory response pipeline.
39
+
40
+ Keep entity/enricher IDs and list fields, filters, sorting, joins, and export settings stable. `buildFilters` may be async; `transformItem` may not. Query Engine options do not apply when the route omits `entityId` or `fields`.
41
+
42
+ ### Command-backed mutations
43
+
44
+ `actions.create`, `actions.update`, and `actions.delete` select the command path by stable `commandId`. An action may map validated input, add log metadata, choose response/status, and provide resource identity. The command performs persistence and asynchronous generic CRUD side effects. The factory still performs:
45
+
46
+ - route authentication and selected-scope rejection;
47
+ - request interceptors and schema validation;
48
+ - synchronous lifecycle events and mutation guards;
49
+ - command-bus execution and action-log operation headers;
50
+ - response interceptors, guard success callbacks, and cache invalidation.
51
+
52
+ Thus commands own the asynchronous configured CRUD event/index work, not the factory's synchronous lifecycle. The factory deliberately does not double-emit the command's generic event.
53
+
54
+ ## Typed module events
55
+
56
+ [`createModuleEvents`](../../node_modules/@open-mercato/shared/src/modules/events/factory.ts) adds `module` to definitions, registers IDs for runtime validation, and returns typed `eventsConfig.emit`. The emitted ID must be declared by that configuration.
57
+
58
+ `eventsConfig.emit(eventId, payload, options)` delegates immediately to the bootstrapped event bus. It does not begin, join, or wait for a database transaction. Calling it before commit can publish an event for a write that later rolls back. Emit by call order only after the durable write succeeds, or use the post-write flow supplied by `runCrudCommandWrite`/the Data Engine. `clientBroadcast` and `portalBroadcast` are declaration flags, not transaction controls.
59
+
60
+ ## Optimistic locking
61
+
62
+ [Command optimistic-lock helpers](../../node_modules/@open-mercato/shared/src/lib/crud/optimistic-lock-command.ts) normalize an explicit expected version or request header and compare it with actual `updated_at`. `assertOptimisticLock` does nothing when the token is absent or locking is disabled, and throws the shared 409 conflict on mismatch.
63
+
64
+ `expected_updated_at` is an app convention, not inferred. Validate and pass it as `expected`; load and assert inside the mutation transaction. Return `updated_at`/`updatedAt` so the UI can send the version.
65
+
66
+ ## Defensive JSON reads
67
+
68
+ [`readJsonSafe`](../../node_modules/@open-mercato/shared/src/lib/http/readJsonSafe.ts) accepts a `Request`, `Response`, or string and returns the supplied fallback for empty/invalid JSON. It is not schema validation: narrow or zod-parse its result.
69
+
70
+ ## Data Engine ORM operations
71
+
72
+ [The Data Engine](../../node_modules/@open-mercato/shared/src/lib/data/engine.ts) provides `createOrmEntity`, `updateOrmEntity`, and `deleteOrmEntity` for generic ORM-backed mutation seams:
73
+
74
+ - `createOrmEntity({ entity, data })` creates, persists, and flushes, then returns the entity.
75
+ - `updateOrmEntity({ entity, where, apply })` loads one matching entity, returns `null` when absent, applies the callback, flushes, and returns the entity.
76
+ - `deleteOrmEntity({ entity, where, soft, softDeleteField })` loads one matching entity, returns `null` when absent, then soft-deletes or removes and flushes.
77
+
78
+ These helpers do not derive tenant/organization scope or automatically emit. The caller owns complete `where` scope and create fields. `markOrmEntityChange` queues event/index work, `flushOrmEntityChanges` drains it, and `emitOrmEntityEvent` emits directly. Drain only after the durable write; suppressed indexing must be rebuilt.
79
+
80
+ ## Escalation rule
81
+
82
+ Start here, then the one exact linked file. If unanswered, invoke `om-framework-context` with a narrow query and report the installed version and limitation. Never copy a private implementation detail into an app contract.
@@ -30,7 +30,7 @@ Route first; never probe unmatched context.
30
30
 
31
31
  ## Validation
32
32
 
33
- Use the smallest relevant set. Broad: `yarn generate && yarn typecheck && yarn lint && yarn test && yarn build`; integration: `yarn test:integration:ephemeral`. Report failures; never migrate to validate.
33
+ Broad: `yarn generate && yarn typecheck && yarn lint && yarn ds:check && yarn test && yarn build`; integration: `yarn test:integration:ephemeral`. Never migrate to validate.
34
34
 
35
35
  ## Three-Axis Context Assembler
36
36
 
@@ -83,10 +83,10 @@ Match every work-unit row; OPEN its skill before selection.
83
83
  | `ai-workflow` | Workflow/activity/user task/idempotency/output/progress | `om-build-workflow` + AI/workflows |
84
84
  | `testing` | REQUEST says test/coverage/prove, or verify by exercising API/browser/screen sizes/keyboard/screen-reader—not a fix's implicit regression duty or review/audit/config check | MUST read `.ai/guides/testing-debugging.md` + external `om-integration-tests` for integration/E2E/app tests |
85
85
  | `debugging` | Reproduce/root-cause/minimal fix/regression oracle | `om-troubleshooter` + testing/debugging |
86
- | `framework-context` | Exact installed contract still unknown | bounded `om-framework-context`, last |
86
+ | `framework-context` | Exact installed contract still unknown | `.ai/guides/framework-contracts.md`, then bounded `om-framework-context`, last |
87
87
  | `debugging` + `testing` | Add/fix recurring harness case/test | `om-evolve-harness` |
88
88
 
89
- `framework-context`: resolve one named module/framework fact first. Use bounded source only for an unresolved exact contract, current behavior, authorization, dependents, or safest customization seam; never for “installed contracts” alone.
89
+ `framework-context`: resolve one named fact first. Use bounded source only if the guide leaves current behavior, authorization, dependents, or safest customization seam unresolved; never for “installed contracts” alone.
90
90
 
91
91
  ### Axis 3 — SDLC and Delivery
92
92
 
@@ -7,6 +7,7 @@
7
7
  "yarn generate",
8
8
  "yarn typecheck",
9
9
  "yarn lint",
10
+ "yarn ds:check",
10
11
  "yarn test",
11
12
  "yarn build"
12
13
  ]
@@ -1,6 +1,6 @@
1
1
  # Agent harness evaluations
2
2
 
3
- `cases.json` is the 229-case standalone-app contract. Run `yarn harness:validate --all` for the deterministic gate. Live routing uses a fresh read-only process per case:
3
+ `cases.json` is the 231-case standalone-app contract. Run `yarn harness:validate --all` for the deterministic gate. Live routing uses a fresh read-only process per case:
4
4
 
5
5
  UMES routing is fact-first. The additive and unified-override audit evaluations, plus their targeted cases, resolve exact/pattern hosts, outgoing contributions, correlation provenance, round-trip groups, framework-owned targets, and override domain/key/mode from the generated module sheets and `.ai/guides/framework-extension-points.md` before bounded installed source. The repository UMES umbrella spec may appear as optional source-checkout provenance; it is never required in a standalone scaffold.
6
6
 
@@ -11,16 +11,16 @@ yarn harness:validate --runner claude --case OMH-009
11
11
 
12
12
  For an explicitly requested Codex comparison outside the blocking release matrix, pin both dimensions so the sanitized result is reproducible, for example `--model gpt-5.4-mini --reasoning-effort high`. The effort override is Codex-only; supported values are `minimal`, `low`, `medium`, `high`, and `xhigh`, and omitting it preserves the existing runner default. Measured high-effort mini runs legitimately exceed ten minutes on broad context, so that exact model/effort pair uses a 15-minute per-attempt floor; measured Claude/Sonnet runs use a 10-minute floor. Passing `--timeout` remains authoritative, and other routing runs retain the five-minute default.
13
13
 
14
- A blocking release selects one primary runner for every live lane. The optional portability runner must be different and receives only the exact 48-case representative read-only set:
14
+ A blocking release selects one primary runner for every live lane. The optional portability runner must be different and receives only the exact 49-case representative read-only set:
15
15
 
16
16
  ```text
17
17
  yarn harness:release --runner codex --prepare-targets /absolute/empty-release-targets --acknowledge-writes
18
18
  yarn harness:release --runner codex --portability-runner claude --prepare-targets /absolute/empty-release-targets --acknowledge-writes
19
19
  ```
20
20
 
21
- The primary runner owns all 229 routing cases, all 48 writable cases, and all generative-judge runs. No per-case fallback or mixed primary ownership is allowed. Omitting `--portability-runner` is valid and the sanitized report records `portabilityRunner: null`; explicitly requesting an unavailable or failing secondary runner fails that extended run.
21
+ The primary runner owns all 231 routing cases, all 49 writable cases, and all generative-judge runs. No per-case fallback or mixed primary ownership is allowed. Omitting `--portability-runner` is valid and the sanitized report records `portabilityRunner: null`; explicitly requesting an unavailable or failing secondary runner fails that extended run.
22
22
 
23
- Writable evaluation is intentionally opt-in. The expanded catalog has a 48-case writable release target, but only cases registered in `release-matrix.json` and backed by controller-owned fixtures and oracles are executable. Copy or create a fresh standalone app for one registered case, then seed only that case and mark the target disposable:
23
+ Writable evaluation is intentionally opt-in. The expanded catalog has a 49-case writable release target, but only cases registered in `release-matrix.json` and backed by controller-owned fixtures and oracles are executable. Copy or create a fresh standalone app for one registered case, then seed only that case and mark the target disposable:
24
24
 
25
25
  ```text
26
26
  yarn harness:fixture --case OMH-009 --target /absolute/disposable/app --acknowledge-writes
@@ -6,7 +6,7 @@ Run the complete per-release gate from a generated standalone app with one comma
6
6
  yarn harness:release --runner codex --prepare-targets /absolute/empty-release-targets --acknowledge-writes
7
7
  ```
8
8
 
9
- Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete 229-case routing gate and every writable/review lane. To add cross-model portability evidence, explicitly pass the other runner as `--portability-runner claude` or `--portability-runner codex`; it runs only the exact 48-case representative read-only set. The two runners must differ. Omitting the portability option is valid and is recorded as `portabilityRunner: null`; no secondary result is claimed. There is no per-case fallback or mixed primary ownership. Once requested, a portability failure or unavailable runner fails that extended release run.
9
+ Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete 231-case routing gate and every writable/review lane. To add cross-model portability evidence, explicitly pass the other runner as `--portability-runner claude` or `--portability-runner codex`; it runs only the exact 49-case representative read-only set. The two runners must differ. Omitting the portability option is valid and is recorded as `portabilityRunner: null`; no secondary result is claimed. There is no per-case fallback or mixed primary ownership. Once requested, a portability failure or unavailable runner fails that extended release run.
10
10
 
11
11
  `--prepare-targets` accepts only an absolute, new or empty regular directory outside the controller app. The controller must be a sanitized fresh scaffold: automatic preparation fails before copying when it finds `.env`, `.env.*` (except `.env.example`, `.env.sample`, and `.env.template`), credential files, or private-key files. Never use a configured development or production app as the controller. It copies the fresh scaffold once per catalog case whose `evaluationKind` is `implementation` or `regression`, while excluding `.git`, `node_modules`, build/cache/coverage output, `.ai/harness/results`, `.ai/reports`, and `.ai/framework-context`. Each target receives a guarded link to the controller's installed dependency tree. The OS sandbox resolves that link as read-only during both the writable model run and the target command gate. The release gate also hashes every dependency entry and regular-file body once before execution and once after the complete suite, and fails if any nested content or metadata changed. A generated `release-targets.json` records the local mapping.
12
12
 
@@ -34,17 +34,17 @@ For externally prepared apps, `--writable-targets /absolute/release-targets.json
34
34
  }
35
35
  ```
36
36
 
37
- The current catalog contains 229 cases, including 48 writable implementation/regression cases (21.0%). The command still derives all counts and case IDs from `cases.json`, `validators.json`, and `release-matrix.json`; those figures are documented release facts, not runner constants. The matrix keeps both supported runner model selectors, an exact all-case primary profile, an exact 48-case portability profile, and runner-neutral writable assignments. Run `yarn install-skills` first so the pinned external `om-code-review` skill and ownership evidence are present; the reusable local `om-judge-agent-session` skill ships with the scaffold. Before running a model or writing a fixture, the release command requires complete deterministic, primary live-routing, writable, trusted-oracle, target, generated-test, and generative-judge coverage. Every one of the 48 writable cases must have a judge assignment composing both skills. Missing business fixtures or release-matrix entries fail preflight and are listed by exact case ID in the report.
37
+ The current catalog contains 231 cases, including 49 writable implementation/regression cases (21.2%). The command still derives all counts and case IDs from `cases.json`, `validators.json`, and `release-matrix.json`; those figures are documented release facts, not runner constants. The matrix keeps both supported runner model selectors, an exact all-case primary profile, an exact 49-case portability profile, and runner-neutral writable assignments. Run `yarn install-skills` first so the pinned external `om-code-review` skill and ownership evidence are present; the reusable local `om-judge-agent-session` skill ships with the scaffold. Before running a model or writing a fixture, the release command requires complete deterministic, primary live-routing, writable, trusted-oracle, target, generated-test, and generative-judge coverage. Every one of the 49 writable cases must have a judge assignment composing both skills. Missing business fixtures or release-matrix entries fail preflight and are listed by exact case ID in the report.
38
38
 
39
39
  ## PR #4529 remediation evidence
40
40
 
41
- The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary 229-case routing and 48-case writable/generated-test/review certification, prioritizing the generative cohort and recording unavailable Claude lanes without fallback or mixed-runner ownership.
41
+ The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary 231-case routing and 49-case writable/generated-test/review certification, prioritizing the generative cohort and recording unavailable Claude lanes without fallback or mixed-runner ownership.
42
42
 
43
43
  After preflight it runs, in order:
44
44
 
45
45
  1. deterministic validation for the complete catalog;
46
46
  2. the release matrix's fixed `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` foundation;
47
- 3. the selected primary runner across all 229 live-routing cases, followed by the optional distinct portability runner across the exact 48-case read-only sample when requested;
47
+ 3. the selected primary runner across all 231 live-routing cases, followed by the optional distinct portability runner across the exact 49-case read-only sample when requested;
48
48
  4. fixture preparation and the selected primary runner for every writable case, including the controller-owned AST/behavior oracles and target typecheck;
49
49
  5. `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` in every writable target, after its trusted oracles;
50
50
  6. real generated-code execution for OMH-163 and OMH-192 through fixed Jest, OMH-164 through API-only Playwright, and OMH-165 through real-browser Playwright; and
@@ -392,6 +392,7 @@
392
392
  ".ai/skills/om-implement-spec/references/spec-resolution.md",
393
393
  ".ai/skills/om-implement-spec/references/phases-and-gates.md",
394
394
  ".ai/skills/om-implement-spec/references/planning-and-progress.md",
395
+ ".ai/skills/om-implement-spec/references/resume.md",
395
396
  ".ai/skills/om-implement-spec/references/report-templates.md"
396
397
  ],
397
398
  "allowedExtra": [
@@ -409,6 +410,9 @@
409
410
  "working-phases",
410
411
  "smallest-validation",
411
412
  "implementation-progress",
413
+ "slice-ledger-write",
414
+ "in-flight-ledger",
415
+ "atomic-edit-sequence",
412
416
  "stable-implementation-report",
413
417
  "spec-reference-marker"
414
418
  ],
@@ -5683,7 +5687,7 @@
5683
5687
  "patterns.forbidden"
5684
5688
  ],
5685
5689
  "maxContextFiles": 13,
5686
- "maxInitialContextBytes": 65536,
5690
+ "maxInitialContextBytes": 66560,
5687
5691
  "maxTotalContextBytes": 311296,
5688
5692
  "relatedCases": [
5689
5693
  "OMH-024",
@@ -7872,7 +7876,7 @@
7872
7876
  "oracle.business.command"
7873
7877
  ],
7874
7878
  "maxContextFiles": 10,
7875
- "maxInitialContextBytes": 65536,
7879
+ "maxInitialContextBytes": 66560,
7876
7880
  "maxTotalContextBytes": 311296,
7877
7881
  "relatedCases": [
7878
7882
  "OMH-060",
@@ -8263,7 +8267,7 @@
8263
8267
  "patterns.forbidden"
8264
8268
  ],
8265
8269
  "maxContextFiles": 12,
8266
- "maxInitialContextBytes": 65536,
8270
+ "maxInitialContextBytes": 66560,
8267
8271
  "maxTotalContextBytes": 548864,
8268
8272
  "relatedCases": [
8269
8273
  "OMH-018",
@@ -8631,7 +8635,7 @@
8631
8635
  "patterns.forbidden"
8632
8636
  ],
8633
8637
  "maxContextFiles": 10,
8634
- "maxInitialContextBytes": 57344,
8638
+ "maxInitialContextBytes": 58368,
8635
8639
  "maxTotalContextBytes": 274432,
8636
8640
  "relatedCases": [
8637
8641
  "OMH-017",
@@ -8808,7 +8812,7 @@
8808
8812
  "patterns.forbidden"
8809
8813
  ],
8810
8814
  "maxContextFiles": 10,
8811
- "maxInitialContextBytes": 57344,
8815
+ "maxInitialContextBytes": 58368,
8812
8816
  "maxTotalContextBytes": 274432,
8813
8817
  "relatedCases": [
8814
8818
  "OMH-012",
@@ -9005,7 +9009,7 @@
9005
9009
  "oracle.business.command"
9006
9010
  ],
9007
9011
  "maxContextFiles": 10,
9008
- "maxInitialContextBytes": 57344,
9012
+ "maxInitialContextBytes": 58368,
9009
9013
  "maxTotalContextBytes": 335872,
9010
9014
  "relatedCases": [
9011
9015
  "OMH-031",
@@ -9974,7 +9978,7 @@
9974
9978
  "oracle.business.ui-surface"
9975
9979
  ],
9976
9980
  "maxContextFiles": 8,
9977
- "maxInitialContextBytes": 49152,
9981
+ "maxInitialContextBytes": 50176,
9978
9982
  "maxTotalContextBytes": 274432,
9979
9983
  "relatedCases": [
9980
9984
  "OMH-027",
@@ -10178,7 +10182,7 @@
10178
10182
  "patterns.forbidden"
10179
10183
  ],
10180
10184
  "maxContextFiles": 10,
10181
- "maxInitialContextBytes": 57344,
10185
+ "maxInitialContextBytes": 58368,
10182
10186
  "maxTotalContextBytes": 348160,
10183
10187
  "relatedCases": [
10184
10188
  "OMH-010",
@@ -10269,7 +10273,7 @@
10269
10273
  "patterns.forbidden"
10270
10274
  ],
10271
10275
  "maxContextFiles": 10,
10272
- "maxInitialContextBytes": 57344,
10276
+ "maxInitialContextBytes": 58368,
10273
10277
  "maxTotalContextBytes": 204800,
10274
10278
  "relatedCases": [
10275
10279
  "OMH-009",
@@ -10455,7 +10459,7 @@
10455
10459
  "patterns.forbidden"
10456
10460
  ],
10457
10461
  "maxContextFiles": 10,
10458
- "maxInitialContextBytes": 65536,
10462
+ "maxInitialContextBytes": 66560,
10459
10463
  "maxTotalContextBytes": 380928,
10460
10464
  "relatedCases": [
10461
10465
  "OMH-069",
@@ -10844,7 +10848,7 @@
10844
10848
  "patterns.forbidden"
10845
10849
  ],
10846
10850
  "maxContextFiles": 10,
10847
- "maxInitialContextBytes": 57344,
10851
+ "maxInitialContextBytes": 58368,
10848
10852
  "maxTotalContextBytes": 348160,
10849
10853
  "relatedCases": [
10850
10854
  "OMH-012",
@@ -11206,7 +11210,7 @@
11206
11210
  "oracle.business.async-operation"
11207
11211
  ],
11208
11212
  "maxContextFiles": 10,
11209
- "maxInitialContextBytes": 57344,
11213
+ "maxInitialContextBytes": 58368,
11210
11214
  "maxTotalContextBytes": 196608,
11211
11215
  "relatedCases": [
11212
11216
  "OMH-012",
@@ -11407,7 +11411,7 @@
11407
11411
  "oracle.business.ui-surface"
11408
11412
  ],
11409
11413
  "maxContextFiles": 10,
11410
- "maxInitialContextBytes": 57344,
11414
+ "maxInitialContextBytes": 58368,
11411
11415
  "maxTotalContextBytes": 344064,
11412
11416
  "relatedCases": [
11413
11417
  "OMH-034",
@@ -12465,7 +12469,7 @@
12465
12469
  "patterns.forbidden"
12466
12470
  ],
12467
12471
  "maxContextFiles": 11,
12468
- "maxInitialContextBytes": 65536,
12472
+ "maxInitialContextBytes": 66560,
12469
12473
  "maxTotalContextBytes": 307200,
12470
12474
  "relatedCases": [
12471
12475
  "OMH-053",
@@ -14876,6 +14880,7 @@
14876
14880
  ".ai/skills/om-implement-spec/references/spec-resolution.md",
14877
14881
  ".ai/skills/om-implement-spec/references/phases-and-gates.md",
14878
14882
  ".ai/skills/om-implement-spec/references/planning-and-progress.md",
14883
+ ".ai/skills/om-implement-spec/references/resume.md",
14879
14884
  ".ai/skills/om-implement-spec/references/report-templates.md"
14880
14885
  ],
14881
14886
  "forbidden": [
@@ -14892,6 +14897,9 @@
14892
14897
  "selected-phase-boundary",
14893
14898
  "preserve-spec-contracts",
14894
14899
  "implementation-progress",
14900
+ "slice-ledger-write",
14901
+ "in-flight-ledger",
14902
+ "atomic-edit-sequence",
14895
14903
  "stable-implementation-report",
14896
14904
  "spec-reference-marker"
14897
14905
  ],
@@ -20845,5 +20853,76 @@
20845
20853
  "OMH-194",
20846
20854
  "OMH-202"
20847
20855
  ]
20856
+ },
20857
+ {
20858
+ "id": "OMH-230",
20859
+ "title": "Resume the first unticked slice of an interrupted specification",
20860
+ "family": "architecture",
20861
+ "mode": "spec",
20862
+ "evaluationKind": "implementation",
20863
+ "risk": "medium",
20864
+ "prompt": "Resume the interrupted implementation described by .ai/specs/2026-08-10-interrupted-export-format.md. Begin with the focused TypeScript check named by the spec, reconcile the implementation tree against the canonical ledger, and preserve the already verified first slice without re-executing it. Resume from the first unticked slice: repair the paired export contract and formatter atomically so no intermediate invalid state is left behind, then update the same ledger with exact verification evidence. Use an IN FLIGHT marker while the slice is incomplete and clear it only after the slice gate passes. Do not create a second plan or spec and do not rewrite the preserved artifact.",
20865
+ "tags": ["spec", "resume", "planning-proof", "writable"],
20866
+ "owner": { "kind": "skill", "path": ".ai/skills/om-implement-spec/references/resume.md", "ruleIds": ["BC-01", "BC-03"] },
20867
+ "expectedRouter": { "required": ["spec-pr"], "allowedExtra": ["module-data", "debugging", "testing"] },
20868
+ "requiredSkills": ["om-implement-spec"],
20869
+ "context": {
20870
+ "required": ["AGENTS.md", ".ai/guides/spec-delivery.md", ".ai/skills/om-implement-spec/SKILL.md", ".ai/skills/om-implement-spec/references/resume.md", ".ai/skills/om-implement-spec/references/planning-and-progress.md"],
20871
+ "allowedExtra": [".ai/skills/om-implement-spec/references/phases-and-gates.md"],
20872
+ "forbidden": [".env*", ".git/**", ".mercato/generated/**"]
20873
+ },
20874
+ "decisionVocabulary": ["focused-typecheck-first", "ledger-tree-reconciliation", "resume-first-unticked-slice", "never-reexecute-ticked", "never-trust-unticked", "in-flight-ledger", "atomic-edit-sequence", "restart-from-first-slice", "trust-unticked-ledger"],
20875
+ "requiredDecisions": ["focused-typecheck-first", "ledger-tree-reconciliation", "resume-first-unticked-slice", "never-reexecute-ticked", "never-trust-unticked", "in-flight-ledger", "atomic-edit-sequence"],
20876
+ "forbiddenPatterns": ["(?:tenant|organization).{0,30}(?:unscoped|scope optional)", "node_modules.{0,40}(?:write|edit|patch)"],
20877
+ "validators": ["catalog.schema", "owner.reference", "skills.reference", "router.contract", "context.budget", "context.forbidden", "patterns.forbidden", "writable.allowed-paths", "oracle.artifacts", "oracle.planning.spec-resume"],
20878
+ "fixture": { "scaffold": "fresh-standalone", "setup": ["fixture:spec-resume-half-done"] },
20879
+ "allowedWrites": [".ai/specs/2026-08-10-interrupted-export-format.md", "src/modules/resume_demo/lib/export-contract.ts", "src/modules/resume_demo/lib/format-export.ts"],
20880
+ "oracle": {
20881
+ "validatorIds": ["writable.allowed-paths", "oracle.artifacts", "oracle.planning.spec-resume"],
20882
+ "expectedArtifacts": [".ai/specs/2026-08-10-interrupted-export-format.md", "src/modules/resume_demo/lib/export-contract.ts", "src/modules/resume_demo/lib/format-export.ts"]
20883
+ },
20884
+ "timeoutMs": 600000,
20885
+ "maxContextFiles": 10,
20886
+ "maxInitialContextBytes": 65536,
20887
+ "maxTotalContextBytes": 131072,
20888
+ "relatedCases": ["OMH-006", "OMH-168", "OMH-223"],
20889
+ "source": { "paths": [".ai/specs/2026-08-14-standalone-harness-optimizations.md"] }
20890
+ },
20891
+ {
20892
+ "id": "OMH-231",
20893
+ "title": "Resolve shared CRUD and command contracts through the installed digest",
20894
+ "family": "architecture",
20895
+ "mode": "analysis",
20896
+ "evaluationKind": "routing",
20897
+ "risk": "medium",
20898
+ "prompt": "Before changing an app-owned command-backed CRUD route, explain the installed contracts for CommandHandler execution and undo/redo hooks, command registration, command-owned CRUD persistence and side effects, makeCrudRoute ownership, typed event timing, command optimistic locking, defensive JSON parsing, and DataEngine scope/flush behavior. Select the emitted guide and its exact installed source links first. Use the bounded resolver only for one named fact that remains unresolved, and do not browse a package directory or modify node_modules.",
20899
+ "tags": ["framework-context", "commands", "crud", "source-links"],
20900
+ "owner": { "kind": "guide", "path": ".ai/guides/framework-contracts.md", "ruleIds": ["BC-01", "BC-03", "BC-05", "BC-07"] },
20901
+ "expectedRouter": { "required": ["framework-context"], "allowedExtra": ["module-data", "architecture"] },
20902
+ "requiredSkills": [],
20903
+ "context": {
20904
+ "required": ["AGENTS.md", ".ai/guides/framework-contracts.md"],
20905
+ "allowedExtra": [".ai/skills/om-framework-context/SKILL.md"],
20906
+ "forbidden": [".env*", ".git/**"],
20907
+ "sourceReferenceIds": [
20908
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/commands/types.ts",
20909
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/commands/registry.ts",
20910
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/commands/runCrudCommandWrite.ts",
20911
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/crud/factory.ts",
20912
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/modules/events/factory.ts",
20913
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/crud/optimistic-lock-command.ts",
20914
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/http/readJsonSafe.ts",
20915
+ "guides/framework-contracts:node_modules/@open-mercato/shared/src/lib/data/engine.ts"
20916
+ ]
20917
+ },
20918
+ "decisionVocabulary": ["framework-contract-digest-first", "exact-installed-source-links", "bounded-resolver-only-if-unresolved", "installed-packages-read-only", "whole-package-discovery", "node-modules-edit"],
20919
+ "requiredDecisions": ["framework-contract-digest-first", "exact-installed-source-links", "bounded-resolver-only-if-unresolved", "installed-packages-read-only"],
20920
+ "forbiddenPatterns": ["node_modules.{0,40}(?:write|edit|patch)", "node_modules/@open-mercato/shared/(?:\\*\\*|src/?$)"],
20921
+ "validators": ["catalog.schema", "owner.reference", "skills.reference", "router.contract", "context.budget", "context.forbidden", "patterns.forbidden"],
20922
+ "maxContextFiles": 12,
20923
+ "maxInitialContextBytes": 73728,
20924
+ "maxTotalContextBytes": 196608,
20925
+ "relatedCases": ["OMH-003", "OMH-222"],
20926
+ "source": { "paths": [".ai/specs/2026-08-14-standalone-harness-optimizations.md"] }
20848
20927
  }
20849
20928
  ]
@@ -3,8 +3,8 @@
3
3
  "$id": "https://open-mercato.dev/schemas/standalone-harness-cases.schema.json",
4
4
  "title": "Open Mercato standalone harness case catalog",
5
5
  "type": "array",
6
- "minItems": 229,
7
- "maxItems": 229,
6
+ "minItems": 231,
7
+ "maxItems": 231,
8
8
  "items": {
9
9
  "type": "object",
10
10
  "additionalProperties": false,
@@ -15,7 +15,7 @@
15
15
  "maxTotalContextBytes", "relatedCases"
16
16
  ],
17
17
  "properties": {
18
- "id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9])$" },
18
+ "id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[01])$" },
19
19
  "title": { "type": "string", "minLength": 12, "maxLength": 180 },
20
20
  "family": { "enum": ["architecture", "module", "umes", "integration", "ai-workflow", "bugfix", "business", "testing"] },
21
21
  "mode": { "enum": ["analysis", "one-shot", "spec", "bugfix", "review"] },
@@ -168,7 +168,7 @@
168
168
  "maxInitialContextBytes": { "type": "integer", "minimum": 4096, "maximum": 98304 },
169
169
  "maxTotalContextBytes": { "type": "integer", "minimum": 8192, "maximum": 1048576 },
170
170
  "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 600000 },
171
- "relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9])$" } },
171
+ "relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[01])$" } },
172
172
  "source": {
173
173
  "type": "object",
174
174
  "additionalProperties": false,
@@ -46,6 +46,7 @@
46
46
  "omh-191": { "purpose": "Room bookings data layer without the durable hold-expiry workflow.", "seededArtifacts": ["src/modules/room_bookings/index.ts", "src/modules/room_bookings/data/entities.ts"], "precondition": "oracle.workflow.durable-timer must fail" },
47
47
  "omh-192": { "purpose": "Partial CRM-backed library loan slice that trusts payload scope, races checkout, inverts lifecycle undo, and ships non-executable Jest coverage.", "seededArtifacts": ["src/modules/library/commands/crm-loans.ts", "src/modules/library/api/schemas.ts", "src/modules/library/commands/__tests__/crm-loans.test.ts"], "precondition": "oracle.regression.crm-library must fail" },
48
48
  "planning-new-feature": { "purpose": "Fresh scaffold whose .ai/specs holds only the emitted scaffolding — README, blank template, and the shipped reference-module activation spec — none of which covers the requested capability.", "seededArtifacts": [], "precondition": "oracle.planning.spec-first must fail" },
49
- "planning-existing-spec": { "purpose": "Covering specification for reminders on a confirmed appointment, seeded without the rescheduled/cancelled and per-channel outcome contract the prompt introduces.", "seededArtifacts": [".ai/specs/2026-08-04-service-appointment-reminders.md"], "precondition": "oracle.planning.spec-reuse must fail" }
49
+ "planning-existing-spec": { "purpose": "Covering specification for reminders on a confirmed appointment, seeded without the rescheduled/cancelled and per-channel outcome contract the prompt introduces.", "seededArtifacts": [".ai/specs/2026-08-04-service-appointment-reminders.md"], "precondition": "oracle.planning.spec-reuse must fail" },
50
+ "spec-resume-half-done": { "purpose": "Interrupted two-slice implementation with one verified ledger row, one stale unticked row, a preserved artifact, and an invalid paired TypeScript edit.", "seededArtifacts": [".ai/specs/2026-08-10-interrupted-export-format.md", "src/modules/resume_demo/lib/preserved.ts", "src/modules/resume_demo/lib/format-export.ts"], "precondition": "oracle.planning.spec-resume must fail" }
50
51
  }
51
52
  }
@@ -161,6 +161,11 @@
161
161
  "planning-new-feature": {},
162
162
  "planning-existing-spec": {
163
163
  ".ai/specs/2026-08-04-service-appointment-reminders.md": "# Service Appointment Reminders\n\n**Date**: 2026-08-04\n**Status**: Ready for implementation\n\n## TLDR\n\nBranch staff spend part of every afternoon telephoning customers about tomorrow's confirmed appointment. This slice sends that reminder automatically for a confirmed appointment so staff keep the phone free for booking work and the customer still arrives on the agreed day.\n\n## Problem Statement\n\nEvery service branch books work into an appointment diary, and a booking becomes real for the customer only once a member of staff marks it confirmed. Today nothing tells the customer about that confirmation except a manual telephone call made the afternoon before the visit. Two branches keep a paper call list, one keeps a spreadsheet, and none of them records whether the call was ever made. When the afternoon is busy the calls are skipped, the customer forgets, the technician arrives at an empty address, and the branch loses a whole slot it could have sold to somebody else. Staff also cannot tell an auditing manager which customers were actually contacted, so a complaint about a missed visit turns into an argument about memory rather than a look at a record. The branches have asked for the reminder to leave the diary automatically once an appointment is confirmed, and for the app to keep the proof that it went out.\n\n## Users, Permissions, and Scope\n\n| Actor | Allowed outcomes | Scope rule | Required feature IDs |\n|---|---|---|---|\n| Branch staff | view the reminder history for an appointment | own organization | `appointment_reminders.view` |\n| Branch manager | view history and trigger one manual resend | own organization | `appointment_reminders.manage` |\n\nBoth the tenant and the organization are always derived from the trusted request context. A reminder record is written with the same scope as the appointment that produced it, and every read filters on that scope so one branch can never see another branch's customer contact history.\n\n## API, Command, and Error Contracts\n\n| Method / command | Path / ID | Auth and feature gate | Input | Success response / event | Errors and concurrency |\n|---|---|---|---|---|---|\n| `GET` | `/api/appointment-reminders` | auth + `appointment_reminders.view` | `appointmentId`, `page`, `pageSize` | `{ items, totalCount }` | 400 invalid query, 401 unauthenticated, 403 wrong feature |\n| `POST` | `/api/appointment-reminders/resend` | auth + `appointment_reminders.manage` | `appointmentId`, `reason` | 201 and `appointment_reminders.reminder.sent` | 400 invalid body, 403 wrong feature, 409 stale appointment version |\n\nThe list route is built on the CRUD route factory and returns only reminder rows for appointments inside the caller's trusted scope. The resend command is a guarded command route rather than a plain handler because it has an external side effect: it loads the appointment, refuses the write when the caller's appointment version is behind the stored one, records a new reminder row, and only then hands the message to the mail sender. The command carries an idempotency key derived from the appointment identifier and the scheduled reminder moment, so a retry after a transport timeout reuses the existing row instead of contacting the same customer twice. A reminder row stores the appointment identifier, the address it was sent to, the moment it was queued, and the moment the sender accepted it.\n\n## Integration Coverage\n\nTests are self-contained: each one creates its own tenant, organization, staff user, customer, and appointment, and removes those records in a `finally` block.\n\n| Test ID | Level | Setup / fixture | Actions | Assertions |\n|---|---|---|---|---|\n| TEST-001 | integration | one organization, one confirmed appointment for tomorrow | run the reminder worker | one reminder row exists, the sender received one message, and a second worker run adds nothing |\n| TEST-002 | security | two organizations, one appointment each | read the list route as the first organization's staff | only the caller's own reminder row is returned and no identifier from the other organization leaks |\n| TEST-003 | integration | one confirmed appointment with an existing reminder | call the resend command twice with the same idempotency key | exactly one additional reminder row exists and the second call reports the first result |\n\n## Implementation Phases\n\nPhases are dependency ordered, and each one leaves the application working on its own.\n\n### Phase 1 — Reminder record and scoped read path\n\n- **Depends on:** none\n- **Outcome:** staff can open an appointment and see whether a reminder was recorded for it.\n- **Deliverables:** the reminder entity with its tenant and organization columns, its migration, the zod validators, the list route on the CRUD route factory, and the feature identifiers in the access-control declaration.\n- **Tests:** TEST-001, TEST-002\n- **Validation:** `yarn generate`, focused typecheck, and the two named integration tests.\n- **Exit gate:** a reminder row created by hand in one organization is visible to that organization's staff and invisible to another organization's staff.\n\n### Phase 2 — Automatic send for a confirmed appointment\n\n- **Depends on:** Phase 1 exit gate\n- **Outcome:** a confirmed appointment produces its reminder without anyone touching the diary.\n- **Deliverables:** the scheduled worker that selects tomorrow's confirmed appointments, the guarded resend command, the idempotency key, and the typed event emitted after the sender accepts the message.\n- **Tests:** TEST-003\n- **Validation:** focused worker and command tests plus the named integration test.\n- **Exit gate:** running the worker twice over the same confirmed appointment contacts the customer exactly once, and a manual resend is recorded as a separate audited row.\n\n## Risks and Tradeoffs\n\n| Risk / tradeoff | Impact | Mitigation / detection | Residual risk |\n|---|---|---|---|\n| A transport timeout is retried and contacts the customer twice | annoyed customer, lost trust | idempotency key on appointment and scheduled moment, asserted by TEST-003 | a sender that accepts and then silently drops a message is not detectable here |\n| The worker runs long after the confirmed appointment has already started | a useless reminder | the worker selects only appointments that start after the run moment | clock skew between the worker host and the diary |\n\n## Changelog\n\n| Date | Change |\n|---|---|\n| 2026-08-04 | Initial covering specification for reminders on a confirmed appointment. |\n"
164
+ },
165
+ "spec-resume-half-done": {
166
+ ".ai/specs/2026-08-10-interrupted-export-format.md": "# Interrupted Export Format\n\n## Implementation Status\n\nProgress: 1/2\n\n- [x] Slice 1 — preserve the stable export marker. verified: `yarn typecheck --pretty false`\n- [ ] Slice 2 — add `export-contract.ts` and repair `format-export.ts` as one atomic pair. verify: `yarn typecheck --pretty false`\n",
167
+ "src/modules/resume_demo/lib/preserved.ts": "export const immutableResumeBaseline = 'verified-v1'\n",
168
+ "src/modules/resume_demo/lib/format-export.ts": "import type { ExportContract } from './export-contract'\n\nexport function formatExport(label: number): ExportContract {\n return { label }\n}\n"
164
169
  }
165
170
  }
166
171
  }
@@ -26,7 +26,7 @@
26
26
  "OMH-137", "OMH-140", "OMH-144", "OMH-146", "OMH-149", "OMH-150", "OMH-151", "OMH-153",
27
27
  "OMH-156", "OMH-163", "OMH-164", "OMH-165", "OMH-171", "OMH-172", "OMH-181", "OMH-185",
28
28
  "OMH-188", "OMH-189", "OMH-190", "OMH-191", "OMH-192", "OMH-193",
29
- "OMH-223", "OMH-224"
29
+ "OMH-223", "OMH-224", "OMH-230"
30
30
  ]
31
31
  },
32
32
  "runners": {
@@ -82,7 +82,8 @@
82
82
  { "caseId": "OMH-192" },
83
83
  { "caseId": "OMH-193" },
84
84
  { "caseId": "OMH-223" },
85
- { "caseId": "OMH-224" }
85
+ { "caseId": "OMH-224" },
86
+ { "caseId": "OMH-230" }
86
87
  ],
87
88
  "generatedCodeReview": {
88
89
  "required": true,
@@ -96,7 +97,7 @@
96
97
  "OMH-149", "OMH-150", "OMH-151", "OMH-153", "OMH-156", "OMH-163",
97
98
  "OMH-164", "OMH-165", "OMH-171", "OMH-172", "OMH-181", "OMH-185",
98
99
  "OMH-188", "OMH-189", "OMH-190", "OMH-191", "OMH-192", "OMH-193",
99
- "OMH-223", "OMH-224"
100
+ "OMH-223", "OMH-224", "OMH-230"
100
101
  ],
101
102
  "runners": {
102
103
  "codex": { "modelSelector": "default" },
@@ -120,7 +121,7 @@
120
121
  "OMH-149", "OMH-150", "OMH-151", "OMH-153", "OMH-156", "OMH-163",
121
122
  "OMH-164", "OMH-165", "OMH-171", "OMH-172", "OMH-181", "OMH-185",
122
123
  "OMH-188", "OMH-189", "OMH-190", "OMH-191", "OMH-192", "OMH-193",
123
- "OMH-223", "OMH-224"
124
+ "OMH-223", "OMH-224", "OMH-230"
124
125
  ],
125
126
  "runners": {
126
127
  "codex": { "modelSelector": "default" },