Files
agentic-dev/docs/architecture/template-tiers.md
Danijel Martinek efd654e552 docs(core-analytics): update conformance-quickref, CLAUDE.md, template-tiers
Add the seventh ESLint rule (no-undeclared-analytics-event) to the rule
table in conformance-quickref.md and the drift patterns section. Update
the rule count in CLAUDE.md from six to seven. Add core-analytics to the
optional-cores table in template-tiers.md pointing at ADR-024 and the
new analytics guide.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 16:04:19 +00:00

30 lines
1.9 KiB
Markdown

# Template tiers
This template ships in three tiers:
## Must-have (always present)
- `@repo/core-shared` — protocol types, `BindContext`, instrumentation interfaces, jobs interface, tRPC primitives, payload helpers
- `@repo/core-eslint` — flat-config preset + repo-rules ESLint plugin + boundaries
- `@repo/core-typescript` — tsconfig presets (base, react-library, nextjs)
- `@repo/core-testing` — vitest helpers, factories, mocks, contracts
- `@repo/core-cms` — Payload config base
- `@repo/core-api` — top-level tRPC router root (mounts feature routers)
Plus all 5 feature packages: auth, blog, marketing-pages, navigation, media.
## Optional (scaffolded on demand)
| Package | Generator | ADR | Guide |
| -------------- | --------------------------------------- | ------- | ----------------------------------- |
| core-realtime | `pnpm turbo gen core-package realtime` | ADR-016 | docs/guides/realtime.md |
| core-events | `pnpm turbo gen core-package events` | ADR-015 | docs/guides/events-and-jobs.md |
| core-trpc | `pnpm turbo gen core-package trpc` | (none) | (none) |
| core-ui | `pnpm turbo gen core-package ui` | (none) | (none) |
| core-audit | `pnpm turbo gen core-package audit` | ADR-018 | docs/guides/audit-and-compliance.md |
| core-analytics | `pnpm turbo gen core-package analytics` | ADR-024 | docs/guides/analytics.md |
## Why optional
Each optional package addresses a specific need (realtime delivery, cross-feature events, tRPC, design system). Projects that don't need them get a slimmer template. The generator emits byte-identical copies of the packages as they shipped — see `turbo/generators/__snapshots__/core-package/<name>.snapshot.json` for the canonical content hashes.