feat(crew): Provision .claude/commands/ for crew and polecat workspaces (gt-jhr85)

When adding a crew member with 'gt crew add' or spawning a polecat,
provision the .claude/commands/ directory with standard slash commands
like /handoff. This ensures all agents have Gas Town utilities even if
the source repo does not have them tracked.

Changes:
- Add embedded commands templates (internal/templates/commands/)
- Add ProvisionCommands() to templates package
- Call ProvisionCommands from crew and polecat managers
- Add gt doctor commands-provisioned check with --fix support
This commit is contained in:
slit
2026-01-02 17:21:43 -08:00
committed by Steve Yegge
parent a62b35a85c
commit d4eed2dcf2
6 changed files with 304 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/steveyegge/gastown/internal/git"
"github.com/steveyegge/gastown/internal/rig"
"github.com/steveyegge/gastown/internal/templates"
"github.com/steveyegge/gastown/internal/util"
)
@@ -104,6 +105,13 @@ func (m *Manager) Add(name string, createBranch bool) (*CrewWorker, error) {
fmt.Printf("Warning: could not set up shared beads: %v\n", err)
}
// Provision .claude/commands/ with standard slash commands (e.g., /handoff)
// This ensures crew workers have Gas Town utilities even if source repo lacks them.
if err := templates.ProvisionCommands(crewPath); err != nil {
// Non-fatal - crew can still work, warn but don't fail
fmt.Printf("Warning: could not provision slash commands: %v\n", err)
}
// NOTE: We intentionally do NOT write to CLAUDE.md here.
// Gas Town context is injected ephemerally via SessionStart hook (gt prime).
// Writing to CLAUDE.md would overwrite project instructions and leak