Skip to content

fix(install): deliver agents-md skills to .agents/skills/ so agents find them - #69

Merged
pgebheim merged 1 commit into
mainfrom
fix/agents-md-skills-standard-dir
Aug 9, 2026
Merged

fix(install): deliver agents-md skills to .agents/skills/ so agents find them#69
pgebheim merged 1 commit into
mainfrom
fix/agents-md-skills-standard-dir

Conversation

@pgebheim

@pgebheim pgebheim commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Problem

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 very agents it exists for.

Change

  • Skills → .agents/skills/<name>/ (full directory copy). 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 what the standard doesn't coverconfig.json, agents/, scripts/, REVIEWER.md. Still one rig home for non-skill content; review.patternsFile still defaults to .rig/REVIEWER.md here.
  • The AGENTS.md block shrinks to a pointer. Enumerating skills is redundant once they're self-discovered, and the "read this file" instruction was wrong. It now names .rig/config.json and the persona-adoption rule for subagent-less agents.
  • .agents/ joins the detection markers for the target.
  • claude-code delivery is untouched.

Two deliberate non-changes

  • Target name stays agents-md. It's a public --target value and the adapter still writes AGENTS.md, just a smaller block. A rename is a breaking CLI change for a cosmetic gain — worth doing separately with an alias if ever.
  • No deletion logic in install.sh. It's additive-only and non-interactive, so it can't get consent to remove files.

Upgrading an existing install

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. rig-onboard detects the legacy layout, reports it in its Step 1 summary, and offers to delete it with confirmation.

Partially reverses the skills half of #63 — agents/scripts/config stay put.

Verification

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

  • writes .agents/skills/rig-review/SKILL.md
  • leaves .rig/{agents,scripts,REVIEWER.md,config.json} exactly as before
  • injects the trimmed block with no per-skill listing
  • is idempotent on re-run — one marker pair, nothing clobbered

bun test scripts/ — 39 pass. (CI's typecheck job skips on branches without smithers/workflows, as on main.)

🤖 Generated with Claude Code

https://claude.ai/code/session_014oVJgHRkCkeCiayKUJ4iSg

…ind them

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.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014oVJgHRkCkeCiayKUJ4iSg
@pgebheim
pgebheim merged commit 2d4d691 into main Aug 9, 2026
2 checks passed
@pgebheim
pgebheim deleted the fix/agents-md-skills-standard-dir branch August 9, 2026 15:16
pgebheim added a commit that referenced this pull request Sep 3, 2026
…arget (#71)

Two paths were hardcoded to `.claude/` with no indirection, so on an
agents-md-only repo — Codex, Cursor, Gemini CLI, the population #69 and #70
exist to serve — they pointed at files that aren't there.

rig-worktree named `.claude/scripts/{setup,remove}-worktree.sh` in four places
while `agents-md` installs those scripts to `.rig/scripts/`, and the repo has no
`.claude/` at all. The skill told the agent to run a path that doesn't exist,
right after insisting it must not reimplement the script inline. It now resolves
`<SCRIPTS>` first-hit-wins over `.claude/scripts/` then `.rig/scripts/`, in the
spirit of the `<TRACKER>` resolver rig-epic/rig-task/rig-issue/rig-doctor/rig-plan
already use, and stops with a clear message if neither has the script. The
scripts themselves already resolved their own siblings, so only the callers
needed fixing.

install.sh copied rig.config.example.json verbatim, so every install got
`review.patternsFile: .claude/REVIEWER.md` and
`tracker.labelMapFile: .claude/label-mapping.md`. Without the claude-code target
those docs were installed under `.rig/`, leaving both keys dangling on a fresh
install. It now rewrites the two paths when claude-code isn't among the targets.
Uses an inline membership test rather than a helper, to stay independent of #70.

`.claude/worktrees/` as the default worktree location is deliberate and
unchanged — the Claude Code harness only adopts worktrees there (see 41283b3).
Documented that it carries no special meaning elsewhere and `--path` overrides.

Verified across all three shapes: claude-only keeps `.claude/` paths and resolves
to `.claude/scripts`; agents-only gets `.rig/` paths and resolves to
`.rig/scripts`; dual keeps `.claude/` paths, both files present. The prescribed
resolver snippet was executed as written against each install, and every
configured doc path was checked to exist. `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