docs(scaffolding): event/job generators reference
This commit is contained in:
@@ -90,6 +90,18 @@ feature on the app's runtime composition graph:
|
||||
|
||||
The same checklist is printed by the generator when it finishes.
|
||||
|
||||
## Adding events and jobs to a feature
|
||||
|
||||
Once a feature exists, augment it with cross-feature events or background jobs using the dedicated generators. See [`docs/guides/events-and-jobs.md`](./events-and-jobs.md) for full walkthroughs.
|
||||
|
||||
```bash
|
||||
pnpm turbo gen event publish # publisher contract
|
||||
pnpm turbo gen event consume # consumer handler + Payload event-task
|
||||
pnpm turbo gen job # background job + TaskConfig
|
||||
```
|
||||
|
||||
The generators insert at six fixed `// <gen:*>` anchor comments. Generated features include four of them automatically (the `// <gen:job-tasks>` location is in `integrations/cms/index.ts`, which is manually authored as part of Phase-2 wiring); pre-existing features were retrofitted in ADR-015.
|
||||
|
||||
## Cross-links
|
||||
|
||||
- `CLAUDE.md` — Key Conventions (factory-style use cases, `.toDynamicValue()`,
|
||||
@@ -99,3 +111,4 @@ The same checklist is printed by the generator when it finishes.
|
||||
- `docs/decisions/adr-012-lazar-conformance.md` — file naming + factory pattern
|
||||
- `docs/decisions/adr-013-input-output-unification.md` — schemas-in-use-case + presenter
|
||||
- `docs/decisions/adr-014-instrumentation-sentry.md` — span + capture wiring (R41–R44)
|
||||
- `docs/decisions/adr-015-events-and-jobs.md` — cross-feature events + background jobs
|
||||
|
||||
Reference in New Issue
Block a user