Skip to content

Commit d72842f

Browse files
MajorTalclaude
andcommitted
Add /upgrade skill to check run402 repo for sync-worthy changes
Compares recent commits in the private run402 repo against the last sync point, classifies them by CLI/MCP/skill impact, and offers to enter /opsx:explore for impactful changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4ccaa30 commit d72842f

1 file changed

Lines changed: 87 additions & 0 deletions

File tree

.claude/commands/upgrade.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
Check what's changed in the private run402 repo since the last sync and determine if any changes need to flow into run402-public (CLI, MCP, or OpenClaw skill).
2+
3+
## Step 1: Find the sync point
4+
5+
Read the memory file `project_last_integration.md` to get the last known sync commits. If no memory exists, fall back to comparing recent git logs in both repos to find the divergence point.
6+
7+
## Step 2: Gather new commits from run402
8+
9+
```bash
10+
cd ~/dev/run402 && git log --oneline --format="%h %ai %s" <last_synced_commit>..HEAD
11+
```
12+
13+
If the last synced commit is missing (rebased/squashed), use `--since` with the sync date instead.
14+
15+
## Step 3: Classify each commit
16+
17+
For each new commit in run402, classify it:
18+
19+
| Category | Impact on run402-public? |
20+
|----------|--------------------------|
21+
| **gateway/API behavior change** | Maybe — if it changes request/response shapes the CLI/MCP sends or parses |
22+
| **New API endpoint** | Yes — needs new CLI command + MCP tool + OpenClaw shim |
23+
| **Changed API endpoint** | Maybe — if request/response schema changed |
24+
| **Infra/CDK/deploy** | No |
25+
| **Lambda runtime/layer** | No (but docs may need updating if getUser/db API changed) |
26+
| **Docs (llms.txt, llms-cli.txt)** | Check — if it documents new CLI flags, the public SKILL.md may need updating |
27+
| **OpenSpec artifacts** | No |
28+
| **Tests** | No |
29+
| **CORS/auth/middleware** | No (server-side only) |
30+
31+
Focus on commits that touch `packages/gateway/src/routes/`, `packages/gateway/src/services/`, or `site/llms*.txt`.
32+
33+
## Step 4: Deep-dive impactful changes
34+
35+
For each commit classified as "Yes" or "Maybe":
36+
37+
```bash
38+
cd ~/dev/run402 && git show --stat <commit>
39+
cd ~/dev/run402 && git show <commit> -- <relevant_files>
40+
```
41+
42+
Determine specifically:
43+
- Does this add/change/remove an API endpoint?
44+
- Does this change request or response shape?
45+
- Does this affect what the CLI/MCP needs to send or parse?
46+
- Does this affect documentation accuracy?
47+
48+
## Step 5: Present the upgrade report
49+
50+
Show a summary table:
51+
52+
```
53+
## Upgrade Report: run402 → run402-public
54+
55+
Last sync: <date> (run402-public: <commit>, run402: <commit>)
56+
New commits in run402: <count>
57+
58+
### Changes requiring action
59+
60+
| Commit | Description | Action needed |
61+
|--------|-------------|---------------|
62+
| abc123 | Added /foo endpoint | New CLI command + MCP tool |
63+
64+
### Server-side only (no action needed)
65+
66+
| Commit | Description | Why no action |
67+
|--------|-------------|---------------|
68+
| def456 | CDN edge caching | Infra only |
69+
70+
### Documentation updates needed
71+
72+
| What changed | Where to update |
73+
|-------------|-----------------|
74+
| getUser returns email | SKILL.md runtime section |
75+
```
76+
77+
## Step 6: Enter explore mode if there are impactful changes
78+
79+
If any changes require action, offer to enter `/opsx:explore` to think through the implementation:
80+
81+
> "There are N changes that need to flow into run402-public. Want to explore any of these in detail? I can enter explore mode to think through the design."
82+
83+
If the user agrees, invoke `/opsx:explore` with a summary of the impactful changes as context.
84+
85+
## Step 7: Update the memory
86+
87+
After presenting the report, update `project_last_integration.md` with the new HEAD commit from run402 as the latest reviewed point (even if no changes were synced — this tracks what's been *reviewed*, not what's been *synced*). Only update the "last synced" commits when changes are actually published to run402-public.

0 commit comments

Comments
 (0)