@open-mercato/cli 0.6.7 → 0.6.8-canary.320.1.bf889f49e4
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 +77 -4
- package/AGENTS.md +6 -1
- package/build.mjs +68 -11
- package/dist/agentic/claude-code/hooks/entity-migration-check.ts +32 -88
- package/dist/agentic/codex/enforcement-rules.md +2 -16
- package/dist/agentic/cursor/hooks/entity-migration-check.mjs +19 -50
- package/dist/agentic/cursor/rules/entity-guard.mdc +9 -21
- package/dist/agentic/cursor/rules/generated-guard.mdc +3 -5
- package/dist/agentic/cursor/rules/open-mercato.mdc +3 -29
- package/dist/agentic/guides/ai-workflows.md +76 -0
- package/dist/agentic/guides/architecture.md +107 -0
- package/dist/agentic/guides/backend-ui.md +86 -0
- package/dist/agentic/guides/contracts.md +92 -0
- package/dist/agentic/guides/extensions.md +121 -0
- package/dist/agentic/guides/framework-extension-points.md +36 -0
- package/dist/agentic/guides/integrations.md +81 -0
- package/dist/agentic/guides/module-facts.json +116757 -3951
- package/dist/agentic/guides/module-system.md +12 -127
- package/dist/agentic/guides/modules/ai_assistant.md +227 -28
- package/dist/agentic/guides/modules/api_docs.md +58 -2
- package/dist/agentic/guides/modules/api_keys.md +92 -7
- package/dist/agentic/guides/modules/attachments.md +119 -14
- package/dist/agentic/guides/modules/audit_logs.md +131 -10
- package/dist/agentic/guides/modules/auth.md +276 -33
- package/dist/agentic/guides/modules/business_rules.md +149 -14
- package/dist/agentic/guides/modules/catalog.md +482 -43
- package/dist/agentic/guides/modules/channel_gmail.md +82 -3
- package/dist/agentic/guides/modules/channel_imap.md +82 -3
- package/dist/agentic/guides/modules/checkout.md +305 -27
- package/dist/agentic/guides/modules/communication_channels.md +315 -33
- package/dist/agentic/guides/modules/configs.md +104 -8
- package/dist/agentic/guides/modules/content.md +57 -2
- package/dist/agentic/guides/modules/currencies.md +152 -17
- package/dist/agentic/guides/modules/customer_accounts.md +387 -45
- package/dist/agentic/guides/modules/customers.md +746 -85
- package/dist/agentic/guides/modules/dashboards.md +155 -10
- package/dist/agentic/guides/modules/data_sync.md +149 -16
- package/dist/agentic/guides/modules/design_system.md +102 -0
- package/dist/agentic/guides/modules/dictionaries.md +107 -12
- package/dist/agentic/guides/modules/directory.md +148 -15
- package/dist/agentic/guides/modules/entities.md +145 -13
- package/dist/agentic/guides/modules/events.md +59 -2
- package/dist/agentic/guides/modules/feature_toggles.md +119 -9
- package/dist/agentic/guides/modules/gateway_stripe.md +92 -4
- package/dist/agentic/guides/modules/generators.md +45 -2
- package/dist/agentic/guides/modules/inbox_ops.md +207 -27
- package/dist/agentic/guides/modules/integrations.md +149 -16
- package/dist/agentic/guides/modules/messages.md +223 -24
- package/dist/agentic/guides/modules/notifications.md +96 -8
- package/dist/agentic/guides/modules/onboarding.md +77 -6
- package/dist/agentic/guides/modules/payment_gateways.md +168 -21
- package/dist/agentic/guides/modules/perspectives.md +77 -7
- package/dist/agentic/guides/modules/planner.md +136 -18
- package/dist/agentic/guides/modules/portal.md +93 -2
- package/dist/agentic/guides/modules/progress.md +104 -14
- package/dist/agentic/guides/modules/query_index.md +154 -15
- package/dist/agentic/guides/modules/record_locks.md +206 -21
- package/dist/agentic/guides/modules/resources.md +197 -30
- package/dist/agentic/guides/modules/sales.md +687 -84
- package/dist/agentic/guides/modules/scheduler.md +133 -14
- package/dist/agentic/guides/modules/search.md +170 -6
- package/dist/agentic/guides/modules/security.md +294 -35
- package/dist/agentic/guides/modules/shipping_carriers.md +134 -18
- package/dist/agentic/guides/modules/sso.md +151 -26
- package/dist/agentic/guides/modules/staff.md +372 -57
- package/dist/agentic/guides/modules/storage_s3.md +95 -5
- package/dist/agentic/guides/modules/sync_akeneo.md +85 -3
- package/dist/agentic/guides/modules/sync_excel.md +75 -6
- package/dist/agentic/guides/modules/system_status_overlays.md +60 -2
- package/dist/agentic/guides/modules/translations.md +104 -10
- package/dist/agentic/guides/modules/webhooks.md +203 -24
- package/dist/agentic/guides/modules/wms.md +469 -47
- package/dist/agentic/guides/modules/workflows.md +302 -43
- package/dist/agentic/guides/reference-module-facts.json +6942 -0
- package/dist/agentic/guides/reference-modules/example.md +462 -0
- package/dist/agentic/guides/spec-delivery.md +56 -0
- package/dist/agentic/guides/testing-debugging.md +80 -0
- package/dist/agentic/guides/upstream/AGENTS.md +300 -0
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +334 -0
- package/dist/agentic/guides/upstream/manifest.json +8 -0
- package/dist/agentic/shared/AGENTS.md.template +120 -311
- package/dist/agentic/shared/ai/agentic.config.json +2 -0
- package/dist/agentic/shared/ai/harness/README.md +50 -0
- package/dist/agentic/shared/ai/harness/RELEASE.md +59 -0
- package/dist/agentic/shared/ai/harness/cases.json +20596 -0
- package/dist/agentic/shared/ai/harness/cases.schema.json +196 -0
- package/dist/agentic/shared/ai/harness/design-system-inventory.json +6326 -0
- package/dist/agentic/shared/ai/harness/fixtures/index.json +51 -0
- package/dist/agentic/shared/ai/harness/fixtures/seeds.json +166 -0
- package/dist/agentic/shared/ai/harness/generated-code-review-policy.md +21 -0
- package/dist/agentic/shared/ai/harness/generated-code-review-response.schema.json +96 -0
- package/dist/agentic/shared/ai/harness/generated-code-review-result.schema.json +172 -0
- package/dist/agentic/shared/ai/harness/knowledge-change.schema.json +228 -0
- package/dist/agentic/shared/ai/harness/release-matrix.json +163 -0
- package/dist/agentic/shared/ai/harness/release-result.schema.json +219 -0
- package/dist/agentic/shared/ai/harness/result.schema.json +136 -0
- package/dist/agentic/shared/ai/harness/routing-response.schema.json +22 -0
- package/dist/agentic/shared/ai/harness/source-link-inventory.json +1706 -0
- package/dist/agentic/shared/ai/harness/target-validation-result.schema.json +73 -0
- package/dist/agentic/shared/ai/harness/validators.json +82 -0
- package/dist/agentic/shared/ai/harness/writable-ast-oracles.mjs +2121 -0
- package/dist/agentic/shared/ai/harness/writable-behavior-oracles.mjs +1096 -0
- package/dist/agentic/shared/ai/harness/writable-spec-oracles.mjs +602 -0
- package/dist/agentic/shared/ai/lessons/_template.md +16 -0
- package/dist/agentic/shared/ai/lessons.md +26 -3
- package/dist/agentic/shared/ai/review-checklist.md +36 -0
- package/dist/agentic/shared/ai/skills/om-auto-implement-spec/SKILL.md +21 -0
- package/dist/agentic/shared/ai/skills/om-auto-review-pr/SKILL.md +4 -0
- package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.6.6-to-0.6.7/SKILL.md +98 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/SKILL.md +21 -241
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/crud-surfaces.md +31 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/frontend-and-design-system.md +53 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/page-and-navigation.md +15 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/quality-states.md +11 -0
- package/dist/agentic/shared/ai/skills/om-build-workflow/SKILL.md +30 -0
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/activity-contracts.md +12 -0
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/durability-and-progress.md +13 -0
- package/dist/agentic/shared/ai/skills/om-build-workflow/references/workflow-design.md +14 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/SKILL.md +28 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/attachments-and-overrides.md +12 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/module-agents-and-tools.md +22 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/orchestrator-agents.md +12 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/surface-selector.md +19 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/SKILL.md +17 -601
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/integrity-and-concurrency.md +21 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/migration-workflow.md +15 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/schema-design.md +16 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/sensitive-data.md +10 -0
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/SKILL.md +15 -310
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/references/decision-and-procedure.md +19 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/SKILL.md +31 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-template.md +100 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-workflow.md +16 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/knowledge-change.md +133 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/owner-selection.md +17 -0
- package/dist/agentic/shared/ai/skills/om-framework-context/SKILL.md +25 -0
- package/dist/agentic/shared/ai/skills/om-framework-context/references/resolver-procedure.md +11 -0
- package/dist/agentic/shared/ai/skills/om-framework-context/references/skew-and-escalation.md +13 -0
- package/dist/agentic/shared/ai/skills/om-help/SKILL.md +15 -97
- package/dist/agentic/shared/ai/skills/om-help/references/delivery-workflows.md +18 -0
- package/dist/agentic/shared/ai/skills/om-help/references/task-families.md +20 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/SKILL.md +33 -152
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/phases-and-gates.md +33 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/planning-and-progress.md +40 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/report-templates.md +27 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/references/spec-resolution.md +24 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/SKILL.md +25 -708
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/package-and-activation.md +16 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/provider-families.md +25 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/security-and-reliability.md +15 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/sync-and-files.md +12 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/SKILL.md +34 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/agents/openai.yaml +4 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/agentic-setup.md +11 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/input-normalization.md +31 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/judge-workflow.md +39 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/report-template.md +43 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/rules.md +11 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/SKILL.md +20 -820
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/api-and-domain.md +32 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/business-one-shot-blueprints.md +172 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/data-and-migrations.md +14 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/discovery-surface-catalog.md +83 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/module-surfaces.md +40 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/planning.md +11 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/runtime-cache-and-queues.md +22 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/verification.md +13 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/SKILL.md +41 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/agentic-setup.md +19 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/bundle-preparation.md +44 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/consent-and-review.md +39 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/publication.md +20 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/report-templates.md +57 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/rules.md +11 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +486 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/SKILL.md +20 -843
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-branches.md +42 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/mechanism-selector.md +27 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/read-write-roundtrip.md +13 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +43 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/verification.md +11 -0
- package/dist/agentic/shared/ai/skills/om-trim-unused-modules/SKILL.md +15 -63
- package/dist/agentic/shared/ai/skills/om-trim-unused-modules/references/dependency-and-redirect.md +15 -0
- package/dist/agentic/shared/ai/skills/om-troubleshooter/SKILL.md +17 -467
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/diagnosis-map.md +29 -0
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/regression-oracles.md +14 -0
- package/dist/agentic/shared/ai/skills/tiers.json +143 -21
- package/dist/agentic/shared/ai/skills/tiers.schema.json +52 -40
- package/dist/agentic/shared/ai/specs/2026-08-06-reference-module-activation.md +248 -0
- package/dist/agentic/shared/ai/specs/README.md +4 -3
- package/dist/agentic/shared/ai/specs/SPEC-000-template.md +226 -10
- package/dist/agentic/shared/ai/trackers/github.md +108 -4
- package/dist/agentic/shared/scripts/agent-harness-tool-server.mjs +224 -0
- package/dist/agentic/shared/scripts/check-lessons.mjs +178 -0
- package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +3812 -0
- package/dist/agentic/shared/scripts/execution-sandbox.mjs +329 -0
- package/dist/agentic/shared/scripts/framework-context.mjs +888 -0
- package/dist/agentic/shared/scripts/install-skills.mjs +1029 -0
- package/dist/agentic/shared/scripts/install-skills.sh +4 -694
- package/dist/agentic/shared/scripts/prepare-agent-harness-fixture.mjs +222 -0
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +1774 -0
- package/dist/agentic/shared/scripts/validate-knowledge-change.mjs +1172 -0
- package/dist/bin.js +32 -34
- package/dist/bin.js.map +2 -2
- package/dist/lib/__integration__/TC-INT-008.spec.js +88 -8
- package/dist/lib/__integration__/TC-INT-008.spec.js.map +2 -2
- package/dist/lib/agentic-init.js +13 -3
- package/dist/lib/agentic-init.js.map +2 -2
- package/dist/lib/agentic-setup.js +434 -186
- package/dist/lib/agentic-setup.js.map +2 -2
- package/dist/lib/cli-bootstrap-mode.js +32 -0
- package/dist/lib/cli-bootstrap-mode.js.map +7 -0
- package/dist/lib/dev-supervisor-manifest.js +105 -0
- package/dist/lib/dev-supervisor-manifest.js.map +7 -0
- package/dist/lib/generate-watch-events.js +15 -0
- package/dist/lib/generate-watch-events.js.map +2 -2
- package/dist/lib/generators/entity-ids.js +11 -24
- package/dist/lib/generators/entity-ids.js.map +2 -2
- package/dist/lib/generators/extensions/injection-widgets.js +20 -0
- package/dist/lib/generators/extensions/injection-widgets.js.map +2 -2
- package/dist/lib/generators/module-di.js +10 -23
- package/dist/lib/generators/module-di.js.map +2 -2
- package/dist/lib/generators/module-entities.js +10 -23
- package/dist/lib/generators/module-entities.js.map +2 -2
- package/dist/lib/generators/module-extension-facts.js +1882 -0
- package/dist/lib/generators/module-extension-facts.js.map +7 -0
- package/dist/lib/generators/module-fact-sources.js +70 -0
- package/dist/lib/generators/module-fact-sources.js.map +7 -0
- package/dist/lib/generators/module-facts-discovery.js +64 -7
- package/dist/lib/generators/module-facts-discovery.js.map +2 -2
- package/dist/lib/generators/module-facts.js +1913 -52
- package/dist/lib/generators/module-facts.js.map +3 -3
- package/dist/lib/generators/module-override-targets.js +712 -0
- package/dist/lib/generators/module-override-targets.js.map +7 -0
- package/dist/lib/generators/module-registry.js +405 -36
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/generators/route-manifest-shards.js +170 -0
- package/dist/lib/generators/route-manifest-shards.js.map +7 -0
- package/dist/lib/in-process-generate-watcher.js +12 -3
- package/dist/lib/in-process-generate-watcher.js.map +2 -2
- package/dist/lib/load-env.js +24 -0
- package/dist/lib/load-env.js.map +7 -0
- package/dist/lib/queue-worker-supervisor.js.map +2 -2
- package/dist/lib/resolver.js +28 -3
- package/dist/lib/resolver.js.map +2 -2
- package/dist/lib/telemetry-init.js +358 -0
- package/dist/lib/telemetry-init.js.map +7 -0
- package/dist/lib/testing/integration.js +5 -2
- package/dist/lib/testing/integration.js.map +2 -2
- package/dist/lib/utils.js +15 -8
- package/dist/lib/utils.js.map +2 -2
- package/dist/mercato.js +35 -9
- package/dist/mercato.js.map +2 -2
- package/package.json +13 -11
- package/src/__tests__/mercato.test.ts +144 -0
- package/src/bin.ts +60 -42
- package/src/lib/__integration__/TC-INT-008.spec.ts +107 -9
- package/src/lib/__tests__/agentic-init.test.ts +41 -5
- package/src/lib/__tests__/agentic-setup.ownership.test.ts +386 -0
- package/src/lib/__tests__/cli-bootstrap-mode.test.ts +22 -0
- package/src/lib/__tests__/content-stable-writes.test.ts +74 -0
- package/src/lib/__tests__/dev-supervisor-manifest.test.ts +131 -0
- package/src/lib/__tests__/generate-watch-events.test.ts +76 -0
- package/src/lib/__tests__/in-process-generate-watcher.test.ts +52 -1
- package/src/lib/__tests__/injection-widget-id-validation.test.ts +184 -0
- package/src/lib/__tests__/load-env.test.ts +65 -0
- package/src/lib/__tests__/queue-worker-supervisor.test.ts +33 -0
- package/src/lib/__tests__/resolver.enterprise.test.ts +50 -0
- package/src/lib/__tests__/telemetry-init.test.ts +298 -0
- package/src/lib/agentic-init.ts +15 -3
- package/src/lib/agentic-setup.ts +573 -222
- package/src/lib/cli-bootstrap-mode.ts +31 -0
- package/src/lib/dev-supervisor-manifest.ts +142 -0
- package/src/lib/generate-watch-events.ts +14 -0
- package/src/lib/generators/__tests__/activation-adapter-coverage.test.ts +92 -0
- package/src/lib/generators/__tests__/entity-ids.test.ts +32 -0
- package/src/lib/generators/__tests__/helpers/override-target-diagnostic-fixtures.ts +150 -0
- package/src/lib/generators/__tests__/module-extension-activations.test.ts +762 -0
- package/src/lib/generators/__tests__/module-extension-facts.test.ts +603 -0
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +139 -2
- package/src/lib/generators/__tests__/module-facts.computed-di-token.test.ts +88 -0
- package/src/lib/generators/__tests__/module-facts.customers.fixture.test.ts +1 -0
- package/src/lib/generators/__tests__/module-facts.discovery.test.ts +54 -10
- package/src/lib/generators/__tests__/module-facts.example-fact-coverage.test.ts +414 -0
- package/src/lib/generators/__tests__/module-facts.extension-hosts.test.ts +108 -0
- package/src/lib/generators/__tests__/module-facts.local-reference.test.ts +393 -0
- package/src/lib/generators/__tests__/module-facts.owned-contracts.test.ts +561 -0
- package/src/lib/generators/__tests__/module-facts.search-entity-id.test.ts +151 -0
- package/src/lib/generators/__tests__/module-facts.source-links.test.ts +160 -0
- package/src/lib/generators/__tests__/module-override-targets.diagnostic-wiring.test.ts +92 -0
- package/src/lib/generators/__tests__/module-override-targets.roundtrip.test.ts +149 -0
- package/src/lib/generators/__tests__/module-override-targets.test.ts +328 -0
- package/src/lib/generators/__tests__/module-override-targets.unknown-mode.test.ts +117 -0
- package/src/lib/generators/__tests__/module-subset.test.ts +266 -0
- package/src/lib/generators/__tests__/output-snapshots.test.ts +3 -3
- package/src/lib/generators/__tests__/route-manifest-shards.test.ts +62 -0
- package/src/lib/generators/entity-ids.ts +10 -26
- package/src/lib/generators/extensions/injection-widgets.ts +51 -0
- package/src/lib/generators/module-di.ts +9 -25
- package/src/lib/generators/module-entities.ts +9 -25
- package/src/lib/generators/module-extension-facts.ts +2472 -0
- package/src/lib/generators/module-fact-sources.ts +108 -0
- package/src/lib/generators/module-facts-discovery.ts +104 -7
- package/src/lib/generators/module-facts.ts +2747 -138
- package/src/lib/generators/module-override-targets.ts +907 -0
- package/src/lib/generators/module-registry.ts +448 -35
- package/src/lib/generators/route-manifest-shards.ts +146 -0
- package/src/lib/in-process-generate-watcher.ts +13 -4
- package/src/lib/load-env.ts +30 -0
- package/src/lib/queue-worker-supervisor.ts +7 -2
- package/src/lib/resolver.ts +34 -3
- package/src/lib/telemetry-init.ts +461 -0
- package/src/lib/testing/__tests__/integration.test.ts +4 -0
- package/src/lib/testing/integration.ts +5 -2
- package/src/lib/utils.ts +24 -16
- package/src/mercato.ts +46 -9
- package/dist/agentic/guides/cache.md +0 -45
- package/dist/agentic/guides/core.md +0 -453
- package/dist/agentic/guides/events.md +0 -117
- package/dist/agentic/guides/queue.md +0 -53
- package/dist/agentic/guides/search.md +0 -115
- package/dist/agentic/guides/shared.md +0 -108
- package/dist/agentic/guides/ui.md +0 -347
- package/dist/agentic/shared/ai/skills/om-auto-continue-pr-loop/SKILL.md +0 -27
- package/dist/agentic/shared/ai/skills/om-auto-create-pr-loop/SKILL.md +0 -27
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/ui-components.md +0 -260
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/mikro-orm-cheatsheet.md +0 -146
- package/dist/agentic/shared/ai/skills/om-help/references/skills-catalog.md +0 -84
- package/dist/agentic/shared/ai/skills/om-help/references/workflow-sequences.md +0 -193
- package/dist/agentic/shared/ai/skills/om-integration-builder/STANDALONE.md +0 -34
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/adapter-contracts.md +0 -762
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/naming-conventions.md +0 -50
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/navigation-patterns.md +0 -97
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-contracts.md +0 -271
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/diagnostic-commands.md +0 -101
|
@@ -3,30 +3,146 @@
|
|
|
3
3
|
"default": ["core"],
|
|
4
4
|
"external": {
|
|
5
5
|
"source": "open-mercato/skills",
|
|
6
|
-
"
|
|
6
|
+
"ref": "c6103c034571f3610323a1b53d97c81abe110b58",
|
|
7
|
+
"description": "Tier-selected delivery workflows installed at an exact tested collection commit. Same-name folders under .ai/skills are repo-local overrides and never replace these copies.",
|
|
8
|
+
"tiers": {
|
|
9
|
+
"core": {
|
|
10
|
+
"description": "Smallest dependency-closed set for daily standalone delivery.",
|
|
11
|
+
"skills": [
|
|
12
|
+
"om-spec-writing",
|
|
13
|
+
"om-code-review",
|
|
14
|
+
"om-integration-tests",
|
|
15
|
+
"om-prepare-test-env",
|
|
16
|
+
"om-auto-create-pr",
|
|
17
|
+
"om-auto-continue-pr",
|
|
18
|
+
"om-auto-review-pr",
|
|
19
|
+
"om-auto-implement-spec",
|
|
20
|
+
"om-auto-qa-pr",
|
|
21
|
+
"om-auto-fix-issue",
|
|
22
|
+
"om-verify-in-repo",
|
|
23
|
+
"om-root-cause",
|
|
24
|
+
"om-fix",
|
|
25
|
+
"om-open-pr",
|
|
26
|
+
"om-setup-agent-pipeline"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"automation": {
|
|
30
|
+
"description": "Opt-in loop engines, issue authoring, and release-upgrade maintenance.",
|
|
31
|
+
"skills": [
|
|
32
|
+
"om-apply-upgrade-notes",
|
|
33
|
+
"om-auto-create-pr-loop",
|
|
34
|
+
"om-auto-continue-pr-loop",
|
|
35
|
+
"om-auto-write-spec",
|
|
36
|
+
"om-prepare-issue"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
7
40
|
"skills": [
|
|
41
|
+
"om-spec-writing",
|
|
42
|
+
"om-code-review",
|
|
43
|
+
"om-integration-tests",
|
|
44
|
+
"om-prepare-test-env",
|
|
8
45
|
"om-apply-upgrade-notes",
|
|
9
|
-
"om-auto-continue-pr",
|
|
10
|
-
"om-auto-continue-pr-loop",
|
|
11
46
|
"om-auto-create-pr",
|
|
47
|
+
"om-auto-continue-pr",
|
|
12
48
|
"om-auto-create-pr-loop",
|
|
13
|
-
"om-auto-
|
|
49
|
+
"om-auto-continue-pr-loop",
|
|
14
50
|
"om-auto-review-pr",
|
|
15
|
-
"om-
|
|
16
|
-
"om-
|
|
17
|
-
"om-
|
|
18
|
-
"om-
|
|
51
|
+
"om-auto-implement-spec",
|
|
52
|
+
"om-auto-write-spec",
|
|
53
|
+
"om-auto-qa-pr",
|
|
54
|
+
"om-auto-fix-issue",
|
|
19
55
|
"om-prepare-issue",
|
|
20
|
-
"om-
|
|
56
|
+
"om-verify-in-repo",
|
|
21
57
|
"om-root-cause",
|
|
22
|
-
"om-
|
|
23
|
-
"om-
|
|
24
|
-
"om-
|
|
25
|
-
]
|
|
58
|
+
"om-fix",
|
|
59
|
+
"om-open-pr",
|
|
60
|
+
"om-setup-agent-pipeline"
|
|
61
|
+
],
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"om-spec-writing": [],
|
|
64
|
+
"om-code-review": ["om-setup-agent-pipeline"],
|
|
65
|
+
"om-integration-tests": ["om-prepare-test-env"],
|
|
66
|
+
"om-prepare-test-env": [],
|
|
67
|
+
"om-apply-upgrade-notes": ["om-setup-agent-pipeline"],
|
|
68
|
+
"om-auto-create-pr": ["om-auto-review-pr", "om-setup-agent-pipeline"],
|
|
69
|
+
"om-auto-continue-pr": ["om-auto-review-pr", "om-setup-agent-pipeline"],
|
|
70
|
+
"om-auto-create-pr-loop": [
|
|
71
|
+
"om-auto-continue-pr-loop",
|
|
72
|
+
"om-auto-review-pr",
|
|
73
|
+
"om-integration-tests",
|
|
74
|
+
"om-setup-agent-pipeline"
|
|
75
|
+
],
|
|
76
|
+
"om-auto-continue-pr-loop": [
|
|
77
|
+
"om-auto-review-pr",
|
|
78
|
+
"om-integration-tests",
|
|
79
|
+
"om-open-pr",
|
|
80
|
+
"om-setup-agent-pipeline"
|
|
81
|
+
],
|
|
82
|
+
"om-auto-review-pr": ["om-code-review", "om-setup-agent-pipeline"],
|
|
83
|
+
"om-auto-implement-spec": [
|
|
84
|
+
"om-auto-create-pr",
|
|
85
|
+
"om-auto-continue-pr",
|
|
86
|
+
"om-auto-review-pr",
|
|
87
|
+
"om-auto-qa-pr",
|
|
88
|
+
"om-setup-agent-pipeline"
|
|
89
|
+
],
|
|
90
|
+
"om-auto-qa-pr": [
|
|
91
|
+
"om-auto-review-pr",
|
|
92
|
+
"om-integration-tests",
|
|
93
|
+
"om-prepare-test-env",
|
|
94
|
+
"om-setup-agent-pipeline"
|
|
95
|
+
],
|
|
96
|
+
"om-auto-write-spec": ["om-spec-writing", "om-open-pr", "om-setup-agent-pipeline"],
|
|
97
|
+
"om-auto-fix-issue": [
|
|
98
|
+
"om-auto-implement-spec",
|
|
99
|
+
"om-auto-qa-pr",
|
|
100
|
+
"om-auto-review-pr",
|
|
101
|
+
"om-verify-in-repo",
|
|
102
|
+
"om-root-cause",
|
|
103
|
+
"om-fix",
|
|
104
|
+
"om-open-pr",
|
|
105
|
+
"om-setup-agent-pipeline"
|
|
106
|
+
],
|
|
107
|
+
"om-prepare-issue": [
|
|
108
|
+
"om-auto-write-spec",
|
|
109
|
+
"om-auto-fix-issue",
|
|
110
|
+
"om-auto-implement-spec",
|
|
111
|
+
"om-spec-writing",
|
|
112
|
+
"om-setup-agent-pipeline"
|
|
113
|
+
],
|
|
114
|
+
"om-verify-in-repo": ["om-setup-agent-pipeline"],
|
|
115
|
+
"om-root-cause": ["om-setup-agent-pipeline"],
|
|
116
|
+
"om-fix": ["om-setup-agent-pipeline"],
|
|
117
|
+
"om-open-pr": ["om-setup-agent-pipeline"],
|
|
118
|
+
"om-setup-agent-pipeline": []
|
|
119
|
+
},
|
|
120
|
+
"contentHashes": {
|
|
121
|
+
"om-spec-writing": "sha256:80d5def47ff844748b1c7407cae8b8ee8588ccdfaee54022e15de885d59fa398",
|
|
122
|
+
"om-code-review": "sha256:f4503da210e6e5eb7d79a0972d3922a2888d8aed93e98a1bb73091c0dc2a750e",
|
|
123
|
+
"om-integration-tests": "sha256:a1385dbb9fe11fe8c7a16dbe8576e44b9e03f34254e5575955d5a6ea862ee741",
|
|
124
|
+
"om-prepare-test-env": "sha256:ccfeb9accfffeaf35423576aacc08c9a6e3d3b07ecf8f72da694878fb3a571ab",
|
|
125
|
+
"om-apply-upgrade-notes": "sha256:15d4166a9229ebe15365ad3ef50919443478ef5f4c1f2e7cccbf1b8a61482d0d",
|
|
126
|
+
"om-auto-create-pr": "sha256:fe5a8ff632234c74cd1b948dfa2f69bf79683df067d3b8bc116d7a954d017138",
|
|
127
|
+
"om-auto-continue-pr": "sha256:ced195e0e571672188b34322a9c215df225a9a1822e1db27f6b864b01624e66e",
|
|
128
|
+
"om-auto-create-pr-loop": "sha256:0e7c015705a89e623c4f6865901121404feb1f443e0e096facb2a337ad9d33a5",
|
|
129
|
+
"om-auto-continue-pr-loop": "sha256:2997eb7cbf131e1b88abf05ad930e793675c3cd1db1fece18438ec21b327c6ef",
|
|
130
|
+
"om-auto-review-pr": "sha256:c05b3f45de9563faa0561a3a12129f4fda8bb1780f60d1cdcce7383e75e2d1c5",
|
|
131
|
+
"om-auto-implement-spec": "sha256:f5408771aa3765c9c8f2709f5d17247d9b8fef19fd2461c2fedf25c90bb8cda7",
|
|
132
|
+
"om-auto-write-spec": "sha256:b0d79e189fef7f5c03540becda01d933f5153e39276988f58f9c1dd81e9887f7",
|
|
133
|
+
"om-auto-qa-pr": "sha256:bff71bf4020a1e92b56a17f35f9c63c5f8f942e95048d5bbdf5589443c2cbda9",
|
|
134
|
+
"om-auto-fix-issue": "sha256:8ca990752fc1e73f2a70902d567b94da6c74b15f4e409410aa27ba09b1506521",
|
|
135
|
+
"om-prepare-issue": "sha256:07dd578b00902e65abb408e233688675cc92d6783af1a43257ebfd2d5be34663",
|
|
136
|
+
"om-verify-in-repo": "sha256:2fcf67187b129261aeb59b53c8058e95eb91c1f3c0314756ff5f432a34c43a62",
|
|
137
|
+
"om-root-cause": "sha256:7c14fd6388ff72c8bb058de905264899b7ee9797bb4985b1891ec2da0ec1c815",
|
|
138
|
+
"om-fix": "sha256:c9eb58f7834026c13f2533ae6fc4987d32a0e3cec1fd7b220b47d7154ee6e804",
|
|
139
|
+
"om-open-pr": "sha256:18ef43308dd3e5aff2099b38779cb7447ae26b754d31e18a0f49f857bafdcba7",
|
|
140
|
+
"om-setup-agent-pipeline": "sha256:6f906df68194af5ef4d40ccaf6f4335d44f45ddcffa6e1f36331291ac90377c8"
|
|
141
|
+
}
|
|
26
142
|
},
|
|
27
143
|
"tiers": {
|
|
28
144
|
"core": {
|
|
29
|
-
"description": "Daily
|
|
145
|
+
"description": "Daily standalone architecture, implementation, extension, debugging, and harness-maintenance skills.",
|
|
30
146
|
"skills": [
|
|
31
147
|
"om-help",
|
|
32
148
|
"om-implement-spec",
|
|
@@ -34,21 +150,27 @@
|
|
|
34
150
|
"om-module-scaffold",
|
|
35
151
|
"om-data-model-design",
|
|
36
152
|
"om-system-extension",
|
|
153
|
+
"om-integration-builder",
|
|
154
|
+
"om-create-ai-agent",
|
|
155
|
+
"om-build-workflow",
|
|
37
156
|
"om-troubleshooter",
|
|
157
|
+
"om-framework-context",
|
|
158
|
+
"om-evolve-harness",
|
|
159
|
+
"om-judge-agent-session",
|
|
160
|
+
"om-share-this-session",
|
|
38
161
|
"om-eject-and-customize"
|
|
39
162
|
]
|
|
40
163
|
},
|
|
41
164
|
"automation": {
|
|
42
|
-
"description": "
|
|
165
|
+
"description": "Optional advanced delivery workflows and module-footprint maintenance.",
|
|
43
166
|
"skills": ["om-trim-unused-modules"]
|
|
44
167
|
},
|
|
45
|
-
"infra": {
|
|
46
|
-
"description": "Rare, special-case skills.",
|
|
47
|
-
"skills": ["om-integration-builder"]
|
|
48
|
-
},
|
|
49
168
|
"migration": {
|
|
50
|
-
"description": "One-shot, version-pinned migrations. Install only
|
|
51
|
-
"skills": [
|
|
169
|
+
"description": "One-shot, version-pinned migrations. Install only for the named upgrade.",
|
|
170
|
+
"skills": [
|
|
171
|
+
"om-auto-upgrade-0.4.10-to-0.5.0",
|
|
172
|
+
"om-auto-upgrade-0.6.6-to-0.6.7"
|
|
173
|
+
]
|
|
52
174
|
}
|
|
53
175
|
}
|
|
54
176
|
}
|
|
@@ -1,88 +1,100 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://open-mercato.dev/schemas/skills/tiers.schema.json",
|
|
4
|
-
"title": "Open Mercato
|
|
5
|
-
"description": "Manifest mapping skill folders under .ai/skills/ to install tiers consumed by scripts/install-skills.sh.",
|
|
4
|
+
"title": "Standalone Open Mercato skill manifest",
|
|
6
5
|
"type": "object",
|
|
7
6
|
"additionalProperties": false,
|
|
8
|
-
"required": ["default", "tiers"],
|
|
7
|
+
"required": ["default", "external", "tiers"],
|
|
9
8
|
"properties": {
|
|
10
|
-
"$schema": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
9
|
+
"$schema": { "type": "string" },
|
|
13
10
|
"default": {
|
|
14
11
|
"type": "array",
|
|
15
12
|
"minItems": 1,
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"minLength": 1
|
|
19
|
-
},
|
|
20
|
-
"description": "Tier names installed when install-skills.sh is invoked with no flags."
|
|
13
|
+
"uniqueItems": true,
|
|
14
|
+
"items": { "$ref": "#/$defs/tierName" }
|
|
21
15
|
},
|
|
22
16
|
"agents": {
|
|
23
17
|
"type": "object",
|
|
24
18
|
"additionalProperties": false,
|
|
25
|
-
"description": "Agent harness settings for install-skills.sh. Skills always install into the canonical .agents/skills/ directory; per-agent symlinks are created only for agents that cannot read it.",
|
|
26
19
|
"properties": {
|
|
27
20
|
"ignore": {
|
|
28
21
|
"type": "array",
|
|
29
|
-
"
|
|
30
|
-
"items": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"enum": ["claude-code", "codex", "cursor"]
|
|
33
|
-
}
|
|
22
|
+
"uniqueItems": true,
|
|
23
|
+
"items": { "enum": ["claude-code", "codex", "cursor"] }
|
|
34
24
|
}
|
|
35
25
|
}
|
|
36
26
|
},
|
|
37
27
|
"external": {
|
|
38
28
|
"type": "object",
|
|
39
29
|
"additionalProperties": false,
|
|
40
|
-
"required": ["source", "skills"],
|
|
41
|
-
"description": "Skills owned by an external collection and installed via `npx skills add` instead of local symlinks. Folders under .ai/skills/ matching these names are repo-local overrides, not installable skills.",
|
|
30
|
+
"required": ["source", "ref", "tiers", "skills", "dependencies", "contentHashes"],
|
|
42
31
|
"properties": {
|
|
43
|
-
"source": {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
32
|
+
"source": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
|
33
|
+
"ref": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
34
|
+
"description": { "type": "string" },
|
|
35
|
+
"tiers": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"minProperties": 1,
|
|
38
|
+
"propertyNames": { "$ref": "#/$defs/tierName" },
|
|
39
|
+
"additionalProperties": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["description", "skills"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"description": { "type": "string", "minLength": 1 },
|
|
45
|
+
"skills": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"uniqueItems": true,
|
|
49
|
+
"items": { "$ref": "#/$defs/skillName" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
50
53
|
},
|
|
51
54
|
"skills": {
|
|
52
55
|
"type": "array",
|
|
53
56
|
"minItems": 1,
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
"uniqueItems": true,
|
|
58
|
+
"items": { "$ref": "#/$defs/skillName" }
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"propertyNames": { "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
63
|
+
"additionalProperties": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"uniqueItems": true,
|
|
66
|
+
"items": { "$ref": "#/$defs/skillName" }
|
|
57
67
|
}
|
|
68
|
+
},
|
|
69
|
+
"contentHashes": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"propertyNames": { "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
72
|
+
"additionalProperties": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
58
73
|
}
|
|
59
74
|
}
|
|
60
75
|
},
|
|
61
76
|
"tiers": {
|
|
62
77
|
"type": "object",
|
|
63
78
|
"minProperties": 1,
|
|
64
|
-
"propertyNames": {
|
|
65
|
-
"pattern": "^[a-z][a-z0-9-]*$"
|
|
66
|
-
},
|
|
79
|
+
"propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" },
|
|
67
80
|
"additionalProperties": {
|
|
68
81
|
"type": "object",
|
|
69
82
|
"additionalProperties": false,
|
|
70
83
|
"required": ["description", "skills"],
|
|
71
84
|
"properties": {
|
|
72
|
-
"description": {
|
|
73
|
-
"type": "string",
|
|
74
|
-
"minLength": 1
|
|
75
|
-
},
|
|
85
|
+
"description": { "type": "string", "minLength": 1 },
|
|
76
86
|
"skills": {
|
|
77
87
|
"type": "array",
|
|
78
88
|
"minItems": 1,
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
82
|
-
}
|
|
89
|
+
"uniqueItems": true,
|
|
90
|
+
"items": { "$ref": "#/$defs/skillName" }
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
93
|
}
|
|
86
94
|
}
|
|
95
|
+
},
|
|
96
|
+
"$defs": {
|
|
97
|
+
"skillName": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
98
|
+
"tierName": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }
|
|
87
99
|
}
|
|
88
100
|
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Reference Module Activation
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-08-06
|
|
4
|
+
**Status**: Draft
|
|
5
|
+
|
|
6
|
+
> Shipped with the scaffold. This is the covering specification for turning on the two reference modules this app already contains in source: the canonical `example` module and the installed `design_system` gallery. Requests to enable the Todo demo, expose the design-system gallery, or build the first app capability on top of either one are covered here — amend this file instead of writing a second specification.
|
|
7
|
+
|
|
8
|
+
## TLDR
|
|
9
|
+
|
|
10
|
+
Every generated app ships `src/modules/example` in source and packs the installed design-system gallery, and registers neither. Activation is a deliberate, reversible app decision rather than a default, because an enabled reference module adds routes, navigation entries, migrations, seeds, ACL features, workers, and search indexes that a production app has not asked for. This specification owns that opt-in: what activation changes, who may see the activated surfaces, how the two modules stay independent of each other, and what has to be green before either one is enabled outside a development environment.
|
|
11
|
+
|
|
12
|
+
## Problem Statement
|
|
13
|
+
|
|
14
|
+
A new team reads `src/modules/example`, decides the Todo slice is close enough to the capability they need, and turns it on by adding it to `src/modules.ts`. Nothing warns them that the module was designed as a teaching reference: its ACL features grant a demo surface, its seeds create demo records, its migrations create tables the product will never use, and its navigation entries appear next to real ones. The design-system gallery has the same shape — it is genuinely useful to a design team and genuinely inappropriate as a customer-facing route. Without a written contract, each app rediscovers the consequences after the fact, usually in staging, and the resulting "turn it back off" work has to unpick migrations and seeded rows rather than a single registry line. This document exists so the decision is made once, with the consequences visible before the registry changes.
|
|
15
|
+
|
|
16
|
+
## Overview and Success Measures
|
|
17
|
+
|
|
18
|
+
- **Primary outcome:** a team can enable either reference module, or build on it, without discovering an unintended route, grant, or seeded record afterwards.
|
|
19
|
+
- **Leading indicators:** the activation checklist below is completed in the pull request that changes `src/modules.ts`.
|
|
20
|
+
- **Baseline:** both modules are source-present and runtime-absent in every preset shipped by `create-mercato-app`.
|
|
21
|
+
- **Market / product reference:** the Open Mercato monorepo runs the same two modules enabled, which is why their source is trustworthy as a reference and misleading as a default.
|
|
22
|
+
|
|
23
|
+
## Goals
|
|
24
|
+
|
|
25
|
+
- **REQ-001** — Enabling `example` is a single reviewable registry change whose runtime consequences are enumerated in advance.
|
|
26
|
+
- **REQ-002** — Enabling `design_system` exposes `/backend/design-system` only to holders of `design_system.view`, and never to an unauthenticated or customer-facing surface.
|
|
27
|
+
- **REQ-003** — Neither reference module gains a runtime dependency on the other, in either direction, when one or both are enabled.
|
|
28
|
+
- **REQ-004** — Deactivation is reversible: removing the registry entry removes every route, navigation entry, worker, and grant, leaving only the data the migrations created.
|
|
29
|
+
|
|
30
|
+
## Non-goals
|
|
31
|
+
|
|
32
|
+
- Copying either reference module into a new module ID. That is new-capability work: route it through `om-module-scaffold`, which reads this app's `src/modules/example` as read-only reference source.
|
|
33
|
+
- Editing anything inside `src/modules/example`. The tree is immutable reference context; app behavior belongs in an app-owned module.
|
|
34
|
+
- Shipping either module enabled by default in a preset. Presets stay source-present and runtime-absent.
|
|
35
|
+
|
|
36
|
+
## Proposed Solution
|
|
37
|
+
|
|
38
|
+
Activation is registration plus the generation and migration steps registration implies, in that order, followed by the grants that make the new surfaces reachable. The registry entry in `src/modules.ts` is the only switch; everything else is derived from it by `yarn generate`, so the review surface stays one line and the consequences stay mechanical. The two modules are registered independently: an app may want the gallery for its designers and no Todo demo at all, which is the common case, and the reverse holds while a team is learning the module contracts. Because activation creates database objects, the specification treats "enabled in development" and "enabled in a deployed environment" as two separate decisions with two separate exit gates.
|
|
39
|
+
|
|
40
|
+
### Design Decisions and Alternatives
|
|
41
|
+
|
|
42
|
+
| Decision | Rationale | Alternative considered | Why rejected / deferred |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| Registration is the single switch | Keeps the reviewable surface to one line and lets generation derive everything else | An `OM_EXAMPLE_ENABLED` environment flag | A flag leaves the module registered, so routes and grants exist even when the flag is off |
|
|
45
|
+
| The two modules activate independently | A design team wants the gallery without the Todo demo far more often than both | One combined "reference modules" switch | Couples two unrelated decisions and creates a dependency edge the modules do not have |
|
|
46
|
+
| Deactivation leaves migrated tables in place | Dropping tables on a registry change would be an unreviewable data loss | Reverting migrations automatically | Destroys data on a change that reads as configuration |
|
|
47
|
+
|
|
48
|
+
## Domain Vocabulary and Business Rules
|
|
49
|
+
|
|
50
|
+
| Term / invariant | Precise meaning or rule | Source of truth | Failure behavior |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| source-present | The module's files exist under `src/modules/` or in an installed package, and the module is not registered | the filesystem | no runtime effect of any kind |
|
|
53
|
+
| activated | The module ID appears in `src/modules.ts` and generation has run | `src/modules.ts` | routes, nav, ACL, workers and migrations become live |
|
|
54
|
+
| reference immutability | No app change may write under `src/modules/example` | this specification | the change belongs in an app-owned module instead |
|
|
55
|
+
| module independence | `example` and `design_system` never import each other at runtime | import graph | a dependency edge in either direction is a defect |
|
|
56
|
+
|
|
57
|
+
## Users, Permissions, and Scope
|
|
58
|
+
|
|
59
|
+
| Actor | Allowed outcomes | Scope rule | Required feature IDs |
|
|
60
|
+
|---|---|---|---|
|
|
61
|
+
| developer | activate either module locally, read the example source | own workstation | none |
|
|
62
|
+
| administrator | grant the activated features to a role | organization | `example.view`, `example.manage` |
|
|
63
|
+
| designer | open the gallery once activated | organization | `design_system.view` |
|
|
64
|
+
|
|
65
|
+
Trusted `tenantId` and `organizationId` come from the authenticated session as they do for every other module; activation introduces no new scope derivation. No activated reference surface performs a system-scope operation.
|
|
66
|
+
|
|
67
|
+
## Reuse and Ownership Map
|
|
68
|
+
|
|
69
|
+
| Capability | Reuse / extend / app-own | Existing module or new module | Integration seam | Why |
|
|
70
|
+
|---|---|---|---|---|
|
|
71
|
+
| Todo CRUD reference | reuse read-only | `example` | read the source, do not register it in production | it is a teaching surface, not a product capability |
|
|
72
|
+
| Component gallery | reuse as-is | `design_system` | activate behind `design_system.view` | it is genuinely useful internally and inappropriate publicly |
|
|
73
|
+
| First app capability | app-own | a new module | `om-module-scaffold` starting at `src/modules/example/README.md` | app behavior belongs to the app |
|
|
74
|
+
|
|
75
|
+
## Architecture and Data Flow
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
src/modules.ts -> yarn generate -> generated registries -> routes, nav, ACL, workers
|
|
79
|
+
-> migrations -> database objects
|
|
80
|
+
-> setup hooks -> role features, defaults, opt-in examples
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- **Module boundaries:** the two reference modules own separate invariants and share no entity, event, or import.
|
|
84
|
+
- **Extension points:** an app extends the activated example through the documented widget, enricher, and event seams rather than by editing it.
|
|
85
|
+
- **Alternatives considered:** shipping the modules unregistered but with their routes pre-generated; rejected because generated output would then contradict the registry.
|
|
86
|
+
- **Compatibility:** an app that never activates either module observes no behavior change from this specification.
|
|
87
|
+
|
|
88
|
+
## User Journeys
|
|
89
|
+
|
|
90
|
+
### Journey J-001 — Activate the gallery for the design team
|
|
91
|
+
|
|
92
|
+
1. A designer asks for the component gallery.
|
|
93
|
+
2. An administrator adds `design_system` to `src/modules.ts` and runs `yarn generate` and the migration step.
|
|
94
|
+
3. `/backend/design-system` becomes reachable and appears in navigation for roles holding `design_system.view`.
|
|
95
|
+
4. A user without the feature receives a permission denial rather than an empty page, and no navigation entry is rendered for them.
|
|
96
|
+
|
|
97
|
+
### Journey J-002 — Learn the module contracts from the activated example
|
|
98
|
+
|
|
99
|
+
1. A developer activates `example` on their workstation only.
|
|
100
|
+
2. The Todo list, create and edit surfaces, the bulk operation and its progress reporting become available.
|
|
101
|
+
3. The developer reads the capability-linked source files listed in `src/modules/example/references/surface-map.md`.
|
|
102
|
+
4. The developer removes the registry entry before opening a pull request, and the surfaces disappear on the next generation.
|
|
103
|
+
|
|
104
|
+
## UI and Interaction Contracts
|
|
105
|
+
|
|
106
|
+
Both activated surfaces are shipped surfaces, so this specification adds no new page. It records their contracts so that a review can check them rather than rediscover them.
|
|
107
|
+
|
|
108
|
+
| Surface / route | Purpose and primary actions | Data source / mutations | Closest installed reference | Canonical shell / components | Required states | Requirement IDs |
|
|
109
|
+
|---|---|---|---|---|---|---|
|
|
110
|
+
| `/backend/todos` | list, create, edit, bulk complete | `/api/example/todos` | the module itself | `Page`, `PageBody`, `DataTable`, `CrudForm` | loading, empty, error, conflict, success, permission denied | REQ-001 |
|
|
111
|
+
| `/backend/design-system` | browse component families and variants | packed gallery registry | the module itself | `Page`, `PageBody` | loading, empty, permission denied | REQ-002 |
|
|
112
|
+
|
|
113
|
+
### UI architecture
|
|
114
|
+
|
|
115
|
+
| Role | Navigation groups in order | Dashboard / injected widgets | Login-to-primary-task flow |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| administrator | Example → Todos | Todo summary widget when activated | login → Todos → create, two clicks |
|
|
118
|
+
| designer | Design → Design system | none | login → Design system, one click |
|
|
119
|
+
|
|
120
|
+
| Surface / widget | Empty state guidance and action | Responsive behavior | Keyboard / focus behavior |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| `/backend/todos` | localized empty state offering create | table collapses to stacked rows | focus order follows the table, dialogs submit on Cmd/Ctrl+Enter and cancel on Escape |
|
|
123
|
+
| `/backend/design-system` | localized empty state when a family has no entry | grid reflows to one column | entries are reachable by keyboard and announce their family |
|
|
124
|
+
|
|
125
|
+
## Data Models
|
|
126
|
+
|
|
127
|
+
Activation creates the tables the reference modules' own migrations define; this specification introduces no entity of its own. The rule that matters for the decision is that those tables persist after deactivation.
|
|
128
|
+
|
|
129
|
+
| Field | Type / nullability | Scope / index | Sensitive / encrypted | Lifecycle and validation |
|
|
130
|
+
|---|---|---|---|---|
|
|
131
|
+
| `tenant_id` / `organization_id` | UUID, required on every activated reference entity | composite scope indexes | no | trusted context only |
|
|
132
|
+
| `updated_at` | timestamp, required | optimistic-lock version | no | updated on every edit |
|
|
133
|
+
|
|
134
|
+
## API, Command, and Error Contracts
|
|
135
|
+
|
|
136
|
+
| Method / command | Path / ID | Auth and feature gate | Input | Success response / event | Errors and concurrency | Requirement IDs |
|
|
137
|
+
|---|---|---|---|---|---|---|
|
|
138
|
+
| `GET` | `/api/example/todos` | auth + `example.view` | list query | `{ items, totalCount }` | 400/401/403 | REQ-001 |
|
|
139
|
+
| `POST` | `/api/example/todos` | auth + `example.manage` | todo body | 201 + `example.todo.created` | 400/403/409 | REQ-001 |
|
|
140
|
+
| `GET` | `/backend/design-system` | auth + `design_system.view` | none | rendered gallery | 401/403 | REQ-002 |
|
|
141
|
+
|
|
142
|
+
Every activated route keeps its shipped contract; activation never changes a method, path, or gate. A route that is unreachable while the module is unregistered returns the framework's ordinary not-found response, which is the observable proof that registration is the switch.
|
|
143
|
+
|
|
144
|
+
## Events, Jobs, Notifications, and Cross-Module Flows
|
|
145
|
+
|
|
146
|
+
| Trigger | Producer | Consumer | Side effect | Retry / idempotency / audit behavior |
|
|
147
|
+
|---|---|---|---|---|
|
|
148
|
+
| `example.todo.created` | `example` | the module's own subscribers | index update, cache invalidation | idempotent, retried by the queue contract |
|
|
149
|
+
| bulk completion request | `example` | the module's dispatch and batch workers | progress job with a reported lifecycle | one logical execution per idempotency key |
|
|
150
|
+
|
|
151
|
+
While the module is unregistered none of these run, no subscriber is registered, and no worker is scheduled.
|
|
152
|
+
|
|
153
|
+
## Security, Privacy, and Compliance
|
|
154
|
+
|
|
155
|
+
- **Authorization:** both activated surfaces are feature-gated, never role-name gated.
|
|
156
|
+
- **Tenant isolation:** every activated reference read and write filters on the trusted scope and fails closed.
|
|
157
|
+
- **Sensitive data:** the example's encrypted fields stay encrypted at rest once activated, and the gallery holds no user data at all.
|
|
158
|
+
- **Abuse and failure modes:** the risk this specification actually controls is an unintended public surface, which is why activation and grants are separate steps.
|
|
159
|
+
|
|
160
|
+
## Integration Coverage
|
|
161
|
+
|
|
162
|
+
Tests must be self-contained and map to real API and UI paths.
|
|
163
|
+
|
|
164
|
+
| Test ID | Level | Setup / fixture | Actions | Assertions | Requirement IDs |
|
|
165
|
+
|---|---|---|---|---|---|
|
|
166
|
+
| TEST-001 | integration | a generated app with neither module registered | request both routes | both are absent, no navigation entry, no grant | REQ-001, REQ-002 |
|
|
167
|
+
| TEST-002 | integration | a generated app with `example` registered | run generation and exercise the Todo list and create paths | the surfaces work and stay scoped to the tenant | REQ-001 |
|
|
168
|
+
| TEST-003 | security | a generated app with `design_system` registered and a user lacking the feature | open the gallery route | permission denied, no navigation entry rendered | REQ-002 |
|
|
169
|
+
| TEST-004 | integration | a generated app with both registered | inspect the import graph | no edge in either direction between the two modules | REQ-003 |
|
|
170
|
+
|
|
171
|
+
## Implementation Phases
|
|
172
|
+
|
|
173
|
+
Phases are dependency ordered. Only the current phase may enter implementation.
|
|
174
|
+
|
|
175
|
+
### Phase 1 — Decide and activate in development only
|
|
176
|
+
|
|
177
|
+
- **Depends on:** none
|
|
178
|
+
- **Outcome:** the requested surfaces are reachable on a workstation and the consequences are recorded.
|
|
179
|
+
- **Why this order / value delivered:** the consequences of activation are observable before anything is deployed.
|
|
180
|
+
- **Deliverables:** the `src/modules.ts` entry, generated output, applied migrations, the completed activation checklist in the pull request.
|
|
181
|
+
- **Requirements closed:** REQ-001, REQ-003
|
|
182
|
+
- **Tests:** TEST-001, TEST-002, TEST-004
|
|
183
|
+
- **Validation:** `yarn generate`, `yarn typecheck`, the focused integration tests above
|
|
184
|
+
- **Exit gate:** the activated surfaces render in light and dark mode at narrow width, and deactivating restores the absent state.
|
|
185
|
+
|
|
186
|
+
### Phase 2 — Grant the features and deploy
|
|
187
|
+
|
|
188
|
+
- **Depends on:** Phase 1 exit gate
|
|
189
|
+
- **Outcome:** the intended roles, and only those roles, reach the activated surfaces in a deployed environment.
|
|
190
|
+
- **Why this order / value delivered:** grants are the step that makes a surface publicly consequential, so they follow a proven activation.
|
|
191
|
+
- **Deliverables:** the role-feature grants and the deployment migration run.
|
|
192
|
+
- **Requirements closed:** REQ-002, REQ-004
|
|
193
|
+
- **Tests:** TEST-003
|
|
194
|
+
- **Validation:** the configured validation gate
|
|
195
|
+
- **Exit gate:** a user without the feature is denied, a user with it succeeds, and removing the registry entry removes the surface again.
|
|
196
|
+
|
|
197
|
+
## Requirement Traceability
|
|
198
|
+
|
|
199
|
+
| Requirement | Journey / surface | Data/API/event contracts | Phase | Tests | Acceptance criterion |
|
|
200
|
+
|---|---|---|---|---|---|
|
|
201
|
+
| REQ-001 | J-002, `/backend/todos` | `/api/example/todos`, `example.todo.created` | Phase 1 | TEST-001, TEST-002 | AC-001 |
|
|
202
|
+
| REQ-002 | J-001, `/backend/design-system` | gallery route and `design_system.view` | Phase 2 | TEST-003 | AC-002 |
|
|
203
|
+
| REQ-003 | both surfaces | import graph | Phase 1 | TEST-004 | AC-003 |
|
|
204
|
+
| REQ-004 | both surfaces | registry entry | Phase 2 | TEST-001 | AC-004 |
|
|
205
|
+
|
|
206
|
+
## Rollout, Migration, and Rollback
|
|
207
|
+
|
|
208
|
+
Migrations are generated in the repository and applied by the deployment's own migration step, never by a developer running an ad-hoc apply against a shared database. Rollback is removal of the registry entry followed by generation; the tables the activated module created remain, and dropping them is a separate, deliberate data change.
|
|
209
|
+
|
|
210
|
+
## Risks and Tradeoffs
|
|
211
|
+
|
|
212
|
+
| Risk / tradeoff | Impact | Mitigation / detection | Residual risk |
|
|
213
|
+
|---|---|---|---|
|
|
214
|
+
| The example is mistaken for a product capability | demo surfaces reach real users | activation and grants are separate reviewed steps | a team may still grant deliberately |
|
|
215
|
+
| Migrations run in a deployed environment before the decision is final | unused tables persist | Phase 1 proves the decision on a workstation first | tables remain after deactivation, by design |
|
|
216
|
+
| A future app change edits the example in place | the reference stops matching the upstream tree | the tree is immutable context and reviews reject writes to it | none material |
|
|
217
|
+
|
|
218
|
+
## Acceptance Criteria
|
|
219
|
+
|
|
220
|
+
- [ ] **AC-001** — With `example` registered, an administrator creates and edits a Todo scoped to their organization; with it unregistered, the route is absent.
|
|
221
|
+
- [ ] **AC-002** — With `design_system` registered, a user holding `design_system.view` opens the gallery and a user without it is denied.
|
|
222
|
+
- [ ] **AC-003** — With both registered, no import edge exists between the two modules in either direction.
|
|
223
|
+
- [ ] **AC-004** — Removing either registry entry and regenerating removes its routes, navigation entries, workers, and grants.
|
|
224
|
+
|
|
225
|
+
## Final Compliance Report
|
|
226
|
+
|
|
227
|
+
| Check | Status | Evidence / resolution |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| Applicable `AGENTS.md` files and routed guides/skills reviewed | pass | `AGENTS.md`, `.ai/guides/spec-delivery.md`, `.ai/skills/om-module-scaffold/SKILL.md` |
|
|
230
|
+
| Data models, APIs, events, UI, and tests are internally consistent | pass | the traceability table above |
|
|
231
|
+
| Every workflow completes end to end without a catch-all integration phase | pass | J-001 and J-002 each close in their own phase |
|
|
232
|
+
| Platform-native reuse and extension points were chosen before custom code | pass | the reuse map keeps app behavior in an app-owned module |
|
|
233
|
+
| UI contracts identify references, canonical components, and theme/state coverage | pass | the surface table above |
|
|
234
|
+
| Every phase has dependencies, bounded slices, tests, value, and an observable exit gate | pass | Phase 1 and Phase 2 |
|
|
235
|
+
|
|
236
|
+
Verdict: `Blocked — activation is an app decision this scaffold cannot make on the team's behalf`. Change the verdict and the status once the team has decided which modules to activate.
|
|
237
|
+
|
|
238
|
+
## Open Questions
|
|
239
|
+
|
|
240
|
+
| ID | Question | Owner | Blocking? | Resolution / decision date |
|
|
241
|
+
|---|---|---|---|---|
|
|
242
|
+
| Q-001 | Which reference modules does this app activate, in which environments? | the app team | yes | pending |
|
|
243
|
+
|
|
244
|
+
## Changelog
|
|
245
|
+
|
|
246
|
+
| Date | Change |
|
|
247
|
+
|---|---|
|
|
248
|
+
| 2026-08-06 | Shipped with the scaffold as the covering specification for reference-module activation |
|
|
@@ -21,6 +21,7 @@ Example: 2026-03-01-inventory-module.md
|
|
|
21
21
|
|
|
22
22
|
## Workflow
|
|
23
23
|
|
|
24
|
-
1.
|
|
25
|
-
2.
|
|
26
|
-
3.
|
|
24
|
+
1. Route every new application, multi-module feature, or non-trivial business slice through `om-spec-writing` and `.ai/guides/spec-delivery.md`.
|
|
25
|
+
2. After invoking the skill, create the skeleton from `SPEC-000-template.md`; keep it `Draft` while blocking questions or incomplete contracts remain.
|
|
26
|
+
3. Set `Ready for implementation` only after the final compliance report and requirement traceability pass and the user approves implementation.
|
|
27
|
+
4. Implement through `om-implement-spec` (interactive local) or `om-auto-implement-spec` (whole-spec PR), one dependency-ordered phase at a time; update the Changelog, acceptance evidence, and phase state as work lands. Local delivery confirms its phase-derived plan before coding and ends with the stable `Spec:` reference without implying PR automation.
|