rs-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are upgrading a RootSpec project to the latest framework version. Start by telling the developer what you're about to do:
"I'll check your project against the latest framework version and upgrade what's needed — framework files, prerequisites, and config."
你正在将RootSpec项目升级到最新的框架版本。首先告知开发者你即将执行的操作:
"我会对照最新的框架版本检查你的项目,并按需升级相关内容——包括框架文件、前置依赖和配置。"
Step 1: Detect the gap
步骤1:检测版本差距
Run the scanning and gap analysis scripts:
bash
bash "$(dirname "$0")/../rs-shared/scripts/scan-spec.sh" .
bash "$(dirname "$0")/../rs-shared/scripts/gap-analysis.sh" .If these paths don't resolve, find the scripts by searching for in the skills directory.
gap-analysis.shBased on the output:
- — No
GAP=no_projectfound. Tell the developer: "No RootSpec project found. Run.rootspec.jsonfirst." Exit./rs-init - — Already on the latest version. Tell the developer: "Project is already on version X.Y.Z. Nothing to update." Exit.
GAP=none - — Upgrade needed. Continue.
GAP=patch|minor|major
运行扫描和差距分析脚本:
bash
bash "$(dirname "$0")/../rs-shared/scripts/scan-spec.sh" .
bash "$(dirname "$0")/../rs-shared/scripts/gap-analysis.sh" .如果这些路径无法解析,可以在skills目录下搜索找到对应的脚本。
gap-analysis.sh根据输出结果处理:
- — 未找到
GAP=no_project文件。告知开发者:"未检测到RootSpec项目,请先运行.rootspec.json。" 然后退出。/rs-init - — 已经是最新版本。告知开发者:"项目已经处于X.Y.Z版本,无需更新。" 然后退出。
GAP=none - — 需要升级,继续后续操作。
GAP=patch|minor|major
Step 2: Show what changed
步骤2:展示变更内容
Read the update guide:
skills/rs-update/UPDATE.mdFind it relative to this skill file:
"$(dirname "$0")/UPDATE.md"Extract all version sections between PROJECT_VERSION (exclusive) and BUNDLED_VERSION (inclusive). Present:
- The version gap (e.g., "6.2.1 → 6.2.3")
- Summary of each version's changes
- Any manual instructions
- Whether there are breaking changes
读取更新指南:
skills/rs-update/UPDATE.md基于本skill文件的相对路径查找:
"$(dirname "$0")/UPDATE.md"提取PROJECT_VERSION(不含)到BUNDLED_VERSION(含)之间的所有版本章节,展示以下内容:
- 版本差距(例如:"6.2.1 → 6.2.3")
- 每个版本的变更摘要
- 所有手动操作说明
- 是否存在破坏性变更
Step 3: Present the upgrade plan
步骤3:展示升级计划
Based on the gap analysis output, present a clear plan:
Upgrade plan (6.2.1 → 6.2.3):
Will update:
- rootspec/00.FRAMEWORK.md (replace with vX.Y.Z)
- rootspec/00.AXIOMS.md (replace with latest)
- .rootspec.json version field
Will create (new prerequisites):
- [list from NEW_PREREQUISITES, if any]
Needs reconciliation (changed prerequisites):
- [list from CHANGED_PREREQUISITES, if any]
Will NOT touch:
- Spec files (01.PHILOSOPHY.md through 05.IMPLEMENTATION/)
- CONVENTIONS/ (owned by /rs-impl)
[If HAS_BREAKING=true]
⚠ Breaking changes detected — see details above.Wait for the developer to confirm. They can exclude items (e.g., "skip dev.sh").
基于差距分析的输出,展示清晰的升级计划:
升级计划 (6.2.1 → 6.2.3):
将更新:
- rootspec/00.FRAMEWORK.md (替换为vX.Y.Z版本)
- rootspec/00.AXIOMS.md (替换为最新版本)
- .rootspec.json的version字段
将创建(新增前置依赖):
- [NEW_PREREQUISITES中的列表,若存在]
需要对账调整(已变更的前置依赖):
- [CHANGED_PREREQUISITES中的列表,若存在]
不会修改:
- 规范文件(01.PHILOSOPHY.md到05.IMPLEMENTATION/目录下的内容)
- CONVENTIONS/(由/rs-impl负责管理)
[若HAS_BREAKING=true]
⚠ 检测到破坏性变更——查看上方详情了解。等待开发者确认。开发者可以选择排除部分项(例如:"跳过dev.sh")。
Step 4: Execute the upgrade
步骤4:执行升级
For each item in the confirmed plan:
针对确认后的计划中的每一项执行操作:
Framework files
框架文件
- — Read from
00.FRAMEWORK.md(relative to this skill), write to../rs-shared/00.FRAMEWORK.md.{specDirectory}/00.FRAMEWORK.md - — Read from
00.AXIOMS.md, write to../rs-shared/00.AXIOMS.md.{specDirectory}/00.AXIOMS.md
- — 从本skill的相对路径
00.FRAMEWORK.md读取内容,写入到../rs-shared/00.FRAMEWORK.md。{specDirectory}/00.FRAMEWORK.md - — 从
00.AXIOMS.md读取内容,写入到../rs-shared/00.AXIOMS.md。{specDirectory}/00.AXIOMS.md
Config
配置
- — Read the current file, update only the
.rootspec.jsonfield to BUNDLED_VERSION. Preserve all other fields (specDirectory, prerequisites).version
- — 读取当前文件,仅更新
.rootspec.json字段为BUNDLED_VERSION,保留所有其他字段(specDirectory、prerequisites)。version
New prerequisites
新增前置依赖
- For each entry in : check if the file/config exists in the project. If missing, create it using the same logic as
NEW_PREREQUISITES. Read/rs-initfor creation instructions.../rs-shared/fragments/prerequisites.md
- 遍历中的每一项:检查项目中是否存在对应的文件/配置,如果缺失,使用与
NEW_PREREQUISITES相同的逻辑创建。读取/rs-init获取创建指引。../rs-shared/fragments/prerequisites.md
Changed prerequisites
已变更前置依赖
-
For each entry in: the prerequisite exists but has updated requirements. Show the developer what changed and why (from UPDATE.md). Do NOT auto-overwrite — the developer's copy may have project-specific customizations.
CHANGED_PREREQUISITESFor template scripts (e.g.,): show a diff between the project's copy and the bundled template. Let the developer decide how to reconcile.scripts/dev.shFor config wiring (e.g.,): describe the required change and let the developer confirm before applying.cypress.config.ts
-
遍历中的每一项:该前置依赖已存在但要求有更新。向开发者展示变更内容和变更原因(来自UPDATE.md)。不要自动覆盖——开发者的副本可能包含项目特有的自定义内容。
CHANGED_PREREQUISITES对于模板脚本(例如:):展示项目副本与打包模板之间的差异,让开发者决定如何调整。scripts/dev.sh对于配置关联项(例如:):描述需要的变更,在应用前先获得开发者确认。cypress.config.ts
Spec status
规范状态
- Run to update the version in spec-status.json:
write-spec-status.sh
bash
bash "$(dirname "$0")/../rs-shared/scripts/write-spec-status.sh" {specDirectory}If breaking changes were detected (): pass as the second argument to mark the spec as invalid, and tell the developer to re-run .
HAS_BREAKING=truefalse/rs-specbash
bash "$(dirname "$0")/../rs-shared/scripts/write-spec-status.sh" {specDirectory} false- 运行更新spec-status.json中的版本:
write-spec-status.sh
bash
bash "$(dirname "$0")/../rs-shared/scripts/write-spec-status.sh" {specDirectory}如果检测到破坏性变更():传入作为第二个参数将规范标记为无效,并告知开发者重新运行。
HAS_BREAKING=truefalse/rs-specbash
bash "$(dirname "$0")/../rs-shared/scripts/write-spec-status.sh" {specDirectory} falseStep 5: Report
步骤5:结果报告
Summarize what was done:
Update complete (6.2.1 → 6.2.3).
Updated:
- rootspec/00.FRAMEWORK.md
- rootspec/00.AXIOMS.md
- .rootspec.json version
Created:
- [any new prerequisites]
Flagged for review:
- [any changed prerequisites with reconciliation notes]
Next steps:
- [Re-run /rs-impl to update conventions if needed]
- [Any manual instructions from UPDATE.md]总结已完成的操作:
更新完成 (6.2.1 → 6.2.3)。
已更新:
- rootspec/00.FRAMEWORK.md
- rootspec/00.AXIOMS.md
- .rootspec.json版本
已创建:
- [所有新增的前置依赖]
标记待审核:
- [所有需要对账调整的已变更前置依赖及说明]
后续步骤:
- [如果需要,重新运行/rs-impl更新约定]
- [UPDATE.md中的所有手动操作说明]Focus
特殊参数说明
If the developer passes an argument:
- A version number (e.g., ) → show what changed in that specific version only
"6.2.2" - → run gap analysis only, don't execute any changes (dry run)
"check" - → only handle prerequisite updates (skip framework files)
"prerequisites"
如果开发者传入了参数:
- 版本号(例如:)→ 仅展示该特定版本的变更内容
"6.2.2" - → 仅运行差距分析,不执行任何变更(干运行)
"check" - → 仅处理前置依赖更新,跳过框架文件更新
"prerequisites"
Scope
操作范围
- CAN read: all project files, all bundled skill files
- CAN write: ,
{specDirectory}/00.FRAMEWORK.md,{specDirectory}/00.AXIOMS.md,{specDirectory}/spec-status.json, new prerequisite files.rootspec.json - SHOULD NOT write: spec files (01-05), application source code, existing test files
- SHOULD NOT overwrite: existing prerequisite files without developer confirmation
- 允许读取: 所有项目文件、所有打包的skill文件
- 允许写入: 、
{specDirectory}/00.FRAMEWORK.md、{specDirectory}/00.AXIOMS.md、{specDirectory}/spec-status.json、新增的前置依赖文件.rootspec.json - 不应写入: 规范文件(01-05)、应用源代码、现有测试文件
- 不应覆盖: 未经开发者确认的现有前置依赖文件