refactor: remove legacy .beads-wisp infrastructure (gt-5klh)

Wisps are now just a flag on regular beads issues (Wisp=true).
No separate directory needed - hooks stored in .beads/.

Changes:
- wisp package: WispDir now points to .beads/, removed PatrolCycle
- manager.go: removed initWispBeads() - no separate dir to create
- mrqueue.go: MRs stored in .beads/mq/ instead of .beads-wisp/mq/
- doctor: removed obsolete wisp directory checks
- docs: updated wisp-architecture.md to reflect simplified model

🤖 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 21:34:14 -08:00
parent d30cf5e48c
commit 7e568770de
12 changed files with 148 additions and 964 deletions

View File

@@ -193,52 +193,6 @@ func TestRigSummary(t *testing.T) {
}
}
func TestInitWispBeads(t *testing.T) {
root, rigsConfig := setupTestTown(t)
manager := NewManager(root, rigsConfig, git.NewGit(root))
rigPath := filepath.Join(root, "test-rig")
if err := os.MkdirAll(rigPath, 0755); err != nil {
t.Fatalf("mkdir: %v", err)
}
if err := manager.initWispBeads(rigPath); err != nil {
t.Fatalf("initWispBeads: %v", err)
}
// Verify directory was created
wispPath := filepath.Join(rigPath, ".beads-wisp")
if _, err := os.Stat(wispPath); os.IsNotExist(err) {
t.Error(".beads-wisp/ was not created")
}
// Verify it's a git repo
gitPath := filepath.Join(wispPath, ".git")
if _, err := os.Stat(gitPath); os.IsNotExist(err) {
t.Error(".beads-wisp/ was not initialized as git repo")
}
// Verify config.yaml was created with wisp: true
configPath := filepath.Join(wispPath, "config.yaml")
content, err := os.ReadFile(configPath)
if err != nil {
t.Fatalf("reading config.yaml: %v", err)
}
if string(content) != "wisp: true\n# No sync-branch - wisp is local only\n" {
t.Errorf("config.yaml content = %q, want wisp: true with comment", string(content))
}
// Verify .gitignore was updated
gitignorePath := filepath.Join(rigPath, ".gitignore")
ignoreContent, err := os.ReadFile(gitignorePath)
if err != nil {
t.Fatalf("reading .gitignore: %v", err)
}
if string(ignoreContent) != ".beads-wisp/\n" {
t.Errorf(".gitignore content = %q, want .beads-wisp/", string(ignoreContent))
}
}
func TestEnsureGitignoreEntry_AddsEntry(t *testing.T) {
root, rigsConfig := setupTestTown(t)
manager := NewManager(root, rigsConfig, git.NewGit(root))