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.
Submit approve/reject decision for a review task.
Goal
Ensure humans verify before publishing.
Context
Curator/expert reviews and decides.
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 KbPipelineSubmitDecisionContract = defineCommand({
meta: {
key: 'kbPipeline.submitDecision',
version: '1.0.0',
stability: 'experimental',
owners: ['@examples'],
tags: ['knowledge', 'pipeline', 'hitl', 'rbac'],
description: 'Submit approve/reject decision for a review task.',
goal: 'Ensure humans verify before publishing.',
context: 'Curator/expert reviews and decides.',
},
io: {
input: SubmitDecisionInput,
output: ReviewTaskModel,
errors: {
FORBIDDEN_ROLE: {
description: 'Role not allowed to approve the given risk level',
http: 403,
gqlCode: 'FORBIDDEN_ROLE',
when: 'curator attempts to approve a high-risk change',
},
REVIEW_TASK_NOT_FOUND: {
description: 'Review task not found',
http: 404,
gqlCode: 'REVIEW_TASK_NOT_FOUND',
when: 'reviewTaskId is invalid',
},
},
},
policy: { auth: 'user' },
});