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.
Create a task.
Goal
Track work.
Context
Task management.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import {
CreateTaskInputModel,
TaskModel,
UpdateTaskStatusInputModel,
} from './task.schema';
export const CreateTaskContract = defineCommand({
meta: {
key: 'team.task.create',
version: '1.0.0',
stability: 'stable',
owners: ['@examples.team-hub'],
tags: ['team-hub', 'task', 'create'],
description: 'Create a task.',
goal: 'Track work.',
context: 'Task management.',
},
io: {
input: CreateTaskInputModel,
output: TaskModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'create-task-happy-path',
given: ['Space exists'],
when: ['User creates task'],
then: ['Task is created'],
},
],
examples: [
{
key: 'create-bug',
input: { spaceId: 'space-123', title: 'Fix login bug', type: 'bug' },
output: { id: 'task-456', status: 'todo' },
},
],
},
});