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.
Publish snapshot if ready (all approvals satisfied).
Goal
Prevent publishing until all required approvals exist.
Context
Called by job or UI to attempt publish.
Source Definition
import { defineCommand } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import {
ChangeCandidateModel,
ReviewDecisionEnum,
ReviewTaskModel,
} from '../entities/models';
export const KbPipelinePublishIfReadyContract = defineCommand({
meta: {
key: 'kbPipeline.publishIfReady',
version: '1.0.0',
stability: 'experimental',
owners: ['@examples'],
tags: ['knowledge', 'pipeline', 'publishing'],
description: 'Publish snapshot if ready (all approvals satisfied).',
goal: 'Prevent publishing until all required approvals exist.',
context: 'Called by job or UI to attempt publish.',
},
io: {
input: PublishIfReadyInput,
output: PublishIfReadyOutput,
errors: {
NOT_READY: {
description: 'Publishing is blocked because approvals are incomplete',
http: 409,
gqlCode: 'NOT_READY',
when: 'there are open review tasks or unapproved rule versions',
},
},
},
policy: { auth: 'user' },
});