@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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Skills Catalog — Standalone App
|
|
2
|
+
|
|
3
|
+
> All skills available in a `create-mercato-app` project, organized by category.
|
|
4
|
+
> Load this file when answering "what skill should I use?" or "what comes next?".
|
|
5
|
+
|
|
6
|
+
## Table of Contents
|
|
7
|
+
|
|
8
|
+
- [Building Your App](#building-your-app)
|
|
9
|
+
- [Extending & Customizing](#extending--customizing)
|
|
10
|
+
- [Troubleshooting & Maintenance](#troubleshooting--maintenance)
|
|
11
|
+
- [PR & Code Quality](#pr--code-quality)
|
|
12
|
+
- [Migration](#migration)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Building Your App
|
|
17
|
+
|
|
18
|
+
Skills for creating new functionality in your standalone Open Mercato application.
|
|
19
|
+
|
|
20
|
+
| Skill | Trigger / When to use | Preceded by | Followed by |
|
|
21
|
+
|-------|----------------------|-------------|-------------|
|
|
22
|
+
| `om-help` | "what now?", "which skill?", "next steps?", "how do I X?", orientation | — | any |
|
|
23
|
+
| `om-data-model-design` | Designing entities, relationships, migrations, encryption maps for PII | — | `om-spec-writing` or `om-module-scaffold` |
|
|
24
|
+
| `om-spec-writing` | Writing a spec before building a non-trivial feature | `om-data-model-design` | `om-module-scaffold` or `om-implement-spec` |
|
|
25
|
+
| `om-module-scaffold` | Creating a new module with entity, routes, pages, ACL, DI | `om-spec-writing` or `om-data-model-design` | `om-integration-tests` |
|
|
26
|
+
| `om-implement-spec` | Implementing an existing spec phase-by-phase | `om-spec-writing` | `om-integration-tests` |
|
|
27
|
+
| `om-backend-ui-design` | Designing admin pages, CRUD forms, data tables | — | `om-implement-spec` or `om-module-scaffold` |
|
|
28
|
+
| `om-integration-builder` | Building a payment, shipping, or data-sync integration provider | `om-spec-writing` | `om-integration-tests` |
|
|
29
|
+
| `om-integration-tests` | Writing or running Playwright integration tests | `om-module-scaffold` or `om-implement-spec` | `om-code-review` |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Extending & Customizing
|
|
34
|
+
|
|
35
|
+
Skills for modifying or extending behavior without touching core module source.
|
|
36
|
+
|
|
37
|
+
| Skill | Trigger / When to use | Preceded by | Followed by |
|
|
38
|
+
|-------|----------------------|-------------|-------------|
|
|
39
|
+
| `om-system-extension` | Add columns/fields/filters to existing tables, enrich API responses, intercept routes, inject menu items, replace UI components | — | `om-code-review` |
|
|
40
|
+
| `om-eject-and-customize` | When UMES extensions aren't enough and you need to modify core module source directly | — | `om-code-review` |
|
|
41
|
+
| `om-trim-unused-modules` | Slim down the app by disabling modules you don't use | — | `om-code-review` |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Troubleshooting & Maintenance
|
|
46
|
+
|
|
47
|
+
| Skill | Trigger / When to use | Preceded by | Followed by |
|
|
48
|
+
|-------|----------------------|-------------|-------------|
|
|
49
|
+
| `om-troubleshooter` | Errors, module not loading, widgets not appearing, migration failures, build errors, "it doesn't work" | — | `om-code-review` (after fix) |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## PR & Code Quality
|
|
54
|
+
|
|
55
|
+
| Skill | Trigger / When to use | Preceded by | Followed by |
|
|
56
|
+
|-------|----------------------|-------------|-------------|
|
|
57
|
+
| `om-code-review` | Review before merging — architecture, security, DS, conventions | any impl skill | `om-auto-create-pr` |
|
|
58
|
+
| `om-auto-create-pr` | Ship work as a GitHub PR end-to-end | `om-code-review` | `om-auto-review-pr` |
|
|
59
|
+
| `om-auto-continue-pr` | Resume an in-progress PR started by `om-auto-create-pr` | — | `om-auto-review-pr` |
|
|
60
|
+
| `om-auto-create-pr-loop` | Long multi-step implementation with step-level resumability | — | `om-auto-review-pr` |
|
|
61
|
+
| `om-auto-continue-pr-loop` | Resume a PR started by `om-auto-create-pr-loop` | — | `om-auto-review-pr` |
|
|
62
|
+
| `om-auto-review-pr` | Automated PR review + approve/request-changes | `om-auto-create-pr` | — |
|
|
63
|
+
| `om-auto-fix-issue` | Fix a GitHub issue end-to-end (drives `om-verify-in-repo` → `om-root-cause` → `om-fix` → `om-open-pr`) | — | `om-auto-create-pr` |
|
|
64
|
+
| `om-prepare-issue` | Capture a feature to build later — write the spec, ship a docs-only spec PR, open a tracking issue | `om-spec-writing` | `om-implement-spec` |
|
|
65
|
+
| `om-prepare-test-env` | Boot a reusable local test environment (shared descriptor for QA + integration tests) | — | `om-integration-tests` |
|
|
66
|
+
| `om-setup-agent-pipeline` | Tailor `.ai/agentic.config.json` (labels, QA gate, tracker, validation commands) — the scaffold ships working defaults | — | any auto-skill |
|
|
67
|
+
| `om-apply-upgrade-notes` | Sync installed pipeline artifacts after `yarn install-skills` refreshed the external collection | — | — |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Migration
|
|
72
|
+
|
|
73
|
+
| Skill | Trigger / When to use | Preceded by | Followed by |
|
|
74
|
+
|-------|----------------------|-------------|-------------|
|
|
75
|
+
| `om-auto-upgrade-0.4.10-to-0.5.0` | Upgrade app from Open Mercato 0.4.10 → 0.5.0 | — | `om-code-review` |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Notes
|
|
80
|
+
|
|
81
|
+
- **preceded-by / followed-by** are suggestions, not hard constraints.
|
|
82
|
+
- `om-troubleshooter` is always a valid entry point when something is broken.
|
|
83
|
+
- `om-system-extension` should be tried before `om-eject-and-customize` — ejecting makes upgrades harder.
|
|
84
|
+
- `om-help` is always the right starting point when you're unsure.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Workflow Sequences — Standalone App
|
|
2
|
+
|
|
3
|
+
> Common development workflows for a `create-mercato-app` project with the recommended skill sequence.
|
|
4
|
+
> Load this file when the user asks "where do I start?" or "what's the order for X?".
|
|
5
|
+
|
|
6
|
+
## Table of Contents
|
|
7
|
+
|
|
8
|
+
- [New Module](#1-new-module)
|
|
9
|
+
- [New Feature in Existing Module](#2-new-feature-in-existing-module)
|
|
10
|
+
- [Extend an Existing Module](#3-extend-an-existing-module)
|
|
11
|
+
- [New Integration Provider](#4-new-integration-provider)
|
|
12
|
+
- [Fix a Bug / Something Is Broken](#5-fix-a-bug--something-is-broken)
|
|
13
|
+
- [PR Lifecycle](#6-pr-lifecycle)
|
|
14
|
+
- [Eject and Customize a Core Module](#7-eject-and-customize-a-core-module)
|
|
15
|
+
- [Slim Down the App](#8-slim-down-the-app)
|
|
16
|
+
- [Upgrade Open Mercato](#9-upgrade-open-mercato)
|
|
17
|
+
- [Choosing the Right Sequence](#choosing-the-right-sequence)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. New Module
|
|
22
|
+
|
|
23
|
+
**Use when:** Building a brand-new module with its own entity, API routes, and admin pages.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
om-data-model-design (design entity, fields, relationships, migrations)
|
|
27
|
+
→ om-spec-writing (spec the feature if non-trivial)
|
|
28
|
+
→ om-module-scaffold (generate all required files)
|
|
29
|
+
→ om-backend-ui-design (design forms and tables if needed)
|
|
30
|
+
→ om-implement-spec (fill in business logic)
|
|
31
|
+
→ om-integration-tests
|
|
32
|
+
→ om-code-review
|
|
33
|
+
→ om-auto-create-pr
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Rationale per step:**
|
|
37
|
+
1. `om-data-model-design` — design entities and migrations before touching code
|
|
38
|
+
2. `om-spec-writing` — capture requirements, API contracts, phases (skip for simple CRUD)
|
|
39
|
+
3. `om-module-scaffold` — generates entity, routes, pages, ACL, DI in one pass
|
|
40
|
+
4. `om-backend-ui-design` — design consistent admin UI before implementing
|
|
41
|
+
5. `om-implement-spec` — fill in custom logic beyond what scaffold generates
|
|
42
|
+
6. `om-integration-tests` → `om-code-review` → `om-auto-create-pr`
|
|
43
|
+
|
|
44
|
+
> For simple CRUD modules: skip `om-spec-writing` and go directly to `om-module-scaffold`.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 2. New Feature in Existing Module
|
|
49
|
+
|
|
50
|
+
**Use when:** Adding a field, endpoint, page, or behavior to a module you already have.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
om-spec-writing (capture requirements and API changes)
|
|
54
|
+
→ om-implement-spec
|
|
55
|
+
→ om-integration-tests
|
|
56
|
+
→ om-code-review
|
|
57
|
+
→ om-auto-create-pr
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
> For small additions (1–2 files): skip `om-spec-writing` and implement directly.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 3. Extend an Existing Module
|
|
65
|
+
|
|
66
|
+
**Use when:** Adding columns, filters, menu items, API enrichments, or UI changes to a *core* OM module without modifying its source.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
om-system-extension (use UMES: enrichers, widgets, interceptors, guards, event subscribers)
|
|
70
|
+
→ om-code-review
|
|
71
|
+
→ om-auto-create-pr
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Rationale:** Always try `om-system-extension` first. UMES mechanisms cover most extension needs and survive upgrades. Only fall back to `om-eject-and-customize` if UMES cannot solve the problem.
|
|
75
|
+
|
|
76
|
+
**Extension mechanisms by use case:**
|
|
77
|
+
|
|
78
|
+
| What you want to do | UMES mechanism |
|
|
79
|
+
|--------------------|----------------|
|
|
80
|
+
| Add a column to a list table | Field/Column Widget |
|
|
81
|
+
| Add a field to a form | Field Widget |
|
|
82
|
+
| Add a filter to a data table | Filter Widget |
|
|
83
|
+
| Add data to an API response | Response Enricher |
|
|
84
|
+
| Block or validate a mutation | Mutation Guard |
|
|
85
|
+
| Hook before/after an API call | API Interceptor |
|
|
86
|
+
| Replace a UI component | Component Replacement |
|
|
87
|
+
| Add a menu item | Menu Injection Widget |
|
|
88
|
+
| React to a domain event | Event Subscriber |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 4. New Integration Provider
|
|
93
|
+
|
|
94
|
+
**Use when:** Connecting to a payment gateway, shipping carrier, data-sync service, or external API.
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
om-spec-writing (design adapter contract, credentials, health check)
|
|
98
|
+
→ om-integration-builder (scaffold provider package)
|
|
99
|
+
→ om-implement-spec (fill in provider logic)
|
|
100
|
+
→ om-integration-tests
|
|
101
|
+
→ om-code-review
|
|
102
|
+
→ om-auto-create-pr
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 5. Fix a Bug / Something Is Broken
|
|
108
|
+
|
|
109
|
+
**Use when:** Module not loading, widget not appearing, migration failing, build error, "it doesn't work".
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
om-troubleshooter
|
|
113
|
+
→ om-code-review (after fix is in place)
|
|
114
|
+
→ om-auto-create-pr
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Rationale:** `om-troubleshooter` follows a systematic diagnostic flow. Start there — don't guess. It covers module issues, entity/migration issues, API routes, UI/widgets, build/type errors, and database problems.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 6. PR Lifecycle
|
|
122
|
+
|
|
123
|
+
**Use when:** Shipping work as a GitHub PR.
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
om-auto-create-pr
|
|
127
|
+
→ om-auto-review-pr
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Or for long/resumable work:
|
|
131
|
+
```
|
|
132
|
+
om-auto-create-pr-loop
|
|
133
|
+
→ om-auto-continue-pr-loop (if interrupted)
|
|
134
|
+
→ om-auto-review-pr
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 7. Eject and Customize a Core Module
|
|
140
|
+
|
|
141
|
+
**Use when:** UMES extensions (see sequence 3) cannot solve the problem and you need to modify core module source directly.
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
om-eject-and-customize (pre-ejection analysis, identify safe zones, document customizations)
|
|
145
|
+
→ om-implement-spec (implement modifications)
|
|
146
|
+
→ om-code-review
|
|
147
|
+
→ om-auto-create-pr
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Warning:** Ejected modules require manual diff tracking on upgrades. Only eject when necessary.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 8. Slim Down the App
|
|
155
|
+
|
|
156
|
+
**Use when:** Fresh `create-mercato-app` scaffold enables all modules by default; you want to disable unused ones.
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
om-trim-unused-modules
|
|
160
|
+
→ om-code-review
|
|
161
|
+
→ om-auto-create-pr
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 9. Upgrade Open Mercato
|
|
167
|
+
|
|
168
|
+
**Use when:** Bumping the framework version in your app.
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
om-auto-upgrade-0.4.10-to-0.5.0 (for 0.4.10 → 0.5.0)
|
|
172
|
+
→ om-code-review
|
|
173
|
+
→ om-auto-create-pr
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
For other version jumps, check the `UPGRADE_NOTES.md` in your project.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Choosing the Right Sequence
|
|
181
|
+
|
|
182
|
+
| Situation | Sequence |
|
|
183
|
+
|-----------|----------|
|
|
184
|
+
| I want to build a new module | [New Module](#1-new-module) |
|
|
185
|
+
| I want to add something to an existing module I own | [New Feature in Existing Module](#2-new-feature-in-existing-module) |
|
|
186
|
+
| I want to customize a core OM module | [Extend an Existing Module](#3-extend-an-existing-module) (try UMES first) |
|
|
187
|
+
| I want to add a payment/shipping/sync integration | [New Integration Provider](#4-new-integration-provider) |
|
|
188
|
+
| Something is broken | [Fix a Bug / Something Is Broken](#5-fix-a-bug--something-is-broken) |
|
|
189
|
+
| I want to open a PR | [PR Lifecycle](#6-pr-lifecycle) |
|
|
190
|
+
| UMES can't solve my extension need | [Eject and Customize](#7-eject-and-customize-a-core-module) |
|
|
191
|
+
| I want to remove unused modules | [Slim Down the App](#8-slim-down-the-app) |
|
|
192
|
+
| I need to upgrade OM version | [Upgrade Open Mercato](#9-upgrade-open-mercato) |
|
|
193
|
+
| I'm not sure what I need | Start with `om-help` |
|
|
@@ -1,47 +1,166 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om-implement-spec
|
|
3
|
-
description: Implement
|
|
3
|
+
description: Implement a specification (or specific phases of a spec) using coordinated subagents. Handles multi-phase spec implementation with unit tests, integration tests, documentation, and code-review compliance. Use when the user says "implement spec", "implement the spec", "implement phases", "build from spec", or "code the spec". Tracks progress by updating the spec with implementation status.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Implement
|
|
6
|
+
# Implement Spec Skill
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Implements a specification (or selected phases) end-to-end using a team of coordinated subagents. Every code change MUST pass the code-review checklist before the phase is considered done.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Pre-Flight
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
1. **Identify the spec**: Locate the target spec file in `.ai/specs/`.
|
|
13
|
+
2. **Load context**: Read spec fully. Match affected tasks to the **Task → Context Map** in `AGENTS.md` and read all listed files (guides and skills).
|
|
14
|
+
3. **Load code-review checklist**: Read `.ai/skills/om-code-review/references/review-checklist.md` — this is the acceptance gate for every phase.
|
|
15
|
+
4. **Load lessons**: Read `.ai/lessons.md` for known pitfalls.
|
|
16
|
+
5. **Scope phases**: If the user specifies phases (e.g. "phases c-e"), filter to only those. Otherwise implement all phases sequentially.
|
|
14
17
|
|
|
15
|
-
## Workflow
|
|
18
|
+
## Implementation Workflow
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
2. Read the full spec, root `AGENTS.md`, existing related specs, `references/phases-and-gates.md`, and `references/planning-and-progress.md`; resolve contradictions before coding.
|
|
19
|
-
3. Run the readiness audit. A `Draft`, blocking open question, missing requirement traceability, or unspecified UI/API contract returns to `om-spec-writing`; do not infer the missing design while implementing.
|
|
20
|
-
4. Honor explicit `{phases}`. Otherwise identify only dependency-unblocked phases and ask the user which to implement. Preserve the approved selection (`selected-phase-boundary`) and every spec contract (`preserve-spec-contracts`).
|
|
21
|
-
5. Build the phase-derived plan from `references/planning-and-progress.md` (`phase-execution-plan`), present it to the user, and wait for the user's confirmation before coding (`interactive-confirmation`). Approval may cover one phase or the complete selected sequence.
|
|
22
|
-
6. Map only the active phase to Task Router rows and package/module facts. Invoke every routed skill before delegating or coding; rendered surfaces require `om-backend-ui-design` and `.ai/guides/backend-ui.md`. Use `om-framework-context` only for missing exact-version details.
|
|
23
|
-
7. Break only that phase into cohesive dependency-ordered slices. Use one bounded subagent per independent research/implementation/test/review task when available; never overlap files or enter a later phase.
|
|
24
|
-
8. Implement one complete slice through real call sites, run its focused tests, and update the spec's progress evidence (`implementation-progress`) before dependent work. Run generation/migration probes at their owning slice.
|
|
25
|
-
9. Close the phase only through its specified integration paths and exit gate. Before entering another selected phase, summarize the evidence and obtain confirmation unless the user already approved the full sequence.
|
|
26
|
-
10. After the final selected phase, run the configured type/lint/test/build gates, actually invoke the installed `om-code-review` skill, load `.ai/review-checklist.md`, and resolve every blocking finding.
|
|
27
|
-
11. Load `references/report-templates.md` and use its full report (`stable-implementation-report`), ending with its exact `Spec:` line (`spec-reference-marker`).
|
|
20
|
+
For **each phase** in the spec, execute these steps:
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
### Step 1 — Plan the Phase
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
24
|
+
Read the phase from the spec. For each step within the phase:
|
|
25
|
+
- Identify files to create or modify (all paths under `src/modules/`)
|
|
26
|
+
- Identify which guides and skills apply (use the Task → Context Map in `AGENTS.md`)
|
|
27
|
+
- List required exports, conventions, and patterns from the relevant guides
|
|
28
|
+
- Note any cross-module impacts (events, extensions, widgets, enrichers)
|
|
29
|
+
|
|
30
|
+
Present a brief plan to the user before coding.
|
|
31
|
+
|
|
32
|
+
### Step 2 — Implement
|
|
33
|
+
|
|
34
|
+
Use subagents liberally to parallelize independent work:
|
|
35
|
+
- **One subagent per independent file/component** when files don't depend on each other
|
|
36
|
+
- **Sequential execution** when there are dependencies (e.g., entity before API route before backend page)
|
|
37
|
+
|
|
38
|
+
For every piece of code, enforce these code-review rules inline:
|
|
39
|
+
|
|
40
|
+
| Area | Rule |
|
|
41
|
+
|------|------|
|
|
42
|
+
| Types | No `any` — use zod + `z.infer` |
|
|
43
|
+
| API routes | Export `openApi` and per-method `metadata` with `requireAuth` / `requireFeatures` (no top-level `export const requireAuth`) |
|
|
44
|
+
| **CRUD APIs** | **Use `makeCrudRoute({ entity, entityId, operations, schema, indexer: { entityType } })` from `@open-mercato/shared/lib/crud/factory`. Custom write routes MUST use the mutation guard registry: map the route to `create`/`update`/`delete` (action endpoints usually `update`), collect registered guards, append `bridgeLegacyGuard(container)` when present, call `runMutationGuards(...)` with `{ userFeatures }` before the mutation, merge `modifiedPayload`, and run returned `afterSuccessCallbacks` after success while catching/logging callback failures. See `AGENTS.md` → Mandatory Module Mechanisms.** |
|
|
45
|
+
| Entities | Standard columns, snake_case, UUID PKs, indexed `organization_id` + `tenant_id` |
|
|
46
|
+
| Security | `findWithDecryption`, tenant scoping, zod validation |
|
|
47
|
+
| **Encryption maps** | **For every PII / GDPR-relevant column the phase touches, declare in `<module>/encryption.ts` exporting `defaultEncryptionMaps` (type from `@open-mercato/shared/modules/encryption`). Reads via `findWithDecryption` / `findOneWithDecryption` (5-arg `(em, entity, where, options?, scope?)`). Equality-lookup columns declare a sibling `hashField`. NEVER hand-rolled AES/KMS, `crypto.subtle`, or "encrypt later" stubs. See `AGENTS.md` → CRITICAL Rule #11 (Encryption maps) + the "Encryption maps" row of the Mandatory Module Mechanisms table; `.ai/skills/om-data-model-design/SKILL.md` § Sensitive Data and Encryption Maps; `.ai/skills/om-module-scaffold/SKILL.md` § Encryption maps.** |
|
|
48
|
+
| UI | `<CrudForm>`/`<DataTable>` (with stable `entityId` + `extensionTableId`), `apiCall` (never raw `fetch`), `flash()`, `<LoadingMessage>`/`<ErrorMessage>` |
|
|
49
|
+
| **Design System** | **Semantic status tokens (no `text-red-*` / `bg-green-*`); Tailwind text scale (no `text-[13px]` / `text-[11px]`); shared primitives `StatusBadge` / `Alert` / `FormField` / `SectionHeader` / `CollapsibleSection` / `LoadingMessage` / `Spinner` / `DataLoader` / `EmptyState`; lucide-react icons in PAGE BODY (never inline `<svg>`); `aria-label` on every icon-only button; Boy Scout rule on touched lines. See `AGENTS.md` → CRITICAL Rule #10 (Strict Design System alignment) + `.ai/skills/om-backend-ui-design/SKILL.md`.** |
|
|
50
|
+
| **Cache** | **Resolve via DI (`container.resolve('cache')`); tag with `tenant:<id>` / `org:<id>`; declare invalidation per write path. NEVER `new Redis(...)` or raw SQLite.** |
|
|
51
|
+
| Events | `createModuleEvents()` with `as const`, subscribers export `metadata`; cross-module side effects via subscribers, never direct imports |
|
|
52
|
+
| i18n | `useT()` client, `resolveTranslations()` server, no hardcoded strings |
|
|
53
|
+
| Imports | Package-level `@open-mercato/<pkg>/...` for framework imports |
|
|
54
|
+
| Mutations | `useGuardedMutation` when not using CrudForm; pass `retryLastMutation` in injection context |
|
|
55
|
+
| Keyboard | `Cmd/Ctrl+Enter` submit, `Escape` cancel on dialogs |
|
|
56
|
+
| Naming | Modules plural snake_case, events `module.entity.past_tense`, features `module.action` |
|
|
57
|
+
|
|
58
|
+
### Step 3 — Unit Tests
|
|
59
|
+
|
|
60
|
+
For every new feature/function implemented in the phase:
|
|
61
|
+
- Create unit tests colocated with the source (e.g., `*.test.ts` or `__tests__/`)
|
|
62
|
+
- Test happy path + key edge cases
|
|
63
|
+
- Test error paths for validation and authorization
|
|
64
|
+
- Mock external dependencies (DI services, data engine)
|
|
65
|
+
- Verify tests pass: `yarn test`
|
|
66
|
+
|
|
67
|
+
### Step 4 — Integration Tests
|
|
68
|
+
|
|
69
|
+
If the spec defines integration test scenarios (or the phase adds API endpoints / UI flows):
|
|
70
|
+
- Follow the `om-integration-tests` skill workflow (`.ai/skills/om-integration-tests/SKILL.md`)
|
|
71
|
+
- Place tests in `src/modules/<module>/__integration__/TC-{CATEGORY}-{XXX}.spec.ts`
|
|
72
|
+
- Tests MUST be self-contained: create fixtures in setup, clean up in teardown
|
|
73
|
+
- Tests MUST NOT rely on seeded/demo data
|
|
74
|
+
- Run and verify: `npx playwright test --config .ai/qa/tests/playwright.config.ts <path> --retries=0`
|
|
75
|
+
|
|
76
|
+
If the spec does not explicitly list integration scenarios but the phase adds significant API or UI behavior, propose test scenarios to the user before writing them.
|
|
77
|
+
|
|
78
|
+
### Step 5 — Documentation
|
|
79
|
+
|
|
80
|
+
For each new feature:
|
|
81
|
+
- Add/update locale files for new i18n keys
|
|
82
|
+
- If new entities with user-facing text: create `translations.ts`
|
|
83
|
+
- If new convention files: run `yarn generate`
|
|
84
|
+
- Update relevant guides or `AGENTS.md` if the feature introduces new patterns developers should follow
|
|
85
|
+
|
|
86
|
+
### Step 6 — Self-Review (Code-Review Gate)
|
|
87
|
+
|
|
88
|
+
Before marking a phase complete, run a self-review against the checklist (`.ai/skills/om-code-review/references/review-checklist.md`):
|
|
89
|
+
|
|
90
|
+
1. **Architecture & Module Independence** (section 1)
|
|
91
|
+
2. **Security** (section 2)
|
|
92
|
+
3. **Data Integrity & ORM** (section 3)
|
|
93
|
+
4. **API Routes** (section 4) — if applicable
|
|
94
|
+
5. **Events & Commands** (section 5) — if applicable
|
|
95
|
+
6. **UI & Backend Pages** (section 6) — if applicable
|
|
96
|
+
7. **Naming Conventions** (section 7)
|
|
97
|
+
8. **Anti-Patterns** (section 8)
|
|
98
|
+
|
|
99
|
+
Fix any violations before proceeding to the next phase.
|
|
100
|
+
|
|
101
|
+
### Step 7 — Update Spec with Progress
|
|
102
|
+
|
|
103
|
+
After completing each phase, update the spec file:
|
|
104
|
+
- Add an `## Implementation Status` section at the bottom (or update it if it exists)
|
|
105
|
+
- Use this format:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
## Implementation Status
|
|
109
|
+
|
|
110
|
+
| Phase | Status | Date | Notes |
|
|
111
|
+
|-------|--------|------|-------|
|
|
112
|
+
| Phase A — Foundation | Done | 2026-02-20 | All steps implemented, tests passing |
|
|
113
|
+
| Phase B — Menu Injection | Done | 2026-02-21 | 3/3 steps complete |
|
|
114
|
+
| Phase C — Events Bridge | In Progress | 2026-02-22 | Step 1-2 done, step 3 pending |
|
|
115
|
+
| Phase D — Enrichers | Not Started | — | — |
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- For the current phase, mark individual steps:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
### Phase C — Detailed Progress
|
|
122
|
+
- [x] Step 1: Create event definitions
|
|
123
|
+
- [x] Step 2: Implement SSE bridge
|
|
124
|
+
- [ ] Step 3: Add client-side hooks
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Step 8 — Verification
|
|
128
|
+
|
|
129
|
+
After all targeted phases are complete:
|
|
130
|
+
|
|
131
|
+
1. **Generate check**: `yarn generate` — must complete without errors
|
|
132
|
+
2. **Type check**: `yarn typecheck` — must pass (if available)
|
|
133
|
+
3. **Build check**: `yarn build` — must pass
|
|
134
|
+
4. **Unit test check**: `yarn test` — must pass
|
|
135
|
+
5. **Integration test check**: run any new integration tests — must pass
|
|
136
|
+
6. **Migration check**: `yarn db:generate` — if any entities changed (verify the resulting SQL is scoped correctly; manual SQL is acceptable only when avoiding unrelated churn, and the touched `.snapshot-open-mercato.json` must match)
|
|
137
|
+
|
|
138
|
+
Report results to the user. If any check fails, fix and re-verify.
|
|
139
|
+
|
|
140
|
+
## Subagent Strategy
|
|
141
|
+
|
|
142
|
+
| Task | Agent Type | When |
|
|
143
|
+
|------|-----------|------|
|
|
144
|
+
| Research existing patterns | Explore | Before implementing unfamiliar patterns |
|
|
145
|
+
| Implement independent files | general-purpose | When files have no dependencies on each other |
|
|
146
|
+
| Run tests | Bash | After each phase |
|
|
147
|
+
| Self-review | general-purpose | After each phase, against checklist |
|
|
148
|
+
| Integration tests | general-purpose | After phases with API/UI changes |
|
|
149
|
+
|
|
150
|
+
**Concurrency rule**: Launch parallel subagents only for truly independent work. Sequential for dependent files.
|
|
34
151
|
|
|
35
152
|
## Rules
|
|
36
153
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
154
|
+
- MUST read the full spec before starting implementation
|
|
155
|
+
- MUST read all guides and skills listed in the Task → Context Map before coding
|
|
156
|
+
- MUST pass every applicable code-review checklist item before marking a phase done
|
|
157
|
+
- MUST update the spec with implementation progress after each phase
|
|
158
|
+
- MUST run `yarn build` after final phase to verify no build breaks
|
|
159
|
+
- MUST create unit tests for all new behavioral code
|
|
160
|
+
- MUST create or propose integration tests for phases with API endpoints or UI flows
|
|
161
|
+
- MUST NOT skip the self-review step — it is the quality gate
|
|
162
|
+
- MUST NOT introduce `any` types, hardcoded strings, raw `fetch`, or other anti-patterns
|
|
163
|
+
- MUST keep subagents focused — one task per subagent, clear boundaries
|
|
164
|
+
- MUST report blockers to the user immediately rather than working around them silently
|
|
165
|
+
- MUST run `yarn generate` after creating or modifying module convention files
|
|
166
|
+
- MUST run `yarn db:generate` after creating or modifying entities (and confirm migration with user before applying)
|