From 5a2234f7ad42e69350f12a07c06e812c6caf7b10 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Fri, 8 May 2026 17:51:35 +0200 Subject: [PATCH] docs: refresh per-package AGENTS.md + di-explainer to current binders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Six per-package AGENTS.md tables and the di-explainer wiring trace all showed pre-ADR-014 binder shapes. Refreshed to the post-ADR-015 reality: - Per-package "Public exports" tables now show the (config, tracer, logger, bus, queue) production signature and the (tracer, logger, bus, queue) dev-seed companion. auth and marketing-pages also list their newly-public ./di/container, ./di/symbols, and (marketing-pages only) ./services/mailer + ./services/recording-mailer subpaths. - di-explainer's wiring trace adds the resolveEventsAndJobs* step in bindAll(), the (config, tracer, logger, bus, queue) binder signature, and the // / // injection sites. No code change; pre-existing AGENTS.md staleness predates ADR-014 + ADR-015 — this commit catches both up. --- docs/architecture/di-explainer.html | 7 +++++-- packages/auth/AGENTS.md | 5 ++++- packages/blog/AGENTS.md | 3 ++- packages/marketing-pages/AGENTS.md | 7 ++++++- packages/media/AGENTS.md | 3 ++- packages/navigation/AGENTS.md | 3 ++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/architecture/di-explainer.html b/docs/architecture/di-explainer.html index a6566a5..438438a 100644 --- a/docs/architecture/di-explainer.html +++ b/docs/architecture/di-explainer.html @@ -1188,9 +1188,12 @@ footer .colophon {
bindAll()
   └─ resolveInstrumentation()         ← Rule 0 (DSN check)
        └─ Noop or Sentry binders      ← bind to sharedContainer
-  └─ bindProductionX(config, tracer, logger)
+  └─ resolveEventsAndJobs*()          ← ADR-015 (env-driven bus + queue)
+       └─ Payload-backed in prod, in-memory in dev-seed
+  └─ bindProductionX(config, tracer, logger, bus, queue)
        └─ feature container also binds TRACER + LOGGER
-       └─ withSpan(withCapture(...)) at every use case + controller
+ └─ withSpan(withCapture(...)) at every use case + controller + └─ // <gen:event-handlers> / // <gen:jobs> injection sites

Why per-feature containers also get the binding: repository classes resolve TRACER/LOGGER through the container; controllers and use cases receive instrumentation via the bind-time wrapper instead.

diff --git a/packages/auth/AGENTS.md b/packages/auth/AGENTS.md index 455cf53..ae6ffca 100644 --- a/packages/auth/AGENTS.md +++ b/packages/auth/AGENTS.md @@ -31,7 +31,10 @@ Users collection + authentication use cases (sign-in, sign-up, sign-out). Provid | `./ui` | Placeholder — extend here when auth gains React Query builders, never re-add to root | | `./api` | `authRouter` (tRPC router) | | `./cms` | Payload Users collection definition | -| `./di/bind-production` | `bindProductionAuth(container, config)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-production` | `bindProductionAuth(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-dev-seed` | `bindDevSeedAuth(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook | +| `./di/container` | `authContainer` — the per-feature inversify container (consumed by e2e tests + production Payload event-tasks) | +| `./di/symbols` | `AUTH_SYMBOLS` — DI symbol registry (consumed by e2e tests + production Payload event-tasks) | ## Use-case + controller patterns diff --git a/packages/blog/AGENTS.md b/packages/blog/AGENTS.md index 9823832..7e02a64 100644 --- a/packages/blog/AGENTS.md +++ b/packages/blog/AGENTS.md @@ -29,7 +29,8 @@ Articles collection + content use cases (get articles, get article by slug, crea | `./ui` | `articleBySlugQuery`, `listArticlesQuery` — React Query option builders | | `./api` | `blogRouter` (tRPC router) | | `./cms` | Payload Articles collection definition | -| `./di/bind-production` | `bindProductionBlog(container, config)` | +| `./di/bind-production` | `bindProductionBlog(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-dev-seed` | `bindDevSeedBlog(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook | ## Use-case + controller patterns diff --git a/packages/marketing-pages/AGENTS.md b/packages/marketing-pages/AGENTS.md index cc7fe56..4d4e90d 100644 --- a/packages/marketing-pages/AGENTS.md +++ b/packages/marketing-pages/AGENTS.md @@ -29,7 +29,12 @@ Pages collection + SiteSettings global for site-wide metadata. Provides marketin | `./ui` | `pageBySlugQuery`, `siteSettingsQuery` — React Query option builders | | `./api` | `marketingPagesRouter` (tRPC router) | | `./cms` | Payload Pages collection + SiteSettings global | -| `./di/bind-production` | `bindProductionMarketingPages(container, config)` | +| `./di/bind-production` | `bindProductionMarketingPages(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-dev-seed` | `bindDevSeedMarketingPages(tracer, logger, bus, queue)` — replaces the default empty mocks with populated ones for dev / Storybook | +| `./di/container` | `marketingPagesContainer` — the per-feature inversify container (consumed by e2e tests + production Payload event-tasks) | +| `./di/symbols` | `MARKETING_PAGES_SYMBOLS` — DI symbol registry (consumed by e2e tests + production Payload event-tasks) | +| `./services/mailer` | `IMailerService` — interface for the welcome-email seam (ADR-015 proof-of-life) | +| `./services/recording-mailer` | `RecordingMailerService` — test / dev-seed mailer that records calls instead of sending | ## Use-case + controller patterns diff --git a/packages/media/AGENTS.md b/packages/media/AGENTS.md index 7d2fb53..41ab5dc 100644 --- a/packages/media/AGENTS.md +++ b/packages/media/AGENTS.md @@ -33,7 +33,8 @@ Media upload collection (images, PDFs, etc.) and media-related use cases (get, l | `./ui` | Placeholder — extend here when media gains React Query builders, never re-add to root | | `./api` | `mediaRouter` (tRPC router) | | `./cms` | Payload Media collection definition | -| `./di/bind-production` | `bindProductionMedia(container, config)` | +| `./di/bind-production` | `bindProductionMedia(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-dev-seed` | `bindDevSeedMedia(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook | ## Use-case + controller patterns diff --git a/packages/navigation/AGENTS.md b/packages/navigation/AGENTS.md index fbdc26e..45f998c 100644 --- a/packages/navigation/AGENTS.md +++ b/packages/navigation/AGENTS.md @@ -29,7 +29,8 @@ Header global for main site navigation. Provides the Header Payload global and t | `./ui` | `headerQuery` — React Query option builder | | `./api` | `navigationRouter` (tRPC router) | | `./cms` | Payload Header global definition | -| `./di/bind-production` | `bindProductionNavigation(container, config)` | +| `./di/bind-production` | `bindProductionNavigation(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot | +| `./di/bind-dev-seed` | `bindDevSeedNavigation(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook | ## Use-case + controller patterns