Renew
Load focused context for a specific project or area to continue work.
Uses $JOURNAL_PATH (defaults to ~/dev/status) for the daily log journal, and ~/.whisper/ for accumulated operational knowledge. The log subdirectory defaults to log/; set $JOURNAL_LOG_SUBDIR to override (e.g. areas/log for the JORNAL layout).
Steps
Pull the journal repo:
JOURNAL="${JOURNAL_PATH:-$HOME/dev/status}"
LOG_SUBDIR="${JOURNAL_LOG_SUBDIR:-log}"
cd "$JOURNAL" && git pull
Identify the target.
If a <slug> is provided: The user says /renew <slug>.
If no slug is provided: Infer from the current workspace context:
- Get the repo name:
basename $(git rev-parse --show-toplevel 2>/dev/null)
- Get the branch name:
git branch --show-current 2>/dev/null
- Extract a candidate slug from the branch (strip prefix like
ak/, feature/, etc.)
- Use both the repo name and branch-derived slug as candidates
Match candidates against:
$JOURNAL/projects/*.md — check filenames and grep for repo/branch references
$JOURNAL/areas/*.md — same
- Try exact match, then partial/substring match
- If multiple matches found, list them and ask the user to pick
- If no match found, list available projects/areas and ask
Read the matched project or area file.
Read today's log ($JOURNAL/$LOG_SUBDIR/YYYY/YYYY-MM/YYYY-MM-DD.md).
If it doesn't exist, create it with the daily log template.
Scan for any earlier session entries related to this project/area today.
Search recent logs for context (last 3 days):
grep -rl "<slug>" "$JOURNAL"/"$LOG_SUBDIR"/YYYY/YYYY-MM/ 2>/dev/null | tail -3
Read any matches to understand recent session history.
Search inbox for related items:
grep -i "<slug>" "$JOURNAL"/inbox.md
Check ~/.whisper/ for accumulated knowledge.
If ~/.whisper/ exists, load context:
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
branch_slug=$(git rev-parse --abbrev-ref HEAD | sed 's|/|--|g')
whisper_dir=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"
If the project/area has a worktree or repo path noted in its file, gather git context:
cd <worktree-path> && git branch --show-current
git log --oneline -5
git status --short
git log --oneline origin/main..HEAD
Output format
---
**Resuming: Project/Area Name**
**Status**: brief one-line summary of where things stand
**Last session** *(from most recent log entry)*
- what was done last time
**Open tasks**
- [ ] task list from the project/area file
**Waiting**
- [~] any blocked items and who/what they're waiting on
**Related inbox items** *(if any)*
- items that mention this project
**Whisper context** *(if ~/.whisper/ exists)*
- Plan: summary of current plan
- Notes: key findings
- Beads issues: <n> open, <n> in_progress
**⚠ Active in flight** *(omit if none)*
- ◐ `<id>` — <title> [started: <date>]
- *(If your intended ticket is listed here, see **Claiming work** below.)*
**Workspace**
- Worktree: path, branch, status
- Commits ahead of main, uncommitted changes, etc.
**Suggested next step**
- what makes sense to do next — only suggest tickets NOT currently in_progress
Then ask: "Ready to continue, or want to adjust the plan?"
Claiming work
Before writing any code, claim the ticket atomically and check for file conflicts.
Steps
Claim atomically:
bd update <ticket-id> --claim
Check for file-level conflicts with other in-progress tickets:
bd list --status in_progress --label branch:<branch> --json 2>/dev/null \
| python3 -c "
import json, sys
issues = json.loads(sys.stdin.read() or '[]')
for i in issues:
files = (i.get('metadata') or {}).get('files', [])
for f in files:
print(i['id'] + '\t' + f)
"
Cross-reference against the claimed ticket's own metadata.files.
If overlap found, surface a warning:
⚠ File conflict detected:
services/api.py is also claimed by ticket-abc (in_progress)
Options:
A) Gate this ticket until the blocker closes
B) Coordinate merge order
C) Proceed — accept the conflict (reconcile at merge time)
If backing off (chose option A):
bd update <ticket-id> --assignee "" --status open
bd gate create <ticket-id> --type bead --await-id <blocking-id>
Metadata coverage warning
File conflict detection only works when both tickets have metadata.files populated (set by create-issues or /w link at ticket creation time). Tickets created before this convention was adopted have no metadata. For those tickets, "no conflict found" means unknown, not safe.
1---2name: renew3description: Resume work on a specific project or area. Loads focused context for continuing where you left off. When no name is given, infers the project/area from the current repo and git branch. Trigger when the user says '/renew', '/renew <name>', 'pick up <project>', 'continue <project>', or 'back to <project>'.4---56# Renew78Load focused context for a specific project or area to continue work.910Uses `$JOURNAL_PATH` (defaults to `~/dev/status`) for the daily log journal, and `~/.whisper/` for accumulated operational knowledge. The log subdirectory defaults to `log/`; set `$JOURNAL_LOG_SUBDIR` to override (e.g. `areas/log` for the JORNAL layout).1112## Steps13141. Pull the journal repo:15 ```bash16 JOURNAL="${JOURNAL_PATH:-$HOME/dev/status}"17 LOG_SUBDIR="${JOURNAL_LOG_SUBDIR:-log}"18 cd "$JOURNAL" && git pull19 ```20212. Identify the target.2223 **If a `<slug>` is provided:** The user says `/renew <slug>`.2425 **If no slug is provided:** Infer from the current workspace context:26 - Get the repo name: `basename $(git rev-parse --show-toplevel 2>/dev/null)`27 - Get the branch name: `git branch --show-current 2>/dev/null`28 - Extract a candidate slug from the branch (strip prefix like `ak/`, `feature/`, etc.)29 - Use both the repo name and branch-derived slug as candidates3031 **Match candidates** against:32 - `$JOURNAL/projects/*.md` — check filenames and grep for repo/branch references33 - `$JOURNAL/areas/*.md` — same34 - Try exact match, then partial/substring match35 - If multiple matches found, list them and ask the user to pick36 - If no match found, list available projects/areas and ask37383. Read the matched project or area file.39404. Read today's log (`$JOURNAL/$LOG_SUBDIR/YYYY/YYYY-MM/YYYY-MM-DD.md`).41 If it doesn't exist, create it with the daily log template.42 Scan for any earlier session entries related to this project/area today.43445. Search recent logs for context (last 3 days):45 ```bash46 grep -rl "<slug>" "$JOURNAL"/"$LOG_SUBDIR"/YYYY/YYYY-MM/ 2>/dev/null | tail -347 ```48 Read any matches to understand recent session history.49506. Search inbox for related items:51 ```bash52 grep -i "<slug>" "$JOURNAL"/inbox.md53 ```54557. **Check `~/.whisper/` for accumulated knowledge.**56 If `~/.whisper/` exists, load context:57 ```bash58 repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')59 branch_slug=$(git rev-parse --abbrev-ref HEAD | sed 's|/|--|g')60 whisper_dir=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"61 ```62 - Read `context.md` if it exists (extract beads-epic, status)63 - Read `plan.md` if it has real content64 - Read `notes.md` if it has real content65 - Read `env.md` at repo level for infra facts66 - If beads is available, fetch open issues:67 ```bash68 bd list --label branch:<branch> 2>/dev/null69 bd list --status in_progress --label branch:<branch> 2>/dev/null70 ```71 Surface any `in_progress` tickets prominently. The **Suggested next step** must only reference tickets NOT currently `in_progress`.72738. If the project/area has a worktree or repo path noted in its file, gather git context:74 - `cd <worktree-path> && git branch --show-current`75 - `git log --oneline -5`76 - `git status --short`77 - `git log --oneline origin/main..HEAD`7879## Output format8081```82---83**Resuming: Project/Area Name**8485**Status**: brief one-line summary of where things stand8687**Last session** *(from most recent log entry)*88- what was done last time8990**Open tasks**91- [ ] task list from the project/area file9293**Waiting**94- [~] any blocked items and who/what they're waiting on9596**Related inbox items** *(if any)*97- items that mention this project9899**Whisper context** *(if ~/.whisper/ exists)*100- Plan: summary of current plan101- Notes: key findings102- Beads issues: <n> open, <n> in_progress103104**⚠ Active in flight** *(omit if none)*105- ◐ `<id>` — <title> [started: <date>]106- *(If your intended ticket is listed here, see **Claiming work** below.)*107108**Workspace**109- Worktree: path, branch, status110- Commits ahead of main, uncommitted changes, etc.111112**Suggested next step**113- what makes sense to do next — only suggest tickets NOT currently in_progress114```115116Then ask: *"Ready to continue, or want to adjust the plan?"*117118---119120## Claiming work121122Before writing any code, claim the ticket atomically and check for file conflicts.123124### Steps1251261. **Claim atomically:**127 ```bash128 bd update <ticket-id> --claim129 ```1301312. **Check for file-level conflicts** with other in-progress tickets:132 ```bash133 bd list --status in_progress --label branch:<branch> --json 2>/dev/null \134 | python3 -c "135 import json, sys136 issues = json.loads(sys.stdin.read() or '[]')137 for i in issues:138 files = (i.get('metadata') or {}).get('files', [])139 for f in files:140 print(i['id'] + '\t' + f)141 "142 ```143 Cross-reference against the claimed ticket's own `metadata.files`.144 If overlap found, surface a warning:145 ```146 ⚠ File conflict detected:147 services/api.py is also claimed by ticket-abc (in_progress)148149 Options:150 A) Gate this ticket until the blocker closes151 B) Coordinate merge order152 C) Proceed — accept the conflict (reconcile at merge time)153 ```1541553. **If backing off** (chose option A):156 ```bash157 bd update <ticket-id> --assignee "" --status open158 bd gate create <ticket-id> --type bead --await-id <blocking-id>159 ```160161### Metadata coverage warning162163File conflict detection only works when both tickets have `metadata.files` populated (set by `create-issues` or `/w link` at ticket creation time). Tickets created before this convention was adopted have no metadata. For those tickets, **"no conflict found" means unknown, not safe**.