Skip to content

feat: use agent harness home-manager module - #3

Merged
furedea merged 1 commit into
mainfrom
feat/use-agent-harness-module
May 19, 2026
Merged

furedea merged 1 commit into
mainfrom
feat/use-agent-harness-module

Conversation

@furedea

@furedea furedea commented May 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 19, 2026 18:07
@furedea
furedea merged commit 5e6f7cd into main May 19, 2026
9 checks passed
@furedea
furedea deleted the feat/use-agent-harness-module branch May 19, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the dotfiles Nix configuration to consume the external agent-harness flake/home-manager module, replacing locally-generated Claude/Codex agent files and updating CI/tests accordingly.

Changes:

  • Add agent-harness as a flake input and import its Home Manager module in both darwin + standalone HM configurations.
  • Switch nix/home/default.nix to enable/configure agent-harness and remove local Nix generation + home.file wiring for .claude/.codex.
  • Update CI to run a reduced Bats subset and adjust the devShell used for Bats runs.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/nix/agent_harness.bats Adds a Nix-focused Bats test to assert the repo delegates to agent-harness.
nix/home/default.nix Removes local agent file generation/sync and enables agent-harness via HM options.
lefthook.yml Updates comment to reflect hooks/tests now coming from CI + Home Manager agent-harness.
flake.nix Adds agent-harness input, imports its HM module, and renames/simplifies the Bats devShell.
flake.lock Pins the new agent-harness dependency.
.github/workflows/ci.yml Renames Bats job and changes which Bats suites (and which shellcheck/shfmt targets) run in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +18
grep -q "agent-harness = {" "$HOME_NIX"
grep -q "enable = true;" "$HOME_NIX"
grep -q "package = agent-harness.packages.\${system}.default;" "$HOME_NIX"
Comment thread flake.nix
Comment on lines 112 to 132
# Re-export codex CLI and python3 per system so CI (and local users)
# can `nix shell .#codex` / `nix build .#python3` without hard-coding
# upstream flake URLs. Versions stay pinned via flake.lock.
packages =
nixpkgs.lib.genAttrs
[
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
]
(sys: {
codex = codex-cli-nix.packages.${sys}.default;
inherit (nixpkgs.legacyPackages.${sys}) python3;
});

# Dev shells for everyday Python work and for CI-equivalent agent
# harness Bats tests. The default shell is consumed by direnv
# (`use flake`); agent-harness-bats-tests keeps formatter/linter
# dependencies explicit so Bats does not depend on the caller's global
# PATH.
# Dev shells for local work and CI-equivalent Bats tests. The default
# shell is consumed by direnv (`use flake`); dotfiles-bats-tests keeps
# test dependencies explicit so Bats does not depend on the caller's
# global PATH.
devShells =
Comment thread .github/workflows/ci.yml
Comment on lines 20 to 36
@@ -31,29 +31,8 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@ab739621df7a23f52766f9ccc97f38da6b7af14f # v31.10.5

- name: Run agent harness Bats tests
run: nix develop .#agent-harness-bats-tests --command bats --recursive tests/hooks/

python-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install Nix
uses: cachix/install-nix-action@ab739621df7a23f52766f9ccc97f38da6b7af14f # v31.10.5

- name: Run Python quality checks
run: |
nix shell nixpkgs#uv --command uv run --frozen ruff format --check
nix shell nixpkgs#uv --command uv run --frozen ruff check
nix shell nixpkgs#uv --command uv run --frozen ty check
nix shell nixpkgs#uv --command uv run --frozen pytest tests/python
- name: Run Bats tests
run: nix develop .#dotfiles-bats-tests --command bats tests/nix tests/hooks/github

furedea added a commit that referenced this pull request Sep 19, 2026
…inter ordering (#144)

## Summary

- **Related-test selection** (#1): `full_suite_triggers` in
`related_test_defaults.json` escalate config changes (pyproject,
uv.lock, package.json, tsconfig, Cargo.*, rust-toolchain) to a
language-wide suite; unresolved sources no longer collapse a multi-file
change into a partial run
- **Unified patch input** (#2): `hook_input.patch_body()` is the single
contract for `patch`/`input`/`command` carriers across
Devin/Codex/Hermes/pi adapters and `verification_session`; plain shell
commands are never treated as patches; conflicting carriers and
malformed `tool_input` fail closed; `multi_edit` added to generated
Devin matchers
- **Formatter/linter separation** (#3): formatter and linter adoption
detected independently — `[tool.ruff]` alone no longer implies `ruff
format`; Black + Ruff lint is a valid combination; unsupported
formatters (prettier, biome, ...) reported without substituting personal
defaults; mutating steps run fix -> format -> lint only for adopted
formatters; `readonly=True` drops all mutating steps; JS/TS no longer
applies `oxfmt` unconditionally
- **herdr-delegation** (#4): self-contained brief requirements
(request/acceptance criteria, repo/worktree, base/HEAD or diff snapshot,
scope), boundary-review guidance for multi-component changes, reconcile
rules to avoid duplicate re-reviews and stop unproductive loops
- **Coding principles** (#5): prefer existing
code/stdlib/platform/installed deps before adding code; size numbers are
heuristics, not goals; simplicity never removes
safety/compat/a11y/verification; TSDD defect fixes trace to the shared
contract rather than patching the symptom site
- **Blacksmith removal** (#6): `## 8. Runner: Blacksmith` section
removed from `github-actions-style` without adding a substitute vendor
section

## Test plan

- [x] `pytest` — 1325 passed
- [x] `ruff format --check`, `ruff check`, `ty check` — all clean
- [x] `lefthook run pre-commit` — all staged-file checks pass per commit
- [ ] Live provider payload verification — local fixtures only; no real
Devin/Codex session exercised

Refs #143

Generated with [Devin](https://devin.ai)

---------

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
furedea added a commit that referenced this pull request Oct 24, 2026
## 概要

agent-config に分けた後の dotfiles に残っていた CI 手順,設定,古い README の記述を片付ける.

Closes #317

計画:#317 (comment)

## 変更

- CI:bats ジョブで入れるのを `zsh` だけにし,shfmt,ruff,`jq`,ripgrep,shellcheck
の導入を外した.test-python ジョブから shfmt と ripgrep を外した.
- `pyproject.toml` と `uv.lock`:名前を `dotfiles` に変え,integration マーカーの説明を今の
integration テストが要る物に合わせた.
- `tests/conftest.py`:使われていない `git_project` を消した.
- lefthook:oxlint と,ファイル長規則の `js` と `ts` を外した.
- `.ls-lint.yml`:`AGENTS` と `CLAUDE` の例外と `docs/logs` の無視を外した(`SKILL` と
`SOUL` は残した).
- Codex:
- `CODEX_EXECUTABLE_PATH` と `DISABLE_AUTOUPDATER` を消した.どちらも
codex-cli-nix のラッパーから写したもので,Codex 0.164.0
のバイナリには文字列がなく読まれていない.このため受け入れ条件の「理由をコメントに書く」ではなく削除にした.
- `flake.nix` の `packages.<system>.codex` を消した.中身は llm-agents の 0.163.0
で,home の 0.164.0 と食い違っていた.利用者もいない.
- README:
  - エージェントの一覧を Devin,Hermes Agent,pi に直した.
  - Moshi を Nix の LaunchAgent と書いた.
  - activation の説明を今の実際の動きに合わせ,Manual Setup に SSH 鍵の作成を足した.
  - Repository Map に `hermes/`,`scripts/`,`.agents/` を足した.
  - CI の説明の古い部分を直した.開発サイクルの節は furedea/agent-config#7 で扱う.

`nix flake update agent-config` は入れていない.furedea/agent-config#6 と #3
の修正がまだマージされていないため.

## 検証

- `nix flake check`
- `darwin-rebuild build --flake .#mbp` と `.#mba`
- pytest 125 件
- CI と同じ Bats テスト 25 件
-
ruff,ty,vulture,actionlint,zizmor,nixfmt,deadnix,dprint,autocorrect,ls-lint

追跡外の残骸(`agents/`,`node_modules/` など)はこの PR に含めていない.

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

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants