personal memory agent
0
fork

Configure Feed

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

morning_briefing: flat file storage at sol/briefing.md

Change briefing storage from sol/briefing/{day}.md to sol/briefing.md
(same pattern as pulse.md). The day is in the YAML frontmatter. Fixes
PermissionError when cortex agent writes to a new subdirectory.

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

+8 -37
+1 -6
muse/morning_briefing.md
··· 60 60 --- 61 61 type: morning_briefing 62 62 date: $day_YYYYMMDD 63 - generated: [ISO 8601 datetime of generation, e.g. 2026-03-27T06:30:00] 63 + generated: [current ISO 8601 datetime] 64 64 --- 65 65 66 66 ## Your Day 67 - 68 67 [content] 69 68 70 69 ## Yesterday 71 - 72 70 [content] 73 71 74 72 ## Needs Attention 75 - 76 73 [content] 77 74 78 75 ## Forward Look 79 - 80 76 [content] 81 77 82 78 ## Reading 83 - 84 79 [content] 85 80 EOF 86 81 ```
+7 -31
think/tools/sol.py
··· 5 5 6 6 Provides read and write access to ``{journal}/sol/self.md``, 7 7 ``{journal}/sol/agency.md``, ``{journal}/sol/pulse.md``, and 8 - ``{journal}/sol/briefing/{day}.md`` — sol's 9 - identity and initiative files. 8 + ``{journal}/sol/briefing.md`` — sol's identity and initiative files. 10 9 11 10 Mounted by ``think.call`` as ``sol call sol ...``. 12 11 """ ··· 127 126 write: bool = typer.Option( 128 127 False, "--write", "-w", help="Write briefing from stdin." 129 128 ), 130 - day: str | None = typer.Option( 131 - None, "--day", "-d", help="Specific day YYYYMMDD." 132 - ), 133 129 ) -> None: 134 - """Read or write sol/briefing/{day}.md.""" 135 - import os 136 - 130 + """Read or write sol/briefing.md.""" 137 131 sol_dir = _sol_dir() 138 - briefing_dir = sol_dir / "briefing" 132 + briefing_path = sol_dir / "briefing.md" 139 133 140 134 if write: 141 - target_day = day or os.environ.get("SOL_DAY") 142 - if not target_day: 143 - typer.echo("Error: --day required (or set SOL_DAY).", err=True) 144 - raise typer.Exit(1) 145 135 content = sys.stdin.read() 146 136 if not content.strip(): 147 137 typer.echo("Error: no content provided on stdin.", err=True) 148 138 raise typer.Exit(1) 149 - briefing_dir.mkdir(parents=True, exist_ok=True) 150 - (briefing_dir / f"{target_day}.md").write_text(content, encoding="utf-8") 151 - typer.echo(f"Briefing for {target_day} saved.") 139 + briefing_path.write_text(content, encoding="utf-8") 140 + typer.echo("briefing.md updated.") 152 141 return 153 142 154 143 # Read mode 155 - if day: 156 - path = briefing_dir / f"{day}.md" 157 - if not path.exists(): 158 - typer.echo("No briefing found.", err=True) 159 - raise typer.Exit(1) 160 - typer.echo(path.read_text(encoding="utf-8")) 161 - return 162 - 163 - # No day specified — find most recent 164 - if not briefing_dir.exists(): 144 + if not briefing_path.exists(): 165 145 typer.echo("No briefing found.", err=True) 166 146 raise typer.Exit(1) 167 - files = sorted(briefing_dir.glob("*.md"), reverse=True) 168 - if not files: 169 - typer.echo("No briefing found.", err=True) 170 - raise typer.Exit(1) 171 - typer.echo(files[0].read_text(encoding="utf-8")) 147 + typer.echo(briefing_path.read_text(encoding="utf-8"))