Package-level declarations

Types

Link copied to clipboard
data class AddListItemFix(val entityId: String, val argument: String, val expression: FixExpression, val title: String = "Add ") : ModelQuickFix
Link copied to clipboard
abstract class BoundaryLinksRule<T : Any>(type: KClass<T>, val viewpoint: Viewpoint, attribute: String, boundary: String, violates: (T) -> Boolean) : ModelInventoryRule

An authored reference contradicts an explicitly excluded model boundary.

Link copied to clipboard
data class CheckCategories(val context: Boolean = true, val requirements: Boolean = true, val design: Boolean = true, val analysis: Boolean = true, val tests: Boolean = true)

Configuration for which viewpoints to check for a module.

Link copied to clipboard
data class ChooseReferenceFix(val entityId: String, val argument: String, val candidateEntityIds: List<String>, val valueKind: FixValueKind, val listArgument: Boolean = false, val title: String = "Choose ") : ModelQuickFix
Link copied to clipboard
data class CreateChildEntityFix(val ownerEntityId: String, val childKind: String, val template: String, val title: String = "Create ") : ModelQuickFix
Link copied to clipboard

Default rule sets, grouped by viewpoint.

Link copied to clipboard
abstract class DescriptionActiveVoiceRule(val viewpoint: Viewpoint) : SemanticModelRule

Shared description contract; each registration preserves its viewpoint's enablement and identity.

Link copied to clipboard
data class FixExpression(val text: String, val referencedEntityId: String? = null)

Expression inserted by a quick fix. If referencedEntityId is set, an IDE should prefer the referenced entity's source-property name over text.

Link copied to clipboard
Link copied to clipboard
abstract class ForbiddenWordsInViewpointRule(val viewpoint: Viewpoint, forbiddenWords: Set<String> = when (viewpoint) { Viewpoint.REQUIREMENTS, Viewpoint.TESTS -> DEFAULT_FORBIDDEN_WORDS else -> DEFAULT_PLACEHOLDER_WORDS }) : ModelInventoryRule

Shared string-value check; registrations retain independent viewpoint identities and settings.

Link copied to clipboard

A loader failure is an execution problem, not an unassessed automated model rule.

Link copied to clipboard

The direction of an interface use relative to the element exposing or consuming it.

Link copied to clipboard

Covers ASIL-bearing context entities beyond Elements (ports, signals, connectors, etc.).

Link copied to clipboard
data class KotlinModelArgument(val name: String?, val reference: String?)
Link copied to clipboard
data class KotlinModelDeclaration(val kind: KotlinDeclarationKind, val name: String, val qualifiedName: String, val line: Int, val offset: Int, val topLevel: Boolean, val concrete: Boolean = false, val constructedType: String? = null, val declaredType: String? = null, val superTypes: List<String> = emptyList(), val interfacePoint: String? = null, val constructorCalls: Map<String, List<KotlinModelArgument>> = emptyMap(), val constructorParameters: Set<String> = emptySet(), val memberProperty: Boolean = false)
Link copied to clipboard
data class KotlinModelSource(val path: String, val packageName: String, val declarations: List<KotlinModelDeclaration>, val imports: Map<String, String>, val typeAliases: Map<String, String>)

Physical declarations, including uninstantiated classes, shared by batch and live-source checks.

Link copied to clipboard

Selects executable findings and/or obligations requiring human or AI judgment.

Link copied to clipboard
class ModelCheckSession(scope: ModelScope, val index: ModelIndex)

One prepared model and one result per rule, shared by all inspections of a module.

Link copied to clipboard

Naming contracts concern Kotlin identifiers, not authored display names or descriptions.

Link copied to clipboard

Inventory, declaration ownership, and interface membership shared by compiled checks and live source inspections.

Link copied to clipboard

A rule that runs once against the inventory, including when a specification is absent.

Link copied to clipboard
class ModelModuleIndex<M>(inventory: ModelIndex, declarationModule: (MetamodelEntity) -> M?, logicalOwners: Map<String, M> = emptyMap())

Classifies declarations and element ownership once, including for a multi-module full-model run.

Link copied to clipboard

A check owns its subject modules and reads the complete models of their dependencies. Both compiled and PSI adapters supply their ordinary module graph; reverse dependents are deliberately outside this scope. No Gradle or IDE types belong in the rule engine.

Link copied to clipboard
data class ModelProblem(val rule: ModelRule, val severity: ProblemSeverity, val message: String, val entityName: String? = null, val sourceFile: String? = null, val sourceLine: Int? = null, val remediation: String? = null, val quickFixes: List<ModelQuickFix> = emptyList(), val kind: SarifKind = SarifKind.FAIL, val ownerElementId: String? = null, val relatedEntityIds: List<String> = emptyList(), val subjectId: String? = null, val sourceOffset: Int? = null, val remediationInventory: ModelRemediationInventory? = null, val remediationSummary: String? = null)

A rule result: a violation, pending review, unresolved assessment, or explicit disposition.

Link copied to clipboard
sealed interface ModelQuickFix

Structured model-fix metadata emitted by validation rules.

Link copied to clipboard

Editable defaults for authored references; these suggestions never assign a model's identity.

Link copied to clipboard
data class ModelRemediationInventory(val id: String, val guidance: String)

Complete candidate guidance stored once in diagnostic reports, separately from each correction.

Link copied to clipboard
interface ModelRule

A model rule dispatched by viewpoint and container type, or over ModelIndex by ModelInventoryRule.

Link copied to clipboard
data class MoveDeclarationFix(val entityId: String, val targetKind: MoveTargetKind, val title: String = "Move declaration") : ModelQuickFix
Link copied to clipboard
Link copied to clipboard
data class PromptSetArgumentFix(val entityId: String, val argument: String, val valueKind: FixValueKind, val listArgument: Boolean = false, val title: String = "Set ") : ModelQuickFix
Link copied to clipboard
data class RemoveArgumentFix(val entityId: String, val argument: String, val title: String = "Remove ") : ModelQuickFix
Link copied to clipboard
data class RemoveListItemFix(val entityId: String, val argument: String, val expression: FixExpression, val title: String = "Remove ") : ModelQuickFix
Link copied to clipboard
data class ReplaceListItemFix(val entityId: String, val argument: String, val oldExpression: FixExpression, val newExpression: FixExpression, val title: String = "Replace ") : ModelQuickFix
Link copied to clipboard
abstract class RequiredAttributeRule<T : Any>(type: KClass<T>, val viewpoint: Viewpoint, attribute: String, valueKind: FixValueKind, listArgument: Boolean = false, missing: (T) -> Boolean) : ModelInventoryRule

Required values and references have one severity policy, independent of hierarchy boundaries.

Link copied to clipboard
data class RewriteStringArgumentFix(val entityId: String, val argument: String, val template: String, val title: String = "Rewrite ") : ModelQuickFix
Link copied to clipboard

Official CREATE-rule documentation, using the existing rule ID unchanged as its anchor.

Link copied to clipboard

Decision method, independent of SarifKind and severity.

Link copied to clipboard
object RuleText

Renders rule prose (paragraphs, bullet lists and inline code) as escaped HTML for native inspection help.

Link copied to clipboard

SARIF 2.1.0 result.kind field.

Link copied to clipboard

SARIF 2.1.0 result.level field.

Link copied to clipboard

Selects evidence for engineering judgment; Kotlin emits no semantic pass or violation.

Link copied to clipboard
data class SetArgumentFix(val entityId: String, val argument: String, val expression: FixExpression, val title: String = "Set ") : ModelQuickFix
Link copied to clipboard

Marker lets live inspections check declarations even when the file creates no metamodel entities.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun runInventoryChecks(rules: List<ModelRule>, index: ModelIndex, viewpoints: Set<Viewpoint> = Viewpoint.entries.toSet(), onRuleEvaluated: (ModelRule) -> Unit = {}, reportClassificationDifferences: Boolean = index.reportClassificationDifferences): List<ModelProblem>

Runs each rule over its actual subjects; no viewpoint container is fabricated for missing specifications.

Link copied to clipboard

Runs a set of ModelRules against a viewpoint container and collects problems.

Link copied to clipboard
fun runModuleChecks(rules: List<ModelRule>, containers: Map<Viewpoint, MetamodelEntity>, categories: CheckCategories = CheckCategories()): List<ModelProblem>

Runs all rules that match the enabled categories against the given containers.

Generated with STIG