ShtukbaseStandard

Norms

norms-core · version 0.2.0
Shtukbase Basicin Basic5 norms5 checks

Where a project keeps its rules, principles, defaults, tenets and waivers, their contours, and checks for the form of the norms themselves.

About the package

Where a project keeps its norms and how a rule becomes active. The package brings five collections (rules, principles, defaults, tenets, waivers) and four contours (tenets have no contour). The collections and contours are taken from the old norms layer package, unchanged.

From the old norms package std-norm-system only the norms whose enforcer is a check of this package were taken: NS-R01 (strength words), NS-R03 (a waiver as a record), NS-R04 (the floor, the part about waivers), NS-R05 (review date). The rule NS-R07 "every norm must have an enforcer" was added during assembly. Principles and defaults in std-norm-system have no enforcer check, so they did not come over.

The context action is not a check: it prints the active rules as a list, to put them into an agent's context.

Boundary: the package does not bring the layer page norms.md and the layer ontology, the tenet records themselves (they are in the old package base-tenets) and the rule-map lens. Rule pages of other packages live in /norms/rules/<package>/ and are checked by the same checks.

Norms 5

IDNormLevelModeEnforcer
NS-R01
The level field of a rule is MUST, SHOULD or MAY, and of a default is SHOULD; the words are understood as in RFC 2119 and RFC 8174.
MUST blocks
check
NS-R03
Not following a MUST or SHOULD of an installed package is recorded as a Waiver record with the fields rule, where, because, simplerRejected, allowedBy and expires.
MUST blocks
check
NS-R04
A norm with floor: true is not overridden by a waiver, a narrower level or the contract; on a conflict with it, work on that point stops and the question goes to the owner.
MUST blocks
check
NS-R05
A package and a norm with shelfLife.class: fast have reviewBy filled; a norm whose reviewBy date has passed goes onto the review list.
SHOULD warns
check
NS-R07
Every rule has enforcers (paths to the enforcers) filled or, while there is no enforcer, plannedEnforcer; a rule with mode: enforce has a non-empty enforcers field and every path in it exists in the project.
MUST blocks
check

"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.

Actions 6

NameWhat it doesFileWhen
levelsNorm strength is MUST, SHOULD or MAY
norm NS-R01
checks/levels.ts
check
waiversA waiver is written in full and has not expired
norm NS-R03
checks/waivers.ts
check
floorNo open waivers from floor norms
norm NS-R04
checks/floor.ts
check
reviewThe norm's review date has not passed
norm NS-R05
checks/review.ts
check
enforcersA norm has an enforcer; for "blocks" the enforcers exist in the project
norm NS-R07
checks/enforcers.ts
check
contextActive rules as a list for the agent's contextchecks/context.ts
shtuk run

shtuk check runs the checks; shtuk run norms-core <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.

Pages 30

They go into the project at these paths.

Package files 8

They go into .shtukbase/packages/norms-core/; actions run from there.