- Update beads and gastown flake inputs and vendorHashes
- Remove merged-upstream patches for gastown and beads
- Deduplicate beads/gastown build definitions in home role by using
callPackage to reference shared packages/ definitions
- Pin dolt to v1.82.4 (gastown requires >= 1.82.4)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The upstream gastown Go dependencies changed, causing a hash mismatch
in the fixed-output derivation. Updated vendorHash in both:
- packages/gastown/default.nix (flake packages output)
- home/roles/development/default.nix (home-manager inline build)
- Add pi-coding-agent package (v0.55.4) with multi-platform support
- Replace custom Go 1.25.6 override with nixpkgs-unstable buildGoModule
for beads and perles builds
- Update flake inputs: beads, nixpkgs-unstable, perles
- Update vendor hashes for beads and perles
- Add pi-coding-agent to development role
- beads: update to 0.52.0 (16af00d7), refresh vendorHash
- gastown: update to 35157d02, remove flake=false now that upstream has flake.nix
- gastown: add inputs.nixpkgs.follows and inputs.beads.follows to deduplicate deps
- Clean up stale comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nixpkgs ships Go 1.25.5, but beads' dolt dependencies (dolthub/driver,
dolthub/go-icu-regex) require Go >= 1.25.6. Override Go toolchain to
1.25.6 and add ICU build dependency for dolt's regex library.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
beads:
- Pin to commit 93965b4a (last before Go 1.25.6 requirement)
- Build locally with corrected vendorHash (upstream default.nix is stale)
- Enables dolt server mode support (gt-1mf.3)
claude-code: 2.1.19 → 2.1.30
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update gastown-fix-agent-bead-address-title.patch line numbers (326→315)
for current upstream gastown source
- Remove obsolete gastown patches (rig-prefix, copydir-symlinks) that are
now handled upstream
- Pin beads to 55e733c (v0.47.2) which uses Go 1.24.0 - newer versions
require Go 1.25.6 which isn't in nixpkgs-unstable yet
- Remove beads-search-query-optimization.patch as it targets newer code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The patch file had malformed hunk headers with incorrect line numbers
and counts, causing it to fail to apply against the locked gastown rev
(177094a2). This was NOT a flake.lock issue - gastown source was properly
locked.
Changes:
- Regenerated patch from scratch against locked gastown revision
- Re-enabled the patch in default.nix (was commented out with TODO)
- Updated comment to accurately describe the optimization
The optimization skips expensive beads queries for detached tmux sessions
and caches status line output with a 10-second TTL, reducing Dolt CPU
usage from ~70% to ~20%.
Closes: hq-0h1p9m
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove 'index 0000000..1111111' lines that made patches appear as new files
- Fix hunk line counts in several patches
- Add missing leading spaces to blank context lines
- Temporarily disable statusline optimization patch (needs regenerating)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace inline postPatch substituteInPlace calls with proper unified
diff patch files, following the pattern established by beads.
This improves maintainability:
- Each patch is in its own file with clear naming
- Patches use proper unified diff format
- Easier to review, update, and track individual fixes
- Default.nix is cleaner (237 lines of substituteInPlace -> 15 lines)
Patches included:
- gastown-fix-validate-recipient.patch
- gastown-fix-agent-bead-address-title.patch
- gastown-fix-agent-bead-rig-prefix.patch
- gastown-fix-role-home-paths.patch
- gastown-fix-town-root-detection.patch
- gastown-fix-copydir-symlinks.patch
- gastown-statusline-optimization.patch
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Dolt backend's SearchIssues was using a two-phase query:
1. SELECT id FROM issues WHERE ... -> collect all IDs
2. SELECT * FROM issues WHERE id IN (id1, id2, ... id8000+)
With 8000+ issues, this second query with 8000+ placeholders hammers
Dolt CPU at 100%+. The fix changes SearchIssues to select all columns
directly in the first query and scan results inline.
See: hq-ihwsj
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete the statusline optimization by adding cache writes to all
output functions. The existing patch added cache functions and cache
reads, but never wrote to the cache.
Changes:
- Add early-return for detached sessions (return static "○ |")
- Add cache read check for attached sessions
- Add setStatusLineCache() calls in all 5 output functions:
- runWorkerStatusLine
- runMayorStatusLine
- runDeaconStatusLine
- runWitnessStatusLine
- runRefineryStatusLine
This should reduce Dolt CPU from ~70% to ~20% when agents are idle,
as tmux status lines will use cached results instead of spawning
beads queries every 5 seconds.
Testing: Run `nix switch` then monitor Dolt CPU with `top`
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add title-based lookup for hq- prefixed beads (uses title as address if contains "/")
- Add rig-specific prefix handling to parse IDs like j-java-crew-americano → java/crew/americano
- Handles crew, polecat, witness, refinery role patterns
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix mail router normalization in validateRecipient
- Fix agentBeadToAddress to use title field for hq- prefixed beads
- Fix crew/polecat home paths (remove incorrect /rig suffix)
- Fix town root detection (RoleUnknown instead of RoleMayor)
- Fix copyDir symlink handling
- Pin to gastown commit 177094a matching jt flake
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix mail router normalization in validateRecipient
- Fix agentBeadToAddress to use title field for hq- prefixed beads
- Fix crew/polecat home paths (remove incorrect /rig suffix)
- Fix town root detection (RoleUnknown instead of RoleMayor)
- Fix copyDir symlink handling
- Pin to gastown commit 177094a matching jt flake
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The gastown build now requires BuiltProperly=1 to be set via ldflags,
otherwise gt errors with "This binary was built with 'go build' directly".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Files copied from the nix store inherit read-only permissions, causing
subsequent home-manager activations to fail with "Permission denied".
Add rm -f before copy and chmod u+w after copy for all plugin files:
- humanlayer commands and agents
- local commands and skills
- micro-skills
- beads formulas
Executed-By: nixos_configs/crew/hermione
Rig: nixos_configs
Role: crew
- Add gastown flake input (non-flake, source only)
- Build gastown package using buildGoModule in development role
- Configure renovate for daily updates of gastown and beads
- Binary: gt (Gas Town CLI by Steve Yegge)
Add periodic timer (every 5 min) that runs `bd gate check --type=timer`
across all beads workspaces with running daemons.
This enables self-scheduling molecules - workflows that can set timer
gates to schedule their own future execution (e.g., watchers that scan
Slack every 8 hours).
The timer:
- Only runs on Linux (uses systemd user services)
- Discovers workspaces via `bd daemon list`
- Silently skips if no beads daemons are running
Related: nixos-configs-1rk.2 (Time beads scheduling mechanism)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add skills/ directory for local Claude skills
- Create parallel_beads.md skill that orchestrates:
- Phase 1: Multi-select bead selection from bd ready
- Phase 2: Parallel subagents for implementation (worktree, implement, commit, PR)
- Phase 3: Parallel review subagents
- Phase 4: Cleanup and summary
- Update default.nix to install local skills alongside humanlayer plugins
- Support both gh (GitHub) and tea (Gitea/Forgejo) based on origin URL
Adds a custom Nix package for perles, a terminal user interface for the
Beads issue tracking system with BQL query language support.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace complex marketplace plugin installation with simple 'bd setup claude'
which installs hooks into ~/.claude/settings.json. This is the recommended
approach for Claude Code (CLI + hooks) vs the MCP server approach.
Development environments now use standard nixpkgs claude-code by default.
Work environments override with custom binary distribution to bypass
corporate npm registry restrictions via Google Cloud Storage.
Add allowArbitraryClaudeCodeModelSelection option to development role
to control whether model specifications are preserved in humanlayer
commands and agents. Defaults to false (strip models) for backward
compatibility. Enable on home-darwin-work to preserve model specs
for opus/sonnet selection.
Create custom Nix package for Claude Code CLI that fetches directly from
Anthropic's Google Cloud Storage distribution instead of npm registry,
working around Block's Cloudflare Teams dependency confusion protection.
- Add claude-cli package with platform-specific binaries
- Include comprehensive README with update instructions
- Enable development role on work machine
- Switch from unstable.claude-code to custom.claude-cli
- Add google-cloud-sdk to work machine packages
Removes model specification to better support Claude Code Pro plan.
Because of this, I also re-removed this role from home-darwin-work as we
can take advantage of more powerful models in that context. We will just
need to install the plugins external from nix. Eventually I can turn
this into a config option of course.
Also made sure we are installing the agents from the plugin in addition
to the commands.