19786c96f8
These were pre-existing failures (stale tests, not source bugs): - getNextStep walks steps ordered by `seq`, not array order (ai-act seq 350 sits before import 400). The tests assumed array order; derive the expectations from the seq-sorted sequence instead. - buildDocumentScope: a document required only by the level matrix is `mandatory` but may be `medium` priority — only trigger-mandated docs (and the high-priority doc types) are forced to high. The test wrongly asserted ALL mandatory docs are high; now it checks the trigger-mandated ones. Full vitest suite: 414/414 green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>