upgrade-company-os
Checks for, previews, applies or rolls back Company OS updates. Use when you want the latest version or need to undo an upgrade.
- License 许可
- MIT
- 所属仓库
- vibbs/company-os
- 最近更新
- 2026-10-21
- Stars
- ★ 6
- Forks
- 2
01 前言 Front Matter
- name
- upgrade-company-os
- runtimes
- { "claude": { "argument-hint": "[check | preview | apply | rollback]", "user-invocable": true } }
- description
- Checks for, previews, applies or rolls back Company OS updates. Use when you want the latest version or need to undo an upgrade.
02 资源文件 3
- 参考文档bmad-skill-manifest.yaml12 B
- 参考文档checklist.md4.3 KB
- 参考文档workflow.md22.8 KB
03 SKILL.md 正文
Upgrade Company OS
Checks for updates, previews changes, upgrades, or rolls back Company OS to a previous version.
When to Use
- You want to know whether a newer Company OS release exists.
- You want to see what an upgrade would change before it touches any file.
- You want to apply an upgrade, or undo one that went wrong.
Subcommands
/upgrade-company-os or /upgrade-company-os check
Check if an update is available:
- Read
.company-os/versionfor the currently installed version - If checking against remote, advise the user to run:
To read the script first, download it to a temporary folder, review it, then run it:curl -fsSL https://raw.githubusercontent.com/vibbs/company-os/main/install.sh | bash -s -- --check
Inside an AI tooltmp=$(mktemp -d) && curl -fsSL https://raw.githubusercontent.com/vibbs/company-os/main/install.sh -o "$tmp/install.sh" less "$tmp/install.sh" bash "$tmp/install.sh" --checklessis not interactive. Show the user only the header and version lines (head -n 20 "$tmp/install.sh") and the path, and ask them to review the whole file in their own terminal. - If
.company-os/versiondoesn't exist, inform the user this is a pre-versioning install (1.11 or earlier). The installer backs up first. A run without--forceonly previews. With no manifest, the installer compares each file with every version Company OS has shipped (.company-os/known-hashes.txtin the release): a file that matches one is an unedited copy and is updated.--forcesaves each file that matches no shipped version (the user's edits) as.company-os/conflicts/<path>.user, then replaces it
What you will see:
Installed: 1.11.0
Available: 1.12.0 (minor)
Update available - 1.11.0 -> 1.12.0
Or, when nothing is newer: Up to date - Company OS 1.11.0.
/upgrade-company-os preview
Preview what would change without applying:
- Get the installer. Never run an
install.shthat sits in the project root: it may be the user's own script or a stale download. Download the current one to a temporary folder (curlis denied for the agent, so the user runs this in their terminal):tmp=$(mktemp -d) && curl -fsSL https://raw.githubusercontent.com/vibbs/company-os/main/install.sh -o "$tmp/install.sh" - Check that the file is the Company OS installer before running it:
head -n 5 "$tmp/install.sh"must containCompany OS. If it does not, stop and tell the user. Then run it in dry-run mode:
(Downloading to a file first lets the user read the script before it runs. Piping the script straight intobash "$tmp/install.sh" --dry-run --forcebashworks too, but nothing is reviewed.) - Parse and display the output — highlight new files, updated files, conflicts, and migration notes
What you will see:
Preview .claude/settings.json (would merge permissions)
Preview: Would create 2, add 5, merge 1, update 12, skip 40.
Warning: 1 file(s) modified by you AND changed in template.
These will be saved to .company-os/conflicts/ on upgrade.
Run without --dry-run to apply these changes.
Nothing on disk changes during a preview.
/upgrade-company-os apply
Perform the upgrade:
- Show current version from
.company-os/version - For MAJOR upgrades: display migration notes from
.company-os/docs/CHANGELOG.mdand ask for confirmation before proceeding - Run the upgrade:
Use the same verified download as in preview. If the shell has nobash "$tmp/install.sh" --force$tmp, download again to a new temporary folder and run the same header check. The user can also run these steps in their own terminal after reading the file withless "$tmp/install.sh". To upgrade to a specific release instead of the latest, pin it with--version, for examplebash "$tmp/install.sh" --force --version 1.12.0. Pinning also works for a downgrade or when a team wants everyone on the same version. - After upgrade, verify with:
./tools/registry/health-check.sh - Display post-upgrade summary including new version from
.company-os/version - If conflicts were detected (
.company-os/conflicts/exists and is non-empty), list the conflicted files and advise manual resolution
What you will see:
Backup Created at .company-os/backup/20261013-101500-v1.11.0
...file-by-file results...
1 conflict(s) detected - your modified versions saved to .company-os/conflicts/
Review the conflicts and merge manually.
Each conflict keeps the folder path of the original file, so same-named files never collide. A file the user edited that the template did not change is left alone and is not a conflict. A plain upgrade (no --force) keeps the user's version of a conflicting file and lists it; --force saves both and installs the template copy. A saved copy is never overwritten: a later one gets a timestamp suffix. Upgrades keep the adapters the project already has. For example, a changed tools/qa/run.sh is saved as .company-os/conflicts/tools/qa/run.sh.user (your version) and run.sh.new (the template version). Merge what you want to keep, then delete the conflict files. If you see Up to date, there was nothing to apply. The guides in .company-os/docs/ are template-owned and always refreshed on upgrade; a guide the user edited is kept next to the new copy as <name>.user (for example .company-os/docs/SETUP.md.user).
/upgrade-company-os rollback
Restore from a previous backup:
-
List available backups:
ls -d .company-os/backup/*/ 2>/dev/null -
If no backups exist, inform the user that backups are created automatically during major upgrades or with the
--backupflag -
If backups exist, present them to the user with timestamps and versions
-
After user selects a backup, restore by copying the backup files over current template files. The backup holds exactly these paths, so restore all of them that are present:
os/agents/,os/skills/,os/playbooks/,os/hooks/(the source of truth).claude/agents/,.claude/skills/,.claude/hooks/tools/CLAUDE.md
Copying over does not remove skills or agents that the newer version added. List the directories in
os/skills/andos/agents/that are not in the backup, show them to the user, and delete them only if the user agrees (they may be the user's own). -
The other runtime adapters (
AGENTS.md,GEMINI.md,.cursor/,.codex/) are not in the backup because they are generated fromos/. Rebuild only the adapters this project already has, so the rollback does not add runtimes the user never installed:[ -d .claude ] && bash tools/build/build.sh --runtime=claude [ -f AGENTS.md ] && bash tools/build/build.sh --runtime=agents [ -f GEMINI.md ] && bash tools/build/build.sh --runtime=gemini { [ -d .cursor ] || [ -f .cursorrules ]; } && bash tools/build/build.sh --runtime=cursor [ -d .codex ] && bash tools/build/build.sh --runtime=codexDo not run
build.shwith no arguments: it builds every adapter. -
Update
.company-os/versionto the backup's version (parse from the backup directory name) -
Rebuild the manifest so the next upgrade compares against the restored version. Re-install that same version, passing only the runtimes the project already has (for example
claude,cursor):bash "$tmp/install.sh" --force --version <backup-version> --runtime <installed runtimes>(Use the verified download from the apply step. Or the user runs the
curl ... | bash -s -- --force --version <backup-version> --runtime <...>form in their terminal.) This re-applies the same files, so content does not change; any.user/.newpairs it reports for restored files are identical and can be deleted. Never run the installer with--forceand no--versionhere: it downloads and applies the latest release, which undoes the rollback.
What you will see:
Available backups:
.company-os/backup/20261013-101500-v1.11.0/ (version 1.11.0)
Which one should I restore?
After you choose, the skill restores the template files and reports the restored version. With no backups it says so and explains how backups are created. Your own files (artifacts/, tasks/, company.config.yaml) are never touched by a rollback.
Version File Locations
| File | Purpose |
|---|---|
.company-os/version |
Template version — single source of truth |
.company-os/manifest |
SHA256 hashes of installed template files |
.company-os/backup/ |
Timestamped backups (auto for major upgrades) |
.company-os/conflicts/ |
Conflicting file versions during upgrade |
.company-os/docs/CHANGELOG.md |
Human-readable changelog (Keep a Changelog format) |
Reference
- ID: S-ORG-10
- Category: Orchestration
- Inputs:
.company-os/version,.company-os/manifest, remote release metadata - Outputs: upgraded system files, backup in
.company-os/backup/ - Used by: User (directly), Orchestrator Agent
Notes
- The
curlcommand is denied in.claude/settings.json. For remote operations (check against latest, download updates), advise the user to run the command in their terminal directly. - For local operations (reading version files, listing backups), use Bash tool directly. Never run an
install.shfound in the project root; use the verified download in a temporary folder. - Always show the user what will change before applying upgrades.
- For major version upgrades, always recommend
--dry-runfirst.
04 同仓库更多 Skills
typo-field
Fixture skill with a misspelled top-level field.
spaced-comments
Fixture skill with comments and spaces after block keys.
crlf-comments
Fixture skill with Windows line endings.
claude-fields
Fixture skill using top-level fields Claude Code documents.
workflow-router
Maps an objective to the artifacts, stages and agents it needs. Use when deciding what happens next or which agents to involve.
weekly-review
Summarizes your week: what shipped, AI spend, support themes, security health and next priorities. Use at the end of each week.