@loop-kit/graphite-systems
v0.1.0
Published
Reusable Graphite facets, actions, and system-level policies.
Readme
@loop-kit/graphite-systems
Reusable facet modules and action registry for Graphite runtime hosts.
Concepts
ActionRegistry: register/invoke action IDs withwhenpredicates andrunhandlers.- Facets are plain modules with:
- schema constants
- helper queries
- patch builders
- validators (
slice + diagnostics) - optional policy helpers
- Included facet modules:
editingwithedit.delete(trait-routed).dockingskeleton (shared constants + helpers used by dock package).
How To Use
import { ActionRegistry, editingFacet } from '@loop-kit/graphite-systems';
const actions = new ActionRegistry();
editingFacet.registerEditingActions(actions);How Dock Demonstrates It
@loop-kit/dock consumes Graphite idioms end-to-end and can share schema/policy conventions with system facets. The docking skeleton in this package intentionally stays lightweight while full behavior lives in the dock package.
Add A New Facet/System
- Create a new folder under
src/facets/<name>/. - Add
schema.ts,queries.ts,patchBuilders.ts, andvalidate.ts. - Export the facet from
src/facets/index.ts. - Register actions in
ActionRegistryif keyboard/palette dispatch is needed.
Commands
moon run graphite-systems:typecheckmoon run graphite-systems:build
