Skip to content

Commit 9cf6fa4

Browse files
committed
docs: add AGENTS.md
Single agent-instruction file documenting the current state: structure, the vendored utility-copy model, dependencies, security notes, coding style and how to validate (abaplint + CI workflows). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MEGSbezJEiFoFubnrqATiM
1 parent cc0154c commit 9cf6fa4

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# AGENTS.md — AI Assistant Guide for abap2UI5 sql-console
2+
3+
> This file follows the cross-tool AGENTS.md convention and is the single
4+
> agent instruction file of this repository — Claude Code reads `AGENTS.md`
5+
> natively, there is no separate `CLAUDE.md`.
6+
7+
## Project Overview
8+
9+
An SQL console in the browser, built with
10+
[abap2UI5](https://github.com/abap2UI5/abap2UI5) — no Eclipse or SAP GUI needed.
11+
12+
**Language:** English — all code, comments, commit messages, PRs, issues and
13+
documentation must be in English.
14+
15+
## Package Structure
16+
17+
| Package | Content |
18+
|---|---|
19+
| `src/abap/` | The app (`z2ui5_sql_cl_*`), Open-SQL query path |
20+
| `src/native/` | Native-SQL/ADBC path (`zcl_2ui5_native_*`, `zcl_association_processor`), derived from [ZTOAD](https://github.com/marianfoo/ztoad) |
21+
| `src/abap/z2ui5_sql_cl_context` | Vendored utility copy — **see below** |
22+
| `src/abap/z2ui5_sql_cl_db` | Vendored persistence copy (reads/writes the shared `z2ui5_t_91`) |
23+
24+
## The Utility Copy Principle
25+
26+
`z2ui5_sql_cl_context` and `z2ui5_sql_cl_db` are **trimmed, renamed copies** of
27+
the abap2UI5 utility classes (`z2ui5_cl_util` / `z2ui5_cl_util_db` in the core),
28+
carrying only the methods this addon uses plus the private helpers those need.
29+
The app calls `z2ui5_sql_cl_context=>…` / `z2ui5_sql_cl_db=>…`, never
30+
`z2ui5_cl_util=>…` directly. This keeps the install dependency-free (abapGit has
31+
no dependency management). The core and the other addons use the same pattern.
32+
When a new utility method is needed, copy it from the core utility class (with
33+
its private helpers) into the context copy rather than adding a dependency.
34+
35+
## Dependencies
36+
37+
Installed alongside via abapGit; declared in the abaplint configs:
38+
39+
* [abap2UI5](https://github.com/abap2UI5/abap2UI5)
40+
* [popups](https://github.com/abap2UI5-addons/popups)
41+
* [custom-controls](https://github.com/abap2UI5-addons/custom-controls)`z2ui5_cl_cc_spreadsheet`
42+
43+
## Security
44+
45+
This is a developer tool. It runs the SQL the user enters, without an
46+
authorization check of its own; the native path uses ADBC and therefore
47+
bypasses ABAP authorizations and client separation. Before using it beyond a
48+
development system, add your own authorization checks and restrict who may run
49+
the app. See the README Todo — authorization checks and full ABAP Cloud
50+
readiness are still open.
51+
52+
## Coding Style
53+
54+
Follows the abap2UI5 core conventions (see its
55+
[AGENTS.md](https://github.com/abap2UI5/abap2UI5/blob/main/AGENTS.md)): Clean
56+
ABAP with backtick string literals and string templates (`|…{ }…|`). The
57+
`src/native/` classes are ZTOAD-derived and keep their own style
58+
(`errorNamespace` in `abaplint.jsonc` is loosened for them, with `check_syntax`
59+
excludes for their test doubles).
60+
61+
## Validation
62+
63+
Run `npx abaplint` before considering changes complete (config `abaplint.jsonc`,
64+
0 issues expected on the standard config). CI:
65+
66+
* `ABAP_STANDARD` — lint against Standard ABAP
67+
* `ABAP_CLOUD` — lint against ABAP Cloud; the `src/native/` ADBC/DDIC code is
68+
**not** ABAP-Cloud-ready, so this check has known findings there
69+
* `renaming` (`rename_test.yaml`) — namespace-rename check
70+
* `build_rename` — manual workflow that pushes a namespace-renamed branch
71+
`rename_<name>` for a parallel install
72+
73+
There is no 702 downport (the native code uses APIs unavailable at 7.02).
74+
All `.abap`/`.xml`/config files are LF-only (`.gitattributes` enforces it).

0 commit comments

Comments
 (0)