Skip to content

fix(refresh): skip _shim-* files in orphan check#745

Closed
jcasimir wants to merge 12 commits intoEveryInc:mainfrom
JumpstartLab:fix/skip-shim-files-in-orphan-check
Closed

fix(refresh): skip _shim-* files in orphan check#745
jcasimir wants to merge 12 commits intoEveryInc:mainfrom
JumpstartLab:fix/skip-shim-files-in-orphan-check

Conversation

@jcasimir
Copy link
Copy Markdown

@jcasimir jcasimir commented May 1, 2026

Problem

generate-shims.sh produces _shim-*.md files in agents/review/ as generated artifacts, not synced content. The orphan check in sync-reviewers.sh flagged every one of them as Orphan: _shim-X.md (not in any configured source) on every sync — ~20 lines of pure noise that made it harder to spot real orphans (e.g., when removing a configured source and wanting to verify cleanup of the files it had been producing).

Fix

Extends the existing _template-reviewer.md skip to a case glob that also matches _shim-*. One-line change in concept; three lines in the diff because case is more readable than chaining [ ... ] && continue checks for two patterns.

   filename=$(basename "$filepath")
-  [ "$filename" = "_template-reviewer.md" ] && continue
+  case "$filename" in
+    _template-reviewer.md|_shim-*) continue ;;
+  esac

The convention is now: underscore-prefixed files in agents/review/ are internal/generated and excluded from orphan reporting. This matches how _template-reviewer.md was already treated.

Discovery context

Found while cleaning up duplicate orchestrator-as-reviewer sources in reviewer-sources.yaml (an entry that pulled orchestrator files into both orchestrators/ and agents/review/). Every reviewer sync produced a wall of orphan warnings for the auto-regenerated shim files, drowning the legitimate cleanup signal.

Test plan

  • Run bash sync-reviewers.sh <registry> <output-dir> against a directory containing only _shim-*.md files — confirm no orphan warnings emit
  • Run against a directory with a real orphan (a .md file from a now-removed source) — confirm the orphan warning still fires

🤖 Generated with Claude Code

jcasimir and others added 12 commits April 3, 2026 13:53
Reviewer .md files no longer ship with the plugin. Instead, they
live in external Git repos and are synced on demand via /ce:refresh.
This lets users customize their review team — add custom reviewers,
exclude ones they don't need, or mix reviewers from multiple repos —
without forking the plugin.

What changed:
- Removed 28 built-in reviewer .md files from agents/review/
- Added .gitignore so synced reviewers aren't committed to the plugin
- Added _template-reviewer.md as a starting point for custom reviewers
- Added reviewer-registry.yaml with source configuration (which repos
  to sync from, with except lists and conflict resolution)
- Refactored persona-catalog.md to explain the system rather than
  enumerate reviewers
- Updated tests to check registry structure and skip gracefully when
  reviewer files aren't present (pre-refresh)

Each reviewer's selection metadata (category, select_when) lives in
its own frontmatter, so adding a reviewer is a single file in a
single repo — no registry entry needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A new skill and bash script that fetches reviewer .md files from
configured Git repos into the plugin's agents/review/ directory.

Features:
- User config at ~/.config/compound-engineering/reviewer-sources.yaml
  (auto-created on first run with sensible defaults)
- Interactive menu: sync, edit config, or type natural language changes
- Multiple sources with priority ordering (first listed wins)
- Per-source except lists to skip specific reviewers
- gh CLI with git clone fallback
- Detailed per-source summary written to a file for verbatim display
- Compatible with macOS bash 3 (no associative arrays)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Root README: add /ce:refresh as a post-install step
- Plugin README: replace hardcoded reviewer list with docs for the
  pluggable system (setup, source configuration, custom reviewers,
  categories, conflict resolution)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The ce-reviewers repo now stores reviewer files under reviewers/
instead of at the root. Update the default source path to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The commented-out example in the sync script's first-run template
showed path: . which was inconsistent with the actual default
source using path: reviewers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… refactor

Orchestrators are pluggable workflow definitions that compose existing
skills and reviewers with different intent. They use the same .md format
as reviewers (YAML frontmatter + prose body) and sync via /ce:refresh.

- Add /ce:run skill to load and execute named orchestrators
- Add orchestrator-registry.yaml as default source config
- Generalize sync-reviewers.sh to handle reviewers, orchestrators,
  and other content types via a config-name parameter
- Add generate-shims.sh to auto-create agent shims from definitions
  with agent-shim: true in frontmatter, making them addressable by
  name in natural language
- Update /ce:refresh to sync orchestrators and generate agent shims
- Refactor /lfg to delegate to /ce:run lfg
- Update default reviewer registry path to reviewers/ subdirectory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 2>&1 on the fetch_files call caused any stderr warnings to be
tokenized as filenames, leading to bogus copy/log entries. Capture
only stdout for filenames and let stderr flow to the terminal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/lfg now delegates to /ce:run lfg, so the test checks for the
delegation call instead of inline review mode flags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce user personas as a new agent type that evaluates features
from distinct user perspectives (Nancy, Dorry, Chuck, Betty, Mark).
Unlike code reviewers that analyze diffs, user personas produce
narrative walkthroughs grounded in their unique habits and frustrations.

- Add agents/user/ directory with .gitignore for synced personas
- Create ce:user-scenarios skill with four evaluation stages
  (concept, plan, implementation, presentation)
- Add user-subagent-template with stage-specific framing blocks
- Update ce:refresh to sync user personas alongside reviewers
  and orchestrators
- Update AGENTS.md with user persona documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat(user-scenarios): add user persona evaluation skill and sync support
…file selection

When multiple Claude profiles are installed (e.g., ~/.claude and
~/.claude-jsl), the previous `find "$HOME/.claude" "$HOME/.claude-"*`
pattern with `head -1` always resolved to ~/.claude alphabetically,
even when running from the JSL profile.

Claude Code exposes CLAUDE_CONFIG_DIR pointing to the active profile.
The fix checks that env var first and falls back to the broad find
pattern only when CLAUDE_CONFIG_DIR is unset or the plugin isn't found
under it. This preserves backward compatibility with the default
profile and older Claude Code versions.

Affects: ce:refresh (Step 1), ce:run (Step 2), ce:user-scenarios (Step 2)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
generate-shims.sh produces _shim-*.md files in agents/review/ as
generated artifacts, not synced content. The orphan check in
sync-reviewers.sh previously flagged every one of them as
"not in any configured source" on every sync — pure noise that
made it harder to spot real orphans (e.g., when removing a
configured source and wanting to clean up the files it had been
producing).

Extends the existing _template-reviewer.md skip to a case glob
that also matches _shim-*. Matches the convention that underscore-
prefixed files in this directory are internal/generated, not
synced content.

Discovered while cleaning up duplicate orchestrator-as-reviewer
sources in reviewer-sources.yaml — every reviewer sync produced
~20 lines of orphan warnings for the auto-regenerated shim files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jcasimir
Copy link
Copy Markdown
Author

jcasimir commented May 1, 2026

Wrong target — this fix needs to land on the JumpstartLab fork (where the refresh skill still lives at v2.61.0). EveryInc upstream has moved to v3.4.1 with the refresh skill replaced. Reopening on JumpstartLab/compound-engineering-plugin.

@jcasimir jcasimir closed this May 1, 2026
@jcasimir jcasimir deleted the fix/skip-shim-files-in-orphan-check branch May 1, 2026 21:17
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb03ec781b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +127 to +130
if command -v gh &>/dev/null; then
fetch_with_gh "$repo" "$branch" "$path" "$dest"
elif command -v git &>/dev/null; then
fetch_with_git "$repo" "$branch" "$path" "$dest"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retry with git when gh fetch path fails

fetch_files picks gh purely by binary presence and never falls back to git when fetch_with_gh returns an error. In environments where gh is installed but not usable for a given source (auth issue, API failure, transient errors), the sync silently skips that source even if git is available and would succeed, leaving reviewer/orchestrator files unsynced.

Useful? React with 👍 / 👎.

Comment on lines +87 to +92
elif current and stripped.startswith('repo:'):
current['repo'] = stripped.split(':', 1)[1].strip()
elif current and stripped.startswith('branch:'):
current['branch'] = stripped.split(':', 1)[1].strip()
elif current and stripped.startswith('path:'):
current['path'] = stripped.split(':', 1)[1].strip()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip YAML quotes from parsed source fields

parse_sources stores raw scalar text for name, repo, branch, and path without removing YAML quoting, so valid entries like repo: "myorg/reviewers" are parsed with literal quote characters. Those quoted values are later used in API/clone paths and summary directories, which causes fetch failures or malformed output for otherwise valid YAML configs.

Useful? React with 👍 / 👎.

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