From sc4sap
Compares 2–5 ABAP programs that implement the same business scenario in different variants (by module, country, persona, or time horizon) across 10 business dimensions for functional consultants. Helps pick the right program, map fit/gap, or brief handovers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sc4sap:compare-programssonnetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reads 2–5 ABAP programs that implement the **same business scenario** but in **different variants**, analyzes them across 10 business dimensions, and emits a side-by-side Markdown comparison targeted at **functional consultants** (not developers).
Reads 2–5 ABAP programs that implement the same business scenario but in different variants, analyzes them across 10 business dimensions, and emits a side-by-side Markdown comparison targeted at functional consultants (not developers).
Companies often split one logical business flow (e.g. GR list) into 2–3 programs so the same data answers different questions — MM sees quantity, CO sees value; KR sees e-tax-invoice fields, EU sees VAT codes; month-end controllers see aggregates, warehouse clerks see live transactions.This skill crystallizes why each variant exists so a consultant can:
<Response_Prefix>
Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention.
</Response_Prefix>
<Phase_Banner>
Multi-phase skill. Before each Agent(...) dispatch, emit ▶ phase=<id> (<label>) · agent=<name> · model=<Opus 4.7|Sonnet 4.6|Haiku 4.5> per ../../common/model-routing-rule.md § Phase Banner Convention.
</Phase_Banner>
<Team_Mode>
Step 4b is the integration point for Type A teamMode (Cross-Module Consultant Panel). When module_set ≥ 2 (existing Step 4b gate), Round 1 runs always — positions are parsed for ownership conflicts (same program claimed PRIMARY by 2+ modules). On conflict, escalate to Rounds 2-3 per team-mode.md. No conflict → positions pass directly to Step 5 writer render (legacy path). Base protocol: ../../common/team-consultation-protocol.md.
</Team_Mode>
<Use_When>
<Do_Not_Use_When>
/sc4sap:program-to-spec instead/sc4sap:analyze-code/sc4sap:create-program/sc4sap:team
</Do_Not_Use_When><Session_Trust_Bootstrap> MANDATORY — runs as Step 0 before any MCP call or user interaction.
Invoke /sc4sap:trust-session with parent_skill=sc4sap:compare-programs to pre-grant MCP tool + file-op permissions (eliminates per-tool prompts during parallel program reads).
.sc4sap/session-trust.log already has a line within the last 24h, skip silently.Agent dispatches within this skill MUST pass mode: "dontAsk".Full spec: see ../trust-session/SKILL.md.
</Session_Trust_Bootstrap>
<Companion_Files> MANDATORY: Read the companion files below before executing. Each covers a self-contained section:
| Companion | Scope |
|---|---|
comparison-scope.md | 10 business comparison dimensions + default scope + scope-selection prompt template |
workflow.md | 6-step execution flow (Input → Scope → Facts × N → Analyze → Render → Follow-up) |
dispatch-prompts.md | Full Agent(...) prompt bodies for Steps 3, 4, 4b, 5 (kept out of workflow.md to honor the 200-line cap) |
report-template.md | Markdown report skeleton (Executive Summary → Matrix → Per-program detail → Recommendation) |
| </Companion_Files> |
<Agent_Composition>
Per-step model allocation. Skill frontmatter pins the main thread to Haiku; each Agent(...) carries its own model (frontmatter or explicit override).
sap-code-reviewer × N, Sonnet 4.6 via model: "sonnet" override) — Step 3 (absorbs the old "Read Phase"). Each reviewer reads ONE program itself (GetProgFullCode / GetAbapAST / screens / GUI status / text elements / where-used) and returns structural facts only — no quality scoring. Sonnet is sufficient because this pass is rule-based extraction, not novel code generation; matches the base tier of common/model-routing-rule.md § Tier 1.sap-analyst × 1, Opus 4.7) — Step 4: a SINGLE dispatch covering module classification + dimension scoring + executive summary + recommendation. Keeps the analyst's context continuous across reasoning layers instead of fragmenting into 4 chained calls.sap-{module}-consultant × K, Opus 4.7) — Step 4b: when programs span 2+ modules (MM+CO, SD+FI, etc.), each distinct module gets a consultant dispatch to explain "what would a {module} user use this for". The analyst's scoring consumes these in its narrative.sap-writer × 1, Haiku 4.5) — Step 5: renders the final Markdown using report-template.md. Pure formatting from structured state.All Agent dispatches pass mode: "dontAsk" (trust-session already granted in Step 0).
</Agent_Composition>
<Language_Policy> Report language mirrors the user's current conversation language.
<Output_Location>
.sc4sap/comparisons/{prog1}__vs__{prog2}[__vs__{prog3}…]-{YYYYMMDD}.md
_)..sc4sap/comparisons/compare-{YYYYMMDD}-{hash6}.md and list the programs inside the front-matter.
</Output_Location><Execution_Summary>
comparison-scope.md.workflow.md in order.report-template.md.Do not skip the companion-file reads — the dimension list, step order, and report schema all live there. </Execution_Summary>
<Data_Extraction_Safety>
This skill reads source code + DDIC metadata + where-used + screen/GUI-status/text-element metadata only. It does NOT call GetTableContents or GetSqlQuery. If the user asks for sample row data to illustrate a difference, refuse per common/data-extraction-policy.md and document the request in the report's Risk & Open Questions section instead.
</Data_Extraction_Safety>
<Related_Skills>
/sc4sap:program-to-spec — single-program reverse-engineering (vertical depth)/sc4sap:analyze-code — quality review (what's wrong, not what's different)/sc4sap:analyze-cbo-obj — CBO package inventory (complementary context for dimension 8)/sc4sap:deep-interview — use before comparison if user is unsure which programs to include
</Related_Skills>Task: {{ARGUMENTS}}
npx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sapCreates new ABAP programs (Report, CRUD, ALV, Batch) with Main+Include structure supporting OOP or Procedural paradigms using a multi-phase coding and QA pipeline.
Explains ABAP objects with full dependency context via SAPContext and optional ATC code quality analysis. Supports classes, CDS views, behavior definitions (BDEF), reports, and more.
Assists with ABAP code for SAP systems: internal tables, structures, ABAP SQL, OOP, RAP, CDS views, EML statements, ABAP Cloud, strings, dynamic programming, RTTI/RTTC, field symbols, data references, exceptions, unit testing.