Skip to content
sudermanPublic

About

Dotfiles for AI coding agents

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

230 Commits

Folders and files

Repository files navigation

Declared agent harness config

This repository lives at ~/.agents. It holds Jon’s stable configuration for each agent harness, as plain data, and selects the community skills every harness shares. June deploys it: june harness apply merges it over the writable homes the harnesses own, without touching their logins or state. The commands and their checks are described in June’s docs/usage.org (“Harness config”). Personal skills and prompts live outside this checkout, in ~/profile. The harness packages come from /etc/nixos.

Layout and ownership

~/.agents/
├── skills.json         community skill selections and local skills
├── skills.lock         exact upstream Git commits
├── skills/             generated by june harness, ignored by Git
├── pi/                 Pi settings, instructions, MCP, extensions, prompts, themes
├── opencode/           OpenCode configuration, agents, commands, themes
├── hermes/             Hermes config.yaml and SOUL.md
├── june/               June's config.json and AGENTS.md, copied to ~/.config/june
├── claude/             Claude settings, instructions, MCP, commands, first-run state
├── agy/                Antigravity CLI settings, instructions, MCP
└── codex/              Codex CLI config, instructions, MCP

~/profile/
├── skills/             personal authored skills and supporting files
└── prompts/            personal user-invoked templates

Commit community selections and their lock, not downloaded skills. Do not edit skills/ by hand. Personal content has its own ownership and synchronization; this repository does not pull, commit, or push ~/profile. There is no ~/profile/agents/ layer.

skills.json may also list a local skill, {"name": ..., "local": [paths]}, that another checkout owns. june harness apply links it into skills/ beside the community skills from the first path present on the host; it is never fetched or locked, and a host with none of the paths goes without it. project-org-tasks and org-triage are local skills: ~/src/suderman/june/skills when June’s checkout is there, so edits apply at once, otherwise the pinned copy June’s NixOS module places at ~/.config/june/skills. After cloning the checkout, june harness doctor reports the link as stale until june harness apply repoints it. June owns the Org agent system, its dispatcher, org-edit, and herdr-link included, since 2026-10-28. See June’s org/README.org. The recall-history personal skill remains a symlink to its independently maintained Recall checkout. That checkout must be present on any machine using that link.

HarnessDefault writable homeShared skill discovery
Pi~/.pi/agentsettings.json skills paths
OpenCode~/.config/opencodeopencode.json skills.paths
Hermes~/.hermesconfig.yaml skills.external_dirs
Claude Code~/.claudeManaged individual links under skills/
June~/.config/junejune/config.json skillDirs paths
Antigravity CLI~/.gemini/antigravity-cli and ~/.gemini/config~/.gemini/config/skills.json entries
Codex CLI~/.codexNative ~/.agents/skills discovery and a personal skill link

Pi, OpenCode, Hermes, June, and Antigravity CLI refer to ~/.agents/skills and ~/profile/skills in place. Their native local skill directories remain active and untouched. Claude Code has no arbitrary skill-root setting. Its adapter installs individual links to these same sources, not a link over the whole native skills/ directory. Native skills, synced skills, plugins, auth, sessions, and memories remain harness-owned. Shared names must not collide with personal or native skill names.

june harness apply copies june/config.json and june/AGENTS.md whole into ~/.config/june, the only configuration she reads; she never writes them, so nothing is merged. The machine’s daemon host and Telegram users come from the NixOS module as environment variables, and apply refuses a config.json that sets them. Her identity, memory, and journal are data, in ~/.local/share/june, outside this repository. Her skill roots are skillDirs in june/config.json. june doctor checks the running daemon. See suderman/june.

Commands

june harness apply
june harness doctor
june harness sync
june harness skill list
june harness skill add pdf https://github.com/anthropics/skills.git --path skills/pdf --ref main
june harness skill remove pdf
june harness skill update

apply validates the manifest/lock, personal layout, duplicate skill names, prompt contract, and every enabled harness destination before writing. It reuses a materialization whose recorded revisions, contents, and modes match the lock. If that tree is missing or changed, it fetches exact locked commits into a staging directory, validates every selected skill, and replaces only the generated tree. It never advances upstream refs or changes the lock. Valid repeat applies need no network and leave unchanged files in place. A first or repaired apply needs upstream access. Failed fetches preserve the existing tree, lock, and homes.

The generated skills/.state.json records selected revisions and file hashes and modes. It detects accidental drift without fetching; it is not a signature or protection against someone changing both the files and that record. The resolver rejects nested skills, submodules, symlinks, and special files in community selections. It runs no upstream installers, build scripts, or helpers. Git sources must retain locked commits for future reproduction.

sync requires a clean attached branch with a tracking upstream and no pending Git operation. It refuses local-only or diverged commits before pulling, then runs git pull --ff-only and applies. It never stashes, resets, rebases, merges, or pushes. A failed pull never applies configuration. Skill revisions still do not advance.

doctor performs read-only checks: checkout state, lock agreement, materialized drift, personal roots, names, prompts, dependencies, enabled harnesses, and deployed files. Missing or mismatched deployment returns nonzero. It does not fetch, repair, or contact services, and it checks deployment, not login or provider availability.

All harnesses are enabled by default. AGENTS_HARNESSES=pi,claude june harness apply limits apply and doctor to those, as unique comma- or space-separated names.

Community skill selection

name and git are required. Names must match upstream SKILL.md frontmatter, use lowercase letters/digits separated by single hyphens, and be at most 64 characters. --path defaults to . and --ref defaults to HEAD. A ref can be a branch, tag, or commit. Sources may be Git URLs, SSH sources, or absolute local repository paths. Paths must stay inside the upstream repository. Unknown fields, duplicate JSON keys, duplicate selections, invalid layouts, collisions, and fetch failures leave source files and materialization unchanged.

skill add and skill remove update selection, lock, and tree together after preflight. Other selected skills remain at their existing locked revisions. skill update explicitly advances all selected refs and rebuilds the lock; it also resolves deliberate edits to skills.json. These commands do not apply runtime configuration. Run june harness apply afterward.

Current upstream selections are Impeccable, Superpowers’ systematic-debugging, Vercel’s web-design-guidelines, and Unslop from Cursor’s pstack plugin. The former local name ui-guidelines-review is retired. No local maintained forks are kept active.

Unslop’s upstream skill sets disable-model-invocation: true. Harnesses that honor this field require explicit invocation rather than automatic selection.

Impeccable’s Git skill is pinned, but its launcher may download a separate versioned engine into ~/.impeccable/ when used. That engine is not pinned by skills.lock and has not been tested here. Review upstream instructions before running it. Vercel’s skill fetches current web-interface guidelines during a review, so pinning the skill does not freeze those guidelines either.

Personal prompts

Store flat, regular <lowercase-name>.md files in ~/profile/prompts/. Nested files and symlinks are rejected. Begin with exactly these three frontmatter lines:

---
description: Review changes
---

Descriptions must start with a letter and contain plain letters, digits, spaces, commas, periods, slashes, parentheses, underscores, or hyphens, with no trailing spaces. YAML boolean/null words are rejected. Use $ARGUMENTS for optional input. Do not use numbered placeholders, $@, shell interpolation, @file imports, or harness-only metadata in shared templates.

Pi copies templates into prompts/ and OpenCode into commands/. Both make writable atomic copies and preserve unrelated commands. They do not delete retired personal copies automatically. Claude copies them into commands/ and adds disable-model-invocation: true so templates remain user-invoked. Hermes, Antigravity CLI, and Codex have no shared prompt adapter. Antigravity slash commands are skills; importing the templates as ordinary skills would let the model invoke them. Keep harness-only templates under pi/prompts/, opencode/commands/, or claude/commands/. Shared/specific filename collisions fail instead of relying on copy order.

Claude gives a skill priority over a same-name command file. For example, /impeccable uses its linked upstream skill even when the personal alias is installed. Pi supports /skill:impeccable as well as the personal prompt alias. Use /reload in Pi or start a new harness session after resource changes.

Harness deployment

june harness apply deploys Claude resources to ~/.claude; setting CLAUDE_CONFIG_DIR selects that directory instead, unless it points into June’s account folders. June’s account folders, ~/.local/state/june/accounts/claude1 and so on, link everything but their login and .claude.json to ~/.claude. june accounts apply makes those folders from the accounts counts in june/config.json and writes each one’s .claude.json itself: workspace trust, the servers in claude/mcp.json, and the first-run answers in claude/state.json. june harness does not touch account folders.

Override destinations with PI_CODING_AGENT_DIR, OPENCODE_CONFIG_DIR, OPENCODE_DIR, HERMES_HOME, CLAUDE_CONFIG_DIR, or CODEX_HOME. OpenCode also honors XDG_CONFIG_HOME. A variable pointing into June’s account folders is ignored. Source-tree destinations, the home root, and managed directory symlinks are rejected before writes. Named file symlinks become writable copies without changing their targets. There are no whole-home source/store symlinks.

Pi deep-merges declared settings and preserves unknown keys. It retires the old subagents setting and MCP-adapter cache files. Declared files, extensions, prompts, and themes are refreshed without removing unrelated entries. A machine-generated themes/stylix.json survives. Pi packages and package-provided skills remain Pi-managed.

MCP servers

pi/mcp.json, claude/mcp.json, agy/mcp.json, and codex/mcp.json declare user-level MCP servers. June prepares them for the current machine. A stdio server marked "optional": true deploys only when its command is on PATH at apply time, and the flag itself is removed. This keeps machine-specific servers off other hosts. davinci-resolve runs davinci-resolve-mcp, which NixOS provides where programs.davinci-resolve.mcp.enable is set. After installing or removing such a command, run june harness apply again. june harness doctor compares deployed servers with the same per-machine result.

Pi receives the prepared file as ~/.pi/agent/mcp.json. Claude merges its servers into the top-level mcpServers of ~/.claude.json, beside servers added with claude mcp add, and records a digest of each in ~/.claude/.agents-managed.json. It removes a deselected server only while that digest still matches. A locally edited managed server, or an unmanaged server with a declared name, fails apply without changing anything.

retiredMcpServers in claude/mcp.json lists names that apply always removes, with the usual backup, and that june harness doctor reports when they reappear. It lists Resolve’s “AI Assistants” entry, DaVinci Resolve, which points at a store path that fails outside Resolve’s FHS wrapper. A retired name must not also be a managed server.

OpenCode refreshes its named config, agents, commands, and themes. Existing native skills, Git metadata, local commands, and other files stay in place.

Hermes deep-merges YAML maps. Declared scalars and whole lists win; unrelated settings and comments survive. Invalid, non-mapping, or multi-document YAML fails without overwriting it. SOUL.md remains a writable declared copy. Hermes uses the native Camofox browser, and its native web/vision tools. Services, browser profiles, secrets, and the Herdr/Pi launch integration remain separate machine configuration.

Claude merges claude/settings.json into each profile’s writable settings.json. Declared preferences win; unrelated keys, hooks, environment variables, plugin options, and model selections survive. Per-model effort entries are defaults only: existing effort levels and compaction preferences take precedence. Repeat applies leave unchanged files in place. Before changing existing settings or instruction content, the adapter saves a private 0600 copy in the destination’s backups/agents-<filename>.*. Settings keep their existing mode with owner read/write access ensured, or use 0600 when first created. No credentials, caches, or session state enter this checkout.

The Claude adapter also pre-trusts existing ~/src and ~/org directories and Git repositories beneath them. Paths come from the current user’s home directory, not a fixed username. Each june harness apply scans again, so new clones are picked up on the next apply. Directory symlinks are not traversed. Worktrees use their main checkout’s trust entry, as Claude requires. This grants workspace trust to projects in those trees, including their project hooks and other startup code.

The adapter also trusts the home directory itself, which Claude otherwise asks about in every session started there and remembers only for that session. Every directory under home inherits that trust, including its project hooks and settings, so start Claude in a downloaded or unfamiliar tree only after inspecting it. The adapter also trusts /tmp as a parent without scanning it for Git repositories. Ordinary temporary directories can inherit trust, but temporary Git repositories still need their own approval. /tmp is shared; start Claude only in temporary directories you created or inspected.

Trust is separate from the permission mode. The adapter merges projects["<path>"].hasTrustDialogAccepted: true into ~/.claude.json for the default profile. With an explicit override, it uses $CLAUDE_CONFIG_DIR/.claude.json. These files also hold each login’s user-level MCP servers. Existing auth, unmanaged MCP servers, project history, and other state survive. Before a change, it saves a private backup under the Claude destination’s backups/ directory and writes the state atomically with mode 0600. Repeat applies leave unchanged state alone. june harness doctor checks trust without changing it. No live state is copied into this repository. See Claude’s workspace trust rules.

claude/AGENTS.md is the canonical global instruction source. The adapter writes its full content into both CLAUDE.md and AGENTS.md in each configured Claude profile. It does not use an @AGENTS.md import: with separate account config directories, the default ~/.claude/CLAUDE.md can also load as an ancestor project instruction and require external-import approval in every working directory. Instruction updates deploy to both filenames, with private backups of changed files. Project AGENTS.md files load through Claude’s built-in plugin, alongside any existing CLAUDE.md. The plugin skips instructions already imported or linked by path or content. The adapter does not create project CLAUDE.md files or disable external-import approval for project instructions.

Claude records only its own skill links, prompt copies, and MCP servers in ~/.claude/.agents-managed.json. It removes deselected entries only when they still match that record. If a managed entry was changed locally or a native entry occupies its name, apply fails without overwriting it. Rename or preserve the conflicting entry explicitly. Curated Claude-only commands can live in claude/commands/.

Claude Code preferences

The declared settings target Claude Code 2.1.291. They use user scope, which built-in plugin options require.

  • Start in auto mode. Use --permission-mode or the normal session controls to change modes temporarily. No allowlist or permission wrapper is added.
  • Skip the one-time warning before bypass-permissions mode (skipDangerousModePermissionPrompt), which NixOS’s Claude launchers start in by default; without it every new host or profile stops on that dialog.
  • Set attribution to empty commit and pr strings and sessionUrl: false to omit commit trailers, PR attribution, and session links. This is the form Claude stores; attribution: false is equivalent on 2.1.281 or later.
  • Use tui: "fullscreen". Leave terminal titles on: CLAUDE_CODE_DISABLE_TERMINAL_TITLE also turns off Claude’s OSC 7501 status, which herdr-core, the Herdr app, waybar and June’s dispatcher read. Pi’s existing fullscreen setting remains unchanged.
  • Disable auto memory, built-in Git instructions and the initial Git snapshot, spinner tips, prompt suggestions, and feedback drafts.
  • Mark first-run onboarding and the auto-mode notices as done in each profile’s .claude.json, from claude/state.json, so a new profile starts without the welcome screens; june accounts apply reads the same file for June’s account folders. These are defaults: a value the profile already holds wins.
  • Retain transcripts for 365 days. Automatic compaction, session history, and file checkpoints remain enabled by default.
  • Use high effort without selecting a model. Top-level effortLevel covers older models. User-level preferences for Opus 5.5 and Sonnet 5.5 need canonical modelSettings entries. Existing per-model choices survive apply. For later models, run /effort high once to save the preference for that model.
  • Enable cc-plugin-agents-md@builtin and set its instructionFiles option to claude-md-and-agents-md. The plugin was renamed in 2.1.285. The old agents-md@builtin option key still works, but this configuration uses the installed version’s ID.

See Claude’s settings reference, model and effort settings, and instruction loading. Run claude doctor to check installation and settings, and /memory in a session to inspect loaded instruction paths. On a new machine, sign each numbered account in with june accounts login (see June’s Harness accounts). Keep auth and interactive application state in Claude’s writable homes, not in this repository.

The existing NixOS Home Manager module at /etc/nixos/modules/home/default/options/claude-code.nix supplies the llm-agents package and persists writable ~/.claude/ and ~/.claude.json. No new machine module or runtime-file declaration is needed for these preferences.

Antigravity CLI

June merges agy/settings.json into ~/.gemini/antigravity-cli/settings.json. It groups /resume by workspace. It sets toolPermission to always-proceed and disables the terminal sandbox by default. Commands can run with your normal user privileges without approval unless an explicit ask or deny rule applies. Use this setup only in trusted workspaces. The adapter leaves model, execution mode, custom permission rules, outside-workspace access, workspace trust, auth, and session history alone. It copies agy/AGENTS.md to ~/.gemini/config/AGENTS.md, saving any replaced content beside it as a private agents-AGENTS.md.* file. Other global or project rules stay untouched. The global instructions, skills manifest, and MCP config under ~/.gemini/config/ are also visible to the Antigravity App.

The adapter adds both shared skill roots to skills.json without replacing other entries. It merges Chrome DevTools and DaVinci Resolve into mcp_config.json when their commands are on PATH. It preserves other servers and agy mcp enable/disable choices. A private .agents-mcp.json record lets apply remove its own servers when their commands disappear and refuse to overwrite locally edited definitions or unowned name collisions.

Run AGENTS_HARNESSES=agy june harness apply. Each numbered account (agy1, agy2, …) keeps its own login in its June account folder rather than the shared keyring; sign one in with june accounts login agyN. Use /info to inspect discovered customizations and agy mcp list to list servers. See Google’s customization discovery and CLI settings docs.

Codex CLI

June merges codex/config.toml into the writable $CODEX_HOME/config.toml. It sets high reasoning effort without choosing a model or changing approvals or sandboxing. It adds Chrome DevTools and DaVinci Resolve when their commands are available and their server names are unused. Existing server definitions stay Codex-owned. To remove a deployed server, remove it with codex mcp remove and remove its declaration or make the optional command unavailable before the next apply.

Codex already searches ~/.agents/skills. The adapter links ~/profile/skills under $CODEX_HOME/skills/agents-profile without replacing native skills. It copies codex/AGENTS.md and saves replaced instructions or configuration under $CODEX_HOME/backups/. It leaves AGENTS.override.md, auth, and sessions alone. See configuration and skill discovery. Run AGENTS_HARNESSES=codex june harness apply, then june accounts login codexN to sign a numbered account in.

Nix packages and machine integration

/etc/nixos installs the harnesses from numtide’s llm-agents input. Pi uses its Node build, so codemode’s worker is available, and copies to Herdr’s client clipboard over OSC 52; that patch and its checks are packages/pi.nix and checks/pi there. programs.agents.enable provides this checkout and keeps it across reboots. /etc/nixos also pins this repository as plain source and reads only pi/themes/catppuccin-mocha.json from it, for the Stylix Pi theme. This repository has no flake.

For default Claude Code paths, persist ~/.claude/ and ~/.claude.json. The directory holds settings, skills, commands, plugins, Linux login credentials, transcripts, prompt history, file snapshots, and auto memory. The separate JSON file holds application state including project trust, OAuth-related state, and personal MCP configuration. These are mutable private files, never repository files or read-only store links.

Verification

june harness doctor checks a deployment without writing. June’s test/harness.test.ts covers apply, preflight failures, managed-entry protection, account folders, skills and sync against temporary homes. Before the code moved to June, side-by-side runs on identical homes produced the same files, modes, links and backups as the Python adapters it replaced.

About

Dotfiles for AI coding agents

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages