Note 02 · Concepts
Foundations: Engineering Rules That Travel With Your Code
Shared design tokens, security baselines, privacy guarantees, and architectural invariants that sit outside any single feature—and follow every change.
Cross-cutting engineering rules usually die in one of two ways: either they sit in an external wiki that coding agents never read, or teams paste them into every prompt and component doc until they drift out of sync. Design tokens, security baselines, privacy rules, error taxonomies, and architectural invariants belong to the system as a whole, not to one feature.
In SpecPlane (0.1.0a6, Schema v9.2.1), those rules live in Git under specs/foundations/ as foundation.* specs.
Instantiate Only What You Need
Running specplane init copies 19 optional starter boilerplates into specplane/foundations/—covering foundation.design_system, foundation.security_baseline, foundation.privacy_consent, foundation.error_handling, foundation.api_conventions, foundation.eval_standards, and others. Those boilerplates sit in the kit, not in specs/foundations/.
Teams instantiate a foundation into specs/foundations/ only when the project actually needs a shared rule. Staffing all 19 files on day one turns specifications into paperwork; starting with zero or one (foundation.security_baseline.yaml, for example) and adding others when two components share a constraint keeps the graph lean.
Schema v9.2.0+ also supports optional extends chains (checked for acyclicity) and explicit invariants with time-bounded waivers for documented exceptions.
Bidirectional Links and Terminal Blast Boundaries
Foundations connect to containers and components through one bidirectional link pair:
| Spec | Field | Points to |
|---|---|---|
| Container or component | uses | foundation.* IDs |
| Foundation | used_by.containers / used_by.components | Consumer IDs |
specplane validate enforces that both sides match. The critical design rule sits in specplane blast: foundations are terminal nodes.
When you run specplane blast capability.authentication, the kernel walks realized_by components (such as component.password_reset), follows component dependencies, and collects every referenced foundation—surfacing foundation.security_baseline immediately. Then it stops. It does not follow used_by out of foundation.security_baseline into every unrelated service in the repository. If it did, touching any authenticated endpoint would flag the entire codebase as blast radius and destroy signal.
Live blast view in specplane view: foundation.security_baseline surfaces immediately as a terminal boundary without exploding through unrelated consumers.
When you intentionally want to audit who relies on a global rule, running specplane blast foundation.security_baseline reverses the question cleanly: it reports the direct 1-hop used_by components, containers, and their implements capabilities, then stops.
Why a One-Line CSS Edit Interrupts the Agent
Consider a deceptively small request: "Make destructive actions green instead of red."
In a normal codebase, an agent edits one CSS class or button variant in two seconds and moves on. With foundation.design_system linked via uses, blast surfaces the shared tokens.colors.error and semantic palette rules before any code moves. That forces an intentional human decision: is this an exception for this component only, or a change to the global error token? A one-line diff can carry global semantic consequences, and the foundation graph stops the agent from silently redefining system-wide meaning.
Governance in specplane impact
Foundations also keep governance honest. When running specplane impact, the Governance perspective projects populated capability constraints (such as constraints.security or constraints.legal) and component implementation.technical_constraints.security fields (including compliance, authentication, data_protection, and data_classification) directly from affected specs. Where governance fields are absent—or where a foundation appears in the subgraph without per-concern tags—impact surfaces explicit gaps and unclassified_foundations rather than inventing compliance claims.
Implemented today vs. planned: In
0.1.0a6(Schemav9.2.1),validateenforcesuses<->used_bysymmetry,extendsacyclicity, andinvariants/waiversstructure;blasttreats foundations as terminal nodes (and shows 1-hop users when run on a foundation); andimpactGovernance projects declared capability/component constraints while marking foundations inunclassified_foundations. Automated waiver-expiry gates and foundation-level concern classification inimpactare planned, not yet implemented in the kernel.
See SpecPlane on a real workspace: inspect live capabilities, blast graphs, and staged changes without installing anything.