Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Sauer
fdd4b0aeb0 test: Add test coverage for 16 files (40.3% → 45.5%) (#463)
* test: Add test coverage for 16 files (40.3% -> 45.5%)

Add comprehensive tests for previously untested packages:
- internal/agent/state_test.go
- internal/cmd/errors_test.go
- internal/crew/types_test.go
- internal/doctor/errors_test.go
- internal/dog/types_test.go
- internal/mail/bd_test.go
- internal/opencode/plugin_test.go
- internal/rig/overlay_test.go
- internal/runtime/runtime_test.go
- internal/session/town_test.go
- internal/style/style_test.go
- internal/ui/markdown_test.go
- internal/ui/terminal_test.go
- internal/wisp/io_test.go
- internal/wisp/types_test.go
- internal/witness/types_test.go

style_test.go uses func(...string) to match lipgloss variadic Render signature.

* fix(lint): remove unused error return from buildCVSummary

buildCVSummary always returned nil for its error value, causing
golangci-lint to fail with "result 1 (error) is always nil".

The function handles errors internally by returning partial data,
so the error return was misleading. Removed it and updated caller.
2026-01-13 13:19:27 -08:00
nux
ae88c12e07 feat(wisp): add config storage layer for transient/local settings
Implement wisp-based config storage at .beads-wisp/config/<rig>.json
for local-only settings that are never synced via git.

API:
- Get(key) - returns value or nil
- Set(key, value) - stores value
- Block(key) - marks key as blocked (NullValue equivalent)
- Unset(key) - removes from values and blocked
- IsBlocked(key) - checks if blocked

(gt-3w685)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 19:01:34 -08: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
Steve Yegge
1a1ab4842b Eradicate hook files, use pinned beads only (gt-rgd9x)
- Remove hook functions from internal/wisp/io.go (WriteSlungWork, ReadHook, BurnHook, etc.)
- Remove hook types from internal/wisp/types.go (SlungWork, Wisp, etc.)
- Update up.go to query pinned beads instead of reading hook files
- Remove SlungWork field from molecule_status.go
- Remove hook-*.json pattern from .beads/.gitignore
- Delete live hook file /Users/stevey/gt/deacon/.beads/hook-deacon.json

Work is now tracked exclusively via pinned beads (status=pinned, assignee=agent).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:46:39 -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
8cdbf1e6bd feat: Add --args flag for natural language executor instructions (gt-1py3y)
- Add Args field to SlungWork struct in wisp/types.go
- Add --args/-a flag to gt sling command
- Display args in gt prime autonomous mode
- Display args in gt mol status output

The --args string is stored in the hook and shown to the LLM executor,
which interprets the instructions naturally without schema maintenance.

Example: gt sling beads-release --args "patch release"

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 14:58:07 -08:00
Steve Yegge
2f8bc581a6 Add --on flag to gt sling for formula scaffolding (gt-8tmz.9)
When --on is specified, the first argument is a formula name:
  gt sling shiny --on gt-abc123

This applies the formula to existing work, creating wisp scaffolding
that shapes execution of the target bead.

Changes:
- Add Formula field to SlungWork wisp type
- Add --on flag to gt sling command
- Verify both bead and formula exist before slinging
- Update dry-run output to show formula info

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:00:52 -08:00
Steve Yegge
066ef722ae OSS launch polish: fix hook paths, add OSS files, update README
- Fix slashes in agent identity causing invalid hook file paths (gt-vqhc)
- Add Prerequisites section to README (gt-vzic)
- Create CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md (gt-xbfw)
- Update Install section for future package managers (gt-7wcf)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 23:28:31 -08:00
Steve Yegge
7e568770de refactor: remove legacy .beads-wisp infrastructure (gt-5klh)
Wisps are now just a flag on regular beads issues (Wisp=true).
No separate directory needed - hooks stored in .beads/.

Changes:
- wisp package: WispDir now points to .beads/, removed PatrolCycle
- manager.go: removed initWispBeads() - no separate dir to create
- mrqueue.go: MRs stored in .beads/mq/ instead of .beads-wisp/mq/
- doctor: removed obsolete wisp directory checks
- docs: updated wisp-architecture.md to reflect simplified model

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:34:14 -08:00
Steve Yegge
b77e0fe09a chore: remove stale prompts/, mayor/, and scripts/ directories
- Delete prompts/roles/*.md (duplicates of internal/templates/roles/*.md.tmpl)
- Delete mayor/rig/docs/ (stale draft, canonical version in docs/)
- Delete scripts/ (replaced by Makefile and internal/daemon/)
- Update doctor check to validate internal/templates/roles/*.md.tmpl
- Update docs/prompts.md to reflect actual template location

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:46:56 -08:00
Steve Yegge
7c7b8b551d fix: critical issues in wisp hook system
Code review fixes:

1. CRITICAL: Move polecat check to start of runSling
   - Previously wrote wisp THEN failed, leaving orphan
   - Now fails fast before any file operations

2. CRITICAL: Sanitize slashes in agent IDs for filenames
   - Agent IDs like 'gastown/crew/joe' were creating subdirs
   - Now converts '/' to '--' for safe filenames
   - Added sanitizeAgentID/unsanitizeAgentID helpers

3. MODERATE: Use git root instead of WorkDir in prime.go
   - Hooks are written to clone root, not cwd
   - Added getGitRoot() helper for consistency

4. MODERATE: Fix silent error swallowing
   - Now logs non-ErrNoHook errors when reading hooks
   - Warns if bead doesn't exist before burning hook
   - Preserves hook if bead is missing for debugging
2025-12-24 16:20:04 -08:00
Steve Yegge
b2f1b58f13 feat: implement gt sling and wisp hook system (gt-qvn7.1)
Phase 1 of tracer bullet: Slinging Handoff

- Add internal/wisp package for ephemeral work attachment
- Add gt sling command to attach work and restart
- Update gt prime to check/burn slung work on hook
- Add .beads-wisp/ to gitignore
2025-12-24 16:08:15 -08:00