kenning-continuity 0.1.0__tar.gz

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.
Files changed (43) hide show
  1. kenning_continuity-0.1.0/.gitignore +81 -0
  2. kenning_continuity-0.1.0/.release-notes/v0.1.0.md +91 -0
  3. kenning_continuity-0.1.0/HOWTO.xml +550 -0
  4. kenning_continuity-0.1.0/LICENSE +202 -0
  5. kenning_continuity-0.1.0/NOTICE +14 -0
  6. kenning_continuity-0.1.0/PKG-INFO +343 -0
  7. kenning_continuity-0.1.0/README.md +308 -0
  8. kenning_continuity-0.1.0/TRADEMARKS.md +88 -0
  9. kenning_continuity-0.1.0/docs/design/ontology/README.md +211 -0
  10. kenning_continuity-0.1.0/docs/design/ontology/schema_models.html +533 -0
  11. kenning_continuity-0.1.0/docs/design/ontology/v0.1.0.tql +245 -0
  12. kenning_continuity-0.1.0/pyproject.toml +89 -0
  13. kenning_continuity-0.1.0/src/kenning_continuity/__init__.py +34 -0
  14. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/_resolve.md +16 -0
  15. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/chain_history.cypher +14 -0
  16. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/domain_merge.cypher +5 -0
  17. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/domain_state.cypher +38 -0
  18. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/index_create.cypher +3 -0
  19. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/knowledge_collision.cypher +14 -0
  20. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/knowledge_confirm.cypher +9 -0
  21. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/knowledge_create.cypher +18 -0
  22. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/knowledge_evolve.cypher +20 -0
  23. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/referent_claim.cypher +24 -0
  24. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/search_connections.cypher +32 -0
  25. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/search_knowledge.cypher +11 -0
  26. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/session_create.cypher +21 -0
  27. kenning_continuity-0.1.0/src/kenning_continuity/_cypher/session_history.cypher +15 -0
  28. kenning_continuity-0.1.0/src/kenning_continuity/_migration/__init__.py +1 -0
  29. kenning_continuity-0.1.0/src/kenning_continuity/_migration/knowledge_focus.py +259 -0
  30. kenning_continuity-0.1.0/src/kenning_continuity/_migration/person_layer.py +517 -0
  31. kenning_continuity-0.1.0/src/kenning_continuity/server.py +816 -0
  32. kenning_continuity-0.1.0/src/kenning_continuity/substrate.py +1580 -0
  33. kenning_continuity-0.1.0/src/kenning_continuity/utils.py +360 -0
  34. kenning_continuity-0.1.0/tests/__init__.py +0 -0
  35. kenning_continuity-0.1.0/tests/integration/__init__.py +0 -0
  36. kenning_continuity-0.1.0/tests/integration/test_collision_error.py +204 -0
  37. kenning_continuity-0.1.0/tests/integration/test_director_guard.py +480 -0
  38. kenning_continuity-0.1.0/tests/integration/test_phase0_migration.py +354 -0
  39. kenning_continuity-0.1.0/tests/integration/test_referent_claim.py +291 -0
  40. kenning_continuity-0.1.0/tests/integration/test_search_connections.py +368 -0
  41. kenning_continuity-0.1.0/tests/unit/__init__.py +0 -0
  42. kenning_continuity-0.1.0/tests/unit/test_ontology_model.py +322 -0
  43. kenning_continuity-0.1.0/tests/unit/test_server.py +552 -0
@@ -0,0 +1,81 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ *.egg
8
+ dist/
9
+ build/
10
+ .eggs/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+
23
+ # Testing
24
+ .pytest_cache/
25
+ .coverage
26
+ htmlcov/
27
+
28
+ # Type checking
29
+ .mypy_cache/
30
+ .pyright/
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # uv
37
+ uv.lock
38
+
39
+ # Claude Code — local workspace config, machine-specific paths
40
+ .claude/
41
+
42
+ # Jujutsu VCS
43
+ .jj/
44
+
45
+ # Environment / credentials
46
+ .env
47
+ .env.*
48
+
49
+ # Logs
50
+ *.log
51
+
52
+ # Neo4j local data
53
+ neo4j/
54
+ data/
55
+ plugins/
56
+
57
+ # ── Informal work: never published ────────────────────────────────────────
58
+ #
59
+ # Scratchpads, validation data, mock data, working notes, and the frame-to-frame
60
+ # exchanges that produced the design. None of it belongs on Kenning AI's GitHub
61
+ # presence or on PyPI. It is remembered in the substrates instead — the agent's
62
+ # ESSG and the author's experience graph — which is what those are for.
63
+ #
64
+ # `.work/` is the rule in its structural form. The named entries below are a
65
+ # denylist, and a denylist only holds if someone remembers to extend it: on
66
+ # 2026-08-25 three rumination documents were created in `docs/design/`, which was
67
+ # not on the list, and shipped to PyPI carrying 147 name occurrences. A file born
68
+ # in `.work/` inherits the rule from its location and needs nobody to remember.
69
+ #
70
+ # `docs/` publishes only the MODEL — `docs/design/ontology/`, which the code is
71
+ # built from. Reasoning about the model is not the model.
72
+
73
+ .work/
74
+ CLAUDE.md
75
+ *.mermaid
76
+ SPEC.md
77
+ TEMPORAL.md
78
+
79
+ # OS cruft
80
+ .DS_Store
81
+ **/.DS_Store
@@ -0,0 +1,91 @@
1
+ # v0.1.0 — Kenning Continuity
2
+
3
+ First release. An MCP server that lets LLM agents accumulate organizational
4
+ knowledge across sessions, scoped by domain, backed by Neo4j — with every
5
+ structural invariant enforced by a tool rather than requested in an
6
+ instruction.
7
+
8
+ ## What it is
9
+
10
+ Two layers, and the separation between them is the design.
11
+
12
+ **A process layer**, immutable: `Person → Session` within `Domain → Session`.
13
+ `NEXT_SESSION` always points forward in time because the tool will not write it
14
+ otherwise. Membership in this layer is the capacity to hold possible futures
15
+ and measure them toward actualization; nothing here is a referent.
16
+
17
+ **A knowledge layer**, append-only: 11 ontological types, 7 sub-labels arranged
18
+ as a lattice, 13 connection types, every node marked `:Knowledge`. Changing what
19
+ is known creates a new chain node linked by `EVOLVED_FROM`. Nothing is
20
+ overwritten, ever.
21
+
22
+ 23 tools: 4 process, 6 knowledge mutation, 5 query, 2 taxonomy, 6 graph
23
+ analytics. No raw Cypher write is exposed, so the graph cannot be corrupted by
24
+ a model that decides to try.
25
+
26
+ ## Why it does not degrade as it fills
27
+
28
+ Accumulating memory systems tend to fail in one of two ways: they confabulate
29
+ from the first day, because nothing separates what was observed from what a
30
+ model inferred while trying to be helpful; or they survive the demo and rot
31
+ under mass, because every write is an unconstrained append.
32
+
33
+ Four commitments answer that, and each is structural rather than advisory.
34
+
35
+ **Nothing is overwritten.** There is no `update_knowledge` and no
36
+ `retype_knowledge`, by design. The prior understanding stays readable and
37
+ attributable. Being wrong earlier is a fact about the record, not something to
38
+ erase from it.
39
+
40
+ **Every claim reaches its author in two hops.** An entity is discovered by a
41
+ `Session`; a `Session` is directed by a `Person`. Both edges are written by
42
+ tools that refuse to run without a real director, so *who said this, when, and
43
+ toward what purpose* is always answerable — because no code path creates
44
+ knowledge without it.
45
+
46
+ **Identity is never inferred from a string.** Seventeen nodes sharing a name
47
+ across eleven domains are seventeen acts of reference, correctly distinct.
48
+ Claiming two are one person is something someone does, in a session, recorded
49
+ as a `REFERENT_CLAIM` that can carry `distinct` — because a system with nowhere
50
+ to record *no* re-asks the same question forever.
51
+
52
+ **Structure carries facts; properties do not duplicate them.** A knowledge
53
+ entity holds no `domain` property. It is placed in one by the session that
54
+ discovered it and reached from there by a walk, so the two can never disagree.
55
+
56
+ There is no `confidence` field, deliberately. Someone's confidence on an
57
+ occasion is a fact about their experience and does not transmit. What such
58
+ scores reach for is carried by edges any reader can adjudicate from their own
59
+ frame: `VALIDATION`, `INVALIDATING`, and a `Challenge` with no paired
60
+ `Solution`.
61
+
62
+ ## The model leads
63
+
64
+ `docs/design/ontology/v0.1.0.tql` is the source the implementation is built
65
+ from, authored in TypeQL and validated against a live TypeDB server before any
66
+ Python was written. Where the code and the model disagree, the model wins and
67
+ the code is the defect. `docs/design/ontology/README.md` documents the build
68
+ loop and every place the Neo4j representation diverges from the model, with the
69
+ reason — a divergence not in that table is a bug, not a decision.
70
+
71
+ ## Licensing and attribution
72
+
73
+ Apache-2.0. Use it, modify it, run it in production, commercially or otherwise.
74
+
75
+ The work here is the ontology — the type lattice, resolution by walk, epistemic
76
+ standing placed in edges, and the principle that every invariant lives in a
77
+ tool. That is given away freely; Apache-2.0 asks only that attribution travel
78
+ with it. The Kenning AI name is not part of the grant (§6); `TRADEMARKS.md`
79
+ says what needs no permission, which is nearly everything.
80
+
81
+ ## Prior art in this codebase
82
+
83
+ The implementation is not new code. It has run in production at enterprise
84
+ scale — 37 domains, 376 sessions, 3,000+ knowledge entities over four months of
85
+ daily use — and the ontology it enforces was revised against measurements of
86
+ that graph rather than against argument. This is its first public release, not
87
+ its first line.
88
+
89
+ ## Requires
90
+
91
+ Python 3.10+ and a Neo4j 5.x instance. `pip install kenning-continuity`.