chore(beads): Sync beads from main

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
toast
2026-01-01 19:03:28 -08:00
committed by Steve Yegge
parent ffb8202fe1
commit dd122b44d1

View File

@@ -84,143 +84,50 @@ This information guides decisions in subsequent steps.
**Exit criteria:** Context primed, starting state documented.""" **Exit criteria:** Context primed, starting state documented."""
[[steps]] [[steps]]
id = "handle-uncommitted" id = "handle-dirty-state"
title = "Handle uncommitted changes" title = "Handle uncommitted and untracked work"
needs = ["assess-state"] needs = ["assess-state"]
description = """ description = """
Handle staged and unstaged changes before syncing. Clean up any in-flight work before syncing.
**Check for uncommitted changes:**
```bash
git status --porcelain | grep -v '^??' # Exclude untracked
```
**If no uncommitted changes:** Skip to next step.
**If uncommitted changes exist:** **If uncommitted changes exist:**
**Option A - Commit if ready:** Option A - Commit if ready:
Changes are complete enough to commit (even as WIP):
```bash ```bash
git add -A && git commit -m "WIP: <description>" git add -A && git commit -m "WIP: <description>"
``` ```
Use this when: Option B - Stash if not ready:
- Changes are coherent (one logical unit)
- You want to preserve them through sync
- They're ready for potential rebase
**Option B - Stash if not ready:**
Changes are experimental or incomplete:
```bash ```bash
git stash push -m "pre-sync stash $(date +%Y%m%d-%H%M%S)" git stash push -m "pre-sync stash $(date +%Y%m%d-%H%M%S)"
``` ```
Use this when: **If untracked files exist:**
- Changes are scattered/incomplete
- You're unsure if you want to keep them
- You need to temporarily set them aside
**Exit criteria:** No staged or unstaged changes (git status clean except untracked).""" For each untracked file, decide:
- **Keep**: Add to .gitignore or commit
- **Delete**: `rm <file>`
- **Stash**: Can't stash untracked directly; commit or delete
[[steps]] **WARN the agent**: Report untracked files prominently. They may be:
id = "handle-untracked" - WIP that should be preserved
title = "Handle untracked files" - Build artifacts that should be gitignored
needs = ["handle-uncommitted"] - Cruft that should be deleted
description = """
Review and handle untracked files before syncing.
**List untracked files:** Don't auto-delete without confirmation.
```bash
git status --porcelain | grep '^??'
```
**If no untracked files:** Skip to next step. **If stash entries exist:**
**For each untracked file, decide:** List and assess:
| File Type | Action |
|-----------|--------|
| Build artifacts (.exe, .o, *.test) | Add to .gitignore |
| IDE/editor files (.idea/, .vscode/) | Add to .gitignore |
| Log files (*.log) | Delete or gitignore |
| WIP code files | Commit or delete |
| Config with secrets | Add to .gitignore, WARN |
| Unknown | Ask before deleting |
**Actions:**
- **Keep (gitignore):**
```bash
echo "<pattern>" >> .gitignore
```
- **Keep (commit):**
```bash
git add <file>
git commit -m "add: <file description>"
```
- **Delete:**
```bash
rm <file>
```
**WARN the agent**: Untracked files may contain valuable WIP.
Never auto-delete without review. When in doubt, gitignore.
**Exit criteria:** All untracked files handled (committed, gitignored, or deleted)."""
[[steps]]
id = "handle-stashes"
title = "Review and clean stash entries"
needs = ["handle-untracked"]
description = """
Review stash entries and clean up old ones.
**List stashes:**
```bash ```bash
git stash list git stash list
git stash show -p stash@{0} # Preview each
``` ```
**If no stashes:** Skip to next step. Old stashes (>1 week) are likely stale. Consider dropping.
Recent stashes may contain valuable WIP - preserve or commit.
**For each stash entry:** **Exit criteria:** Working tree clean or explicitly stashed."""
1. **Check age:**
```bash
git log -1 --format="%ar" stash@{N} # "2 weeks ago"
```
2. **Preview contents:**
```bash
git stash show stash@{N} # Files changed
git stash show -p stash@{N} # Full diff
```
**Decision matrix:**
| Age | Contents | Action |
|-----|----------|--------|
| < 1 week | Valuable WIP | Keep or apply |
| < 1 week | Obsolete | Drop |
| > 1 week | Any | Likely stale, consider dropping |
| > 1 month | Any | Almost certainly stale, drop |
**Actions:**
- **Keep:** Leave in stash list (no action)
- **Apply:** `git stash apply stash@{N}` then handle as uncommitted
- **Drop:** `git stash drop stash@{N}`
**Caution:** Stash indices shift when you drop! Drop from highest index first:
```bash
git stash drop stash@{2} # Drop this first
git stash drop stash@{1} # Then this
git stash drop stash@{0} # Then this
```
**Exit criteria:** Stash reviewed, old/stale entries dropped."""
[[steps]] [[steps]]
id = "sync-git" id = "sync-git"
@@ -467,7 +374,7 @@ However, they must be tracked.
[[steps]] [[steps]]
id = "cleanup-worktrees" id = "cleanup-worktrees"
title = "Clean up stale worktrees" title = "Clean up stale worktrees"
needs = ["handle-stashes"] needs = ["handle-dirty-state"]
description = """ description = """
Remove orphaned worktrees from cross-rig work. Remove orphaned worktrees from cross-rig work.