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.

locale-jurisdiction-gate.policy.gate

Requires explicit locale, jurisdiction, knowledge snapshot, and allowed scope before assistant requests may proceed.

  • Type: policy (policy)
  • Version: 1.0.0
  • Tags: assistant, policy, jurisdiction
  • field.key.label
    locale-jurisdiction-gate.policy.gate
    field.version.label
    1.0.0
    field.type.label
    policy (policy)
    field.title.label
    locale-jurisdiction-gate.policy.gate
    field.description.label

    Requires explicit locale, jurisdiction, knowledge snapshot, and allowed scope before assistant requests may proceed.

  • Type: policy (policy)
  • Version: 1.0.0
  • Tags: assistant, policy, jurisdiction
  • field.tags.label
    assistant,policy,jurisdiction
    field.owners.label
    field.stability.label

    Requires explicit locale, jurisdiction, knowledge snapshot, and allowed scope before assistant requests may proceed.

    Source Definition

    import {
    	OwnersEnum,
    	StabilityEnum,
    	TagsEnum,
    } from '@lssm-tech/lib.contracts-spec/ownership';
    import { definePolicy } from '@lssm-tech/lib.contracts-spec/policy';
    
    export const AssistantGatePolicy = definePolicy({
    	meta: {
    		key: 'locale-jurisdiction-gate.policy.gate',
    		version: '1.0.0',
    		title: 'Assistant Locale and Jurisdiction Gate',
    		description:
    			'Requires explicit locale, jurisdiction, knowledge snapshot, and allowed scope before assistant requests may proceed.',
    		domain: 'assistant',
    		scope: 'operation',
    		owners: [OwnersEnum.PlatformFinance],
    		tags: [TagsEnum.I18n, 'assistant', 'policy', 'jurisdiction'],
    		stability: StabilityEnum.Experimental,
    	},
    	rules: [
    		{
    			effect: 'deny',
    			actions: ['assistant.answer', 'assistant.explainConcept'],
    			resource: { type: 'assistant-call' },
    			conditions: [
    				{
    					expression:
    						'!context.locale || !context.jurisdiction || !context.kbSnapshotId || !context.allowedScope',
    				},
    			],
    			reason:
    				'Assistant requests fail closed until locale, jurisdiction, kbSnapshotId, and allowedScope are explicit.',
    		},
    		{
    			effect: 'deny',
    			actions: ['assistant.answer', 'assistant.explainConcept'],
    			resource: { type: 'assistant-call' },
    			conditions: [
    				{
    					expression:
    						"!['en-US', 'en-GB', 'fr-FR'].includes(context.locale ?? '')",
    				},
    			],
    			reason: 'Only the explicitly reviewed assistant locales are permitted.',
    		},
    		{
    			effect: 'allow',
    			actions: ['assistant.answer', 'assistant.explainConcept'],
    			resource: { type: 'assistant-call' },
    			conditions: [
    				{
    					expression:
    						"['en-US', 'en-GB', 'fr-FR'].includes(context.locale ?? '') && !!context.jurisdiction && !!context.kbSnapshotId && !!context.allowedScope",
    				},
    			],
    			reason:
    				'Explicit context is present, so the request may continue to citation and scope validation.',
    		},
    	],
    	pii: {
    		fields: ['kbSnapshotId'],
    		retentionDays: 30,
    	},
    });