{"description":"Validate IDM formula syntax/guardrails and optionally run linter rules.","methods":{"GET":"Returns this schema + lint rule catalog.","POST":"Accepts { formula: \"{{...}}\", mode?: \"validate\"|\"lint\", options?: {...} }."},"request":{"formula":"{{if equals school_name \"A\" \"Group A\" \"uncategorized\"}}","mode":"validate","options":{"maxIfDepth":8,"maxInItems":25}},"lintRules":[{"id":"L001","title":"Non-canonical function alias","severity":"info","message":"Use canonical function names (for example: equals instead of equal).","guidance":"Run /api/idm-format with canonicalize=true."},{"id":"L002","title":"Empty fallback output in if","severity":"info","message":"if fallback is an empty string. This is valid, but verify that dropping unmatched users is intentional.","guidance":"Use an explicit fallback group if you want unmatched users to be categorized."},{"id":"L003","title":"Potentially unreachable branch (duplicate condition)","severity":"warning","message":"A later branch repeats an earlier condition in the same if-chain.","guidance":"Remove duplicates or reorder logic so each branch can execute."},{"id":"L004","title":"Potentially unreachable branch (broader condition first)","severity":"warning","message":"An earlier condition appears broader than a later one (for example A before A AND B).","guidance":"Place specific conditions before broader catch-all conditions."},{"id":"L005","title":"forEach arg3 may not be URL-encoded","severity":"warning","message":"forEach argument 3 should be URL-encoded logic (%7B%7B...%7D%7D).","guidance":"Encode the inner logic before passing it as the 3rd argument."},{"id":"L006","title":"Deep nested if-chain","severity":"info","message":"Long if-chains are harder to maintain and debug.","guidance":"Consider splitting logic into grouped rules or reviewing priority structure."},{"id":"L007","title":"Large in-list","severity":"info","message":"Large in-lists can be brittle and difficult to review.","guidance":"Consider normalizing source data or splitting into smaller logical groups."}]}