SC4SAP Ask Consultant
Single entrypoint for asking a SAP module consultant agent an operational question. The skill auto-selects the right consultant(s) from the question text + project config, honors the configured SAP environment, and returns a faithful answer — no code generation, no object creation, just the consultant's judgment.
Invoke /sc4sap:trust-session with parent_skill=sc4sap:ask-consultant so the consultant agent's read-only MCP calls (SearchObject, GetTable, GetPackage, GetWhereUsed, etc.) proceed without prompting.
- If
.sc4sap/session-trust.log already has a line within the last 24h, skip silently.
Full spec: see ../trust-session/SKILL.md.
.sc4sap/config.json → sapVersion (ECC / S4 On-Prem / S4 Cloud Public / S4 Cloud Private), abapRelease, industry, country, activeModules
.sc4sap/sap.env → SAP_URL, SAP_CLIENT, SAP_LANGUAGE, SAP_INDUSTRY, SAP_COUNTRY, SAP_ACTIVE_MODULES (as fallback)
Pass these to the consultant via the dispatch prompt so its answer reflects the actual landscape. If any key is missing, ask the user before dispatching — do NOT let the consultant invent assumptions.
The consultant agent's Mandatory_Baseline (Tier 1 + Tier 2 per ../../common/context-loading-protocol.md) ensures it loads spro-lookup.md, customization-lookup.md, active-modules.md at session start and reads only the configs/{MODULE}/*.md file(s) the question needs.
- Explicit mention: "MM 물어봐" / "ask SD" / "FI 컨설턴트" → dispatch that consultant directly.
- Keyword inference: map keywords to modules (PO/EKKO/EBELN → MM; invoice/BKPF/BSEG → FI; sales order/VBAK → SD; cost center/KOSTL → CO; MRP/production order/AFKO → PP; WBS/PROJ → PS; maintenance order → PM; inspection lot → QM; cash management/treasury → TR; payroll/infotype → HCM; warehouse/bin → WM; freight order → TM; InfoObject/DataSource → BW; sourcing/Ariba Network → Ariba; dump/transport/kernel → BC).
- Multi-module: if 2-3 modules match with similar signal strength, dispatch all in parallel. Example: "MM PO가 FI에 어떻게 전기되는지" → dispatch MM + FI in parallel; the skill then composes the answer.
- Unclear: ask the user which module first — one question, one round.
Supported consultants (15 total):
- Module:
sap-sd-consultant, sap-mm-consultant, sap-fi-consultant, sap-co-consultant, sap-pp-consultant, sap-ps-consultant, sap-pm-consultant, sap-qm-consultant, sap-tr-consultant, sap-hcm-consultant, sap-wm-consultant, sap-tm-consultant, sap-bw-consultant, sap-ariba-consultant
- Basis:
sap-bc-consultant
- Trust bootstrap — §
<Session_Trust_Bootstrap>. (Haiku · skill-to-skill)
- Environment load — read
config.json + sap.env; surface resolved values on the FIRST turn only (one line: SAP: <version> · <industry> · <country> · active: <modules>). (Haiku · main thread)
- Module routing — apply §
<Module_Routing>. If ambiguous, ask one question and stop. (Haiku · main thread)
- Consultant dispatch — one
Agent(...) per resolved module (parallel in a single message when 2–3 modules match).
Emit phase banner per dispatch:▶ phase=4 (consultant-<MODULE>) · agent=sap-<module>-consultant · model=Opus 4.7
Dispatch shape:Agent({
subagent_type: "sc4sap:sap-<module>-consultant", // frontmatter already pins claude-opus-4-7
description: "<MODULE> consultation — <topic>",
prompt: <user question + environment context + expected format>
})
teamMode variant: when N ≥ 2, Step 4 doubles as Round 1 of teamMode — use the Round 1 spawn shape in team-rounds.md § Round 1 (adds team_name, name, charter-file reference; consultants write POSITION files instead of returning directly).
- Synthesis (conditional — only when ≥ 2 consultants replied) — dispatch
sap-writer with model: "sonnet" override. Writer's base model is Haiku (pure formatting); Sonnet override gives the light cross-domain reasoning needed to detect agreement / disagreement between consultant answers without jumping to Opus.
Emit banner:▶ phase=5 (synthesis) · agent=sap-writer · model=Sonnet 4.6
Dispatch shape:Agent({
subagent_type: "sc4sap:sap-writer",
model: "sonnet", // override base Haiku — synthesis needs light reasoning
description: "Cross-module synthesis — <modules>",
prompt: """
Synthesize the following consultant answers for the user question.
Identify shared points, flag disagreements (with a one-line "WHY they differ" note),
and produce a cross-module summary. Do NOT re-answer the question — only compose
from the supplied consultant outputs.
User question: <question>
Environment: <sapVersion> · <industry> · <country> · modules: <list>
Consultant answers:
<MODULE_A>: <answer_a>
<MODULE_B>: <answer_b>
[...]
"""
})
teamMode variant: if Round 1 POSITIONs diverged (per team-rounds.md § Divergence check), do NOT run the legacy synthesis above — follow team-rounds.md Rounds 2-3 then team-mode.md § Synthesis (task-list–driven writer dispatch).
On single-consultant case: SKIP Step 5 entirely — main thread (Haiku) just forwards the consultant's answer to Step 6.
- Return & follow-up — present the final answer (single-consultant: verbatim; multi-consultant: synthesis output as the body + per-module subsections). Offer follow-up paths:
/sc4sap:create-program (if the answer leads to a new build), /sc4sap:program-to-spec (if user wants the existing asset documented), /sc4sap:analyze-code (if quality review needed). (Haiku · main thread)
No writes: this skill never calls Create* / Update* / Delete* / Activate* / CreateTransport. If the consultant's answer suggests a change, the user must run a separate creation / modification skill.
No row extraction: GetTableContents and GetSqlQuery are NOT used. Schema / DDIC reads are fine (GetTable, GetStructure, GetDataElement, GetDomain, SearchObject).
[Model: <main-model> · Dispatched: Opus×<n> (<consultant names>)]
🧭 Consultant: sap-<module>-consultant
🌐 Environment: <sapVersion> · <industry or "—"> · <country or "—"> · active modules: <list>
<consultant's faithful answer>
---
💡 Next steps (optional):
- /sc4sap:create-program — if this leads to a new build
- /sc4sap:program-to-spec — to document an existing asset
- /sc4sap:analyze-code — to review existing code
For multi-module dispatches, the 🧭 Consultant line lists all names, the body leads with the sap-writer synthesis (Sonnet) — shared points, disagreements, cross-module summary — followed by one verbatim subsection per consultant.
Dispatch-summary examples in the prefix:
- Single consultant:
[Model: Haiku 4.5 · Dispatched: Opus×1 (sap-mm-consultant)]
- Multi-consultant:
[Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer synthesis)]
- Multi-consultant teamMode:
[Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer team-synthesis) · Team: 2 members × 2 rounds]
Task: {{ARGUMENTS}}
1---2name: sc4sap-ask-consultant3description: Direct operational Q&A with a SAP module consultant agent. Auto-routes the question to the matching sap-{module}-consultant and answers against the configured SAP environment (version, industry, country, active modules).4---56# SC4SAP Ask Consultant78Single entrypoint for asking a SAP module consultant agent an operational question. The skill auto-selects the right consultant(s) from the question text + project config, honors the configured SAP environment, and returns a faithful answer — no code generation, no object creation, just the consultant's judgment.91011<Purpose>12`/sc4sap:ask-consultant` is the "ask a human consultant" button inside Claude. Users hit it when they need SPRO guidance, business-process advice, configuration walkthroughs, integration touchpoints, localization rules, or BAdI / CMOD / append decisions — the kind of question normally answered by an SD / MM / FI / CO / PP / PS / PM / QM / TR / HCM / WM / TM / BW / Ariba / Basis consultant. The skill does NOT write code or change the SAP system; it reads config + consults the agent + returns the answer.13</Purpose>1415<Response_Prefix>16Every response triggered by this skill MUST begin with `[Model: <main-model> · Dispatched: <sub-summary>]` per [`../../common/model-routing-rule.md`](../../common/model-routing-rule.md) § Response Prefix Convention.17</Response_Prefix>1819<Phase_Banner>20Multi-phase skill. Before each `Agent(...)` dispatch (including every parallel consultant spawn and the optional synthesis pass), emit `▶ phase=<id> (<label>) · agent=<name> · model=<Opus 4.7|Sonnet 4.6|Haiku 4.5>` per [`../../common/model-routing-rule.md`](../../common/model-routing-rule.md) § Phase Banner Convention.21</Phase_Banner>2223<Team_Mode>24When module routing produces ≥ 2 consultants, Step 4 doubles as teamMode Round 1. If Round 1 POSITIONs diverge (per [`team-mode.md`](team-mode.md) § Divergence check), escalate to Rounds 2-3 and use the teamMode synthesis variant instead of Step 5 legacy synthesis. Single-consultant questions and aligned Round 1 → legacy synthesis (Step 5) unchanged. See [`team-mode.md`](team-mode.md) for orchestration + shared task list layout + response prefix variant. Base protocol: [`../../common/team-consultation-protocol.md`](../../common/team-consultation-protocol.md).25</Team_Mode>2627<Use_When>28- User says "ask consultant", "ask {module}", "consultant", "SD 컨설턴트", "MM 컨설턴트", "물어봐", "자문", "consult", etc.29- User has an operational / configuration question that does NOT require code generation or MCP writes.30- User needs cross-module advice that fans out to 2-3 consultants.31- User wants to sanity-check a config choice before running `/sc4sap:create-program`.32</Use_When>3334<Do_Not_Use_When>35- User wants to create code / objects — use `/sc4sap:create-program` or `/sc4sap:create-object`.36- User wants to analyze a runtime error — use `/sc4sap:analyze-symptom`.37- User wants to review existing code quality — use `/sc4sap:analyze-code`.38- User wants IMG customizing table data extraction — refuse per `common/data-extraction-policy.md`.39</Do_Not_Use_When>4041<Session_Trust_Bootstrap>42**MANDATORY — runs as Step 0 before the consultant dispatch.**4344Invoke `/sc4sap:trust-session` with `parent_skill=sc4sap:ask-consultant` so the consultant agent's read-only MCP calls (`SearchObject`, `GetTable`, `GetPackage`, `GetWhereUsed`, etc.) proceed without prompting.4546- If `.sc4sap/session-trust.log` already has a line within the last 24h, skip silently.4748Full spec: see [`../trust-session/SKILL.md`](../trust-session/SKILL.md).49</Session_Trust_Bootstrap>5051<Environment_Context>52**MANDATORY — the consultant answers against the project's configured SAP environment, not generic best-practice.** Before dispatching, load:5354- `.sc4sap/config.json` → `sapVersion` (ECC / S4 On-Prem / S4 Cloud Public / S4 Cloud Private), `abapRelease`, `industry`, `country`, `activeModules`55- `.sc4sap/sap.env` → `SAP_URL`, `SAP_CLIENT`, `SAP_LANGUAGE`, `SAP_INDUSTRY`, `SAP_COUNTRY`, `SAP_ACTIVE_MODULES` (as fallback)5657Pass these to the consultant via the dispatch prompt so its answer reflects the actual landscape. If any key is missing, ask the user before dispatching — do NOT let the consultant invent assumptions.5859The consultant agent's Mandatory_Baseline (Tier 1 + Tier 2 per [`../../common/context-loading-protocol.md`](../../common/context-loading-protocol.md)) ensures it loads `spro-lookup.md`, `customization-lookup.md`, `active-modules.md` at session start and reads only the `configs/{MODULE}/*.md` file(s) the question needs.60</Environment_Context>6162<Module_Routing>63Map the user's question to the target module(s). Priority:64651. **Explicit mention**: "MM 물어봐" / "ask SD" / "FI 컨설턴트" → dispatch that consultant directly.662. **Keyword inference**: map keywords to modules (PO/EKKO/EBELN → MM; invoice/BKPF/BSEG → FI; sales order/VBAK → SD; cost center/KOSTL → CO; MRP/production order/AFKO → PP; WBS/PROJ → PS; maintenance order → PM; inspection lot → QM; cash management/treasury → TR; payroll/infotype → HCM; warehouse/bin → WM; freight order → TM; InfoObject/DataSource → BW; sourcing/Ariba Network → Ariba; dump/transport/kernel → BC).673. **Multi-module**: if 2-3 modules match with similar signal strength, dispatch all in parallel. Example: "MM PO가 FI에 어떻게 전기되는지" → dispatch MM + FI in parallel; the skill then composes the answer.684. **Unclear**: ask the user which module first — one question, one round.6970Supported consultants (15 total):7172- Module: `sap-sd-consultant`, `sap-mm-consultant`, `sap-fi-consultant`, `sap-co-consultant`, `sap-pp-consultant`, `sap-ps-consultant`, `sap-pm-consultant`, `sap-qm-consultant`, `sap-tr-consultant`, `sap-hcm-consultant`, `sap-wm-consultant`, `sap-tm-consultant`, `sap-bw-consultant`, `sap-ariba-consultant`73- Basis: `sap-bc-consultant`74</Module_Routing>7576<Workflow_Steps>77Per-step model allocation (skill frontmatter pins the main thread to Haiku; Agent dispatches carry their own model):78791. **Trust bootstrap** — § `<Session_Trust_Bootstrap>`. (Haiku · skill-to-skill)802. **Environment load** — read `config.json` + `sap.env`; surface resolved values on the FIRST turn only (one line: `SAP: <version> · <industry> · <country> · active: <modules>`). (Haiku · main thread)813. **Module routing** — apply § `<Module_Routing>`. If ambiguous, ask one question and stop. (Haiku · main thread)824. **Consultant dispatch** — one `Agent(...)` per resolved module (parallel in a single message when 2–3 modules match).83 Emit phase banner per dispatch:84 ```85 ▶ phase=4 (consultant-<MODULE>) · agent=sap-<module>-consultant · model=Opus 4.786 ```87 Dispatch shape:88 ```89 Agent({90 subagent_type: "sc4sap:sap-<module>-consultant", // frontmatter already pins claude-opus-4-791 description: "<MODULE> consultation — <topic>",92 prompt: <user question + environment context + expected format>93 })94 ```95 **teamMode variant**: when N ≥ 2, Step 4 doubles as Round 1 of teamMode — use the Round 1 spawn shape in [`team-rounds.md`](team-rounds.md) § Round 1 (adds `team_name`, `name`, charter-file reference; consultants write POSITION files instead of returning directly).965. **Synthesis (conditional — only when ≥ 2 consultants replied)** — dispatch `sap-writer` with `model: "sonnet"` override. Writer's base model is Haiku (pure formatting); Sonnet override gives the light cross-domain reasoning needed to detect agreement / disagreement between consultant answers without jumping to Opus.97 Emit banner:98 ```99 ▶ phase=5 (synthesis) · agent=sap-writer · model=Sonnet 4.6100 ```101 Dispatch shape:102 ```103 Agent({104 subagent_type: "sc4sap:sap-writer",105 model: "sonnet", // override base Haiku — synthesis needs light reasoning106 description: "Cross-module synthesis — <modules>",107 prompt: """108 Synthesize the following consultant answers for the user question.109 Identify shared points, flag disagreements (with a one-line "WHY they differ" note),110 and produce a cross-module summary. Do NOT re-answer the question — only compose111 from the supplied consultant outputs.112113 User question: <question>114 Environment: <sapVersion> · <industry> · <country> · modules: <list>115116 Consultant answers:117 <MODULE_A>: <answer_a>118 <MODULE_B>: <answer_b>119 [...]120 """121 })122 ```123 **teamMode variant**: if Round 1 POSITIONs diverged (per [`team-rounds.md`](team-rounds.md) § Divergence check), do NOT run the legacy synthesis above — follow [`team-rounds.md`](team-rounds.md) Rounds 2-3 then [`team-mode.md`](team-mode.md) § Synthesis (task-list–driven writer dispatch).124 On single-consultant case: SKIP Step 5 entirely — main thread (Haiku) just forwards the consultant's answer to Step 6.1256. **Return & follow-up** — present the final answer (single-consultant: verbatim; multi-consultant: synthesis output as the body + per-module subsections). Offer follow-up paths: `/sc4sap:create-program` (if the answer leads to a new build), `/sc4sap:program-to-spec` (if user wants the existing asset documented), `/sc4sap:analyze-code` (if quality review needed). (Haiku · main thread)126127**No writes**: this skill never calls `Create*` / `Update*` / `Delete*` / `Activate*` / `CreateTransport`. If the consultant's answer suggests a change, the user must run a separate creation / modification skill.128129**No row extraction**: `GetTableContents` and `GetSqlQuery` are NOT used. Schema / DDIC reads are fine (`GetTable`, `GetStructure`, `GetDataElement`, `GetDomain`, `SearchObject`).130</Workflow_Steps>131132<Output_Format>133Return the consultant's answer verbatim, prefixed with the consultant identity and the environment context it used:134135```136[Model: <main-model> · Dispatched: Opus×<n> (<consultant names>)]137138🧭 Consultant: sap-<module>-consultant139🌐 Environment: <sapVersion> · <industry or "—"> · <country or "—"> · active modules: <list>140141<consultant's faithful answer>142143---144💡 Next steps (optional):145- /sc4sap:create-program — if this leads to a new build146- /sc4sap:program-to-spec — to document an existing asset147- /sc4sap:analyze-code — to review existing code148```149150For multi-module dispatches, the `🧭 Consultant` line lists all names, the body leads with the sap-writer synthesis (Sonnet) — shared points, disagreements, cross-module summary — followed by one verbatim subsection per consultant.151152Dispatch-summary examples in the prefix:153- Single consultant: `[Model: Haiku 4.5 · Dispatched: Opus×1 (sap-mm-consultant)]`154- Multi-consultant: `[Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer synthesis)]`155- Multi-consultant teamMode: `[Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer team-synthesis) · Team: 2 members × 2 rounds]`156</Output_Format>157158<Related_Skills>159- `/sc4sap:compare-programs` — complementary when the consultant's answer references existing variants.160- `/sc4sap:analyze-cbo-obj` — complementary when the consultant's answer depends on knowing what custom assets already exist.161</Related_Skills>162163<MCP_Tools_Used>164- `SearchObject`, `GetObjectInfo` — existence checks as the consultant works165- `GetPackage`, `GetPackageContents` — CBO scope confirmation166- `GetTable`, `GetStructure`, `GetDataElement`, `GetDomain`, `GetView` — DDIC metadata167- `GetWhereUsed` — call-graph queries168- NEVER: `GetTableContents`, `GetSqlQuery`, any `Create*` / `Update*` / `Delete*` / `Activate*`169</MCP_Tools_Used>170171Task: {{ARGUMENTS}}