feat(ce-update): add plugin version check skill and ce_platforms filtering (#532)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trevin Chow
2026-04-08 00:09:02 -07:00
committed by GitHub
parent 0ae91dcc29
commit d37f0ed16f
17 changed files with 163 additions and 38 deletions

View File

@@ -136,7 +136,7 @@ Why: shell-heavy exploration causes avoidable permission prompts in sub-agent wo
- [ ] Never instruct agents to use `find`, `ls`, `cat`, `head`, `tail`, `grep`, `rg`, `wc`, or `tree` through a shell for routine file discovery, content search, or file reading
- [ ] Describe tools by capability class with platform hints — e.g., "Use the native file-search/glob tool (e.g., Glob in Claude Code)" — not by Claude Code-specific tool names alone
- [ ] When shell is the only option (e.g., `ast-grep`, `bundle show`, git commands), instruct one simple command at a time — no chaining (`&&`, `||`, `;`) and no error suppression (`2>/dev/null`, `|| true`). Simple pipes (e.g., `| jq .field`) and output redirection (e.g., `> file`) are acceptable when they don't obscure failures
- [ ] When shell is the only option (e.g., `ast-grep`, `bundle show`, git commands), instruct one simple command at a time — no chaining (`&&`, `||`, `;`) and no error suppression (`2>/dev/null`, `|| true`). Simple pipes (e.g., `| jq .field`) and output redirection (e.g., `> file`) are acceptable when they don't obscure failures. **Exception:** `!` backtick pre-resolution commands may use error suppression and `||` fallbacks to produce clean sentinel values (e.g., `|| echo '__FAILED__'`), since these run at load time and the model needs a parseable signal, not raw stderr
- [ ] Do not encode shell recipes for routine exploration when native tools can do the job; encode intent and preferred tool classes instead
- [ ] For shell-only workflows (e.g., `gh`, `git`, `bundle show`, project CLIs), explicit command examples are acceptable when they are simple, task-scoped, and not chained together

View File

@@ -47,6 +47,7 @@ The primary entry points for engineering work, invoked as slash commands:
| `/test-browser` | Run browser tests on PR-affected pages |
| `/test-xcode` | Build and test iOS apps on simulator using XcodeBuildMCP |
| `/onboarding` | Generate `ONBOARDING.md` to help new contributors understand the codebase |
| `/ce-update` | Check compound-engineering plugin version and fix stale cache (Claude Code only) |
| `/todo-resolve` | Resolve todos in parallel |
| `/todo-triage` | Triage and prioritize pending todos |

View File

@@ -0,0 +1,69 @@
---
name: ce-update
description: |
Check if the compound-engineering plugin is up to date and fix stale cache if not.
Use when the user says "update compound engineering", "check compound engineering version",
"ce update", "is compound engineering up to date", "update ce plugin", or reports issues
that might stem from a stale compound-engineering plugin version. This skill only works
in Claude Code — it relies on the plugin harness cache layout.
disable-model-invocation: true
ce_platforms: [claude]
---
# Check & Fix Plugin Version
Verify the installed compound-engineering plugin version matches the latest released
version, and fix stale marketplace/cache state if it doesn't. Claude Code only.
## Pre-resolved context
The three sections below contain pre-resolved data. Only the **Plugin root
path** determines whether this session is Claude Code — if it contains an error
sentinel, an empty value, or a literal `${CLAUDE_PLUGIN_ROOT}` string, tell the
user this skill only works in Claude Code and stop. The other two sections may
contain error sentinels even in valid Claude Code sessions; the decision logic
below handles those cases.
**Plugin root path:**
!`echo "${CLAUDE_PLUGIN_ROOT}" 2>/dev/null || echo '__CE_UPDATE_ROOT_FAILED__'`
**Latest released version:**
!`gh release list --repo Everyinc/compound-engineering-plugin --limit 30 --json tagName --jq '[.[] | select(.tagName | startswith("compound-engineering-v"))][0].tagName | sub("compound-engineering-v";"")' 2>/dev/null || echo '__CE_UPDATE_VERSION_FAILED__'`
**Cached version folder(s):**
!`ls "${CLAUDE_PLUGIN_ROOT}/cache/every-marketplace/compound-engineering/" 2>/dev/null || echo '__CE_UPDATE_CACHE_FAILED__'`
## Decision logic
### 1. Platform gate
If **Plugin root path** contains `__CE_UPDATE_ROOT_FAILED__`, a literal
`${CLAUDE_PLUGIN_ROOT}` string, or is empty: tell the user this skill requires Claude Code
and stop. No further action.
### 2. Compare versions
If **Latest released version** contains `__CE_UPDATE_VERSION_FAILED__`: tell the user the
latest release could not be fetched (gh may be unavailable or rate-limited) and stop.
If **Cached version folder(s)** contains `__CE_UPDATE_CACHE_FAILED__`: no marketplace cache
exists. Tell the user: "No marketplace cache found — this appears to be a local dev checkout
or fresh install." and stop.
Take the **latest released version** and the **cached folder list**.
**Up to date** — exactly one cached folder exists AND its name matches the latest version:
- Tell the user: "compound-engineering **v{version}** is installed and up to date."
**Out of date or corrupted** — multiple cached folders exist, OR the single folder name
does not match the latest version. Use the **Plugin root path** value from above to
construct the delete path.
**Clear the stale cache:**
```bash
rm -rf "<plugin-root-path>/cache/every-marketplace/compound-engineering"
```
Tell the user:
- "compound-engineering was on **v{old}** but **v{latest}** is available."
- "Cleared the plugin cache. Now run `/plugin marketplace update` in this session, then restart Claude Code to pick up v{latest}."