Spanda

ADR 0002: Official std.policies.* package scaffolds


Problem

Library-shaped homeostasis_policy / attention_policy keywords are migrating to @policy(kind: …). The inventory calls for package APIs under std.policies.* so programs can import helpers without expanding core grammar. Without a package, the attribute form has no registry home and evaluators stay undocumented relative to language surface.


Decision

Ship official package spanda-policies exporting:

Evaluation remains in spanda-autonomy (CLI/API/Control Center). The package is a scaffold / import surface only (same pattern as spanda-resilience).

Register import paths in spanda-package adapter + typecheck catalogs + std_namespaces type names.


Alternatives

Alternative A — Put helpers only in assurance.*

Alternative B — Reimplement evaluate/rank in .sd

Alternative C — Defer package until hard-remove of keywords


Consequences

Positive

Negative / risks

Follow-ups


Architecture Review (summary)

Gate Notes
Purpose Migration path for library-shaped policies
Existing Extends package registry + autonomy (no new evaluator)
Duplication Avoided by not reimplementing evaluate/rank
Entity Policies remain program decls; entity snapshots unchanged
Security No new trust/authority surface
Non-regression Additive imports; legacy keywords kept
Testability tests/smoke.sd
Demonstrability Feature examples + package README
Release Workspace docs/package count only

References