Commit graph

221 commits

Author SHA1 Message Date
dan 6eee2be66e feat(skills): add ui-query skill with list-windows
Initial AT-SPI integration for semantic UI access:
- list-windows.py: enumerate windows via accessibility tree
- Wrapper script handles nix dependencies (pyatspi, pygobject3)
- Outputs table or JSON with window geometry and states

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:57:03 -08:00
dan 49d75fb9ef bd sync: 2026-01-15 11:36:40 2026-01-15 11:36:40 -08:00
dan bf0998af89 bd sync: 2026-01-15 10:42:23 2026-01-15 10:42:23 -08:00
dan 68426ce108 bd sync: 2026-01-15 10:23:18 2026-01-15 10:23:18 -08:00
dan 5dd304615d release: worker v0.1.1 with spawn reliability fixes
- Robust rollback on spawn failure (branch + worktree cleanup)
- Error messages include step context
- Default base branch changed to main

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:23:13 -08:00
dan 29d23dfa53 bd sync: 2026-01-15 09:37:48 2026-01-15 09:37:48 -08:00
dan 48ec6cde83 fix(worker): address code review findings
- Fix rollback to handle partial branch creation (skills-yylq)
  - Pre-compute branch/worktree names before createWorktree
  - Use gitBranchExists() and dirExists() for robust cleanup
- Add step context to error messages (skills-ux6h)
  - Track currentStep through spawn process
  - Error now shows which step failed
- Deduplicate success output block (skills-qjln)
  - Consolidated to single block with conditional review line
- Simplify use-skills.sh auth symlink (skills-475o)
  - One-liner with || instead of nested if
- Fix inconsistent default branch in git.nim (skills-fext)
  - Changed default from "origin/integration" to "main"

Closes skills-yylq, skills-ux6h, skills-qjln, skills-475o, skills-fext

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:37:37 -08:00
dan 9f096dea0d bd sync: 2026-01-15 09:29:41 2026-01-15 09:29:41 -08:00
dan 461c5ac148 fix(worker): improve spawn reliability and add noFetch flag
- Change default base branch from origin/integration to main
- Add --noFetch flag to skip git fetch (for offline/sandbox use)
- Add try/except with rollback on spawn failure
- Improve error message for missing review-gate
- Add Codex auth.json symlink to use-skills.sh
- Include worker orchestration AAR from 2026-01-13

Addresses pain points from worker-orchestration-aar-2026-01-13.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:29:36 -08:00
dan d463fe58bb docs: add worklog for skills directory standardization 2026-01-14 19:18:25 -08:00
dan b0fe974831 bd sync: 2026-01-14 19:02:29 2026-01-14 19:02:29 -08:00
dan 48d2737699 refactor(skills): standardize directory structure (assets/ references/)
- Remove redundant 'skills/' subdirectories
- Rename 'templates/' to 'assets/' in worklog, template, review-gate, hq
- Move loose docs to 'references/' in niri-window-capture, spec-review
- Update SKILL.md and README.md paths
2026-01-14 19:02:08 -08:00
dan 2c0db1c911 bd sync: 2026-01-14 11:40:53 2026-01-14 11:40:53 -08:00
dan b87fe4c467 docs: Add missing skills to README and frontmatter to review-gate 2026-01-14 11:40:43 -08:00
dan 33e307daaa bd sync: 2026-01-14 11:40:40 2026-01-14 11:40:40 -08:00
dan 3cc7540c46 docs: add worklog for HQ deployment and Codex skills integration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 06:56:49 -08:00
dan 06f5fafd1a bd sync: 2026-01-13 06:51:08 2026-01-13 06:51:08 -08:00
dan e6d777e589 feat: add Codex per-repo skills support
- use-skills.sh: symlink to $CODEX_HOME/skills when CODEX_HOME is set
- docs: update PER-REPO-SKILLS.md and RFC-SKILLS-MANIFEST.md with Codex flow
- hq: add model configuration section (sonnet-4.5, Claude Max)
- hq: update launch commands with explicit --model flag

Closes skills-legi

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 06:50:56 -08:00
dan 2969878553 feat: add Codex support to ai-skills module
- Add codexSkills option for deploying skills to ~/.codex/skills/
- Follows same pattern as claudeCodeSkills and openCodeSkills
- Dotfiles can now configure: services.ai-skills.codexSkills = [ "worklog" "hq" ];

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 05:58:56 -08:00
dan 84830fd5cb Merge feat/skills-zws1 2026-01-12 21:12:19 -08:00
dan 2177b10d50 Add hello world script 2026-01-12 21:11:49 -08:00
dan 119c240ad6 Update issue tracking 2026-01-12 21:11:41 -08:00
dan 04fcba0345 release: add worker v0.1.0 binary tarball
- Add releases/worker_0.1.0_linux_amd64.tar.gz (327KB)
- Update pkgs/worker/default.nix with real SHA256 hash
- Add clear dotfiles integration instructions
- Un-ignore releases/ for distribution via git forge

Dotfiles can now fetch worker binary from:
  https://git.clarun.xyz/dan/skills/raw/branch/master/releases/worker_0.1.0_linux_amd64.tar.gz

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:16:19 -08:00
dan dcb29c12cd docs: add HQ deployment and worker release documentation
- Add docs/releasing-worker.md with build and release process
- Add pkgs/worker/default.nix template for nix packaging
- Add skills/hq/README.md with installation and deployment guide
- Update skills/hq/SKILL.md with detailed requirements table
- Add hq and review-gate to skills.nix
- Add releases/ to .gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 15:36:01 -08:00
dan 560e92e678 hq: add cross-agent instructions and worker templates
- Add Cross-Agent Compatibility section to SKILL.md
- Document concrete launch commands per agent type (Claude, OpenCode, Codex)
- Add worker-system.md template for worker agent prompts
- Add hq-status script for unified status view
- Simplify by documenting patterns rather than building --agent flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 13:53:05 -08:00
dan 949250bbe9 bd sync: 2026-01-12 13:52:52 2026-01-12 13:52:52 -08:00
dan 7a73ed9b1c feat: add HQ orchestration skill with architectural boundaries
- Initial SKILL.md defining thin orchestration layer
- Core loop: Assess → Plan → Delegate → Monitor → Iterate → Complete
- Explicit delegation to worker CLI, review-gate, bd, infrastructure
- Communication protocol using tagged single-line format
- Open questions scoped to HQ-specific concerns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:20:14 -08:00
dan 6e81841e8d bd sync: 2026-01-12 10:19:10 2026-01-12 10:19:10 -08:00
dan 0bffc07b5f docs: add worklog for HQ architecture and beads cleanup session
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 21:40:07 -08:00
dan 4da1890fc3 docs: add scenario schema and example test fixtures
Scaffold for agent capability benchmark harness (skills-qng9):
- docs/specs/scenario-schema.md: YAML schema for test scenarios
- tests/scenarios/: Easy, medium, hard example scenarios
- tests/fixtures/: Python fixtures for testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 21:24:28 -08:00
dan 7c7733bc64 docs: clarify VPS deployment goal for skills
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 21:24:13 -08:00
dan b13109e8e0 fix: use absolute worktree paths, check sqlite3 availability
- worktreePath() now returns absolute path using findMainRepoDir()
- Fixes 'cannot change to worktrees/...' error from inside worktree
- test-worker.sh now checks sqlite3 is available before running

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 21:24:03 -08:00
dan 62e81b720e bd sync: 2026-01-11 21:23:48 2026-01-11 21:23:48 -08:00
dan d3d23f0cd8 docs: add worklog for worker CLI cleanup session
Documents exit code fixes, P3/P4 refactors, and tech debt resolution.
10 commits, 13 files, +980/-241 lines, 56/56 tests passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:04:08 -08:00
dan 10ae698e7f bd sync: 2026-01-11 15:50:17 2026-01-11 15:50:17 -08:00
dan b0719d2c59 cleanup: P4 worker code quality fixes
- Extract renderStatusTable() from nested proc in status()
- Add column width constants (ColTask, ColState, etc.)
- Use parseEnum for heartbeat status instead of case statement
- Return bool from startGlobalHeartbeat() to indicate if started
- Remove unused getBranchStatus() function (dead code)

Closes: skills-y76g, skills-f8yd, skills-audh, skills-hx1n, skills-827e

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:46:34 -08:00
dan c5fd9a6be2 bd sync: 2026-01-11 15:38:05 2026-01-11 15:38:05 -08:00
dan 3490f28682 refactor: consolidate stale logic, use transaction helper, add migrations
- Add StaleLevel enum (ok, WARN, STALE, DEAD) to types.nim
- Extract computeStaleLevel() as single source of truth
- Simplify isStale() and staleLevel() to use computeStaleLevel()
- Refactor transition() and transitionToFailed() to use withTransaction
- Add schema migration infrastructure:
  - CurrentSchemaVersion constant
  - Migrations sequence for incremental upgrades
  - getSchemaVersion() and runMigrations() procs
  - initSchema() now runs pending migrations

Closes: skills-dtk, skills-8fd, skills-9ny

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:37:55 -08:00
dan fb6da27e96 bd sync: 2026-01-11 15:34:25 2026-01-11 15:34:25 -08:00
dan 61cce7e380 refactor: extract helpers and add developer docs
- Add optFromDb generic helper for nullable DbValue conversion
- Extract rowToWorkerInfo helper in state.nim (dedup getWorker/getAllWorkers)
- Extract loadContextFromPath helper in context.nim (dedup readContext/findContext)
- Simplify poll() using optFromDb for optional field extraction
- Add developer guide for compiling, testing, and deployment

Closes: skills-r3k, skills-luzk, skills-dszn, skills-m0e2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:34:15 -08:00
dan 61b4d3a37c bd sync: 2026-01-11 14:28:29 2026-01-11 14:28:29 -08:00
dan de84648563 fix: proper exit codes for state transition errors
- Add try/except blocks in worker commands to catch WorkerNotFound,
  InvalidTransition, and StaleState exceptions
- Return ExitInvalidTransition (3) for state transition errors
- Return ExitNotFound (7) for missing workers
- Fix double ROLLBACK bug in state.nim by removing inline ROLLBACKs
  and letting the except block handle transaction cleanup

Closes: skills-lxb9

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 14:28:21 -08:00
dan 4d7a1d96b0 bd sync: 2026-01-11 00:26:06 2026-01-11 00:26:06 -08:00
dan 7660693717 feat(worker): add test suite and fix worktree DB path
Test infrastructure:
- Add comprehensive test-worker.sh with 59 tests
- Cover spawn, start, done, approve, reject, cancel, fail, heartbeat
- Test status filtering, context files, review-gate integration
- Test invalid state transitions and error cases

Bug fixes:
- Fix agent commands failing when run from worktrees (skills-y3f2)
  - Add getMainRepoBusDbPath() to find DB in main repo
  - Update start, done, fail, heartbeat to use correct path
- Fix review.nim crash when review-gate not installed (OSError)
  - Gracefully return exitCode=-1 instead of crashing

Closes skills-y3f2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 00:26:02 -08:00
dan 966d09a7b6 bd sync: 2026-01-10 23:27:38 2026-01-10 23:27:38 -08:00
dan daec0f3b85 docs: ADR-006 Nim language choice for worker CLI
Documents rationale for using Nim with ORC for the worker coordination
CLI: fast startup, single binary, Python-like syntax, excellent SQLite
support via tiny_sqlite, CLI generation via cligen.

Closes skills-q40

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:27:32 -08:00
dan b9866b7930 chore: ignore .worker-state runtime directory
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:24:53 -08:00
dan 7f264facd9 bd sync: 2026-01-10 23:24:37 2026-01-10 23:24:37 -08:00
dan caff76f618 feat(worker): integrate review-gate with worker CLI
- Add review.nim module for review-gate integration
- spawn: enables review-gate automatically
- status: shows review state column (pending/approved/REJECTED)
- show: displays review status in detailed view
- approve: calls review-gate approve before state transition
- request-changes: calls review-gate reject with comment
- cancel/merge: clean up review state files

Closes skills-byq

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:24:33 -08:00
dan f9ac03a8a8 bd sync: 2026-01-10 23:07:31 2026-01-10 23:07:31 -08:00