Development/decision-provenance schema for context graphs: Decision, Fact-slot/Assertion, Evidence, Thread, Session, Procedure, and Entity node kinds with deterministic identity and overlay/reasoning edges — the dev-domain sibling to cjm-transcript-graph-schema for graphing a project's own evolution.
Project description
cjm-dev-graph-schema
Development/decision-provenance schema for context graphs: Decision, Fact-slot/Assertion, Evidence, Thread, Session, Procedure, and Entity node kinds with deterministic identity and overlay/reasoning edges — the dev-domain sibling to cjm-transcript-graph-schema for graphing a project's own evolution.
Modules
cjm_dev_graph_schema.__init__cjm_dev_graph_schema.aliases— Rename-stable subject resolution (the A+aliases identity machinery).cjm_dev_graph_schema.identity— Deterministic node-id helpers for the dev/decision-provenance domain.cjm_dev_graph_schema.nodes— Typed node dataclasses for the dev schema (coarse + fine tier).cjm_dev_graph_schema.predicates— Typed predicates + their value-space metadata (the dedup decidability layer).cjm_dev_graph_schema.vocab— The reserved node-kind and edge-relation vocabulary for the dev/decision-provenance domain.tests.test_code_nodes— Code source-type nodes: deterministic identity, wire shapes, and edges.tests.test_entity— EntityNode: deterministic (sub-kind, key) identity, wire-dict, DEPENDS_ON edges.tests.test_fine_nodes— Fine-tier nodes: deterministic identity, wire shapes, and alias resolution.tests.test_nodes— Coarse-tier NoteNode: deterministic identity, wire-dict mapping, REFERENCES edges.tests.test_predicates— Predicate value-space: canonicalization, ordering, and conflict decisions.
API
cjm_dev_graph_schema.aliases
build_alias_indexfunction — Index every entity by its key, current name, and each alias.resolve_subject_idfunction — Resolve a subject name to its entity id via the alias index (no guessing).
cjm_dev_graph_schema.identity
assertion_node_idfunction — Assertion identity = (slot, canonical value, actor).cell_node_idfunction — Cell identity = (notebook module, stable cell key).check_node_idfunction — Check identity = (its work item, canonical text) — the same wording on twocode_module_node_idfunction — Code-module identity = (repo_key, module_path).code_symbol_node_idfunction — Code-symbol identity = (enclosing module, qualified name).code_text_node_idfunction — Code-text-region identity = (module, region key).decision_node_idfunction — Decision identity = its canonical statement (idempotent re-records).entity_node_idfunction — Entity identity = (sub-kind, stable key).factslot_node_idfunction — Fact-slot identity = (subject, predicate).note_node_idfunction — Note identity = its stable slug.section_node_idfunction — Section identity = (enclosing Note, heading anchor slug).series_node_idfunction — Series identity = its stable key.session_node_idfunction — Session identity = its stable key (so DECIDED_IN/PRODUCED_IN converge).topic_node_idfunction — Topic identity = its normalized name slug.
cjm_dev_graph_schema.nodes
AssertionNodeclass — One value claimed for a Fact-slot — identified by WHAT is claimed.CellNodeclass — One VERBATIM notebook cell — the lossless source substrate of a notebook module.CheckNodeclass — A definition-of-done check on a work item — a derivable gate, not prose.CodeModuleNodeclass — The code source-type's coarse node: one decomposed.pymodule.CodeSymbolNodeclass — A definition within a module: a function, class, or method.CodeTextNodeclass — A non-def top-level region of a plain-.pymodule — the verbatim substrate BETWEEN symbols.DecisionNodeclass — A decision/conclusion, with rationale recorded as edges, not prose.EntityNodeclass — A first-class subject: a repo/lib, stage, capability, person, or term.FactSlotNodeclass — A(subject, predicate)slot — the home for layered, supersede-able claims.NoteNodeclass — The coarse-tier document node: one decomposed markdown/memory file.SectionNodeclass — One heading-delimited section of a Note's body — the navigable unit + anchor target.SeriesNodeclass — An ordered collection/progression a note belongs to (a Quarto series, …).SessionNodeclass — A working session — the home decisions/facts are PRODUCED_IN / DECIDED_IN.TopicNodeclass — A category/tag facet — a thematic-clustering subject shared across notes.
cjm_dev_graph_schema.predicates
Predicateclass — A typed predicate's value-space (the contradiction decidability metadata).active_contradictionfunction — Whether a slot's ACTIVE (non-superseded) values form a hard contradiction.canonical_valuefunction — Canonicalize a value so equal claims collapse to one Assertion.get_predicatefunction — Look up a predicate's value-space; None = an untyped freetext predicate.is_multivaluedfunction — Whether the predicate is a SET slot (distinct values coexist, never conflict).is_orderedfunction — Whether the predicate's values have a "later supersedes earlier" ordering.is_typedfunction — Whether the predicate is in the typed registry.ordering_supersedesfunction — For an ordered predicate, doesnew_valuesupersedeold_value?soft_conflictfunction — Whether an UNTYPED slot's active values disagree (a worklist candidate).values_conflictfunction — Whether two values are a HARD contradiction under the value-space.
cjm_dev_graph_schema.vocab
DevNodeKindsclass — Node labels of the dev/decision-provenance schema (the locked model).DevRelationsclass — Dev-domain edge relations (reserved up front).
tests.test_code_nodes
test_cell_contains_next_documents_references_edgesfunctiontest_cell_identity_prefers_nbformat_id_else_indexfunctiontest_cell_wire_is_verbatim_and_typedfunctiontest_codetext_region_identity_and_wirefunctiontest_module_about_targets_repo_entityfunctiontest_module_contains_edges_order_regionsfunctiontest_module_defines_and_imports_edgesfunctiontest_module_identity_is_repokey_pathfunctiontest_module_wire_carries_relevance_fields_and_sourcefunctiontest_nested_definesfunctiontest_nested_symbol_has_no_body_propsfunctiontest_symbol_identity_is_module_qualnamefunctiontest_symbol_uses_edges_superset_dedups_and_skips_selffunctiontest_symbol_wire_and_call_edgesfunctiontest_symbol_without_content_hash_has_no_sourcefunctiontest_top_level_symbol_carries_verbatim_body_and_orderfunction
tests.test_entity
test_depends_on_edges_target_same_kind_idsfunctiontest_id_from_kind_and_keyfunctiontest_same_key_different_kind_differsfunctiontest_to_graph_node_shapefunction
tests.test_fine_nodes
test_assertion_identity_is_slot_value_actorfunctiontest_assertion_wire_and_edgesfunctiontest_decision_and_sessionfunctiontest_entity_aliases_resolve_rename_stablefunctiontest_factslot_identity_is_subject_predicatefunction
tests.test_nodes
test_cross_post_alias_resolutionfunctiontest_cross_post_edges_anchor_resolves_to_section_idfunctiontest_facets_stored_on_node_when_presentfunctiontest_id_changes_with_slugfunctiontest_id_is_deterministic_from_slugfunctiontest_no_references_no_edgesfunctiontest_optional_fields_omitted_when_emptyfunctiontest_reference_edges_target_linked_note_idsfunctiontest_section_identity_and_anchor_resolution_by_constructionfunctiontest_section_node_shape_carries_verbatim_textfunctiontest_section_structural_edges_membership_and_hierarchyfunctiontest_series_edges_membershipfunctiontest_series_node_shape_and_identityfunctiontest_tagged_edges_target_shared_topic_idsfunctiontest_to_graph_node_shapefunctiontest_topic_node_shape_and_identityfunction
tests.test_predicates
test_active_contradiction_and_soft_conflictfunctiontest_aka_distinct_values_never_conflictfunctiontest_aka_is_multivalued_slug_setfunctiontest_canonical_value_enum_lowercasesfunctiontest_canonical_value_semver_strips_v_prefixfunctiontest_canonical_value_untyped_preserves_casefunctiontest_ordering_supersedes_semverfunctiontest_ordering_supersedes_task_state_enumfunctiontest_rename_disposition_is_unordered_enumfunctiontest_typed_predicate_registryfunctiontest_values_conflict_only_typed_unorderedfunctiontest_version_is_ordered_semverfunction
Dependencies
Used by: cjm-context-graph-projection, cjm-markdown-decompose-core, cjm-notebook-decompose-core, cjm-python-decompose-core
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cjm_dev_graph_schema-0.0.11.tar.gz.
File metadata
- Download URL: cjm_dev_graph_schema-0.0.11.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa1703345f8c02c0e30fb85d0efb2c3bfc74001f57d66122b18c31b0a359d37e
|
|
| MD5 |
189e7ffc82ffb061cc6c9f2c9bbfb793
|
|
| BLAKE2b-256 |
830c26f902a3d211a3be921705fbc9e3fd70fc661714002a9d2cafba76cd3ee6
|
File details
Details for the file cjm_dev_graph_schema-0.0.11-py3-none-any.whl.
File metadata
- Download URL: cjm_dev_graph_schema-0.0.11-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ce37c1f869bef4f8134bef467a86edf355ce4eca073f0bca60ebcf1c633da0
|
|
| MD5 |
980211b9c6cb59adbf3e3ed201435c83
|
|
| BLAKE2b-256 |
c8a8f393964801d0ef718db04ef82496652c85e4518ded0ae61e8ea4aebba3f3
|