Skip to main content

Assertion ingestion engine — executes the URBA-0003 lifecycle as Neo4j + S3 mutations (ADR-TECH-STRAT-001).

Project description

kmint

The Assertion ingestion engine — one installable, one console script (kmint) that executes the URBA-0003 micro-decision lifecycle as graph + lake mutations. It is the write engine of the sovereign Knowledge map's Assertion face; kledger is the read appliance it writes into.

Implements ADR-TECH-STRAT-001 (§"kmint — the Assertion ingestion engine") and ADR-TECH-STRAT-004 (the 5-state / 4-event machine + actor model), both in banking-knowledge.

Where kmint sits

Repo Org Role
banking-knowledge papeete-consulting-lab The contract — schema v1 + lifecycle ADRs. Documentary.
kledger papeete-consulting-lab The appliance — schema + deploy + read-only resolver + validation.
kmint (this repo) papeete-consulting The ingestion CLI — writes both planes. Sibling of kpack.

kmint is to Assertion what kpack is to packaging: a single shared engine, run against a running kledger appliance over the same env-var substrate contract (NEO4J_*, S3_*). It does not import kledger; the appliance owns schema application and the read path.

The lifecycle it executes (the URBA-0003 spine)

S0 Capture   →  S1 Distillation (N→1)  →  S2 Refinement  →  S3 Archival / Purge
  • S0 Capture — store verbatim bytes in the immutable lake (content-addressed by checksum), mint a :Capture + :Capturing activity. Bytes are immutable from here.
  • S1 Distillation — read 1..N sources (:Capture, the Published corpus, prior candidates) and mint a brand-new :MicroDecision in SubmittedForRefinement (sources never mutated), DERIVED_FROM all of them, GENERATED_BY a :Distillation carrying the disposition. Non-Candidate dispositions are recorded but do not advance. Idempotent on contentHash = sha256(text + sorted(lineage)) + the sequential id.
  • S2 RefinementSubmittedForRefinement → Published, gated by the transition policy. Only the deterministic actor may auto-advance; everything else is human-gated (a recorded validator basis is required). Human refinement adds VALIDATED_BY without changing primalProvider (provider ≠ validator).
  • S3 Archival / Purge — supersede/amend (prior → Archived, on a temporal or authority axis) or end-of-retention (Purged tombstone). Never deletes.

Three distillation modes behind one interface

Selected by the source-type binding (URBA-0004), one per transition actor: deterministic (the :Script actor — reproducible, audited, may auto-advance) / llm (LLM-bounded, defaults to human-gated) / human (human-gated). Conservative default: origin uncertain ⇒ llm-tool ⇒ human-gated.

Ingestion is cadence-driven and hybrid: the URBA-0004 cadence selects batch (one-shot | static) vs streaming (recurring-stream | continuous).

Append-never-erase

kmint is the only writer, and it never deletes: graph.GraphWriter refuses any query containing DELETE/REMOVE as a hard backstop (Rule F). Discard/replace is a state change plus a SUPERSEDES / REVISION_OF edge.

Install & use

pip install -e ".[dev]"        # or: pip install -e ".[dev,lake]" for the S3 writer
make test                      # unit tests — no engine needed

kmint capture transcript.txt --form verbatim --capture-id cap-1 --domain MEMORY --dry-run
kmint distill --text "Retention defaults to 7 years." --domain MEMORY \
      --actor human --source cap-1 --source-confidence 3
kmint refine BNK.KNOW.MD.MEMORY.001 --actor human --validator alice
kmint archive BNK.KNOW.MD.MEMORY.001 --by BNK.KNOW.MD.MEMORY.005 --axis authority

make smoke runs an end-to-end capture→distill→refine against a throwaway neo4j:5-enterprise (point KLEDGER_SCHEMA at kledger/schema/schema.cypher to exercise the LOCKED constraints too).

Design

See docs/kmint-design.md for the ADR → implementation map and the scaffold's deferred internals.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kmint-0.1.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kmint-0.1.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file kmint-0.1.0.tar.gz.

File metadata

  • Download URL: kmint-0.1.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kmint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7155ed17bc6ab2595fcd96bd63767f93a1b6cda5e7ee00ff97214fb0d9047fff
MD5 96cb2ca9cff040631fb474a1b99866d2
BLAKE2b-256 9a536aebfa118508a1ee4079d34ec2aba174addbfa9fee9bb55ace2a3e2979b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for kmint-0.1.0.tar.gz:

Publisher: release.yml on papeete-consulting/kmint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kmint-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kmint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kmint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d82c654192336a5137ce16c6fcda956dc0f871c1281622294cd1d6ebcc919d2a
MD5 e1da96ed632b9ac097de9301f6c3e6ba
BLAKE2b-256 7f6a6e2957234eec7a190e6512a0eb3e98c07e44d9948dde5121fadc8ef20d1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kmint-0.1.0-py3-none-any.whl:

Publisher: release.yml on papeete-consulting/kmint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page