协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
cap-upgrade【开发与工程】Upgrade a CAP project to the latest CDS version. Drives the `cds upgrade` CLI for CDS 10+ (pattern detection, false-positive filtering, fix categorisation) and handles manual upgrades for earlier versions (major jumps like 7→8, 8→9 as well as minor/patch updates). Use when a developer needs to upgrade CDS in a CAP project, already has a `cds upgrade`…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
cds upgrade CLI for CDS 10+ (pattern detection, false-positive filtering, fix categorisation) and handles manual upgrades for earlier versions (major jumps like 7→8, 8→9 as well as minor/patch updates). Use when a developer needs to upgrade CDS in a CAP project, already has a cds upgrade report, or wants to move to a newer CDS version.
license: Apache-2.0
compatibility: all
metadata:
author: Tim Schulze-Hartung
co-authors:
- Daniel Schlachter
team: cap-toolsI drive the cds upgrade CLI, interpret its findings, and walk the developer
through each migration item with concrete fix instructions and links to the
official CAP migration documentation on capire.
cds upgrade doescds upgrade is a deterministic command-line tool shipped with @sap/cds-dk.
It is the foundation this skill works on top of.
With --fix it:
package.json to the target versionnpm installWithout flags it scans only — no changes to project sources or dependencies (the report files below are still written).
With --dry nothing is written to disk at all — all output goes to stdout.
In every mode it scans the project for breaking-change patterns and produces:
findings.json — structured per-rule matches with file positions, guidance,
severity, compat flags, OpenRewrite recipes, and coverage signalsUPGRADE_REPORT.md — human-readable report grouping findings by scopeUPGRADE_OVERVIEW.md — short summary with scan numbers and quick winsThe CLI's outputs are dense — many rules, many matches per rule, many of which may be false positives in any given codebase. This skill:
guidance and generic FP rulesBefore starting any workflow, detect the current CDS major version:
cds version
Parse the @sap/cds line (e.g. @sap/cds: 9.8.0). Extract the major number.
| Current major | Target | Workflow |
|---|---|---|
| < 9 | Ask the developer: "What target version? (9 or 10)" | If target < 10 → Manual upgrade path (appendix). If target = 10 → multi-major: upgrade to 9 first (manual path), then run cds upgrade for 9→10. |
| 9 | 10 (default) | Main workflow (Steps 0–6 below) |
| 10 | 10 (re-check) | Mode C (see Trigger modes below) |
The developer asks to upgrade (e.g. "migrate my project", "run cds upgrade").
Run cds upgrade --fix from scratch:
cds upgrade --fix (Step 1) – upgrades dependencies AND scansThe developer already ran cds upgrade and has UPGRADE_REPORT.md and/or
findings.json in the project root. This is the common case when:
Detection: Check if UPGRADE_REPORT.md or findings.json exists in the
project root. If present, check whether any source file tracked by the project
has been modified after .cdsupgrade.json was written. If no relevant changes
occurred, reuse the existing report. Otherwise, suggest re-running cds upgrade.
Skip to Step 2 (Read the report).
The project already upgraded to CDS 10 but may have:
--fix that should eventually be removedRun cds upgrade to scan for remaining migration items. If
UPGRADE_REPORT.md or findings.json already exist and are recent
(Mode B detection applies), skip directly to Step 2.
This skill assumes a developer-type environment where cds upgrade can run
(globally installed cds-dk with upgrade support, or via npx @sap/cds-dk@latest) and agent
capabilities are present. It does not cover:
cds upgrade without an AI agent,
UPGRADE_REPORT.md is the human deliverable. The skill is unnecessary.findings.json can be consumed by a custom pipeline
(e.g. SARIF conversion for IDE Problems Panel). The skill is invoked only
when an agent walks a developer through findings interactively.Based on the version routing above, load exactly one of the following files from this skill's directory and follow its instructions:
| Scenario | File to load |
|---|---|
| Mode A, B, or C (target is CDS 10, or already on 10) | workflow-cds10.md |
| Manual upgrade path (target < 10, or first leg of multi-major) | manual-upgrade.md |
Do not load both. Only the file matching the detected scenario is relevant. After loading, follow that file's instructions from the beginning.