refactor(install): put the agents-md payload under .rig/ (one rig home) - #63
Merged
Merged
Conversation
The agents-md (universal) target delivered skills/agents/scripts to a visible `rig/` dir while the shared config profile lived in `.rig/` — two directories one dot apart, holding different kinds of thing (content vs config), which reads as an accidental duplicate. Unlike `.claude/` (whose location Claude Code forces), the agents-md payload has no required placement, so fold it into `.rig/`: `.rig/skills/*.md`, `.rig/agents/`, `.rig/scripts/`, `.rig/REVIEWER.md`, `.rig/label-mapping.md` alongside `.rig/config.json`. One rig home, no `rig`-vs-`.rig` collision. The `## Rig` index injected into AGENTS.md now points at `.rig/skills/<name>.md`, and `review.patternsFile` defaults to `.rig/REVIEWER.md` for this target. claude-code delivery is unchanged. Breaking for existing agents-md installs (payload moves rig/ -> .rig/); the install is no-clobber, so re-running lays down .rig/ without removing a stale rig/ — delete the old rig/ dir by hand after upgrading. Verified: `install.sh --target agents-md` into a temp repo writes the whole payload under .rig/, creates no rig/ dir, rewrites the AGENTS.md index to .rig/ paths, preserves prior AGENTS.md content, and keeps scripts executable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0157AoJ6PVpKyt5V8GCVrodf
This was referenced Aug 9, 2026
setup-worktree hardcodes .claude/worktrees/ — add an agent-neutral fallback for non-Claude repos
#65
Open
pgebheim
added a commit
that referenced
this pull request
Aug 9, 2026
…ind them (#69) The agents-md target flattened each skill to `.rig/skills/<name>.md` and leaned on a generated `## Rig` index in AGENTS.md telling the agent to "read `.rig/skills/<name>.md` and follow it". Nothing actually looks there. Codex, Pi, Cursor, Gemini CLI, Copilot and Rovo Dev all discover skills from `.agents/skills/<name>/SKILL.md` — scanning cwd -> parents -> repo root -> $HOME -> system — and auto-invoke on each skill's frontmatter description. Skills delivered by this target were invisible to the agents it exists for. Copy the whole skill directory to `.agents/skills/<name>/` instead. The kit's `skills/<name>/` dirs are already in exactly that shape, so this mirrors the claude-code adapter with a different root. `.rig/` keeps the pieces the standard doesn't cover — `config.json`, `agents/`, `scripts/`, `REVIEWER.md` — so there's still one rig home for non-skill content, and `review.patternsFile` still defaults to `.rig/REVIEWER.md` here. The AGENTS.md block shrinks to a pointer. Enumerating skills was redundant once they're self-discovered, and the "read this file" instruction was wrong; the block now names `.rig/config.json` and the persona-adoption rule for subagent-less agents. `.agents/` joins the detection markers for the target. The `agents-md` target name is unchanged — it's a public `--target` value and still writes AGENTS.md, just a smaller block. claude-code delivery untouched. Upgrading an install from the old layout: re-running delivers to the new location and rewrites the marker-delimited AGENTS.md block, but leaves the now-dead `.rig/skills/*.md` in place — install.sh is additive-only and can't get consent to delete. rig-onboard detects the legacy layout, reports it in its summary, and offers to remove it with confirmation. Partially reverses the skills half of #63; agents/scripts/config stay put. Verified: `install.sh --target agents-md` into a temp repo writes `.agents/skills/rig-review/SKILL.md`, leaves `.rig/{agents,scripts,REVIEWER.md, config.json}` as before, injects the trimmed block with no per-skill listing, and is idempotent on re-run (one marker pair, nothing clobbered). `bun test scripts/` — 39 pass. Claude-Session: https://claude.ai/code/session_014oVJgHRkCkeCiayKUJ4iSg Co-authored-by: Paul Gebheim <86010+pgebheim@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
agents-md(universal) target shipped its skills/agents/scripts to a visiblerig/dir, while the shared config profile lived in.rig/. Two directories one dot apart, holding different kinds of thing (content vs config) — which reads as an accidental duplicate and confuses people the first time they see it in a multi-agent install.Unlike
.claude/(whose location Claude Code forces), the agents-md payload has no required placement — so there's no reason not to fold it into.rig/and have a single "rig home."What
install.sh(install_agents_md) +rig-onboardnow deliver the agents-md payload under.rig/:The
## Rigindex injected intoAGENTS.mdnow points at.rig/skills/<name>.md, andreview.patternsFiledefaults to.rig/REVIEWER.mdfor this target.claude-codedelivery is unchanged (.claude/…).Breaking change
Existing agents-md installs have the payload at
rig/. Re-running lays down.rig/(no-clobber) but won't remove the stalerig/— delete it by hand after upgrading. Callers/CI that referencerig/scripts/…orrig/REVIEWER.mdneed to move to.rig/….Verification
install.sh --target agents-mdinto a temp repo:.rig/(skills, agents, scripts, REVIEWER.md, label-mapping.md) ✓rig/dir created ✓AGENTS.md## Rigindex rewritten to.rig/…paths; no dotless refs ✓AGENTS.mdcontent preserved (idempotent block replace) ✓.rig/config.json+schema.jsonstill present; scripts executable ✓Known follow-up (out of scope)
Skill bodies still hardcode
.claude/scripts/…(e.g.rig-worktree), so under agents-md the script path in the skill text doesn't match.rig/scripts/. That's a pre-existing skill-portability gap independent of this move; worth a separate issue.🤖 Generated with Claude Code