Skip to content
Development
Skill

/sap-retrofit

Retrofit maintenance-line fixes into the project line without Solution Manager ChaRM — the detect/classify loop that a rotting spreadsheet can't do. `harvest` reads released maintenance TRs (E070/E071/E07T over RFC); `classify` diffs each object maint-vs-project via /sap-compare

From plugin
sap-dev
10123 skills3 agents

Claude Code

$ npx -y skills add sapdev-ai/sap-dev --skill sap-retrofit --agent claude-code

SKILL.md

sap-retrofit.SKILL.md
name: sap-retrofit
description: |
  Retrofit maintenance-line fixes into the project line without Solution Manager ChaRM — the
  detect/classify loop that a rotting spreadsheet can't do. `harvest` reads released
  maintenance TRs (E070/E071/E07T over RFC); `classify` diffs each object maint-vs-project via
  /sap-compare and gathers project-line change evidence (VRSD versions + E071 dev-TR hits) to
  label it IN_SYNC / GREEN (project untouched — safe to auto-apply) / YELLOW (project also
  changed — needs a merge) / RED (can't diff reliably); `status` rolls up the persistent
  ledger; `draft` writes a reviewable two-way diff + AI merge draft (never deploys); `apply`
  deploys GREEN objects to the project line behind /sap-transport-request with a post-deploy
  re-compare, confirm-gated. The maintenance system is read-only forever. Prerequisites:
  /sap-login profiles (pinned = project line, --maint hint = maintenance line); SAP NCo 3.1
  (32-bit). No Z-object, no dev-init.
argument-hint: "init --project <id> --maint <hint> [--since YYYYMMDD] [--packages Z*,Y*]  |  harvest  |  classify [--max-objects N]  |  status [--report]  |  draft <OBJ>  |  apply --green-only"

SAP Retrofit — Dual-Track Detect / Classify / Apply (no ChaRM)

Re-apply production (maintenance-line) fixes into the project line as a tracked, evidence-based loop instead of a rotting spreadsheet. **The maintenance line is read-only forever**; the only SAP writes are confirm-gated GREEN deploys to the project line, delegated to the workbench skills.

Task: $ARGUMENTS

**Connection roles:** pinned profile (via /sap-login) = **project line** (the write target). `--maint <hint>` = **maintenance line** (read-only), resolved like /sap-compare's `--against`. `apply` **hard-refuses** if a write would resolve to the maintenance profile.

---

Shared Resources

| File | Token / call | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` | *(rule)* | **Rule 0 (highest priority)** — environment guard; enforced by Step 7 via `sap_safety_gate.ps1` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules | | `<SKILL_DIR>/references/sap_retrofit_ledger.ps1` | `-Action init\|append\|set-state\|watermark\|list` | Local workspace + state-machine ledger | | `<SKILL_DIR>/references/sap_retrofit_harvest.ps1` | `-MaintHint … [-Since -Packages -MaxTrs]` | Released maintenance TRs → per-object rows (RFC, read-only) | | `<SKILL_DIR>/references/sap_retrofit_evidence.ps1` | `-Objects "TYPE:NAME,…" -Baseline` | Project-line VRSD/E071/TADIR evidence (RFC, read-only) | | `/sap-compare` (Skill tool) | `<OBJ> --against <maint-hint>` | The maint-vs-project source/DDIC diff (its class-source limit applies) | | `/sap-se38` · `/sap-se37` (Skill tool) | deploy | `apply` deploy delegates (TR via /sap-transport-request inside them) | | `/sap-transport-request` (Skill tool) | TR | Never prompt for a TR — always delegate | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_read_source.ps1` | `Read-SapAbapSource` | `apply` maintenance-source fetch | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_finding_lib.ps1` / `sap_artifact_lib.ps1` | Step 8 | Findings + artifact index |

The workspace `{work_dir}\retrofit\<project>\` is a durable Bucket-A path (a later session must find the ledger) — never under `{RUN_TEMP}`.

Step 0 — Resolve Work Dir + Workspace

powershell -NoProfile -ExecutionPolicy Bypass -Command ". '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_settings_lib.ps1'; . '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Write-Output ('WORK_DIR=' + (Get-SapWorkDir)); Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))"

`{WS}` = `{work_dir}\retrofit\<project>`. Set `{RUN_TEMP}` = the `RUN_TEMP=` value printed above (`Get-SapRunTemp` mints + creates the per-run scratch dir holding the log state file) — for logging state; mint it once here and reuse (re-minting breaks the `-Action end` state-file lookup).

Step 0.5 — Start Logging

powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_retrofit_run.json" -Skill sap-retrofit -ParamsJson "{}"

Step 1 — Mode Dispatch

`init` | `harvest` | `classify` | `status` | `draft` | `apply`. Except `init`, load `{WS}\project.json` (absent → `RETRO_LEDGER_IO`). Resolve `--maint` via the profile store. **For `apply`: if the maintenance profile resolves to the SAME SID+client as the pinned project profile, hard-refuse** (a retrofit that writes back to maintenance is a bug).

Step 2 — init

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_retrofit_ledger.ps1" -Action init -Workspace "{WS}" -MaintHint "<hint>" -Packages "<Z*,Y*>" -Since "<YYYYMMDD>"

Writes `project.json` (maint hint, packages, watermark=since) + empty `ledger.tsv` + `diffs/`, `drafts/`, `reports/`.

Step 3 — harvest (read-only)

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_retrofit_harvest.ps1" -MaintHint "<hint>" -Since "<watermark>" -Packages "<Z*,Y*>" -MaxTrs 500 -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"

Parse `TR:` and `OBJ: pgmid=… object=… obj_name=… tr=… released=… devclass=…`; append each object via the ledger (`-Action append`, dedupes across TRs, latest TR wins, all recorded). On `STATUS: OK`, advance the watermark (`-Action watermark -Since <today>`); `NO_NEW` → nothing to do. Never advance the watermark on `RFC_ERROR`.

Step 4 — classify (read-only)

For each HARVESTED object (cap `--max-objects`, default 50): 1. **Diff** — invoke `/sap-compare <OBJ> --against <maint-hint>` via the **Skill tool**; read its `diff.json` + unified diff; copy the bundle into `{WS}\diffs\<OBJ>\`. 2. **Evidence** — run `sap_retrofit_evidence.ps1 -Objects "TYPE:NAME" -Baseline <since>`; parse `EVIDENCE: … tadir=… vrsd=… e071=…`.

Read more
@sapdev-ai
Ships withsap-dev

SAP development automation skills for AI coding assistants. Windows-only — the skills drive SAP GUI for Windows via GUI Scripting (plus optional RFC via SAP NCo); there is no macOS/Linux path.

10123 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
10
Star history of sapdev-ai/sap-dev on GitHub, a chart by star-history.com

Other skills on sap-dev.

sap-activate-object

sap-activate-object

Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for…

@sapdev-ai@sapdev-aiInstall Skill
sap-api-advisor

sap-api-advisor

Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a…

@sapdev-ai@sapdev-aiInstall Skill
sap-atc

sap-atc

Runs the SAP ABAP Test Cockpit (ATC) end-to-end as a quality gate: builds an SCI Object Set scoped to the target object(s),…

@sapdev-ai@sapdev-aiInstall Skill
sap-call-bdc

sap-call-bdc

Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via…

@sapdev-ai@sapdev-aiInstall Skill
sap-change-package

sap-change-package

Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto >…

@sapdev-ai@sapdev-aiInstall Skill
sap-check-abap

sap-check-abap

Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming…

@sapdev-ai@sapdev-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about sap-retrofit.

Which coding agents can use sap-retrofit?
sap-retrofit installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.