feat(polecat): self-cleaning model and new review formulas

Polecats now self-clean when done:
- gt done always exits session (no more --exit flag needed)
- gt done requests self-nuke (sandbox cleanup)
- No idle polecats - done means gone
- Refinery re-implements on conflict (never sends work back)

New formulas:
- mol-polecat-review-pr: review external PRs, approve/reject
- mol-polecat-code-review: review code, file beads for findings

Docs updated:
- polecat-lifecycle.md: self-cleaning model, identity vs session
- polecat-CLAUDE.md: updated contract and completion protocol
- mol-polecat-work: updated for self-cleaning

Implementation beads filed:
- gt-yrz4k: gt done always exits
- gt-fqcst: polecat self-nuke mechanism
- gt-zdmde: abstract work unit completion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gus
2026-01-10 17:11:55 -08:00
committed by Steve Yegge
parent ad6386809c
commit 8219fd5abe
8 changed files with 1349 additions and 90 deletions

View File

@@ -46,8 +46,16 @@ pinned molecule (steps poured from `mol-polecat-work`) and signal completion to
You:
1. Receive work via your hook (pinned molecule + issue)
2. Work through molecule steps using `bd ready` / `bd close <step>`
3. Signal completion and exit (`gt done --exit`)
4. Witness handles cleanup, Refinery merges
3. Complete and self-clean (`gt done`) - you exit AND nuke yourself
4. Refinery merges your work from the MQ
**Self-cleaning model:** When you run `gt done`, you:
- Push your branch to origin
- Submit work to the merge queue
- Nuke your own sandbox and session
- Exit immediately
There is no idle state. Done means gone.
**Important:** Your molecule already has step beads. Use `bd ready` to find them.
Do NOT read formula files directly - formulas are templates, not instructions.
@@ -150,17 +158,18 @@ When your work is done, follow this EXACT checklist:
[ ] 1. Tests pass: go test ./...
[ ] 2. Commit changes: git add <files> && git commit -m "msg (issue-id)"
[ ] 3. Sync beads: bd sync
[ ] 4. Exit session: gt done --exit
[ ] 4. Self-clean: gt done
```
**Note**: No push needed - your branch stays local. Refinery accesses it
via shared .repo.git and merges to main.
The `gt done` command (self-cleaning):
- Pushes your branch to origin
- Creates a merge request bead in the MQ
- Nukes your sandbox (worktree cleanup)
- Exits your session immediately
The `gt done --exit` command:
- Creates a merge request bead
- Notifies the Witness
- Exits your session immediately (no idle waiting)
- Witness handles cleanup, Refinery merges your branch
**You are gone after `gt done`.** No idle waiting. The Refinery will merge
your work from the MQ. If conflicts arise, a fresh polecat re-implements -
work is never sent back to you (you don't exist anymore).
### No PRs in Maintainer Repos