Upgrade Guardian
by @radonx
A cognitive protocol for safely managing and auditing OpenClaw application upgrades. Analyzes configuration-level risks (schema, defaults) and runtime-level...
clawhub install upgrade-guardianπ About This Skill
name: upgrade-guardian description: A cognitive protocol for safely managing and auditing OpenClaw application upgrades. Analyzes configuration-level risks (schema, defaults) and runtime-level behavioral shifts (routing, sessions, streaming) using semantic changelog analysis to prevent silent breaking changes.
Cognitive Protocol: The Upgrade Guardian
This skill defines a formal, multi-phase cognitive protocol for an agent to execute when tasked with managing an application upgrade. Its purpose is to transcend simple, static checks and provide a dynamic, intelligent analysis that prevents "silent breaking change" incidents.
This is not a script. It is a directive for higher-order reasoning.
Core Principle
An application upgrade is a high-stakes event. The agent must not trust that the upgrade is safe. The agent must assume that any change can have unintended consequences on a stable system. The goal is to make implicit environmental assumptions explicit and resilient before they break.
Protocol Activation
This protocol is activated when a human operator declares their intent to upgrade the application (e.g., "We are planning to upgrade OpenClaw from vA to vB").
Analysis Scope
Upgrade Guardian covers two categories of risks:
1. Configuration-level risks: Changes that affect openclaw.json or static config files
- Breaking changes in schema or validation
- Deprecated config fields
- New required config options
- Default value changes
2. Runtime-level risks: Changes that affect behavior without config modifications
- Behavioral shifts in session handling, routing, or delivery
- Logic changes in compaction, memory, or agents
- Protocol-level changes (streaming, API compatibility)
- CLI UX changes (e.g., /new behavior)
See references/RISK_CATEGORIES.md for detailed taxonomy.
Phase 1: Information Gathering & Semantic Analysis
1. Ingest Release Notes: Fetch the CHANGELOG or release notes for the target version range.
2. Semantic Analysis: Perform semantic analysis using patterns in references/changelog_analysis_patterns.md.
- Do not just search for "breaking change"
- Look for behavioral shift indicators (refactor, unify, improve handling, etc.)
- Identify both config-affecting and runtime-only changes
3. Cross-Reference with Environment:
- For config risks: Load openclaw.json and identify dependencies on implicit behaviors
- For runtime risks: Identify active workflows (cron jobs, TUI usage, session routing patterns) that may be affected
Phase 2: Risk Assessment & Scenario Planning
2.1 Formulate "What-If" Scenarios
For each identified change, generate concrete, testable failure scenarios:
Config-level examples:
allowlist now requires explicit IP ranges? β Plugin executions fail."Runtime-level examples:
/new now creates independent sessions instead of resetting shared session? β User workflow disrupted."2.2 Quantify Risk
Assign a risk score based on:
2.3 Generate Audit Report
Present findings to the operator using the template in references/AUDIT_REPORT_TEMPLATE.md.
Key sections:
Phase 3: Mitigation & Verification
3.1 Proactive Mitigation
For config risks: Propose specific openclaw.json changes to make implicit assumptions explicit. Do not execute without operator approval.
For runtime risks: Document expected behavioral changes and suggest workflow adjustments if needed.
3.2 Verification Plan
Define clear, simple tests for each risk:
Config verification examples:
openclaw doctor and confirm no validation errors"gateway.err.log for auth mode complaints"Runtime verification examples:
/new, confirm it creates independent session"3.3 Post-Upgrade Audit
After the operator confirms upgrade is complete: 1. Execute verification plan 2. Report results systematically 3. Recommend rollback if critical failures detected
3.4 Archive Upgrade Artifacts (relative to workspace)
Save the upgrade write-ups and check results inside the agent workspace so they remain discoverable and portable.
Write locations (relative paths):
kb/logs/upgrade-reports/YYYY-MM-DD_-to-_upgrade-analysis.md kb/logs/upgrade-verifications/YYYY-MM-DD_post-upgrade-verification.txtNotes:
kb/ is a symlink in a particular deployment, still refer to it as kb/... in the protocol/report; the filesystem mapping is an implementation detail.References
references/changelog_analysis_patterns.md - Semantic analysis patternsreferences/RISK_CATEGORIES.md - Detailed risk taxonomyreferences/AUDIT_REPORT_TEMPLATE.md - Report structurereferences/VERIFICATION_CHECKLIST.md - Common verification tests