/** * Domain artifact metadata schemas for the OrgX Proof Ladder. * * Each domain has one or more canonical "atomic unit types" with required * metadata fields. Validation is warn-only in phase 1 — artifacts that fail * schema checks are still registered but tagged with `schema_validated: false`. */ import type { OrgxAgentDomain } from "../contracts/types.js"; export declare const ATOMIC_UNIT_TYPES: readonly ["engineering.commit", "engineering.pr", "product.spec", "product.decision", "design.component", "design.a11y", "marketing.asset", "marketing.experiment", "sales.qualification", "sales.proposal", "operations.runbook", "operations.incident", "orchestration.routing", "orchestration.decomp"]; export type AtomicUnitType = (typeof ATOMIC_UNIT_TYPES)[number]; export interface QueueRef { initiative_id?: string; workstream_id?: string; task_id?: string; queue_snapshot?: Record; } export interface RunRef { run_id?: string; correlation_id?: string; session_id?: string; } export interface QualityGateRef { passed: boolean; score: number; threshold: number; } interface FieldSpec { /** Human-readable name */ label: string; /** When true, warn if missing */ required: boolean; } type SchemaFields = Record; export interface DomainArtifactSchema { atomicUnitType: AtomicUnitType; domain: OrgxAgentDomain; receiptName: string; fields: SchemaFields; } export declare const DOMAIN_ARTIFACT_SCHEMAS: Record; export declare const DOMAIN_DEFAULT_ATOMIC_TYPES: Record; export declare const DOMAIN_QUALITY_THRESHOLDS: Record; export interface ArtifactValidationResult { valid: boolean; atomicUnitType: string; missingRequired: string[]; missingOptional: string[]; warnings: string[]; } /** * Validate artifact metadata against its domain schema. * * Returns validation result with missing fields listed. In phase 1 this is * advisory (warn-only); callers should not block artifact registration. */ export declare function validateArtifactMetadata(atomicUnitType: string, metadata: Record): ArtifactValidationResult; /** * Infer the canonical atomic unit type from a freeform artifact_type string. * * Maps existing artifact_type conventions (e.g. "eng.diff_pack", * "shared.project_handbook") into one of the 14 canonical types. * Returns null if no mapping is found — the artifact still registers * but won't be schema-validated. */ export declare function normalizeArtifactType(artifactType: string): AtomicUnitType | null; export {};