From iris-dev
Reviews ObjectScript code with a 10-item hard-gate checklist, flagging and correcting common AI mistakes like Quit/Return syntax, $IsObject checks, SQL table names, and %Status handling before displaying code. For IRIS >=2024.1.
npx claudepluginhub intersystems-community/iris-devThis skill uses the workspace's default tool permissions.
**Do not show ObjectScript code until this checklist passes.**
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Do not show ObjectScript code until this checklist passes.
Quit value inside For/While/Try — use Return valueQuit:key="" — NO spaces in condition, alone on its own line'$IsObject(obj) after every %OpenId before touching propertiesCatalog.Item → SQL Catalog.Item (not Catalog_Item)0 = success (falsy). Check SQLCODE = 0 not just SQLCODE& FIRST, then <, then >1.8 not 9/5. Parenthesize everything"" not $ListBuild() — $ListLength($ListBuild()) = 1$$$ISERR(sc) / $$$ThrowOnError(sc). Never return $$$OK after catching an errorIf $TLevel > 0 { TROLLBACK } — never Return inside TSTART without rollbackStorage Default { ... } in UDL — omit entirely. IRIS auto-generates storage. Writing one causes ERROR #5559 in IRIS 2025.1+.%INLIST is SQL-only. In ObjectScript method code use $ListFind(list, value) > 0. Writing Return (x %INLIST list) causes ERROR #1010.'= in SQL strings: '= is the ObjectScript not-equal operator. Inside SQL string literals, use <>. "WHERE Tags '= ''" → parser sees ' as start of SQL string.If violations found:
⚠️ ObjectScript review flagged [N] issues — correcting:
- [rule]: [wrong] → [correct]
Then show corrected code.
If clean:
✅ ObjectScript review passed.
Then show code.
// WRONG → CORRECT
Quit 0 (inside For) → Return 0
Quit:key = "" → Quit:key=""
..%OpenId(id).Prop → Set obj=..%OpenId(id) If '$IsObject(obj){...}
SELECT FROM Catalog_Item → SELECT FROM Catalog.Item
If SQLCODE { "not found" } → If SQLCODE = 100 { "not found" }
celsius * 9 / 5 + 32 → (celsius * 1.8) + 32
Set lst = $ListBuild() → Set lst = ""
// Storage / Operators:
Storage Default { <Type>...</Type> } → (omit entirely — IRIS auto-generates)
Return (tag %INLIST myList) → Return ($ListFind(myList, tag) > 0)
"WHERE Tags '= ''" → "WHERE Tags <> ''"