Skip to main content

Module context

Module context 

Source
Expand description

Ground-truth constraints and conversation-trajectory context fed into review.

Ground truth = inviolable constraints discovered from TRUTH.md/AGENTS.md/ CLAUDE.md at any nested level plus OpenSpec specs. Trajectory = a bounded window of recent user/agent messages so the reviewer judges direction, not just the isolated diff.

Structs§

GitLogProvider
Recent commit subjects as agent messages — a universal trajectory proxy when no explicit transcript is configured.
JsonlTranscriptProvider
Reads a {"role":"user|agent","text":"..."}-per-line transcript.
TranscriptMessage

Enums§

Role

Traits§

TrajectoryProvider
Yields recent conversation messages (oldest-first).

Functions§

build_review_context
Build the combined review-context block (constraints + trajectory).
collect_ground_truth
Collect ground-truth constraints from the repo, shallowest (repo-root) first, bounded by max_bytes. Deterministic ordering (by depth then path) for tests.
render_trajectory
trajectory_provider
Pick a trajectory provider: the configured JSONL transcript if present, else recent commits.
window_trajectory
Keep the last window_user user messages and last window_agent agent messages, preserving chronological order, then trim oldest to max_bytes.