From 0fabe88d175eb1a8b864870666c7cf9019f41535 Mon Sep 17 00:00:00 2001 From: aniket12chouhan Date: Sat, 31 Jan 2026 11:14:28 +0530 Subject: [PATCH] docs: Add best practices for NetSuite SuiteCloud deployment and comprehensive logging guidelines. --- moqui-framework/bestpractices/skills-md-prompt.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/moqui-framework/bestpractices/skills-md-prompt.md b/moqui-framework/bestpractices/skills-md-prompt.md index 28165bc2..2c485f13 100644 --- a/moqui-framework/bestpractices/skills-md-prompt.md +++ b/moqui-framework/bestpractices/skills-md-prompt.md @@ -30,6 +30,8 @@ Mandatory content to include: 13. Prefer Groovy closures over multiple iterates when it improves clarity (filter/search/sort). 14. Always use `date-filter` for entities with `fromDate`/`thruDate`. 15. If Groovy is more efficient, use a `script` tag in the XML service. +16. NetSuite SuiteCloud: validate `deploy.xml` registration for new files. +17. Log statement guidelines (levels, sensitivity, noise). The output must be a single `SKILLS.md` file with clear sections and bullet lists, covering all items above. Include any additional best practices deduced from OrderRouting and related services (examples: use-iterator for large result sets, service call error handling, transaction timeouts, semaphores, SQL templates with FTL, etc). ``` @@ -51,11 +53,19 @@ The output must be a single `SKILLS.md` file with clear sections and bullet list - Use allowed phrases (not found, missing required , invalid , not allowed, already , not eligible, missing , external call failed, no data, partial result, skipped, operation succeeded). - Log level conveys severity; do not prefix with [Error]. - Always include primary identifiers and state. +- Log levels: Error (system failure), Warn (business rule failure/expected issue), Info (success path/milestone). +- Avoid logging sensitive data (PII, credentials). +- Ensure error logs provide context (entity ID, action being attempted). ### Component dependencies - Service calls must only reference components listed in `component.xml` (plus core framework components). - If a service depends on another component, add `depends-on` first. +### NetSuite SuiteCloud Deployment +- Rule: If a new file is created (Script, XML, etc.), it MUST be registered in `deploy.xml`. +- Rule: If missing in `deploy.xml`, flag as an error. +- Rule: Suggest the required `` entry for `deploy.xml` when missing. + ### Service implementation (XML vs Groovy) - Prefer Minilang/XML actions over Groovy for services. - Use `