@haus-tech/haus-workflow 6.7.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +41 -85
  3. package/dist/cli.js +17629 -23486
  4. package/docs/before-you-start.md +17 -22
  5. package/docs/glossary.md +10 -8
  6. package/package.json +3 -6
  7. package/packages/agents/issue-creator.md +59 -0
  8. package/packages/configs/eslint/eslint.config.mjs +90 -0
  9. package/packages/configs/lighthouse/lighthouserc.yml +35 -0
  10. package/packages/configs/prettier/.prettierignore +28 -0
  11. package/packages/configs/prettier/prettier.config.cjs +12 -0
  12. package/packages/packages.yaml +81 -0
  13. package/packages/skills/adr-decisions/SKILL.md +113 -0
  14. package/packages/skills/auth-oidc-azure-bankid-patterns/SKILL.md +46 -0
  15. package/packages/skills/auth-oidc-azure-bankid-patterns/references/conventions.md +29 -0
  16. package/packages/skills/auth-oidc-azure-bankid-patterns/references/scope.md +30 -0
  17. package/packages/skills/auth-oidc-azure-bankid-patterns/references/workflow.md +38 -0
  18. package/packages/skills/bullmq-patterns/SKILL.md +53 -0
  19. package/packages/skills/bullmq-patterns/references/conventions.md +33 -0
  20. package/packages/skills/bullmq-patterns/references/scope.md +30 -0
  21. package/packages/skills/bullmq-patterns/references/workflow.md +50 -0
  22. package/{library/global → packages}/skills/haus-workflow/SKILL.md +28 -41
  23. package/packages/skills/haus-workflow/references/init.md +57 -0
  24. package/{library/global → packages}/skills/haus-workflow/references/new.md +15 -20
  25. package/packages/skills/i18next-patterns/SKILL.md +52 -0
  26. package/packages/skills/i18next-patterns/references/conventions.md +32 -0
  27. package/packages/skills/i18next-patterns/references/scope.md +29 -0
  28. package/packages/skills/i18next-patterns/references/workflow.md +39 -0
  29. package/packages/skills/issue-authoring/SKILL.md +184 -0
  30. package/packages/skills/issue-authoring/references/issue-tracker.md +29 -0
  31. package/packages/skills/issue-authoring/references/native-metadata.md +122 -0
  32. package/packages/skills/issue-authoring/references/recording-approval.md +29 -0
  33. package/packages/skills/laravel-nova-patterns/SKILL.md +45 -0
  34. package/packages/skills/laravel-nova-patterns/references/conventions.md +26 -0
  35. package/packages/skills/laravel-nova-patterns/references/scope.md +30 -0
  36. package/packages/skills/laravel-nova-patterns/references/workflow.md +36 -0
  37. package/packages/skills/nextauth-patterns/SKILL.md +48 -0
  38. package/packages/skills/nextauth-patterns/references/conventions.md +33 -0
  39. package/packages/skills/nextauth-patterns/references/scope.md +33 -0
  40. package/packages/skills/nextauth-patterns/references/workflow.md +46 -0
  41. package/packages/skills/nx-tag-conventions/SKILL.md +32 -0
  42. package/packages/skills/package-manager-yarn4-pnpm89/SKILL.md +41 -0
  43. package/packages/skills/package-manager-yarn4-pnpm89/references/conventions.md +25 -0
  44. package/packages/skills/package-manager-yarn4-pnpm89/references/scope.md +30 -0
  45. package/packages/skills/package-manager-yarn4-pnpm89/references/workflow.md +39 -0
  46. package/packages/skills/qliro-patterns/SKILL.md +48 -0
  47. package/packages/skills/qliro-patterns/references/conventions.md +28 -0
  48. package/packages/skills/qliro-patterns/references/scope.md +30 -0
  49. package/packages/skills/qliro-patterns/references/workflow.md +46 -0
  50. package/packages/skills/react-router-v7-patterns/SKILL.md +47 -0
  51. package/packages/skills/react-router-v7-patterns/references/conventions.md +30 -0
  52. package/packages/skills/react-router-v7-patterns/references/scope.md +32 -0
  53. package/packages/skills/react-router-v7-patterns/references/workflow.md +43 -0
  54. package/{library/global → packages}/skills/request/scripts/korning.mjs +1 -1
  55. package/packages/skills/strapi-patterns/SKILL.md +53 -0
  56. package/packages/skills/strapi-patterns/references/conventions.md +33 -0
  57. package/packages/skills/strapi-patterns/references/scope.md +29 -0
  58. package/packages/skills/strapi-patterns/references/workflow.md +47 -0
  59. package/packages/skills/vendure-app-patterns/SKILL.md +34 -0
  60. package/packages/skills/vendure-app-patterns/references/conventions.md +25 -0
  61. package/packages/skills/vendure-app-patterns/references/scope.md +29 -0
  62. package/packages/skills/vendure-app-patterns/references/workflow.md +45 -0
  63. package/packages/skills/vendure-plugin-patterns/SKILL.md +45 -0
  64. package/packages/skills/vendure-plugin-patterns/references/conventions.md +27 -0
  65. package/packages/skills/vendure-plugin-patterns/references/scope.md +30 -0
  66. package/packages/skills/vendure-plugin-patterns/references/workflow.md +42 -0
  67. package/packages/skills/whats-installed/SKILL.md +55 -0
  68. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/SKILL.md +41 -0
  69. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/conventions.md +25 -0
  70. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/scope.md +28 -0
  71. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/workflow.md +41 -0
  72. package/packages/skills/wordpress-bedrock-patterns/SKILL.md +41 -0
  73. package/packages/skills/wordpress-bedrock-patterns/references/conventions.md +27 -0
  74. package/packages/skills/wordpress-bedrock-patterns/references/scope.md +28 -0
  75. package/packages/skills/wordpress-bedrock-patterns/references/workflow.md +42 -0
  76. package/packages/skills/writing-documentation/SKILL.md +153 -0
  77. package/packages/skills/writing-documentation/references/claude-template-workspace.md +60 -0
  78. package/packages/skills/writing-documentation/references/claude-template.md +43 -0
  79. package/packages/skills/writing-documentation/references/completeness-criteria.md +26 -0
  80. package/packages/skills/writing-documentation/references/summary-template.md +81 -0
  81. package/packages/skills/writing-documentation/references/topic-file-formats.md +125 -0
  82. package/packages/skills/writing-documentation/references/validation-checklist.md +42 -0
  83. package/packages/templates/agentic-workflow-poc.md +180 -0
  84. package/packages/templates/agentic-workflow-standard.md +170 -0
  85. package/packages/templates/decision-template.md +27 -0
  86. package/packages/templates/decisions-ci-gate.yml +32 -0
  87. package/packages/templates/lefthook-branch-guard.yml +27 -0
  88. package/packages/templates/lefthook-lighthouse.yml +28 -0
  89. package/packages/templates/lefthook-quality.yml +34 -0
  90. package/packages/templates/lefthook-security.yml +27 -0
  91. package/packages/templates/start-here.md +72 -0
  92. package/library/catalog/decisions-triggers.json +0 -26
  93. package/library/catalog/haus-lock.schema.json +0 -4
  94. package/library/catalog/manifest.json +0 -5941
  95. package/library/catalog/validation-rules.json +0 -169
  96. package/library/global/settings-fragments/hooks.json +0 -53
  97. package/library/global/skills/haus-workflow/references/init.md +0 -88
  98. package/scripts/postinstall.mjs +0 -62
  99. /package/{library/global → packages}/agents/request-assessor.md +0 -0
  100. /package/{library/global → packages}/agents/request-design-reviewer.md +0 -0
  101. /package/{library/global → packages}/agents/request-designer.md +0 -0
  102. /package/{library/global → packages}/agents/request-scorer.md +0 -0
  103. /package/{library/global → packages}/agents/request-specifier-eskalerad.md +0 -0
  104. /package/{library/global → packages}/agents/request-specifier.md +0 -0
  105. /package/{library/global → packages}/skills/haus-workflow/references/clone.md +0 -0
  106. /package/{library/global → packages}/skills/request/SKILL.md +0 -0
  107. /package/{library/global → packages}/skills/request/scripts/archive.mjs +0 -0
  108. /package/{library/global → packages}/skills/request/scripts/bedom.mjs +0 -0
  109. /package/{library/global → packages}/skills/request/scripts/check-lasta.mjs +0 -0
  110. /package/{library/global → packages}/skills/request/scripts/compare-scores.mjs +0 -0
  111. /package/{library/global → packages}/skills/request/scripts/contract-check.mjs +0 -0
  112. /package/{library/global → packages}/skills/request/scripts/kontroll.mjs +0 -0
  113. /package/{library/global → packages}/skills/request/scripts/lib.mjs +0 -0
  114. /package/{library/global → packages}/skills/request/scripts/precheck.mjs +0 -0
  115. /package/{library/global → packages}/skills/request/scripts/ref-hash.mjs +0 -0
  116. /package/{library/global → packages}/skills/request/scripts/report.mjs +0 -0
  117. /package/{library/global → packages}/skills/request/scripts/resolve-anchors.mjs +0 -0
  118. /package/{library/global → packages}/skills/request/scripts/svep.mjs +0 -0
  119. /package/{library/global → packages}/skills/request-assess-impact/SKILL.md +0 -0
  120. /package/{library/global → packages}/skills/request-score/SKILL.md +0 -0
  121. /package/{library/global → packages}/skills/request-score/references/poangskala.md +0 -0
  122. /package/{library/global → packages}/skills/request-sync/SKILL.md +0 -0
  123. /package/{library/global → packages}/skills/request-write-spec/SKILL.md +0 -0
  124. /package/{library/global → packages}/skills/request-write-spec/references/specformat.md +0 -0
  125. /package/{library/global → packages}/skills/slack-cowork/SKILL.md +0 -0
  126. /package/{library/global → packages}/skills/slack-cowork/references/canvas-markdown.md +0 -0
  127. /package/{library/global → packages}/skills/slack-cowork/references/synk.md +0 -0
@@ -0,0 +1,33 @@
1
+ ## Naming conventions
2
+
3
+ - Content type API folder: `src/api/<singular-name>/` (e.g. `src/api/article/`)
4
+ - Schema file: `src/api/<name>/content-types/<name>/schema.json` — `kind` is `collectionType` or `singleType`
5
+ - Schema `singularName` / `pluralName` — lowercase, hyphenated when multi-word
6
+ - Controllers: `src/api/<name>/controllers/<name>.ts` — export `factories.createCoreController(...)` with optional overrides
7
+ - Services: `src/api/<name>/services/<name>.ts` — same `factories.createCoreService` pattern
8
+ - Routes: `src/api/<name>/routes/<name>.ts` — default `factories.createCoreRouter` or custom router object
9
+ - Policies: `src/api/<name>/policies/<policy-name>.ts` — function `(policyContext, config, { strapi }) => boolean | Promise<boolean>`
10
+ - Middlewares: `src/api/<name>/middlewares/<name>.ts` — Koa-style `async (ctx, next) => ...`
11
+ - Plugin: `src/plugins/<plugin-name>/` mirrors top-level layout (`server/` + `admin/`)
12
+ - Lifecycle hooks: `src/api/<name>/content-types/<name>/lifecycles.ts` — `beforeCreate`, `afterUpdate`, etc.
13
+
14
+ ## Do / don't
15
+
16
+ DO: Use `strapi.documents("api::article.article")` v5 Document Service API for CRUD — DON'T: use deprecated `strapi.entityService` patterns from v4 tutorials
17
+ DO: Keep business logic in services; controllers only translate HTTP → service call → HTTP — DON'T: cram logic into the controller default override
18
+ DO: Define `populate` strategy explicitly per query — DON'T: `populate: "*"` (deep population kills perf)
19
+ DO: Use lifecycle hooks for cross-cutting concerns (audit logs, denormalization) — DON'T: scatter the same logic across multiple controllers
20
+ DO: Set `draftAndPublish: true` in schema when editors need a publish workflow — DON'T: leave it implicit
21
+ DO: Use `policies` for authorization, `middlewares` for request shaping — DON'T: do auth inside controllers
22
+ DO: Read tokens via `strapi.config.get("plugin::users-permissions.jwt.secret")` — DON'T: hard-code env var names
23
+
24
+ ## Forbidden patterns
25
+
26
+ NEVER: write to the DB outside `strapi.documents` / `strapi.db` — bypasses lifecycle hooks and validation
27
+ NEVER: change `kind` from `collectionType` to `singleType` (or vice versa) on populated data — destroys content
28
+ NEVER: rename `singularName` / `pluralName` on a deployed type without a migration plan — breaks API consumers
29
+ NEVER: commit `.env` with `JWT_SECRET` or `API_TOKEN_SALT` — rotate before public push if leaked
30
+ NEVER: ship `populate: "*"` to production — recursive deep populate is the #1 perf killer
31
+ NEVER: skip the `users-permissions` step after adding a custom route — endpoint returns 403 silently
32
+ NEVER: import server-only modules (`@strapi/strapi`) inside `src/admin/` — admin runs in the browser
33
+ NEVER: edit `dist/` or `.cache/` — both are build artifacts; changes vanish on next build
@@ -0,0 +1,29 @@
1
+ # Scope
2
+
3
+ ## In-scope files and dirs
4
+
5
+ - `src/api/**` — content types, controllers, services, routes, policies, middlewares, lifecycles
6
+ - `src/plugins/**` — local plugins (each with `server/` + `admin/` halves)
7
+ - `src/admin/app.tsx` / `src/admin/extensions/**` — admin UI customization
8
+ - `src/extensions/**` — overrides for core or installed plugins (e.g. `users-permissions`)
9
+ - `config/database.ts` / `config/server.ts` / `config/admin.ts` / `config/plugins.ts` / `config/middlewares.ts`
10
+ - `database/migrations/**` — Strapi-managed migrations (run on boot)
11
+ - `package.json` — `@strapi/strapi` version (v5 only in scope for this skill)
12
+
13
+ ## Stack boundaries
14
+
15
+ - Strapi v5: Document Service API, new lifecycle signatures, plugin auth changes
16
+ - Not in scope: Strapi v4 — controller/service signatures differ; use a separate v4 skill
17
+ - Frontend consumer changes (Next.js calling Strapi REST/GraphQL) → combine with `nextjs-patterns`
18
+ - DB schema work beyond Strapi schemas → combine with `database-patterns`
19
+ - Test work → use `vitest-patterns` or `jest-patterns` depending on test runner
20
+
21
+ ## Triggers
22
+
23
+ - Adding a new content type or modifying schema attributes/relations
24
+ - Adding a custom route, controller override, or service method
25
+ - Adding a policy, middleware, or lifecycle hook
26
+ - Changing `users-permissions` defaults for public/authenticated roles
27
+ - Modifying `config/plugins.ts` for installed plugin config
28
+ - Admin UI extension or custom field component
29
+ - Strapi v4 → v5 migration tasks
@@ -0,0 +1,47 @@
1
+ # Workflow
2
+
3
+ ## Implementation steps
4
+
5
+ 1. For a new content type, prefer the generator: `yarn strapi generate` (then choose `api`) — produces schema + controller + service + route skeleton.
6
+ 2. Edit `schema.json` to add attributes; set `draftAndPublish` if editors need staging.
7
+ 3. Implement business logic in `services/<name>.ts` via `factories.createCoreService` override; keep controllers thin.
8
+ 4. Define explicit `populate` per service method — never `"*"`.
9
+ 5. Add policies under `policies/` and reference them in `routes/<name>.ts` for protected endpoints.
10
+ 6. For schema renames or removals, write a migration in `database/migrations/<timestamp>-<name>.ts` and test on a dataset copy first.
11
+ 7. After adding routes, open the admin UI → Settings → Users & Permissions plugin → Roles → adjust public/authenticated permissions.
12
+ 8. Restart `yarn develop` and verify the endpoint via `curl` or the admin UI's API tester.
13
+ 9. Add a Vitest/Jest test for the service method using `strapi.factories` or a test bootstrap.
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ yarn develop # dev server with admin UI hot reload
19
+ yarn start # production server (no admin rebuild)
20
+ yarn build # build admin UI
21
+ yarn strapi generate # interactive generator (api/controller/service/policy/middleware)
22
+ yarn strapi console # REPL with `strapi` global
23
+ yarn strapi ts:generate-types # regenerate `types/generated/`
24
+ yarn strapi configuration:dump # export config snapshot
25
+ yarn strapi configuration:restore # restore from snapshot
26
+
27
+ # Database
28
+ yarn strapi db:migrate # apply pending migrations
29
+ yarn strapi db:seed # run seeders
30
+
31
+ # Plugin
32
+ yarn strapi plugin:build # build a local plugin
33
+ ```
34
+
35
+ ## Validation checklist
36
+
37
+ - [ ] Content type schemas use kebab-case singular/plural names consistently
38
+ - [ ] All custom routes have explicit `policies` for non-public access
39
+ - [ ] `users-permissions` roles updated for new endpoints (public 403 check)
40
+ - [ ] No `populate: "*"` in any service or controller — explicit shapes only
41
+ - [ ] Business logic lives in services, not controllers
42
+ - [ ] Lifecycle hooks idempotent — running twice produces same result
43
+ - [ ] `draftAndPublish` set explicitly where the editorial workflow requires it
44
+ - [ ] No raw Knex / `strapi.db.connection.raw` writes that bypass lifecycle hooks
45
+ - [ ] TS types regenerated (`yarn strapi ts:generate-types`) after schema changes
46
+ - [ ] No server-only imports in `src/admin/` (would break admin browser bundle)
47
+ - [ ] Regression test added before bug fix landed
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: vendure-app-patterns
3
+ description: Vendure app router. Use for app-level config, workers, jobs, and API extensions in a Vendure application.
4
+ ---
5
+
6
+ # Vendure App Patterns
7
+
8
+ ## Use when
9
+
10
+ - task updates Vendure app config, workers, bootstrap, or plugin wiring
11
+ - task touches `vendure-config.*`, `src/index.ts`, `worker.ts`, app bootstrap modules
12
+
13
+ ## Do not use when
14
+
15
+ - task is isolated shared plugin package work
16
+ - task is frontend-only storefront/admin UI work
17
+
18
+ ## Router
19
+
20
+ 1. Load `references/conventions.md` for naming, do/don't, and forbidden patterns.
21
+ 2. Inspect app entry/config files before touching plugin code.
22
+ 3. Load `references/scope.md` for app module boundaries.
23
+ 4. Load `references/workflow.md` only for startup/worker/debug flows.
24
+ 5. Validate both server and worker impact for changed behavior.
25
+
26
+ ## References
27
+
28
+ - references/conventions.md
29
+ - references/scope.md
30
+ - references/workflow.md
31
+
32
+ ## Reference Documentation
33
+
34
+ For the current API reference, fetch https://docs.vendure.io/llms.txt (an llms.txt index of the official docs) and follow the links it lists for the topic at hand.
@@ -0,0 +1,25 @@
1
+ ## Naming conventions
2
+
3
+ - App server entry: `src/index.ts`; worker entry: `src/worker.ts`
4
+ - Vendure config: `src/vendure-config.ts` exporting `config` of type `VendureConfig`
5
+ - Migration files: TypeORM auto-generated names (`src/migrations/TIMESTAMP-Description.ts`)
6
+ - Plugin directory: `src/plugins/<plugin-name>/` containing `<plugin-name>.plugin.ts`
7
+ - Env var consumption: via `process.env.VAR_NAME` at config level only; referenced in `.env.example`
8
+
9
+ ## Do / don't
10
+
11
+ DO: Order plugins in `VendureConfig.plugins` so dependencies come before dependents — DON'T: register plugins in arbitrary order (initialization order matters)
12
+ DO: Add every new env var to `.env.example` with a descriptive comment — DON'T: consume an env var in config without a corresponding `.env.example` entry
13
+ DO: Generate a new TypeORM migration for every schema change — DON'T: edit existing migration files (they may have already run in production)
14
+ DO: Test both server and worker bootstrap after any plugin or config change — DON'T: only verify server starts without checking worker
15
+ DO: Keep `src/vendure-config.ts` free of business logic — DON'T: add conditional logic or data transformations to the config file
16
+ DO: Import from `@vendure/core` public API only — DON'T: import from `@vendure/core/dist/...` internal paths (subject to breaking changes)
17
+
18
+ ## Forbidden patterns
19
+
20
+ NEVER: Plugin registered in config without its required env var present in `.env.example` — environment setup will silently fail
21
+ NEVER: Schema change deployed without a corresponding migration — production DB diverges from entity definitions
22
+ NEVER: Destructive migration without a data migration or archival plan — data loss in production
23
+ NEVER: Import from `@vendure/core` internal `dist/` paths — internal API is not stable
24
+ NEVER: Worker-only plugin registered in the server bootstrap (or vice versa) — causes initialization errors
25
+ NEVER: Hard-coded database credentials in `src/vendure-config.ts` — use environment variables
@@ -0,0 +1,29 @@
1
+ # Scope
2
+
3
+ ## In-scope files and dirs
4
+
5
+ - `src/vendure-config.ts` / `src/vendure-config.js` — main Vendure app configuration
6
+ - `src/index.ts` — server bootstrap (`bootstrapWorker`, `bootstrap`)
7
+ - `src/worker.ts` — worker process bootstrap
8
+ - `src/plugins/**` — app-level plugin wiring (local or imported)
9
+ - `src/migrations/**` — TypeORM migration files for the app DB
10
+ - `src/email/**` — email plugin templates and handlers
11
+ - `.env`, `.env.*` — DB connection strings, auth secrets, plugin API keys
12
+ - `docker-compose.yml` — local service dependencies (Postgres, Redis, Elasticsearch)
13
+
14
+ ## Stack boundaries
15
+
16
+ - Vendure 3 app layer: plugin registration, DB config, job queue, asset storage
17
+ - Worker: background job handlers, email processing, search indexing
18
+ - Not in scope: isolated shared plugin package code (use vendure-plugin-patterns)
19
+ - Not in scope: storefront/admin UI React components
20
+
21
+ ## Triggers
22
+
23
+ - Adding or removing a plugin from `VendureConfig.plugins`
24
+ - Changing DB connection config or entity schema requiring migration
25
+ - Adding or changing job queue strategy (in-memory, BullMQ, Redis)
26
+ - Changing asset storage strategy (local, S3, GCS)
27
+ - Adding or modifying email handler or template
28
+ - Changing worker-only vs server+worker plugin config split
29
+ - Adding environment variable consumed by app bootstrap
@@ -0,0 +1,45 @@
1
+ # Workflow
2
+
3
+ ## Implementation steps
4
+
5
+ 1. Open `src/vendure-config.ts` — plugin order matters; place plugins that depend on others after
6
+ 2. For new plugin: import and add to `plugins` array; provide required config options from env
7
+ 3. For schema changes: generate TypeORM migration after entity change; never edit existing migrations
8
+ 4. For worker-only plugins: add to `src/worker.ts` bootstrap; confirm not duplicated in `src/index.ts`
9
+ 5. For job queue changes: verify queue strategy config in `VendureConfig.jobQueueOptions`
10
+ 6. Start both server and worker locally; confirm startup logs show all plugins initialized
11
+ 7. For email changes: test template rendering with Vendure email plugin dev mode
12
+ 8. Run migration in dev before testing feature; rollback tested via TypeORM `migration:revert`
13
+
14
+ ## Commands
15
+
16
+ ```bash
17
+ # Start server + worker locally
18
+ yarn ts-node src/index.ts
19
+ yarn ts-node src/worker.ts
20
+
21
+ # Alternatively with tsx
22
+ yarn tsx src/index.ts
23
+
24
+ # TypeORM migrations
25
+ yarn typeorm migration:generate -- -n MigrationName -d src/vendure-config.ts
26
+ yarn typeorm migration:run -d src/vendure-config.ts
27
+ yarn typeorm migration:revert -d src/vendure-config.ts
28
+
29
+ # Build
30
+ yarn build / npm run build
31
+
32
+ # Tests
33
+ jest --testPathPattern e2e
34
+ jest --testPathPattern spec
35
+ ```
36
+
37
+ ## Validation checklist
38
+
39
+ - [ ] Plugin added to `plugins` array in correct position (order-dependent plugins sorted correctly)
40
+ - [ ] Required env vars documented and present in `.env.example`
41
+ - [ ] TypeORM migration generated and reviewed — no destructive column drops without data migration
42
+ - [ ] Worker bootstrap includes plugins that handle background jobs
43
+ - [ ] Server starts without errors: check plugin `init()` and DB connection logs
44
+ - [ ] Worker starts without errors: check job queue connection and registered job handlers
45
+ - [ ] Email templates rendered correctly using dev preview mode
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: vendure-plugin-patterns
3
+ description: Vendure 3 plugin router. Use for plugin modules, resolvers, services, entities, and migrations.
4
+ ---
5
+
6
+ # Vendure Plugin Patterns
7
+
8
+ ## Use when
9
+
10
+ - task changes plugin behavior in `packages/*`, `plugins/*`, or `src/plugins/*`
11
+ - task touches `@VendurePlugin`, plugin resolvers, services, or plugin entities
12
+
13
+ ## Do not use when
14
+
15
+ - task is storefront-only Next.js/React UI work
16
+ - task is generic NestJS API without Vendure plugin boundaries
17
+
18
+ ## Inspect first
19
+
20
+ - `vendure-config.*`, `*.plugin.ts`, `plugin.ts`
21
+ - plugin `api`/`resolvers`/`services`/`entities`/`migrations` files
22
+ - tests near changed feature (`*.spec.ts`, `*.e2e-spec.ts`)
23
+
24
+ ## Avoid mistakes
25
+
26
+ - adding resolver fields without schema or migration alignment
27
+ - leaking client-specific behavior into shared `@haus/vendure-*` packages
28
+ - skipping permission/channel checks in admin mutations
29
+
30
+ ## Router
31
+
32
+ 1. Load `references/conventions.md` for naming, do/don't, and forbidden patterns.
33
+ 2. Load `references/scope.md` for plugin file map.
34
+ 3. Load `references/workflow.md` only when implementing or debugging flow.
35
+ 4. Keep change scoped to one plugin boundary and verify.
36
+
37
+ ## References
38
+
39
+ - references/conventions.md
40
+ - references/scope.md
41
+ - references/workflow.md
42
+
43
+ ## Reference Documentation
44
+
45
+ For the current API reference, fetch https://docs.vendure.io/llms.txt (an llms.txt index of the official docs) and follow the links it lists for the topic at hand.
@@ -0,0 +1,27 @@
1
+ ## Naming conventions
2
+
3
+ - Plugin class: `XxxPlugin` decorated with `@VendurePlugin({ ... })`
4
+ - Resolver: `XxxResolver` decorated with `@Resolver()`
5
+ - Service: `XxxService` decorated with `@Injectable()`
6
+ - Entity: `XxxEntity` extending `VendureEntity`, decorated with `@Entity()`
7
+ - Admin SDL extension: `gqlAdminExtension` constant in `xxx.graphql.ts`
8
+ - Shop SDL extension: `gqlShopExtension` constant in `xxx.graphql.ts`
9
+ - Migration: TypeORM auto-generated name including plugin prefix
10
+
11
+ ## Do / don't
12
+
13
+ DO: Apply `@Allow(Permission.xxx)` to all admin API mutations — DON'T: leave admin mutations without a permission check
14
+ DO: Use `TransactionalConnection` for all database access in services — DON'T: inject raw TypeORM `Repository` or `EntityManager` directly
15
+ DO: Define SDL extensions (`gqlAdminExtension` / `gqlShopExtension`) before writing the resolver — DON'T: write resolver methods without the corresponding SDL type/field definition
16
+ DO: Register all plugin entities in `@VendurePlugin({ entities: [XxxEntity] })` — DON'T: define an entity without registering it (TypeORM won't create the table)
17
+ DO: Import only from `@vendure/core` public API — DON'T: import from `@vendure/core/dist/` internal paths
18
+ DO: Generate a migration for every entity schema change — DON'T: rely on `synchronize: true` in production
19
+
20
+ ## Forbidden patterns
21
+
22
+ NEVER: Admin API mutation without `@Allow(Permission.xxx)` decorator — unauthenticated admin write access
23
+ NEVER: Shop API mutation that can return or modify another customer's data without ownership check — data exposure
24
+ NEVER: Plugin that directly modifies core Vendure entity definitions — breaks core compatibility and upgrades
25
+ NEVER: Business logic or DB query inside a resolver method — delegate to service layer
26
+ NEVER: Entity not listed in `@VendurePlugin({ entities: [...] })` — TypeORM does not create/migrate the table
27
+ NEVER: Import from `@vendure/core` internal paths — unstable, breaks on Vendure upgrades
@@ -0,0 +1,30 @@
1
+ # Scope
2
+
3
+ ## In-scope files and dirs
4
+
5
+ - `src/plugins/**/plugin.ts`, `*.plugin.ts` — `@VendurePlugin` decorated module class
6
+ - `src/plugins/**/api/**` — GraphQL API extension files (schema extension, resolvers)
7
+ - `src/plugins/**/services/**` — plugin service classes injected into resolvers
8
+ - `src/plugins/**/entities/**` — TypeORM entity classes for plugin-specific DB tables
9
+ - `src/plugins/**/migrations/**` — TypeORM migrations for plugin entities
10
+ - `src/plugins/**/config/**` — plugin options interface and default config
11
+ - `src/plugins/**/*.spec.ts`, `src/plugins/**/*.e2e-spec.ts` — plugin tests
12
+ - `codegen.ts` (plugin-level) — GraphQL codegen config for generated types
13
+
14
+ ## Stack boundaries
15
+
16
+ - Vendure 3 plugin API: `@VendurePlugin`, `PluginCommonModule`, `EventBus`, `JobQueue`
17
+ - API extension: `SchemaExtensionScope` (shop/admin), custom resolver fields, custom mutations
18
+ - Entities: extend `VendureEntity` / use `@Entity()` with plugin-scoped migrations
19
+ - Not in scope: Vendure app-level config changes (use vendure-app-patterns)
20
+ - Not in scope: storefront Next.js/React components
21
+
22
+ ## Triggers
23
+
24
+ - Adding a new custom entity with DB migration
25
+ - Adding a new GraphQL mutation or query to shop or admin API
26
+ - Adding or changing plugin service business logic
27
+ - Adding resolver for a new field on existing Vendure type
28
+ - Changing plugin configuration options interface
29
+ - Adding EventBus subscriber to listen for Vendure core events
30
+ - Changing channel or permission checks in admin resolver
@@ -0,0 +1,42 @@
1
+ # Workflow
2
+
3
+ ## Implementation steps
4
+
5
+ 1. Start from `*.plugin.ts`: identify `SchemaExtensionScope`, entity list, and provider registrations
6
+ 2. For new entity: create TypeORM entity extending `VendureEntity`; generate migration; register in plugin `entities`
7
+ 3. For new API field: add to `gqlShopExtension` or `gqlAdminExtension` SDL; implement resolver method
8
+ 4. Apply `@Allow(Permission.*)` to admin mutations — check permission enum in Vendure core
9
+ 5. For shop API mutations: verify customer authentication check where required
10
+ 6. Implement service method called from resolver; inject `TransactionalConnection` for DB access
11
+ 7. Run codegen to regenerate plugin types after SDL change
12
+ 8. Write e2e spec: bootstrap Vendure test server, call mutation/query, assert DB state
13
+
14
+ ## Commands
15
+
16
+ ```bash
17
+ # Generate TypeORM migration for plugin entity
18
+ yarn typeorm migration:generate -- -n PluginEntityMigration -d src/vendure-config.ts
19
+
20
+ # GraphQL codegen (plugin-level)
21
+ yarn graphql-codegen --config codegen.ts
22
+
23
+ # Type check
24
+ yarn tsc --noEmit
25
+
26
+ # Run plugin e2e tests
27
+ jest --testPathPattern e2e-spec
28
+ jest --testPathPattern plugin-name
29
+
30
+ # Build plugin package
31
+ yarn build / yarn tsup src/index.ts
32
+ ```
33
+
34
+ ## Validation checklist
35
+
36
+ - [ ] Plugin entity registered in `@VendurePlugin({ entities: [...] })` array
37
+ - [ ] Migration generated and reviewed before testing schema-dependent behavior
38
+ - [ ] Admin mutations decorated with `@Allow(Permission.*)` — no unprotected admin writes
39
+ - [ ] Shop mutations check customer authentication where user-specific data accessed
40
+ - [ ] Resolver delegates to service — no direct DB queries in resolver methods
41
+ - [ ] Plugin does not import from Vendure internal paths (only `@vendure/core`)
42
+ - [ ] e2e spec covers success path, unauthorized access, and invalid input rejection
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: whats-installed
3
+ description: Use when someone asks what is installed in this project, what they can ask for, what haus set up, where to start, or for a menu of available skills and helpers — especially when the person asking is not a developer. Triggers include "what's installed", "what can I ask for", "what can you help with here", "start here", "vad är installerat", "vad kan jag be om hjälp med".
4
+ ---
5
+
6
+ # What's Installed
7
+
8
+ Turn the machine inventory of haus-installed content into a plain-language
9
+ menu the person in front of you can act on. The reader may be a project
10
+ manager, a designer, or a content person — never assume they know git, the
11
+ file tree, or what a "skill" is.
12
+
13
+ ## Where the inventory lives
14
+
15
+ Read, in this order:
16
+
17
+ 1. `haus.json` at the project root: the haus release and the packages this
18
+ project gets (`software-engineering`, a stack package such as `web-react`).
19
+ 2. `.haus-workflow/synced.json`: what `haus sync` installed from those packages,
20
+ one entry per skill or agent folder with its path. Prefer this for the list.
21
+ 3. If it is missing, list what is on disk instead:
22
+ `.claude/skills/`, `.claude/agents/`, `.claude/commands/`,
23
+ `.claude/rules/`, `.claude/templates/`.
24
+ 4. `.claude/templates/start-here.md`: a plain-language onboarding page. If
25
+ it exists and the reader is non-technical, mention it as the standing
26
+ reference they can come back to without you.
27
+
28
+ ## How to answer
29
+
30
+ - **Answer in the language the person asked in.**
31
+ - **Group by what the reader can do, not by item type.** "Working with code",
32
+ "Reviewing and quality", "Writing and planning", "Project rules" — not
33
+ "skills, agents, rules, templates".
34
+ - **Translate ids into outcomes.** `haus.react-router-v7-patterns`
35
+ becomes "guidance for the routing library this app uses" — say what
36
+ it helps with, never recite the id at a non-technical reader.
37
+ - **One line per item, phrased as something to say.** "Ask me to review a
38
+ change before it ships" beats "code-review skill available".
39
+ - **Match depth to the reader.** A developer can get ids, versions, and
40
+ paths on request; a non-technical reader gets the menu and example
41
+ requests only.
42
+ - **Never dump raw JSON**, the record files, or directory listings into the
43
+ conversation: that is the inventory, not the answer.
44
+ - **End with two or three example requests** tailored to this specific
45
+ project, so the reader can copy one and go.
46
+
47
+ ## Do not
48
+
49
+ - Do not install, remove, or update anything — this skill is read-only.
50
+ Changing what is installed is the haus CLI's job (`haus.json`, then
51
+ `haus sync`), run by a developer.
52
+ - Do not list items that are not actually present in this project.
53
+ - Do not recite `.haus-workflow/WORKFLOW.md` at a non-technical reader.
54
+ If they ask about the team's working rules, summarize only the part they
55
+ asked about, in plain language.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: wordpress-acf-elementor-jetengine-patterns
3
+ description: WordPress builder-data router. Use for ACF, Elementor Pro, and JetEngine data/model wiring.
4
+ ---
5
+
6
+ # WordPress ACF Elementor JetEngine Patterns
7
+
8
+ ## Use when
9
+
10
+ - task changes field groups, dynamic templates, listing/grid data, or meta schema
11
+ - task touches ACF JSON/PHP registration, Elementor template hooks, or JetEngine config
12
+
13
+ ## Do not use when
14
+
15
+ - task is generic theme/plugin hook logic without builder/meta impact
16
+ - task is unrelated backend API/service behavior
17
+
18
+ ## Inspect first
19
+
20
+ - ACF field registration (`acf-json/`, PHP field group registration)
21
+ - Elementor template/widget integration files
22
+ - JetEngine custom content type/meta/listing config files
23
+
24
+ ## Avoid mistakes
25
+
26
+ - renaming field keys and breaking existing content mappings
27
+ - coupling presentation templates to unstable raw meta structures
28
+ - missing sanitization/escaping in dynamic output
29
+
30
+ ## Router
31
+
32
+ 1. Load `references/conventions.md` for naming, do/don't, and forbidden patterns.
33
+ 2. Load `references/scope.md` for builder-specific file map.
34
+ 3. Load `references/workflow.md` only when tracing data-to-template flow.
35
+ 4. Preserve backward compatibility for existing field/meta keys.
36
+
37
+ ## References
38
+
39
+ - references/conventions.md
40
+ - references/scope.md
41
+ - references/workflow.md
@@ -0,0 +1,25 @@
1
+ ## Naming conventions
2
+
3
+ - ACF field keys: `snake_case` (e.g. `hero_title`, `cta_button_url`)
4
+ - PHP widget classes: `My_Plugin_Widget_Name` extending `\Elementor\Widget_Base`
5
+ - JetEngine content type slugs: `kebab-case` (e.g. `team-member`, `project-case`)
6
+ - ACF JSON directory: `acf-json/` in theme or plugin root — must be committed to version control
7
+ - JetEngine export JSON: `jet-engine-exports/` directory — committed to version control
8
+
9
+ ## Do / don't
10
+
11
+ DO: Update ALL `get_field('old_key')` / `the_field('old_key')` call sites before or simultaneously with renaming an ACF field key — DON'T: rename ACF field key without searching and updating every callsite
12
+ DO: Commit `acf-json/` directory to version control — DON'T: rely on database-only ACF field group definitions across environments
13
+ DO: Escape all output with appropriate function: `esc_html()`, `esc_url()`, `esc_attr()`, `wp_kses_post()` — DON'T: echo unescaped ACF field values directly
14
+ DO: Register Elementor widgets inside the `elementor/widgets/register` hook — DON'T: register widgets outside this hook (causes load-order errors)
15
+ DO: Check return value of `get_field()` before using it (`if ($value = get_field(...)) { ... }`) — DON'T: assume `get_field()` always returns a usable value
16
+ DO: Export JetEngine content type config to JSON and commit it — DON'T: make JetEngine config changes only in the database
17
+
18
+ ## Forbidden patterns
19
+
20
+ NEVER: ACF field renamed without updating all `get_field()` / `the_field()` callsites — returns empty values silently
21
+ NEVER: Dynamic output without an escaping function — XSS vulnerability
22
+ NEVER: Reference ACF field by label string (use the field key) — labels change; keys are stable identifiers
23
+ NEVER: JetEngine config change not exported to JSON and committed — config lost on DB reset or environment sync
24
+ NEVER: Elementor widget registered outside `elementor/widgets/register` hook — causes class-not-found errors
25
+ NEVER: `acf-json/` directory excluded from version control — field group changes cannot be deployed reliably
@@ -0,0 +1,28 @@
1
+ # Scope
2
+
3
+ ## In-scope files and dirs
4
+
5
+ - `acf-json/` — ACF field group JSON sync files (auto-saved by ACF UI)
6
+ - `inc/acf/**`, `functions.php` sections with `acf_add_local_field_group()` — PHP field registration
7
+ - `inc/elementor/**`, `src/elementor/**` — custom Elementor widget PHP classes
8
+ - `templates/elementor/**` — Elementor template PHP files with dynamic tag integration
9
+ - `inc/jetengine/**` — JetEngine custom content type registration, relations, query config
10
+ - `config/jet-engine/**` — JetEngine exported config JSON (if using import/export)
11
+ - `inc/acf-to-rest/**` — ACF REST API exposure configuration
12
+
13
+ ## Stack boundaries
14
+
15
+ - ACF: field groups, field keys, conditional logic, `get_field()`, `get_sub_field()`, flexible content
16
+ - Elementor Pro: dynamic tags, widget registration, `\Elementor\Widget_Base` extensions
17
+ - JetEngine: custom post types, custom taxonomies, meta fields, listing grids, query builder
18
+ - Not in scope: generic WordPress hook logic without builder/ACF field integration
19
+ - Not in scope: Elementor template design (visual editor only changes)
20
+
21
+ ## Triggers
22
+
23
+ - Adding, renaming, or restructuring an ACF field group or field key
24
+ - Adding a custom Elementor widget class
25
+ - Registering or changing a JetEngine custom content type or meta field
26
+ - Wiring an ACF field to a JetEngine relation
27
+ - Adding a dynamic tag to expose ACF data in Elementor
28
+ - Changing ACF `get_field()` call to updated field key
@@ -0,0 +1,41 @@
1
+ # Workflow
2
+
3
+ ## Implementation steps
4
+
5
+ 1. For ACF field changes: make changes in WP admin ACF UI → ACF auto-saves to `acf-json/` → commit JSON
6
+ 2. For field key renames: update ALL `get_field('old_key')` calls before renaming — or migrate existing content
7
+ 3. For Elementor widget: create PHP class extending `\Elementor\Widget_Base`; register via `elementor/widgets/register` hook
8
+ 4. For JetEngine content type: configure in WP admin; export config JSON; commit to `config/jet-engine/`
9
+ 5. For dynamic tags: register tag class extending `\Elementor\Core\DynamicTags\Tag`; return ACF field value
10
+ 6. Sanitize and escape all dynamic output: `esc_html()`, `esc_url()`, `wp_kses_post()` as appropriate
11
+ 7. Test with real content: populate ACF fields; preview Elementor template with dynamic data enabled
12
+
13
+ ## Commands
14
+
15
+ ```bash
16
+ # WP-CLI commands
17
+ wp acf sync # sync ACF field groups from JSON files
18
+ wp post list --post_type=custom-type # list custom post type entries
19
+
20
+ # Local development
21
+ wp-env start # if using @wordpress/env
22
+ # or: Local by Flywheel / Valet / DDEV
23
+
24
+ # PHP linting
25
+ composer run lint # project-specific lint script
26
+ phpcs --standard=WordPress src/ # WordPress coding standards check
27
+ phpcbf --standard=WordPress src/ # auto-fix
28
+
29
+ # Composer
30
+ composer install # install PHP dependencies
31
+ ```
32
+
33
+ ## Validation checklist
34
+
35
+ - [ ] Renamed ACF field keys: all `get_field('key')` call sites updated
36
+ - [ ] `acf-json/` directory committed with updated field group JSON
37
+ - [ ] Elementor widget registered via `elementor/widgets/register` hook — not deprecated hook
38
+ - [ ] Dynamic output escaped: `esc_html()` for text, `esc_url()` for URLs, `wp_kses_post()` for HTML
39
+ - [ ] JetEngine content type config JSON exported and committed
40
+ - [ ] ACF fields exposed to REST API only if frontend consumption requires it
41
+ - [ ] Template tested with empty/null field values — conditional ACF output handles missing data
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: wordpress-bedrock-patterns
3
+ description: Bedrock router. Use for Roots/Bedrock env/config/bootstrap and WordPress deployment layout concerns.
4
+ ---
5
+
6
+ # WordPress Bedrock Patterns
7
+
8
+ ## Use when
9
+
10
+ - task changes Bedrock config, environment loading, or web/app separation
11
+ - task touches `config/`, `web/`, `composer.json`, or environment mapping files
12
+
13
+ ## Do not use when
14
+
15
+ - task is normal WordPress hook/template logic without Bedrock config impact
16
+ - task is infrastructure outside project repo deployment assumptions
17
+
18
+ ## Inspect first
19
+
20
+ - `config/application.php`, environment-specific config files
21
+ - `composer.json` and Bedrock package wiring
22
+ - `web/app` structure for mu-plugins/themes/plugins placement
23
+
24
+ ## Avoid mistakes
25
+
26
+ - mixing production secrets into committed config
27
+ - changing env precedence and breaking boot order
28
+ - placing code under wrong Bedrock directory root
29
+
30
+ ## Router
31
+
32
+ 1. Load `references/conventions.md` for naming, do/don't, and forbidden patterns.
33
+ 2. Load `references/scope.md` for Bedrock path boundaries.
34
+ 3. Load `references/workflow.md` only for bootstrap/config flow debugging.
35
+ 4. Keep WordPress runtime logic in WP skills, not Bedrock config files.
36
+
37
+ ## References
38
+
39
+ - references/conventions.md
40
+ - references/scope.md
41
+ - references/workflow.md