You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(adf): split bundler orchestration from pure merge logic #8
packages/adf/src/bundler.ts currently combines manifest parsing, trigger resolution,
AST merge/transformation, token estimation, and orchestration/file loading concerns.
This raises cognitive load and couples pure transformation behavior to orchestration paths.
Evidence:
Manifest parsing in bundler: packages/adf/src/bundler.ts:29
Trigger resolution in bundler: packages/adf/src/bundler.ts:160
Merge and token estimation in bundler: packages/adf/src/bundler.ts:331
Scope
Extract manifest parsing/trigger resolution to packages/adf/src/manifest.ts.
Extract pure merge/token-estimation functions to packages/adf/src/merger.ts.
Keep bundler.ts as orchestration shell only:
load manifest
resolve module paths
read content
parse docs
call pure merger/evaluator
Acceptance Criteria
Merge utilities are pure and independently unit-tested without filesystem mocks.
bundler.ts no longer defines merge/token estimation internals.
CLI behavior for adf bundle is unchanged for existing fixtures/tests.
Existing bundle tests pass; add focused tests for extracted merger.ts.
Test Plan
pnpm run test --filter @stackbilt/adf
Add unit tests for:
duplicate-section merge behavior across content types
Activity
SmartBrandStrategies commentedon Mar 2, 2026
Blocks #9 — the unified evidence pipeline depends on the clean merge/manifest boundaries this refactor introduces.
docs(feedback): add ADX-007 architecture cohesion audit
docs(release): add phased sequencing and version bump gate to v0.6.0 …
refactor(adf): split bundler into manifest.ts and merger.ts (closes #8)