personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add --segments flag to transcripts read for span queries

Wires up cluster_span() to the CLI so agents can read multiple segments
in one call. Updates TODO Detector to use --segments $activity_segments
instead of per-segment iteration, completing the sources removal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+30 -16
+5 -9
apps/todos/muse/todo.md
··· 38 38 - `sol call todos upcoming` – view upcoming todos to avoid duplicates 39 39 40 40 ### Transcript Commands 41 - - `sol call transcripts read --segment SEGMENT_KEY --transcripts` – read audio transcript for a segment 42 - - `sol call transcripts read --segment SEGMENT_KEY --agents` – read agent outputs (screen summaries) for a segment 43 - - `sol call transcripts read --segment SEGMENT_KEY --full` – read everything for a segment 41 + - `sol call transcripts read --segments $activity_segments --transcripts` – read audio transcripts for this activity 42 + - `sol call transcripts read --segments $activity_segments --agents` – read agent outputs (screen summaries) for this activity 43 + - `sol call transcripts read --segment SEGMENT_KEY --full` – read everything for a single segment 44 44 - `sol call journal search QUERY` – cross-reference journal content 45 45 46 - Activity segments: $activity_segments 47 - 48 46 **Query syntax**: Terms are AND'd by default; use `OR` for alternatives, quote phrases for exact matches, append `*` for prefix matching. 49 47 50 48 ## Process ··· 53 51 54 52 Read the activity's transcript and current todo state before making any changes. 55 53 56 - 1. For each segment in this activity ($activity_segments), load the transcript: 57 - `sol call transcripts read --segment SEGMENT_KEY --transcripts` 58 - Also load screen agent output for context: 59 - `sol call transcripts read --segment SEGMENT_KEY --agents` 54 + 1. Load the activity's transcript and screen agent context: 55 + `sol call transcripts read --segments $activity_segments --transcripts --agents --max 0` 60 56 2. Call `sol call todos list` to see the current checklist 61 57 3. Call `sol call todos upcoming -l 50` to check what's already scheduled 62 58
+18 -2
apps/transcripts/call.py
··· 17 17 cluster_range, 18 18 cluster_scan, 19 19 cluster_segments, 20 + cluster_span, 20 21 ) 21 22 from think.utils import ( 22 23 day_dirs, ··· 85 86 segment: str | None = typer.Option( 86 87 None, "--segment", help="Segment key (HHMMSS_LEN, default: SOL_SEGMENT env)." 87 88 ), 89 + segments: str | None = typer.Option( 90 + None, "--segments", help="Comma-separated segment keys for a span." 91 + ), 88 92 stream: str | None = typer.Option( 89 93 None, "--stream", help="Stream name (default: SOL_STREAM env)." 90 94 ), ··· 140 144 else: 141 145 sources = {"transcripts": True, "percepts": False, "agents": True} 142 146 143 - if segment and (start or length is not None): 144 - typer.echo("Error: Cannot mix --segment with --start/--length.", err=True) 147 + # Validate mutually exclusive selection modes 148 + mode_count = sum([ 149 + segment is not None, 150 + segments is not None, 151 + start is not None or length is not None, 152 + ]) 153 + if mode_count > 1: 154 + typer.echo( 155 + "Error: Cannot mix --segment, --segments, and --start/--length.", 156 + err=True, 157 + ) 145 158 raise typer.Exit(1) 146 159 147 160 if (start is not None) != (length is not None): ··· 154 167 start_dt = datetime.strptime(start, "%H%M%S") 155 168 end_dt = start_dt + timedelta(minutes=length) 156 169 markdown = cluster_range(day, start, end_dt.strftime("%H%M%S"), sources) 170 + elif segments is not None: 171 + span = [s.strip() for s in segments.split(",") if s.strip()] 172 + markdown, _counts = cluster_span(day, span, sources, stream=stream) 157 173 elif segment is not None: 158 174 markdown, _counts = cluster_period(day, segment, sources, stream=stream) 159 175 else:
+7 -5
apps/transcripts/muse/transcripts/SKILL.md
··· 68 68 ## read 69 69 70 70 ```bash 71 - sol call transcripts read [DAY] [--start HHMMSS --length MINUTES] [--segment KEY] [--stream NAME] [--full] [--raw] [--audio] [--screen] [--agents] 71 + sol call transcripts read [DAY] [--start HHMMSS --length MINUTES] [--segment KEY] [--segments KEYS] [--stream NAME] [--full] [--raw] [--audio] [--screen] [--agents] 72 72 ``` 73 73 74 - Read transcript content for a day, time range, or segment. 74 + Read transcript content for a day, time range, segment, or span. 75 75 76 76 - `DAY`: day in `YYYYMMDD` (default: `SOL_DAY` env). 77 77 78 78 Read modes (mutually exclusive): 79 79 80 80 1. `--start HHMMSS --length MINUTES`: range mode. Both flags are required together; end time is auto-computed. 81 - 2. `--segment KEY`: segment mode using key from `segments`. 82 - 3. No time flags: whole-day mode. 81 + 2. `--segment KEY`: single segment mode using key from `segments`. 82 + 3. `--segments KEY1,KEY2,...`: span mode — comma-separated segment keys, merged in time order. 83 + 4. No time flags: whole-day mode. 83 84 84 85 Source flags: 85 86 ··· 92 93 93 94 Rules: 94 95 95 - - Do not combine `--segment` with `--start/--length`. 96 + - Do not combine `--segment`, `--segments`, or `--start/--length` with each other. 96 97 - Do not combine `--full` or `--raw` with individual source flags. 97 98 98 99 Source type meanings: ··· 107 108 sol call transcripts read 20260115 108 109 sol call transcripts read 20260115 --start 090000 --length 30 --raw 109 110 sol call transcripts read 20260115 --segment 091500_300 --full 111 + sol call transcripts read 20260115 --segments 091500_300,092000_300,092500_300 --transcripts --agents 110 112 sol call transcripts read 20260115 --audio 111 113 ``` 112 114