Skip to content

Keep the repository directory names in one place, stop shipping AGENTS.md - #20

Merged
oblomov-dev merged 8 commits into
mainfrom
claude/repo-analysis-structure-0wpt5q
Aug 18, 2026
Merged

Keep the repository directory names in one place, stop shipping AGENTS.md#20
oblomov-dev merged 8 commits into
mainfrom
claude/repo-analysis-structure-0wpt5q

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Part of an ecosystem-wide audit of the abap2UI5 and cap2UI5 repositories.

  • The rename history was maintained twice, in two languages. lib/repos.mjs carried the legacy directory names (ai-demokit, abap2UI5-api, ai-view-check, …) and vscode-extension/src/repolayout.ts restated them as TypeScript constants, with a comment admitting it and no gate between them — so the next rename would have landed half. The list is now lib/repo-dirs.json here, and the extension consumes a generated snapshot of it with a :check drift gate and a weekly bump workflow, the same pattern it already uses for the app template and the client API.
  • scaffold_app restated the template's file list and substitutions. It now executes app-template's template.json, which is the source. Two latent bugs fell out: .gitignore was being omitted from scaffolded projects, and package.json's name was left as abap2ui5-app.
  • A tool name collided with the extension's. Both exposed run_app with different semantics — a real system versus the transpiled sandbox — and both are registered in the same window. The extension's is run_app_on_system now.
  • AGENTS.md was in files[], shipping the maintainer briefing to every installer. The server never reads it; RELEASING.md conflated an agent working on this repository with an agent driving the server, and is corrected.
  • Corpus sizes removed from two comments. They said 152 apps and 416 ports long after both moved; the arguments those comments make hold at any size, and each repository publishes its current count in a generated file. The parser note keeps its numbers because it describes a bug that happened, and now says so.
  • Added CONTRIBUTING.md.

npm ci + npm test: 54/54.


🤖 Generated with Claude Code

https://claude.ai/code/session_01PLDFPfAK1MGq6qHeC6KKWH


Generated by Claude Code

claude added 6 commits August 18, 2026 07:23
…of copying

The directory names a sibling checkout can carry were written twice: here in
lib/repos.mjs and again, by hand, in the VS Code extension's
src/repolayout.ts. Nothing gated the two against each other, so the next
repository rename would have landed in one of them and half-worked - the MCP
server finding a checkout the editor does not, or the other way round.

lib/repo-dirs.json is now the single source: per repo the directory names
(newest first), the env vars that override the guess, and the probe file that
proves a candidate really is that checkout. repos.mjs reads it; the constants
it exports are views on the JSON rather than literals, so every caller and the
existing test keep working unchanged. The extension snapshots the same file
with a drift gate, the way it already does for app-template and the client
API.

Co-Authored-By: Claude <noreply@anthropic.com>
lib/scaffold.mjs carried its own TEMPLATE_FILES and its own substitution rules
- a second answer to "what does a new project look like", next to the
template's own scripts/rename.mjs and the VS Code extension's scaffold. The
lists had already drifted: this one omitted .gitignore, so a scaffolded
project committed node_modules, and it left package.json's name at
"abap2ui5-app" while `npm run rename` rewrote it.

app-template now describes itself in template.json. scaffold() reads it out of
the checkout and executes it; a checkout without the file is reported
(scaffold_app says to pull) rather than falling back to a guess, because the
guess is the copy this removes.

Co-Authored-By: Claude <noreply@anthropic.com>
…ibed

The VS Code extension's own MCP server renamed its `run_app` to
`run_app_on_system`, because both servers are registered in one window and the
two tools mean different things - this one builds and boots the transpiled
sandbox, that one runs a class on a real system. The README's forward-looking
note still called it `run_app_system` and read as unbuilt; it exists, and the
reason for its name is worth having here.

Co-Authored-By: Claude <noreply@anthropic.com>
files[] handed AGENTS.md to every npm installer, on the reasoning that an
agent could read the contract of the thing it is driving. It cannot: that file
is written for an agent working ON this repository - how to build and verify
it, which sibling checkouts the server writes into, which maintenance traps
not to walk into again. An agent driving the server gets the tool descriptions
over the protocol and the README.

The server never reads it at runtime, so nothing else changes. RELEASING.md's
tarball inventory says so instead of describing the old one.

Co-Authored-By: Claude <noreply@anthropic.com>
Same two lines as abap2UI5/samples, plus the commands to run and the two
things a contributor here trips over first: this repo cannot work alone, and a
missing sibling checkout is an actionable message rather than a crash.

Co-Authored-By: Claude <noreply@anthropic.com>
repos.mjs said the sample catalogue holds 152 apps and samples-controls
416 ports; examples.mjs said 430 ports and 614 apps. An audit across the
ecosystem found the same two figures written five different ways, all of
them measurements somebody took once.

The sizes are not what these comments are for - they explain why the two
repositories are separate and why the catalogue parser is shaped the way
it is, and both arguments hold at any size. Each repository publishes its
current count in a generated file, which is the copy that cannot be
wrong.

The parser note keeps its numbers because it describes a bug that
happened, and says so: a dated finding gets old rather than false.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

claude added 2 commits August 18, 2026 08:29
… sibling

CI went red on a test that passes locally. `a template missing a file
reports it rather than shipping a shorter project` copies the real
`template.json` out of app-template - deliberately, so the fixture cannot
become the second copy of the file list this change removed - but unlike
the two scaffold tests next to it, it did not check that the sibling is
there. On a runner that checks out this repository alone, `cpSync` threw
ENOENT and took the whole file down with it.

It skips now, the same way and with the same message as its neighbours.

The smoke job is the other half. It clones the siblings this server
orchestrates and then runs the full test file - but it cloned only
samples-controls and linter, so all three scaffold tests skipped
themselves there. app-template is just as much a sibling this server
reads: scaffold_app serves its files and executes its template.json. It
is cloned now, so the smoke job actually covers what its name claims.

Verified both ways: with the sibling present 44 pass, without it 41 pass
and 3 skip - no failures either way.

Co-Authored-By: Claude <noreply@anthropic.com>
Cloning app-template into the smoke job turned one failure into two, and
the reason is worth writing down: the three scaffold tests guarded on
`abaplint.jsonc`, but since the file list and the substitutions moved
into `template.json`, that is the file `scaffold()` needs. Before the
clone there was no sibling at all and all three skipped; after it there
was a sibling whose main does not carry `template.json` yet, so two of
them started and then failed on a file that was not there.

A checkout that predates `template.json` is exactly that case - present,
and still unable to serve these tests. All three now say so with the same
message. Once app-template#12 lands they stop skipping and start proving
something, in this repository and in anybody's local checkout.

Verified in the shape that broke CI: a sibling without `template.json`
gives 41 pass and 3 skips, no failures; with it, 44 pass.

Co-Authored-By: Claude <noreply@anthropic.com>
@oblomov-dev
oblomov-dev merged commit 95b0208 into main Aug 18, 2026
2 checks passed
@oblomov-dev
oblomov-dev deleted the claude/repo-analysis-structure-0wpt5q branch August 18, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants