Skip to content

feat(skills): add ABAP-to-BTP-CAP modernization skill chain (MVP) - #278

Closed
Raistlin82 wants to merge 2 commits into
arc-mcp:mainfrom
Raistlin82:feat/skills-modernize-abap-to-btp-cap
Closed

feat(skills): add ABAP-to-BTP-CAP modernization skill chain (MVP)#278
Raistlin82 wants to merge 2 commits into
arc-mcp:mainfrom
Raistlin82:feat/skills-modernize-abap-to-btp-cap

Conversation

@Raistlin82

@Raistlin82 Raistlin82 commented May 13, 2026

Copy link
Copy Markdown

Summary

Adds a side-by-side ABAP → BTP CAP modernization skill chain to skills/. Takes a custom ABAP package (Z*) on S/4HANA / ECC and produces a complete BTP-native CAP project scaffold (CDS schema + service + handler stubs + future Fiori Elements V4 + MTA deployment artifacts) without touching the source ABAP system.

This is the MVP foundation (draft for review). Orchestrator + 2 core sub-skills included. Remaining 4 sub-skills tracked as follow-up — see Follow-up below.

Motivation

Existing arc-1 skills cover:

But there's a gap: side-by-side BTP CAP modernization — when the target architecture is a CAP application on BTP (not ABAP Cloud), the workflow is different:

  • Source ABAP stays read-only
  • Target is a parallel BTP project (CDS + Fiori Elements + CF)
  • Released S/4 APIs consumed remotely (no direct ABAP execution in target)
  • Customer needs scaffold + plan to evaluate / commit to the BTP roadmap

This skill chain addresses that use case.

What's included

New skill files (3 markdown, ~1211 lines)

Skill Lines What it does
modernize-abap-to-btp-cap 357 End-to-end orchestrator: inventory → schema → service → fiori → auth → mta → ADR. Smart Defaults, BTP vs On-Prem comparison, error handling.
modernize-abap-cap-schema 370 DDIC → CDS type mapping (24 types). FK → Association/Composition inference. cuid / managed aspect auto-application. Currency / Quantity semantic annotations.
modernize-abap-cap-service 484 FM/program/class → CAP service action mapping. Bound vs unbound action classification. TypeScript handler stubs with TODO + ABAP source excerpts. 13 common ABAP → CAP handler pattern mappings.

README update

New section "BTP CAP Modernization (Preview)" in skills/README.md:

  • Differentiates from sap-clean-core-atc / migrate-custom-code (those keep source in SAP)
  • Documents 7-step typical workflow
  • Cross-references existing skills (bootstrap-system-context, sap-unused-code, sap-clean-core-atc, generate-cds-unit-test)

Design decisions

  • Side-by-side, NOT in-place: leaves source ABAP system read-only. Generates parallel CAP target. NO SAPWrite calls needed.
  • Skill-first contribution: aligned with arc-1's 17-skill community pattern. NO new MCP tool, NO core code change. Honors the 12-tool token-efficient principle (CLAUDE.md §Design Principles).
  • Markdown orchestration: skills chain via inline markdown links (consistent with sap-clean-core-atcmigrate-custom-code pattern).
  • Sandbox output by default: writes to <target>/.target-cap-staging/ for review before apply. Reversible.
  • Smart Defaults: every decision documented with rationale; avoid asking the user unless ambiguous.
  • TODO scaffolds, NOT auto-implementation: handler bodies are stubs with embedded ABAP source excerpts; user implements business logic in a second pass. Honest about what the LLM can/cannot translate.

Use cases addressed

  • ✅ Greenfield BTP CAP migration of a Z* package from ECC / on-prem S/4
  • ✅ Lift-and-redesign for BTP-native architecture
  • ✅ POC / pilot for evaluating BTP CAP as target
  • ✅ Quarterly modernization assessment (run with --skip flags for analysis-only)
  • ✅ Pre-deployment audit before committing to BTP roadmap

What this skill chain does NOT do (intentionally out of scope)

  • ❌ No SAP write operations
  • ❌ No CF deployment automation (cf push stays manual)
  • ❌ No HANA service provisioning
  • ❌ No XSUAA service creation
  • ❌ No automatic handler logic generation (TODO stubs only)
  • ❌ No regression test execution
  • ❌ No transport-coordinated migration
  • ❌ No Kyma target (CF only for v1)
  • ❌ No CAP Java target (Node.js only for v1)
  • ❌ No Freestyle UI5 (Fiori Elements V4 only)

Follow-up

The orchestrator references 4 additional sub-skills that are not yet included in this PR (tracked as next steps):

  • modernize-abap-clean-core-gap (~400 lines) — Batch Clean Core L-A per-edition compliance check + replacement suggestions
  • modernize-abap-fiori-elements (~500 lines) — Service → Fiori Elements V4 LROP scaffold (manifest + annotations)
  • modernize-abap-auth-mapping (~300 lines) — AUTHORITY-CHECK → XSUAA scopes + @restrict annotations
  • modernize-abap-btp-mta (~300 lines) — CAP project → mta.yaml + Dockerfile + manifest.yml

The orchestrator handles missing sub-skills gracefully (skip with warning). Sub-skills will be added in follow-up PRs once the MVP gets review feedback.

Compatibility

  • ✅ No code changes (markdown only)
  • ✅ No new dependencies
  • ✅ No package.json / tsconfig changes
  • ✅ Backward compatible with all ARC-1 tool versions that support the 12-tool surface (read-only path: SAPManage(probe), SAPRead, SAPSearch, SAPContext)
  • ✅ Works with mcp-sap-docs MCP server (optional but recommended for Clean Core gap analysis)
  • ✅ No new ACTION_POLICY entries needed
  • ✅ No CI gate changes

Testing

This is a skill (markdown), no automated tests apply per arc-1 convention.

Smoke-testable manually by:

  1. Connecting ARC-1 to a system with Z packages (read-only access sufficient)
  2. Invoking the skill via Claude Code / Cursor / Copilot
  3. Verifying scaffold output compiles: npx cds compile <target>/db/schema.cds --to edmx

Inspired by

Open questions for the maintainer

  1. Cluster placement: I created a new "BTP CAP Modernization (Preview)" section in skills/README.md. Open to feedback on:
    • Section name / position
    • Whether to mark "Preview" until all 6 sub-skills land
  2. Naming convention: All new skills prefixed modernize-abap-*. Other options considered: port-abap-to-cap-*, btp-cap-from-abap-*. Prefer the current modernize-* family for symmetry with migrate-*.
  3. Follow-up sub-skills strategy: Do you prefer (a) a single follow-up PR with all 4 sub-skills, (b) one PR per sub-skill in sequence, or (c) sub-skills can be PRs from community contributors after this MVP merges?
  4. Smoke test on real system: I can run a real-world smoke test against a public-cloud trial tenant with a Z package. If you have a preferred test fixture / package I should target, happy to align.

Stats

  • Files changed: 4 (3 new, 1 modified)
  • Lines added: 1,247
  • Lines removed: 0
  • New code dependencies: 0
  • New tools: 0
  • New ACTION_POLICY entries: 0

Marked as Draft to invite review before finalization. Happy to address comments and revise.

🤖 Generated with Claude Code

Introduces a side-by-side modernization workflow that takes a custom ABAP
package (Z*) on S/4HANA / ECC and produces a complete BTP-native CAP
project scaffold (CDS schema + service + handler stubs + Fiori Elements V4
+ MTA deployment artifacts) without touching the source ABAP system.

This is the MVP foundation. Orchestrator + 2 core sub-skills (schema +
service) included. Remaining 4 sub-skills (clean-core-gap, fiori-elements,
auth-mapping, btp-mta) tracked as follow-up.

## What's included

### New skills (3 markdown files, 1211 lines)
- skills/modernize-abap-to-btp-cap.md (orchestrator, 357 lines)
  - End-to-end workflow: inventory → schema → service → fiori → auth → mta → ADR
  - Smart Defaults table, BTP vs On-Premise comparison, error handling
  - References sub-skills via inline markdown links
- skills/modernize-abap-cap-schema.md (370 lines)
  - DDIC → CDS type mapping table (24 types)
  - Foreign-key → Association/Composition inference
  - cuid / managed aspect auto-application (sysuuid_x16 + audit fields)
  - Currency / Quantity semantic annotations
  - mandt / CLNT exclusion (single-tenant per service)
- skills/modernize-abap-cap-service.md (484 lines)
  - FM/program/class → CAP service action mapping
  - Bound vs unbound action classification
  - TypeScript handler stubs with TODO + ABAP source excerpts
  - 13 common ABAP → CAP handler pattern mappings (SELECT, MODIFY,
    LOOP AT, READ TABLE, CALL FUNCTION, etc.)
  - Type extraction to srv/types.cds for complex inline types

### README update
- New "BTP CAP Modernization (Preview)" section in skills/README.md
- Explains relationship vs sap-clean-core-atc, migrate-custom-code
  (those keep source in SAP; this rebuilds as BTP CAP)
- Typical workflow chain documented (7 steps)

## Design decisions

- **Side-by-side, NOT in-place**: leaves source ABAP system read-only.
  Generates parallel CAP target — no SAPWrite calls needed.
- **Skill-first contribution**: aligned with arc-1's 17-skill community
  pattern; NO new MCP tool, NO core code change. Honors the 12-tool
  token-efficient principle (CLAUDE.md §"Design Principles").
- **Markdown orchestration**: skills chain via inline markdown links
  (consistent with sap-clean-core-atc → migrate-custom-code pattern).
- **Sandbox output by default**: writes to <target>/.target-cap-staging/
  for review before apply. Reversible.
- **Smart Defaults**: every decision documented with rationale; avoid
  asking the user unless ambiguous.
- **TODO scaffolds, NOT auto-implementation**: handler bodies are stubs
  with embedded ABAP source excerpts; user implements business logic
  in a second pass. Honest about what the LLM can/cannot translate.

## Use cases addressed

- Greenfield BTP CAP migration of a Z* package from ECC / on-prem S/4
- Lift-and-redesign for BTP-native architecture
- POC / pilot for evaluating BTP CAP as target
- Quarterly modernization assessment (run with --skip flags for analysis-only)
- Pre-deployment audit before committing to BTP roadmap

## NOT addressed (intentionally out of scope)

- No SAP write operations
- No CF deployment automation (cf push stays manual)
- No HANA service provisioning
- No XSUAA service creation
- No automatic handler logic generation
- No regression test execution
- No transport-coordinated migration
- No Kyma target (CF only for v1)
- No CAP Java target (Node.js only for v1)
- No Freestyle UI5 (Fiori Elements V4 only)

## Follow-up

Track sub-skill development:
- modernize-abap-clean-core-gap (~400 lines)
  Batch Clean Core L-A per-edition compliance check + replacement suggestions
- modernize-abap-fiori-elements (~500 lines)
  Service → Fiori Elements V4 LROP scaffold (manifest + annotations)
- modernize-abap-auth-mapping (~300 lines)
  AUTHORITY-CHECK → XSUAA scopes + @restrict annotations
- modernize-abap-btp-mta (~300 lines)
  CAP project → mta.yaml + Dockerfile + manifest.yml

## Testing

This is a skill (markdown), no automated tests apply per arc-1 convention.
Smoke-testable manually by:
1. Connecting ARC-1 to a system with Z packages
2. Invoking the skill via Claude Code / Cursor / Copilot
3. Verifying scaffold output compiles (npx cds compile)

## Acknowledgments

Inspired by:
- generate-rap-service-researched (research-first pattern)
- sap-clean-core-atc (Clean Core classification)
- migrate-custom-code (ATC-driven fix pattern)
@marianfoo

Copy link
Copy Markdown
Collaborator

Good idea! Will need further testing, but i think only skills update, from arc-1 side nothing to do

…AML frontmatter

arc-1 main migrated skills from flat .md files to directory + SKILL.md +
YAML frontmatter format (compatible with vercel-labs/skills CLI and the
Anthropic Agent Skills standard). This PR's skills now follow the new
format.

## Changes

- `skills/modernize-abap-to-btp-cap.md` → `skills/modernize-abap-to-btp-cap/SKILL.md`
- `skills/modernize-abap-cap-schema.md` → `skills/modernize-abap-cap-schema/SKILL.md`
- `skills/modernize-abap-cap-service.md` → `skills/modernize-abap-cap-service/SKILL.md`

Each SKILL.md now starts with YAML frontmatter:

```yaml
---
name: <skill-name>
description: <discovery description with "Use when..." pattern>
---
```

Cross-links between skills updated from `[name](name.md)` to
`[name](../name/SKILL.md)` for sibling skills, matching the pattern used
in existing skills (e.g., sap-clean-core-atc/SKILL.md →
../migrate-custom-code/SKILL.md).

skills/README.md links updated to point to the new directory paths.

## Verification

- All 3 skills have YAML frontmatter with discovery-friendly descriptions
- All inline cross-links resolved to new paths
- No orphan `*.md` files (git mv handled the rename, history preserved)
- skills/README.md reflects new paths

This is a zero-content-change refactor — only structural reorganization
to align with the new arc-1 skill format introduced in upstream main.
@marianfoo

Copy link
Copy Markdown
Collaborator

@Raistlin82
Please stop creating new PRs, use this PR only for adding new skills.
As I said, I would like to add only skills related to ARC-1, for CAP only skills maybe create a separate repo.
Also don't add those long comments to the PRs, I will not read them all, please write yourself, especially when you have a question or want something for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants