Files
callstack__agent-device/scripts/layering/replay-ownership.ts
Michał Pierzchała caa3dc23f9 refactor: dissolve caller-side src/replay into command and CLI owners (#2151)
* refactor: dissolve caller-side replay ownership

* fix: remove replay test-only export

* fix: restore replay loader promise boundary
2026-08-31 10:01:16 +02:00

18 lines
632 B
TypeScript

import type { LayeringViolation } from './model.ts';
const RETIRED_REPLAY_ROOT = 'src/replay/';
export const REPLAY_OWNERSHIP_RULE = 'R71 replay-ownership';
export function replayOwnershipViolations(sourceFiles: readonly string[]): LayeringViolation[] {
return sourceFiles
.filter((file) => file.startsWith(RETIRED_REPLAY_ROOT))
.map((file) => ({
rule: REPLAY_OWNERSHIP_RULE,
file,
line: 1,
message:
`${RETIRED_REPLAY_ROOT} is retired; caller source acquisition belongs under ` +
'src/commands/replay/ and replay-test presentation belongs under src/cli/replay-test/.',
}));
}