Skip to main content

Node Types Overview

Spec Graph uses a tiered type system: seven core types plus optional extension types.

Core taxonomy in v2:

  • 2 grouping types: feature, layer
  • 5 normative core types: foundation, behavior, decision, domain, policy

Core Types

TypePurposeKey Question
featureVertical grouping and namespaceWhich product slice does this spec belong to?
layerHorizontal shared groupingWhich shared platform capability does this belong to?
foundationConcrete repository scaffoldingWhat physical structure must exist before application logic?
behaviorObservable system behaviorWhat does the user see and do?
decisionArchitectural, technical, or stack decisionHow should it be built, and with what?
domainBusiness concept, term, or ruleWhat do domain terms mean?
policyNon-functional requirementWhat limits must be met?

Node Shapes

Grouping nodes (feature, layer) use a simple shape with title, description, and optional links.

Behavior nodes carry expectation and optional constraints.

Contract nodes (foundation, decision, domain, policy, extensions) share a uniform shape with statement + verification.

Extension Types

For finer-grained modeling, extension types are available:

Extension TypePurpose
design_tokenVisual tokens: colors, typography, spacing
ui_contractUI component props, states, variants
api_contractREST, GraphQL, or event contracts
data_modelDatabase schemas, migrations, invariants
artifactContent-addressed external artifact
equivalence_contractFormal definition of "same system"
pipelineManifestation pipeline steps and gates

Decision Categories

Decision nodes use category to capture where the decision sits:

CategoryWhat It CapturesExample
architectureStructural patterns, module boundaries"All auth goes through an AuthProvider interface"
stackTechnology choices and usage constraints"Use Clerk for authentication"
patternImplementation patterns"Use optimistic updates for drag-and-drop"
interfacePublic API contracts between modules"Auth module exports authenticate() and revokeSession()"

For detailed documentation on each type, see the Node Types section.