Repository navigation
refactor: enforce features/ structure for all library packages - #263
Conversation
Remove domain/query library exceptions from ADR-002. Restructure riviere-extract-ts, riviere-builder, and riviere-query to use features/ sub-folders. Update dep cruiser root-structure rule, eslint ignore paths, typedoc entry points, and fixture imports to match new structure. Co-Authored-By: Claude Opus 4.6 <[email protected]>
📝 WalkthroughWalkthroughThis PR moves package public entry points to package-root barrels ( Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@packages/riviere-builder/src/platform/domain/collection-utils/deduplicate.spec.ts`:
- Line 2: The test file deduplicate.spec.ts under the platform domain layer
imports and tests the features-layer function deduplicateStateTransitions; move
that test file so it sits next to the implementation of
deduplicateStateTransitions in the features building/domain/enrichment tests,
update the import to a local relative import (remove cross-layer import), and
run tests to ensure no remaining platform→features test dependency remains.
In `@packages/riviere-extract-ts/src/index.ts`:
- Around line 15-33: The public barrel currently exports the 11 internal rule
functions (evaluateLiteralRule, evaluateFromClassNameRule,
evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule,
evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule,
evaluateFromGenericArgRule, evaluateFromMethodSignatureRule,
evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule); remove these
from the public export list in packages/riviere-extract-ts/src/index.ts and
either re-export them from an internal testing path (e.g., ./internal or
./testing) or keep them as non-exported/private functions inside
./features/extraction/domain/value-extraction; update any unit tests to import
from the new internal path if needed and ensure public API continues to export
only applyTransforms, ExtractionError, ExtractionContext/Result types,
ParameterInfo, and MethodSignature so consumers use
ExtractionConfig/extractComponents only.
Move deduplicateStateTransitions tests from platform layer to features/building/domain/enrichment (fixes cross-layer test dependency). Remove 11 internal evaluate*Rule functions from riviere-extract-ts public API (only used internally). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Deploying living-architecture with
|
| Latest commit: |
dd75d31
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7fc5c7f3.living-architecture.pages.dev |
| Branch Preview URL: | https://refactor-enforce-features-st.living-architecture.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@packages/riviere-builder/src/features/building/domain/enrichment/deduplicate-transitions.spec.ts`:
- Around line 49-92: Add a test that covers the reverse trigger-asymmetry: call
deduplicateStateTransitions with an existing transition that includes trigger:
'submit' and an incoming transition without a trigger (both with same from/to)
and assert the incoming one is treated as non-duplicate (i.e., result contains
the incoming transition or the expected retained transition). Locate the test
suite around deduplicate-transitions.spec.ts where other trigger-asymmetry cases
are defined and mirror the structure of the existing "treats different triggers
as non-duplicates" test but swap which side has the trigger.
…t timeout Remove 11 evaluate*Rule functions from value-extraction index (knip flagged as unused). Increase riviere-extract-ts testTimeout to 15s to address flaky test failures under parallel load (see #264). Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/index.ts`:
- Around line 8-10: The exports here use fragile deep-relative imports for
applyTransforms and ExtractionError (from '../../../../platform/...'); replace
them with a stable import surface—either add a barrel file in platform/domain
(exporting string-transforms/transforms and ast-literals/literal-detection) and
re-export from that barrel, or configure a TypeScript path alias (e.g.,
`@platform/domain/`*) and update the exports to import applyTransforms and
ExtractionError from the new stable path; update the export statements in
index.ts to reference the barrel or alias so cross-boundary moves won't break.
Covers case where existing has trigger but incoming does not. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|



Summary
features/structureriviere-extract-ts,riviere-builder, andriviere-queryintosrc/features/{name}/domain/Test plan
nx run-many -t build)nx run-many -t test)pnpm depcruise)🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Documentation
Tests
Chores