fix(boundaries): allow feature-to-feature imports of public exports

turbo.json's boundary config already allows `feature -> feature`, and
the cross-feature event system depends on it — a consumer must import
the publisher's event contract from `@repo/<publisher>`. But the ESLint
boundaries config, ADR-010, and AGENTS.md still declared
`feature -> [core, tooling]`, contradicting turbo.json and the shipped
code (marketing-pages imports @repo/auth).

Align all three to turbo.json: a feature may import another feature's
published public exports. Internals stay sealed by the `exports` map,
and cross-feature behaviour still flows through IEventBus.
This commit is contained in:
2026-05-21 14:30:37 +02:00
parent f69b53d73e
commit f3182537c1
3 changed files with 36 additions and 11 deletions

View File

@@ -64,7 +64,7 @@ See `docs/guides/runbook.md` for the full workflow.
| app | app, core, core-composition, feature, tooling |
| core-composition | core, core-composition, feature, tooling |
| core | core, core-composition, tooling |
| feature | core, tooling |
| feature | core, feature, tooling |
| tooling | tooling |
### Composition exceptions
@@ -81,7 +81,7 @@ No other cross-package boundary deviations are permitted.
2. **`exports` maps** feature packages expose `.`, `./ui`, `./cms`, `./api`, `./di/bind-production`, `./di/bind-dev-seed` only; no deep source paths exist.
3. **ESLint `eslint-plugin-boundaries`** (lint-time) configured in `packages/core-eslint/`:
- Enforces the five-tag rules at linting
- Feature packages may import from `core` and tooling only.
- Feature packages may import from `core`, tooling, and other features' public exports (the `@repo/<feature>` contract barrel e.g. an event contract a consumer subscribes to). They must not reach another feature's internals (the `exports` map seals those) or call its use cases directly cross-feature behaviour flows through `IEventBus`.
- `core-shared`, `core-ui` may not import any feature.
- `core-api` restricted to `@repo/<feature>/api` imports.
- `core-cms` restricted to `@repo/<feature>/cms` imports.