ShtukbaseStandard
collection/norms/rules.md

Rules

One checkable phrase at level MUST, SHOULD or MAY. A rule has an enforcer; a rule without an enforcer is a wish.

Page fields (7)
icon📏
itemTypeRule
items{mode: path,path: /norms/rules,recursive: true}
writeTo/norms/rules
properties{ruleId: {kind: text,label: Number,pinned: true},requirement: {kind: text,label: What must hold},level: {kind: select,label: Level,options: [{name: MUST,label: Must (MUST),color: red},{name: SHOULD,label: Should (SHOULD),color: blue},{name: MAY,label: May (MAY),color: gray}]},floor: {kind: checkbox,label: Law and safety},status: {kind: phase,contour: /norms/contours/rules,label: State},sphere: {kind: text,label: Sphere},appliesTo: {kind: text,label: Applies to},enforcers: {kind: text,label: Enforcers (paths)},plannedEnforcer: {kind: text,label: What the enforcer will be},enforcerKind: {kind: select,label: Enforcer kind,options: [{name: gate,label: Gate (check),color: green},{name: sensor,label: Sensor,color: brown},{name: hook,label: Hook,color: orange},{name: automation,label: Automation,color: blue},{name: judge,label: Judge,color: purple},{name: instruction,label: Instruction,color: gray}]},mode: {kind: select,label: Enforcer mode,options: [{name: observe,label: Watches,color: gray},{name: warn,label: Warns,color: yellow},{name: enforce,label: Blocks,color: red}]},followsFrom: {kind: text,label: Follows from},because: {kind: text,label: Why},baseline: {kind: text,label: Known violations},reviewBy: {kind: date,label: Review by},overrides: {kind: text,label: Overrides (norm number of a package)},pack: {kind: text,label: Package},rail: {kind: text,label: Line for the agent},evidence: {kind: text,label: Where it comes from}}
states{hold: {provider: rule.hold,words: [{name: holder-down,label: Enforcer is broken,tone: trouble},{name: leaking,label: Leaking,tone: trouble},{name: noisy,label: Noisy,tone: attention},{name: by-nothing,label: No enforcer,tone: attention},{name: only-asked,label: Only a request,tone: calm},{name: held,label: Holds,tone: good}]}}
views[{id: rules--table,name: All rules,layout: table,fields: {},sorting: [{propertyId: ruleId,direction: ascending}],properties: [{name: ruleId,visible: true},{name: title,visible: true,width: 380},{name: level,visible: true},{name: floor,visible: true},{name: status,visible: true},{name: enforcerKind,visible: true},{name: enforcers,visible: true},{name: pack,visible: true}]},{id: rules--board,name: By state,layout: board,fields: {},board: {preview: page-content,cardSize: small,wrap: true},grouping: {by: status,colorBy: status},sorting: [{propertyId: ruleId,direction: ascending}],properties: [{name: ruleId,visible: true},{name: title,visible: true},{name: level,visible: true},{name: pack,visible: true}]},{id: rules--by-level,name: By level,layout: board,fields: {},board: {preview: page-content,cardSize: small,wrap: true},grouping: {by: level,colorBy: level},sorting: [{propertyId: ruleId,direction: ascending}],properties: [{name: ruleId,visible: true},{name: title,visible: true},{name: enforcerKind,visible: true},{name: status,visible: true}]}]

A rule is one checkable phrase: "sending anything outside to third parties only after the owner's yes". The title is short; the phrase itself goes in the "What must hold" field (requirement).

This is the native Shtukbase type Rule: the node reads requirement, status, sphere, appliesTo and enforcers, and computes by itself whether the rule holds (rule.hold). Packages add to it a number, a level, a floor mark, the enforcer's kind and mode, and a line for the agent.

  • Level (level): MUST is mandatory; SHOULD can be departed from with a written decision; MAY is permitted.
  • Law and safety (floor): such a rule cannot be weakened by a waiver or by a project decision.
  • Enforcers (enforcers): links to whatever watches the rule. An enforcer comes in different kinds: a check (an action with check: true), a sensor, a hook, a judge; there are also an automation, a skill and an instruction. Only a link, not text. While there is no enforcer, plannedEnforcer says what it will be. enforcerKind says which kind of enforcer it is.
  • Mode (mode): a new enforcer first watches (observe), then warns (warn), then blocks (enforce).
  • Known violations (baseline): what is already violated and tolerated for now; this number only goes down.

A MUST with no enforcer, at the steps "structure, rights, gates, tests, judge, audit", is really a SHOULD: package norms-audit will show it. "Holds" is not a state that is set by hand: the node computes it from the enforcers.

Contour: candidate → active → paused; rejected on the side. Making a rule active or pausing it is the owner's decision.

A project's own norm that refines or replaces a package norm names it in the "Overrides" field (overrides): a number, for example AUT-R01. It can only be overridden with a stricter norm. If the own norm is weaker than a norm marked "Law and safety" (a lower level, or paused), package norms-audit will show it as a floor violation.

The package Norms puts this page at /norms/rules.md.Source text