# Arc 1 Skills

> ARC-1 agentic SAP development skills (arc-mcp/arc-1/skills). Reference for ADT tools, code activation, and automated ABAP editing. Covers the 8 arc-1 MCP tools (SAPContext, SAPDiagnose, SAPLint, SAPManage, SAPNavigate, SAPRead, SAPSearch, SAPTransport), the read-edit-activate-transport flow, and arc-1's role as PRIMARY ADT MCP in the routing tree.

- Skill: `williamcorrea23/arc-1-skills` (Agent Skill)
- Install (CLI): `npx skillmds@latest add williamcorrea23/arc-1-skills`
- Raw SKILL.md: https://api.skillmd.com/api/skills/williamcorrea23/arc-1-skills/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: williamcorrea23 (https://skillmd.com/u/williamcorrea23)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/williamcorrea23/arc-1-skills

---


# ARC-1 — Primary ADT MCP for Agentic ABAP Development

arc-1 is the PRIMARY ADT MCP of this orchestrator. All ADT-class operations (read source,
edit, activate, lint, transport) route to arc-1 first, then aibap (secondary), then
mcp-sap-gui (fallback). See `scripts/sap_router.py` (`SapRouter.get_route()`).

## 1. Tool Map — When to Use Which

| Tool | Use for |
| --- | --- |
| **SAPContext** | System/session context — SID, client, user, release. Call first in a new session |
| **SAPSearch** | Find objects by name/type when you do not know the exact object name |
| **SAPNavigate** | Jump between related objects — includes, super/subclasses, where-used |
| **SAPRead** | Read source code and metadata of a known object (class, program, CDS, table) |
| **SAPLint** | Static checks (syntax, ATC-style) on source BEFORE activation |
| **SAPManage** | Create / modify / activate / delete objects — all write operations |
| **SAPDiagnose** | Short dumps (ST22-style), traces, runtime diagnostics after failures |
| **SAPTransport** | List / create / assign / release transport requests |

Rule of thumb: read-only questions -> SAPSearch/SAPRead/SAPNavigate.
Changes -> SAPLint -> SAPManage -> SAPTransport. Failures -> SAPDiagnose.

## 2. Route Through the Orchestrator

```bash
# Let the router pick arc-1 (ADT-first) for the action:
npm run router -- --action ADT_READ_SOURCE
python scripts/sap_router.py route --action ADT_EDIT_CLASS

# Force GUI fallback only when ADT cannot do it (SPRO, dynpro):
npm run router:gui -- --action SPRO_CONFIG
```

If arc-1 is down, the TieredFallback engine (`scripts/fallback_engine.py`) cascades
ADT -> RFC -> GUI -> BDC -> Offline -> Manual. Do not hand-code fallbacks.

## 3. Typical Flow: Read -> Edit -> Activate -> Transport

1. **Context** — `SAPContext` to confirm system/client (never assume DEV).
2. **Locate** — `SAPSearch` for the object; `SAPNavigate` to find the exact include/method.
3. **Read** — `SAPRead` to get current source. Edit surgically (Karpathy: touch only what's needed).
4. **Lint** — `SAPLint` on the modified source. Fix findings before writing.
5. **Write** — `SAPManage` to save the change (object goes INACTIVE).
6. **Activate** — `SAPManage` activate. An inactive object is invisible to runtime.
7. **Transport** — `SAPTransport` to assign the object to a modifiable request. Release only at gate (`npm run abap:review:transport`).
8. **Verify** — `SAPRead` the active version back; `SAPDiagnose` if execution dumps.

## 4. Health and Learning

```bash
# Probe arc-1 (HIGH criticality) + .env completeness:
npm run hc
npm run hc:prompt      # interactive fix for missing SAP_HOST/SAP_USER/SAP_PASSWORD

# Feed routing telemetry so self_learn.py keeps arc-1 primary:
npm run learn:mcp -- --mcp arc-1 --latency 245 --success true
npm run learn:route -- --action ADT_EDIT_CLASS --success true
```

## Pitfalls

- **401/403 on every arc-1 call** → Cause: SAP credentials missing or wrong in .env, or user lacks S_DEVELOP. Solution: run `npm run hc:prompt` to fill SAP host/user/password; confirm developer role with Basis.
- **"Object locked by user X"** → Cause: object is edit-locked in SE80/ADT by another session (or a stale lock of your own). Solution: retry later or ask the lock owner to release (SM12); never force-delete locks on shared objects.
- **Change saved but behavior unchanged** → Cause: object left INACTIVE — SAPManage save without activate. Solution: always activate after write and re-read the active version to confirm.
- **Activation fails with syntax errors** → Cause: edit broke dependent objects or lint step was skipped. Solution: run `SAPLint` before `SAPManage` write; use `SAPNavigate` where-used to check dependents; `SAPDiagnose` for details.
- **"Not assigned to a transport" on save** → Cause: object in a transportable package but no modifiable request. Solution: `SAPTransport` create/assign a workbench request first, or use $TMP for throwaway objects.
- **arc-1 timeout / connection refused** → Cause: MCP server down or SAP host unreachable. Solution: `npm run hc` to confirm; router auto-falls back to aibap then GUI — do not bypass the fallback engine.

## Verification

```bash
# 1. arc-1 healthy and env complete:
npm run hc

# 2. Router resolves an ADT action to arc-1 (primary):
python scripts/sap_router.py route --action ADT_READ_SOURCE

# 3. After an edit: SAPRead the object and confirm version = active,
#    then gate before release:
npm run abap:review:transport
```

## Related

- **sap-router-skill** — master routing tree (ADT -> arc-1 first, GUI fallback)
- **abap-code-review** — 9-dimension GO/NO-GO gate before SAPTransport release
- **sap-transport-gate / sap-transport-management** — transport landscape rules
- **karpathy-guidelines** — Think, Simplify, Surgical, Goal-Verify wrapper for every edit

