From 7ecc1aa1c5ab3c452d48cd222aa2f4e170e499f1 Mon Sep 17 00:00:00 2001 From: delchev Date: Thu, 27 Aug 2026 11:20:52 +0300 Subject: [PATCH] Split CLAUDE.md into topic files under .claude/docs/ CLAUDE.md grew to a single 545-line file mixing behavioral guidelines, build/run instructions, architecture, UI gotchas, and CI reference. Split it by topic into 18 files under .claude/docs/ and turn CLAUDE.md into a slim index that inlines them via @-imports in the original order, so the assembled context is byte-identical. .gitignore gets a !.claude/docs/ entry next to the existing .claude/* exceptions so the topic files are tracked. Also extend the team permission allowlist in .claude/settings.json with read-only commands observed to prompt frequently (git fetch, gh search, mvn formatter:validate). Co-Authored-By: Claude Fable 5 --- .claude/docs/behavioral-guidelines.md | 60 +++ .claude/docs/blimpkit.md | 21 + .claude/docs/ci.md | 24 ++ .claude/docs/client-java.md | 12 + .claude/docs/conventions.md | 35 ++ .claude/docs/document-templates.md | 11 + .claude/docs/external-docs.md | 10 + .claude/docs/harmonia-ui.md | 36 ++ .claude/docs/intent-layer.md | 32 ++ .claude/docs/java-debugger.md | 46 +++ .claude/docs/messaging.md | 23 ++ .claude/docs/model-generation.md | 31 ++ .claude/docs/native-apps.md | 6 + .claude/docs/project-build-run.md | 68 ++++ .claude/docs/repository-layout.md | 21 + .claude/docs/shells.md | 37 ++ .claude/docs/synchronizer-model.md | 14 + .claude/docs/tenants.md | 52 +++ .claude/settings.json | 8 +- .gitignore | 3 +- CLAUDE.md | 559 +------------------------- 21 files changed, 568 insertions(+), 541 deletions(-) create mode 100644 .claude/docs/behavioral-guidelines.md create mode 100644 .claude/docs/blimpkit.md create mode 100644 .claude/docs/ci.md create mode 100644 .claude/docs/client-java.md create mode 100644 .claude/docs/conventions.md create mode 100644 .claude/docs/document-templates.md create mode 100644 .claude/docs/external-docs.md create mode 100644 .claude/docs/harmonia-ui.md create mode 100644 .claude/docs/intent-layer.md create mode 100644 .claude/docs/java-debugger.md create mode 100644 .claude/docs/messaging.md create mode 100644 .claude/docs/model-generation.md create mode 100644 .claude/docs/native-apps.md create mode 100644 .claude/docs/project-build-run.md create mode 100644 .claude/docs/repository-layout.md create mode 100644 .claude/docs/shells.md create mode 100644 .claude/docs/synchronizer-model.md create mode 100644 .claude/docs/tenants.md diff --git a/.claude/docs/behavioral-guidelines.md b/.claude/docs/behavioral-guidelines.md new file mode 100644 index 00000000000..488a200ee74 --- /dev/null +++ b/.claude/docs/behavioral-guidelines.md @@ -0,0 +1,60 @@ +## 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +Before implementing: +- State your assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them - don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +## 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify. + +## 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it - don't delete it. + +When your changes create orphans: +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +The test: Every changed line should trace directly to the user's request. + +## 4. Goal-Driven Execution + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: +- "Add validation" → "Write tests for invalid inputs, then make them pass" +- "Fix the bug" → "Write a test that reproduces it, then make it pass" +- "Refactor X" → "Ensure tests pass before and after" + +For multi-step tasks, state a brief plan: +``` +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. + +--- + +**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes. + diff --git a/.claude/docs/blimpkit.md b/.claude/docs/blimpkit.md new file mode 100644 index 00000000000..919a279af54 --- /dev/null +++ b/.claude/docs/blimpkit.md @@ -0,0 +1,21 @@ +## Browser UI — BlimpKit gotchas + +The IDE shell and most editor perspectives render through **BlimpKit**, a thin AngularJS-on-Fundamental-Styles component library that lives in `components/ui/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/blimpkit/` (Angular module name **`blimpKit`** — camelCase, declared in `blimpkit.js`). The runnable artifact is the bundled `/webjars/blimpkit__blimpkit/dist/blimpkit.min.js` (~158 KB, currently webjar 2.1.6). Findings below are the ones that have already burned someone — read once, save hours later. + +- **`` is invisible without ``.** `bk-checkbox` compiles to a bare ``. Fundamental-Styles' `.fd-checkbox` rule hides the native input (`opacity:0; position:absolute`) on the assumption that a sibling `` will draw the visible square via its `.fd-checkbox__checkmark` ::before pseudo. A lone `` is therefore a working click target with zero visible chrome — easy to ship and never catch in code review. Pair it: `` followed by `` (the `empty="true"` attribute drops the inner text container so the label provides just the checkmark — use it when the surrounding markup already labels the row). +- **`` has an isolate scope.** You can't put `ng-controller="…PopupCtrl"` on the dialog element itself — Angular throws "Multiple directives [bkDialog, ngController] asking for new/isolated scope on: ". Wrap with a thin `
` and put `` inside. +- **`` doesn't support `ng-options`.** Use `` instead — text via the `text` attribute, model value via `value`. Example: ``. When the select sits in a parent with `overflow:hidden` (a dialog, a sidebar), add `dropdown-fixed="true"` so the menu floats via `position:fixed` instead of being clipped. +- **``'s `text` and `value` bind differently** — `text: '@'` is **interpolation** (use `text="{{ expr }}"` or a literal), `value: '<'` is a **one-way expression** (use `value="expr"`, never `value="{{ expr }}"`). Mixing them up is the canonical bug for this directive: + - `value="{{s}}"` makes Angular try to parse `{{s}}` as a JS expression, the directive's link silently fails, and the dropdown shows raw `{{ text }}` from the unlinked template (one ghost item per ng-repeat iteration, not six). Fix: `value="s"`. + - `value="user"` evaluates `$scope.user`, not the string `"user"` — every option ends up with the same `undefined` value and selection becomes a no-op. For string literals, quote inside: `value="'user'"`. For the empty default option, `value="''"`, not `value=""` (which is the undefined-expression). + - Numeric literals (`value="2"`) and loop variables (`value="s"`) are already expressions — leave them unquoted. Numbers stay numbers, so `selectedValue === '2'` will fail; either store as numbers on the model or coerce in the controller (the refresh-interval dropdowns in `view-jvm-monitoring` / `view-jvm-threads` `parseInt` the model on read). +- **Perspective SVG icons inherit `fill` from CSS — don't hard-code `fill` on the path.** `blimpkit.css` styles `.fd-list__navigation-item i.bk-icon--svg svg` with `fill: var(--fdVerticalNav_Icon_Color, #303030)` (and `var(--sapSelectedColor)` on the active state). The CSS only takes effect on `` elements with **no own `fill`** — adding `fill="#000000"` (the default when you paste an SVG from a web icon set) locks the icon to black and breaks dark-theme adaptability. Strip the fill attribute (jobs.svg / operations.svg pattern) or set `fill="currentColor"` (database.svg pattern). The container svg's other niceties (`width="512"` / `height="512"` / `stroke-width=".99999"`) don't affect rendering through this CSS but are the established style. +- **`` / `` / `` use `replace:true`.** The attributes you write on the directive element (ng-model, ng-blur, ng-keypress, ng-disabled, custom directives like `auto-focus` / `select-text`) end up on the underlying native `` / `