Commit Graph

562 Commits

Author SHA1 Message Date
Steve Yegge
4512916011 bd sync: 2025-12-21 17:26:39 2025-12-22 13:05:04 -08:00
Steve Yegge
4d0d9c6226 bd sync: 2025-12-21 17:26:20 2025-12-22 13:05:04 -08:00
Steve Yegge
d4c89ca77a docs: Add propulsion principle documentation (gt-7hor)
Write canonical documentation for the Universal Gas Town Propulsion
Principle covering:
- The One Rule (hook has work → work happens)
- Why it works (stateless agents, molecule-driven, beads as control plane)
- The sling lifecycle diagram (spawn → attach → execute → burn)
- Agent startup protocol (gt prime → check attachment → execute or wait)
- Propulsion patterns and anti-patterns
- Nondeterministic idempotence

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 13:05:04 -08:00
Steve Yegge
4bf7c980b5 bd sync: add gt-7919 (test failures) and gt-7920 (refinery patrol mol) 2025-12-22 13:02:33 -08:00
Steve Yegge
982b7cb5ed Implement gt sling command (gt-4ev4)
The unified work dispatch command that implements spawn + assign + pin
in one operation, based on the Universal Gas Town Propulsion Principle:
"If you find something on your hook, YOU RUN IT."

Supports:
- Proto names (e.g., gt sling feature polecat/alpha)
- Issue IDs with optional molecule (e.g., gt sling gt-xyz polecat/beta -m bugfix)
- Target addressing (polecat/name, deacon/, witness/, refinery/)
- --wisp flag for ephemeral molecules
- --force flag for hook collision override
- Hook collision detection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 13:02:33 -08:00
Steve Yegge
df27d6cbb8 Merge polecat/nux: Implement gt mol status command (gt-uym5) 2025-12-22 12:38:32 -08:00
Steve Yegge
e1bbd81fb0 Implement gt mol status command (gt-uym5)
Add `gt mol status [target]` command to show what's on an agent's hook:
- Auto-detects current agent from working directory
- Shows pinned bead and attached molecule info
- Displays phase progress with progress bar
- Indicates wisp vs durable molecules
- Provides next action hints

Also adds `mol` alias for the `molecule` command.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:34:13 -08:00
Steve Yegge
a5ce6046ab docs: Update witness template to use gt nudge/peek
Replaces raw tmux send-keys with gt nudge in spawn processing.
Adds Session Communication section to key commands reference.
Adds warning against raw tmux send-keys.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:33:17 -08:00
Steve Yegge
794a9ee8a8 feat: Add gt peek command and session communication docs
Adds gt peek as ergonomic alias for gt session capture:
  gt peek gastown/furiosa      # Last 100 lines
  gt peek gastown/furiosa 50   # Last 50 lines

Creates nudge/peek pair as canonical session interface:
  gt nudge - send TO session (reliable delivery)
  gt peek  - read FROM session (capture-pane wrapper)

Adds docs/session-communication.md explaining:
- Why raw tmux send-keys is unreliable for Claude
- The reliable NudgeSession pattern (literal + delay + Enter)
- Command reference and common patterns
- Guidance for template authors

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:31:38 -08:00
Steve Yegge
514bcb7e96 feat: Update gt nudge to accept rig/polecat format
Now accepts ergonomic rig/polecat addresses:
  gt nudge gastown/furiosa "Check your mail"

Still supports raw session names for legacy use.
Reuses parseAddress and getSessionManager from session.go.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:28:14 -08:00
Steve Yegge
8699b7b3fd fix: Clean polecat .beads/ on spawn to prevent contamination (gt-z3qf)
When polecat branches have .beads/ tracked from previous bd sync operations,
those files would contaminate the new worktree. Now setupSharedBeads():

1. Removes any existing .beads/ contents before creating redirect
2. Points redirect directly to mayor/rig/.beads (matches crew workers)

Also adds sling-design.md documenting the gt sling command design.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:22:08 -08:00
Steve Yegge
c9ac8d66c6 bd sync: 2025-12-22 12:20:43 2025-12-22 12:20:43 -08:00
Steve Yegge
ff738051c8 bd sync: 2025-12-22 12:20:24 2025-12-22 12:20:24 -08:00
Steve Yegge
b9cee8f838 bd sync: 2025-12-22 12:19:36 2025-12-22 12:19:36 -08:00
Steve Yegge
46595af7aa bd sync: 2025-12-22 12:13:17 2025-12-22 12:13:17 -08:00
Steve Yegge
c0eb252463 bd sync: 2025-12-22 12:12:57 2025-12-22 12:12:57 -08:00
Steve Yegge
dbbdb8d385 bd sync: 2025-12-22 12:12:32 2025-12-22 12:12:32 -08:00
Steve Yegge
e05a9469ac bd sync: 2025-12-22 03:11:47 2025-12-22 03:11:55 -08:00
Steve Yegge
003a4f2236 Fix wisp storage path: rig root not mayor/rig (gt-nq6j)
Wisps are at <rig>/.beads-wisp/, outside any git clone.
This matches the actual code implementation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 03:11:41 -08:00
Steve Yegge
4b48cd8564 bd sync: 2025-12-22 02:59:06 2025-12-22 02:59:06 -08:00
Steve Yegge
5f29a3d07f Update wisp-architecture.md: shared storage for rig patrols (gt-nq6j)
- All rig patrols (Deacon, Witness, Refinery) now share mayor/rig/.beads-wisp/
- Removed separate wisp directories for witness/ and refinery/
- Polecats do not use wisps (each assignment has audit value)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:58:36 -08:00
Steve Yegge
98c48f0f29 bd sync: 2025-12-22 02:48:52 2025-12-22 02:48:52 -08:00
Steve Yegge
80677e1e24 bd sync: 2025-12-22 02:37:12 2025-12-22 02:37:12 -08:00
Steve Yegge
208262e728 bd sync: 2025-12-22 02:14:12 2025-12-22 02:14:12 -08:00
Steve Yegge
96a6ae7d4e bd sync: close gt-3x0z.9 (wisp-based patrol) 2025-12-22 02:14:06 -08:00
Steve Yegge
21e51d7bc8 bd sync: 2025-12-22 02:13:56 2025-12-22 02:13:56 -08:00
Steve Yegge
ae513a5db4 Deacon uses wisp-based patrol (gt-3x0z.9)
Daemon changes:
- Remove checkDeaconAttachment() - Deacon self-spawns wisps
- Remove findDeaconPatrolMolecule() - unused
- Remove nudgeDeaconForPatrol() - unused
- Remove DeaconPatrolMolecule const - unused
- Remove beads import - no longer needed

Deacon template changes:
- Update to wisp-based patrol model
- Replace bd mol run with bd mol spawn (wisps by default)
- Remove pinned molecule concept for patrol
- Add Why Wisps section explaining ephemeral design
- Update startup/handoff protocols for wisp-based cycles

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:13:24 -08:00
Steve Yegge
3154d0534c bd sync: 2025-12-22 02:11:09 2025-12-22 02:11:09 -08:00
Steve Yegge
e7efe11cc8 Add molecular chemistry documentation (gt-3x0z.9)
New documents:
- docs/molecular-chemistry.md: Comprehensive guide to the chemistry metaphor
  for work composition. Covers all phases (proto/mol/wisp), transitions
  (pour/wisp/squash/burn/distill), polymorphic bond operator, and the
  thermodynamic properties of the work execution engine.

- docs/chemistry-design-changes.md: Implementation roadmap for realizing
  the chemistry UX in Beads and Gas Town. Includes specifications for
  new commands (bd pour, bd wisp, bd pin, bd hook) and migration notes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:59:02 -08:00
Steve Yegge
f3c961096a Complete three-tier config migration (gt-k1lr)
- Add doctor checks for new config architecture:
  - SettingsCheck: Verify rigs have settings/ directory
  - RuntimeGitignoreCheck: Verify .runtime/ is gitignored
  - LegacyGastownCheck: Detect/remove old .gastown/ dirs
- Update .gitignore to include .runtime/
- Update architecture.md with new directory structure
- Update hq.md to clarify PGT vs GGT config locations

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:33:36 -08:00
Steve Yegge
6e8c34452a bd sync: 2025-12-22 01:33:26 2025-12-22 01:33:26 -08:00
Steve Yegge
97e0535bfe Implement three-tier config architecture (gt-k1lr tasks 1-5)
**Architecture changes:**
- Renamed `.gastown/` → `.runtime/` for runtime state (gitignored)
- Added `settings/` directory for rig behavioral config (git-tracked)
- Added `mayor/config.json` for town-level config (MayorConfig type)
- Separated RigConfig (identity) from RigSettings (behavioral)

**File location changes:**
- Town runtime: `~/.gastown/*` → `~/.runtime/*`
- Rig runtime: `<rig>/.gastown/*` → `<rig>/.runtime/*`
- Rig config: `<rig>/.gastown/config.json` → `<rig>/settings/config.json`
- Namepool state: `namepool.json` → `namepool-state.json`

**New types:**
- MayorConfig: town-level behavioral config
- RigSettings: rig behavioral config (merge_queue, theme, namepool)
- RigConfig now identity-only (name, git_url, beads, created_at)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:22:43 -08:00
Steve Yegge
f16ce2d634 bd sync: 2025-12-22 01:22:33 2025-12-22 01:22:33 -08:00
Steve Yegge
ec8ba53e07 bd sync: 2025-12-22 01:04:51 2025-12-22 01:04:51 -08:00
Steve Yegge
5613fbe36c bd sync: 2025-12-22 01:04:10 2025-12-22 01:04:10 -08:00
Steve Yegge
5d7291962a Rename ephemeral -> wisp terminology throughout Gas Town
- .beads-ephemeral/ -> .beads-wisp/
- Rename doctor checks: EphemeralCheck -> WispCheck
- Update all docs to use 'transient' for polecats, 'wisp' for molecules
- Preserve 'ephemeral' only as descriptive adjective for wisps
- Steam engine metaphor: wisps are steam vapors that dissipate

Part of Christmas launch wisp terminology unification.
2025-12-22 00:55:31 -08:00
Steve Yegge
ebbe886d81 Fix crew worker mail identity mismatch (gt-2xiv)
Normalize crew/ and polecats/ to canonical form in addressToIdentity():
- gastown/crew/dave -> gastown/dave
- gastown/polecats/Toast -> gastown/Toast

Follows Postels Law: be liberal in what you accept.
2025-12-22 00:40:43 -08:00
Steve Yegge
ed089cbd17 Add role-based theming with layered config and doctor check
Role themes:
- witness: rust (red/alert)
- refinery: plum (purple)
- crew/polecat: inherit rig theme

Resolution order:
1. Per-rig role override (rig/.gastown/config.json role_themes)
2. Global role default (mayor/town.json theme.role_defaults)
3. Built-in role defaults
4. Rig theme (config or hash-based)

Config schema:
- TownConfig.Theme.RoleDefaults: global role->theme map
- RigConfig.Theme.RoleThemes: per-rig role overrides

Doctor check:
- Detects sessions with outdated theme format (brackets)
- Fixable with 'gt theme apply --all'

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:39:50 -08:00
Steve Yegge
ad0b7b7f6a Add --all flag to gt theme apply, fix session handling
- Add --all/-a flag to apply themes across all rigs, not just current
- Add proper handling for deacon and witness sessions in theme apply
- Fix crew status line to show full path: rig/crew/name

Previously, gt theme apply only applied to sessions in the current rig,
and skipped deacon/witness sessions due to different naming patterns.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:32:47 -08:00
Steve Yegge
47ce32c6c1 Fix crew status line to show full path: rig/crew/name
The status-left for crew members was showing just rig/name (e.g.,
"gastown/max") instead of the full path (e.g., "gastown/crew/max").

This makes crew member identity clearer in the tmux status bar, matching
the mail address format used elsewhere.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:27:19 -08:00
Steve Yegge
8cf15ded35 Add rotating MOTD messages to deacon heartbeat
The deacon patrol role is thankless - it gets a nudge every minute.
This adds rotating motivational and educational tips to make it more fun.
Messages include gratitude, encouragement, and tips about Gas Town.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:18:00 -08:00
Steve Yegge
6253b97d41 Remove caveman handoff file 2025-12-22 00:14:20 -08:00
Steve Yegge
5b44c63838 Add handoff for deacon MOTD feature 2025-12-22 00:12:43 -08:00
Steve Yegge
bd57858c33 Remove redundant role icons from status-right
The role icon is already shown on the left side of the status bar,
so repeating it on the right wastes space. Removed from:
- Mayor (🎩)
- Deacon (🦉)
- Witness (👁)
- Refinery (🏭)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:07:03 -08:00
Steve Yegge
412418ff75 bd sync: 2025-12-22 00:05:55 2025-12-22 00:05:55 -08:00
Steve Yegge
965644b0fe Add identity collision prevention, detection, and correction (gt-xp2s)
- internal/lock: New package with PID-based lockfiles for worker identity
- gt prime: Acquire identity lock for crew/polecat roles, fail on collision
- gt agents check: Detect stale locks and identity collisions
- gt agents fix: Clean up stale locks
- gt doctor: New identity-collision check with --fix support

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-22 00:05:46 -08:00
Steve Yegge
97db49f72c Add wisp architecture documentation
- Create wisp-architecture.md with canonical storage spec
- Document role assignments (Deacon/Witness/Refinery use wisps)
- Specify .beads-ephemeral/ as gitignored storage
- Define patrol execution pattern with required squash
- Update architecture.md to reference new doc

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:35:55 -08:00
Steve Yegge
fad9e1a5f6 bd sync: 2025-12-21 23:11:40 2025-12-21 23:35:55 -08:00
Steve Yegge
c975d56b9e Use 😺 emoji instead of 'polecats' text in status bars
More compact and visually consistent with other emoji indicators.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:33:02 -08:00
Steve Yegge
569e376efc Enhance deacon, witness, and refinery status lines
Deacon:
- Now shows both rig count and polecat count
- Added mail preview (40 chars)

Witness:
- Shows polecat count and crew count (if any)
- Added mail preview (35 chars)

Refinery:
- Shows current item being merged (issue ID) instead of generic +1
- Shows queue count when items pending
- Added mail preview (30 chars)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:31:28 -08:00