<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xml:base="https://bjorn.now/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Beads on bjorn.now</title><link>https://bjorn.now/tags/beads/</link><description>Recent content in Beads on bjorn.now</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 24 Apr 2026 19:43:23 +0200</lastBuildDate><atom:link href="https://bjorn.now/tags/beads/feed.xml" rel="self" type="application/rss+xml"/><item><title>beads 1.0.1 silently starts exporting issues.jsonl by default</title><link>https://bjorn.now/til/2026-04-24-beads-1-0-1-flipped-export-auto-default/?utm_medium=feed</link><pubDate>Fri, 24 Apr 2026 19:43:23 +0200</pubDate><guid>https://bjorn.now/til/2026-04-24-beads-1-0-1-flipped-export-auto-default/</guid><description>beads 1.0.1 flipped the export.auto default to on, so old projects silently start exporting issues.jsonl after upgrade. To opt back out, run:
bd config set export.auto false New projects get prompted during init, only existing projects will get this nice surprise.
If you’re using dolt’s git export instead, commit the config change and delete the issues.jsonl file.</description><content:encoded><![CDATA[<p>beads 1.0.1 <a href="https://github.com/gastownhall/beads/commit/64e504d5#diff-8bba7fff92456c4a9bd807232acd9b5eaf6491c2249600c587d4da4b1ba50492R43">flipped the <code>export.auto</code> default to on</a>, so old projects silently start exporting <code>issues.jsonl</code> after upgrade. To opt back out, run:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd config <span class="nb">set</span> export.auto false</span></span></code></pre></div>
</div>
<p>New projects <a href="https://github.com/gastownhall/beads/commit/64e504d5#diff-7d79935b4facccae363f0f50884254beb035cc02d5289a795d2181d31e4f20efR1638">get prompted during init</a>, only existing projects will get this nice surprise.</p>
<p>If you&rsquo;re using <a href="https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/">dolt&rsquo;s git export</a> instead, commit the config change and delete the <code>issues.jsonl</code> file.</p>
]]></content:encoded></item><item><title>How to recover from a corrupted dolt journal</title><link>https://bjorn.now/til/2026-04-03-how-to-recover-from-a-corrupted-dolt-journal/?utm_medium=feed</link><pubDate>Fri, 03 Apr 2026 13:17:06 +0200</pubDate><guid>https://bjorn.now/til/2026-04-03-how-to-recover-from-a-corrupted-dolt-journal/</guid><description>When dolt’s journal is corrupted, dolt fsck --revive-journal-with-data-loss will truncate it back to the last valid record.
I found this error message when starting dolt up after upgrading the server: invalid journal record at offset 5831169: invalid journal record: CRC checksum does not match.
To recover, go to your dolt DB:
cd ~/.beads/shared-server/dolt/&lt;db&gt; \ &amp;&amp; dolt fsck --revive-journal-with-data-loss It backs up the journal, truncates to the point it failed, and makes it possible to start the server again. In my case the db came back up with data loss. I did a bd dolt pull and it pulled in what I had pushed most recently, so nothing major was lost.</description><content:encoded><![CDATA[<p>When dolt&rsquo;s journal is corrupted, <code>dolt fsck --revive-journal-with-data-loss</code> will truncate it back to the last valid record.</p>
<p>I found this error message when starting dolt up after upgrading the server: <code>invalid journal record at offset 5831169: invalid journal record: CRC checksum does not match</code>.</p>
<p>To recover, go to your dolt DB:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> ~/.beads/shared-server/dolt/&lt;db&gt; <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="o">&amp;&amp;</span> dolt fsck --revive-journal-with-data-loss</span></span></code></pre></div>
</div>
<p>It backs up the journal, truncates to the point it failed, and makes it possible to start the server again. In my case the db came back up with data loss. I did a <code>bd dolt pull</code> and it pulled in what I had pushed most recently, so nothing major was lost.</p>
<p>I&rsquo;m guessing this happened because installing beads 1.0 also upgraded dolt. If you&rsquo;re upgrading, it&rsquo;s worth making sure you&rsquo;ve done <code>bd vc commit &amp;&amp; bd dolt push</code> in all repos beforehand. That means <a href="https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/">configuring a git remote</a> first.</p>
]]></content:encoded></item><item><title>How to find which dolt databases need to be committed</title><link>https://bjorn.now/til/2026-03-26-how-to-find-which-dolt-databases-need-to-be-committed/?utm_medium=feed</link><pubDate>Thu, 26 Mar 2026 15:32:42 +0100</pubDate><guid>https://bjorn.now/til/2026-03-26-how-to-find-which-dolt-databases-need-to-be-committed/</guid><description>dolt’s shared server won’t pull until all databases on the server have committed changes, not just the beads project you’re pulling.
You’ll get Error 1105 (HY000): cannot merge with uncommitted changes and it’s confusing when the beads project you’re working in has autocommit on. The uncommitted changes are in a different project that’s also using the shared server.
The fix is to go through your other projects and commit their changes (or enable autocommit by adding dolt.auto-commit: "on" to .beads/config.yml). To find which databases have uncommitted changes:</description><content:encoded><![CDATA[<p>dolt&rsquo;s shared server won&rsquo;t pull until all databases on the server have committed changes, not just the beads project you&rsquo;re pulling.</p>
<p>You&rsquo;ll get <code>Error 1105 (HY000): cannot merge with uncommitted changes</code> and it&rsquo;s confusing when the beads project you&rsquo;re working in has autocommit on. The uncommitted changes are in a different project that&rsquo;s also using the shared server.</p>
<p>The fix is to go through your other projects and commit their changes (or enable autocommit by adding <code>dolt.auto-commit: &quot;on&quot;</code> to <code>.beads/config.yml</code>). To find which databases have uncommitted changes:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">query</span><span class="o">=</span><span class="k">$(</span>bd sql <span class="s2">&#34;SHOW DATABASES&#34;</span> 2&gt;/dev/null <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> grep -v -E <span class="s2">&#34;^(Database|--|\(|dolt|information_schema|mysql)&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> <span class="k">while</span> <span class="nb">read</span> db<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">      <span class="nb">echo</span> <span class="s2">&#34;SELECT &#39;</span><span class="nv">$db</span><span class="s2">&#39; as db, table_name, status FROM \`</span><span class="nv">$db</span><span class="s2">\`.dolt_status WHERE table_name != &#39;config&#39;&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">done</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="p">|</span> paste -sd<span class="s1">&#39;|&#39;</span> - <span class="p">|</span> sed <span class="s1">&#39;s/|/ UNION ALL /g&#39;</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">bd sql <span class="s2">&#34;</span><span class="nv">$query</span><span class="s2">&#34;</span></span></span></code></pre></div>
</div>
<p>For each project that shows up, go in and run <code>bd vc commit -m 'Snapshot'</code>, and then you can pull again.</p>
<p>We&rsquo;re ignoring changes to the <code>config</code> table because they don&rsquo;t seem to matter for pulling.</p>
]]></content:encoded></item><item><title>How to manually restore a dolt db from its git remote</title><link>https://bjorn.now/til/2026-03-23-how-to-manually-restore-a-dolt-db-from-its-git-remote/?utm_medium=feed</link><pubDate>Mon, 23 Mar 2026 16:02:49 +0100</pubDate><guid>https://bjorn.now/til/2026-03-23-how-to-manually-restore-a-dolt-db-from-its-git-remote/</guid><description>You can manually clone a dolt database from its git remote when bd bootstrap or bd init won’t cooperate.
bd dolt stop: stop the server in the git repo you’re restoring so you can operate on its database cd ~/.beads/shared-server/dolt: go to the shared dolt server (it’s .beads/dolt/beads otherwise, I think) rm -rf &lt;prefix&gt;: remove the DB if it exists already dolt clone git+ssh://git@github.com/user/repo.git &lt;prefix&gt;: clone it to your prefix cd - &amp;&amp; bd ready: see if you can see the listing I don’t know why my local just refused with bd bootstrap but this allowed me to fix it manually.</description><content:encoded><![CDATA[<p>You can manually clone a dolt database from its git remote when <code>bd bootstrap</code> or <code>bd init</code> won&rsquo;t cooperate.</p>
<ol>
<li><code>bd dolt stop</code>: stop the server in the git repo you&rsquo;re restoring so you can operate on its database</li>
<li><code>cd ~/.beads/shared-server/dolt</code>: go to the shared dolt server (it&rsquo;s <code>.beads/dolt/beads</code> otherwise, I think)</li>
<li><code>rm -rf &lt;prefix&gt;</code>: remove the DB if it exists already</li>
<li><code>dolt clone git+ssh://git@github.com/user/repo.git &lt;prefix&gt;</code>: clone it to your prefix</li>
<li><code>cd - &amp;&amp; bd ready</code>: see if you can see the listing</li>
</ol>
<p>I don&rsquo;t know why my local just refused with <code>bd bootstrap</code> but this allowed me to fix it manually.</p>
]]></content:encoded></item><item><link>https://bjorn.now/scrap/2026-03-23t111623/?utm_medium=feed</link><pubDate>Mon, 23 Mar 2026 11:16:23 +0100</pubDate><guid>https://bjorn.now/scrap/2026-03-23t111623/</guid><description>Migrating an old beads backup to 0.62.0 I got a wall of Warning: failed to restore issues row: Error 1054 (HY000): Unknown column 'hook_bead' in 'issues'. Made a quick script to fix up the backup format: https://gist.github.com/gaqzi/c2d760627daceffa1f062f93244c3e8e</description><content:encoded><![CDATA[<p>Migrating an old beads backup to 0.62.0 I got a wall of <code>Warning: failed to restore issues row: Error 1054 (HY000): Unknown column 'hook_bead' in 'issues'</code>. Made a quick script to fix up the backup format: <a href="https://gist.github.com/gaqzi/c2d760627daceffa1f062f93244c3e8e">https://gist.github.com/gaqzi/c2d760627daceffa1f062f93244c3e8e</a></p>
]]></content:encoded></item><item><title>It's beginning to crumble — The first steps of my breadcrumb tool</title><link>https://bjorn.now/devlog/2026-03-22-its-beginning-to-crumble/?utm_medium=feed</link><pubDate>Sun, 22 Mar 2026 23:31:31 +0100</pubDate><guid>https://bjorn.now/devlog/2026-03-22-its-beginning-to-crumble/</guid><description>I had a breakthrough while working on bjornstack that made me realize how I could make an MVP of breadcrumb, the tool I’ve wanted to build for ~18 months.
So anyway, bjornstack is my opinionated take on how to write code, aimed at constraining and guiding genies to get their work done. And while working on it, like I have been whenever I’m working with genies, I got thoughts that I wanted to explore later, or ideas for other things I’m working on. I realized that since I started using beads capturing in this project has gotten easier, while chatting I just mention we need “a new bead about x because y provide all the context we have here” and then there’d be a new bead linked to the work we were doing, and I can just pick it up later.
But as soon as it was something for another project, or even just “I need to remember to pack the charger when I leave the office today,” then I had to break out to capture the thought, and blow my stack and lose my flow. And if I don’t capture it, I lose the thought.</description><content:encoded><![CDATA[<p>I had a breakthrough while working on <a href="https://github.com/gaqzi/bjornstack">bjornstack</a> that made me realize how I could make an MVP of breadcrumb, the tool I&rsquo;ve wanted to build for ~18 months.</p>
<p>So anyway, bjornstack is my opinionated take on how to write code, aimed at constraining and guiding genies to get their work done. And while working on it, like I have been whenever I&rsquo;m working with genies, I got thoughts that I wanted to explore later, or ideas for other things I&rsquo;m working on. I realized that since I started using beads capturing <em>in this project</em> has gotten easier, while chatting I just mention we need &ldquo;a new bead about x because y provide all the context we have here&rdquo; and then there&rsquo;d be a new bead linked to the work we were doing, and I can just pick it up later.</p>
<p>But as soon as it was something for another project, or even just &ldquo;I need to remember to pack the charger when I leave the office today,&rdquo; then I had to break out to capture the thought, and blow my stack and lose my flow.
And if I don&rsquo;t capture it, I lose the thought.</p>
<p>Somewhere on Saturday I realized this is how <a href="https://github.com/steveyegge/gastown">Gas Town</a> seems to be using <a href="https://github.com/steveyegge/beads">beads</a>: You sling beads across projects, they get filed, and they can be queried across everything you&rsquo;re working on. There are ephemeral beads and long-lived ones. It&rsquo;s beads all the way down.</p>
<p>So maybe the breadcrumb app I&rsquo;ve been thinking about, crumb for short,
doesn&rsquo;t need to be a custom database with all the trimmings.
Maybe, as a first version, it&rsquo;s just a thin wrapper around beads.
A skill I can give to an agent that says: this is how you record something into my breadcrumbs.</p>
<h2 id="what-ive-been-missing">
  What I&rsquo;ve been missing
  <a href="#what-ive-been-missing" class="heading-anchor" aria-label="Direct link to What I&rsquo;ve been missing"><span aria-hidden="true">#</span></a>
</h2>
<p>I&rsquo;ve been thinking about building breadcrumb for a while now, and I was stuck on how to get started. The idea is simple, capture stuff when you realize it, but it&rsquo;s hard to do without breaking flow. I was thinking of doing it when committing because it&rsquo;s a point of &ldquo;I&rsquo;m done&rdquo; but I&rsquo;m not really committing as much anymore on my own now.</p>
<p>Back before I started doing a lot of my work in chat windows with <em>genies</em> I would do the majority of my thinking in Roam Research. It was structured, it had bidirectional links, and I could find most things super easily. I had workflows to help me think. Glorious. ✨</p>
<p>But when I started building with agents, it would break me out of what I was doing to go leave breadcrumbs in Roam so I could track what I had been up to. So I stopped. And honestly, it was something I noticed when I worked on meaty problems when programming too, I would get caught up in what I did and not take notes. To my detriment later.</p>
<p>So, I wanted to get back to having my interstitial journal workflow I loved in Roam, to be able to look back on a day and get a feel for how it went based on the notes I left myself. And also have a better trail of things I learned as I worked.</p>
<p>And I also wanted to restart the strong weekly review routine I had, which was where I realized a lot of the stuff I did that turned out to be good ideas at work. I have also been reading Cal Newport and I wanted to start doing his daily shutdown routine, and the daily planning with a startup routine. So let&rsquo;s see if I can bake those into this too.</p>
<p>The thing I want crumb to be is kind of the flywheel that helps me grow. Daily capture feeds into daily reflection. Daily reflection feeds into weekly review. Weekly review is where I compound what I learned. The whole point is being able to retrace your steps. I did something, I learned something, and months later when I need it I can actually find it.</p>
<p>And over time <strong>the system starts producing things I actually care about</strong>: a brag document that writes itself from the work I did (even as my own boss, it feels good to see how much I got done), TILs worth sharing, a personal solution database I can query when I hit a similar problem months later. I don&rsquo;t have to buy into &ldquo;journaling is good for you&rdquo; to get value, I just need to care about any one of those outputs.</p>
<h2 id="what-i-built">
  What I built
  <a href="#what-i-built" class="heading-anchor" aria-label="Direct link to What I built"><span aria-hidden="true">#</span></a>
</h2>
<p>I knocked out a first version today.
It&rsquo;s a global Claude Code skill that I install on my machine.
In any session, in the middle of whatever I&rsquo;m working on,
I just write <code>(crumb: &lt;whatever thought I had&gt;)</code> and it gets sent over to my cottage project. It can be anywhere in the prompt because I told it to look for either <code>/crumb …</code> or <code>(crumb:…)</code> and it just worked.</p>
<p>One thing I learned getting this to work:
the skill needs to <code>cd</code> into the cottage project directory and run beads from there when creating.
Otherwise beads doesn&rsquo;t know which project context to file things into.</p>
<p>So I made a small wrapper around <code>bd</code> (the beads CLI) that I could <a href="/til/2026-01-10-claude-code-sandbox-exclusion-requires-both-permissions-allow-and-sandbox-excludedcommands/">allowlist globally</a> in my Claude Code settings:</p>
<div class="no-copy-button">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="cl"><span class="cp"></span><span class="c1"># Wrapper that runs bd against the cottage project database.</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Works from any working directory.</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/workspace/cottage&#34;</span> <span class="o">&amp;&amp;</span> <span class="nb">exec</span> bd <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span></span></span></code></pre></div>
</div>
<p>The key ideas:</p>
<ul>
<li>It finds a daily journal bead in the cottage project (or falls back to creating a plain bead)</li>
<li>It captures provenance: which project you&rsquo;re in, which bead you&rsquo;re working on, so you can backtrack to it later if you want more context</li>
<li>It files the thought as a comment on the daily bead, then moves on, and the nice part of the comment is that it gives me <em>when</em>, a timestamp, and it doesn&rsquo;t matter if I&rsquo;m working on several repos at the same time because it&rsquo;ll just be combined anyway in the daily bead.</li>
</ul>
<details>
<summary>The full crumb skill</summary>
<div class="full-width copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-plain" data-lang="plain"><span class="line"><span class="cl">---
</span></span><span class="line"><span class="cl">name: crumb
</span></span><span class="line"><span class="cl">description: &#34;Quick thought capture — adds a comment to the user&#39;s daily journal bead in their cottage project. Trigger when the user says /crumb, &#39;crumb:&#39;, or uses the inline form &#39;(crumb:…)&#39; as a parenthetical aside. File the crumb FIRST before handling anything else in the prompt. The user is in flow; receive, file, move on.&#34;
</span></span><span class="line"><span class="cl">---
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># Crumb — Quick Thought Capture
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## How to run commands
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">This skill includes a wrapper script `crumb-bd` that runs `bd` against the cottage database regardless of your current working directory. Use it for all cottage operations. Resolve the path relative to this skill&#39;s base directory:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```bash
</span></span><span class="line"><span class="cl">scripts/crumb-bd &lt;bd args...&gt;
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Every invocation needs `dangerouslyDisableSandbox: true` (Dolt needs raw TCP to localhost:3308).
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**If any command fails, you MUST show the error to the user and echo back the crumb text so nothing is lost.** Don&#39;t silently swallow failures.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Priority
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">File the crumb BEFORE responding to anything else in the user&#39;s message. The crumb is a side-channel capture — handle it first, confirm in one line, then continue with the main conversation.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## What this does
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Adds the user&#39;s thought as a comment on their daily journal bead (a bead in the cottage project with label `daily`). The thought gets processed later during review — your job is just to file it.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Parse the input
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Format is `category: text` where the category is optional.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">/crumb idea: what if protocols were composable
</span></span><span class="line"><span class="cl">/crumb friction: dolt keeps dying on me
</span></span><span class="line"><span class="cl">/crumb just a raw thought with no category
</span></span><span class="line"><span class="cl">(crumb:reminder: pack the charger before leaving)
</span></span><span class="line"><span class="cl">(crumb:idea: what if we split beads by domain)
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Categories are freeform — `idea`, `friction`, `reminder`, `meeting`, `learning`, `question`, `todo`, whatever the user wrote. Don&#39;t rename or recategorize. No category is fine. `(crumb:idea: blah)` is valid — the category is `idea`.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Find the daily bead
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```bash
</span></span><span class="line"><span class="cl">scripts/crumb-bd query &#34;label=daily AND status=in_progress&#34; --json
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**Found:** Use it.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**Not found — fallback chain:**
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">1. Most recent closed daily that hasn&#39;t been reviewed yet:
</span></span><span class="line"><span class="cl">   ```bash
</span></span><span class="line"><span class="cl">   scripts/crumb-bd sql &#34;SELECT i.id, i.title FROM issues i JOIN labels l ON i.id = l.issue_id WHERE l.label = &#39;daily&#39; AND i.status = &#39;closed&#39; AND i.id NOT IN (SELECT l2.issue_id FROM labels l2 WHERE l2.label = &#39;reviewed:daily&#39;) ORDER BY i.created_at DESC LIMIT 1&#34;
</span></span><span class="line"><span class="cl">   ```
</span></span><span class="line"><span class="cl">   Comments on closed beads work fine.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">2. No daily bead at all — create a standalone bead:
</span></span><span class="line"><span class="cl">   ```bash
</span></span><span class="line"><span class="cl">   scripts/crumb-bd create &#34;&lt;the thought&gt;&#34; --type task --priority 3
</span></span><span class="line"><span class="cl">   ```
</span></span><span class="line"><span class="cl">   Tell the user: &#34;No daily bead open — filed as standalone bead.&#34;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Build the comment
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">### Provenance
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Capture where the thought came from — project name, and what the user was working on.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**Project name:**
</span></span><span class="line"><span class="cl">```bash
</span></span><span class="line"><span class="cl">basename &#34;$(git rev-parse --show-toplevel 2&gt;/dev/null || pwd)&#34;
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**Active bead:** Use this escalation — stop at the first that works:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">1. **Session context:** If the conversation has claimed or discussed a bead, use its ID and title directly.
</span></span><span class="line"><span class="cl">2. **Query local db:** `bd list --status=in_progress --json 2&gt;/dev/null` — use ID and title if exactly one result. Multiple results → pick the most recently discussed, or ask briefly. Zero → no active bead.
</span></span><span class="line"><span class="cl">3. **Folder fallback:** If no bead is found and no beads db exists, record the working directory path. This lets the user query session logs for that folder and time later.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**Format the comment** with a provenance header on its own line, then the content:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">(from bjornstack, bs-xyz — Refactor auth middleware)
</span></span><span class="line"><span class="cl">idea: what if protocols were composable
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">When working in cottage, still include provenance if you&#39;re working on a specific bead — the point is capturing something different from current focus:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">(working on in-mlk — Create the /crumb skill)
</span></span><span class="line"><span class="cl">idea: what if we made categories queryable
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">If no bead is found and no beads db exists, use the working directory:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">(from ~/workspace/some-project)
</span></span><span class="line"><span class="cl">idea: what if protocols were composable
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">### Multiple thoughts
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">If the user drops several thoughts in one message, file them as a single comment separated by newlines. One provenance header, multiple entries:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">(from bjornstack, bs-xyz — Refactor auth middleware)
</span></span><span class="line"><span class="cl">idea: what if protocols were composable
</span></span><span class="line"><span class="cl">friction: dolt server died again
</span></span><span class="line"><span class="cl">reminder: pack the charger
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Add the comment
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```bash
</span></span><span class="line"><span class="cl">scripts/crumb-bd comments add &lt;daily-id&gt; &#34;&lt;the comment text&gt;&#34;
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">**If this fails:** Show the error AND echo the full crumb text back to the user so they can capture it another way. Example:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">Failed to file crumb (connection refused). Your crumb text:
</span></span><span class="line"><span class="cl">&gt; idea: what if protocols were composable
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## Confirm and move on
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">One line. The user is in flow.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">Crumb filed → idea: what if protocols were composable
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Multiple:
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">Filed 3 crumbs on &lt;daily-id&gt;
</span></span><span class="line"><span class="cl">```
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Don&#39;t engage with the content. If the thought is so terse that future-them won&#39;t understand it, ask for one line of context in the same breath — &#34;Filed. Quick — what&#39;s the context? Won&#39;t make sense later without it.&#34; — then move on regardless.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">## When to create a bead instead
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Only if the user explicitly asks: &#34;make this a bead&#34;, &#34;track this&#34;, &#34;this needs its own issue&#34;, or &#34;bead: ...&#34;.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">```bash
</span></span><span class="line"><span class="cl">scripts/crumb-bd create &#34;&lt;thought&gt;&#34; \
</span></span><span class="line"><span class="cl">  --description &#34;Captured from &lt;project&gt;, working on &lt;bead-id&gt; — &lt;bead-title&gt;&#34; \
</span></span><span class="line"><span class="cl">  --type task --priority 3
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
</div>
</details>
<p>The provenance bit is what makes this useful later.
When I&rsquo;m doing my shutdown review, each crumb tells me where I was and what I was doing when the thought hit.
I don&rsquo;t have to reconstruct context, it&rsquo;s already there.</p>
<p>And it felt really nifty when I ended the day and the shutdown routine showed me: these are the beads you closed today, and here&rsquo;s the note you left yourself when you finished that session. A mini-review of my own work that I barely had to think about capturing. Because the majority of my work is already flowing through beads, it all just becomes queryable. It doesn&rsquo;t matter if I was working across several repos at the same time, the daily bead combines it all.</p>
<h2 id="why-beads-and-not-something-custom">
  Why beads and not something custom
  <a href="#why-beads-and-not-something-custom" class="heading-anchor" aria-label="Direct link to Why beads and not something custom"><span aria-hidden="true">#</span></a>
</h2>
<p>When I was thinking about building this tooling,
I assumed I&rsquo;d have to build something tool-agnostic (Roam/Obsidian/Apple Notes/etc),
and because this stuff is so sensitive, local-first with no centralized server.
By adopting beads and dolt, I get all of that for free.
Dolt pushes all the data into git, and there&rsquo;s an existing nice CLI interface, and more people are building on top of beads already.</p>
<p>I&rsquo;m admittedly kind of abusing beads here.
It&rsquo;s not really designed for this kind of journaling.
But most of what I&rsquo;m capturing are tasks I did,
and having a daily bead where I add notes as the day progresses,
that&rsquo;s kind of how research tasks work anyway.
You add comments, you talk to people, you figure it out,
and then it becomes a written conclusion.
So yeah, maybe bending it a little, but it&rsquo;s solving a whole lot more than it&rsquo;s bending.</p>
<p>A lot of the things I was originally planning to build already kind of exist,
just in a packaging that isn&rsquo;t necessarily optimal for what I want right now.
But it&rsquo;s a hell of a good start that I can adjust and adapt as I learn more about how I want this to work. And then get started on the part of &ldquo;how do I extract more knowledge from all the information I&rsquo;m creating?&rdquo;</p>
<h2 id="whats-next">
  What&rsquo;s next
  <a href="#whats-next" class="heading-anchor" aria-label="Direct link to What&rsquo;s next"><span aria-hidden="true">#</span></a>
</h2>
<p>I&rsquo;m going to try this out for a bit and see how the daily and weekly routines feel.
If you&rsquo;re reading this and interested in trying it out before I share it publicly,
<a href="mailto:ba@bjorn.now?subject=Got%20some%20crumbs%20for%20me%3F">send me an email</a> and I&rsquo;ll give you a preview.</p>]]></content:encoded></item><item><title>How to migrate beads from per-project to shared dolt server</title><link>https://bjorn.now/til/2026-03-20-migrate-beads-to-shared-dolt-server/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 12:50:24 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-migrate-beads-to-shared-dolt-server/</guid><description>To switch beads from a per-project dolt server to the shared server, do a backup, configure shared-server, and restore.
I was running in “a server per repo” mode and it’s just unnecessary, they clash in annoying ways when switching repos, and once I understood how beads store data in git I embraced dolt and the shared server. I had hesitated because I had somehow connected it with DoltHub, and that’s optional for using beads.</description><content:encoded><![CDATA[<p>To switch beads from a per-project dolt server to the shared server, do a backup, configure shared-server, and restore.</p>
<p>I was running in &ldquo;a server per repo&rdquo; mode and it&rsquo;s just unnecessary, they clash in annoying ways when switching repos, and once I understood how <a href="/til/2026-03-20-configure-beads-dolt-to-share-via-git/">beads store data in git</a> I embraced dolt and the shared server. I had hesitated because I had somehow connected it with DoltHub, and that&rsquo;s optional for using beads.</p>
<ol>
<li><code>bd backup</code>: make sure you have your local database available for restore</li>
<li><code>bd dolt stop</code>: so we don&rsquo;t conflict on anything</li>
<li><code>bd dolt set shared-server true</code>: to configure this project to use the shared server</li>
<li><code>bd restore</code>: to restore the db</li>
</ol>
<p>For most of my projects this just worked, but in some cases I had to <a href="/til/2026-03-20-how-to-reset-beads-dolt-database/">reset the dolt configuration for the repo</a>.</p>
]]></content:encoded></item><item><title>Configure beads dolt to share via git</title><link>https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 12:31:05 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-configure-beads-dolt-to-share-via-git/</guid><description>Beads with dolt store data in git refs, not branches, and won’t share it anywhere until you manually configure a remote.
After bd init, your dolt data only exists locally. You can check with bd dolt remote list which will show “No remotes configured.”</description><content:encoded><![CDATA[<p>Beads with dolt <a href="https://github.com/steveyegge/beads/blob/main/docs/DOLT.md">store data</a> in git refs, not branches, and won&rsquo;t share it anywhere until you manually configure a remote.</p>
<p>After <code>bd init</code>, your dolt data only exists locally. You can check with <code>bd dolt remote list</code> which will show &ldquo;No remotes configured.&rdquo;</p>
<p>Point it at your existing git repo:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt remote add origin git+ssh://git@github.com/you/repo.git</span></span></code></pre></div>
</div>
<p>Then push and verify:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt push
</span></span><span class="line"><span class="cl">git ls-remote origin <span class="s1">&#39;refs/dolt/*&#39;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 52689c0ae7...  refs/dolt/data</span></span></span></code></pre></div>
</div>
<p>I&rsquo;ve seen <code>refs/</code> used for GitHub PRs before (<code>refs/pr/&lt;num&gt;/head</code>) but I haven&rsquo;t looked into how any of it actually works. For now, seeing <code>refs/dolt/data</code> show up in <code>git ls-remote</code> is enough to make me comfortable that my data exists somewhere.</p>
<p>To avoid doing this manually on every machine, add the remote to <code>.beads/config.yaml</code>:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">sync</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">git-remote</span><span class="p">:</span><span class="w"> </span><span class="l">git+ssh://git@github.com/you/repo.git</span></span></span></code></pre></div>
</div>
<p>Anyone cloning the repo can then run <code>bd bootstrap</code> and <code>bd dolt push / pull</code> will just work.</p>]]></content:encoded></item><item><title>How I configure beads for new projects</title><link>https://bjorn.now/til/2026-03-20-how-i-configure-beads-for-new-projects/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 12:31:05 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-how-i-configure-beads-for-new-projects/</guid><description>I tweak the default beads setup to work with Claude instead of the generic agent integration.
As of beads 0.62.0, this is what I run:
# configure agents later bd init --shared-server --skip-agents # setup a CLAUDE.md and configure claude hooks to re-prime beads bd setup claude --project bd hooks install # move local settings to project settings mv .claude/settings{.local,}.json # amend init commit so .beads-credential-key never enters git git add .claude/settings.json CLAUDE.md git commit --amend -CHEAD # share beads data alongside your git repo bd dolt remote add origin git+ssh://git@github.com/you/repo.git echo -e 'sync:\n git-remote: git+ssh://git@github.com/you/repo.git' &gt;&gt; .beads/config.yaml The key thing is --skip-agents and then bd setup claude --project instead, so you get Claude-specific hooks rather than the generic agent integration. The dolt remote lines are so your beads data gets stored alongside your git repo.</description><content:encoded><![CDATA[<p>I tweak the default beads setup to work with Claude instead of the generic agent integration.</p>
<p>As of beads 0.62.0, this is what I run:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># configure agents later</span>
</span></span><span class="line"><span class="cl">bd init --shared-server --skip-agents
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># setup a CLAUDE.md and configure claude hooks to re-prime beads</span>
</span></span><span class="line"><span class="cl">bd setup claude --project
</span></span><span class="line"><span class="cl">bd hooks install
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># move local settings to project settings</span>
</span></span><span class="line"><span class="cl">mv .claude/settings<span class="o">{</span>.local,<span class="o">}</span>.json
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># amend init commit so .beads-credential-key never enters git</span>
</span></span><span class="line"><span class="cl">git add .claude/settings.json CLAUDE.md
</span></span><span class="line"><span class="cl">git commit --amend -CHEAD
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># share beads data alongside your git repo</span>
</span></span><span class="line"><span class="cl">bd dolt remote add origin git+ssh://git@github.com/you/repo.git
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> -e <span class="s1">&#39;sync:\n  git-remote: git+ssh://git@github.com/you/repo.git&#39;</span> &gt;&gt; .beads/config.yaml</span></span></code></pre></div>
</div>
<p>The key thing is <code>--skip-agents</code> and then <code>bd setup claude --project</code> instead, so you get Claude-specific hooks rather than the generic agent integration. The <a href="/til/2026-03-20-configure-beads-dolt-to-share-via-git/">dolt remote lines</a> are so your beads data gets stored alongside your git repo.</p>
]]></content:encoded></item><item><title>How to reset beads' dolt database</title><link>https://bjorn.now/til/2026-03-20-how-to-reset-beads-dolt-database/?utm_medium=feed</link><pubDate>Fri, 20 Mar 2026 11:29:14 +0100</pubDate><guid>https://bjorn.now/til/2026-03-20-how-to-reset-beads-dolt-database/</guid><description>When beads can’t find or create a dolt database, delete the local dolt state and reinit.
The errors look like this:
Error: failed to open Dolt store: database "bs" not available after CREATE DATABASE: Error 1049 (HY000): database not found: bs or:
Error: failed to open database: database "bs" not found on Dolt server at 127.0.0.1:3308</description><content:encoded><![CDATA[<p>When <a href="https://github.com/steveyegge/beads">beads</a> can&rsquo;t find or create a <a href="https://github.com/dolthub/dolt">dolt</a> database, delete the local dolt state and reinit.</p>
<p>The errors look like this:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Error: failed to open Dolt store: database &#34;bs&#34; not available after CREATE DATABASE: Error 1049 (HY000): database not found: bs</span></span></code></pre></div>
</div>
<p>or:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Error: failed to open database: database &#34;bs&#34; not found on Dolt server at 127.0.0.1:3308</span></span></code></pre></div>
</div>
<p>Fix it by stopping dolt and removing its local state:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">bd dolt stop  <span class="c1"># or you won&#39;t be able to delete all the files</span>
</span></span><span class="line"><span class="cl">rm -rf .beads/dolt/
</span></span><span class="line"><span class="cl">rm .beads/dolt-server.*</span></span></code></pre></div>
</div>
<p>Also check <code>.beads/metadata.json</code> for stale server connection config. Mine had extra fields that were messing things up. I cleaned it down to just the essentials:</p>
<div class=" copy-enabled">
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;database&#34;</span><span class="p">:</span> <span class="s2">&#34;dolt&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;backend&#34;</span><span class="p">:</span> <span class="s2">&#34;dolt&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;dolt_mode&#34;</span><span class="p">:</span> <span class="s2">&#34;server&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;dolt_database&#34;</span><span class="p">:</span> <span class="s2">&#34;bs&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;project_id&#34;</span><span class="p">:</span> <span class="s2">&#34;deadbeef-9164-426d-8c1c-ff8ae5d35e3e&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
<p>Then reinit: <code>bd init --force --prefix &lt;yourprefix&gt;</code>.</p>
<p><code>bd doctor --fix</code> couldn&rsquo;t sort this out, which is why I ended up doing all this manual cleanup.</p>
<p>I hit this upgrading to beads 0.61.0 when switching to shared-server mode.</p>]]></content:encoded></item></channel></rss>