refactor: rename ephemeral to wisp (beads v0.33.1 terminology)
Update .beads-ephemeral/ to .beads-wisp/ per beads v0.33.1: - Renamed initEphemeralBeads to initWispBeads - Changed directory from .beads-ephemeral/ to .beads-wisp/ - Changed config from ephemeral: true to wisp: true - Updated help text and output messages - Updated tests Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ var rigAddCmd = &cobra.Command{
|
|||||||
This creates a rig container with:
|
This creates a rig container with:
|
||||||
- config.json Rig configuration
|
- config.json Rig configuration
|
||||||
- .beads/ Rig-level issue tracking (initialized)
|
- .beads/ Rig-level issue tracking (initialized)
|
||||||
- .beads-ephemeral/ Local runtime tracking (gitignored)
|
- .beads-wisp/ Local wisp/molecule tracking (gitignored)
|
||||||
- refinery/rig/ Canonical main clone
|
- refinery/rig/ Canonical main clone
|
||||||
- mayor/rig/ Mayor's working clone
|
- mayor/rig/ Mayor's working clone
|
||||||
- crew/main/ Default human workspace
|
- crew/main/ Default human workspace
|
||||||
@@ -193,7 +193,7 @@ func runRigAdd(cmd *cobra.Command, args []string) error {
|
|||||||
fmt.Printf(" %s/\n", name)
|
fmt.Printf(" %s/\n", name)
|
||||||
fmt.Printf(" ├── config.json\n")
|
fmt.Printf(" ├── config.json\n")
|
||||||
fmt.Printf(" ├── .beads/ (prefix: %s)\n", newRig.Config.Prefix)
|
fmt.Printf(" ├── .beads/ (prefix: %s)\n", newRig.Config.Prefix)
|
||||||
fmt.Printf(" ├── .beads-ephemeral/ (local runtime tracking)\n")
|
fmt.Printf(" ├── .beads-wisp/ (local wisp/molecule tracking)\n")
|
||||||
fmt.Printf(" ├── refinery/rig/ (canonical main)\n")
|
fmt.Printf(" ├── refinery/rig/ (canonical main)\n")
|
||||||
fmt.Printf(" ├── mayor/rig/ (mayor's clone)\n")
|
fmt.Printf(" ├── mayor/rig/ (mayor's clone)\n")
|
||||||
fmt.Printf(" ├── crew/%s/ (your workspace)\n", rigAddCrew)
|
fmt.Printf(" ├── crew/%s/ (your workspace)\n", rigAddCrew)
|
||||||
|
|||||||
@@ -278,9 +278,9 @@ func (m *Manager) AddRig(opts AddRigOptions) (*Rig, error) {
|
|||||||
return nil, fmt.Errorf("initializing beads: %w", err)
|
return nil, fmt.Errorf("initializing beads: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize ephemeral beads for wisp/molecule tracking
|
// Initialize wisp beads for wisp/molecule tracking
|
||||||
if err := m.initEphemeralBeads(rigPath); err != nil {
|
if err := m.initWispBeads(rigPath); err != nil {
|
||||||
return nil, fmt.Errorf("initializing ephemeral beads: %w", err)
|
return nil, fmt.Errorf("initializing wisp beads: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register in town config
|
// Register in town config
|
||||||
@@ -356,11 +356,11 @@ func (m *Manager) initBeads(rigPath, prefix string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// initEphemeralBeads initializes the ephemeral beads database at rig level.
|
// initWispBeads initializes the wisp beads database at rig level.
|
||||||
// Ephemeral beads are local-only (no sync-branch) and used for runtime tracking
|
// Wisp beads are local-only (no sync-branch) and used for runtime tracking
|
||||||
// of wisps and molecules.
|
// of wisps and molecules.
|
||||||
func (m *Manager) initEphemeralBeads(rigPath string) error {
|
func (m *Manager) initWispBeads(rigPath string) error {
|
||||||
beadsDir := filepath.Join(rigPath, ".beads-ephemeral")
|
beadsDir := filepath.Join(rigPath, ".beads-wisp")
|
||||||
if err := os.MkdirAll(beadsDir, 0755); err != nil {
|
if err := os.MkdirAll(beadsDir, 0755); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -372,16 +372,16 @@ func (m *Manager) initEphemeralBeads(rigPath string) error {
|
|||||||
return fmt.Errorf("git init: %w", err)
|
return fmt.Errorf("git init: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create ephemeral config (no sync-branch needed)
|
// Create wisp config (no sync-branch needed)
|
||||||
configPath := filepath.Join(beadsDir, "config.yaml")
|
configPath := filepath.Join(beadsDir, "config.yaml")
|
||||||
configContent := "ephemeral: true\n# No sync-branch - ephemeral is local only\n"
|
configContent := "wisp: true\n# No sync-branch - wisp is local only\n"
|
||||||
if err := os.WriteFile(configPath, []byte(configContent), 0644); err != nil {
|
if err := os.WriteFile(configPath, []byte(configContent), 0644); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add .beads-ephemeral/ to .gitignore if not already present
|
// Add .beads-wisp/ to .gitignore if not already present
|
||||||
gitignorePath := filepath.Join(rigPath, ".gitignore")
|
gitignorePath := filepath.Join(rigPath, ".gitignore")
|
||||||
return m.ensureGitignoreEntry(gitignorePath, ".beads-ephemeral/")
|
return m.ensureGitignoreEntry(gitignorePath, ".beads-wisp/")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensureGitignoreEntry adds an entry to .gitignore if it doesn't already exist.
|
// ensureGitignoreEntry adds an entry to .gitignore if it doesn't already exist.
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ func TestRigSummary(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInitEphemeralBeads(t *testing.T) {
|
func TestInitWispBeads(t *testing.T) {
|
||||||
root, rigsConfig := setupTestTown(t)
|
root, rigsConfig := setupTestTown(t)
|
||||||
manager := NewManager(root, rigsConfig, git.NewGit(root))
|
manager := NewManager(root, rigsConfig, git.NewGit(root))
|
||||||
|
|
||||||
@@ -202,30 +202,30 @@ func TestInitEphemeralBeads(t *testing.T) {
|
|||||||
t.Fatalf("mkdir: %v", err)
|
t.Fatalf("mkdir: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := manager.initEphemeralBeads(rigPath); err != nil {
|
if err := manager.initWispBeads(rigPath); err != nil {
|
||||||
t.Fatalf("initEphemeralBeads: %v", err)
|
t.Fatalf("initWispBeads: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify directory was created
|
// Verify directory was created
|
||||||
ephemeralPath := filepath.Join(rigPath, ".beads-ephemeral")
|
wispPath := filepath.Join(rigPath, ".beads-wisp")
|
||||||
if _, err := os.Stat(ephemeralPath); os.IsNotExist(err) {
|
if _, err := os.Stat(wispPath); os.IsNotExist(err) {
|
||||||
t.Error(".beads-ephemeral/ was not created")
|
t.Error(".beads-wisp/ was not created")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify it's a git repo
|
// Verify it's a git repo
|
||||||
gitPath := filepath.Join(ephemeralPath, ".git")
|
gitPath := filepath.Join(wispPath, ".git")
|
||||||
if _, err := os.Stat(gitPath); os.IsNotExist(err) {
|
if _, err := os.Stat(gitPath); os.IsNotExist(err) {
|
||||||
t.Error(".beads-ephemeral/ was not initialized as git repo")
|
t.Error(".beads-wisp/ was not initialized as git repo")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify config.yaml was created with ephemeral: true
|
// Verify config.yaml was created with wisp: true
|
||||||
configPath := filepath.Join(ephemeralPath, "config.yaml")
|
configPath := filepath.Join(wispPath, "config.yaml")
|
||||||
content, err := os.ReadFile(configPath)
|
content, err := os.ReadFile(configPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("reading config.yaml: %v", err)
|
t.Fatalf("reading config.yaml: %v", err)
|
||||||
}
|
}
|
||||||
if string(content) != "ephemeral: true\n# No sync-branch - ephemeral is local only\n" {
|
if string(content) != "wisp: true\n# No sync-branch - wisp is local only\n" {
|
||||||
t.Errorf("config.yaml content = %q, want ephemeral: true with comment", string(content))
|
t.Errorf("config.yaml content = %q, want wisp: true with comment", string(content))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify .gitignore was updated
|
// Verify .gitignore was updated
|
||||||
@@ -234,8 +234,8 @@ func TestInitEphemeralBeads(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("reading .gitignore: %v", err)
|
t.Fatalf("reading .gitignore: %v", err)
|
||||||
}
|
}
|
||||||
if string(ignoreContent) != ".beads-ephemeral/\n" {
|
if string(ignoreContent) != ".beads-wisp/\n" {
|
||||||
t.Errorf(".gitignore content = %q, want .beads-ephemeral/", string(ignoreContent))
|
t.Errorf(".gitignore content = %q, want .beads-wisp/", string(ignoreContent))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user