ContractSpec docs

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.

policy-safe-knowledge-assistant

All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @examples
  • Tags: assistant, knowledge, policy, hitl, learning
  • field.key.label
    policy-safe-knowledge-assistant
    field.version.label
    1.0.0
    field.type.label
    feature
    field.title.label
    policy-safe-knowledge-assistant
    field.description.label

    All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @examples
  • Tags: assistant, knowledge, policy, hitl, learning
  • field.tags.label
    assistant,knowledge,policy,hitl,learning
    field.owners.label
    @examples
    field.stability.label
    experimental

    All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.

    Operations (11)

    `assistant.answer` (v1.0.0)

    `assistant.explainConcept` (v1.0.0)

    `kb.ingestSource` (v1.0.0)

    `kb.upsertRuleVersion` (v1.0.0)

    `kb.approveRuleVersion` (v1.0.0)

    `kb.publishSnapshot` (v1.0.0)

    `kb.search` (v1.0.0)

    `kbPipeline.runWatch` (v1.0.0)

    `kbPipeline.createReviewTask` (v1.0.0)

    `kbPipeline.submitDecision` (v1.0.0)

    `kbPipeline.publishIfReady` (v1.0.0)

    Events (10)

    `assistant.answer.requested` (v1.0.0)

    `assistant.answer.blocked` (v1.0.0)

    `assistant.answer.delivered` (v1.0.0)

    `kb.source.ingested` (v1.0.0)

    `kb.ruleVersion.created` (v1.0.0)

    `kb.ruleVersion.approved` (v1.0.0)

    `kb.snapshot.published` (v1.0.0)

    `kb.change.detected` (v1.0.0)

    `kb.review.requested` (v1.0.0)

    `kb.review.decided` (v1.0.0)

    Source Definition

    import { defineFeature } from '@lssm-tech/lib.contracts-spec';
    
    export const PolicySafeKnowledgeAssistantFeature = defineFeature({
    	meta: {
    		key: 'policy-safe-knowledge-assistant',
    		version: '1.0.0',
    		title: 'Policy-safe Knowledge Assistant',
    		description:
    			'All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.',
    		domain: 'knowledge',
    		owners: ['@examples'],
    		tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],
    		stability: 'experimental',
    	},
    	operations: [
    		// Gate
    		{ key: 'assistant.answer', version: '1.0.0' },
    		{ key: 'assistant.explainConcept', version: '1.0.0' },
    		// KB
    		{ key: 'kb.ingestSource', version: '1.0.0' },
    		{ key: 'kb.upsertRuleVersion', version: '1.0.0' },
    		{ key: 'kb.approveRuleVersion', version: '1.0.0' },
    		{ key: 'kb.publishSnapshot', version: '1.0.0' },
    		{ key: 'kb.search', version: '1.0.0' },
    		// Pipeline
    		{ key: 'kbPipeline.runWatch', version: '1.0.0' },
    		{ key: 'kbPipeline.createReviewTask', version: '1.0.0' },
    		{ key: 'kbPipeline.submitDecision', version: '1.0.0' },
    		{ key: 'kbPipeline.publishIfReady', version: '1.0.0' },
    	],
    	events: [
    		{ key: 'assistant.answer.requested', version: '1.0.0' },
    		{ key: 'assistant.answer.blocked', version: '1.0.0' },
    		{ key: 'assistant.answer.delivered', version: '1.0.0' },
    		{ key: 'kb.source.ingested', version: '1.0.0' },
    		{ key: 'kb.ruleVersion.created', version: '1.0.0' },
    		{ key: 'kb.ruleVersion.approved', version: '1.0.0' },
    		{ key: 'kb.snapshot.published', version: '1.0.0' },
    		{ key: 'kb.change.detected', version: '1.0.0' },
    		{ key: 'kb.review.requested', version: '1.0.0' },
    		{ key: 'kb.review.decided', version: '1.0.0' },
    	],
    	presentations: [],
    	opToPresentation: [],
    	presentationsTargets: [],
    	capabilities: {
    		requires: [
    			{ key: 'identity', version: '1.0.0' },
    			{ key: 'audit-trail', version: '1.0.0' },
    			{ key: 'notifications', version: '1.0.0' },
    			{ key: 'jobs', version: '1.0.0' },
    			{ key: 'feature-flags', version: '1.0.0' },
    			{ key: 'files', version: '1.0.0' },
    			{ key: 'metering', version: '1.0.0' },
    			{ key: 'learning-journey', version: '1.0.0' },
    		],
    	},
    
    	policies: [{ key: 'policy-safe.policy.gate', version: '1.0.0' }],
    
    	knowledge: [{ key: 'policy-safe.knowledge.rules', version: '1.0.0' }],
    
    	jobs: [{ key: 'policy-safe.job.pipeline-watch', version: '1.0.0' }],
    
    	docs: [
    		'docs.examples.policy-safe-knowledge-assistant.goal',
    		'docs.examples.policy-safe-knowledge-assistant.usage',
    	],
    });