tom_specs_clitool library

TomSpecs CLI Tool — model outline generator.

Classes

AnnotationCatalogueCorrespondence
The result of diffing the declared bindings against the annotation classes tom_specs_core actually declares.
AnnotationData
Annotation data extracted from the analyzer element model.
ApiSignatureReport
What one package's check found.
ApiSignatureSet
The packages whose summaries are gated, container-root-relative, each with the folder its summaries live in.
AreasCatalog
The transcribed catalogue, ready to serialize.
ClosureReport
The result of one closure walk.
ClosureViolation
One violation, naming the offending edge.
CodeSpecsCheck
One codespecs_derivation_contract.md §6 check.
CodeSpecsRegeneration
A second generation run over the same spec model, for the determinism check.
CodeSpecsValidationInput
Everything the forty-one checks read.
CodeSpecsValidationReport
The outcome of one validation pass.
CodeSpecsViolation
One failed check.
CsBackLinkAgreementCheck
codespecs_derivation_contract.md §6 check 7.
CsBackLinkExtractedCheck
codespecs_derivation_contract.md §6 check 36.
CsBindingOperationCheck
codespecs_derivation_contract.md §6 check 38.
CsBindingRouteCheck
codespecs_derivation_contract.md §6 check 39.
CsBodyStatementShapeCheck
codespecs_derivation_contract.md §6 check 28.
CsBoolValue
A boolean literal.
CsBranchConditionCheck
codespecs_derivation_contract.md §6 check 29.
CsCall
One call site inside a generated body.
CsCheckRow
One row of codespecs_derivation_contract.md §6's table.
CsCheckTableCorrespondence
The outcome of one comparison.
A @CodeSpec back-link.
CsCollaboratorCallResolutionCheck
codespecs_derivation_contract.md §6 check 23.
CsCollaboratorShapeCheck
codespecs_derivation_contract.md §6 check 24.
CsCollaboratorSignatureCheck
codespecs_derivation_contract.md §6 check 30.
CsColumnNotObservableCheck
codespecs_derivation_contract.md §6 check 22.
CsComment
One comment token of a generated file.
CsCommentFidelityCheck
codespecs_derivation_contract.md §6 check 34.
CsCommentSourceCheck
codespecs_derivation_contract.md §6 check 32.
CsComposeTokenCheck
codespecs_derivation_contract.md §6 check 14.
CsConstruction
A tom_core-family construction in generated code — read for the checks whose subject is a substrate constructor argument rather than a marker one.
CsConstructionValue
A constructor call — a Cs*Ref const, a value class such as CsGradedAccess, or a tom_core substrate construction.
CsDeclaration
A generated declaration — a top-level class/enum/variable, or a member of one.
CsDeterminismCheck
codespecs_derivation_contract.md §6 check 31.
CsDocComment
A /// documentation block, as written.
CsDocCommentShapeCheck
codespecs_derivation_contract.md §6 check 27.
CsDocRef
One DocRef tuple of a @DocSpec annotation.
CsDrillThroughRouteCheck
codespecs_derivation_contract.md §6 check 18.
CsEmptyExplicationCheck
codespecs_derivation_contract.md §6 check 5.
CsEnumMirror
A closed catalogue and the tom_core catalogue it mirrors (codespecs_derivation_contract.md §5.3).
CsErrorCopyCategoryCheck
codespecs_derivation_contract.md §6 check 10.
CsExcludedArea
One area the gate record excluded from the obligation set.
CsExtract
One area's extract.
CsExtractCoverageCheck
codespecs_derivation_contract.md §6 check 35.
CsExtractEntry
One routed value of one section.
CsExtractSet
Every extract the caller supplied, indexed by section id.
CsFabricatedValueCheck
codespecs_derivation_contract.md §6 check 6.
CsFallbackChannelCheck
codespecs_derivation_contract.md §6 check 17.
CsFeatureCatalogue
The framework protocol-feature catalogue checks 40 and 41 hold the trio against: csFeatureHooks and csFeatureReservedPaths of tom_code_specs' vocabulary (codespecs_mapping.md §5.30).
CsFeatureHookCompletenessCheck
codespecs_derivation_contract.md §6 check 40.
CsFeatureHookEntry
One row of tom_code_specs' csFeatureHooks catalogue (codespecs_derivation_contract.md §3.4.6), as read from its source.
CsFile
One generated Dart file.
CsGradedDepthCheck
codespecs_derivation_contract.md §6 check 21.
CsGroupedHolderCommentCheck
codespecs_derivation_contract.md §6 check 33.
CsIdentifierCollisionCheck
codespecs_derivation_contract.md §6 check 1.
CsIntValue
An integer literal.
CsListValue
A list literal.
CsLocation
Where a violation is (file plus 1-based line).
CsLocusArrowCheck
codespecs_derivation_contract.md §6 check 11.
CsLocusProject
One generated project of the codespecs_mapping.md §4.2 trio.
CsMarker
One Cs* part marker as written on a declaration.
CsMethodBody
A method or accessor body of a generated declaration.
CsMethodCommentCheck
codespecs_derivation_contract.md §6 check 25.
CsMigrationConvergenceCheck
codespecs_derivation_contract.md §6 check 13.
CsMirroredCatalogueCheck
codespecs_derivation_contract.md §6 check 9.
CsMissingAuthoredKeyCheck
codespecs_derivation_contract.md §6 check 4.
CsMissingNameCheck
codespecs_derivation_contract.md §6 check 3.
CsNoInBodyCommentCheck
codespecs_derivation_contract.md §6 check 26.
CsNullValue
A null literal — written where a per-kind slot is deliberately absent.
CsOperationAgreementCheck
codespecs_derivation_contract.md §6 check 12.
CsOverridableScopeCheck
codespecs_derivation_contract.md §6 check 15.
CsParameter
One formal parameter of a generated method, as written.
CsQualifiedValue
A qualified identifier: an enum access (CsTextRole.error) or a catalogue const reference (SharedOperations.login). Which of the two it is depends on the reading check, so the model keeps both parts and decides nothing.
CsReferenceResolutionCheck
codespecs_derivation_contract.md §6 check 2.
CsReflectionWrittenNotFinalCheck
codespecs_derivation_contract.md §6 check 37.
CsReservedProtocolPathCheck
codespecs_derivation_contract.md §6 check 41.
CsSecretInitialiserCheck
codespecs_derivation_contract.md §6 check 16.
CsSecretIsDeclaredCheck
codespecs_derivation_contract.md §6 check 19.
CsSettingKeyCollisionCheck
codespecs_derivation_contract.md §6 check 20.
CsSlotExclusivityCheck
codespecs_derivation_contract.md §6 check 8.
CsStatement
One statement of a generated body.
CsStringValue
A string literal.
CsUnknownValue
An expression the reader did not model — kept with its source text so a message can quote it rather than say "something".
CsValue
A constant value read off a CodeSpecs annotation argument or a substrate constructor argument.
DartdocBuildReport
What one package's documentation build said.
DartdocBuildSet
The packages whose documentation build must be silent, container-root-relative.
DocCoverageEntry
One measured package's agreed bar.
DocCoverageManifest
The parsed manifest: what is measured, what is exempt, what is excluded.
DocCoverageReport
The outcome of one walk over the manifest.
DocCoverageResult
One package's measured coverage.
DocCoverageViolation
A manifest or coverage failure, phrased as the repair.
DocSpecsAnnotationBinding
One annotation's declared destination in a generated DocSpecs schema.
DocSpecsSchemaGenerator
Generates DocSpecs schemas (*.docspecs-schema.yaml) from the canonical The metadata tree (MetaTreeBuilder/MetaNode), applying the SOM §13 generation rules (SOM §13).
DocspecsYamlSchemaGenerator
Generates a standalone JSON Schema (Draft-07) for the on-disk *.docspecs.yaml document wire format.
DocumentSections
The section ids one document declares.
EntrypointCorrespondence
The outcome of one comparison.
EntrypointOption
One option, flag or multi-option an entrypoint's ArgParser declares.
EntrypointRow
One row of README.md's bin/ entrypoint table.
EscapingPath
One path literal that resolves nowhere inside its own package.
FacadeDocumentRoot
One @Document root of the generated facade, read back from the meta-data file the emitter has just written.
FacadeSurface
The surface a facade README reports: its document roots and the model's class count.
FormatReport
What the formatter would change, and what got in the way of asking.
FormatSet
The manifest of packages the formatter governs, and the source directories checked inside each.
FormFieldInfo
A form field extracted from a @Form([Field(...)]) annotation.
InvariantCitation
A citation naming an invariant of tom_specs_model_rules.md §10.2, found in some source.
InvariantCorrespondence
The result of comparing the two sides, plus the corpus citation scan.
InvariantEntry
One numbered entry of the invariant list in tom_specs_model_rules.md §10.2.
LibrarySurface
The fingerprint of one set of Dart source files.
MetaContentType
@ContentType(type, description) — or the implied content type of a known section type (TextSection → text, …) with an empty description.
MetaDocumentInfo
@Document(name, description, basedOn) — present on document root nodes.
MetaExtraAnnotation
A captured annotation without a dedicated slot (SOM §7.1: extra), kept losslessly as its name plus the analyzer-resolved constant arguments.
MetaFormField
One Field(...) entry of a @Form([...]) annotation.
MetaFormInfo
@Form([...]) metadata for a kind == form node.
MetaNode
One node of the canonical metadata tree (SOM §7.1).
MetaTreeBuilder
Builds MetaNode trees from the resolved ModelClass graph.
ModelClass
A resolved model class.
ModelEnum
A resolved enum type.
ModelField
A resolved field from a model class.
ModelJsonExporter
Serializes the resolved ModelClass graph into a JSON-ready map that a UI (e.g. the tom_specs_editor Flutter app) can expand lazily into a tree.
ModelJsonStamp
The version stamp a spec_model.json export is written with.
ModelReader
Reads model classes from Dart source files using the analyzer.
ModelSurface
The state of tom_specs_model at the moment the committed tom_som_* packages were generated from it.
ModelVersionStamp
The model version stamp generated into tom_specs_model by buildkit :versioner.
OeCitation
One OE- citation found in one line of one file.
OeCitationReport
The result of checking a whole corpus.
OeRegister
The ids the register defines, in the order the table declares them.
OutlineWriter
Generates the outline text from the model class tree.
PackageDrift
One package's drift verdict.
PackagingDescriptor
The per-language data the shared renderers and hooks consume. Each SOM language supplies one of these (SOM §17.3) and registers it in packagingDescriptorFor; everything else is language-agnostic.
PackagingExample
One runnable sample in the facade package's hand-written examples tree, rendered as a row of the README's Examples table (tom_specs_documentation_standard.md §2.1 row 9).
PackagingRoute
One documented way to add the library as a dependency (registry, git, path, vendored, …) rendered into readme_howtointegrate.md.
PackagingUsage
One ## Usage sub-section: a capability, one sentence of context, and a short runnable block (tom_specs_documentation_standard.md §2.1 row 10).
RegistryFinding
One inconsistency between the registries, or between generated files and the registries.
RegistryOperation
One operation of the server-operation registry (SVOPE).
RegistryRequirement
The authorization requirement of an operation (AZREQ).
RegistryRole
One role of the role catalogue (AZRO).
RegistryScreen
One screen of the screen inventory (SCREN).
RegistrySet
The registries of one specification.
RegistryTestGeneration
The generated files and the registry findings of one generation.
ReleaseAllowEntry
One approved boundary crossing: a workspace-authored package already published to pub.dev.
ReleaseDriftReport
The whole run's verdict.
ReleaseManifest
The committed release-set manifest (tool/release_set.yaml).
SbpPath
One field reachable from the Solution Blueprint root by a static member chain: its dotted path, its own member name (the tie-breaker when a type occurs more than once), the Dart expression that reads it from the local b, and whether that expression can yield null.
ScanSetGap
One file that cites the doc set but no default scan set reaches.
SectionCitation
One § citation.
SectionCitationReport
The result of resolving a set of files.
SectionCorpus
Every document a citation may resolve against.
SectionHeading
One heading that carries a section id.
SerializationStampResult
Outcome of a stampSerializationOrder run.
SomCEmitter
Generates the tom_som_c_v0 header + source for a SpecModel.
SomCGenerationResult
The committed paths and counts produced by the C generator.
SomCMetaEmitter
Emits the C source of the generated metadata module (see the library doc above) for model. Produces a header/source pair via generateHeader / generateSource; both share one deterministic name allocation.
SomCppEmitter
Generates the tom_som_cpp_v0 header + source for a SpecModel.
SomCppGenerationResult
The committed paths and counts produced by the C++ generator.
SomCppMetaEmitter
Emits the C++ source of the generated metadata module (see the library doc above) for model. Produces a header/source pair via generateHeader / generateSource; both share one deterministic name allocation.
SomDartEmitter
Generates the tom_som_dart_v0 library source for a SpecModel.
SomDartMetaEmitter
Emits the Dart source of the generated metadata library (see the library doc above) for model.
SomDartModelEmitter
Emits lib/<package>_model.dart for one generation run.
SomEmittedSurface
What one generation run covers: the roots it emitted a typed root type for, and the model classes reachable from them.
SomEnumType
One enum type a generated facade must declare.
SomGenerationResult
The committed paths and counts produced by generateSomDartProject.
SomGoEmitter
Generates the tom_som_go_v0 module source for a SpecModel.
SomGoGenerationResult
The committed paths and counts produced by the Go generator.
SomGoMetaEmitter
Emits the Go source of the generated metadata module (see the library doc above) for model.
SomJavaEmitter
Generates the tom_som_java_v0 TomSomV0.java source for a SpecModel.
SomJavaGenerationResult
The committed paths and counts produced by the Java generator.
SomJavaMetaEmitter
Emits the Java source of the generated metadata module (see the library doc above) for model.
SomJavaScriptEmitter
Generates the tom_som_javascript_v0 module source for a SpecModel.
SomJavaScriptGenerationResult
The committed paths and counts produced by the JavaScript generator.
SomJavaScriptMetaEmitter
Emits the JavaScript source of the generated metadata module (see the library doc above) for model.
SomLanguageTarget
One generation target: a language and the output root the generated tom_som_<slug>_<label> project is written into (an explicit output: override, or the default <output-base>/tom_som_<slug>_<label>).
SomPythonEmitter
Generates the tom_som_python_v0 package module source for a SpecModel.
SomPythonGenerationResult
The committed paths and counts produced by the Python generator.
SomPythonMetaEmitter
Emits the Python source of the generated metadata module (see the library doc above) for model.
SomRustEmitter
Generates the tom_som_rust_v0 crate-root source for a SpecModel.
SomRustGenerationResult
The committed paths and counts produced by the Rust generator.
SomRustMetaEmitter
Emits the Rust source of the generated metadata module (see the library doc above) for model.
SomTypeScriptEmitter
Generates the tom_som_typescript_v0 module source for a SpecModel.
SomTypeScriptGenerationResult
The committed paths and counts produced by the TypeScript generator.
SomTypeScriptMetaEmitter
Emits the TypeScript source of the generated metadata module (see the library doc above) for model.
SpecObjectModelConfig
The typed tom-spec-object-model config: which languages to generate, where each lands, the version label (v0), and which document roots to generate.
SpecOpsGenerator
Emits the spec_ops.g.dart registry that adopts the snapshot/serialization contract across every TomSpecs model class without editing their source (OE-2).
SpecOpsResult
What one generateSpecOpsRegistry run produced.
SpecValidationFinding
One finding of one tier.
StaleSectionExemption
An exhibit marker that suppressed nothing.
TodoCitation
One todo-id citation found in one document line.
TodoCitationReport
The result of checking a whole documentation folder.
TodoCitationVocabulary
Tokens that share the todo-id shape but are not todo ids.
TodoCorpus
Every todo id reachable from a set of *.todo.yaml files.
TodoRecord
One todo as found in the corpus.

Enums

CitationExemption
Why a CitationVerdict.closed citation is allowed to stand.
CitationVerdict
What the checker concluded about one citation.
ClosureEdgeKind
What kind of edge carried the violation.
ClosureViolationKind
The distinct ways the closure can fail.
CsBodyShape
What a method body does, as far as the "compiles but does not execute" invariants of codespecs_derivation_contract.md §2.4 care.
CsDeclarationKind
What kind of Dart declaration a CsDeclaration stands for.
CsLocus
One of the three generated projects (codespecs_mapping.md §4.2).
CsStatementKind
What kind of statement one line of a generated body is.
DocSpecsOwner
The schema block that owns a DocSpecsAnnotationBinding.schemaKey.
ManifestFormat
The manifest a runtime package uses to declare its own version.
MetaNodeKind
Field/section render kind (SOM §7.1: list | form | section | content | enum | complex | scalar). enum is a Dart keyword, hence enumValue.
ModelJsonTarget
A committed spec_model.json asset.
ModelOnlyReason
Why an annotation has no DocSpecs schema counterpart.
SectionCitationExemption
Why a § that resolves to no heading is nonetheless not a defect.
SectionCitationVerdict
What the resolver concluded about one citation.
SectionQualifierSource
How a citation acquired its document name.
SomLanguage
A language the SOM (specification object model) generator can target.
SomStructuralMember
A structural member of the runtime SomNode that every generated facade carries, independent of the model.

Constants

apiSignatureSetPath → const String
Where the manifest of gated packages lives, clitool-relative.
codeSpecsChecks → const List<CodeSpecsCheck>
The forty-one checks, in codespecs_derivation_contract.md §6 table order.
csBindingMethods → const Set<String>
The HTTP methods a binding may declare — TomOperationBinding.methods of tom_core_codespecs (codespecs_derivation_contract.md §3.4.5).
csMirroredEnumPairs → const Map<String, String>
The Cs* catalogues that mirror a tom_core enum, keyed by the mirror (codespecs_derivation_contract.md §5.3).
dartdocBuildSetPath → const String
Where the manifest of governed packages lives, clitool-relative.
defaultCitedDocFolders → const List<String>
The package-tier doc/ folders that cite the doc set, container-root-relative.
defaultCitedQuests → const List<String>
The quests whose todo ids the TomSpecs documents cite.
defaultCitedReadmes → const List<String>
The files outside the doc folder that cite it, container-root-relative.
defaultCitedSourceRoots → const List<String>
The source trees whose doc comments cite the doc set, container-root-relative.
defaultCitingPaths → const List<String>
The files scanned for citations, relative to the tom_specs_clitool root.
defaultCitingRoots → const List<String>
Project folders and files whose OE- citations are checked.
defaultCorpusDocuments → const List<String>
The two documents of the TomSpecs set that do not live in its doc folder, relative to the container root.
docCoverageManifestPath → const String
The committed manifest path, relative to tom_specs_clitool.
docSpecsAnnotationBindings → const List<DocSpecsAnnotationBinding>
Every annotation tom_specs_core declares, and where it lands.
editorTreeRoot → const String
The editor's tree, relative to the container root.
harnessFile → const String
The file name of the generated harness interface.
harnessInterface → const String
The interface the generated tests call; the application implements it in its own registry_harness.dart and exposes createRegistryTestHarness().
kAuthoringSliceOrder → const List<int>
The codespecs_mapping.md §4.4.6 rule-1 slice serialisation. Used only as a check on kSliceCites.
kCodeSpecsBacklinksFormat → const String
The format of the --backlinks index.
kCodeSpecsBacklinksFormatVersion → const int
The formatVersion of the --backlinks index.
kCodeSpecsReportFormat → const String
The format of the --json report. Bumped only on a breaking change.
kCodeSpecsReportFormatVersion → const int
The formatVersion of the --json report.
kCsExtractFormat → const int
The formatVersion this reader understands — the runtime's kCodeSpecsExtractFormat; the runtime owns the one reader.
kCsGateRecordFile → const String
The file name of the Stage-B gate record — the runtime's kCodeSpecsGateRecordFile.
kCsGateRecordFormat → const int
The formatVersion of the gate record — the runtime's kCodeSpecsGateRecordFormat.
kSliceCites → const Map<int, List<int>>
The codespecs_mapping.md §4.4.3 across-slice edges, transcribed from the "Why this order" prose.
kSpecValidationFormat → const String
The format of the --json report.
kSpecValidationFormatVersion → const int
The formatVersion of the --json report. Bumped only on a breaking change.
kSpecValidationTiers → const List<String>
The three tiers, in the order they run.
kUniversalOption → const String
The option --help carries, excluded from the correspondence because every entrypoint declares it and the README documents it once in prose.
licenseText → const String
The workspace-standard release license text (BSD 3-Clause, per the release-1 licence decision), identical for every SOM package (runtime + facade, all nine languages) so a published package always carries a LICENSE file — an ecosystem publish requirement (e.g. pub.dev rejects a package with no LICENSE). Matches the published sibling Tom packages (tom_build_base).
modelPrimitiveTypeNames → const Set<String>
Dart's primitive type names, as they appear in a model member's declared type — the one place the set is written.
modelSurfaceStampPath → const String
Where the recorded fingerprint lives, relative to the tom_specs_clitool project root.
oeRegisterDocument → const String
The document that owns the register, relative to the container root.
operationsFile → const String
The file name of the generated operations suite.
proseContentTypes → const Set<String>
Content types that are prose, and so carry no schema format.
registryTestsHeader → const String
The header every generated file starts with.
releaseDriftIgnoredPaths → const List<String>
Paths inside a package that are not part of what it publishes.
requiredSpecModelMetaKeys → const Set<String>
Top-level keys every meta-data file must carry. modelVersionLabel and containerRoot are intentionally absent: the label is optional and the container root is legitimately null for a container-less model.
reviewerTreeRoot → const String
The reviewer's tree, relative to the container root.
screensFile → const String
The file name of the generated screens suite.
sectionIdPattern → const String
The shape of a section id: a dotted number, or an upper-case symbolic id.
sharedDocBaselinePath → const String
The committed baseline, relative to tom_specs_clitool.
sharedDocMinLength → const int
Doc-comment lines shorter than this are ignored.
shippedScriptDirs → const List<String>
Shipped directories whose contents must resolve inside their own package.
somDocument → const String
The document SOM abbreviates.
somStructuralAccessorNames → const Map<SomLanguage, Map<SomStructuralMember, List<String>>>
The identifiers each SomStructuralMember is emitted as, per language — getter and setter form where the language spells them separately.
specModelHashExcludedKeys → const Set<String>
The meta keys that say which build a file came from rather than what model it describes. They are left out of specModelContentHash so a version bump with no model change keeps the hash, and a model change with no version bump changes it — which is what lets the two be told apart.
specModelMetaSchemaVersion → const int
The on-disk meta-data schema version this build understands. Bump only when the file's structure changes in a way older readers cannot parse.
specOpsPathSegments → const List<String>
The registry's committed home, as path segments relative to the tom_specs_model package root.
tomSpecsPackageRoots → const List<String>
The TomSpecs package directories the coverage check inspects.

Properties

boundDocSpecsSchemaKeys → Set<String>
The schema keys the generator is expected to be able to emit.
no setter
docSpecsAnnotationBindingsByName → Map<String, DocSpecsAnnotationBinding>
Bindings keyed by annotation name.
no setter
oeIdPattern → RegExp
The shape of an OE- id: a number, optionally suffixed by a single letter for a sub-item (OE-1a, OE-24a).
final
oeRegisterHeading → RegExp
The heading that opens the register, at whatever section number it carries.
final
todoIdShape → RegExp
The general shape of a quest-todo id stem: at least two lowercase letters (the series) followed by one to three digits (the number).
final

Functions

alignRuntimeManifestVersion({required String runtimeDir, required PackagingDescriptor descriptor, required String version}) → void
Realigns the hand-authored runtime package's version to version. The runtime source is never regenerated; only its manifest version field is rewritten so runtime and facade stay in lockstep with the model version. No-op (leaves the file untouched) if it already declares version.
allowedDoclinkPackages(String packageDir) → Set<String>
The packages a doc comment of the package at packageDir may link into: the package itself, its direct dependencies, and — transitively — every package one of those re-exports from its lib/, because a reader of the barrel can name those types without importing anything else.
applyMigrations(Map<String, String> migrations) → Map<String, Set<String>>
Applies migrations in ascending version order, returning table name → lower-cased column names.
areasAccessorLibrary(String json) → String
The Dart source of the catalogue accessor library that ships beside the JSON, tom_specs_model/lib/codespecs_areas.dart.
assertCodeSpecsValid(CodeSpecsValidationInput input, {List<CodeSpecsCheck> checks = codeSpecsChecks}) → void
Runs the checks and throws CodeSpecsValidationException on any violation.
buildAreasCatalog(String mappingDocument, {String? promptDocument}) → AreasCatalog
Transcribes mappingDocument (the text of codespecs_mapping.md).
buildDartdoc({required String packageDir, required String scratchDir}) → Future<DartdocBuildReport>
Builds the documentation of the package at packageDir into a directory under scratchDir, reads it, deletes it, and reports.
checkAnnotationCatalogue(Directory annotationsDir) → AnnotationCatalogueCorrespondence
Compares the declared annotation classes against the mapping table.
checkApiSignatures({required String packageDir, required String docDir}) → Future<ApiSignatureReport>
Checks every summary under docDir against the public libraries of the package at packageDir.
checkDocCoverage({required DocCoverageManifest manifest, required String containerRoot}) → Future<DocCoverageReport>
Walks manifest against the tree under containerRoot.
checkDocFolder({required String docDir, required TodoCorpus corpus, List<String> extraFiles = const [], TodoCitationVocabulary vocabulary = const TodoCitationVocabulary.empty()}) → TodoCitationReport
Scans every *.md directly inside docDir, plus extraFiles, and classifies their citations.
checkFormatting({required String containerRoot, required FormatSet set}) → FormatReport
Runs dart format --output=none --set-exit-if-changed over set's directories under containerRoot.
checkInvariantCorrespondence(String clitoolRoot) → InvariantCorrespondence
Reads the canonical sources and checks tom_specs_model_rules.md §10.2 against the validator and the citing corpus.
checkOeCitations({required List<String> roots, required OeRegister register}) → OeCitationReport
Scans roots — each a file or a folder, absolute — against register.
checkRegistryTests(RegistryTestGeneration generation, Map<String, String?> existing) → List<RegistryFinding>
Compares the files on disk (existing, file name → content, absent when missing) with generation: a missing file, every case the registries give that a file lacks (a removed case), every case a file holds that the registries no longer give, and any other difference as a stale file.
checkReleaseClosure({required ReleaseManifest manifest, required String containerRoot}) → ClosureReport
Walks the release set's dependency graph under containerRoot and reports every edge that breaks the closure.
checkSectionCitations({required String docDir, SectionCorpus? corpus, Iterable<String> corpusDocuments = const [], Iterable<String> extraFiles = const [], Iterable<String> extraSources = const []}) → SectionCitationReport
Resolves the citations of every *.md directly inside docDir, against the documents in that same folder and the corpusDocuments named beside it.
classifyMarkdown(String markdown, {required String path, required TodoCorpus corpus, TodoCitationVocabulary vocabulary = const TodoCitationVocabulary.empty()}) → List<TodoCitation>
Finds and classifies every todo-id citation in markdown.
classifySectionCitations(String markdown, {required String path, required SectionCorpus corpus, DocumentSections? own}) → List<SectionCitation>
Finds and resolves every § citation in markdown.
codeSpecsBacklinkIndex(List<CsLocusProject> projects, {Map<String, String?> inputs = const {}}) → Map<String, Object?>
The back-link index over projects: one row per declaration, in project then source order.
codeSpecsReportJson(CodeSpecsValidationReport report, {Map<String, String?> inputs = const {}, List<Map<String, Object?>> notRun = const [], List<Map<String, Object?>> excludedAreas = const []}) → Map<String, Object?>
The --json report for report. Paths in inputs are echoed as given, and violation files are package-relative, so a recorded report does not name the machine it was produced on.
collectModelSourceFiles(String packagePath) → List<File>
The spec-model .dart source files under [packagePath]/lib/src, in a stable (path-sorted) order — the same set ModelReader reflects.
compareCsCheckTable({required String markdown, List<CodeSpecsCheck> checks = codeSpecsChecks}) → CsCheckTableCorrespondence
Compares codespecs_derivation_contract.md §6's table in markdown against checks.
compareEntrypointOptions({required String markdown, required Map<String, String> sources}) → EntrypointCorrespondence
Compares the README's bin/ table in markdown against the entrypoint sources in sources, keyed by file name (outliner.dart).
compareInvariants({required String rulesMarkdown, required String validatorSource, Map<String, String> corpus = const {}}) → InvariantCorrespondence
Compares the list of tom_specs_model_rules.md §10.2 against the validator's tags and the corpus citations.
computeModelSurface({required String modelPackagePath, required List<String> packages}) → ModelSurface
Computes the current model fingerprint.
computeReleaseDrift({required String containerRoot, required String manifestPath}) → ReleaseDriftReport
Computes the drift report for every Dart member of the manifest.
configuredPackageNames(SpecObjectModelConfig config) → List<String>
The generated package name for each target in config — the basename of its output root, so an explicit output: override is honoured.
createAnalysisDriver(String packagePath) → AnalysisDriver
Creates an AnalysisDriver using the embedded SDK summary.
csEscapeCommentLine(String line) → String
One line with C4.4's escapes applied.
csEscapedLines(String text) → List<String>
text split into lines with codespecs_derivation_contract.md §2.8 C4.4's two escapes applied — [ → \[, ] → \], < → &lt;.
dartDocComments(String source) → String
Lifts the /// doc comments of source out of the Dart around them.
docCommentLines(Directory root) → Set<String>
Every doc-comment line over sharedDocMinLength characters under root.
ensureGitignoreContent(String existing, List<String> globs) → String
Ensures existing .gitignore content ignores every glob in globs, appending the missing ones under a managed header. Idempotent — a file that already ignores all of them is returned unchanged.
extractAnswersParser() → ArgParser
The command's options.
findContainerRoot(Map<String, ModelClass> classes) → String?
Finds the canonical container root of the TomSpecs model (V2, N9).
findEscapingPaths(Directory packageRoot) → List<EscapingPath>
Every escaping path literal in packageRoot's shipped script directories.
findOeCitations(String text, {required String path, required OeRegister register, bool inRegisterDocument = false}) → List<OeCitation>
Finds every OE- citation in text.
findScanSetGaps({required String containerRoot, required Iterable<String> packageRoots, String docDir = 'tom_ai/ai_build/tom_specs_model/doc'}) → List<ScanSetGap>
Every citing file under containerRoot that no default scan set reaches.
findUnstampedModelMembers(String modelPackagePath) → Future<List<String>>
Reads the spec-model at modelPackagePath and returns unstampedMembers over it — the resolved-model verifier the generator runs after restamping.
fingerprintSources(List<File> files, {required String rootDir}) → LibrarySurface
Fingerprints files, rendering each relative to rootDir.
firstInlineCodeOf(String line) → String?
The content of the first inline-code span on line, or null.
generateRegistryTests(RegistrySet registries, {String harnessImport = 'registry_harness.dart'}) → RegistryTestGeneration
Generates the test files for registries; harnessImport is the import URI of the application's harness (default registry_harness.dart, beside the generated files).
generateSomCppProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomCppGenerationResult>
Generates the C++ v0 artefact tree from modelPackagePath into outputRoot.
generateSomCProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomCGenerationResult>
Generates the C v0 artefact tree from modelPackagePath into outputRoot.
generateSomDartProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomGenerationResult>
Generates the Dart v0 artefact tree from modelPackagePath into outputRoot.
generateSomGoProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomGoGenerationResult>
Generates the Go v0 artefact tree from modelPackagePath into outputRoot.
generateSomJavaProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomJavaGenerationResult>
Generates the Java v0 artefact tree from modelPackagePath into outputRoot.
generateSomJavaScriptProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomJavaScriptGenerationResult>
Generates the JavaScript v0 artefact tree from modelPackagePath into outputRoot.
generateSomPythonProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomPythonGenerationResult>
Generates the Python v0 artefact tree from modelPackagePath into outputRoot.
generateSomRustProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomRustGenerationResult>
Generates the Rust v0 artefact tree from modelPackagePath into outputRoot.
generateSomTypeScriptProject({required String modelPackagePath, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → Future<SomTypeScriptGenerationResult>
Generates the TypeScript v0 artefact tree from modelPackagePath into outputRoot.
generateSpecOpsRegistry({required String modelPackagePath, String? outputPath}) → Future<SpecOpsResult>
Regenerates the spec_ops.g.dart registry from the model package at modelPackagePath, writing it to specOpsOutputFor unless outputPath names somewhere else.
hashComments(String source) → String
Lifts the # comments of a shell script, Python script or YAML manifest out of the lines around them — the non-Dart twin of dartDocComments.
isPrimitiveTypeName(String typeName) → bool
Whether typeName — with or without a trailing ? — names a primitive.
isPubIgnored(String path, List<String> entries) → bool
Whether the package-relative path is covered by one of entries.
isScannedSource(String path) → bool
Whether path is a source file a scan set reads, by extension.
liftComments(String path, String source) → String
Lifts source's comments according to path's kind.
listDartSources(String root) → List<String>
Every .dart file under root, recursively, in path order.
listMarkdownSources(String root) → List<String>
Every *.md beneath root, recursively, sorted — the markdown twin of listDartSources.
listScannedSources(String root) → List<String>
Every source file under root a scan set reads, recursively, in path order.
loadAcknowledgedDrift(String manifestPath) → Map<String, String>
Reads the unpublished_drift: block: package name → reason.
measurePackage({required String packagePath, required String relativePath}) → Future<DocCoverageResult>
Measures one package's public API.
mergePackageRootsForDirs(Iterable<String> packageDirs) → Map<String, String>
Merges the package roots resolved from each given package directory's .dart_tool/package_config.json into a single name→root map.
modelChangeWithoutVersionBump({required String? previousHash, required String? previousVersion, required String modelHash, required String version}) → String?
The warning generate_som prints when the model's content changed since the last canonical run but its version did not, or null when there is nothing to say.
modelMajorOfLabel(String? label) → int?
The model major label declares, or null when it declares none.
modelVersionStampPath(String modelDir) → String
The path of the generated stamp source inside modelDir.
packageVersionFromModel(String modelVersion) → String
The canonical package version derived from the TomSpecs modelVersion string (major.minor, e.g. '1.0').
packagingDescriptorFor(SomLanguage language) → PackagingDescriptor?
The PackagingDescriptor for language, or null when none is registered yet (in which case the generator's packaging hook is a no-op for it).
parseCsCheckRows(String markdown) → List<CsCheckRow>
The | # | Check | Defined in | Implemented by | rows of codespecs_derivation_contract.md §6.
parseEntrypointOptions(String source) → List<EntrypointOption>
Parses the options an entrypoint declares out of its Dart source.
parseEntrypointRows(String markdown) → List<EntrypointRow>
Parses the bin/ entrypoint table out of the README in markdown.
parseInvariantCitations(String source, {String sourceName = 'source'}) → List<InvariantCitation>
Extracts from source every citation of an invariant of tom_specs_model_rules.md §10.2.
parseInvariantEntries(String source) → List<InvariantEntry>
Extracts the numbered invariant list of tom_specs_model_rules.md §10.2 from the rules document source.
permits(RegistryRequirement requirement, RegistryRole? role) → bool?
Whether role satisfies requirement, or null when the registries cannot decide (a custom handler, a graded or resource-key requirement, none).
readCitingCorpus(String clitoolRoot) → Map<String, String>
Reads the corpus files under clitoolRoot, keyed by a path for messages.
readCsEnumMirrors({required Iterable<String> csSources, required Iterable<String> coreSources, Map<String, String> pairs = csMirroredEnumPairs}) → List<CsEnumMirror>
Pairs the Cs* catalogues in csSources with their tom_core counterparts in coreSources, for check 9.
readCsExtracts(Map<String, String> sources) → CsExtractSet
Reads sources — file name → YAML text — into a CsExtractSet.
readCsFeatureCatalogue(Iterable<String> sources) → CsFeatureCatalogue?
Reads the framework protocol-feature catalogue — csFeatureHooks and csFeatureReservedPaths — out of tom_code_specs' vocabulary sources, for checks 40 and 41.
readCsLocusProject({required CsLocus locus, required String packageName, required Map<String, String> sources}) → CsLocusProject
Reads one locus project from in-memory sources — path → Dart source.
readCsLocusProjectFromDirectory({required CsLocus locus, required String packageName, required String root}) → CsLocusProject
Reads one locus project from a directory tree, taking every .dart file under lib/.
readDeclaredAnnotationClasses(Directory annotationsDir) → Set<String>
Scans annotationsDir (tom_specs_core/lib/src/annotations/) for the annotation classes it declares.
readEnumValues(String source, String enumName) → List<String>?
Reads the value names of enumName from source, in declaration order.
readFacadeSurface(String outputRoot) → FacadeSurface
Reads the FacadeSurface from the meta/spec_model.meta.json under outputRoot.
readModelSurfaceStamp({required String clitoolRoot}) → ModelSurface?
Reads the recorded stamp, or null when it has not been written yet.
readModelVersionStamp(String modelDir) → ModelVersionStamp
Parses the stamp produced by buildkit :versioner in modelDir.
readPackageRoots(File packageConfigFile) → Map<String, String>
Reads a resolved .dart_tool/package_config.json and returns a map of package-name → absolute package root directory (the directory that contains lib/).
readPubIgnore(String packageDir) → List<String>
The entries of packageDir's .pubignore, or none when it has no such file.
readPubignoreDirs(Directory packageRoot) → Set<String>
Directory prefixes .pubignore removes from the published archive.
readRegistries(SpecModel model, SpecDocument doc) → RegistrySet
Reads the registries of doc under model.
readSharedDocBaseline(File file) → Set<String>
Reads the committed baseline: one shared line per record, blank lines and # comments ignored.
registryTestIds(String content) → Set<String>
The test ids (OPS-…, SCR-…) a generated file declares.
renderChangelog(PackagingDescriptor d, {required String version}) → String
The facade CHANGELOG.md: a single entry at the model version. Package registries (pub.dev, npm) recommend a changelog; the SOM facade is fully regenerated per model version, so the changelog is a one-line statement of that fact rather than a hand-maintained history.
renderFacadeReadme(PackagingDescriptor d, {required String version, required FacadeSurface surface}) → String
The facade README.md — the tom_specs_documentation_standard.md §2 template, emitted rather than hand-written.
renderHowToIntegrate(PackagingDescriptor d, {required String version}) → String
The separate readme_howtointegrate.md: the full integration guide (all dependency routes, version pinning to the model version, build-from-source).
renderReleaseDrift(ReleaseDriftReport report) → List<String>
Renders report as the lines the CLI and the test both print.
resolveSpecDocumentRoot(SpecModel model, String? explicit, String text, {required bool isMarkdown}) → SpecRoot
The root explicit names, else the one the document declares: the key under document: in a YAML file (SBP D00SolutionBlueprint), the id of the title heading in a markdown rendition (# <!--[SBP]--> …). The root of a specification document: explicit (a root type or section id) when given, else the one the text declares — the first heading of a Markdown rendition, the document: key of a *.docspecs.yaml. Throws an ArgumentError naming the problem when it cannot be found.
rewriteManifestVersion(String content, ManifestFormat format, String version) → String
Rewrites the package's own version field in content to version for the given format, returning the updated content. Idempotent — rewriting to the same version leaves the text unchanged. Throws StateError if no version field is found (a malformed manifest the caller must fix).
runCodeSpecsChecks(CodeSpecsValidationInput input, {List<CodeSpecsCheck> checks = codeSpecsChecks}) → CodeSpecsValidationReport
Runs checks (by default all forty-one) over input.
runExtractAnswers(List<String> arguments, {StringSink? out, StringSink? err, SpecModel? model}) → Future<int>
Runs extract_answers over arguments. Exit codes: 0 written, 1 a document is unreadable or holds a malformed annotation, 2 bad usage.
runGenerateRegistryTests(List<String> arguments, {StringSink? out}) → Future<int>
Runs the command; returns the exit code.
runValidateCodespecs(List<String> arguments, {StringSink? out, StringSink? err}) → Future<int>
Runs the command over arguments and returns the exit code.
runValidateSpec(List<String> arguments, {StringSink? out, StringSink? err, SpecModel? model}) → Future<int>
Runs the command over arguments and returns the exit code.
sectionIdCoverageGaps(Map<String, ModelClass> classes, String rootTypeName) → List<String>
Returns the tom_specs_model_rules.md §10.2 @SectionId coverage gaps reachable from rootTypeName.
sharedSpecTreeDocs(String containerRoot) → Set<String>
The doc lines both trees state, given the container root.
slashComments(String source) → String
Lifts the comments of a C-family source — the third comment syntax the corpus writes.
somEmittedSurface(SpecModel model, {List<String> documentRoots = const []}) → SomEmittedSurface
Computes the SomEmittedSurface a run over model with documentRoots covers — the same two steps every emitter performs before emitting, so the reported figure cannot disagree with what was written.
somPackageCoverageMismatch({required SpecObjectModelConfig config, required String configDir, required List<String> stampedPackages}) → String?
Returns a description of any disagreement between the languages configured in tom_som.yaml and the packages a stamp certifies, or null when they match.
somReachableClasses(SpecModel model, Set<String> rootTypes) → Set<String>
The model classes reachable from rootTypes by following the field kinds that name another class — complex and section through SpecField.type, list through elementType when the element is complex.
somReachableEnums(SpecModel model, Set<String> reachable) → List<SomEnumType>
Every enum type reachable from reachable, in name order.
somReservedAccessorNames(SomLanguage language) → Set<String>
The flat set of accessor names a generated field accessor must not take in language.
somScalarBaseName(String typeName) → String
typeName without a trailing ?.
somSelectedRoots(SpecModel model, List<String> documentRoots) → List<SpecRoot>
The @Document roots a run with documentRoots generates for.
specModelContentHash(Map meta) → String
The sha256 (lowercase hex) of meta's canonical JSON, without the keys in specModelHashExcludedKeys.
specOpsOutputFor(String modelPackagePath) → String
The registry's absolute path inside the model package at modelPackagePath.
specSchemaIdFor(SpecRoot root) → String
The DocSpecs schema id of root: its @Document title, lower-cased and hyphenated (Solution Blueprint → solution-blueprint), the same derivation the schema generator uses.
staleSectionExemptions(String markdown, {required String path, required List<SectionCitation> citations}) → List<StaleSectionExemption>
The exhibit ids markdown declares but no citation on their line consumed.
stampSerializationOrder({required String packagePath, bool dryRun = false}) → SerializationStampResult
Stamps @SerializationOrder(n) above every non-static instance member of every class under [packagePath]/lib/src, numbered by source-declaration order (0-based, per class).
(stray, blocks, links) over the rendered pages under outputDir: each doc-prose link outside allowed as <page>: [text] -> <package>, once per (page, text, package); and the prose blocks and package links read, so a caller can refuse a vacuous pass.
targetForOutputPath(String outputPath) → ModelJsonTarget?
The committed target outputPath refers to, or null when it is an ad-hoc export location.
unreachableClasses(Map<String, ModelClass> classes) → List<String>
Returns the model classes that no @Document root can reach — sorted, empty for a healthy model.
unstampedMembers(Map<String, ModelClass> classes) → List<String>
The Class.member identifiers for every reflected field that lacks a current @SerializationOrder — empty when the model is fully stamped.
validateCodespecsParser() → ArgParser
The option set — exposed so the README correspondence test reads it.
validateModel(Map<String, ModelClass> classes, String rootTypeName) → ({List<String> errors, List<String> warnings})
Validates model classes against the tom_specs_model_rules.md §5 design rules.
validateSpecModelMeta(Object? meta) → List<String>
Validates a decoded meta-data map against schema version specModelMetaSchemaVersion. Returns a list of human-readable error strings; an empty list means the meta-data conforms and is safe to load.
validateSpecParser() → ArgParser
The option set — read by the README correspondence test.
validateStructuralInvariants(Map<String, ModelClass> classes) → ({List<String> errors, List<String> warnings})
Validates the tom_specs_model_rules.md §10.2 structural invariants of the TomSpecs object model.
writeAreasCatalog({required String mappingPath, String? promptPath, required String outputPath}) → String
Reads the mapping document at mappingPath and writes the catalogue to outputPath, returning the text written.
writeFacadePackaging({required String outputRoot, required PackagingDescriptor descriptor, required String version}) → void
Writes the facade's packaging docs (README.md, readme_howtointegrate.md, LICENSE, CHANGELOG.md) and ensures its .gitignore, all under outputRoot, stamped with version. This is the emit-hook generate_som.dart calls per target once the target has a registered PackagingDescriptor. LICENSE and CHANGELOG.md are ecosystem-neutral (every registry benefits from them), so they live here rather than in a per-language generator.
writeModelSurfaceStamp(ModelSurface surface, {required String clitoolRoot}) → void
Writes surface to the stamp file. Called by bin/generate_som.dart, never by a test — a test that could re-stamp would only ever agree with itself.
writeSharedDocBaseline(File file, Set<String> lines) → void
Writes lines as the baseline, sorted, with a header explaining the file.
writeSomCppProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomCppGenerationResult
Writes the C++ artefact tree from an already-analysed classes graph.
writeSomCProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomCGenerationResult
Writes the C artefact tree from an already-analysed classes graph.
writeSomDartProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomGenerationResult
Writes the artefact tree from an already-analysed classes graph.
writeSomGoProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomGoGenerationResult
Writes the Go artefact tree from an already-analysed classes graph.
writeSomJavaProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomJavaGenerationResult
Writes the Java artefact tree from an already-analysed classes graph.
writeSomJavaScriptProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomJavaScriptGenerationResult
Writes the JavaScript artefact tree from an already-analysed classes graph.
writeSomPythonProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomPythonGenerationResult
Writes the Python artefact tree from an already-analysed classes graph.
writeSomRustProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomRustGenerationResult
Writes the Rust artefact tree from an already-analysed classes graph.
writeSomTypeScriptProject({required Map<String, ModelClass> classes, Map<String, ModelEnum> enums = const {}, required String runtimePackagePath, required String outputRoot, required int modelVersion, required String modelLabel, required String generatedAt, String versionLabel = 'v0', List<String> documentRoots = const []}) → SomTypeScriptGenerationResult
Writes the TypeScript artefact tree from an already-analysed classes graph.

Typedefs

CsGateVerdict = CodeSpecsGateVerdict
One of codespecs_prompt.md §6.2's three per-area verdicts — the runtime's CodeSpecsGateVerdict.

Exceptions / Errors

AreasCatalogException
A failure to transcribe the mapping document — a missing table, a row that does not parse, or a cross-table disagreement.
CodeSpecsValidationException
Thrown when a validation pass fails, so a caller that treats generation as a single operation can let the failure propagate.
CsExtractException
A malformed or unreadable extract.
CsFeatureCatalogueException
Thrown when a vocabulary source carries a feature catalogue the text parser cannot read completely.
ModelVersionStampException
Thrown when the version stamp is missing or unparseable.
SpecObjectModelConfigException
Raised when the tom-spec-object-model config block is malformed — an unknown/duplicate language, an empty target set, a wrong-typed value, or a missing top-level block in a YAML document.
SummaryConfigException
Raised when a package directory has no resolved .dart_tool/package_config.json (i.e. pub get has not been run there), or when a grouped bundle cannot be built (no SDK / no libraries).