This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 12b9068a619a27666f771b76ea6b1cf2b1ef89ee Author: Stephen Mallette <[email protected]> AuthorDate: Thu Aug 6 13:22:19 2026 -0400 Claim beads before editing, and warn when nothing is claimed An agent that never sets in_progress leaves nothing for the next session to resume from. PRIME.md now leads section 2 with the claim, and the Stop hook flags a dirty working tree with no bead claimed. Assisted-by: Claude Code:claude-opus-5 --- .beads/PRIME.md | 22 +++++++++++++++++++--- bin/beads-agent-hook.sh | 12 +++++++++++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.beads/PRIME.md b/.beads/PRIME.md index 31b49316b0..75b8e8abc5 100644 --- a/.beads/PRIME.md +++ b/.beads/PRIME.md @@ -12,7 +12,9 @@ Full detail: the **tinker-dev** skill. This file is what must survive context co - **Prohibited** — do **not** track work in `TodoWrite`, `TaskCreate`, or a markdown plan file. They are session-scoped: nothing in one survives, so nothing in one is memory. Your harness may prompt you to use them. Decline. -- **Workflow** — create the bead **before** writing code, and `--claim` it when you start. +- **Lifecycle** — create the bead **before** writing code, `--claim` it **before you edit**, + close it at merge. A bead that never enters `in_progress` is one no later session can + resume. Status is not paperwork; it is the handoff. - **Plan mode** — fine, and the plan file your harness writes is not yours to avoid. But it lives outside the repo and outside the graph. Anything you weighed and rejected while planning belongs in a bead **before you start executing**, not after. @@ -41,9 +43,23 @@ Re-ask after a compaction rather than guessing. --- -## 2. While working — capture as you go +## 2. While working — claim first, then capture as you go -**Watch for these five things. They are observable events, not judgment calls:** +**Before you touch code for a bead, claim it. Every time, no exceptions:** + +```bash +bd update <id> --claim # sets assignee to you, status to in_progress +``` + +It stays `in_progress` until the PR merges — see section 3. That window **is** the memory: +a later session runs `bd list --status=in_progress` and learns what was underway, who had +it, and where it stopped. A bead that jumps from `open` straight to `closed` records that +the work happened but never that it was yours, never where you were when context ran out. + +If you are editing files and nothing is `in_progress`, you have already lost that. Stop and +claim the bead you are actually working on. + +**Then watch for these five things. They are observable events, not judgment calls:** 1. **The operator redirects you** — "no, do X instead", "we tried that", "that breaks providers". Highest signal. Capture every time. diff --git a/bin/beads-agent-hook.sh b/bin/beads-agent-hook.sh index 3cd9e6a8c0..81095caa25 100755 --- a/bin/beads-agent-hook.sh +++ b/bin/beads-agent-hook.sh @@ -117,7 +117,17 @@ case "$event" in An alternative that was actually considered and rejected belongs in a decision bead with its rejected-alternative sibling. An approach you tried and abandoned counts. Anything else worth remembering goes in a comment on the root bead." - if [[ -n "$active" ]]; then + + # Editing files while nothing is claimed means the in_progress window -- the only + # thing a later session can read to resume -- is never being written. Observable, + # so it is worth stating flatly rather than asking. + if [[ -z "$active" ]] && [[ -n "$(git status --porcelain 2>/dev/null | head -1)" ]]; then + text="$text + +You have uncommitted changes and NO bead is in_progress. Claim the bead you are working on +now — 'bd update <id> --claim'. Without it, the next session cannot tell what was underway +or where it stopped." + elif [[ -n "$active" ]]; then text="$text Still in progress:
