fix(install): deliver agents-md skills to .agents/skills/ so agents find them - #69
Merged
Merged
Conversation
…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
This was referenced Aug 9, 2026
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>
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.
Problem
The
agents-mdtarget flattened each skill to.rig/skills/<name>.mdand leaned on a generated## Rigindex inAGENTS.mdtelling the agent to "read.rig/skills/<name>.mdand 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 frontmatterdescription. Skills delivered by this target were invisible to the very agents it exists for.Change
.agents/skills/<name>/(full directory copy). The kit'sskills/<name>/dirs are already in exactly that shape, so this mirrors theclaude-codeadapter with a different root..rig/keeps what the standard doesn't cover —config.json,agents/,scripts/,REVIEWER.md. Still one rig home for non-skill content;review.patternsFilestill defaults to.rig/REVIEWER.mdhere.AGENTS.mdblock 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.jsonand the persona-adoption rule for subagent-less agents..agents/joins the detection markers for the target.claude-codedelivery is untouched.Two deliberate non-changes
agents-md. It's a public--targetvalue and the adapter still writesAGENTS.md, just a smaller block. A rename is a breaking CLI change for a cosmetic gain — worth doing separately with an alias if ever.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.mdblock, but leaves the now-dead.rig/skills/*.mdin place.rig-onboarddetects 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-mdinto a temp repo:.agents/skills/rig-review/SKILL.md.rig/{agents,scripts,REVIEWER.md,config.json}exactly as beforebun test scripts/— 39 pass. (CI's typecheck job skips on branches withoutsmithers/workflows, as onmain.)🤖 Generated with Claude Code
https://claude.ai/code/session_014oVJgHRkCkeCiayKUJ4iSg