Repository navigation
Closed
Description
個人用のエージェントハーネスの source(agents/)を,新リポジトリ furedea/agent-config へ履歴ごと分離する.
Nix のない環境でも dotfiles を clone せずにハーネスを適用できるようにするためで,dotfiles は flake input として読むだけになる.
ADR-0016(dotfiles に source を置く)と ADR-0030(dotfiles の bootstrap スクリプト)を置き換える.
flowchart LR
H["agent-harness<br/>(公開製品・エンジン)"] -->|flake input / release binary| C["agent-config<br/>(個人 source・bootstrap・tests)"]
C -->|flake input: packages.default| D["dotfiles<br/>(マシン設定・herdr/moshi bundle)"]
C -->|clone + bootstrap.sh| S["Nix のないサーバー"]
| 観点 | 変更前 | 変更後 |
|---|---|---|
| source の置き場所 | dotfiles/agents/ |
agent-config |
| Nix のないサーバー | dotfiles を clone して scripts/agents/bootstrap_server.sh |
agent-config を clone して bootstrap |
| dotfiles での参照 | cp -R ${../../agents} |
inputs.agent-config.packages.${system}.default |
| source のテスト | dotfiles の CI | agent-config の CI |
受け入れ条件
-
furedea/agent-configにagents/とtests/agents/が履歴付きで入り,その CI で pytest と bats が通る -
agent-configの flake がpackages.default(shebang を patch した source)を出す - bootstrap スクリプトが
agent-config単体の clone から動き,bootstrap_server.batsが通る - dotfiles が
agent-configを flake input として読み,darwin-rebuild後の~/.claudeと~/.codexが分離前と同じ内容になる - dotfiles から
agents/,tests/agents/,scripts/agents/が消え,CI の ruff と pytest の対象から外れる - 分離を記録する ADR があり,ADR-0016 と ADR-0030 が Superseded になる
-
guard_file.pyの案内文と skill 内の dotfiles 前提のパスが新しい置き場所に合っている
スコープ・除外・前提
スコープ
- 移すもの:
agents/全体,tests/agents/,scripts/agents/bootstrap_server.sh,nix/home/default.nixのagentSource相当,ハーネスの方針に関する ADR - dotfiles に残すもの:herdr と moshi の hook bundle 生成,
programs.agent-harnessの有効化,github.agentToken,.agents/hooks/rules/,パッケージ導入に関する ADR
除外
- agent-harness(エンジン)への変更
- Claude Code / Codex の plugin 化(agent-harness の描画を迂回するため採らない)
- bootstrap の aarch64 / macOS 対応とダウンロードの hash 検証(別 Issue)
前提
- agent-harness とのモノレポにはしない(agent-harness の ADR-0015 で個人設定を製品から分けた決定を維持する)
- エンジンと source の境界は source レイアウト version 1 とする
関連
docs/adr/0016_own_personal_agent_source.mddocs/adr/0030_bootstrap_the_agent_harness_on_servers_without_nix.md- agent-harness
docs/DESIGN.md(Why not ship a personal profile?)
Metadata
Metadata
Assignees
Labels
No labels
Activity
furedea-agent commentedon Oct 24, 2026
実装計画
作業は 2 つのレーンに分けて,A → B の順に進める.B は A の main を flake input として読むので,A が main に入るまで B は始めない.
レーン A は dotfiles のコミットを 1 つずつ正確に移すため,squash merge を使わない.PR で CI とレビューを通した後,ユーザーが ruleset を一時的に止めて head を main へ fast-forward push する.
flowchart LR A0["A0: repo 作成<br/>(project-setup)"] --> A1["A1: 履歴付き取り込み<br/>(git filter-repo)"] --> A2["A2: flake・CI・bootstrap"] --> A3["A3: ADR 移動・新 ADR"] --> A5["A5: PR で CI・レビュー"] --> AM(("A fast-forward push")) AM --> B1["B1: flake input 化"] --> B2["B2: 移した物を削除・CI 整理"] --> B3["B3: ADR-0016/0030 Superseded"] --> BM(("B マージ"))furedea/agent-configfeat/import-agent-sourcefuredea/dotfilesrefactor/consume-agent-configflake.nix,flake.lock,nix/home/default.nix,nix/checks.nix,.github/workflows/ci.yml,agents/,tests/agents/,scripts/agents/,docs/adr/レーン A:agent-config
furedea/agent-configを作る(public,template-python,標準設定・ruleset 適用済み)git filter-repoをかけ,agents/,tests/agents/,scripts/agents/,対象 ADR の履歴を取り込む.配置は次のとおりagents/→agents/(source のまま)tests/agents/→tests/scripts/agents/bootstrap_server.sh→scripts/bootstrap_server.sh#123は--replace-messageでfuredea/dotfiles#123に書き換えるpackages.defaultは今のagentSourceと同じpatchShebangs済み source,checks,devShell),pyproject.tomlとuv.lock,CI(ruff・pytest・bats),lefthook を用意する.tests/runtime.pyやconftest.pyなど dotfiles と共有しているテスト基盤は,必要な分だけ写すguard_file.py:48の案内文と,nix-dotfiles・project-setupskill のパスを直すall-green)とレビューを通す(CI green 済み,レビュー指摘は agent-config#3〜chore(deps): update actions/checkout action to v6.1.0 #5 へ).マージボタンは使わない.ユーザーが ruleset を一時的に無効にし,git push origin feat/import-agent-source:mainで fast-forward した後,ruleset を戻す.PR は自動で merged になるレーン B:dotfiles
flake.nixにagent-configを input として足し(agent-harnessはfollowsで共有),agentSourceをagent-config.packages.${system}.defaultに置き換えるagents/,tests/agents/,scripts/agents/を消し,CI の ruff・pytest・bats の対象から外す.nix/checks.nixの参照を直す.ただし dotfiles 専用のテスト(agent_hook.bats,codex_notification.bats,test_verification_rule.pyの extension 対応表テスト)は agent-config に移していないので dotfiles に残す検証
agent-harness install --sourceの出力ツリーを比べ,差分がないことを確かめる(パスの書き換えた箇所を除く)HOMEでscripts/bootstrap_server.shを走らせ,agent-harness verifyが通るnix flake checkとdarwin-rebuild buildが通り,~/.claudeと~/.codexの生成物が分離前と一致する前提と未決事項
git filter-repoは入っていないので,nix shell nixpkgs#git-filter-repoで使うprofiles/furedea/は,この Issue では扱わないfix(ci): install the locked agent-harness instead of reading it from …
fix(ci): provide the shell format config and locked JavaScript tools
refactor: consume the personal agent source from furedea/agent-config (…