Appendix C: Stdlib Kinds
The stdlib ships two packages of kinds. Bring them into scope with:
use * from arch.modulesuse * from arch.kindsBoth packages auto-resolve against the toolchain’s bundled stdlib — no dependencies entry needed.
Module kinds (arch.modules)
| Kind | Required blanks | Defaults | Default widget |
|---|---|---|---|
service | required cascade team, required labels.domain | — | arch-service |
frontend | required cascade team, required labels.domain | — | arch-frontend |
database | required cascade team, required labels.data.classification | — | arch-database |
component | — | cascade team | arch-component |
system | — | cascade team | arch-system |
external_system | required ext.vendor, required ext.contract.url | — | arch-external-system |
actor | — | — | arch-actor |
Reading the table:
- Required blanks must be filled or dropped by every instance.
- Defaults are pre-set fields the instance inherits (with cascade semantics where shown).
- Default widget is the custom-element tag the instance renders with (cascaded via
cascade widget: ...).
A project that does use * from arch.modules gets working visuals for free — no widgets: script of its own required.
Facet kinds
The stdlib defines one facet kind: facet (the generic base kind, no defaults, no required blanks). Custom facet kinds (resource, capability, endpoint_group) are conventionally declared per-project. See Chapter 6 and Chapter 16.
Interface kinds (arch.kinds)
| Kind | Parent | Semantic |
|---|---|---|
sync | interface | Generic synchronous interface |
async | interface | Generic asynchronous interface |
command | sync | State-changing operation |
query | sync | Read-only operation |
event | async | Pub/sub broadcast |
stream | async | Long-lived data stream |
The two parent kinds (sync, async) drive edge styling: sync edges solid, async edges dashed. The four child kinds (command, query, event, stream) inherit that styling and convey the specific semantic.
Only event and stream (and anything subtyping them) are meaningful targets for subscribes: wiring.
Project-local kinds
Define your own kinds when domain vocabulary is preferred over the generic kinds. See Chapter 16.
// In your project's kinds.archexport type service internal_service { required cascade team labels { security.zone: Internal }}Then use the kind anywhere in the package:
internal_service Authorize { team: Platform command Authenticate}To make a project-local kind visible to other packages, mark it export and import it via use … from <your.package> in their package.archspace.
See also
- Chapter 4: Modules — module kinds in depth
- Chapter 5: Interfaces — interface kinds in depth
- Chapter 16: Defining Kinds — declaring your own
- Chapter 20: Widgets — how kind widgets render