·13 min read
DailyBrief: a personal AI advisor on the desktop with PowerShell
DailyBrief is a personal AI advisor that runs as a Windows desktop app. Every morning it looks at what I actually worked on and writes me a briefing in Georgian: what got done, what is left, and how to split the day. The repo description says the same thing in Georgian: "პირადი AI-მრჩეველი დესკტოპზე".
The interesting part is not the model call. It is everything around it, and most of that is PowerShell. This post is as much about the bugs I hit in that glue as about the design.
- Role
- Creator
- Period
- Jul 2026 to Oct 2026
- Status
- Released, latest tag v1.9.3 (Oct 2026), updates through GitHub releases
- Stack
- PowerShell 5.1, Electron, SQLite, Claude Code CLI
The challenge
An AI advisor is only useful if it plans from evidence, and a folder name is not evidence. I wanted it to know which projects are real, what changed in them, and what is still open, without feeding the model my whole disk and without a bill that grows every time it runs.
It also had to run unattended on Windows, with Georgian text going through PowerShell 5.1, Node and a CLI, which is a chain where encoding bugs are easy to introduce. And several runs can finish at the same time while I am editing the same board in the UI.
My responsibility
- Designing the whole pipeline: monitor, project registry, digest, model call, patch, board.
- Writing the PowerShell scripts, the Electron shell and the SQLite and JSON storage.
- Choosing which model does which job, and the prompts that keep each run small.
- Diagnosing and fixing the failures that real daily use produced, from encoding to CLI resolution.
- The release path: version tags, a GitHub Actions workflow that builds and publishes, and auto-update.
- The privacy line: what is extracted locally and what the model is allowed to see.
How I approached it
The unit is the project, not the folder
A background script builds a registry of my real projects, rebuilt every 30 minutes with no AI involved. For each project it collects the stack, the branch, the last commit subjects, uncommitted files, and TODO and FIXME lines left in the code. Every AI run plans from that registry.
Tasks are created per project and linked to the project's folder automatically. That way every task has real evidence to be judged against: new commits, changed files, dirty state.
The shape of the app
- An Electron shell with a single window.
- SQLite through better-sqlite3, with JSON file mirrors so the PowerShell pipeline can read the same data.
- PowerShell 5.1 scripts for the activity monitor, the git-aware folder scanner, the digest builder and the patch applier.
- The Claude Code CLI, run headless with
claude -pand the prompt on stdin.
The app has a Trello-style kanban board, an Ask page where I can ask things like which project is closest to done, per-project feature ideas, and an AI usage page with tokens, cost and a kill switch for every run.
Token diet: scripts gather, the model decides
The design goal was minimal AI spend, and it shaped everything. The pattern is the same in every run:
- A script gathers and compresses activity into a small digest file.
- The model reads only that digest and returns a small patch as structured JSON.
- A script applies the patch to the board.
The model never opens large files. The check script says why in its own header: when the model read and wrote files itself, every extra turn resent the whole CLI context, which came to about 96k input tokens for a 14KB digest. So the digest goes into the prompt inline, in a single tool-less call. Idle runs cost nothing: if there is no activity, the check short-circuits before the model is spawned.
I also split models by job. Quality-critical runs use Sonnet, mechanical runs use Haiku.
| Model | Runs |
|---|---|
| Sonnet | daily brief, day replan, questions, feature ideas, task execution |
| Haiku | checks, task replans, publishing |
Making claude -p lean
A plain claude -p is a full Claude Code session. It carries the CLI system prompt, every tool schema, MCP servers and skills from your own config, your CLAUDE.md and your hooks. For a background pipeline that is wasteful, and it also leaks your personal setup into the output. A tersely styled hook of mine had leaked into the briefing prose.
The lean runner arrived in DailyBrief 360d660 (Oct 2026), and the same day further commits moved the briefs, asks, ideas and per-project checks onto it. The flags that matter, in core/claude-run.ps1:
'-p',
'--model', $Model,
'--setting-sources', '""',
'--strict-mcp-config', '--mcp-config', (Get-EmptyMcpConfig),
'--disable-slash-commands',
'--no-session-persistence',
'--system-prompt', (ConvertTo-NativeArg $System),
'--max-turns', [string]$MaxTurns,
'--output-format', 'json'Tools are off unless a caller asks for them, and --json-schema makes the CLI validate the output. A comment in the script records a measured baseline of about 1.2k tokens instead of about 30k. I take that number from the code comment, not from a benchmark I ran for this post.
Plain claude -p
Stripped session
A small PowerShell 5.1 gotcha is handled there too. Native arguments are passed without escaping embedded double quotes, so a helper escapes them before the schema is handed to the CLI:
function ConvertTo-NativeArg([string]$s) { return ($s -replace '"', '\"') }Why a 391 MB digest appeared from one missing line
In DailyBrief 09a6bfc (Jul 2026) I fixed a digest that had grown to 391 MB. kanban-check.ps1 called scan-folder.ps1 inside the expression of a foreach that builds the task list. In PowerShell everything a statement emits goes into the captured array, so a stray .NET error object landed in the digest, and ConvertTo-Json then serialized its whole object graph.
The fix is one line, plus a comment so I would not undo it:
$null = & (Join-Path $base 'scan-folder.ps1') -TaskId ([string]$t.id) -Dir ([string]$dirs[0]) 2>$nullThe lesson I kept: in PowerShell, output is a side effect of every call, and in a script that feeds a model, an unbounded side effect is a cost bug, not just a cosmetic one.
The Georgian text repair that never worked
Early versions of the scripts had corrupted Georgian text: UTF-8 bytes misread and saved again. I had written fixMojibake to undo it, and it silently did nothing. The commit message in the same 09a6bfc gives the root cause: I had inverted the damage with latin1, but the corruption was a cp1252 decode. Bytes 0x80 to 0x9F, which appear in every Georgian UTF-8 sequence, map to characters outside latin1, so the round trip always rejected itself.
The new version carries a real cp1252 reverse table, repairs each non-ASCII segment separately so strings that mix clean and corrupted Georgian still heal, and strips the single trailing letter that is unrecoverable where the corrupter had dropped a byte. A run is only replaced when every character maps back to a byte and the bytes decode as clean UTF-8, so ordinary English text is never touched.
Every run died in two seconds with no error
DailyBrief 0306535 (Aug 2026): after a global npm install, claude.cmd stayed in place but the platform-native binary was missing, and bin\claude.exe was a tiny text stub. Windows refused to run it. Every AI run, whether check, brief, ask or execute, ended in about two seconds with an empty result and no visible error.
All four scripts had the same broken path hardcoded. I moved the lookup into core/claude-path.ps1, which accepts a candidate only if the binary is real by size, because the stub passes Test-Path, and throws a readable error when none is.
Five days later a different silent failure had the same flavor, DailyBrief c452d06 (Aug 2026). The new per-user data folder was created empty, because a migration copied into a directory that did not exist and swallowed the ENOENT. The app then reported "claude CLI wrote no log", which pointed at the one component that was working. The fix creates the folder first, seeds the files the scripts read unconditionally, and makes the scripts treat a missing board as an empty one.
A wrong warning costs more than a missing one
DailyBrief 784f721 (Aug 2026): the brief warned that a bulk invoice delete in one of my projects had shipped with no confirmation or undo. The code had a confirm dialog naming the count, a 200 row cap and an audit row per delete. The digest only carries commit subjects, so the model was inferring from silence. I changed both prompts that write warnings so that an unverified concern goes into questions instead. A false warning sends me to read code that was already correct, which is worse than saying nothing.
Concurrency: a lockfile, not a mutex
Several AI runs can finish at once, because per-project checks run in parallel (DailyBrief 9bc8366, Oct 2026). The Electron side also edits the same board files when I save. Without coordination the last writer silently drops everyone else's changes.
A named mutex was not an option, since Node has no named-mutex API without a native module. So both sides use a lockfile, with the protocol written in core/lock.ps1 and mirrored in src/boardlock.js. The file is created exclusively, which means the lock is held. A lock older than 120 seconds counts as stale, because the holder probably crashed.
$fs = [IO.File]::Open($path, [IO.FileMode]::CreateNew,
[IO.FileAccess]::Write, [IO.FileShare]::None)The comment next to it records a real bug. It uses a static .NET call instead of New-Object, because New-Object reports a failed constructor as a non-terminating error. The catch never ran and the body went ahead without the lock.
Execution is the deliberate exception
One run does write code. If I say "do it" in a comment, or press the button on a card, the AI works inside the task's linked folder with Bash and Edit. It refuses any folder that is not a git repo, switches to its own dailybrief/<taskid> branch first, and never commits or pushes. It never starts on its own.
It is also the run I tightened most. DailyBrief 1dc9e1a (Oct 2026) split it into two calls: a Haiku planning call with read-only tools, then a Sonnet implement call with the plan inlined. The script header says the implement call dropped from 40 to 25 turns, because most of the old turns went to re-exploring the project.
- 01
Check the folder
refuses anything that is not a git repo
- 02
Plan
Haiku, read-only tools, a file-level plan
- 03
Switch branch
its own dailybrief/<taskid> branch
- 04
Implement
Sonnet with Bash and Edit, plan inlined, 25 turns
- 05
Stop
never commits or pushes
git checkout - undoes it, but I still only run it on repos I understand.minutes between registry rebuilds
seconds before a lock is stale
turns for an execution implement call (was 40)
hours between update checks
Releases that survive a bad uplink
DailyBrief 269a4d7 (Aug 2026) moved publishing to GitHub Actions. Pushing a 72 MB installer from my machine took about fourteen minutes when it worked and ended in ECONNRESET when it did not. Two tags had ended up with no assets, which every installed copy sees as a 404 for latest.yml, so the updater reported a broken release instead of no release. Now pushing a v* tag builds, tests and publishes on a runner already inside GitHub's network. scripts/publish-assets.js stays as the manual fallback: it computes the sha512 the updater checks, writes latest.yml, and retries the upload.
Privacy
The monitor records directory paths, file names and timestamps. The registry extracts a few things locally: git branch, commit subjects and status, the first 400 characters of the README, package.json dependency names, and TODO lines. Only those extracts reach the model. Folders I mute are excluded before anything is collected, so no digest can mention them. Briefings, board, analytics and database stay in the user's own data folder.
Project journey
Jul 2026
First version
Electron app with the PowerShell pipeline (dd16770)
Jul 2026
Encoding and digest fixes
cp1252 repair and the 391 MB digest, v1.1.1 (09a6bfc)
Aug 2026
Plan from projects, execute on a branch
project registry, comment actions, auto-update (d28e922, e4b3a59)
Aug 2026
CLI resolution fix
a stub binary no longer kills every run (0306535)
Aug 2026
Releases from CI
a tag push builds and publishes (269a4d7)
Aug 2026
English UI
the whole app speaks English, v1.7.8 (3bb3020)
Oct 2026
Lean runner and board lock
claude -p stripped down, parallel checks (360d660, 9bc8366)
Oct 2026
v1.9.3
configurable work folders and git evidence fixes (8f9d855)
Beyond the launch
After the first working version the work was mostly maintenance in public: tags from v1.0.0 to v1.9.3 over about three and a half months. The August releases were about packaging correctness, such as the per-user data folder and telling one project's tasks apart when they share a folder (09b27d4). October was the cost and safety pass: the lean runner, a real-run eval harness in scripts/eval.js (12770cb), compaction of old board items into an archive, and 4511fe7, which made task checks see all branches and accumulate git evidence since a task was linked.
What is still open: the 1.2k and 96k token figures are numbers recorded in the code, and the pipeline is built for one user on Windows. I have not tried to generalize it.
The outcome
DailyBrief exists as an installable Windows app with public releases up to v1.9.3, a CI workflow that tests, parses every PowerShell script and builds a packaged target, and an updater that checks GitHub releases on launch and every 6 hours. The pure logic lives in src/ with unit tests. The model turned out to be the small part: the useful work was deciding what it should never see, and making the scripts around it boring and safe.
Evidence
- Repository: ddatunashvili/DailyBrief, tags v1.0.0 to v1.9.3
- Commits relied on:
09a6bfc(391 MB digest, cp1252 repair),0306535(CLI stub),c452d06(data folder migration),784f721(warnings from silence),269a4d7(release workflow),360d660,89d3781,e8b3ce2,1dc9e1a(lean runs),9bc8366(parallel checks and board lock) - Files:
core/claude-run.ps1,core/claude-path.ps1,core/lock.ps1,src/boardlock.js,core/execute.ps1,.github/workflows/release.yml - Not measured by me: the 1.2k versus 30k token baseline and the 96k input tokens for a 14KB digest are quoted from comments in the code, not from a benchmark I ran for this post.
#ai#powershell#electron#claude
Keep reading
Have a project in mind?