Skip to content

Interface: RulesNode ​

Defined in: ast/rules-node.ts:11

Passive AST node representing a rule registry (P.rules(id)) combining always-on global rules and conditional scoped rules.

Pins globalRules in the static system prompt (or Turn-0 context when absent from prefixGroup) and dynamically evaluates scopedRules against active partitions and tool effects.

Properties ​

PropertyModifierTypeDescriptionDefined in
globalRulesreadonlyreadonly SourceValue< | { directive: string; id: string; } | readonly object[]>[]Ordered list of inline or source-backed global rules pinned in the system prompt.ast/rules-node.ts:17
idreadonlystringUnique identifier of the rules registry.ast/rules-node.ts:15
scopedRulesreadonlyreadonly ( | ScopedRuleNode | SourceValue< | { checks: BuiltInCheckASTNode<unknown>[]; directive: string; id: string; when: { effects?: FsGlobMatcherNode; partitions: string[]; }; } | readonly object[]>)[]Ordered list of inline ScopedRuleNode definitions or source-backed scoped rule collections.ast/rules-node.ts:19
typereadonly"harness:rules"Discriminant identifying a rules registry AST node.ast/rules-node.ts:13

Released under the MIT License.