Commit Graph

18 Commits

Author SHA1 Message Date
Ben Kraus
38adfa4d8b codex 2026-01-08 12:36:54 -05:00
max
1b69576573 fix: Address golangci-lint errors (errcheck, gosec) (#76)
Apply PR #76 from dannomayernotabot:

- Add golangci exclusions for internal package false positives
- Tighten file permissions (0644 -> 0600) for sensitive files
- Add ReadHeaderTimeout to HTTP server (slowloris prevention)
- Explicit error ignoring with _ = for intentional cases
- Add //nolint comments with justifications
- Spelling: cancelled -> canceled (US locale)

Co-Authored-By: dannomayernotabot <noreply@github.com>

🤖 Generated with Claude Code
2026-01-03 16:11:55 -08:00
gastown/polecats/slit
e6f3e0c28e feat(hook): Add gt hook show <agent> for viewing other agents' hooks
Adds a new subcommand `gt hook show <agent>` that displays what work
is on any agent's hook in a compact one-line format:

  gastown/polecats/nux: gt-abc123 'Fix the widget bug' [hooked]

Use cases:
- Mayor checking what polecats are working on
- Witness checking polecat status
- Debugging coordination issues
- Quick status overview

Also supports --json flag for machine-readable output.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:24:37 -08:00
valkyrie
62354dfe1b feat(beads): Capture session_id in issue close for CV attribution
Pass CLAUDE_SESSION_ID environment variable to bd close for work attribution
tracking, enabling queries like "what work did this session do?" for entity
CV building (per decision 009-session-events-architecture.md).

Changes:
- beads.Close() and CloseWithReason() now pass --session to bd close
- Updated all direct exec.Command("bd", "close"...) calls:
  - internal/mail/mailbox.go - closeInDir()
  - internal/cmd/swarm.go - swarm land and cancel
  - internal/cmd/hook.go - auto-replace completed beads
  - internal/cmd/synthesis.go - convoy close
  - internal/cmd/crew_lifecycle.go - workspace removal
  - internal/cmd/polecat.go - polecat nuke

The bd CLI already supports --session (or CLAUDE_SESSION_ID env var) so
this change ensures consistent session tracking across all gt close paths.

Fixes: gt-nvz8b

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:20:50 -08:00
gastown/polecats/ace
81d5b8e75f fix: gt hook uses --status=hooked for consistency with gt sling (gt-frhcq.1)
The gt hook command was using --status=pinned while gt sling and the rest
of the codebase use --status=hooked. This inconsistency meant gt hook would
not find beads hooked by gt sling, and vice versa.

Changes:
- hook.go: Use beads.StatusHooked instead of beads.StatusPinned
- hook.go: Update bd update command to use --status=hooked
- unsling.go: Use beads.StatusHooked when finding hooked beads
- Update error messages and comments to say "hooked" instead of "pinned"

This fix ensures gt hook works uniformly for all bead types (molecules,
issues, mail beads) since they all use the same beads system.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 12:09:03 -08:00
gastown/crew/max
e539ea3cc8 Fix gt hook --json flag not working
The --json flag was only registered on the status subcommand, not the
parent hook command. When running `gt hook --json` (no args), it would
fail with "unknown flag". Now the flag is registered on both.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:24:35 -08:00
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
gastown/crew/max
94a6784c1e Add gt hook status alias for gt mol status
Makes 'gt hook' (no args) show hook status instead of requiring a bead ID.
Also adds 'gt hook status' subcommand for explicit usage. The hook concept
is user-facing while molecules are implementation details.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 21:48:28 -08:00
Steve Yegge
2844edb541 Instrument gt commands to appear in activity feed (gt-7aw1m)
Phase 1 of activity feed improvements: gt commands now log events to
~/gt/.events.jsonl. This is the raw audit log that the feed daemon
(phase 2) will curate into the user-facing feed.

Instrumented commands:
- gt sling: logs sling events with bead and target
- gt hook: logs hook events with bead
- gt handoff: logs handoff events with subject
- gt done: logs done events with bead and branch
- gt mail send: logs mail events with to and subject

Event format follows the specification:
```json
{"ts":"2025-12-30T07:36:28Z","source":"gt","type":"mail",
 "actor":"gastown/crew/joe","payload":{...},"visibility":"feed"}
```

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:37:50 -08:00
Steve Yegge
2788996e74 Revert "Fix gt sling/hook: use Town beads for town-level roles (gt-4ol8f)"
This reverts commit ed9816015d.
2025-12-27 17:51:52 -08:00
Steve Yegge
ed9816015d Fix gt sling/hook: use Town beads for town-level roles (gt-4ol8f)
When slinging or hooking work to mayor/deacon, the pin now lands in Town
beads (~/.beads/) instead of rig beads. This ensures gt mol status finds
the pinned work when run from ~/gt.

The issue was that town-level roles operate from the town root, so their
hooks should be discoverable from there.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 17:46:43 -08:00
Steve Yegge
5198e566b8 fix: Use --force for closing pinned beads, unpin naked beads (gt-lsfqq)
Fixes issues with the auto-replace logic:
- Use `bd close --force` for pinned beads (required by bd CLI)
- Naked beads (no molecule) get unpinned instead of closed
- Remove unused verifyBeadExistsForHook function

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:54:59 -08:00
Steve Yegge
6e68e12c2a feat: Auto-replace completed pins in gt hook (gt-lsfqq)
When hooking a new bead, if the existing pinned bead is complete
(no attached molecule, or all molecule steps closed), auto-replace it.

If the existing bead is incomplete, require --force flag to replace.

This reduces friction when switching between work items, especially
for patrol loops creating new wisps after completing old ones.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:47:26 -08:00
Steve Yegge
8131052207 Deprecate hook files, use pinned beads for propulsion (gt-rgd9x)
Replace hook file mechanism with discovery-based pinned beads:
- gt hook: now runs bd update <bead> --status=pinned
- gt sling: same, plus nudge to target
- gt handoff: same when bead ID provided
- gt prime: checks pinned beads instead of hook files
- gt mol status: no longer checks hook files

Key changes:
- outputAttachmentStatus: extended to all roles (was Crew/Polecat only)
- checkSlungWork: now queries pinned beads instead of reading hook files
- wisp/io.go functions: marked deprecated with migration notes

This follows Gas Town discovery over explicit state principle.
Hook files are kept for backward compatibility but no longer written.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:56:11 -08:00
Steve Yegge
f7d7f27d92 Fix gt sling code review issues (gt-z9qoo)
- Fix hook location for remote targets using tmux.GetPaneWorkDir()
- Add --var/--on conflict error check
- Add warning for JSON parse fallback (not yet fatal)
- Capture stderr for wisp command
- Remove dead code: detectAgentIdentity(), detectAgentIdentityForHook(),
  detectCloneRootForHook()
- Extract resolveSelfTarget() helper to reduce role-switching duplication

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:45:33 -08:00
Steve Yegge
f86a73c2f0 feat: Add gcloud-style command grouping to gt help output
Organize 43 commands into 7 logical groups using cobra's built-in
AddGroup/GroupID feature:

- Work Management: spawn, sling, hook, handoff, done, mol, mq, etc.
- Agent Management: mayor, witness, refinery, deacon, polecat, etc.
- Communication: mail, nudge, broadcast, peek
- Services: daemon, start, stop, up, down, shutdown
- Workspace: rig, crew, init, install, git-init, namepool
- Configuration: account, theme, hooks, issue, completion
- Diagnostics: status, doctor, prime, version, help

Also renamed molecule to mol as the primary command name
(molecule is now an alias).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:32:01 -08:00
Steve Yegge
23600af50c docs: comprehensive hook/sling/handoff/nudge audit
- Update propulsion-principle.md: implementation status now accurate
- Update beads-data-plane.md: correct command syntax
- Fix hook.go: clarify durability semantics, add related commands
- Fix sling.go: use reliable NudgePane instead of raw tmux send-keys
- Add tmux.NudgePane: pane-targeted reliable message delivery

The command menagerie:
  gt hook    = assign (durability)
  gt nudge   = communicate (generic messaging)
  gt sling   = hook + nudge "start working"
  gt handoff = hook + restart (GUPP kicks in)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:17:25 -08:00
Steve Yegge
32cac078e5 refactor: split gt sling into gt hook + gt handoff <bead> (gt-z4bw)
- Add gt hook <bead>: durability primitive, attaches work to hook
- Update gt handoff: accept optional bead arg (detects bead vs role)
- Deprecate gt sling: shows warning, points to new commands
- Update doctor fix hint to reference new commands

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:41:51 -08:00