Purpose
Validate that experimental.chat.system.transform correctly injects layered cacheable prefixes and compaction instructions into the system prompt.
Technical Details
- Mock
ctx with minimal plugin interface
- Create fixture: session with 4 layers (core_prefix, repo_profile, task_slice, issue_slice)
- Assert: output.system receives layered prefix block + compaction instruction
- Assert: disabled layers are excluded
- Assert: empty layers produce no prefix block
- Assert: layer order matches config order (1→2→3→4)
Files to Create
test/e2e/system-transform.test.ts
test/fixtures/mock-plugin-context.ts
test/fixtures/sample-layers.ts
Acceptance Criteria
Purpose
Validate that
experimental.chat.system.transformcorrectly injects layered cacheable prefixes and compaction instructions into the system prompt.Technical Details
ctxwith minimal plugin interfaceFiles to Create
test/e2e/system-transform.test.tstest/fixtures/mock-plugin-context.tstest/fixtures/sample-layers.tsAcceptance Criteria
bun test test/e2e/system-transform.test.ts