Skip to content

refactor(install): put the agents-md payload under .rig/ (one rig home) - #63

Merged
pgebheim merged 1 commit into
mainfrom
feat/agents-md-under-dotrig
Aug 9, 2026
Merged

pgebheim merged 1 commit into
mainfrom
feat/agents-md-under-dotrig

Conversation

@pgebheim

@pgebheim pgebheim commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Why

The agents-md (universal) target shipped its 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 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-onboard now deliver the agents-md payload under .rig/:

.rig/config.json      .rig/skills/<name>.md
.rig/schema.json      .rig/agents/*.md
.rig/REVIEWER.md      .rig/scripts/*
.rig/label-mapping.md

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 (.claude/…).

Breaking change

Existing agents-md installs have the payload at rig/. Re-running lays down .rig/ (no-clobber) but won't remove the stale rig/ — delete it by hand after upgrading. Callers/CI that reference rig/scripts/… or rig/REVIEWER.md need to move to .rig/….

Verification

install.sh --target agents-md into a temp repo:

  • entire payload written under .rig/ (skills, agents, scripts, REVIEWER.md, label-mapping.md) ✓
  • no stray rig/ dir created ✓
  • AGENTS.md ## Rig index rewritten to .rig/… paths; no dotless refs ✓
  • pre-existing AGENTS.md content preserved (idempotent block replace) ✓
  • .rig/config.json + schema.json still 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

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
@pgebheim
pgebheim merged commit 98555ee into main Aug 9, 2026
2 checks passed
@pgebheim
pgebheim deleted the feat/agents-md-under-dotrig branch August 9, 2026 05:39
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>
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.

1 participant