@open-mercato/cli 0.6.7-develop.6862.1.c11a64ce0a → 0.6.7
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.
- package/.turbo/turbo-build.log +4 -4
- package/build.mjs +7 -24
- package/dist/agentic/claude-code/hooks/entity-migration-check.ts +88 -32
- package/dist/agentic/codex/enforcement-rules.md +16 -2
- package/dist/agentic/cursor/hooks/entity-migration-check.mjs +50 -19
- package/dist/agentic/cursor/rules/entity-guard.mdc +21 -9
- package/dist/agentic/cursor/rules/generated-guard.mdc +5 -3
- package/dist/agentic/cursor/rules/open-mercato.mdc +29 -3
- package/dist/agentic/guides/cache.md +45 -0
- package/dist/agentic/guides/core.md +453 -0
- package/dist/agentic/guides/events.md +117 -0
- package/dist/agentic/guides/module-facts.json +3833 -115419
- package/dist/agentic/guides/module-system.md +127 -12
- package/dist/agentic/guides/modules/ai_assistant.md +28 -227
- package/dist/agentic/guides/modules/api_docs.md +2 -58
- package/dist/agentic/guides/modules/api_keys.md +7 -92
- package/dist/agentic/guides/modules/attachments.md +14 -119
- package/dist/agentic/guides/modules/audit_logs.md +10 -131
- package/dist/agentic/guides/modules/auth.md +33 -276
- package/dist/agentic/guides/modules/business_rules.md +14 -149
- package/dist/agentic/guides/modules/catalog.md +43 -475
- package/dist/agentic/guides/modules/channel_gmail.md +3 -82
- package/dist/agentic/guides/modules/channel_imap.md +3 -82
- package/dist/agentic/guides/modules/checkout.md +27 -299
- package/dist/agentic/guides/modules/communication_channels.md +33 -315
- package/dist/agentic/guides/modules/configs.md +8 -104
- package/dist/agentic/guides/modules/content.md +2 -57
- package/dist/agentic/guides/modules/currencies.md +17 -152
- package/dist/agentic/guides/modules/customer_accounts.md +45 -387
- package/dist/agentic/guides/modules/customers.md +85 -746
- package/dist/agentic/guides/modules/dashboards.md +10 -155
- package/dist/agentic/guides/modules/data_sync.md +16 -149
- package/dist/agentic/guides/modules/dictionaries.md +12 -107
- package/dist/agentic/guides/modules/directory.md +15 -148
- package/dist/agentic/guides/modules/entities.md +13 -145
- package/dist/agentic/guides/modules/events.md +2 -59
- package/dist/agentic/guides/modules/feature_toggles.md +9 -119
- package/dist/agentic/guides/modules/gateway_stripe.md +4 -92
- package/dist/agentic/guides/modules/generators.md +2 -45
- package/dist/agentic/guides/modules/inbox_ops.md +27 -207
- package/dist/agentic/guides/modules/integrations.md +16 -146
- package/dist/agentic/guides/modules/messages.md +24 -223
- package/dist/agentic/guides/modules/notifications.md +8 -96
- package/dist/agentic/guides/modules/onboarding.md +6 -77
- package/dist/agentic/guides/modules/payment_gateways.md +21 -164
- package/dist/agentic/guides/modules/perspectives.md +7 -77
- package/dist/agentic/guides/modules/planner.md +18 -136
- package/dist/agentic/guides/modules/portal.md +2 -93
- package/dist/agentic/guides/modules/progress.md +14 -104
- package/dist/agentic/guides/modules/query_index.md +15 -154
- package/dist/agentic/guides/modules/record_locks.md +21 -206
- package/dist/agentic/guides/modules/resources.md +30 -197
- package/dist/agentic/guides/modules/sales.md +84 -678
- package/dist/agentic/guides/modules/scheduler.md +14 -133
- package/dist/agentic/guides/modules/search.md +6 -170
- package/dist/agentic/guides/modules/security.md +35 -294
- package/dist/agentic/guides/modules/shipping_carriers.md +18 -134
- package/dist/agentic/guides/modules/sso.md +26 -151
- package/dist/agentic/guides/modules/staff.md +57 -369
- package/dist/agentic/guides/modules/storage_s3.md +5 -95
- package/dist/agentic/guides/modules/sync_akeneo.md +3 -85
- package/dist/agentic/guides/modules/sync_excel.md +6 -75
- package/dist/agentic/guides/modules/system_status_overlays.md +2 -60
- package/dist/agentic/guides/modules/translations.md +10 -104
- package/dist/agentic/guides/modules/webhooks.md +24 -203
- package/dist/agentic/guides/modules/wms.md +46 -441
- package/dist/agentic/guides/modules/workflows.md +43 -302
- package/dist/agentic/guides/queue.md +53 -0
- package/dist/agentic/guides/search.md +115 -0
- package/dist/agentic/guides/shared.md +108 -0
- package/dist/agentic/guides/ui.md +347 -0
- package/dist/agentic/shared/AGENTS.md.template +311 -124
- package/dist/agentic/shared/ai/agentic.config.json +0 -2
- package/dist/agentic/shared/ai/lessons.md +3 -26
- package/dist/agentic/shared/ai/skills/om-auto-continue-pr-loop/SKILL.md +27 -0
- package/dist/agentic/shared/ai/skills/om-auto-create-pr-loop/SKILL.md +27 -0
- package/dist/agentic/shared/ai/skills/om-auto-review-pr/SKILL.md +0 -4
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/SKILL.md +241 -20
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/ui-components.md +260 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/SKILL.md +601 -16
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/mikro-orm-cheatsheet.md +146 -0
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/SKILL.md +310 -14
- package/dist/agentic/shared/ai/skills/om-help/SKILL.md +97 -15
- package/dist/agentic/shared/ai/skills/om-help/references/skills-catalog.md +84 -0
- package/dist/agentic/shared/ai/skills/om-help/references/workflow-sequences.md +193 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/SKILL.md +152 -33
- package/dist/agentic/shared/ai/skills/om-integration-builder/SKILL.md +708 -24
- package/dist/agentic/shared/ai/skills/om-integration-builder/STANDALONE.md +34 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/adapter-contracts.md +762 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/SKILL.md +820 -20
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/naming-conventions.md +50 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/navigation-patterns.md +97 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/SKILL.md +843 -19
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-contracts.md +271 -0
- package/dist/agentic/shared/ai/skills/om-trim-unused-modules/SKILL.md +63 -15
- package/dist/agentic/shared/ai/skills/om-troubleshooter/SKILL.md +467 -16
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/diagnostic-commands.md +101 -0
- package/dist/agentic/shared/ai/skills/tiers.json +21 -143
- package/dist/agentic/shared/ai/skills/tiers.schema.json +40 -52
- package/dist/agentic/shared/ai/specs/README.md +3 -4
- package/dist/agentic/shared/ai/specs/SPEC-000-template.md +10 -226
- package/dist/agentic/shared/ai/trackers/github.md +4 -108
- package/dist/agentic/shared/scripts/install-skills.sh +694 -4
- package/dist/bin.js +1 -13
- package/dist/bin.js.map +2 -2
- package/dist/lib/__integration__/TC-INT-008.spec.js +8 -88
- package/dist/lib/__integration__/TC-INT-008.spec.js.map +2 -2
- package/dist/lib/agentic-init.js +3 -13
- package/dist/lib/agentic-init.js.map +2 -2
- package/dist/lib/agentic-setup.js +186 -418
- package/dist/lib/agentic-setup.js.map +2 -2
- package/dist/lib/generators/extensions/injection-widgets.js +0 -20
- package/dist/lib/generators/extensions/injection-widgets.js.map +2 -2
- package/dist/lib/generators/module-facts-discovery.js +7 -41
- package/dist/lib/generators/module-facts-discovery.js.map +2 -2
- package/dist/lib/generators/module-facts.js +45 -1387
- package/dist/lib/generators/module-facts.js.map +3 -3
- package/dist/lib/generators/module-registry.js +5 -11
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/resolver.js +0 -2
- package/dist/lib/resolver.js.map +2 -2
- package/dist/lib/testing/integration.js +0 -5
- package/dist/lib/testing/integration.js.map +2 -2
- package/dist/mercato.js +1 -23
- package/dist/mercato.js.map +2 -2
- package/package.json +11 -13
- package/src/bin.ts +1 -33
- package/src/lib/__integration__/TC-INT-008.spec.ts +9 -107
- package/src/lib/__tests__/agentic-init.test.ts +5 -41
- package/src/lib/agentic-init.ts +3 -15
- package/src/lib/agentic-setup.ts +224 -530
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +2 -88
- package/src/lib/generators/__tests__/module-facts.customers.fixture.test.ts +0 -1
- package/src/lib/generators/__tests__/module-facts.discovery.test.ts +10 -54
- package/src/lib/generators/__tests__/module-subset.test.ts +0 -18
- package/src/lib/generators/extensions/injection-widgets.ts +0 -51
- package/src/lib/generators/module-facts-discovery.ts +7 -58
- package/src/lib/generators/module-facts.ts +46 -1851
- package/src/lib/generators/module-registry.ts +6 -16
- package/src/lib/resolver.ts +0 -3
- package/src/lib/testing/__tests__/integration.test.ts +0 -4
- package/src/lib/testing/integration.ts +0 -5
- package/src/mercato.ts +1 -26
- package/dist/agentic/guides/ai-workflows.md +0 -76
- package/dist/agentic/guides/architecture.md +0 -107
- package/dist/agentic/guides/backend-ui.md +0 -80
- package/dist/agentic/guides/contracts.md +0 -92
- package/dist/agentic/guides/extensions.md +0 -121
- package/dist/agentic/guides/framework-extension-points.md +0 -36
- package/dist/agentic/guides/integrations.md +0 -81
- package/dist/agentic/guides/modules/design_system.md +0 -102
- package/dist/agentic/guides/spec-delivery.md +0 -22
- package/dist/agentic/guides/testing-debugging.md +0 -80
- package/dist/agentic/guides/upstream/AGENTS.md +0 -298
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +0 -316
- package/dist/agentic/guides/upstream/manifest.json +0 -8
- package/dist/agentic/shared/ai/harness/README.md +0 -50
- package/dist/agentic/shared/ai/harness/RELEASE.md +0 -57
- package/dist/agentic/shared/ai/harness/cases.json +0 -13680
- package/dist/agentic/shared/ai/harness/cases.schema.json +0 -133
- package/dist/agentic/shared/ai/harness/fixtures/index.json +0 -49
- package/dist/agentic/shared/ai/harness/fixtures/seeds.json +0 -162
- package/dist/agentic/shared/ai/harness/generated-code-review-policy.md +0 -21
- package/dist/agentic/shared/ai/harness/generated-code-review-response.schema.json +0 -96
- package/dist/agentic/shared/ai/harness/generated-code-review-result.schema.json +0 -172
- package/dist/agentic/shared/ai/harness/release-matrix.json +0 -158
- package/dist/agentic/shared/ai/harness/release-result.schema.json +0 -219
- package/dist/agentic/shared/ai/harness/result.schema.json +0 -76
- package/dist/agentic/shared/ai/harness/routing-response.schema.json +0 -12
- package/dist/agentic/shared/ai/harness/target-validation-result.schema.json +0 -73
- package/dist/agentic/shared/ai/harness/validators.json +0 -78
- package/dist/agentic/shared/ai/harness/writable-ast-oracles.mjs +0 -2121
- package/dist/agentic/shared/ai/harness/writable-behavior-oracles.mjs +0 -1096
- package/dist/agentic/shared/ai/lessons/_template.md +0 -16
- package/dist/agentic/shared/ai/review-checklist.md +0 -36
- package/dist/agentic/shared/ai/skills/om-auto-implement-spec/SKILL.md +0 -21
- package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.6.6-to-0.6.7/SKILL.md +0 -98
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/crud-surfaces.md +0 -16
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/frontend-and-design-system.md +0 -53
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/page-and-navigation.md +0 -13
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/quality-states.md +0 -11
- package/dist/agentic/shared/ai/skills/om-build-workflow/SKILL.md +0 -30
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/activity-contracts.md +0 -12
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/durability-and-progress.md +0 -13
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/workflow-design.md +0 -14
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/SKILL.md +0 -28
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/attachments-and-overrides.md +0 -12
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/module-agents-and-tools.md +0 -22
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/orchestrator-agents.md +0 -12
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/surface-selector.md +0 -19
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/integrity-and-concurrency.md +0 -19
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/migration-workflow.md +0 -13
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/schema-design.md +0 -14
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/sensitive-data.md +0 -10
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/references/decision-and-procedure.md +0 -17
- package/dist/agentic/shared/ai/skills/om-evolve-harness/SKILL.md +0 -29
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-template.md +0 -100
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-workflow.md +0 -16
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/owner-selection.md +0 -17
- package/dist/agentic/shared/ai/skills/om-framework-context/SKILL.md +0 -25
- package/dist/agentic/shared/ai/skills/om-framework-context/references/resolver-procedure.md +0 -11
- package/dist/agentic/shared/ai/skills/om-framework-context/references/skew-and-escalation.md +0 -13
- package/dist/agentic/shared/ai/skills/om-help/references/delivery-workflows.md +0 -18
- package/dist/agentic/shared/ai/skills/om-help/references/task-families.md +0 -20
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/phases-and-gates.md +0 -33
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/planning-and-progress.md +0 -40
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/report-templates.md +0 -27
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/spec-resolution.md +0 -24
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/package-and-activation.md +0 -16
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/provider-families.md +0 -14
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/security-and-reliability.md +0 -15
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/sync-and-files.md +0 -12
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/SKILL.md +0 -34
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/agents/openai.yaml +0 -4
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/agentic-setup.md +0 -11
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/input-normalization.md +0 -31
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/judge-workflow.md +0 -39
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/report-template.md +0 -43
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/rules.md +0 -11
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/api-and-domain.md +0 -19
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/business-one-shot-blueprints.md +0 -172
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/data-and-migrations.md +0 -12
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/discovery-surface-catalog.md +0 -83
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/module-surfaces.md +0 -21
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/planning.md +0 -11
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/runtime-cache-and-queues.md +0 -22
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/verification.md +0 -13
- package/dist/agentic/shared/ai/skills/om-share-this-session/SKILL.md +0 -41
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/agentic-setup.md +0 -19
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/bundle-preparation.md +0 -44
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/consent-and-review.md +0 -39
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/publication.md +0 -20
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/report-templates.md +0 -57
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/rules.md +0 -11
- package/dist/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +0 -486
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-branches.md +0 -18
- package/dist/agentic/shared/ai/skills/om-system-extension/references/mechanism-selector.md +0 -27
- package/dist/agentic/shared/ai/skills/om-system-extension/references/read-write-roundtrip.md +0 -13
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +0 -41
- package/dist/agentic/shared/ai/skills/om-system-extension/references/verification.md +0 -11
- package/dist/agentic/shared/ai/skills/om-trim-unused-modules/references/dependency-and-redirect.md +0 -15
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/diagnosis-map.md +0 -16
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/regression-oracles.md +0 -14
- package/dist/agentic/shared/scripts/agent-harness-tool-server.mjs +0 -187
- package/dist/agentic/shared/scripts/check-lessons.mjs +0 -178
- package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +0 -2958
- package/dist/agentic/shared/scripts/execution-sandbox.mjs +0 -329
- package/dist/agentic/shared/scripts/framework-context.mjs +0 -888
- package/dist/agentic/shared/scripts/install-skills.mjs +0 -1029
- package/dist/agentic/shared/scripts/prepare-agent-harness-fixture.mjs +0 -222
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +0 -1774
- package/dist/lib/generators/module-extension-facts.js +0 -1840
- package/dist/lib/generators/module-extension-facts.js.map +0 -7
- package/dist/lib/generators/module-fact-sources.js +0 -70
- package/dist/lib/generators/module-fact-sources.js.map +0 -7
- package/dist/lib/generators/module-override-targets.js +0 -688
- package/dist/lib/generators/module-override-targets.js.map +0 -7
- package/dist/lib/load-env.js +0 -24
- package/dist/lib/load-env.js.map +0 -7
- package/dist/lib/telemetry-init.js +0 -358
- package/dist/lib/telemetry-init.js.map +0 -7
- package/src/lib/__tests__/agentic-setup.ownership.test.ts +0 -386
- package/src/lib/__tests__/injection-widget-id-validation.test.ts +0 -184
- package/src/lib/__tests__/load-env.test.ts +0 -65
- package/src/lib/__tests__/telemetry-init.test.ts +0 -298
- package/src/lib/generators/__tests__/activation-adapter-coverage.test.ts +0 -92
- package/src/lib/generators/__tests__/module-extension-activations.test.ts +0 -762
- package/src/lib/generators/__tests__/module-extension-facts.test.ts +0 -404
- package/src/lib/generators/__tests__/module-facts.extension-hosts.test.ts +0 -108
- package/src/lib/generators/__tests__/module-facts.owned-contracts.test.ts +0 -561
- package/src/lib/generators/__tests__/module-facts.source-links.test.ts +0 -119
- package/src/lib/generators/__tests__/module-override-targets.roundtrip.test.ts +0 -149
- package/src/lib/generators/__tests__/module-override-targets.test.ts +0 -304
- package/src/lib/generators/module-extension-facts.ts +0 -2365
- package/src/lib/generators/module-fact-sources.ts +0 -108
- package/src/lib/generators/module-override-targets.ts +0 -863
- package/src/lib/load-env.ts +0 -30
- package/src/lib/telemetry-init.ts +0 -461
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Unified Module Extensions and Overrides
|
|
2
|
-
|
|
3
|
-
Use the smallest extension mechanism that preserves installed-module ownership. Resolve mechanisms, targets, and round trips from generated facts before exact installed source; never invent spot, route, entity, event, registry, or override IDs.
|
|
4
|
-
|
|
5
|
-
## Fact-First Target Resolution
|
|
6
|
-
|
|
7
|
-
Resolve an installed extension in this order:
|
|
8
|
-
|
|
9
|
-
1. Choose the mechanism by intent below; the mechanism decides which contribution kind and host capability are required.
|
|
10
|
-
2. Open only the named target module sheet at `.ai/guides/modules/<module>.md`. Its `UMES hosts` rows prove mountable exact/pattern targets; its `UMES contributions` rows preserve activation, phases/operations, feature and scope contracts, specialist routes, correlation resolution, and read/write/UI `roundTripId` links.
|
|
11
|
-
3. For global shell, menu, dashboard, notification, or integration surfaces, use `.ai/guides/framework-extension-points.md`. Do not assign a framework-owned host to a business module or invent a `$framework` module.
|
|
12
|
-
4. Follow a contribution's `fact-ref` or `specialistRoute` to the existing event/entity/API/command/search/AI/provider facts and owning specialist route. A specialized registry is not evidence for a generic widget target.
|
|
13
|
-
5. Use `om-framework-context` for one named unresolved installed-version gap only. An `optional-external` target is explicit provenance and must degrade when its owner package is absent; an `unresolved` first-party target is a blocker, not permission to guess.
|
|
14
|
-
|
|
15
|
-
The legacy `Host extension points` token summary remains useful for compatibility, but it is not proof that a helper-built token is bound. Prefer the correlated host/contribution rows. A DataTable base token is a prefix, not a rendered mount; helper-only CrudForm/DataTable IDs marked `bound: false` are diagnostics and must never be selected.
|
|
16
|
-
|
|
17
|
-
## Route Selection
|
|
18
|
-
|
|
19
|
-
Your file lives in `src/modules/<id>/` either way, so what you change decides the route, not where it lives. Creating your own entity/route/command/page is `module-data`/`backend-ui` alone, even when it calls installed APIs and reads installed facts. Changing an installed module — its records or data derived from them, commands, events, pages, agents, tools, or the invariants applied to them — selects `umes` as well. Reading its facts is not `umes`; changing its behavior is.
|
|
20
|
-
|
|
21
|
-
Add every other match too: `backend-ui` + `om-backend-ui-design` when authoring, restyling, or ACL-gating a surface this app owns or injected; `module-data` + contracts for app-owned entities/links/routes/commands/ACL; `ai-workflow` for a durable process, activity, or user task; plus the facts of each module involved. Stay `umes`-only when nothing of yours is rendered — hiding, toggling, disabling, rewiring, or auditing a surface an installed module owns.
|
|
22
|
-
|
|
23
|
-
## Mechanism Selector
|
|
24
|
-
|
|
25
|
-
| Goal | Mechanism | App module file |
|
|
26
|
-
|---|---|---|
|
|
27
|
-
| Add computed/read data | Response enricher | `data/enrichers.ts` |
|
|
28
|
-
| Rewrite/validate request or augment response | API interceptor | `api/interceptors.ts` |
|
|
29
|
-
| Add pre/post command behavior without replacing the command | Command interceptor | `commands/interceptors.ts` |
|
|
30
|
-
| Block/rewrite a mutation with post-success work | Mutation guard contract | `data/guards.ts`; add widget injection only for a UI surface |
|
|
31
|
-
| Enrich query-engine reads | Query enricher | `data/enrichers.ts` with `queryEngine.enabled` |
|
|
32
|
-
| Add form fields/table columns/actions/filters/toolbar | Headless widget injection | `widgets/injection/**`, `widgets/injection-table.ts`; select an exact bound family row from target facts |
|
|
33
|
-
| Add/reorder menu items | Headless menu widget | same widget files, `menu:*` host |
|
|
34
|
-
| Render a card/tab/section in another page | UI widget injection | same widget files |
|
|
35
|
-
| Add app data linked to installed entity | Entity extension | `data/extensions.ts` |
|
|
36
|
-
| React after lifecycle change | Typed subscriber | `subscribers/*.ts`; `metadata.sync`/`priority` for in-pipeline lifecycle work |
|
|
37
|
-
| React to query lifecycle | Sync query subscriber | `subscribers/*.ts` for `*.querying`/`*.queried` |
|
|
38
|
-
| React in the browser | Notification handler or DOM bridge | `notifications.handlers.ts`, or `events.ts` with `clientBroadcast` plus UI hooks |
|
|
39
|
-
| Replace/wrap/transform component props | Component override | `widgets/components.ts` |
|
|
40
|
-
| Disable/replace route, page, event, worker, widget, agent/tool, setup, ACL, DI, or encryption contract | Unified module entry override | `src/modules.ts` `entry.overrides` |
|
|
41
|
-
| Own unsupported installed internals | Eject, only after decision gate | `om-eject-and-customize` |
|
|
42
|
-
|
|
43
|
-
## Response Enrichers
|
|
44
|
-
|
|
45
|
-
- Target the exact host entity token and namespace additive output under the app module.
|
|
46
|
-
- Implement `enrichMany` for lists to avoid N+1 queries; filter all reads by tenant and organization.
|
|
47
|
-
- Declare feature gates, timeout, fallback, priority, and criticality. Fail closed for security decisions; keep decorative enrichment non-critical.
|
|
48
|
-
- Opt into cache-on-list-hit only when output is record-pure and invalidated with the host record.
|
|
49
|
-
- The host route must enable enrichers for the same entity ID. Run `yarn generate` after adding the file.
|
|
50
|
-
|
|
51
|
-
## API Interceptors
|
|
52
|
-
|
|
53
|
-
- Target exact route ID/methods and preserve host auth/scope. A before hook returns schema-compatible body/query; the host validates again.
|
|
54
|
-
- Narrow ID lists by intersecting with existing filters. Reject malformed IDs; never convert a bad restriction into unrestricted results.
|
|
55
|
-
- Preserve required response keys; make additive changes by default. Time-bound external work and define fallback behavior.
|
|
56
|
-
- Custom routes require their explicit interceptor bridge; do not assume all handlers execute generic hooks.
|
|
57
|
-
|
|
58
|
-
## Command Interceptors
|
|
59
|
-
|
|
60
|
-
- Export `interceptors: CommandInterceptor[]` from `commands/interceptors.ts`. Give each entry a stable `id` and an exact stable `targetCommand`; use module/global wildcards only when the cross-command scope is intentional.
|
|
61
|
-
- `beforeExecute` may block with `{ ok: false }` or return a validated shallow `modifiedInput`; `afterExecute` may return additive `modifiedResult` or perform bounded post-success work. `beforeUndo` may block unsafe undo and `afterUndo` performs idempotent cleanup. Preserve metadata only through the documented hook context.
|
|
62
|
-
- Feature gates are wildcard-aware. Re-derive tenant/organization ownership from authenticated context or scoped records; an interceptor never grants authority, bypasses the command, suppresses locking/audit/undo, or turns invalid input into a valid-looking unrestricted request.
|
|
63
|
-
- Test execute and undo paths, authorized/denied/wildcard callers, safe block/rewrite, hook order, and failure posture. Post hooks must not pretend a committed command failed.
|
|
64
|
-
|
|
65
|
-
## Mutation Guards
|
|
66
|
-
|
|
67
|
-
- Map the host operation to create/update/delete (state-changing actions usually update).
|
|
68
|
-
- Receive authenticated scope and wildcard-aware feature context. Return an explicit block or a validated modified payload.
|
|
69
|
-
- Run post-success callbacks only after commit; callback failure must be logged without pretending the committed write failed.
|
|
70
|
-
- Preserve optimistic locking and command side effects. A guard cannot authorize a caller denied by the host.
|
|
71
|
-
|
|
72
|
-
## Widget Injection
|
|
73
|
-
|
|
74
|
-
- Map stable widget IDs to exact host spots with `InjectionPosition` for deterministic order.
|
|
75
|
-
- Use headless payloads for fields, columns, row/bulk actions, filters, toolbar items, and menus; do not mount React solely to return declarations.
|
|
76
|
-
- Preserve host `entityId`/`extensionTableId`; injected actions use guarded/scoped API calls and shared states.
|
|
77
|
-
- For editable injected fields, implement all three paths: render/input, read/enricher, and save/interceptor or command. Test save/reload/clear.
|
|
78
|
-
- Gate display and execution separately. UI hiding never substitutes for backend authorization.
|
|
79
|
-
- Scope client handlers with `eventHandlers.filter.operations`; use `clientBroadcast`, `useAppEvent`, and `useOperationProgress` for typed real-time behavior instead of polling by default.
|
|
80
|
-
|
|
81
|
-
Bound CrudForm hosts are the base render/lifecycle host, `:header`, headless `:fields`, its component handle, and the declared transform/save/delete/field/navigation lifecycle handlers with create/update/delete operation filters. Bound DataTable hosts are rendered `:header`, `:footer`, `:toolbar`, conditional `:search-trailing`, headless `:columns`, `:row-actions`, `:bulk-actions`, `:filters`, and the `data-table:<tableId>` component handle. The DataTable base prefix, `emptyState`, and helper-only CrudForm before/after/footer/sidebar/group/field builders are not mountable unless a future bound-family fact explicitly says otherwise.
|
|
82
|
-
|
|
83
|
-
Menu hosts are framework-owned unless the named module facts prove otherwise. Use the framework catalog's exact menu surface/item IDs, label keys, feature gates, and relative placement; never derive `menu:sidebar:*` or `menu:topbar:*` from memory.
|
|
84
|
-
|
|
85
|
-
## Extensions and Optional Coupling
|
|
86
|
-
|
|
87
|
-
- Keep extension data in a separate app-owned entity with scalar host ID and full tenant/org scope.
|
|
88
|
-
- Use a unique scoped key where one extension row per host is expected. Define deletion/orphan and absent-host behavior.
|
|
89
|
-
- Use ID plus snapshot when historical rendering must survive host removal/change.
|
|
90
|
-
- The optional consumer owns event/enricher/widget glue and guarded DI resolution. The host never imports the optional consumer.
|
|
91
|
-
|
|
92
|
-
## Component and Module Overrides
|
|
93
|
-
|
|
94
|
-
- Prefer props transform, then wrapper, then full replacement. Preserve the component's public props and accessibility behavior.
|
|
95
|
-
- Use handle-based component targets and stable override keys from facts/source.
|
|
96
|
-
- In `src/modules.ts`, `null` disables a supported contract and a value replaces it. Keep override IDs aligned with the replaced value.
|
|
97
|
-
- Add a route/page replacement only once; verify generated registries select it and that disabling leaves no stale nav/cache entry.
|
|
98
|
-
- Use AI extensions for small prompt/tool/suggestion changes; use full AI overrides only for replacement/disable.
|
|
99
|
-
- The complete wired override catalog spans AI agents/tools/extensions, API/page routes, subscribers, workers, injection/component/dashboard widgets, notification types/handlers, API/command interceptors, enrichers, page guards, CLI, setup, ACL, DI, and encryption. Use `om-system-extension` → `references/unified-overrides.md`; never guess a domain/key.
|
|
100
|
-
|
|
101
|
-
## Specialized Extension Families
|
|
102
|
-
|
|
103
|
-
- Integration onboarding/status/detail contributions use the typed integration registry, `InjectionWizard`, `StatusBadgeRenderer`, and provider detail `widgetSpotId`; route to the integration skill as well as UI/UMES.
|
|
104
|
-
- Search/vector work includes `search.ts`, `vector.ts`, query enrichers, and query lifecycle subscribers; route to module/data work and inspect exact installed search contracts.
|
|
105
|
-
- Embedded AI uses `<AiChat agent="module.agent_id">`; provider/currency/workflow registrations belong to their owning integration or workflow contracts.
|
|
106
|
-
- Reactive notification handlers use `notifications.handlers.ts`/`useNotificationEffect`; message/inbox definitions remain stable typed surfaces.
|
|
107
|
-
|
|
108
|
-
## Feature Toggles
|
|
109
|
-
|
|
110
|
-
- Define one server-resolved toggle and use it consistently in backend behavior, page/menu/widget visibility, workers/subscribers, and APIs.
|
|
111
|
-
- When disabled, choose and test an explicit outcome: hidden, 404/403, no-op, or degraded read. Never leave UI-only gating around a live mutation.
|
|
112
|
-
|
|
113
|
-
## Verification
|
|
114
|
-
|
|
115
|
-
1. Test host present and optional host absent.
|
|
116
|
-
2. Test authorized, unauthorized, and wildcard-feature callers.
|
|
117
|
-
3. Test list and detail, create/update/delete/action, cache hit/miss, and failure fallback where applicable.
|
|
118
|
-
4. Run `yarn generate`, inspect host registration, and verify no installed file changed.
|
|
119
|
-
5. Re-read the generated contribution row: its target must resolve as `exact`, `pattern`, `framework`, `fact-ref`, or intentional `optional-external`, and every shared `roundTripId` leg must remain present. Treat `unresolved` first-party provenance as a failed generation/coverage gate.
|
|
120
|
-
|
|
121
|
-
The repository umbrella specification may be available at `.ai/specs/implemented/SPEC-041-2026-02-24-universal-module-extension-system.md` in a source checkout. It is optional background only; the generated facts and this selector are sufficient offline in a standalone scaffold.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Framework extension points (generated, do not edit)
|
|
2
|
-
|
|
3
|
-
| ID / pattern | Family | Supports | Stability |
|
|
4
|
-
|---|---|---|---|
|
|
5
|
-
| crud-form:* | crud-form | field-widget, lifecycle-handler | FROZEN |
|
|
6
|
-
| dashboard:* | dashboard | registry-contribution | FROZEN |
|
|
7
|
-
| backend-mutation:global | generic | headless-widget | FROZEN |
|
|
8
|
-
| integrations.detail:{integrationId} | integration | render-widget | FROZEN |
|
|
9
|
-
| integrations.detail:tabs | integration | render-widget | FROZEN |
|
|
10
|
-
| menu:backend.sidebar | menu | menu-item | FROZEN |
|
|
11
|
-
| menu:portal.sidebar | menu | menu-item | FROZEN |
|
|
12
|
-
| menu:profile.sidebar | menu | menu-item | FROZEN |
|
|
13
|
-
| menu:settings.sidebar | menu | menu-item | FROZEN |
|
|
14
|
-
| module-override:acl.features | module-override | module-override, disable-replace | STABLE |
|
|
15
|
-
| module-override:ai.agents | module-override | module-override, disable-replace | STABLE |
|
|
16
|
-
| module-override:ai.extensions | module-override | module-override, additive | STABLE |
|
|
17
|
-
| module-override:ai.tools | module-override | module-override, disable-replace | STABLE |
|
|
18
|
-
| module-override:cli | module-override | module-override, disable-replace | STABLE |
|
|
19
|
-
| module-override:commandInterceptors | module-override | module-override, disable-replace | STABLE |
|
|
20
|
-
| module-override:di | module-override | module-override, disable-replace | STABLE |
|
|
21
|
-
| module-override:encryption.maps | module-override | module-override, disable-replace | STABLE |
|
|
22
|
-
| module-override:enrichers | module-override | module-override, disable-replace | STABLE |
|
|
23
|
-
| module-override:events.subscribers | module-override | module-override, disable-replace | STABLE |
|
|
24
|
-
| module-override:guards | module-override | module-override, disable-replace | STABLE |
|
|
25
|
-
| module-override:interceptors | module-override | module-override, disable-replace | STABLE |
|
|
26
|
-
| module-override:nav.groupOrder | module-override | module-override, additive | STABLE |
|
|
27
|
-
| module-override:notifications.handlers | module-override | module-override, disable-replace | STABLE |
|
|
28
|
-
| module-override:notifications.types | module-override | module-override, disable-replace | STABLE |
|
|
29
|
-
| module-override:routes.api | module-override | module-override, disable-replace | STABLE |
|
|
30
|
-
| module-override:routes.pages | module-override | module-override, disable-replace | STABLE |
|
|
31
|
-
| module-override:setup | module-override | module-override, replace | STABLE |
|
|
32
|
-
| module-override:widgets.components | module-override | module-override, disable-replace | STABLE |
|
|
33
|
-
| module-override:widgets.dashboard | module-override | module-override, disable-replace | STABLE |
|
|
34
|
-
| module-override:widgets.injection | module-override | module-override, disable-replace | STABLE |
|
|
35
|
-
| module-override:workers | module-override | module-override, disable-replace | STABLE |
|
|
36
|
-
| notification:* | notification | registry-contribution | FROZEN |
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Integration and Provider Engineering
|
|
2
|
-
|
|
3
|
-
Build provider-owned modules around generic integration, data-sync, webhook, queue, and progress contracts. Never place provider-specific behavior inside a generic host module.
|
|
4
|
-
|
|
5
|
-
## Provider Family Selector
|
|
6
|
-
|
|
7
|
-
| Family | Primary contract |
|
|
8
|
-
|---|---|
|
|
9
|
-
| Transactional email | `IntegrationDefinition`, tenant credentials, DI sender + health services, retry/redaction, and app activation. There is no installed generic transactional-email adapter contract. |
|
|
10
|
-
| Mailbox/email channel | Installed `communication_channels` hub plus its `ChannelAdapter`, per-user credentials, inbound/outbound conversion, polling/push, health, DI/setup registration. Follow the Gmail/IMAP precedent. |
|
|
11
|
-
| Shipping/carrier | Provider package, service/quote/label/tracking adapter, webhook mapping, idempotent fulfillment updates. |
|
|
12
|
-
| Payment gateway | Installed `GatewayAdapter`; `registerGatewayAdapter`, `registerWebhookHandler`, and `registerPaymentGatewayDescriptor`; idempotency keys, signed webhooks, concurrency-safe state machine. |
|
|
13
|
-
| Commerce/ERP sync | `DataSyncAdapter`, mappings/presets, external IDs, cursors, reconciliation, progress. |
|
|
14
|
-
| Generic webhook | Standard signing/verification, replay protection, delivery queue/log/status, scoped configuration. |
|
|
15
|
-
| File import/export | Streaming parser/writer, format adapter, progress, cleanup, row errors, formula neutralization. |
|
|
16
|
-
| Storage/media | Provider adapter, scoped object keys, signed access, metadata, cleanup and lifecycle. |
|
|
17
|
-
|
|
18
|
-
## Package and Activation
|
|
19
|
-
|
|
20
|
-
- In this standalone repository, put an app-specific provider under `src/modules/<provider>/` and activate it through `src/modules.ts`. Do not invent a `packages/*` workspace: the scaffold has no workspace topology.
|
|
21
|
-
- When the user explicitly needs reuse across applications, build a separately published provider package/repository with compatible peer/runtime dependencies, public exports, build/prepack output, and module discovery files; install its packed artifact as an app dependency.
|
|
22
|
-
- Ask before changing repository topology or adding the production dependency. Keep packed-consumer validation on the reusable-package branch only.
|
|
23
|
-
- Register provider services through DI and use an `integration.ts` definition for credentials, health, versions, bundle membership, and detail-page extension spot.
|
|
24
|
-
- A provider implementation is not complete when only a transport/client exists. The production path includes `index.ts`, `integration.ts`, `di.ts`, the typed host adapter where one exists, `setup.ts`/`acl.ts` when bootstrap or features are needed, and `src/modules.ts` activation.
|
|
25
|
-
- Enable the local module or installed package in `src/modules.ts`. For the reusable branch, test the published/packed artifact, not only package source.
|
|
26
|
-
- Keep provider env names prefixed and stable. Apply optional deployment presets from provider-owned `setup.ts` through normal services, with an idempotent rerun CLI when practical.
|
|
27
|
-
- Do not preconfigure a provider from core/app bootstrap unless the provider package owns that code.
|
|
28
|
-
|
|
29
|
-
## Credentials and Security
|
|
30
|
-
|
|
31
|
-
- Store credentials through the integrations credential service/encryption maps; never log raw values or return secrets to list/detail APIs.
|
|
32
|
-
- Declare the host credential/mapping scope. Thread `userId` on every per-user read/write. Tenant-wide credentials or scheduled jobs may use the installed contract's explicit tenant scope (including `organizationId: null`), but must never read or mutate organization-owned rows without deriving and checking an organization for that item.
|
|
33
|
-
- Validate external base URLs against SSRF rules, including redirects and DNS/private ranges. Permit private endpoints only through an explicit development setting.
|
|
34
|
-
- Redact authorization headers, tokens, signed URLs, provider payload secrets, and sensitive response bodies from errors and logs.
|
|
35
|
-
- Use `createLogger` from `@open-mercato/shared/lib/logger` with structured fields; never use raw `console.*` or place credentials/provider payload bodies in log fields.
|
|
36
|
-
- Verify inbound signatures against the raw body, enforce timestamp/replay bounds, and atomically claim each inbox delivery before side effects so duplicate callbacks have one winner (`atomic-inbox-claim`).
|
|
37
|
-
|
|
38
|
-
## Reliability Contract
|
|
39
|
-
|
|
40
|
-
- Define timeouts, bounded retries with jitter, provider rate-limit handling, circuit/health behavior, and structured logs with correlation IDs.
|
|
41
|
-
- Give every remote mutation a durable idempotency key tied to the local operation. Preserve it across transaction rollback/retry.
|
|
42
|
-
- Separate transport success from domain reconciliation. Persist external IDs and snapshots only after the relevant durable local/remote boundary succeeds.
|
|
43
|
-
- Treat provider variants (site/store/currency/price scope, API version, feature availability) as explicit capability/config branches; do not infer one global shape.
|
|
44
|
-
- Keep webhook, poll, manual retry, and scheduled sync paths convergent and safe when they race.
|
|
45
|
-
|
|
46
|
-
## Data Sync and Cursor Safety
|
|
47
|
-
|
|
48
|
-
- Implement/register a `DataSyncAdapter` with direction, supported entities, streaming import/export, connection validation, mappings, and cursor support.
|
|
49
|
-
- Run sync through queue workers and `ProgressJob`; prevent overlapping runs for the same scoped provider/entity/direction unless explicitly supported.
|
|
50
|
-
- Isolate item errors and continue safe batches; report row/item outcomes. A batch transport failure must not advance its cursor.
|
|
51
|
-
- Persist a cursor only after the page/batch and its external-ID mappings commit. Retry resumes from the last successful cursor.
|
|
52
|
-
- Make reruns idempotent and add reconciliation for provider-side totals/status that may differ from event payloads.
|
|
53
|
-
- Preserve nested snapshots/variants required for later mapping; avoid stale payload assumptions by validating versioned contracts.
|
|
54
|
-
|
|
55
|
-
## Import and Export
|
|
56
|
-
|
|
57
|
-
- Stream large inputs/outputs; bound memory and file sizes. Validate content type, extension, encoding, column mapping, and row schemas.
|
|
58
|
-
- Neutralize spreadsheet formulas in exported untrusted values. Avoid zip/path traversal and clean temporary/artifact files in `finally`/retention jobs.
|
|
59
|
-
- Use deterministic locale/timezone/decimal/date handling and return row-level errors without exposing secrets.
|
|
60
|
-
- Support cancellation and progress; perform domain writes through commands.
|
|
61
|
-
|
|
62
|
-
## Provider UI and UMES
|
|
63
|
-
|
|
64
|
-
- Use integrations/settings pages and provider detail widget spots rather than cloning the marketplace UI.
|
|
65
|
-
- Gate credential, health, mapping, sync, and log actions with their own features. Use shared guarded mutations and states.
|
|
66
|
-
- Add external IDs/status to domain pages through enrichers/widgets, keeping host modules unaware of the provider.
|
|
67
|
-
- Use typed events and notifications for completion/failure; use DOM Event Bridge/progress for live status instead of aggressive polling.
|
|
68
|
-
|
|
69
|
-
## Email Routing
|
|
70
|
-
|
|
71
|
-
- First decide whether the request is **transactional delivery** or a **connected mailbox**. SMTP used only for application-generated mail is a transactional provider: register its `IntegrationDefinition`, encrypted credentials, DI sender/health services, and app module, but do not claim it implements a mailbox contract that the installed framework does not expose.
|
|
72
|
-
- Gmail, IMAP/SMTP mailboxes, inbox sync, threading, history, or per-user send/receive belong to the installed `communication_channels` module. Implement `ChannelAdapter` from `@open-mercato/core/modules/communication_channels/lib/adapter`, set `integration.hub: 'communication_channels'`, register the adapter and exact `healthCheck.service` in `di.ts`, ensure idempotent adapter registration/default grants in `setup.ts`, and activate both the hub and provider in `src/modules.ts`.
|
|
73
|
-
- Use the installed `channel_gmail` and `channel_imap` facts/source as precedent. Thread `userId` on every mailbox credential read/write; tenant-wide transactional credentials must not read per-user rows.
|
|
74
|
-
|
|
75
|
-
## Testing
|
|
76
|
-
|
|
77
|
-
1. Use a contract server/mock for normal, timeout, rate-limit, malformed, partial, retry, duplicate, signature, and pagination responses.
|
|
78
|
-
2. Verify credential redaction, SSRF rejection, scope isolation, per-user separation, and webhook replay behavior.
|
|
79
|
-
3. Verify a rerun produces no duplicate remote/local records and concurrent callbacks converge.
|
|
80
|
-
4. Inject a page/batch failure and prove the cursor did not advance or lose data.
|
|
81
|
-
5. Pack/build the provider and run generation/typecheck/tests from a standalone consumer.
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# design_system — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.6.7-develop.6862.1.c11a64ce0a; core 0.6.7-develop.6862.1.c11a64ce0a — R1 staleness stamp -->
|
|
3
|
-
Source root: [node_modules/@open-mercato/core/src/modules/design_system](../../../node_modules/@open-mercato/core/src/modules/design_system)
|
|
4
|
-
|
|
5
|
-
## Entities
|
|
6
|
-
|
|
7
|
-
_none_
|
|
8
|
-
|
|
9
|
-
## Events (0)
|
|
10
|
-
|
|
11
|
-
_none_
|
|
12
|
-
|
|
13
|
-
## ACL features (1)
|
|
14
|
-
|
|
15
|
-
| Feature | Source |
|
|
16
|
-
|---|---|
|
|
17
|
-
| design_system.view | [node_modules/@open-mercato/core/src/modules/design_system/acl.ts](../../../node_modules/@open-mercato/core/src/modules/design_system/acl.ts) |
|
|
18
|
-
|
|
19
|
-
## API routes
|
|
20
|
-
|
|
21
|
-
_none_
|
|
22
|
-
|
|
23
|
-
## Backend pages
|
|
24
|
-
|
|
25
|
-
| ID / path | Source |
|
|
26
|
-
|---|---|
|
|
27
|
-
| /backend/design-system | [node_modules/@open-mercato/core/src/modules/design_system/backend/design-system/page.tsx](../../../node_modules/@open-mercato/core/src/modules/design_system/backend/design-system/page.tsx) |
|
|
28
|
-
|
|
29
|
-
## Frontend pages
|
|
30
|
-
|
|
31
|
-
_none_
|
|
32
|
-
|
|
33
|
-
## DI service tokens
|
|
34
|
-
|
|
35
|
-
_none_
|
|
36
|
-
|
|
37
|
-
## Search entities
|
|
38
|
-
|
|
39
|
-
_none_
|
|
40
|
-
|
|
41
|
-
## Host extension points
|
|
42
|
-
|
|
43
|
-
- Entity IDs: _none_
|
|
44
|
-
- Table IDs: _none_
|
|
45
|
-
|
|
46
|
-
## UMES hosts
|
|
47
|
-
|
|
48
|
-
_none_
|
|
49
|
-
|
|
50
|
-
## UMES contributions
|
|
51
|
-
|
|
52
|
-
_none_
|
|
53
|
-
|
|
54
|
-
## Active extension bindings
|
|
55
|
-
|
|
56
|
-
_none_
|
|
57
|
-
|
|
58
|
-
## Incoming installed contributions
|
|
59
|
-
|
|
60
|
-
_none_
|
|
61
|
-
|
|
62
|
-
## Contribution resolutions
|
|
63
|
-
|
|
64
|
-
_none_
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Notifications
|
|
69
|
-
|
|
70
|
-
_none_
|
|
71
|
-
|
|
72
|
-
## CLI commands
|
|
73
|
-
|
|
74
|
-
_none_
|
|
75
|
-
|
|
76
|
-
## AI tools / MCP capabilities
|
|
77
|
-
|
|
78
|
-
_none_
|
|
79
|
-
|
|
80
|
-
## AI agents
|
|
81
|
-
|
|
82
|
-
_none_
|
|
83
|
-
|
|
84
|
-
## Exact override targets
|
|
85
|
-
|
|
86
|
-
| Domain | Path / key | Supported modes | Referenced fact | Source |
|
|
87
|
-
|---|---|---|---|---|
|
|
88
|
-
| acl | `overrides.acl.features["design_system.view"]` | disable-replace | aclFeatures:design_system.view | [node_modules/@open-mercato/core/src/modules/design_system/acl.ts](../../../node_modules/@open-mercato/core/src/modules/design_system/acl.ts) |
|
|
89
|
-
| routes | `overrides.routes.pages["backend:/backend/design-system"]` | disable-replace | backendPages:/backend/design-system | [node_modules/@open-mercato/core/src/modules/design_system/backend/design-system/page.tsx](../../../node_modules/@open-mercato/core/src/modules/design_system/backend/design-system/page.tsx) |
|
|
90
|
-
| setup | `overrides.setup.defaultRoleFeatures` | replace | ownedContracts.setup:design_system:setup | [node_modules/@open-mercato/core/src/modules/design_system/setup.ts:3](../../../node_modules/@open-mercato/core/src/modules/design_system/setup.ts#L3) |
|
|
91
|
-
|
|
92
|
-
## Owned contract — module metadata
|
|
93
|
-
|
|
94
|
-
| ID | Metadata | Source |
|
|
95
|
-
|---|---|---|
|
|
96
|
-
| design_system | name=design_system | [node_modules/@open-mercato/core/src/modules/design_system/index.ts:3](../../../node_modules/@open-mercato/core/src/modules/design_system/index.ts#L3) |
|
|
97
|
-
|
|
98
|
-
## Setup
|
|
99
|
-
|
|
100
|
-
| ID | Metadata | Source |
|
|
101
|
-
|---|---|---|
|
|
102
|
-
| design_system:setup | roles=admin, employee | [node_modules/@open-mercato/core/src/modules/design_system/setup.ts:3](../../../node_modules/@open-mercato/core/src/modules/design_system/setup.ts#L3) |
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Specification Delivery
|
|
2
|
-
|
|
3
|
-
Use this guide for a new application, multi-module feature, or other non-trivial business slice.
|
|
4
|
-
|
|
5
|
-
## Authoring readiness gate
|
|
6
|
-
|
|
7
|
-
1. Invoke `om-spec-writing` before authoring or revising. Mentioning the skill or reading only `SPEC-000-template.md` is not sufficient.
|
|
8
|
-
2. After invocation, read `.ai/specs/SPEC-000-template.md` and preserve every section; use `N/A — reason` only when a section genuinely does not apply.
|
|
9
|
-
3. Keep status `Draft` until no blocking open question remains and every requirement maps to an acceptance criterion, implementation phase, and self-contained test oracle.
|
|
10
|
-
4. For each affected UI route, inspect and cite the closest existing Open Mercato page plus `.ai/guides/backend-ui.md`; specify its text mockup/structure, actions, data source and mutations, permissions, canonical shell/components, and loading/empty/error/conflict/keyboard/a11y/responsive/light/dark states. Tabular admin data names `DataTable`; CRUD create/edit names `CrudForm`; backend reads name shared API helpers; every exception has an explicit rationale.
|
|
11
|
-
5. New applications and multi-module requests also define domain vocabulary/invariants, measurable success, navigation/widgets, module ownership and extension points, architecture/data flow, and concrete risk scenarios. A page inventory alone is not an app architecture.
|
|
12
|
-
6. Phases are dependency-ordered complete vertical slices with concrete deliverables, acceptance IDs, bounded slices, tests, validation commands, business value, and observable exit gates. Do not defer required behavior to a catch-all “integration/polish” phase.
|
|
13
|
-
7. Mark the spec `Ready for implementation` only after the traceability and final compliance matrices pass and the user approves implementation.
|
|
14
|
-
|
|
15
|
-
## Implementation phase gate
|
|
16
|
-
|
|
17
|
-
- Use `om-implement-spec` for interactive local delivery and `om-auto-implement-spec` for whole-spec PR delivery. The local skill's progressive resolution, planning/progress, and report references own its exact workflow and final `Spec:` marker; it never claims PR/tracker output.
|
|
18
|
-
- Only the current unblocked phase may be in progress. Parallelize independent slices inside that phase only; never start a dependent module/phase before its prerequisite exit gate passes.
|
|
19
|
-
- Delegation does not bypass routing. Before any UI slice, actually invoke `om-backend-ui-design` and read `.ai/guides/backend-ui.md`; naming them in an agent prompt is not invocation. Every implementation brief names the active phase, routed guides/skills, closest reference page, canonical primitives, acceptance IDs, owned files, and validation oracle.
|
|
20
|
-
- Reject raw backend tables/forms/fetch, copied component families, arbitrary values, hard-coded palette/status colors, and light-only styling unless the approved spec records a necessary exception. UI phase evidence exercises affected routes in light and dark mode and at narrow width, including loading/empty/error/conflict and keyboard behavior.
|
|
21
|
-
- A phase remains open while it has stubs, missing integration evidence, unmet acceptance IDs, or failing validation. Generated discovery, file count, and typecheck alone do not prove completion.
|
|
22
|
-
- If no remote/tracker exists, report PR delivery unavailable and invoke local `om-implement-spec` phase-by-phase; never improvise a concurrent whole-spec build.
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Testing and Root-Cause Debugging
|
|
2
|
-
|
|
3
|
-
Diagnose before editing, fix the smallest knowledge/code owner, and prove the regression through the real runtime path.
|
|
4
|
-
|
|
5
|
-
## Context Restraint
|
|
6
|
-
|
|
7
|
-
Name the areas the failure spans before loading anything, from the SYMPTOM and not only from the cause: a value that will not render, a session/locale/hydration mismatch, or a stale form spans `backend-ui`; wrong or lost records, commands, or events span `module-data`; an installed module's own surface spans `umes`; an external provider call spans `integration`.
|
|
8
|
-
|
|
9
|
-
A fix is always `debugging` plus every area you just named. Proving the fix with a regression oracle is part of `debugging` and does NOT add `testing`; a request that explicitly asks for tests, coverage, or app-level verification also selects `testing`. Load exactly this guide, each named area's guide, and `om-troubleshooter` — that is what selects those routes.
|
|
10
|
-
|
|
11
|
-
Add an area's authoring skill when the fix **introduces or reworks** a contract there — a concurrency header on existing calls, a new field or UI surface, a new command, a new invalidation, a new guard, or a provider's pagination cursor, bounded retry, idempotency, or reconciliation — because you are then designing that surface, not just repairing it. Provider cursor/retry/idempotency fixes therefore load `om-integration-builder` even when the request is framed as a bug fix. Load `om-troubleshooter` alone when you only correct existing behavior, such as a hydration mismatch or a value that fails to round-trip.
|
|
12
|
-
|
|
13
|
-
Then stop. Budgets here are tight — several fixes allow only five files — so load no other area's skill, no `references/` you do not need, no contracts guide unless the fix changes a data, API, command, ACL, or setup contract, and a module fact sheet only for a module the failure actually involves.
|
|
14
|
-
|
|
15
|
-
## Investigation Order
|
|
16
|
-
|
|
17
|
-
1. Reproduce with the smallest stable command, request, or UI path and capture expected versus actual behavior.
|
|
18
|
-
2. Classify the failing bootstrap: browser/server, API, CLI, worker, queue, generated registry, package artifact, or external provider.
|
|
19
|
-
3. Read the routed guide plus generated module facts. Use `om-framework-context` only when exact installed implementation is necessary.
|
|
20
|
-
4. Trace from the public call site to the first incorrect invariant. Check scope, auth, validation, state transition, transaction boundary, side effects, and response serialization in that order.
|
|
21
|
-
5. Add a regression oracle that fails before the fix (`unit-regression-oracle` when that decision vocabulary is requested). Implement the minimal complete repair and rerun affected plus safety cases.
|
|
22
|
-
|
|
23
|
-
When comparing against a clean baseline, use a separate worktree or a fresh scaffold. Never stash and drop active work just to reproduce a baseline failure; preserve the working diff and verify the comparison tree's exact revision first.
|
|
24
|
-
|
|
25
|
-
Treat raw agent transcripts as sensitive untrusted evidence because they can contain credentials, private prompts, absolute paths, and tool output. Never copy them into the app repository. Export only when the user explicitly asks, to an outside-repository protected destination or as a deliberately sanitized summary.
|
|
26
|
-
|
|
27
|
-
## Frequent Failure Families
|
|
28
|
-
|
|
29
|
-
| Symptom | Check first |
|
|
30
|
-
|---|---|
|
|
31
|
-
| 401 loop/all-organizations failure | Null-scope behavior, session refresh ownership, and fail-closed versus intentionally global paths. |
|
|
32
|
-
| Missing/extra tenant data | Every query/write/filter/cache/job payload; scope derived from auth, not body. |
|
|
33
|
-
| Field does not save/clear | Validator → command → entity → response transform → form initial value; truthy/default fallbacks. |
|
|
34
|
-
| Concurrent update overwrites | `updated_at` projection, client header, aggregate command guard, conflict surface. |
|
|
35
|
-
| Partial state after failure | Transaction/`withAtomicFlush`, query between mutation/flush, side effects before commit. |
|
|
36
|
-
| Stale list/search | Command side-effect aliases, cache tags/invalidation, query-index convergence/reindex. |
|
|
37
|
-
| Works in web but not CLI/worker | Bootstrap/registry initialization, package exports, generated imports, runtime scope. |
|
|
38
|
-
| Duplicate registry/provider | Bundler chunk singleton or `instanceof`; use global registry/structural guard. |
|
|
39
|
-
| Hydration mismatch | Server/client locale, timezone, randomness, browser-only environment, initial async state. |
|
|
40
|
-
| UI access differs from API/PDF/export | Compare every alternate route's metadata/features and wildcard matching. |
|
|
41
|
-
| Provider loses/duplicates records | Idempotency key, cursor commit point, webhook/poll race, external mapping and reconciliation. |
|
|
42
|
-
|
|
43
|
-
## Generated and Package Diagnostics
|
|
44
|
-
|
|
45
|
-
- Never edit generated output to prove a theory. Inspect the source discovery path, run `yarn generate`, and compare the affected registry entry.
|
|
46
|
-
- When an app imports a symbol but workspace tests pass, inspect package exports and packed/installed `dist` plus types.
|
|
47
|
-
- Search ignored installed source only through the bounded resolver output. Record resolved package versions and fact stamps.
|
|
48
|
-
- If a stale chunk/cache is suspected, prove the source/generator is correct before using the app's documented reset escape hatch.
|
|
49
|
-
|
|
50
|
-
## Data and Security Regression Oracles
|
|
51
|
-
|
|
52
|
-
- Create fixtures for two tenants and two organizations; assert allowed, denied, null-scope, and wildcard-feature behavior.
|
|
53
|
-
- Inject failure between multi-phase writes; assert no partial rows/state and no premature event/cache/index side effect.
|
|
54
|
-
- Exercise update and delete with current, stale, and missing versions.
|
|
55
|
-
- Test malformed IDs/filters and ensure invalid input cannot widen a query.
|
|
56
|
-
- Test retry, duplicate delivery, cancellation, and worker restart for external/queued operations.
|
|
57
|
-
- Provider failure/retry/idempotency tests use an ephemeral test environment (`ephemeral-test-environment`) with mock effects, assert secrets are absent and diagnostics redacted (`health-retry-redaction`), and surface every real failure (`honest-test-result`).
|
|
58
|
-
|
|
59
|
-
## UI Regression Oracles
|
|
60
|
-
|
|
61
|
-
- Use API-created fixtures and clean them in `finally`; do not depend on demo data.
|
|
62
|
-
- Cover loading, empty, validation, server error, conflict, retry, success, and authorization.
|
|
63
|
-
- Save/reload/edit/clear fields and verify API plus rendered values.
|
|
64
|
-
- Render under at least two locales/timezones when hydration or formatting is involved.
|
|
65
|
-
- Prefer semantic assertions and stable IDs over full DOM/file snapshots.
|
|
66
|
-
|
|
67
|
-
## Validation Ladder
|
|
68
|
-
|
|
69
|
-
Before authoring a test file, read `.ai/skills/om-module-scaffold/references/verification.md` for the scaffold's test-runner contract.
|
|
70
|
-
|
|
71
|
-
1. Focused unit/regression test.
|
|
72
|
-
2. `yarn generate` when discovery is involved.
|
|
73
|
-
3. Focused package/app typecheck or test.
|
|
74
|
-
4. `yarn typecheck`, `yarn lint`, `yarn test`, `yarn build` for broad/contract changes.
|
|
75
|
-
5. `yarn test:integration:ephemeral` or a filtered integration run for affected API/UI paths.
|
|
76
|
-
6. Packed/Verdaccio standalone validation when package exports or compiled discovery are involved.
|
|
77
|
-
|
|
78
|
-
Run validation commands so the reported shell status is the validation command's status. Do not pipe gates through `grep`, `tail`, or a trailing `echo`; when log capture requires a pipeline, enable `pipefail` and explicitly preserve the command's exit code. Any nonzero status remains a failed gate.
|
|
79
|
-
|
|
80
|
-
Do not replace deterministic convergence with sleeps. Do not suppress failing tests, weaken assertions, or call a bug fixed because only one bootstrap path passes.
|