# gixsy95/abap_wiki architecture

> Architecture diagram of the GitHub repository gixsy95/abap_wiki, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gixsy95/abap_wiki
- Repository: https://github.com/gixsy95/abap_wiki

## Overview

abap_wiki is a local agent-driven engine for building a cited, navigable SAP knowledge base. The workflow begins with SAP inventory and exported source, proceeds through L1 code analysis and an adversarial verification gate, then supports slice-based L2 functional and process documentation with human answers and research. Accepted analyses become rendered wiki pages and a dependency graph that users can query. The README documents these stages; source-index references and excerpts support the cited tool relationships. Several capabilities are represented from documentation or the tree rather than inspected implementation details.

Main entry points: [`core/src/tools/pipeline.py`](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/pipeline.py) (Pipeline CLI), [`core/src/tools/cli_loop.py`](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_loop.py) (L1 Gate Loop), [`core/src/tools/cli_l2.py`](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_l2.py) (L2 Commands), [`core/src/tools/db.py`](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/db.py) (Pipeline Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Inventory &amp; Sources"]
  node_pipeline["Pipeline CLI<br/>[pipeline.py]"]
  node_source_resolver["Source Resolver<br/>[sources.py]"]
  node_type_catalog["SAP Types<br/>[sap_types.py]"]
  node_ddic["DDIC Metadata<br/>[ddic_metadata.py]"]
end

subgraph group_l1["L1 Analysis"]
  node_task_queue["Task Queue<br/>[claims_queue.py]"]
  node_l1_loop["L1 Gate Loop<br/>[cli_loop.py]"]
  node_headless["Headless L1<br/>[headless_l1.py]"]
  node_author_contract["Author Contracts<br/>[author_io.py]"]
  node_deepcheck["Adversarial Review<br/>[deepcheck_io.py]"]
  node_l1_apply["L1 Promotion<br/>[apply_l1.py]"]
  node_render_l1["L1 Page Renderer<br/>[render_l1.py]"]
  node_section_schema["Section Schema<br/>[section_schema.py]"]
end

subgraph group_l2["L2 Knowledge"]
  node_l2_cli["L2 Commands<br/>[cli_l2.py]"]
  node_slice_membership["Slice Membership"]
  node_l2_research["Gap Research<br/>[research_l2.py]"]
  node_functional_io["L2 Validation<br/>[functional_io.py]"]
  node_l2_apply["L2 Promotion<br/>[apply_l2.py]"]
end

subgraph group_platform["Knowledge Platform"]
  node_state_db[("Pipeline Database<br/>[db.py]")]
  node_wiki_render["Wiki Renderer<br/>[render.py]"]
  node_graph["Dependency Graph<br/>[graph_project.py]"]
  node_mcp["Standards MCP<br/>[mcp_standards.py]"]
  node_excel["Excel Export<br/>[export_excel.py]"]
  node_oplog["Run Log<br/>[oplog.py]"]
  node_gitops["Git State<br/>[gitops.py]"]
  node_slugs["SAP Slugs<br/>[slugs.py]"]
  node_lint["Wiki Lint<br/>[lint_wiki.py]"]
end

node_user(("SAP Engineer"))
node_sap_export["SAP Exports"]
node_agent(("LLM Agent"))

node_user -.->|"provides inventory"| node_sap_export
node_sap_export -.->|"supplies inputs"| node_pipeline
node_user -.->|"runs commands"| node_pipeline
node_pipeline -->|"resolves sources"| node_source_resolver
node_pipeline -->|"classifies objects"| node_type_catalog
node_pipeline -->|"records inventory"| node_state_db
node_pipeline -.->|"ingests metadata"| node_ddic
node_pipeline -->|"dispatches L1"| node_l1_loop
node_pipeline -->|"dispatches L2"| node_l2_cli
node_l1_loop -->|"queues claims"| node_task_queue
node_headless -->|"drives gate"| node_l1_loop
node_headless -->|"requests analysis"| node_agent
node_l1_loop -->|"validates authoring"| node_author_contract
node_l1_loop -->|"checks verdicts"| node_deepcheck
node_l1_loop -->|"updates state"| node_state_db
node_l1_loop -->|"promotes accepted"| node_l1_apply
node_l1_apply -->|"builds page data"| node_render_l1
node_render_l1 -->|"renders pages"| node_wiki_render
node_render_l1 -->|"orders sections"| node_section_schema
node_l2_cli -->|"derives membership"| node_slice_membership
node_l2_cli -->|"submits research"| node_l2_research
node_l2_cli -->|"validates answers"| node_functional_io
node_l2_cli -->|"promotes accepted"| node_l2_apply
node_l2_research -->|"reads state"| node_state_db
node_l2_apply -->|"renders updates"| node_wiki_render
node_wiki_render -.->|"publishes knowledge"| node_user
node_graph -->|"reads objects"| node_state_db
node_graph -->|"uses page content"| node_wiki_render
node_user -.->|"queries standards"| node_mcp
node_mcp -->|"reads knowledge"| node_state_db
node_pipeline -.->|"exports results"| node_excel
node_pipeline -.->|"records operations"| node_oplog
node_pipeline -.->|"commits batches"| node_gitops
node_l1_loop -->|"names objects"| node_slugs
node_l1_loop -->|"checks wiki"| node_lint

click node_pipeline "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/pipeline.py"
click node_source_resolver "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/sources.py"
click node_type_catalog "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/sap_types.py"
click node_ddic "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/ddic_metadata.py"
click node_state_db "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/db.py"
click node_task_queue "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/claims_queue.py"
click node_l1_loop "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_loop.py"
click node_headless "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/headless_l1.py"
click node_author_contract "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/author_io.py"
click node_deepcheck "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/deepcheck_io.py"
click node_l1_apply "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/apply_l1.py"
click node_render_l1 "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/render_l1.py"
click node_section_schema "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/section_schema.py"
click node_l2_cli "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_l2.py"
click node_slice_membership "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/slice_membership.py"
click node_l2_research "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/research_l2.py"
click node_functional_io "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/functional_io.py"
click node_l2_apply "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/apply_l2.py"
click node_wiki_render "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/render.py"
click node_graph "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/graph_project.py"
click node_mcp "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/mcp_standards.py"
click node_excel "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/export_excel.py"
click node_oplog "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/oplog.py"
click node_gitops "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/gitops.py"
click node_slugs "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/slugs.py"
click node_lint "https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/lint_wiki.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_source_resolver,node_type_catalog,node_ddic toneBlue
class node_task_queue,node_l1_loop,node_headless,node_author_contract,node_deepcheck,node_l1_apply,node_render_l1,node_section_schema toneAmber
class node_l2_cli,node_slice_membership,node_l2_research,node_functional_io,node_l2_apply toneMint
class node_state_db,node_wiki_render,node_graph,node_mcp,node_excel,node_oplog,node_gitops,node_slugs,node_lint toneRose
class node_user,node_sap_export,node_agent toneIndigo
```

## Components

### Inventory & Sources

- [Pipeline CLI](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/pipeline.py): `core/src/tools/pipeline.py`
- [Source Resolver](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/sources.py): `core/src/tools/sources.py`
- [SAP Types](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/sap_types.py): `core/src/tools/sap_types.py`
- [DDIC Metadata](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/ddic_metadata.py): `core/src/tools/ddic_metadata.py`

### L1 Analysis

- [Task Queue](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/claims_queue.py): `core/src/tools/claims_queue.py`
- [L1 Gate Loop](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_loop.py): `core/src/tools/cli_loop.py`
- [Headless L1](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/headless_l1.py): `core/src/tools/headless_l1.py`
- [Author Contracts](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/author_io.py): `core/src/tools/author_io.py`
- [Adversarial Review](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/deepcheck_io.py): `core/src/tools/deepcheck_io.py`
- [L1 Promotion](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/apply_l1.py): `core/src/tools/apply_l1.py`
- [L1 Page Renderer](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/render_l1.py): `core/src/tools/render_l1.py`
- [Section Schema](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/section_schema.py): `core/src/tools/section_schema.py`

### L2 Knowledge

- [L2 Commands](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/cli_l2.py): `core/src/tools/cli_l2.py`
- [Slice Membership](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/slice_membership.py): `core/src/tools/slice_membership.py`
- [Gap Research](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/research_l2.py): `core/src/tools/research_l2.py`
- [L2 Validation](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/functional_io.py): `core/src/tools/functional_io.py`
- [L2 Promotion](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/apply_l2.py): `core/src/tools/apply_l2.py`

### Knowledge Platform

- [Pipeline Database](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/db.py): `core/src/tools/db.py`
- [Wiki Renderer](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/render.py): `core/src/tools/render.py`
- [Dependency Graph](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/graph_project.py): `core/src/tools/graph_project.py`
- [Standards MCP](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/mcp_standards.py): `core/src/tools/mcp_standards.py`
- [Excel Export](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/export_excel.py): `core/src/tools/export_excel.py`
- [Run Log](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/oplog.py): `core/src/tools/oplog.py`
- [Git State](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/gitops.py): `core/src/tools/gitops.py`
- [SAP Slugs](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/slugs.py): `core/src/tools/slugs.py`
- [Wiki Lint](https://github.com/gixsy95/abap_wiki/blob/main/core/src/tools/lint_wiki.py): `core/src/tools/lint_wiki.py`

### Other components

- **SAP Engineer**
- **SAP Exports**
- **LLM Agent**

## Connections

- SAP Engineer → SAP Exports: provides inventory (evidence: `README.md`)
- SAP Exports → Pipeline CLI: supplies inputs (evidence: `README.md`)
- SAP Engineer → Pipeline CLI: runs commands (evidence: `README.md`)
- Pipeline CLI → Source Resolver: resolves sources (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → SAP Types: classifies objects (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → Pipeline Database: records inventory (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → DDIC Metadata: ingests metadata (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → L1 Gate Loop: dispatches L1 (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → L2 Commands: dispatches L2 (evidence: `core/src/tools/pipeline.py`)
- L1 Gate Loop → Task Queue: queues claims (evidence: `core/src/tools/cli_loop.py`)
- Headless L1 → L1 Gate Loop: drives gate (evidence: `core/src/tools/headless_l1.py`)
- Headless L1 → LLM Agent: requests analysis (evidence: `core/src/tools/headless_l1.py`)
- L1 Gate Loop → Author Contracts: validates authoring (evidence: `core/src/tools/cli_loop.py`)
- L1 Gate Loop → Adversarial Review: checks verdicts (evidence: `core/src/tools/cli_loop.py`)
- L1 Gate Loop → Pipeline Database: updates state (evidence: `core/src/tools/cli_loop.py`)
- L1 Gate Loop → L1 Promotion: promotes accepted (evidence: `core/src/tools/cli_loop.py`)
- L1 Promotion → L1 Page Renderer: builds page data (evidence: `core/src/tools/apply_l1.py`)
- L1 Page Renderer → Wiki Renderer: renders pages (evidence: `core/src/tools/render_l1.py`)
- L1 Page Renderer → Section Schema: orders sections (evidence: `core/src/tools/render_l1.py`)
- L2 Commands → Slice Membership: derives membership (evidence: `core/src/tools/cli_l2.py`)
- L2 Commands → Gap Research: submits research (evidence: `core/src/tools/cli_l2.py`)
- L2 Commands → L2 Validation: validates answers (evidence: `core/src/tools/cli_l2.py`)
- L2 Commands → L2 Promotion: promotes accepted (evidence: `core/src/tools/cli_l2.py`)
- Gap Research → Pipeline Database: reads state (evidence: `core/src/tools/research_l2.py`)
- L2 Promotion → Wiki Renderer: renders updates (evidence: `core/src/tools/apply_l2.py`)
- Wiki Renderer → SAP Engineer: publishes knowledge (evidence: `README.md`)
- Dependency Graph → Pipeline Database: reads objects (evidence: `core/src/tools/graph_project.py`)
- Dependency Graph → Wiki Renderer: uses page content (evidence: `core/src/tools/graph_project.py`)
- SAP Engineer → Standards MCP: queries standards (evidence: `README.md`)
- Standards MCP → Pipeline Database: reads knowledge (evidence: `core/src/tools/mcp_standards.py`)
- Pipeline CLI → Excel Export: exports results (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → Run Log: records operations (evidence: `core/src/tools/pipeline.py`)
- Pipeline CLI → Git State: commits batches (evidence: `core/src/tools/pipeline.py`)
- L1 Gate Loop → SAP Slugs: names objects (evidence: `core/src/tools/cli_loop.py`)
- L1 Gate Loop → Wiki Lint: checks wiki (evidence: `core/src/tools/cli_loop.py`)
