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
These operations belong to the same feature but have distinct responsibilities.
Keeping them in one module makes changes harder to review and obscures which code owns a particular part of the manifest contract.
Proposed direction
Extract focused internal modules for:
Schema definitions and derived public types.
Settings normalization and hook configuration.
Record normalization and metadata inference.
Reconciliation and version hashing.
Hook execution and file writing.
Keep index.js as the public facade.
Choose the final boundaries around dependency direction so the extraction does not create circular imports.
Continue using the schema as the source of truth for its derived types.
Acceptance criteria
Existing public exports and supported import paths remain compatible.
Generated schema content remains unchanged.
For equivalent inputs, manifest entries, ordering, revisions, integrity values, version hashes, warnings, and hook behavior remain equivalent.
Existing manifest/build tests pass, with focused regression coverage for any boundary that proves difficult to preserve.
No generated declaration artifacts are left in the working tree after any necessary type-build checks.
Sequencing
This can follow #294 independently of the watch refactor.
Keep it a behavior-preserving extraction and track any discovered semantic changes separately.
Problem
lib/domstack-manifest/index.js contains 1,044 lines covering schema declarations and derived types, option normalization, output records, reconciliation, content hashing, metadata inference, hooks, and file I/O.
These operations belong to the same feature but have distinct responsibilities.
Keeping them in one module makes changes harder to review and obscures which code owns a particular part of the manifest contract.
Proposed direction
Extract focused internal modules for:
Keep
index.jsas the public facade.Choose the final boundaries around dependency direction so the extraction does not create circular imports.
Continue using the schema as the source of truth for its derived types.
Acceptance criteria
Sequencing
This can follow #294 independently of the watch refactor.
Keep it a behavior-preserving extraction and track any discovered semantic changes separately.