Documentation
Table of Contents

Class SubjectDescriptor

Namespace
IntentSharp.Guardrails
Assembly
IntentSharp.dll

Declares a subject: its name, the checkpoint that supplies it, and how the check treats it. The library declares the core subjects (CoreSubjects); a target or an application declares its own through Subjects or Subjects. A rule on a subject that no descriptor declares is a violation when the rule is enforced.

public sealed class SubjectDescriptor
Inheritance
object
SubjectDescriptor
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

SubjectDescriptor()

Creates a descriptor. Set at least Name and Checkpoint.

Properties

Checkpoint

The checkpoint that supplies the subject; its rules are evaluated there.

Description

What the subject holds, for people and for the model that compiles rules written as intent.

FailClosedValue

What the subject resolves to when nothing sets it: the narrowest value, such as an empty allow list, which allows nothing. Required for a security subject; also the value an edit's widening is measured from when no running rule sets the subject.

Name

The subject's name.

Required

True when every check at Checkpoint must cover the subject with an enforced rule, and the subject's value is denied unless an enforced allow rule allows it. A check that names sets leaving it uncovered is refused, and a required subject with no value, or with an unknown value, is a violation.

Security

True for a subject that guards access: a rule on it can never be detect-only (a check whose sets hold such a rule is refused), a check under an enforced rule on it where the subject has no value, or a null value, is a violation, and an edit that widens what it allows is flagged. A security subject needs a FailClosedValue.