refactor: remove polecat state derivation from issue status (gt-gaxo.4)

ZFC cleanup: Go should be message transport, not decision-maker.

Before: loadFromBeads used switch on issue.Status to derive polecat
state (open/in_progress -> working, closed -> done).

After: Simple rule - has issue assigned = working, no issue = idle.
We do not interpret what issue.Status means; that is for Claude in
the Deacon molecule.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-24 00:21:13 -08:00
parent 6552b439ba
commit bca357e4eb
2 changed files with 966 additions and 975 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -549,10 +549,9 @@ func (m *Manager) Reset(name string) error {
return m.ClearIssue(name)
}
// loadFromBeads derives polecat state from beads assignee field.
// State is derived as follows:
// - If an issue is assigned to this polecat and is open/in_progress: StateWorking
// - If no issue assigned: StateIdle
// loadFromBeads gets polecat info from beads assignee field.
// State is simple: issue assigned → working, no issue → idle.
// We don't interpret issue status (ZFC: Go is transport, not decision-maker).
func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
polecatPath := m.polecatDir(name)
branchName := fmt.Sprintf("polecat/%s", name)
@@ -572,20 +571,13 @@ func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
}, nil
}
// Derive state from issue
// Simple rule: has issue = working, no issue = idle
// We don't interpret issue.Status - that's for Claude to decide
state := StateIdle
issueID := ""
if issue != nil {
issueID = issue.ID
switch issue.Status {
case "open", "in_progress":
state = StateWorking
case "closed":
state = StateDone
default:
// Unknown status, assume working if assigned
state = StateWorking
}
state = StateWorking
}
return &Polecat{