# Rule: `@namespace CUSTOM` on every new `.bl.js`

`CUSTOM` is the namespace for all customer-side mobile customizing. External customers extending the app — and anyone writing new `.bl.js` in this repo — MUST declare `@namespace CUSTOM` in the JSDoc block.

`CORE` is reserved for the shipped framework. Files under `src/` use `@namespace CORE` and are not customer-editable. A new customer `.bl.js` without `@namespace CUSTOM` compiles into CORE and collides with shipped contracts — the build either rejects it or silently overrides framework behavior.

XML contract files (`.datasource.xml`, `.bo.xml`, `.lo.xml`, `.li.xml`, `.lu.xml`, `.pr.xml`, `.ui.xml`, `.pl2.xml`) do **not** use `@namespace`. Namespace separation for those is handled by file placement and the artifact's `name=""` attribute, not by a directive.

## How to verify

`.bl.js` files declare the namespace inside the JSDoc comment block, using the `@namespace` tag alongside `@function`, `@this`, and `@kind`. Example from `src/Sales Folder/BO/LoSalesFolderCallCustomer/Mv2/LoSalesFolderCallCustomer.GetSellInsForCard.bl.js` (a CORE-shipped file — new custom files use `CUSTOM` instead):

```javascript
/**
 * @function getSellInsForCard
 * @this LoSalesFolderCallCustomer
 * @kind listobject
 * @async
 * @namespace CORE
 * @param {DomInteger} numberOfListItems
 * ...
 * @returns promise
 */
function getSellInsForCard(...) { ... }
```

For every new `.bl.js` you write, replace `@namespace CORE` with `@namespace CUSTOM`.

Template reference: `contractSnippets/` contains shipped examples of `@namespace CUSTOM` files (e.g., `contractSnippets/Plugins/ComplexPricingEngine/MyUserExitComplexPricingEngine.*.bl.js`) — these are the canonical form to copy.

## Exceptions

None for `.bl.js`. A `.bl.js` file without `@namespace CUSTOM` is either a framework file (do not modify) or a bug (report it).
