refactor(cli-workflow): reduce cmdStepRead cognitive complexity #488

Merged
xiaoju merged 1 commits from fix/487-refactor-step-read into main 2026-05-25 02:25:33 +00:00

1 Commits

Author SHA1 Message Date
xiaoju f45563ee31 refactor(cli-workflow): reduce cmdStepRead cognitive complexity
Extract four helper functions from cmdStepRead to reduce cognitive
complexity from 27 to ≤15:
- loadStepDetail: Load and validate step detail node
- loadTurnData: Load all turn nodes and extract content
- selectTurnsForQuota: Select turns within quota (≥1 always shown)
- formatStepMarkdown: Assemble final markdown output

All 6 existing tests pass. Zero Biome warnings. CLAUDE.md compliant.

Fixes #487
2026-05-25 02:17:55 +00:00