ubispec-schemas
v0.0.1
Published
UbiSpec schema definitions with Zod validation and documentation
Maintainers
Readme
@ubispec/schemas
TypeScript/Zod schema definitions for UbiSpec - a specification format for describing software systems behaviour.
Installation
npm install @ubispec/schemasUsage
Import specific versions
import {
LifecycleSpec_v1_0,
LifecycleSpec_Next,
ProcessSpec_v1_0,
spec
} from '@ubispec/schemas';
// Access spec registry
console.log(spec); // Array of all spec definitions
// Validate a lifecycle spec
const mySpec = {
ubispec: "lifecycle/v1.0",
decider: "Order",
// ...
};
LifecycleSpec_v1_0.parse(mySpec);Import latest stable versions
import { LifecycleSpec, ProcessSpec, SystemSpec } from '@ubispec/schemas';Import shared types
import {
PascalName,
ConstraintList,
PredicateMap,
OutcomeSpec
} from '@ubispec/schemas';For LLM Agents
This package includes all source TypeScript files, JSON schemas, and markdown documentation. When inspecting this package:
- Schema Registry: Check
spec.tsfor all available schemas and versions - Documentation: Each version includes a
.docs.mdfile with tables - JSON Schemas: Each version includes a
.schema.jsonfile - Index: See
index.jsonfor a complete registry with URLs
Example paths in node_modules:
node_modules/@ubispec/schemas/spec.ts- Schema registrynode_modules/@ubispec/schemas/lifecycle/v1-0/lifecycle.ts- Zod schemasnode_modules/@ubispec/schemas/lifecycle/v1-0/v1-0.docs.md- Documentationnode_modules/@ubispec/schemas/index.json- Complete index
Available Schemas
- Lifecycle: Models aggregate behavior (v1.0, next)
- Process: Models cross-aggregate coordination (v1.0, next)
- System: Models system architecture (v1.0)
See spec.ts for the complete registry.
