Welcome to CodeSanityAI - created and maintained by Sascha Wildgrube.
Use Artifical Intelligence to perform CodeSanity checks
At this point in time, consider this approach as experimental. Generative AI provides non-deterministic results. For an automated QA process, this is exactly NOT what we want.
The contained Checks can be added to Scan Suites or be used selectively. Keep in mind that every execution of a Scan Check will trigger inference with the configured LLM - which may lead to significant consumption when many Application Files are scanned against a growing number of Checks.
CodeSanityAI is NOT an officially supported ServiceNow product.
CodeSanityAI does NOT come with any kind of warranty. If you use it, you own it!
x_snc_devtools.InstallApp("x_snc_codesanityai");Exceptions must be handled (AI)
Do not use Sys IDs in scripts (AI)
Controls if the CodeSanityAI application is active.
Controls the verbosity of log output produced by the CodeSanityAI application.
This app does not add any tables.
Retrieves information about the app's dependencies to other apps and required versions.
Gets a system property of this application.
This script installs CodeSanityAI.
Sets all system properties to default values.
Sets a system property of this application.
Produces a log output in the application log using the DevTools Debug function.
Implements the extension point for DevTools.
|
Methods:
* initialize()
* GetParentRecord()
* GetLinkDirectory()
* GetFormatConfig()
* GetApplicationStatus()
* RenderDebugDump()
* GetInstancePipelineName()
The function DevToolsGetApplicationStatus is called by the DevTools extension point instance class and returns the application status object with additional status information to be displayed on the "DevTools Application Overview" page.
The DevToolsGetLinkDirectory function is called by the DevTools extension point instance class and returns an extended (or modified) link directory object that serves as the basis for the DevTools Link page.
The DevToolsGetParentRecord function is called by the DevTools extension point instance class and returns a parent record for the given record if it can be determined.
Returns true if the application is active, otherwise false.
Asks an AI whether the given code is compliant to the specified rule, returns false if not. If the result is ambiguous or the check cannot be performed, the function returns true (In dubio pro reo).
Asks an LLM based AI to check if the given code is compliant to the description in the check.
If for whatever reason the check cannot be performed, the result is true (In dubio pro reo).
Produces a log output in the application log.
Produces an error log output in the application log.
Produces a warning log output in the application log.
Compatible Versions: 2.24.0
Repository url: https://github.com/saschawildgrube/servicenow-codesanity.git
CodeSanityAI contains checks in the "CodeSanity" category which are designed to validate applications and contained source code.
Compatible Versions: 1.136.0
Repository url: https://github.com/saschawildgrube/servicenow-devtools.git
No technical debt has been documented for this application.
Copyright 2026 by Sascha Wildgrube
Licensed under the Apache License, Version 2.0 (the "License")
You may not use CodeSanityAI except in compliance with the License.
You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
First baselined version