Skip to content

Add six agent adapters, home placements and the Codex path fix - #15

Merged
imanimanyara merged 3 commits into
mainfrom
feat/more-agents-and-placements
Nov 13, 2026
Merged

imanimanyara merged 3 commits into
mainfrom
feat/more-agents-and-placements

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Summary

ai-configurator becomes the one installer for a private content repo across every AI coding agent on a machine.

  • Six global adapters: Gemini CLI (~/.gemini/GEMINI.md), JetBrains Junie (~/.junie/AGENTS.md), Kiro (~/.kiro/steering/agents.md), Continue (~/.continue/rules/agents.md) and opencode (~/.config/opencode/AGENTS.md) are verified against their docs or source. Grok (~/.grok/AGENTS.md) is marked partial, because xAI's docs name the folder but not the file.
  • Placements: <content>/placements/<path> is linked to $HOME/<path>, so folder-level CLAUDE.md/AGENTS.md files and other agents' global files live in the content repo. A real file at the target is backed up with the helper ~/.claude already uses. The installer refuses absolute paths, .., targets outside the root or inside the content dir, and directories. uninstall, status and doctor all understand placements.
  • Codex path fix (behaviour change): Codex reads $CODEX_HOME/AGENTS.md, default ~/.codex/AGENTS.md, not ~/.codex/instructions/agents.md. A fresh install writes the new path. An existing old file is still refreshed until 1.0.0, with a warning. This is recorded in the CHANGELOG under Changed and Deprecated.
  • Safer vendor writes: a hand-written destination file is backed up to *.before-claude-config before the first write, and a symlinked destination is left alone.

The first commit only extracts the backup and restore helpers, which install and uninstall now share. Behaviour is unchanged and the suite result matches the baseline.

Test plan

  • ruff check src tests passes
  • mypy src/ai_configurator passes
  • pytest -q: 267 passed. The 7 test_fetch_* errors also fail on the untouched code, because the local sandbox refuses their HTTP server. CI should run them.
  • Disabling the four new safety checks turns 5 tests red, so the new tests can fail
  • CI green on this PR

Pass 2, the host-overlay pass and uninstall each spelled out the
.before-claude-config rename inline. The new placements pass and the
vendor global writes need the same backup, so it moves into one helper
first, verbatim, before anything else changes.
Adapters: gemini (~/.gemini/GEMINI.md), grok (~/.grok/AGENTS.md,
partial: xAI documents ~/.grok/ but not the filename), junie
(~/.junie/AGENTS.md), kiro (~/.kiro/steering/agents.md), continue
(~/.continue/rules/agents.md) and opencode
(~/.config/opencode/AGENTS.md). VendorAdapter gains global_filename,
defaulting to the agents.md every existing adapter wrote.

Codex now writes $CODEX_HOME/AGENTS.md (default ~/.codex/AGENTS.md),
the file Codex reads. This changes observable behaviour: the old
~/.codex/instructions/agents.md, which Codex never read, is no longer
created. It is deprecated, not dropped: when it already exists install
keeps refreshing it and warns, so a caller reading it still works.

Vendor global writes no longer clobber a hand-written file. A real file
that is not the configurator's marked copy is backed up to
*.before-claude-config first, and a symlinked destination is left
alone so a placement that owns it is never written through.

Placements: files under <content>/placements/<path> are symlinked at
<placements_root>/<path>, placements_root defaulting to the home
directory (JSON placements_root, env CLAUDE_CONFIG_PLACEMENTS_ROOT,
with_placements_root). Real files are backed up through the same
helper the ~/.claude passes use; absolute paths, .. components and
targets inside the content dir or target_base are refused, as are
directories and foreign symlinks. uninstall, status and doctor all
read the placements tree.
README's adapter table gains the six global vendors; configuration.md
gains a placements section, a vendor-path table with the source each
path was verified against on 2026-11-10, the placements_root key, and
how to run against a content dir outside ~/.config. The Codex move to
~/.codex/AGENTS.md is recorded under Changed and Deprecated.
Copilot AI balanced review requested due to automatic review settings November 10, 2026 16:30

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@imanimanyara
imanimanyara merged commit 80ac472 into main Nov 13, 2026
14 checks passed
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