feat(timeline): wire up lore timeline command with human + robot renderers

Complete Gate 3 by implementing the final three beads:
- bd-2f2: Human output renderer with colored event tags, entity refs,
  evidence snippets, and expansion summary footer
- bd-dty: Robot JSON output with {ok,data,meta} envelope, ISO timestamps,
  nested via provenance, and per-event-type details objects
- bd-1nf: CLI wiring with TimelineArgs (9 flags), Commands::Timeline
  variant, handle_timeline handler, VALID_COMMANDS entry, and robot-docs
  manifest with temporal_intelligence workflow

All 7 Gate 3 children now closed. Pipeline: SEED -> HYDRATE -> EXPAND ->
COLLECT -> RENDER fully operational.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-02-06 08:49:48 -05:00
parent b005edb7f2
commit 69df8a5603
6 changed files with 617 additions and 17 deletions

View File

@@ -179,6 +179,9 @@ pub enum Commands {
shell: String,
},
/// Show a chronological timeline of events matching a query
Timeline(TimelineArgs),
#[command(hide = true)]
List {
#[arg(value_parser = ["issues", "mrs"])]
@@ -596,6 +599,57 @@ pub struct EmbedArgs {
pub no_retry_failed: bool,
}
#[derive(Parser)]
pub struct TimelineArgs {
/// Search query (keywords to find in issues, MRs, and discussions)
pub query: String,
/// Scope to a specific project (fuzzy match)
#[arg(short = 'p', long, help_heading = "Filters")]
pub project: Option<String>,
/// Only show events after this date (e.g. "6m", "2w", "2024-01-01")
#[arg(long, help_heading = "Filters")]
pub since: Option<String>,
/// Cross-reference expansion depth (0 = no expansion)
#[arg(long, default_value = "1", help_heading = "Expansion")]
pub depth: u32,
/// Also follow 'mentioned' edges during expansion (high fan-out)
#[arg(long = "expand-mentions", help_heading = "Expansion")]
pub expand_mentions: bool,
/// Maximum number of events to display
#[arg(
short = 'n',
long = "limit",
default_value = "100",
help_heading = "Output"
)]
pub limit: usize,
/// Maximum seed entities from search
#[arg(long = "max-seeds", default_value = "10", help_heading = "Expansion")]
pub max_seeds: usize,
/// Maximum expanded entities via cross-references
#[arg(
long = "max-entities",
default_value = "50",
help_heading = "Expansion"
)]
pub max_entities: usize,
/// Maximum evidence notes included
#[arg(
long = "max-evidence",
default_value = "10",
help_heading = "Expansion"
)]
pub max_evidence: usize,
}
#[derive(Parser)]
pub struct CountArgs {
/// Entity type to count (issues, mrs, discussions, notes, events)