domainforge 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cargo/config.toml +6 -0
- package/.claude/settings.local.json +18 -0
- package/.coderabbit.yml +43 -0
- package/.codex/skills/release-management/SKILL.md +151 -0
- package/.codex/skills/release-management/agents/openai.yaml +4 -0
- package/.github/actions/decrypt-secrets/action.yml +121 -0
- package/.github/agents/Coder.agent.md +97 -0
- package/.github/agents/DeepResearch.agent.md +61 -0
- package/.github/chatmodes/tdd.vibepro.chatmode.md +1183 -0
- package/.github/copilot-instructions.md +13 -0
- package/.github/dependabot.yml +68 -0
- package/.github/workflows/README.md +165 -0
- package/.github/workflows/ci.yml +335 -0
- package/.github/workflows/dependabot-automerge.yml +114 -0
- package/.github/workflows/dependency-review.yml +27 -0
- package/.github/workflows/deploy.yml +87 -0
- package/.github/workflows/prepare-release.yml +168 -0
- package/.github/workflows/release-crates.yml +42 -0
- package/.github/workflows/release-npm.yml +137 -0
- package/.github/workflows/release-please.yml +29 -0
- package/.github/workflows/release-pypi.yml +96 -0
- package/.gitkeep +1 -0
- package/.release-please-manifest.json +5 -0
- package/.sea-registry.toml +10 -0
- package/.serena/project.yml +133 -0
- package/.sops.yaml +10 -0
- package/AGENTS.md +216 -0
- package/CHANGELOG.md +400 -0
- package/CLAUDE.md +62 -0
- package/CONTRIBUTING.md +323 -0
- package/Cargo.lock +3612 -0
- package/Cargo.toml +12 -0
- package/LICENSE +201 -0
- package/README.md +660 -0
- package/README_PYTHON.md +256 -0
- package/README_TYPESCRIPT.md +305 -0
- package/README_WASM.md +329 -0
- package/RELEASE_NOTES.md +41 -0
- package/bun.lock +378 -0
- package/bunfig.toml +11 -0
- package/check_output.txt +83 -0
- package/clippy_output.txt +80 -0
- package/commitlint.config.cjs +8 -0
- package/deny.toml +42 -0
- package/devbox.json +14 -0
- package/devbox.lock +76 -0
- package/docs/RELEASE_PROCESS.md +360 -0
- package/docs/diagnostics.md +161 -0
- package/docs/doc_guidelines.md +53 -0
- package/docs/explanations/README.md +21 -0
- package/docs/explanations/architecture-overview.md +109 -0
- package/docs/explanations/cross-language-binding-strategy.md +68 -0
- package/docs/explanations/graph-store-design.md +47 -0
- package/docs/explanations/performance-benchmarks.md +63 -0
- package/docs/explanations/policy-evaluation-logic.md +106 -0
- package/docs/explanations/semantic-modeling-concepts.md +109 -0
- package/docs/explanations/three-valued-logic.md +66 -0
- package/docs/explanations/versioning-strategy.md +45 -0
- package/docs/governance.md +168 -0
- package/docs/how-tos/README.md +46 -0
- package/docs/how-tos/ci-cd-validation.md +93 -0
- package/docs/how-tos/create-custom-units.md +125 -0
- package/docs/how-tos/define-policies.md +119 -0
- package/docs/how-tos/export-to-calm.md +110 -0
- package/docs/how-tos/export-to-protobuf.md +312 -0
- package/docs/how-tos/extend-grammar.md +133 -0
- package/docs/how-tos/generate-rdf-turtle.md +106 -0
- package/docs/how-tos/import-from-calm.md +114 -0
- package/docs/how-tos/import-from-sbvr.md +249 -0
- package/docs/how-tos/install-cli.md +126 -0
- package/docs/how-tos/parse-sea-files.md +132 -0
- package/docs/how-tos/policy-evaluation-modes.md +30 -0
- package/docs/how-tos/run-cross-language-tests.md +115 -0
- package/docs/how-tos/troubleshoot-napi-builds.md +55 -0
- package/docs/how-tos/use-modules-imports.md +285 -0
- package/docs/index.md +13 -0
- package/docs/plans/canonical-normalizer.md +121 -0
- package/docs/plans/cd_improvement.md +112 -0
- package/docs/plans/cli-ast.md +29 -0
- package/docs/plans/expression-bindings-and-normalizer-integration.md +174 -0
- package/docs/plans/protobuf_advanced_features_plan.md +597 -0
- package/docs/plans/protobuf_plan.yml +525 -0
- package/docs/plans/refactor_dsl_architecture.md +131 -0
- package/docs/plans/release-plan.md +163 -0
- package/docs/plans/sea_fmt_implementation_plan.md +516 -0
- package/docs/playbooks/README.md +18 -0
- package/docs/playbooks/adding-new-primitive.md +68 -0
- package/docs/playbooks/debugging-parser-failures.md +42 -0
- package/docs/playbooks/local-release-preparation.md +139 -0
- package/docs/playbooks/migrating-schema-versions.md +43 -0
- package/docs/playbooks/onboarding-contributors.md +64 -0
- package/docs/playbooks/releasing-beta.md +86 -0
- package/docs/playbooks/secret-management.md +64 -0
- package/docs/reference/README.md +199 -0
- package/docs/reference/ast-json-api.md +427 -0
- package/docs/reference/calm-mapping.md +519 -0
- package/docs/reference/cli-commands.md +588 -0
- package/docs/reference/configuration.md +202 -0
- package/docs/reference/error-codes.md +664 -0
- package/docs/reference/generated-artifacts-policy.md +53 -0
- package/docs/reference/grammar-spec.md +255 -0
- package/docs/reference/primitives-api.md +317 -0
- package/docs/reference/protobuf-api.md +426 -0
- package/docs/reference/python-api.md +485 -0
- package/docs/reference/registry.md +50 -0
- package/docs/reference/sea-dsl-ai-cheatsheet.yaml +913 -0
- package/docs/reference/security-model.md +74 -0
- package/docs/reference/typescript-api.md +508 -0
- package/docs/reference/wasm-api.md +420 -0
- package/docs/semantic-pack-review.md +144 -0
- package/docs/semantic-pack-signing.md +234 -0
- package/docs/semantic-packs.md +284 -0
- package/docs/specs/ADR-001-sea-dsl-semantic-source-of-truth.md +33 -0
- package/docs/specs/ADR-002-projection-first-class-construct.md +50 -0
- package/docs/specs/ADR-003-protobuf-projection-target.md +51 -0
- package/docs/specs/ADR-004-projection-compatibility-semantics.md +57 -0
- package/docs/specs/ADR-005-multi-language-support-strategy.md +112 -0
- package/docs/specs/ADR-006-error-handling-strategy.md +115 -0
- package/docs/specs/ADR-007-policy-evaluation-engine.md +95 -0
- package/docs/specs/ADR-008-knowledge-graph-integration.md +90 -0
- package/docs/specs/ADR-009-module-resolution-strategy.md +115 -0
- package/docs/specs/ADR-010-unit-system.md +106 -0
- package/docs/specs/PRD-001-sea-projection-framework.md +155 -0
- package/docs/specs/PRD-002-sea-cli-tooling.md +169 -0
- package/docs/specs/PRD-003-dsl-core-capabilities.md +275 -0
- package/docs/specs/README.md +62 -0
- package/docs/specs/SDS-001-protobuf-projection-engine.md +451 -0
- package/docs/specs/SDS-002-sea-core-architecture.md +268 -0
- package/docs/specs/SDS-003-parser-semantic-graph.md +377 -0
- package/docs/specs/SDS-004-policy-engine-design.md +362 -0
- package/docs/specs/SDS-005-knowledge-graph-module.md +364 -0
- package/docs/specs/SDS-006-calm-integration.md +367 -0
- package/docs/specs/SDS-007-sbvr-import.md +347 -0
- package/docs/templates/template_explanation.md +14 -0
- package/docs/templates/template_howto.md +21 -0
- package/docs/templates/template_playbook.md +21 -0
- package/docs/templates/template_reference.md +17 -0
- package/docs/templates/template_tutorial.md +24 -0
- package/docs/tutorials/README.md +12 -0
- package/docs/tutorials/first-sea-model.md +85 -0
- package/docs/tutorials/getting-started.md +98 -0
- package/docs/tutorials/python-binding-quickstart.md +107 -0
- package/docs/tutorials/typescript-binding-quickstart.md +91 -0
- package/docs/tutorials/wasm-in-browser.md +75 -0
- package/domainforge-core/CHANGELOG.md +138 -0
- package/domainforge-core/Cargo.toml +101 -0
- package/domainforge-core/MIGRATING.md +32 -0
- package/domainforge-core/README.md +197 -0
- package/domainforge-core/benchmark_results.txt +51 -0
- package/domainforge-core/build.rs +6 -0
- package/domainforge-core/deny.toml +31 -0
- package/domainforge-core/docs/specs/projections/sbvr_kg_mapping.md +43 -0
- package/domainforge-core/examples/basic.sea +7 -0
- package/domainforge-core/examples/cli/import_export_workflow.sh +38 -0
- package/domainforge-core/examples/cli/validate_example.sh +30 -0
- package/domainforge-core/examples/evolution_semantics.sea +31 -0
- package/domainforge-core/examples/parser_demo.rs +203 -0
- package/domainforge-core/grammar/sea.pest +408 -0
- package/domainforge-core/schemas/calm-v1.schema.json +170 -0
- package/domainforge-core/schemas/shacl/sea_shapes.ttl +19 -0
- package/domainforge-core/src/authority/compiler.rs +309 -0
- package/domainforge-core/src/authority/environment.rs +203 -0
- package/domainforge-core/src/authority/error.rs +164 -0
- package/domainforge-core/src/authority/fact_resolver.rs +224 -0
- package/domainforge-core/src/authority/mod.rs +25 -0
- package/domainforge-core/src/authority/pack.rs +133 -0
- package/domainforge-core/src/authority/policy.rs +224 -0
- package/domainforge-core/src/authority/resolver.rs +446 -0
- package/domainforge-core/src/authority/trace.rs +217 -0
- package/domainforge-core/src/authority/transform.rs +168 -0
- package/domainforge-core/src/authority/types.rs +617 -0
- package/domainforge-core/src/bin/domainforge.rs +25 -0
- package/domainforge-core/src/calm/export.rs +538 -0
- package/domainforge-core/src/calm/import.rs +1220 -0
- package/domainforge-core/src/calm/mod.rs +9 -0
- package/domainforge-core/src/calm/models.rs +108 -0
- package/domainforge-core/src/calm/sbvr_import.rs +9 -0
- package/domainforge-core/src/cli/authority.rs +149 -0
- package/domainforge-core/src/cli/format.rs +85 -0
- package/domainforge-core/src/cli/import.rs +133 -0
- package/domainforge-core/src/cli/mod.rs +64 -0
- package/domainforge-core/src/cli/normalize.rs +180 -0
- package/domainforge-core/src/cli/pack.rs +904 -0
- package/domainforge-core/src/cli/parse.rs +112 -0
- package/domainforge-core/src/cli/project.rs +294 -0
- package/domainforge-core/src/cli/registry.rs +41 -0
- package/domainforge-core/src/cli/test.rs +12 -0
- package/domainforge-core/src/cli/validate.rs +195 -0
- package/domainforge-core/src/cli/validate_kg.rs +80 -0
- package/domainforge-core/src/concept_id.rs +89 -0
- package/domainforge-core/src/error/diagnostics.rs +426 -0
- package/domainforge-core/src/error/fuzzy.rs +253 -0
- package/domainforge-core/src/error/mod.rs +13 -0
- package/domainforge-core/src/formatter/comments.rs +223 -0
- package/domainforge-core/src/formatter/config.rs +114 -0
- package/domainforge-core/src/formatter/mod.rs +22 -0
- package/domainforge-core/src/formatter/printer.rs +906 -0
- package/domainforge-core/src/graph/mod.rs +858 -0
- package/domainforge-core/src/graph/to_ast.rs +66 -0
- package/domainforge-core/src/kg.rs +1476 -0
- package/domainforge-core/src/kg_import.rs +251 -0
- package/domainforge-core/src/lib.rs +203 -0
- package/domainforge-core/src/module/mod.rs +1 -0
- package/domainforge-core/src/module/resolver.rs +260 -0
- package/domainforge-core/src/parser/ast.rs +2919 -0
- package/domainforge-core/src/parser/ast_convert.rs +494 -0
- package/domainforge-core/src/parser/ast_schema.rs +491 -0
- package/domainforge-core/src/parser/error.rs +291 -0
- package/domainforge-core/src/parser/lint.rs +39 -0
- package/domainforge-core/src/parser/mod.rs +193 -0
- package/domainforge-core/src/parser/printer.rs +702 -0
- package/domainforge-core/src/parser/profiles.rs +71 -0
- package/domainforge-core/src/parser/string_utils.rs +138 -0
- package/domainforge-core/src/patterns.rs +68 -0
- package/domainforge-core/src/policy/core.rs +1148 -0
- package/domainforge-core/src/policy/expression.rs +399 -0
- package/domainforge-core/src/policy/mod.rs +18 -0
- package/domainforge-core/src/policy/normalize.rs +1028 -0
- package/domainforge-core/src/policy/quantifier.rs +940 -0
- package/domainforge-core/src/policy/three_valued.rs +140 -0
- package/domainforge-core/src/policy/three_valued_microbench.rs +104 -0
- package/domainforge-core/src/policy/type_inference.rs +67 -0
- package/domainforge-core/src/policy/violation.rs +36 -0
- package/domainforge-core/src/primitives/concept_change.rs +61 -0
- package/domainforge-core/src/primitives/entity.rs +224 -0
- package/domainforge-core/src/primitives/flow.rs +111 -0
- package/domainforge-core/src/primitives/instance.rs +93 -0
- package/domainforge-core/src/primitives/mapping_contract.rs +50 -0
- package/domainforge-core/src/primitives/metric.rs +79 -0
- package/domainforge-core/src/primitives/mod.rs +25 -0
- package/domainforge-core/src/primitives/projection_contract.rs +50 -0
- package/domainforge-core/src/primitives/quantity.rs +56 -0
- package/domainforge-core/src/primitives/relation.rs +68 -0
- package/domainforge-core/src/primitives/resource.rs +237 -0
- package/domainforge-core/src/primitives/resource_instance.rs +88 -0
- package/domainforge-core/src/primitives/role.rs +49 -0
- package/domainforge-core/src/projection/buf.rs +404 -0
- package/domainforge-core/src/projection/contracts.rs +22 -0
- package/domainforge-core/src/projection/engine.rs +19 -0
- package/domainforge-core/src/projection/mod.rs +16 -0
- package/domainforge-core/src/projection/protobuf.rs +3331 -0
- package/domainforge-core/src/projection/registry.rs +43 -0
- package/domainforge-core/src/python/authority.rs +253 -0
- package/domainforge-core/src/python/error.rs +227 -0
- package/domainforge-core/src/python/formatter.rs +86 -0
- package/domainforge-core/src/python/graph.rs +366 -0
- package/domainforge-core/src/python/mod.rs +9 -0
- package/domainforge-core/src/python/policy.rs +651 -0
- package/domainforge-core/src/python/primitives.rs +796 -0
- package/domainforge-core/src/python/registry.rs +98 -0
- package/domainforge-core/src/python/semantic_pack.rs +619 -0
- package/domainforge-core/src/python/units.rs +96 -0
- package/domainforge-core/src/registry/mod.rs +432 -0
- package/domainforge-core/src/registry/tests.rs +210 -0
- package/domainforge-core/src/sbvr.rs +744 -0
- package/domainforge-core/src/semantic_pack/builder.rs +470 -0
- package/domainforge-core/src/semantic_pack/canonical_json.rs +184 -0
- package/domainforge-core/src/semantic_pack/diagnostics.rs +214 -0
- package/domainforge-core/src/semantic_pack/diff.rs +216 -0
- package/domainforge-core/src/semantic_pack/mod.rs +31 -0
- package/domainforge-core/src/semantic_pack/pack_set.rs +240 -0
- package/domainforge-core/src/semantic_pack/resolver.rs +437 -0
- package/domainforge-core/src/semantic_pack/review.rs +125 -0
- package/domainforge-core/src/semantic_pack/schema.rs +342 -0
- package/domainforge-core/src/semantic_pack/signing.rs +105 -0
- package/domainforge-core/src/semantic_pack/validator.rs +368 -0
- package/domainforge-core/src/semantic_version.rs +140 -0
- package/domainforge-core/src/test_utils.rs +12 -0
- package/domainforge-core/src/typescript/authority.rs +184 -0
- package/domainforge-core/src/typescript/error.rs +146 -0
- package/domainforge-core/src/typescript/formatter.rs +76 -0
- package/domainforge-core/src/typescript/graph.rs +391 -0
- package/domainforge-core/src/typescript/mod.rs +9 -0
- package/domainforge-core/src/typescript/policy.rs +564 -0
- package/domainforge-core/src/typescript/primitives.rs +784 -0
- package/domainforge-core/src/typescript/registry.rs +88 -0
- package/domainforge-core/src/typescript/semantic_pack.rs +470 -0
- package/domainforge-core/src/typescript/units.rs +76 -0
- package/domainforge-core/src/units/mod.rs +462 -0
- package/domainforge-core/src/uuid_module.rs +42 -0
- package/domainforge-core/src/validation_error.rs +818 -0
- package/domainforge-core/src/validation_result.rs +30 -0
- package/domainforge-core/src/wasm/authority.rs +192 -0
- package/domainforge-core/src/wasm/error.rs +145 -0
- package/domainforge-core/src/wasm/formatter.rs +69 -0
- package/domainforge-core/src/wasm/graph.rs +471 -0
- package/domainforge-core/src/wasm/mod.rs +16 -0
- package/domainforge-core/src/wasm/policy.rs +607 -0
- package/domainforge-core/src/wasm/primitives.rs +295 -0
- package/domainforge-core/src/wasm/semantic_pack.rs +471 -0
- package/domainforge-core/src/wasm/units.rs +62 -0
- package/domainforge-core/std/aws.sea +6 -0
- package/domainforge-core/std/core.sea +6 -0
- package/domainforge-core/std/http.sea +27 -0
- package/domainforge-core/tests/aggregation_enhanced_tests.rs +162 -0
- package/domainforge-core/tests/aggregation_eval_tests.rs +248 -0
- package/domainforge-core/tests/aggregation_integration_tests.rs +379 -0
- package/domainforge-core/tests/aggregation_parser_tests.rs +92 -0
- package/domainforge-core/tests/aggregation_tests.rs +102 -0
- package/domainforge-core/tests/authority_conformance_tests.rs +1173 -0
- package/domainforge-core/tests/calm_round_trip_tests.rs +283 -0
- package/domainforge-core/tests/calm_schema_validation_tests.rs +137 -0
- package/domainforge-core/tests/cast_operator_tests.rs +85 -0
- package/domainforge-core/tests/cli_binary_check.rs +37 -0
- package/domainforge-core/tests/cli_import_tests.rs +291 -0
- package/domainforge-core/tests/cli_path_traversal_tests.rs +124 -0
- package/domainforge-core/tests/cli_tests.rs +63 -0
- package/domainforge-core/tests/diagnostics_tests.rs +203 -0
- package/domainforge-core/tests/dimension_unit_tests.rs +80 -0
- package/domainforge-core/tests/entity_tests.rs +69 -0
- package/domainforge-core/tests/evolution_semantics_tests.rs +157 -0
- package/domainforge-core/tests/flow_tests.rs +78 -0
- package/domainforge-core/tests/flow_unit_validation_tests.rs +31 -0
- package/domainforge-core/tests/graph_integration_tests.rs +218 -0
- package/domainforge-core/tests/graph_tests.rs +626 -0
- package/domainforge-core/tests/import_parsing_tests.rs +23 -0
- package/domainforge-core/tests/instance_integration_tests.rs +98 -0
- package/domainforge-core/tests/instance_parsing_tests.rs +58 -0
- package/domainforge-core/tests/instance_tests.rs +61 -0
- package/domainforge-core/tests/kg_uri_encoding_tests.rs +53 -0
- package/domainforge-core/tests/lint_tests.rs +19 -0
- package/domainforge-core/tests/metric_tests.rs +143 -0
- package/domainforge-core/tests/module_resolution_tests.rs +100 -0
- package/domainforge-core/tests/namespace_registry_tests.rs +247 -0
- package/domainforge-core/tests/null_handling_tests.rs +26 -0
- package/domainforge-core/tests/parser_ast_v3.rs +53 -0
- package/domainforge-core/tests/parser_dimension_registry_tests.rs +20 -0
- package/domainforge-core/tests/parser_integration_tests.rs +294 -0
- package/domainforge-core/tests/parser_metadata_tests.rs +97 -0
- package/domainforge-core/tests/parser_resource_domain_only_graph_test.rs +21 -0
- package/domainforge-core/tests/parser_resource_limits_tests.rs +122 -0
- package/domainforge-core/tests/parser_tests.rs +512 -0
- package/domainforge-core/tests/pattern_semantics_tests.rs +87 -0
- package/domainforge-core/tests/phase_14_determinism_tests.rs +166 -0
- package/domainforge-core/tests/phase_15_validation_error_tests.rs +136 -0
- package/domainforge-core/tests/phase_16_unicode_tests.rs +248 -0
- package/domainforge-core/tests/phase_17_export_tests.rs +285 -0
- package/domainforge-core/tests/phase_17_round_trip_tests.rs +264 -0
- package/domainforge-core/tests/policy_tests.rs +635 -0
- package/domainforge-core/tests/primitives_integration_tests.rs +151 -0
- package/domainforge-core/tests/print_rdf_xml.rs +14 -0
- package/domainforge-core/tests/printer_tests.rs +204 -0
- package/domainforge-core/tests/profile_tests.rs +35 -0
- package/domainforge-core/tests/projection_contracts_tests.rs +154 -0
- package/domainforge-core/tests/protobuf_projection_tests.rs +199 -0
- package/domainforge-core/tests/quantity_tests.rs +41 -0
- package/domainforge-core/tests/rdf_xml_typed_literal_tests.rs +105 -0
- package/domainforge-core/tests/registry_schema_tests.rs +33 -0
- package/domainforge-core/tests/resource_tests.rs +50 -0
- package/domainforge-core/tests/resource_unit_tests.rs +24 -0
- package/domainforge-core/tests/roles_relations_tests.rs +61 -0
- package/domainforge-core/tests/round_trip_tests.rs +34 -0
- package/domainforge-core/tests/runtime_toggle_tests.rs +70 -0
- package/domainforge-core/tests/sbvr_fact_schema_tests.rs +60 -0
- package/domainforge-core/tests/sbvr_flow_facts_tests.rs +55 -0
- package/domainforge-core/tests/sbvr_parsing_tests.rs +53 -0
- package/domainforge-core/tests/semantic_pack_alias_resolution.rs +197 -0
- package/domainforge-core/tests/semantic_pack_build.rs +302 -0
- package/domainforge-core/tests/semantic_pack_consumer_smoke.rs +150 -0
- package/domainforge-core/tests/semantic_pack_pack_set.rs +160 -0
- package/domainforge-core/tests/semantic_pack_signing.rs +157 -0
- package/domainforge-core/tests/semantic_pack_three_valued.rs +250 -0
- package/domainforge-core/tests/semantic_pack_validate.rs +196 -0
- package/domainforge-core/tests/std_lib_tests.rs +37 -0
- package/domainforge-core/tests/temporal_evaluation_tests.rs +159 -0
- package/domainforge-core/tests/temporal_semantics_tests.rs +214 -0
- package/domainforge-core/tests/three_valued_quantifiers_tests.rs +164 -0
- package/domainforge-core/tests/turtle_entity_export_tests.rs +38 -0
- package/domainforge-core/tests/turtle_escaping_tests.rs +53 -0
- package/domainforge-core/tests/turtle_resource_export_tests.rs +34 -0
- package/domainforge-core/tests/type_inference_tests.rs +40 -0
- package/domainforge-core/tests/unicode_validation_tests.rs +169 -0
- package/domainforge-core/tests/unit_tests.rs +81 -0
- package/domainforge-core/tests/validate_tests.rs +38 -0
- package/domainforge-core/tests/validation_unit_mismatch_tests.rs +83 -0
- package/domainforge-core/tests/wasm_tests.rs +229 -0
- package/domainforge-python/CHANGELOG-python.md +12 -0
- package/domainforge-python/MIGRATING.md +24 -0
- package/domainforge-python/README.md +256 -0
- package/domainforge-python/domainforge/__init__.py +95 -0
- package/domainforge-python/domainforge/domainforge.pyi +519 -0
- package/domainforge-python/pyproject.toml +36 -0
- package/domainforge-typescript/CHANGELOG-typescript.md +12 -0
- package/domainforge-typescript/LICENSE +201 -0
- package/domainforge-typescript/MIGRATING.md +24 -0
- package/domainforge-typescript/README.md +305 -0
- package/domainforge-typescript/index.d.ts +452 -0
- package/domainforge-typescript/index.js +361 -0
- package/domainforge-typescript/package.json +60 -0
- package/example.js +61 -0
- package/examples/browser.html +366 -0
- package/examples/namespaces/finance/cashflow.sea +5 -0
- package/examples/namespaces/logistics/core.sea +7 -0
- package/examples/observability_metrics.sea +38 -0
- package/fixtures/semantic_packs/acme_procurement/domain/entities.sea +39 -0
- package/fixtures/semantic_packs/acme_procurement/domain/metrics.sea +11 -0
- package/fixtures/semantic_packs/acme_procurement/domain/relations.sea +7 -0
- package/fixtures/semantic_packs/acme_procurement/domain/resources.sea +9 -0
- package/fixtures/semantic_packs/acme_procurement/review/acme.procurement.semantic-review.jsonl +7 -0
- package/fixtures/semantic_packs/acme_procurement/tests/ambiguous_vendor_alias.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/deprecated_vendor_alias.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/invalid_relation.sea +3 -0
- package/fixtures/semantic_packs/acme_procurement/tests/proposed_concept.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/rejected_concept.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/unit_mismatch.sea +7 -0
- package/fixtures/semantic_packs/acme_procurement/tests/unknown_vendor_policy.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/valid_purchase_policy.sea +8 -0
- package/index.d.ts +2 -0
- package/index.js +8 -0
- package/justfile +200 -0
- package/lefthook.yml +13 -0
- package/lib/validate_native_exports.d.ts +4 -0
- package/lib/validate_native_exports.js +12 -0
- package/package.json +22 -0
- package/pytest.ini +5 -0
- package/python/tests/test_registry.py +75 -0
- package/python/tests/test_units.py +18 -0
- package/release-please-config.json +49 -0
- package/requirements-dev.txt +3 -0
- package/requirements.txt +3 -0
- package/rust-toolchain.toml +3 -0
- package/schemas/ast-v1.schema.json +72 -0
- package/schemas/ast-v2.schema.json +1200 -0
- package/schemas/ast-v3.schema.json +1200 -0
- package/schemas/sea-registry.schema.json +45 -0
- package/scripts/build-python.sh +37 -0
- package/scripts/build-release.sh +279 -0
- package/scripts/build-typescript.sh +13 -0
- package/scripts/build-wasm.sh +113 -0
- package/scripts/bump-version.sh +245 -0
- package/scripts/check_unused_test_imports.py +85 -0
- package/scripts/ci_tasks.py +379 -0
- package/scripts/clear_debug_test.sh +10 -0
- package/scripts/create-github-release.sh +262 -0
- package/scripts/create-tag.sh +203 -0
- package/scripts/find_and_link_test_binary.sh +70 -0
- package/scripts/generate-changelog.sh +271 -0
- package/scripts/generate-release-notes.sh +205 -0
- package/scripts/lint_release_security.py +96 -0
- package/scripts/lint_release_workflows.py +82 -0
- package/scripts/lint_workflow_gates.py +113 -0
- package/scripts/optimized-wasm-build.sh +61 -0
- package/scripts/patch_napi_types.py +62 -0
- package/scripts/pre-release-check.sh +289 -0
- package/scripts/prepare_rust_debug.sh +52 -0
- package/scripts/release.sh +373 -0
- package/scripts/resolve_rust_binary.py +230 -0
- package/scripts/run_commitlint.sh +29 -0
- package/scripts/test-all.sh +77 -0
- package/scripts/update_launch_program.py +93 -0
- package/secrets/README.md +27 -0
- package/secrets/secrets.yaml +21 -0
- package/test_integration.py +67 -0
- package/tests/test_authority.py +328 -0
- package/tests/test_ci_tasks.py +143 -0
- package/tests/test_expression.py +256 -0
- package/tests/test_golden_payment_flow.py +42 -0
- package/tests/test_graph.py +127 -0
- package/tests/test_instance.py +136 -0
- package/tests/test_parser.py +82 -0
- package/tests/test_primitives.py +68 -0
- package/tests/test_role_relation_parity.py +56 -0
- package/tests/test_runtime_toggle.py +156 -0
- package/tests/test_semantic_pack.py +639 -0
- package/tests/test_three_valued_eval.py +159 -0
- package/tsconfig.json +30 -0
- package/typescript-tests/advanced.test.ts +165 -0
- package/typescript-tests/authority.test.ts +216 -0
- package/typescript-tests/expression.test.ts +228 -0
- package/typescript-tests/golden-payment-flow.test.ts +51 -0
- package/typescript-tests/graph.test.ts +142 -0
- package/typescript-tests/native-binding.test.ts +20 -0
- package/typescript-tests/primitives.test.ts +88 -0
- package/typescript-tests/registry.test.ts +122 -0
- package/typescript-tests/role_relation.test.ts +63 -0
- package/typescript-tests/runtime_toggle.test.ts +141 -0
- package/typescript-tests/semantic-pack.test.ts +556 -0
- package/typescript-tests/three_valued_eval.test.ts +135 -0
- package/typescript-tests/units.test.ts +36 -0
- package/vitest.config.ts +13 -0
- package/wasm_demo.html +225 -0
package/deny.toml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[graph]
|
|
2
|
+
targets = [
|
|
3
|
+
"x86_64-unknown-linux-gnu",
|
|
4
|
+
"aarch64-apple-darwin",
|
|
5
|
+
"x86_64-pc-windows-msvc",
|
|
6
|
+
"wasm32-unknown-unknown",
|
|
7
|
+
]
|
|
8
|
+
all-features = true
|
|
9
|
+
|
|
10
|
+
[advisories]
|
|
11
|
+
unmaintained = "workspace"
|
|
12
|
+
unsound = "all"
|
|
13
|
+
ignore = []
|
|
14
|
+
|
|
15
|
+
[bans]
|
|
16
|
+
multiple-versions = "warn"
|
|
17
|
+
wildcards = "deny"
|
|
18
|
+
|
|
19
|
+
[sources]
|
|
20
|
+
unknown-registry = "deny"
|
|
21
|
+
unknown-git = "deny"
|
|
22
|
+
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
|
23
|
+
|
|
24
|
+
[licenses]
|
|
25
|
+
confidence-threshold = 0.93
|
|
26
|
+
allow = [
|
|
27
|
+
"Apache-2.0",
|
|
28
|
+
"MIT",
|
|
29
|
+
"BSD-2-Clause",
|
|
30
|
+
"BSD-3-Clause",
|
|
31
|
+
"ISC",
|
|
32
|
+
"Unicode-DFS-2016",
|
|
33
|
+
"Unicode-3.0",
|
|
34
|
+
"BSL-1.0",
|
|
35
|
+
"CC0-1.0",
|
|
36
|
+
"MPL-2.0",
|
|
37
|
+
"Apache-2.0 WITH LLVM-exception",
|
|
38
|
+
]
|
|
39
|
+
exceptions = [
|
|
40
|
+
# oxrocksdb-sys is dual-licensed GPL-2.0 OR Apache-2.0; we use it under Apache-2.0
|
|
41
|
+
{ allow = ["GPL-2.0"], crate = "oxrocksdb-sys" },
|
|
42
|
+
]
|
package/devbox.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox.schema.json",
|
|
3
|
+
"packages": [
|
|
4
|
+
"rustup@1.29.0",
|
|
5
|
+
"just",
|
|
6
|
+
"bun",
|
|
7
|
+
"nodejs",
|
|
8
|
+
"python3"
|
|
9
|
+
],
|
|
10
|
+
"env": {
|
|
11
|
+
"RUSTUP_TOOLCHAIN": "1.92.0",
|
|
12
|
+
"VENV_DIR": ".devbox/virtenv/python/.venv"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/devbox.lock
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfile_version": "1",
|
|
3
|
+
"packages": {
|
|
4
|
+
"bun": {
|
|
5
|
+
"resolved": "github:NixOS/nixpkgs/cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73?narHash=sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1%2Bj%2BMRChI3TL4tAA%3D#bun",
|
|
6
|
+
"source": "nixpkg"
|
|
7
|
+
},
|
|
8
|
+
"github:NixOS/nixpkgs/nixpkgs-unstable": {
|
|
9
|
+
"last_modified": "2026-06-06T12:12:42Z",
|
|
10
|
+
"resolved": "github:NixOS/nixpkgs/cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73?lastModified=1780747962&narHash=sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1%2Bj%2BMRChI3TL4tAA%3D"
|
|
11
|
+
},
|
|
12
|
+
"just": {
|
|
13
|
+
"resolved": "github:NixOS/nixpkgs/cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73?narHash=sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1%2Bj%2BMRChI3TL4tAA%3D#just",
|
|
14
|
+
"source": "nixpkg"
|
|
15
|
+
},
|
|
16
|
+
"nodejs": {
|
|
17
|
+
"plugin_version": "0.0.2",
|
|
18
|
+
"resolved": "github:NixOS/nixpkgs/cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73?narHash=sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1%2Bj%2BMRChI3TL4tAA%3D#nodejs",
|
|
19
|
+
"source": "nixpkg"
|
|
20
|
+
},
|
|
21
|
+
"python3": {
|
|
22
|
+
"plugin_version": "0.0.4",
|
|
23
|
+
"resolved": "github:NixOS/nixpkgs/cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73?narHash=sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1%2Bj%2BMRChI3TL4tAA%3D#python3",
|
|
24
|
+
"source": "nixpkg"
|
|
25
|
+
},
|
|
26
|
+
"rustup@1.29.0": {
|
|
27
|
+
"last_modified": "2026-05-21T08:15:18Z",
|
|
28
|
+
"plugin_version": "0.0.1",
|
|
29
|
+
"resolved": "github:NixOS/nixpkgs/4a29d733e8a7d5b824c3d8c958a946a9867b3eb2#rustup",
|
|
30
|
+
"source": "devbox-search",
|
|
31
|
+
"version": "1.29.0",
|
|
32
|
+
"systems": {
|
|
33
|
+
"aarch64-darwin": {
|
|
34
|
+
"outputs": [
|
|
35
|
+
{
|
|
36
|
+
"name": "out",
|
|
37
|
+
"path": "/nix/store/nl70ay30nl2szm2g03xa0d7ai69dgbln-rustup-1.29.0",
|
|
38
|
+
"default": true
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"store_path": "/nix/store/nl70ay30nl2szm2g03xa0d7ai69dgbln-rustup-1.29.0"
|
|
42
|
+
},
|
|
43
|
+
"aarch64-linux": {
|
|
44
|
+
"outputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "out",
|
|
47
|
+
"path": "/nix/store/684175m8xqfisacqw9rdc97fn2vpp0fj-rustup-1.29.0",
|
|
48
|
+
"default": true
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"store_path": "/nix/store/684175m8xqfisacqw9rdc97fn2vpp0fj-rustup-1.29.0"
|
|
52
|
+
},
|
|
53
|
+
"x86_64-darwin": {
|
|
54
|
+
"outputs": [
|
|
55
|
+
{
|
|
56
|
+
"name": "out",
|
|
57
|
+
"path": "/nix/store/4hqncs7jnqc64z49r1w09b235074li9q-rustup-1.29.0",
|
|
58
|
+
"default": true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"store_path": "/nix/store/4hqncs7jnqc64z49r1w09b235074li9q-rustup-1.29.0"
|
|
62
|
+
},
|
|
63
|
+
"x86_64-linux": {
|
|
64
|
+
"outputs": [
|
|
65
|
+
{
|
|
66
|
+
"name": "out",
|
|
67
|
+
"path": "/nix/store/dpqx1vygrisrvnnwgym1226x317vqp4a-rustup-1.29.0",
|
|
68
|
+
"default": true
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"store_path": "/nix/store/dpqx1vygrisrvnnwgym1226x317vqp4a-rustup-1.29.0"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# Release Process Documentation
|
|
2
|
+
|
|
3
|
+
This document describes how to create releases for DomainForge.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
Run the full release from `main` after the release commit has been merged into `main`.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Patch release (e.g., 0.6.2 -> 0.6.3)
|
|
11
|
+
./scripts/release.sh
|
|
12
|
+
|
|
13
|
+
# Minor release (e.g., 0.6.2 -> 0.7.0)
|
|
14
|
+
./scripts/release.sh minor
|
|
15
|
+
|
|
16
|
+
# Major release (e.g., 0.6.2 -> 1.0.0)
|
|
17
|
+
./scripts/release.sh major
|
|
18
|
+
|
|
19
|
+
# Preview what would happen (dry run)
|
|
20
|
+
./scripts/release.sh --dry-run
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Release Methods
|
|
24
|
+
|
|
25
|
+
### Method 1: Local Scripts (Recommended for maintainers)
|
|
26
|
+
|
|
27
|
+
Use the shell scripts for full control over the release process:
|
|
28
|
+
|
|
29
|
+
1. Prepare the release changes on a `release/*` branch off `main`.
|
|
30
|
+
2. Merge those changes into `main`.
|
|
31
|
+
3. Run `./scripts/release.sh ...` from `main`.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Full release with all steps
|
|
35
|
+
./scripts/release.sh patch
|
|
36
|
+
|
|
37
|
+
# Or run individual steps
|
|
38
|
+
./scripts/pre-release-check.sh
|
|
39
|
+
./scripts/bump-version.sh patch
|
|
40
|
+
./scripts/generate-changelog.sh 0.7.0
|
|
41
|
+
./scripts/generate-release-notes.sh 0.7.0
|
|
42
|
+
./scripts/create-tag.sh 0.7.0
|
|
43
|
+
./scripts/build-release.sh
|
|
44
|
+
./scripts/create-github-release.sh 0.7.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Method 2: GitHub Actions (Recommended for CI-driven releases)
|
|
48
|
+
|
|
49
|
+
1. Go to **Actions** → **Prepare Release** → **Run workflow**
|
|
50
|
+
2. Select version bump type (patch/minor/major)
|
|
51
|
+
3. Review and merge the created PR
|
|
52
|
+
4. Merge or fast-forward the approved release commit onto `main`
|
|
53
|
+
5. Create and push tag from `main`: `git tag v<version> && git push origin main && git push --tags`
|
|
54
|
+
6. Create a GitHub Release from the tag
|
|
55
|
+
7. Publishing workflows trigger automatically
|
|
56
|
+
|
|
57
|
+
### Pre-Release Validation Commands (Justfile)
|
|
58
|
+
|
|
59
|
+
These recipes validate the build before cutting a release. They are not release-execution commands.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Run all tests (validates before release)
|
|
63
|
+
just all-tests
|
|
64
|
+
|
|
65
|
+
# Per-language tests
|
|
66
|
+
just rust-test
|
|
67
|
+
just python-test
|
|
68
|
+
just ts-test
|
|
69
|
+
|
|
70
|
+
# Full CI validation
|
|
71
|
+
just ai-validate
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Script Reference
|
|
75
|
+
|
|
76
|
+
### pre-release-check.sh
|
|
77
|
+
|
|
78
|
+
Validates the repository is ready for release.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
./scripts/pre-release-check.sh [OPTIONS]
|
|
82
|
+
|
|
83
|
+
Options:
|
|
84
|
+
--dry-run Preview checks without running tests
|
|
85
|
+
--skip-tests Skip test suites (faster)
|
|
86
|
+
--verbose Verbose output
|
|
87
|
+
|
|
88
|
+
Checks:
|
|
89
|
+
✓ No uncommitted changes
|
|
90
|
+
✓ On valid branch (main, release/*)
|
|
91
|
+
✓ Up to date with remote
|
|
92
|
+
✓ All tests pass
|
|
93
|
+
✓ Version sync across files
|
|
94
|
+
✓ CHANGELOG.md is up to date
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### bump-version.sh
|
|
98
|
+
|
|
99
|
+
Updates version across all package files.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
./scripts/bump-version.sh [VERSION_TYPE] [OPTIONS]
|
|
103
|
+
|
|
104
|
+
Types:
|
|
105
|
+
major Bump major (X.0.0)
|
|
106
|
+
minor Bump minor (x.Y.0)
|
|
107
|
+
patch Bump patch (x.y.Z)
|
|
108
|
+
X.Y.Z Explicit version
|
|
109
|
+
X.Y.Z-suffix Pre-release version
|
|
110
|
+
|
|
111
|
+
Options:
|
|
112
|
+
--dry-run Preview changes
|
|
113
|
+
--no-commit Update files without committing
|
|
114
|
+
|
|
115
|
+
Files updated:
|
|
116
|
+
- domainforge-core/Cargo.toml
|
|
117
|
+
- pyproject.toml
|
|
118
|
+
- package.json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### generate-changelog.sh
|
|
122
|
+
|
|
123
|
+
Generates changelog entries from conventional commits.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
./scripts/generate-changelog.sh [VERSION] [OPTIONS]
|
|
127
|
+
|
|
128
|
+
Options:
|
|
129
|
+
--dry-run Preview without modifying
|
|
130
|
+
--no-commit Update file without committing
|
|
131
|
+
|
|
132
|
+
Categories:
|
|
133
|
+
feat: → 🎉 Added
|
|
134
|
+
fix: → 🐛 Fixed
|
|
135
|
+
docs: → 📚 Documentation
|
|
136
|
+
refactor: → ✨ Changed
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### generate-release-notes.sh
|
|
140
|
+
|
|
141
|
+
Creates GitHub release notes from CHANGELOG.md.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
./scripts/generate-release-notes.sh [VERSION] [OPTIONS]
|
|
145
|
+
|
|
146
|
+
Options:
|
|
147
|
+
--dry-run Preview content
|
|
148
|
+
|
|
149
|
+
Output:
|
|
150
|
+
Creates RELEASE_NOTES.md with:
|
|
151
|
+
- Version header
|
|
152
|
+
- What's Changed section
|
|
153
|
+
- Breaking Changes (if any)
|
|
154
|
+
- Contributors list
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### create-tag.sh
|
|
158
|
+
|
|
159
|
+
Creates an annotated git tag.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
./scripts/create-tag.sh [VERSION] [OPTIONS]
|
|
163
|
+
|
|
164
|
+
Options:
|
|
165
|
+
--dry-run Preview without creating
|
|
166
|
+
--force Overwrite existing tag
|
|
167
|
+
|
|
168
|
+
Features:
|
|
169
|
+
- Uses RELEASE_NOTES.md for tag message
|
|
170
|
+
- Supports GPG signing if configured
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### build-release.sh
|
|
174
|
+
|
|
175
|
+
Builds release artifacts for the current platform.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
./scripts/build-release.sh [OPTIONS]
|
|
179
|
+
|
|
180
|
+
Options:
|
|
181
|
+
--dry-run Preview build commands
|
|
182
|
+
--skip-cli Skip CLI binary
|
|
183
|
+
--skip-python Skip Python wheel
|
|
184
|
+
--skip-wasm Skip WASM bundle
|
|
185
|
+
|
|
186
|
+
Output:
|
|
187
|
+
dist/
|
|
188
|
+
├── sea-0.7.0-linux-x86_64.tar.gz
|
|
189
|
+
├── domainforge-0.7.0-cp312-*.whl
|
|
190
|
+
├── domainforge-core-wasm-0.7.0.tar.gz
|
|
191
|
+
└── SHA256SUMS.txt
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### create-github-release.sh
|
|
195
|
+
|
|
196
|
+
Creates a GitHub release using the gh CLI.
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
./scripts/create-github-release.sh [VERSION] [OPTIONS]
|
|
200
|
+
|
|
201
|
+
Options:
|
|
202
|
+
--dry-run Preview without creating
|
|
203
|
+
--draft Create as draft
|
|
204
|
+
|
|
205
|
+
Requirements:
|
|
206
|
+
- GitHub CLI (gh) installed and authenticated
|
|
207
|
+
- Tag must exist
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### release.sh
|
|
211
|
+
|
|
212
|
+
Master orchestration script that runs all steps.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
./scripts/release.sh [VERSION_TYPE] [OPTIONS]
|
|
216
|
+
|
|
217
|
+
Options:
|
|
218
|
+
--dry-run Full dry run of all steps
|
|
219
|
+
--skip-tests Skip test suites
|
|
220
|
+
--skip-build Skip building artifacts
|
|
221
|
+
--yes, -y Auto-confirm push
|
|
222
|
+
|
|
223
|
+
Steps:
|
|
224
|
+
1. Pre-release checks
|
|
225
|
+
2. Version bump
|
|
226
|
+
3. Changelog generation
|
|
227
|
+
4. Release notes generation
|
|
228
|
+
5. Commit changes
|
|
229
|
+
6. Create git tag
|
|
230
|
+
7. Build artifacts
|
|
231
|
+
8. Push to remote
|
|
232
|
+
9. Create GitHub release
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Prerequisites
|
|
236
|
+
|
|
237
|
+
### Required Tools
|
|
238
|
+
|
|
239
|
+
| Tool | Purpose | Installation |
|
|
240
|
+
| --------- | --------------- | ---------------------------------------- |
|
|
241
|
+
| git | Version control | System package manager |
|
|
242
|
+
| cargo | Rust toolchain | [rustup.rs](https://rustup.rs) |
|
|
243
|
+
| just | Task runner | `cargo install just` |
|
|
244
|
+
| maturin | Python wheels | `pip install maturin` |
|
|
245
|
+
| wasm-pack | WASM bundle | `cargo install wasm-pack` |
|
|
246
|
+
| gh | GitHub CLI | [cli.github.com](https://cli.github.com) |
|
|
247
|
+
|
|
248
|
+
### GitHub Authentication
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Authenticate with GitHub CLI
|
|
252
|
+
gh auth login
|
|
253
|
+
|
|
254
|
+
# Verify authentication
|
|
255
|
+
gh auth status
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Troubleshooting
|
|
259
|
+
|
|
260
|
+
### "Uncommitted changes detected"
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Check what's modified
|
|
264
|
+
git status
|
|
265
|
+
|
|
266
|
+
# Stage and commit or stash
|
|
267
|
+
git add -A && git commit -m "wip"
|
|
268
|
+
# OR
|
|
269
|
+
git stash
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### "Version mismatch across files"
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Check versions
|
|
276
|
+
grep '^version' domainforge-core/Cargo.toml pyproject.toml
|
|
277
|
+
grep '"version"' package.json
|
|
278
|
+
|
|
279
|
+
# Sync manually or run bump-version
|
|
280
|
+
./scripts/bump-version.sh 0.7.0
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### "Tag already exists"
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Delete local tag
|
|
287
|
+
git tag -d v0.7.0
|
|
288
|
+
|
|
289
|
+
# Delete remote tag
|
|
290
|
+
git push origin --delete v0.7.0
|
|
291
|
+
|
|
292
|
+
# Or use --force
|
|
293
|
+
./scripts/create-tag.sh --force
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### "GitHub CLI not authenticated"
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
gh auth login
|
|
300
|
+
# Follow prompts to authenticate
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Rollback Procedures
|
|
304
|
+
|
|
305
|
+
### Before Push
|
|
306
|
+
|
|
307
|
+
If release failed before pushing:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Reset to previous commit
|
|
311
|
+
git reset --hard HEAD~1
|
|
312
|
+
|
|
313
|
+
# Delete local tag
|
|
314
|
+
git tag -d v0.7.0
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### After Push (Breaking Release)
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Delete remote tag (stops CI publishing)
|
|
321
|
+
git push origin --delete v0.7.0
|
|
322
|
+
|
|
323
|
+
# Delete GitHub release via web UI or CLI
|
|
324
|
+
gh release delete v0.7.0
|
|
325
|
+
|
|
326
|
+
# Revert commit
|
|
327
|
+
git revert HEAD
|
|
328
|
+
git push origin main
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Emergency Hotfix
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
# Create hotfix branch from main
|
|
335
|
+
git checkout main
|
|
336
|
+
git pull
|
|
337
|
+
git checkout -b hotfix/0.7.1
|
|
338
|
+
|
|
339
|
+
# Apply fix, commit, then release
|
|
340
|
+
./scripts/release.sh patch
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Version Numbering
|
|
344
|
+
|
|
345
|
+
DomainForge follows [Semantic Versioning](https://semver.org/):
|
|
346
|
+
|
|
347
|
+
- **Major (X.0.0)**: Breaking API changes
|
|
348
|
+
- **Minor (x.Y.0)**: New features, backward compatible
|
|
349
|
+
- **Patch (x.y.Z)**: Bug fixes, backward compatible
|
|
350
|
+
- **Pre-release (x.y.z-alpha)**: Development versions
|
|
351
|
+
|
|
352
|
+
## Files Updated During Release
|
|
353
|
+
|
|
354
|
+
| File | Field | Example |
|
|
355
|
+
| --------------------- | -------------------- | ------------------------- |
|
|
356
|
+
| `domainforge-core/Cargo.toml` | `version = "X.Y.Z"` | `version = "0.7.0"` |
|
|
357
|
+
| `pyproject.toml` | `version = "X.Y.Z"` | `version = "0.7.0"` |
|
|
358
|
+
| `package.json` | `"version": "X.Y.Z"` | `"version": "0.7.0"` |
|
|
359
|
+
| `CHANGELOG.md` | New version section | `## [0.7.0] - 2025-12-23` |
|
|
360
|
+
| `RELEASE_NOTES.md` | Generated content | GitHub release body |
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Semantic Diagnostic Codes
|
|
2
|
+
|
|
3
|
+
DomainForge emits structured diagnostics when validating .sea source files against semantic packs. Each diagnostic carries a code, a three-valued semantic truth, a severity, and contextual information. This reference documents all 30 diagnostic codes, their truth values, and how they behave in different validation modes.
|
|
4
|
+
|
|
5
|
+
## Three-Valued Semantic Truth
|
|
6
|
+
|
|
7
|
+
Every diagnostic has a `semantic_truth` field that captures the resolution outcome independently of severity:
|
|
8
|
+
|
|
9
|
+
| Truth | Meaning |
|
|
10
|
+
|------------|------------------------------------------------------------------|
|
|
11
|
+
| `valid` | The concept resolved successfully. No semantic issue. |
|
|
12
|
+
| `invalid` | The concept is definitively wrong (rejected, blocked). |
|
|
13
|
+
| `unknown` | Insufficient information to confirm or deny (missing, ambiguous, proposed). |
|
|
14
|
+
|
|
15
|
+
`semantic_truth` is **independent** of `DiagnosticSeverity`. An `unknown` truth can map to `Error` severity in strict mode, but the truth value stays `unknown`---not `invalid`. This distinction matters for tooling that uses the truth value for control flow (e.g., the LSP uses `unknown` to offer "add to pack" suggestions, while `invalid` triggers error highlighting).
|
|
16
|
+
|
|
17
|
+
## Complete Diagnostic Code Table
|
|
18
|
+
|
|
19
|
+
### Concept Resolution
|
|
20
|
+
|
|
21
|
+
| Code | Semantic Truth | LSP Warn Severity | CI Strict Severity | Description |
|
|
22
|
+
|-------------------------|----------------|-------------------|--------------------|------------------------------------------------|
|
|
23
|
+
| `unknown_concept` | unknown | Warning | Error | Term does not match any concept, alias, or mapping rule. |
|
|
24
|
+
| `deprecated_concept` | valid | Warning | Varies (policy) | Concept resolved but has `deprecated` status. |
|
|
25
|
+
| `ambiguous_concept` | unknown | Warning | Error | Term matches multiple active concepts. |
|
|
26
|
+
| `ambiguous_alias` | unknown | Warning | Error | Alias matches only `ambiguous`-status entries across multiple targets. |
|
|
27
|
+
| `alias_conflict` | invalid | Error | Error | Alias is `blocked` or has conflicting approved/deprecated entries targeting different concepts. |
|
|
28
|
+
| `rejected_concept` | invalid | Error | Error | Concept resolved but has `rejected` status. |
|
|
29
|
+
| `proposed_concept` | unknown | Warning | Error | Concept resolved but has `proposed` status. |
|
|
30
|
+
|
|
31
|
+
### Alias Resolution
|
|
32
|
+
|
|
33
|
+
| Code | Semantic Truth | LSP Warn Severity | CI Strict Severity | Description |
|
|
34
|
+
|-------------------------|----------------|-------------------|--------------------|------------------------------------------------|
|
|
35
|
+
| `ambiguous_alias_group` | unknown | Warning | Error | Multiple aliases for the same key are all in `ambiguous` status. |
|
|
36
|
+
|
|
37
|
+
### Pack Integrity
|
|
38
|
+
|
|
39
|
+
| Code | Semantic Truth | LSP Warn Severity | CI Strict Severity | Description |
|
|
40
|
+
|-----------------------------|----------------|-------------------|--------------------|------------------------------------------------|
|
|
41
|
+
| `pack_unavailable` | unknown | Error | Error | No pack could be loaded for validation. |
|
|
42
|
+
| `pack_schema_mismatch` | invalid | Error | Error | Pack `schema_version` is not `0.3`. |
|
|
43
|
+
| `pack_version_mismatch` | invalid | Warning | Error | Pack version is incompatible with tooling. |
|
|
44
|
+
| `pack_hash_mismatch` | invalid | Error | Error | Pack content hash does not match expected hash. |
|
|
45
|
+
| `pack_unsigned` | invalid | Warning | Error | Pack is unsigned but signature is required. |
|
|
46
|
+
| `pack_signature_invalid` | invalid | Error | Error | Pack signature verification failed. |
|
|
47
|
+
| `pack_set_conflict` | invalid | Error | Error | Multiple packs have conflicting definitions. |
|
|
48
|
+
|
|
49
|
+
### Relation and Metric Validation
|
|
50
|
+
|
|
51
|
+
| Code | Semantic Truth | LSP Warn Severity | CI Strict Severity | Description |
|
|
52
|
+
|-------------------------|----------------|-------------------|--------------------|------------------------------------------------|
|
|
53
|
+
| `invalid_relation` | invalid | Error | Error | Relation references a concept that does not exist in the pack. |
|
|
54
|
+
| `invalid_predicate` | invalid | Error | Error | Predicate is not in the concept's `allowed_predicates` list. |
|
|
55
|
+
| `unknown_metric` | unknown | Warning | Error | Metric ID is not defined in the pack. |
|
|
56
|
+
| `unknown_dimension` | unknown | Warning | Error | Dimension ID referenced by a metric is not defined. |
|
|
57
|
+
| `unknown_unit` | unknown | Warning | Error | Unit ID referenced by a metric is not defined. |
|
|
58
|
+
| `unit_mismatch` | invalid | Error | Error | Unit is incompatible with the dimension. |
|
|
59
|
+
| `dimension_mismatch` | invalid | Error | Error | Dimension does not match the expected dimension. |
|
|
60
|
+
|
|
61
|
+
### Governance
|
|
62
|
+
|
|
63
|
+
| Code | Semantic Truth | LSP Warn Severity | CI Strict Severity | Description |
|
|
64
|
+
|-------------------------------------|----------------|-------------------|--------------------|------------------------------------------------|
|
|
65
|
+
| `missing_definition` | unknown | Warning | Warning | Active concept has no definition text. |
|
|
66
|
+
| `missing_owner` | unknown | Warning | Warning | Active concept has no owner assigned. |
|
|
67
|
+
| `duplicate_canonical_name` | invalid | Error | Error | Two concepts share the same canonical name. |
|
|
68
|
+
| `duplicate_concept_id` | invalid | Error | Error | Two concepts share the same ID. |
|
|
69
|
+
| `unreviewed_concept` | unknown | Error | Error | Active concept lacks a passing review record or has a definition hash mismatch. |
|
|
70
|
+
| `meaning_version_not_bumped` | invalid | Error | Error | `meaning_fingerprint` changed but `meaning_version` was not increased. |
|
|
71
|
+
| `meaning_version_baseline_missing` | unknown | Error | Error | Approved build has no previous pack for version comparison. |
|
|
72
|
+
| `mapping_required` | unknown | Warning | Error | Term must be mapped to an approved concept. |
|
|
73
|
+
|
|
74
|
+
## DeprecatedPolicy Behavior
|
|
75
|
+
|
|
76
|
+
The `deprecated_concept` diagnostic severity is controlled by the `DeprecatedPolicy` setting:
|
|
77
|
+
|
|
78
|
+
| Policy | Warn Mode Severity | Strict Mode Severity | Description |
|
|
79
|
+
|-------------------|--------------------|----------------------|---------------------------------------------|
|
|
80
|
+
| `Allow` | Hint | Hint | Deprecated concepts are silently accepted. |
|
|
81
|
+
| `Warn` | Warning | Warning | Deprecated concepts produce warnings in all modes. |
|
|
82
|
+
| `ErrorInStrict` | Warning | Error | Warnings in warn mode, errors in strict mode. |
|
|
83
|
+
| `ErrorAlways` | Error | Error | Deprecated concepts always produce errors. |
|
|
84
|
+
|
|
85
|
+
This policy is orthogonal to the `semantic_truth` value---a deprecated concept always has truth `valid` because it resolved successfully. The severity controls whether the resolution result is treated as actionable.
|
|
86
|
+
|
|
87
|
+
## How semantic_truth Is Independent of DiagnosticSeverity
|
|
88
|
+
|
|
89
|
+
The separation between truth and severity serves distinct consumers:
|
|
90
|
+
|
|
91
|
+
- **LSP**: Uses `semantic_truth` to decide what quick-fix actions to offer. `unknown` suggests "add to pack." `invalid` suggests "remove or fix reference." `valid` with `deprecated` suggests "update to replacement."
|
|
92
|
+
- **CI**: Uses `severity` to decide pass/fail. A `Warning` in strict mode is still a failure if the policy maps it to `Error`.
|
|
93
|
+
- **Code generators**: Use `semantic_truth` to decide whether to include a concept in generated output. `invalid` concepts are excluded. `unknown` concepts may be included with a TODO comment.
|
|
94
|
+
|
|
95
|
+
Example: A term that resolves to a `proposed` concept has truth `unknown` and severity `Warning` in warn mode. In strict mode, the severity becomes `Error`, but the truth stays `unknown`. The CI fails (severity = Error), but the code generator can still include the concept with a caveat (truth = unknown).
|
|
96
|
+
|
|
97
|
+
## LSP Diagnostic Data Payload
|
|
98
|
+
|
|
99
|
+
The DomainForge LSP attaches structured data to each diagnostic via the LSP `data` field:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"domainforge.semantic_code": "unknown_concept",
|
|
104
|
+
"domainforge.semantic_truth": "unknown",
|
|
105
|
+
"domainforge.pack_id": "acme/logistics/1.1.0",
|
|
106
|
+
"domainforge.pack_content_hash": "sha256:abc123...",
|
|
107
|
+
"domainforge.recoverability_hint": "Add the concept to the semantic pack",
|
|
108
|
+
"domainforge.suggestions": [
|
|
109
|
+
{ "label": "supplier", "rank": 10 },
|
|
110
|
+
{ "label": "warehouse", "rank": 5 }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Payload Fields
|
|
116
|
+
|
|
117
|
+
| Field | Type | Description |
|
|
118
|
+
|------------------------------------|----------|----------------------------------------------------------|
|
|
119
|
+
| `domainforge.semantic_code` | string | The `SemanticDiagnosticCode` value. |
|
|
120
|
+
| `domainforge.semantic_truth` | string | The three-valued truth (`valid`, `invalid`, `unknown`). |
|
|
121
|
+
| `domainforge.pack_id` | string | The pack that produced this diagnostic. |
|
|
122
|
+
| `domainforge.pack_content_hash` | string | Content hash of the pack at validation time. |
|
|
123
|
+
| `domainforge.recoverability_hint` | string | Human-readable suggestion for fixing the issue. |
|
|
124
|
+
| `domainforge.suggestions` | array | Ranked list of concept suggestions (for `unknown` results). |
|
|
125
|
+
|
|
126
|
+
## Validation Modes
|
|
127
|
+
|
|
128
|
+
| Mode | Behavior |
|
|
129
|
+
|-----------|--------------------------------------------------------------------------|
|
|
130
|
+
| `off` | No semantic validation is performed. Pack is not loaded. |
|
|
131
|
+
| `warn` | Diagnostics are reported as warnings. Unknown concepts produce warnings. |
|
|
132
|
+
| `strict` | Unknown concepts are errors. Deprecated concepts may be errors (per policy). Unsigned packs are errors if `require_signed_pack` is true. |
|
|
133
|
+
|
|
134
|
+
## Validation Options
|
|
135
|
+
|
|
136
|
+
The `ValidationOptions` structure controls validation behavior:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"mode": "strict",
|
|
141
|
+
"unknown_concept_policy": "error",
|
|
142
|
+
"deprecated_policy": "error_in_strict",
|
|
143
|
+
"require_signed_pack": true,
|
|
144
|
+
"allow_unsigned_test_fixtures": false
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
| Field | Type | Default | Description |
|
|
149
|
+
|--------------------------------|----------|-----------|------------------------------------------------------|
|
|
150
|
+
| `mode` | string | `warn` | Validation mode (`off`, `warn`, `strict`). |
|
|
151
|
+
| `unknown_concept_policy` | string | `warning` | How to handle unknown concepts (`ignore`, `warning`, `error`). |
|
|
152
|
+
| `deprecated_policy` | string | `warn` | How to handle deprecated concepts. See table above. |
|
|
153
|
+
| `require_signed_pack` | boolean | `false` | Whether to require a signed pack. |
|
|
154
|
+
| `allow_unsigned_test_fixtures` | boolean | `false` | Bypass signature requirement for test fixture packs. |
|
|
155
|
+
|
|
156
|
+
## See Also
|
|
157
|
+
|
|
158
|
+
- [Semantic Packs](semantic-packs.md) for the overall pack system.
|
|
159
|
+
- [Semantic Pack Review Process](semantic-pack-review.md) for governance codes.
|
|
160
|
+
- [Semantic Pack Signing and Verification](semantic-pack-signing.md) for signature-related codes.
|
|
161
|
+
- [Three-Valued Logic](explanations/three-valued-logic.md) for the theoretical background.
|