Generated banner for abap_wiki
Generated logo for abap_wiki

abap_wiki

LLM wiki kit

Created by Luigi Venturino

Published in Gixsy95/abap_wiki. Publisher page

50 GitHub stars

What it is

Agent-driven SAP/ABAP knowledge base engine that turns S/4HANA custom objects into citable Markdown/Obsidian context for humans and AI agents.
— the description by Luigi Venturino

AutoGineer overview, from the brain’s own files

abap_wiki is a local, agent-driven engine designed to solve the fragmentation of documentation in SAP S/4HANA systems. By processing custom ABAP objects (Z*/Y*), it builds a navigable, versioned, and verifiable knowledge base in Markdown. The system operates through a multi-layer pipeline: L0 (inventory), L1 (code analysis with an adversarial gate), and L2 (functional and process analysis). It emphasizes verifiability by anchoring every claim to source lines or expert evidence, ensuring that AI agents consume pre-verified, citable context rather than raw, unverified code. The resulting knowledge base is compatible with tools like Obsidian for graphical navigation and can be queried by agents to provide deep, context-aware insights into enterprise systems.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The engine uses a local pipeline to process SAP data. It ingests TADIR exports and ABAP source code from a raw inbox. The L0 layer creates a deterministic inventory. The L1 layer performs code analysis using an author agent and an independent adversarial judge agent that must accept the output before promotion. The L2 layer adds functional and process context through human-in-the-loop research. The final output is a collection of Markdown files with YAML frontmatter and wikilinks, stored in a local vault. The system uses SQLite for state management and supports optional MCP integration for live SAP system access.

Folders
FolderRoleFiles
.claudeagent-config20
.githubagent-config10
demoexamples101
docsdocs6
examplesexamples19
rawraw-sources6
scriptsscripts5
templatestemplates20
.agentsfolder13
.vscodefolder1
corefolder127
slicesfolder1

The agent reads

The agent writes

Requirements

Runtimes: Python

Databases: SQLite

Works with: Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Kiro, OpenCode, Amp, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 2 scripts. Review scripts/bootstrap.ps1, scripts/bootstrap.sh before opening the folder in Claude Code. No step below turns a hook on for you.

    • scripts/bootstrap.ps1: pwsh scripts/bootstrap.ps1
    • scripts/bootstrap.sh: sh scripts/bootstrap.sh
  2. Clone the repository at the commit AutoGineer scanned:

    git clone https://github.com/Gixsy95/abap_wiki.git && cd abap_wiki && git checkout b071ebe17dc410348b92560e72f07a93a44dc713
  3. Claude Code reads CLAUDE.md from this folder automatically.

  4. cd abap_wiki && claude

  5. AutoGineer scanned these files at commit b071ebe.

  6. Created by Luigi Venturino. Published in Gixsy95/abap_wiki. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Automating the documentation of custom SAP ABAP objects.
  • Providing AI agents with a trusted, citable context for enterprise codebases.
  • Visualizing complex dependency graphs of SAP systems in Obsidian.
  • Reducing token consumption by providing pre-verified, compressed knowledge instead of raw code.
  • Facilitating functional and process-level understanding of legacy or complex SAP implementations.
“Explain the business process behind the Z_SALES_REPORT program.”
The agent retrieves the L2-verified wiki page for the program, citing the functional analysis and linking to the relevant SAP tables and business logic.
“What are the dependencies for the custom class ZCL_INVENTORY_MANAGER?”
The agent provides a list of classes and tables derived from the verified dependency graph stored in the wiki.

Documentation by Luigi Venturino

<p align="center"> <img src="docs/images/wordmark.svg" alt="abap_wiki" width="100%" /> </p>

<p align="center"> <em>An agent-driven engine that turns your SAP system into a verifiable, AI-native knowledge base.</em> </p>

<p align="center"> <img src="docs/images/full-graph.png" alt="A real SAP S/4HANA knowledge base built with abap_wiki: thousands of custom ABAP objects as a navigable Obsidian graph, clustered by package (anonymised: no labels, no real data)" width="100%" /> </p>

<p align="center"> <a href="https://github.com/Gixsy95/abap_wiki/actions/workflows/ci.yml"><img src="https://github.com/Gixsy95/abap_wiki/actions/workflows/ci.yml/badge.svg" alt="CI" /></a> <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /> <img src="https://img.shields.io/badge/python-%E2%89%A53.11-blue" alt="Python 3.11+" /> <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Linted with Ruff" /></a> <img src="https://img.shields.io/badge/Claude_Code-ready-F97316" alt="Claude Code ready" /> <img src="https://img.shields.io/badge/Codex_CLI-ready-8B5CF6" alt="Codex CLI ready" /> </p>

Contents

  • The problem

  • What abap_wiki does

  • What makes it different

  • What a page looks like

  • Why not just RAG?

  • Measurable value

  • Choosing the models

  • What abap_wiki on Obsidian looks like

  • Query the knowledge base

  • Getting started

  • How it works

  • Documentation

  • Agents

  • Structure

  • Live SAP via MCP

  • Why I built this

  • Inspirations

  • What is not included

  • License

The problem

In a real SAP system, documentation is fragmented, or simply absent.

How a flow works, how a program was built, and above all why one design choice was made over another, all of it lives in one place: the head of the developer who wrote that SAP object or flow. And guess what? That person left five years ago.

Every developer since inherited the same pain and coped the only way they could: trial and error. So today the code is a maze: twenty commented-out blocks, twenty-five inline tags from a dozen different hands. What a mess.

And even when you finally decode it, it's not enough. Code tells you what happens, not why. The business need behind it, the reason for a magic number, the process a job actually serves: none of that is in the ABAP. Point an AI agent at it and it's worse off still: re-reading scattered raw ABAP on every turn, with no memory, no citations, no way to know what's true. And generic SAP documentation won't save you. It describes standard SAP in the abstract, not how your system really uses it.

What abap_wiki does

abap_wiki is a local, agent-driven engine that turns an SAP S/4HANA system into a navigable, versioned, verifiable knowledge base. It starts where your system is unique, at the custom objects (Z*/Y*), and follows their dependencies outward into the standard objects they touch, documenting each in the context of real usage. The result isn't a Z* catalog; it's a map of how your enterprise system actually works, built layer by layer (L0 inventory → L1 code analysis → L2 functional & process), structured for both engineers and AI agents.

<p align="center"> <img src="docs/images/pipeline.svg" alt="The pipeline: L0 inventory, L1 code analysis plus adversarial gate, L2 functional and process, L3 process" width="90%" /> </p>

What makes it different

🧠 From the code to the why. Code never lies, but it won't explain itself. L2 closes that gap with a human-in-the-loop process: the agent reads the code, marks the functional gaps, auto-researches what it can, and routes the rest to the real process owner. The owner defines a slice (a functional view of a process), and the engine raises the documentation level only after reconciling every answer against the code. (The shape of that auto-research loop comes from Karpathy's autoresearch.)

🔒 Verifiable, not just plausible. Every claim is anchored to the lines that prove it ([VERIFIED: path:N-M]); an independent adversarial agent re-reads the code and rejects anything it can't confirm. Fail-closed: no promotion without proof. What can't be proven is labelled, not hidden.

<p align="center"> <img src="docs/images/gate.svg" alt="The adversarial gate: an author agent writes the analysis, an independent judge in a separate session with a different model re-checks it, and the result is ACCEPT (promote) or REVERT (back to author), fail-closed" width="90%" /> </p>

🏠 100% local. Your data never leaves your machine. No external connections, no third-party services, nothing phoned home. Run it with Claude, Codex, or a fully local open-source agent: pull the network cable and still build your complete technical, functional and process knowledge base. For an enterprise SAP landscape that's not a nice-to-have; it's the difference between can and can't.

⚙️ A real harness, not a prompt. This isn't "ask Claude to document my code." It's a tight agentic harness (gates, contracts, a state machine, citations) built on years of hands-on SAP S/4HANA work, driving an almost-deterministic process to a result you can trust.

What a page looks like

A real page, generated end-to-end by the pipeline against a real 153k-line ABAP program: abapGit's own official, public standalone distribution, downloaded from GitHub. This is the very start of that page, verbatim (full page):

---
type: sap-object
sap_type: program
sap_name: ZABAPGIT_STANDALONE
tadir_object: PROG
pgmid: R3TR
devclass: ZABAPGIT
namespace: Z
custom: true
doc_level: L2
author: ABAPGIT
created_on: ''
changed_on: ''
ingest_date: '2026-07-02'
updated: '2026-07-03'
source_hash: 15fe0137
raw_source_path: raw/system-library/ZABAPGIT/Source Code Library/Programs/ZABAPGIT_STANDALONE/ZABAPGIT_STANDALONE.prog.abap
raw_source_status: available
depends_on:
- class-CL_GUI_CONTAINER
- class-CL_GUI_HTML_VIEWER
...

The page continues for another 500+ lines: the rest of the dependency list, functional scope, input/output mapping, form analysis, external dependencies, performance, error handling, bug candidates, and (this object reached L2) the full functional and process analysis, every claim pinned to the exact source lines or expert/research evidence that proves it.

Why not just RAG?

RAG retrieves raw code at query time and re-derives understanding on every single question, paying the tokens, the latency and the hallucination risk again each time, and keeping nothing. abap_wiki compiles understanding once: the analysis is verified by a fail-closed adversarial gate, every claim is anchored to source lines, and what agents consume afterwards are pre-verified, citable pages. Retrieval stops being similarity search over raw ABAP and becomes navigation of a trusted graph. Honestly: for a small codebase and one-off questions, plain RAG (or just pasting the source) is enough. This engine earns its keep on systems that get interrogated for years.

Measurable value

The token saving is not just claimed: it is measurable. A bundled example KB demonstrates it without real data:

.venv\Scripts\python core/src/tools/pipeline.py token-metrics demo

For the example (examples/token-saving/), a curated wiki page costs ~68% fewer tokens than the raw source plus the context of the tables it uses (~3.1x more compact). On a real KB the same measurement is taken from the DB with token-metrics measure --object <slug> / token-metrics all. Method and honesty of the estimate: examples/token-saving/README.md.

What to expect on real data

The ~68% of the demo is the potential at steady state on a mature KB, not a per-page guarantee. Measured on a real production system (first gated L1 batch, 2026-07): a 1,450-line program compressed 1.7x (−39.7% tokens); seven DDIC structures of 7-21 lines came out slightly larger than their DDL (−1.4% net across the batch), because the analysis adds knowledge the raw code does not contain (field dictionary, bug catalogue, input/output mapping), each fact anchored to [VERIFIED: path:N-M]. Large multi-include objects compress clearly (measured ~2x on a real 15-file program); at L2/L3 compression dominates again. And even where the token count does not drop, the value per token grows: the verification has been done once, by an adversarial gate, so the next agent neither re-reads nor re-validates the source.

Choosing the models: a measured benchmark

Which Claude models should run the pipeline? Instead of guessing, this repository ships the measurement: the full L0→L1→L2 ingest of the 153k-line abapGit standalone program, executed seven times with different author/judge pairings, with every token, retry, gate verdict and final page committed as evidence (demo/model-comparison/).

Tokens are the runner's per-subagent totals (estimates, include tool traffic). "tokens" = every author pass + every judge round until ACCEPT.

configL1 tokenswallauthor attemptsformat retriesjudge roundsfinal claims (supported/partial)deps confirmed
haiku-haiku~344k¹26 min213 (REVERT, BLOCKED, ACCEPT)20 (20/0)33/33²
sonnet-sonnet~1,043k77 min323 (REVERT, REVERT, ACCEPT)27 (26/1)33/33
sonnet-haiku~423k38 min112 (BLOCKED, ACCEPT)21 (21/0)21/21
opus-opus~267k25 min111 (ACCEPT)19 (18/1)14/14
opus-sonnet~311k25 min111 (ACCEPT)29 (23/6)13/13
fable-fable~252k26 min101 (ACCEPT)38 (34/4)17/17
fable-opus~249k26 min101 (ACCEPT)33 (31/1+1 medium-rejected)27/27

Headline findings:

  • The strongest author is the cheapest author. First-try artifacts avoid the retry loop that dominates cost: the frontier authors landed first-round gate ACCEPTs while the mid-tier same-model pair burned 2.5x the frontier authors' total on REVERT churn.

  • The judge belongs one tier below the author. Cross-model independence is preserved, cost drops, and in these runs no real error slipped through.

  • A weak pair is a weaker guarantee, not just a cheaper run. The haiku-haiku config completed, but its gate let a real classification defect reach the page.

Full tables, per-run artifacts, the metrics glossary and the critical limits of a one-run-per-config benchmark: demo/model-comparison/README.md.

What abap_wiki on Obsidian looks like

The knowledge base is pure Markdown with wikilinks [[...]]: it can be read with any editor or directly on GitHub. For graphical navigation (dependency graph, backlinks, interactive search) the recommended viewer is Obsidian. Note that abap_wiki/ does not exist on a fresh clone: it is created by your first ingest-l0 run. To see a vault immediately, open the bundled example examples/token-saving/abap_wiki/ in Obsidian. Alternatives compatible with wikilinks: VS Code + Foam, Logseq.

Image: The bundled synthetic example as an Obsidian dependency graph: the program node linked to the standard SAP tables (MARA/MARC/MARD) and classes (CL_SALV_TABLE/CL_BCS) it uses

Query the knowledge base

Once the wiki exists, at any level, you point an agent at it and ask. The /query command pulls the wiki pages relevant to your question and answers in detail, every claim backed by the engine's verification across all phases. It can optionally extend the answer to the live SAP system through an MCP connector (strongly recommended: vscode_abap_remote_fs, used here read-only by agent contract, not by a limitation of the connector itself), always citing wiki vs. system.

Getting started

Prerequisites:

  • Python >= 3.11 (required and verified by doctor.py; the lockfile assumes it).

  • Git. On Windows, the pre-commit hook is a /bin/sh script: a POSIX sh shell is required, included in Git for Windows / Git Bash (or WSL), for it to run (it is fail-open anyway: if absent, it does not block raw commits).

  • An agentic coding runner (Claude Code or Codex CLI) with LLM access, to drive L1/L2. L0 is deterministic and free: no LLM touches it. L1/L2 consume LLM tokens, and the adversarial judge intentionally runs on a different model than the author. Canonical reference for models and costs: core/docs/11-agent-runtime-and-cost.md.

  • Windows + MAX_PATH: clone the repo into a short path (e.g. C:\src\abap_wiki) and run git config core.longpaths true to avoid the MAX_PATH error (~260 characters); the slug warns beyond SLUG_WARN_LENGTH=120 (core/src/tools/slugs.py). Details: core/docs/05-runbook.md §7.

  • Obsidian (optional): the recommended graphical viewer for the wiki once it exists, download it from obsidian.md. See What abap_wiki on Obsidian looks like. Not required to run L0/L1/L2: the vault is plain Markdown, readable with any editor or directly on GitHub.

1. Bootstrap. From the repository root.

On Windows:

.\scripts\bootstrap.ps1

On Linux/macOS:

sh scripts/bootstrap.sh

The bootstrap creates .venv, installs dependencies from core/src/requirements.lock.txt, configures git config core.hooksPath core/githooks, prepares raw/tadir/, raw/system-library/, and the abap_wiki/ vault, and verifies encoding, agent sync, slice registry, lint, and tests. .venv, the runtime DB, and outputs remain local and are ignored by Git.

Try it first: no SAP system needed. One command runs the whole deterministic pipeline on a bundled synthetic package and generates a browsable vault in an isolated workspace (output/demo/workspace/, nothing of yours is touched):

.\scripts\demo.ps1     # Windows
sh scripts/demo.sh     # Linux/macOS

What it builds and why the dataset looks like a real export: examples/demo-system/README.md.

2. Export your SAP data. After the bootstrap, copy your SAP exports into the immutable inbox raw/ (do not place credentials, tokens, or local config in tracked data; the .gitattributes rule raw/** -text preserves bytes, hashes, and line numbers):

  1. Extract the TADIR from SAP GUI with SE16N, table TADIR, filter OBJ_NAME = Z*, then export to .xlsx and save to raw/tadir/.

  2. Download the custom ABAP sources with marcellourbani/vscode_abap_remote_fs, configuring the SAP system connection in VS Code and using right-click -> download on the custom package.

  3. Copy the downloaded content to raw/system-library/, preserving the folder structure produced by the tool.

The source files must follow the object-as-file naming convention born with abapGit (ZFOO.prog.abap, .clas.abap, .fugr.abap, ...): ABAP FS produces it automatically, and the engine relies on it to bind each TADIR object to its source. Because the engine never talks to SAP directly, any system that can provide these two inputs works, S/4HANA or ECC alike: ABAP FS needs the ADT services (NetWeaver 7.31+, so most ECC 6.0 EhP6+ landscapes qualify), and on older kernels abapGit or a manual download with the same naming convention works too.

Driving these two downloads directly from ABAP FS (tools abap_download and execute_data_query) is documented in core/docs/14-abap-fs-integration.md.

Complete guide for obtaining SAP inputs: core/docs/09-first-clone-and-sap-input-guide.md.

3. Run the pipeline (L0 data bootstrap). Run after copying TADIR and sources.

On Windows:

.venv\Scripts\python core/src/tools/pipeline.py init-db
.venv\Scripts\python core/src/tools/pipeline.py import-tadir --file raw/tadir/<TADIR>.xlsx
.venv\Scripts\python core/src/tools/pipeline.py resolve-sources
.venv\Scripts\python core/src/tools/pipeline.py ingest-l0
.venv\Scripts\python core/src/tools/pipeline.py enqueue-l1
.venv\Scripts\python core/src/tools/pipeline.py progress

On Linux/macOS:

.venv/bin/python core/src/tools/pipeline.py init-db
.venv/bin/python core/src/tools/pipeline.py import-tadir --file raw/tadir/<TADIR>.xlsx
.venv/bin/python core/src/tools/pipeline.py resolve-sources
.venv/bin/python core/src/tools/pipeline.py ingest-l0
.venv/bin/python core/src/tools/pipeline.py enqueue-l1
.venv/bin/python core/src/tools/pipeline.py progress

Or run the whole L0 sequence as a single deterministic command:

.venv\Scripts\python core/src/tools/pipeline.py l0-run
.venv/bin/python core/src/tools/pipeline.py l0-run

l0-run picks the newest TADIR export in raw/tadir/ (or takes --file) and stops at the first failing step. No LLM is involved: L0 stays fully deterministic end to end.

4. Run L1 and beyond. abap_wiki/ now exists: open it as an Obsidian vault. Drive L1 and L2 with the agent skills in .agents/skills/ and .claude/skills/ (the autonomous loop is documented in core/docs/07-autonomous-loop.md), and query with /query. The L1/L2 gate is fail-closed: no promotion without an ACCEPT verdict.

Template verification

The template stays downloadable, readable, and verifiable by a new user. Canonical checks:

.venv\Scripts\python core/src/tools/check_encoding.py --check
.venv\Scripts\python core/src/tools/check_headers.py --check
.venv\Scripts\python core/src/tools/doctor.py
.venv\Scripts\python core/src/tools/sync_agents.py --check
.venv\Scripts\python core/src/tools/pipeline.py slices-registry --check
.venv\Scripts\python core/src/tools/lint_wiki.py --check
.venv\Scripts\python -m pytest core/src/test/unit_tests -q

check_headers.py enforces on every engine code file (excluding raw/) a three-part context header (What it does: / How it works: / Connections:) that gives an AI agent the full context of the file; --fix creates any missing headers. On a fresh clone doctor.py reports the missing DB as WARN: normal until pipeline.py init-db has run.

How it works

  • Levels: L0 (inventory) → L1 (verified code analysis) → L2 (functional & process); one page per object.

  • Adversarial gate: an independent agent re-reads the code; fail-closed, no promotion without proof.

  • Slice: the unit of L2 work, a functional view of a process, owned by a real person.

  • Graph as source of truth: dependencies live in the DB; indexes/backlinks are projections, so they never drift.

Full architecture: core/docs/00-architecture.md (also 02-adversarial-gate.md, 03-l2-process.md).

Documentation (core/docs)

  • 00-architecture.md: the two planes (data/engine), SQLite as source of truth.

  • 01-pipeline-l0-l1.md: the L0/L1 pipeline (states, concurrency, loop resume).

  • 02-adversarial-gate.md: L1 fail-closed adversarial gate plus retroactive audit.

  • 03-l2-process.md: the L2 process (functional auto-research per slice, real owner).

  • 04-lessons-learned.md: design principles and inviolable engine guardrails.

  • 05-runbook.md: operational runbook covering setup, L1 loop, monitoring, roadmap, risks.

  • 06-testing-and-quality.md: engine tests and quality (unit tests, regression, invariants).

  • 07-autonomous-loop.md: autonomous L1 loop with operational instructions for the agent.

  • 08-structured-vs-narrative-sections.md: structural vs narrative L1 sections.

  • 09-first-clone-and-sap-input-guide.md: first-clone guide and SAP input.

  • 10-roadmap.md: roadmap and future directions (L3, rebuild-from-wiki).

  • 11-agent-runtime-and-cost.md: agent runners, the author/judge model split, and per-object/per-batch cost measured on a real batch, not estimated.

  • 12-faq-and-troubleshooting.md: first-hour failures a newcomer actually hits (bootstrap, TADIR import, agent-runner setup) with the fix for each, all observed on a real fresh-clone onboarding.

  • 13-improving-the-engine.md: the observe-then-fix loop for engine work: run on real cases end to end, log problems without fixing mid-run, then fix and reprocess with full regression checks.

  • 14-abap-fs-integration.md: provisioning and feeding an instance from ABAP FS (release-zip wizard, TADIR/source download via ABAP FS tools, l0-run, runner setup including Copilot), per issue #473.

  • 15-headless-l1-runner.md: the l1-run headless L1 loop (direct LLM API calls, no chat runner, cron/CI-friendly), configuration and exit codes.

Agents

  • Codex: AGENTS.md, .agents/agents/, .agents/skills/.

  • Claude: CLAUDE.md, .claude/agents/, .claude/skills/, .claude/commands/.

  • Copilot (VS Code): .github/agents/*.agent.md (custom agents projected from the same canonical contracts; set each agent's model: line to the VS Code model of your choice; it is the only hand-editable line, and the drift check ignores it). Copilot agent mode reads the skills from .agents/skills/ natively and loads AGENTS.md via the chat.useAgentsMdFile setting.

  • Headless (l1-run): no agentic runner required, direct LLM API calls instead - schedulable from cron/CI. See core/docs/15-headless-l1-runner.md.

The canonical contracts live in core/src/agentic/programs/ and are synchronised with:

.venv\Scripts\python core/src/tools/sync_agents.py
.venv\Scripts\python core/src/tools/sync_agents.py --check
.venv\Scripts\python core/src/tools/sync_agents.py --target <workspace>

--target exports the Copilot agents to a VS Code workspace outside this repo, for the case where the folder open in the editor is not the wiki instance (see core/docs/14-abap-fs-integration.md).

Do not manually edit the copies in .agents/agents/ or .claude/agents/.

Structure

raw/          immutable inbox: TADIR, ABAP sources, functional documents
abap_wiki/    Markdown/Obsidian vault generated by the pipeline (created at runtime)
slices/       L2 functional process working area
state/        local pipeline state; regenerable exports (created at runtime)
output/       ephemeral artefacts ignored by Git (created at runtime)
core/         engine: Python CLI, agents, DB schema, tests, docs
templates/    analysis templates per object type
scripts/      bootstrap and onboarding checks

Optional: live SAP via MCP

The engine works locally on the files in raw/; no connection to SAP is required to build the knowledge base from the sources you provide. But starting from custom code, the engine inevitably reaches the standard SAP objects your code calls, extends, or depends on, and L1 analysis of a standard object needs its source. If you downloaded only the custom packages into raw/system-library/, two options:

  1. Find out which standard packages are touched, download their sources into raw/system-library/ as well, and run L1 on them like any other object.

  2. Use an MCP connector (marcellourbani/vscode_abap_remote_fs) so an agent can retrieve what it needs from the live system (the source to analyse, a where-used, a current value), always citing "wiki vs. system". The connector itself also supports writing; abap_wiki's agents never do, by contract (see the agent files' MCP tool whitelist). Set it up following the official documentation: https://marcellourbani.github.io/vscode_abap_remote_fs/. Keep your local MCP configuration out of version control, and never commit credentials, internal hosts, or tokens.

Why I built this

I've worked on SAP, writing ABAP, for years, across many different systems. Missing documentation wasn't the exception; it was the pattern. Every single time.

I started abap_wiki because I was tired of that pattern, and because this agentic wave of AI genuinely energizes me: honestly, it feels like it handed me superpowers. I spent months building it on my own, for the sheer excitement of seeing how far the idea could go.

Today it earns its keep: it lets me close that documentation gap fast and navigate sprawling programs that a dozen different developers have touched over the years.

There's a bigger reason too. The SAP ecosystem is closed, and we ABAP developers have often worked with our hands tied compared to colleagues in other languages: Git workflows, modern IDEs, the tooling everyone else takes for granted. Very few fully open-source projects have tried to close that gap; abapGit broke that ground first. Now the agentic phase has brought a massive new wave of energy to ABAP: a surge of MCP servers (including, recently, SAP's official one; though I genuinely recommend Marcello Urbani's open-source vscode_abap_remote_fs; it's simply better, with far more features). I want to ride that wave, hard. abap_wiki is how.

Inspirations

  • Andrej Karpathy's llm-wiki (gist): repository/wiki as persistent memory for agents, instead of rebuilding context every turn.

  • Andrej Karpathy's autoresearch: an autonomous research loop (the agent plans experiments, runs them, iterates on the results) that inspired the shape of L2's auto-research loop.

  • Marcello Urbani's vscode_abap_remote_fs: navigable access to SAP objects via the ABAP remote filesystem, VS Code, and MCP.

  • abapGit: the project that first made ABAP objects live as files. Its serializers did the heavy lifting of mapping every TADIR object type to a file representation with its own extension (.prog.abap, .clas.abap, .fugr.abap, ...); ABAP FS extracts sources in that same convention, and this engine consumes them. Three layers of open source, each standing on the previous one.

What is not included

Real SAP data; the runtime DB state/abap_wiki.db; real exports/dumps in state/exports/; run outputs and reports in output/; local MCP config .mcp.json; .venv; the Git history of the source repository.

License

Distributed under the MIT License. See LICENSE. © 2026 Luigi Venturino.

346 files · 335 not served here

Advantages

  • Every claim is anchored to specific source lines or evidence, ensuring high reliability. evidence: README.md
  • The adversarial gate ensures that documentation is only promoted if it passes independent verification. evidence: README.md
  • 100% local operation ensures data privacy and security for enterprise systems. evidence: README.md
  • Significantly reduces token usage by providing pre-compiled, verified knowledge. evidence: README.md

Limitations

  • Requires manual export of SAP TADIR and source code to the raw inbox. evidence: README.md
  • L2 functional analysis requires a human-in-the-loop process owner to define slices. evidence: README.md
  • The system is designed for systems that can provide TADIR and source exports, typically NetWeaver 7.31+. evidence: README.md

Security

Risk level: Medium risk

This brain runs

Agent instructions that run or fetch something (114)

  • .agents/skills/capture-answer/SKILL.md: git add slices/<slice-id> state/ && git commit -m "L2 <slice-id>: expert answers"
  • .agents/skills/ingest-l0/SKILL.md: All commands must be run from the repo root with the venv active.
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py init-db
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py import-tadir --file raw/tadir/<most recent TADIR>.XLSX
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py resolve-sources
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py ingest-l0 # all
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py ingest-l0 --partition ZPACKAGE # one package
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py enqueue-l1
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py progress
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py export-excel
  • .agents/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py git-commit --message "ingest L0: <export>"
  • .agents/skills/ingest-l1/SKILL.md: **author** = sub-agent `abap-analyzer` (raw-only): reads the source and writes `output/runs/<run>/<task>/author.yaml` (anchored claims + dependencies).
  • .agents/skills/ingest-l1/SKILL.md: Generate `run_id = run-<timestamp>` and `batch_id = b-<timestamp>` at the start of each round.
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py recover
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py claim --kind l1_author --limit 12 --worker <run_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py submit-author --task <task_id> --run <run_id> --batch <batch_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py claim --kind l1_deepcheck --limit 12 --worker <run_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py submit-verdict --task <task_id> --run <run_id> --batch <batch_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py apply --run <run_id> --batch <batch_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py project
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py export-excel
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py git-commit --message "ingest L1 batch <batch_id>" --batch <batch_id>
  • .agents/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py progress --json
  • .agents/skills/ingest-l1/SKILL.md: 2) Generate RUN=run-<timestamp> and BATCH=b-<timestamp>.
  • .agents/skills/ingest-l1/SKILL.md: 3) python core/src/tools/pipeline.py claim --kind l1_author --limit 10 --worker $RUN --run $RUN --batch $BATCH --package ZPACKAGE
  • .agents/skills/ingest-l1/SKILL.md: sap_name, sap_type, devclass, raw_source_path and artifact_path=output/runs/$RUN/<task_id>/author.yaml.
  • .agents/skills/ingest-l1/SKILL.md: On return from each: python core/src/tools/pipeline.py submit-author --task <task_id> --run $RUN --batch $BATCH
  • .agents/skills/ingest-l1/SKILL.md: (if the agent fails: submit-author --task <id> --run $RUN --batch $BATCH --fail "msg").
  • .agents/skills/ingest-l1/SKILL.md: 5) python core/src/tools/pipeline.py claim --kind l1_deepcheck --limit 10 --worker $RUN --run $RUN --batch $BATCH --package ZPACKAGE
  • .agents/skills/ingest-l1/SKILL.md: For EACH task IN PARALLEL: Task(subagent_type="abap-deepcheck") passing prompt_path=output/runs/$RUN/<author_task_id>/deepcheck-prompt.txt
  • .agents/skills/ingest-l1/SKILL.md: and verdict_path=output/runs/$RUN/<deepcheck_task_id>/deepcheck.json (author_task_id is the latest l1_author task for the object).
  • .agents/skills/ingest-l1/SKILL.md: On return: python core/src/tools/pipeline.py submit-verdict --task <deepcheck_task_id> --run $RUN --batch $BATCH
  • .agents/skills/ingest-l1/SKILL.md: 6) python core/src/tools/pipeline.py apply --run $RUN --batch $BATCH
  • .agents/skills/lint-audit/SKILL.md: python core/src/tools/lint_wiki.py
  • .agents/skills/lint-audit/SKILL.md: python core/src/tools/sync_agents.py --check
  • .agents/skills/lint-audit/SKILL.md: If drift is found, regenerate with `python core/src/tools/sync_agents.py`.
  • .agents/skills/lint-audit/SKILL.md: python core/src/tools/pipeline.py dashboard
  • .agents/skills/query/SKILL.md: python core/src/tools/pipeline.py progress --json
  • .agents/skills/query/SKILL.md: python core/src/tools/pipeline.py log-op --type query --note "<question summary>" [--package <DEVCLASS>]
  • .agents/skills/research-l2/SKILL.md: Prerequisite: `slice-init` already run (the slice has membership + real owner).
  • .agents/skills/research-l2/SKILL.md: git add slices/<slice-id> state/ && git commit -m "research L2 <slice-id>"
  • .agents/skills/slice-init/SKILL.md: git add slices/<slice-id> state/ && git commit -m "slice <slice-id>: init + membership"
  • .claude/agents/abap-analyzer.md: For every invocation **write a file** in YAML at the `artifact_path` received in the prompt (typically `output/runs/<run>/<task>/author.yaml`).
  • .claude/agents/abap-analyzer.md: description: "Trial run without update"
  • .claude/agents/abap-functional-gate.md: You run in a **separate session** from the author.
  • .claude/skills/capture-answer/SKILL.md: git add slices/<slice-id> state/ && git commit -m "L2 <slice-id>: expert answers"
  • .claude/skills/ingest-l0/SKILL.md: All commands must be run from the repo root with the venv active.
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py init-db
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py import-tadir --file raw/tadir/<most recent TADIR>.XLSX
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py resolve-sources
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py ingest-l0 # all
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py ingest-l0 --partition ZPACKAGE # one package
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py enqueue-l1
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py progress
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py export-excel
  • .claude/skills/ingest-l0/SKILL.md: python core/src/tools/pipeline.py git-commit --message "ingest L0: <export>"
  • .claude/skills/ingest-l1/SKILL.md: **author** = sub-agent `abap-analyzer` (raw-only): reads the source and writes `output/runs/<run>/<task>/author.yaml` (anchored claims + dependencies).
  • .claude/skills/ingest-l1/SKILL.md: Generate `run_id = run-<timestamp>` and `batch_id = b-<timestamp>` at the start of each round.
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py recover
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py claim --kind l1_author --limit 12 --worker <run_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py submit-author --task <task_id> --run <run_id> --batch <batch_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py claim --kind l1_deepcheck --limit 12 --worker <run_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py submit-verdict --task <task_id> --run <run_id> --batch <batch_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py apply --run <run_id> --batch <batch_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py project
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py export-excel
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py git-commit --message "ingest L1 batch <batch_id>" --batch <batch_id>
  • .claude/skills/ingest-l1/SKILL.md: python core/src/tools/pipeline.py progress --json
  • .claude/skills/ingest-l1/SKILL.md: 2) Generate RUN=run-<timestamp> and BATCH=b-<timestamp>.
  • .claude/skills/ingest-l1/SKILL.md: 3) python core/src/tools/pipeline.py claim --kind l1_author --limit 10 --worker $RUN --run $RUN --batch $BATCH --package ZPACKAGE
  • .claude/skills/ingest-l1/SKILL.md: sap_name, sap_type, devclass, raw_source_path and artifact_path=output/runs/$RUN/<task_id>/author.yaml.
  • .claude/skills/ingest-l1/SKILL.md: On return from each: python core/src/tools/pipeline.py submit-author --task <task_id> --run $RUN --batch $BATCH
  • .claude/skills/ingest-l1/SKILL.md: (if the agent fails: submit-author --task <id> --run $RUN --batch $BATCH --fail "msg").
  • .claude/skills/ingest-l1/SKILL.md: 5) python core/src/tools/pipeline.py claim --kind l1_deepcheck --limit 10 --worker $RUN --run $RUN --batch $BATCH --package ZPACKAGE
  • .claude/skills/ingest-l1/SKILL.md: For EACH task IN PARALLEL: Task(subagent_type="abap-deepcheck") passing prompt_path=output/runs/$RUN/<author_task_id>/deepcheck-prompt.txt
  • .claude/skills/ingest-l1/SKILL.md: and verdict_path=output/runs/$RUN/<deepcheck_task_id>/deepcheck.json (author_task_id is the latest l1_author task for the object).
  • .claude/skills/ingest-l1/SKILL.md: On return: python core/src/tools/pipeline.py submit-verdict --task <deepcheck_task_id> --run $RUN --batch $BATCH
  • .claude/skills/ingest-l1/SKILL.md: 6) python core/src/tools/pipeline.py apply --run $RUN --batch $BATCH
  • .claude/skills/ingest-l1/SKILL.md: Re-claiming reuses the same task id (and the same `output/runs/<run>/<task_id>/author.yaml` path), so a fixed artifact is picked up as-is.
  • .claude/skills/lint-audit/SKILL.md: python core/src/tools/lint_wiki.py
  • .claude/skills/lint-audit/SKILL.md: python core/src/tools/sync_agents.py --check
  • .claude/skills/lint-audit/SKILL.md: If drift is found, regenerate with `python core/src/tools/sync_agents.py`.
  • .claude/skills/lint-audit/SKILL.md: python core/src/tools/pipeline.py dashboard
  • .claude/skills/query/SKILL.md: python core/src/tools/pipeline.py progress --json
  • .claude/skills/query/SKILL.md: python core/src/tools/pipeline.py log-op --type query --note "<question summary>" [--package <DEVCLASS>]
  • .claude/skills/research-l2/SKILL.md: Prerequisite: `slice-init` already run (the slice has membership + real owner).
  • .claude/skills/research-l2/SKILL.md: git add slices/<slice-id> state/ && git commit -m "research L2 <slice-id>"
  • .claude/skills/slice-init/SKILL.md: git add slices/<slice-id> state/ && git commit -m "slice <slice-id>: init + membership"
  • AGENTS.md: Before delivering changes to the engine/template, run:
  • AGENTS.md: python core/src/tools/check_encoding.py --check
  • AGENTS.md: python core/src/tools/check_headers.py --check
  • AGENTS.md: python core/src/tools/doctor.py
  • AGENTS.md: python core/src/tools/sync_agents.py --check
  • AGENTS.md: python core/src/tools/pipeline.py slices-registry --check
  • AGENTS.md: python core/src/tools/lint_wiki.py --check
  • AGENTS.md: python -m pytest core/src/test/unit_tests -q
  • AGENTS.md: (b) a **pre-commit hook** (`core/githooks/pre-commit`, active via `git config core.hooksPath core/githooks`) covers raw `git commit` commits **outside** the pipeline: it regenerates and stages `log.md` before the commit (fail-open if the interpreter/DB is missing).
  • AGENTS.md: This way `log.md` stays aligned with the `events` both with `pipeline.py git-commit` and with a manual `git commit`.
  • AGENTS.md: `ingest`: one entry per L1 batch (applied/revert/blocked/dependency counts, commit, run) + the **per-object list** of applied/revert/blocked (reconstructed from the events;
  • AGENTS.md: `lint`: every run of `lint_wiki.py` (issues/pages), auto-emitted;
  • AGENTS.md: Bootstrap/utility sub-commands: `init-db`, `migrate`, `import-tadir`, `resolve-sources`, `ingest-l0`, `enqueue-l1`, `progress`, `l0-run` (one-shot deterministic L0 sequence, no LLM), `l1-run` (headless L1 loop via direct LLM calls, config llm-profiles.yaml), `slices-registry`, `check-h …[+104 chars]
  • CLAUDE.md: Before delivering changes to the engine/template, run:
  • CLAUDE.md: python core/src/tools/check_encoding.py --check
  • CLAUDE.md: python core/src/tools/check_headers.py --check
  • CLAUDE.md: python core/src/tools/doctor.py
  • CLAUDE.md: python core/src/tools/sync_agents.py --check
  • CLAUDE.md: python core/src/tools/pipeline.py slices-registry --check
  • CLAUDE.md: python core/src/tools/lint_wiki.py --check
  • CLAUDE.md: python -m pytest core/src/test/unit_tests -q
  • CLAUDE.md: (b) a **pre-commit hook** (`core/githooks/pre-commit`, active via `git config core.hooksPath core/githooks`) covers raw `git commit` commits **outside** the pipeline: it regenerates and stages `log.md` before the commit (fail-open if the interpreter/DB is missing).
  • CLAUDE.md: This way `log.md` stays aligned with the `events` both with `pipeline.py git-commit` and with a manual `git commit`.
  • CLAUDE.md: `ingest`: one entry per L1 batch (applied/revert/blocked/dependency counts, commit, run) + the **per-object list** of applied/revert/blocked (reconstructed from the events;
  • CLAUDE.md: `lint`: every run of `lint_wiki.py` (issues/pages), auto-emitted;
  • CLAUDE.md: Bootstrap/utility sub-commands: `init-db`, `migrate`, `import-tadir`, `resolve-sources`, `ingest-l0`, `enqueue-l1`, `progress`, `l0-run` (one-shot deterministic L0 sequence, no LLM), `l1-run` (headless L1 loop via direct LLM calls, config llm-profiles.yaml), `slices-registry`, `check-h …[+104 chars]

Install scripts (2)

  • scripts/bootstrap.ps1: pwsh scripts/bootstrap.ps1
  • scripts/bootstrap.sh: sh scripts/bootstrap.sh
  • Medium risk: unicode-zero-width (core/src/tools/check_headers.py:121)
  • Low risk: scripts-present (core/src/tools/check_encoding.py)
  • Low risk: scripts-present (core/src/tools/check_headers.py)
  • Low risk: scripts-present (core/src/tools/doctor.py)
  • Low risk: scripts-present (core/src/tools/lint_wiki.py)
  • Low risk: scripts-present (core/src/tools/pipeline.py)
  • Low risk: scripts-present (core/src/tools/sync_agents.py)
  • Low risk: scripts-present (scripts/bootstrap.ps1)
  • Low risk: scripts-present (scripts/bootstrap.sh)

Attribution and licence

Created by
Luigi Venturino
Declared authors
  • Luigi Venturino (declared in CITATION.cff)
Publisher
Luigi Venturino (Community)
Source
Gixsy95/abap_wiki · commit b071ebe
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Luigi Venturino.

Install from source

335 of its files are not served here, so there is no ZIP. Gixsy95/abap_wiki at b071ebe