OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Schedule a job.
Goal
Schedule work.
Context
Job scheduling.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import {
CompleteJobInputModel,
JobModel,
ScheduleJobInputModel,
} from './job.schema';
export const ScheduleJobContract = defineCommand({
meta: {
key: 'service.job.schedule',
version: '1.0.0',
stability: 'stable',
owners: ['@examples.service-business-os'],
tags: ['service-business-os', 'job', 'schedule'],
description: 'Schedule a job.',
goal: 'Schedule work.',
context: 'Job scheduling.',
},
io: {
input: ScheduleJobInputModel,
output: JobModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'schedule-job-happy-path',
given: ['Client exists'],
when: ['User schedules job'],
then: ['Job is created with status SCHEDULED'],
},
],
examples: [
{
key: 'schedule-repair',
input: {
clientId: 'client-123',
date: '2025-01-20T10:00:00Z',
type: 'repair',
},
output: { id: 'job-456', status: 'scheduled' },
},
],
},
});