Files
gastown/internal/session/names.go
gastown/crew/max b4a7b930e5 Update all prompts to use gt hook instead of gt mol status
- Role templates (crew, polecat, mayor, deacon, witness, refinery)
- prime.go startup protocol messages
- Documentation (propulsion, reference, molecules, wisp architecture)
- Session hints and sling prompts
- Formula template instructions
- CLAUDE.md

The hook is the user-facing concept, molecules are implementation details.
Agents should use `gt hook` to check what work is assigned to them.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:10:08 -08:00

68 lines
2.2 KiB
Go

// Package session provides polecat session lifecycle management.
package session
import (
"fmt"
"time"
)
// Prefix is the common prefix for all Gas Town tmux session names.
const Prefix = "gt-"
// MayorSessionName returns the session name for the Mayor agent.
func MayorSessionName() string {
return Prefix + "mayor"
}
// DeaconSessionName returns the session name for the Deacon agent.
func DeaconSessionName() string {
return Prefix + "deacon"
}
// WitnessSessionName returns the session name for a rig's Witness agent.
func WitnessSessionName(rig string) string {
return fmt.Sprintf("%s%s-witness", Prefix, rig)
}
// RefinerySessionName returns the session name for a rig's Refinery agent.
func RefinerySessionName(rig string) string {
return fmt.Sprintf("%s%s-refinery", Prefix, rig)
}
// CrewSessionName returns the session name for a crew worker in a rig.
func CrewSessionName(rig, name string) string {
return fmt.Sprintf("%s%s-crew-%s", Prefix, rig, name)
}
// PolecatSessionName returns the session name for a polecat in a rig.
func PolecatSessionName(rig, name string) string {
return fmt.Sprintf("%s%s-%s", Prefix, rig, name)
}
// SessionBeacon generates an identity beacon message for Claude Code sessions.
// This beacon becomes the session title in /resume picker, enabling workers to
// find their predecessor sessions.
//
// Format: [GAS TOWN] <address> • <mol-id or "ready"> • <timestamp>
//
// Examples:
// - [GAS TOWN] gastown/crew/max • gt-abc12 • 2025-12-30T14:32
// - [GAS TOWN] gastown/polecats/Toast • ready • 2025-12-30T09:15
// - [GAS TOWN] deacon • patrol • 2025-12-30T08:00
func SessionBeacon(address, molID string) string {
if molID == "" {
molID = "ready"
}
// Use local time in a compact format
timestamp := time.Now().Format("2006-01-02T15:04")
return fmt.Sprintf("[GAS TOWN] %s • %s • %s", address, molID, timestamp)
}
// PropulsionNudge generates the GUPP (Gas Town Universal Propulsion Principle) nudge.
// This is sent after the beacon to trigger autonomous work execution.
// The agent receives this as user input, triggering the propulsion principle:
// "If work is on your hook, YOU RUN IT."
func PropulsionNudge() string {
return "Run `gt hook` to check your hook and begin work."
}