Follow-on to scheduler-sim-repl-verbosity: collapses the REPL's per-event "[sim] t=... session=..." preamble to print once per distinct rendered (timestamp, session) run of consecutive echoed events, instead of once per event, in both step mode and continue mode's structural-event echo. Requirement 1.3 deliberately keys the dedup on the rendered, second-granularity timestamp rather than the raw nanosecond clock value, which ticks on every event and would otherwise never repeat -- confirmed against a real user-supplied transcript before writing requirements (see research.md). Requirement 2 preserves event selection, ordering, content, every other REPL command, and all scheduling decisions/state exactly as scheduler-sim-repl-verbosity's Requirement 5 already established. Generated via kiro-spec-quick (single-pass, no approval gates) with an inline requirements review gate, an inline design review gate, and an independent task-graph sanity review (one NEEDS_FIXES round, repaired: added file-size watch bullets to tasks 1.1/1.2 per design.md's own housekeeping directives). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
4.1 KiB
Requirements Document
Introduction
xce_scheduler's --interactive simulation REPL echoes a timestamp/session preamble line immediately before every event it prints — in step mode for every echoed event, and in continue mode for every structural event the already-shipped scheduler-sim-repl-verbosity spec still echoes. In practice, many consecutive echoed events share the identical rendered (second-granularity) timestamp and session number, so the operator sees the same context line repeated over and over, burying the actual event content between near-duplicate preambles. This feature collapses that repetition: the preamble prints once per distinct (timestamp, session) context, not once per event, while leaving which events are echoed, their content, their ordering, and every other REPL behavior exactly as scheduler-sim-repl-verbosity's Requirement 5 already established.
Boundary Context
- In scope: the timestamp/session preamble line printed immediately before an echoed event's own content line, in every mode/context where that echoing currently occurs (step mode's per-event echo, and continue mode's structural-event echo already shipped by
scheduler-sim-repl-verbosity). - Out of scope: which events are echoed, an event's own content line, event ordering, decision output, the Round Rollup/collapsing behavior already shipped for continue mode's routine-event suppression, and any REPL command's behavior other than this one preamble's rendering.
- Adjacent expectations: this spec builds directly on
scheduler-sim-repl-verbosity's Requirement 5 ("preserve step mode's output outside this feature's explicit exceptions") and Requirement 1 (Event Echo Gate). It narrows that preservation guarantee to allow exactly this one, previously out-of-scope redundancy to change — it does not reopen or relax any other part of that guarantee.
Requirements
Requirement 1: Preamble Deduplication Across Consecutive Same-Context Events
Objective: As an operator reading a step-by-step or continue-mode structural-event transcript, I want the timestamp/session preamble shown once per distinct context instead of before every single event, so repeated identical context doesn't bury the actual event content.
Acceptance Criteria
- When the REPL echoes an event whose rendered timestamp and session number are identical to the immediately preceding echoed event's rendered timestamp and session number, the REPL shall omit the timestamp/session preamble line for that event.
- When the REPL echoes an event whose rendered timestamp or session number differs from the immediately preceding echoed event's, or when there is no preceding echoed event, the REPL shall print the full timestamp/session preamble line before that event.
- The REPL shall determine whether two consecutive echoed events share the same context using each event's rendered, second-granularity human-readable timestamp and its displayed session number — not the underlying raw high-resolution timestamp value, which may differ between two events that share the same displayed second and session.
- The REPL shall not alter an event's own content line, its position in the output, or whether it is echoed at all — deduplication under this requirement applies only to the preamble line.
Requirement 2: Preservation of Existing Detail, Ordering, and Behavior
Objective: As an operator relying on step mode's full per-event/per-decision detail and continue mode's structural-event echo, I want this feature to change only the repeated preamble, so my existing workflows and expectations about output completeness remain reliable.
Acceptance Criteria
- The REPL shall continue to echo every event that step mode currently echoes, and every structural event that continue mode currently echoes, with no event newly suppressed or newly added as a result of this feature.
- The REPL shall preserve the exact ordering of echoed events and their content lines.
- The REPL shall preserve every other REPL command's existing behavior and output unchanged.
- The REPL shall not alter any scheduling decision or the simulation's underlying state — this feature affects console display only.