import { PAG_LANGUAGE, TEXT_LANGUAGE } from "#configuration/constants/code.constants"; import { templateBodyOf, templateConstraintsOf } from "#core/converters/grammar.converter"; import type { Section } from "#types/document.types"; import { TEMPLATE_SECTION_ICON } from "#configuration/icons/grammar.icons"; import { TEMPLATE_SECTION_ID } from "#core/ids/grammar.ids"; const CONSTRAINT_INDENT = "\n - "; const RECORD_SHAPE = `template:\n type: WORKFLOW # a declared document type · nothing else\n title: \n slots:\n - name: {WORKFLOW_NAME} # the value an instance supplies\n description: \n required: true\n kind: string\n - name: {project.governance_policy} # a host fact · resolved by the adapter, never typed\n required: true\n - name: {limits.max_lines} # a bound · resolved from the host's limits\n required: false\n - name: {scope}\n required: true\n enum: [, ] # a closed set · a value outside it is a violation\n constraints: # what every instance must satisfy · named, checkable${ CONSTRAINT_INDENT }${templateConstraintsOf("WORKFLOW").join( CONSTRAINT_INDENT, )}\n body: |\n `; const WORKFLOW_TEMPLATE = templateBodyOf("WORKFLOW"); const RESOLUTION_SAMPLE = "resolve