knowledge-worker 0.6.1__tar.gz → 0.7.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 (40) hide show
  1. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/PKG-INFO +54 -2
  2. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/README.md +45 -0
  3. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/PKG-INFO +54 -2
  4. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/SOURCES.txt +3 -0
  5. knowledge_worker-0.7.0/mygraph/deep_dive.py +652 -0
  6. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/mygraph.py +10 -0
  7. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/pyproject.toml +13 -1
  8. knowledge_worker-0.7.0/tests/test_cli_regression.py +179 -0
  9. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/tests/test_cli_smoke.py +1 -0
  10. knowledge_worker-0.7.0/tests/test_deep_dive.py +340 -0
  11. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/LICENSE +0 -0
  12. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/dependency_links.txt +0 -0
  13. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/entry_points.txt +0 -0
  14. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/requires.txt +0 -0
  15. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/knowledge_worker.egg-info/top_level.txt +0 -0
  16. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/__init__.py +0 -0
  17. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/anthropic_client.py +0 -0
  18. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/audit.py +0 -0
  19. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/check.py +0 -0
  20. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/discover.py +0 -0
  21. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/eval_log.py +0 -0
  22. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/export_context.py +0 -0
  23. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/extractor.py +0 -0
  24. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/extractor_openai.py +0 -0
  25. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/ingest.py +0 -0
  26. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/memory_audit.py +0 -0
  27. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/merge.py +0 -0
  28. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/owl_io.py +0 -0
  29. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/review.py +0 -0
  30. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/validator.py +0 -0
  31. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/mygraph/viz.py +0 -0
  32. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/ollama_proxy/eval_compare.py +0 -0
  33. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/ollama_proxy/extractor_adapter.py +0 -0
  34. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/ollama_proxy/proxy.py +0 -0
  35. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/ollama_proxy/server.py +0 -0
  36. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/setup.cfg +0 -0
  37. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/tests/test_anthropic_client.py +0 -0
  38. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/tests/test_benchmarks.py +0 -0
  39. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/tests/test_discover.py +0 -0
  40. {knowledge_worker-0.6.1 → knowledge_worker-0.7.0}/tests/test_extractor_provenance.py +0 -0
@@ -1,21 +1,28 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: knowledge-worker
3
- Version: 0.6.1
3
+ Version: 0.7.0
4
4
  Summary: Provenance-backed personal knowledge graph for local AI workflows
5
5
  Author-email: Rahul Rangarao <rahulmranga@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/rahulmranga/knowledge-worker
8
8
  Project-URL: Repository, https://github.com/rahulmranga/knowledge-worker
9
9
  Project-URL: Issues, https://github.com/rahulmranga/knowledge-worker/issues
10
- Keywords: knowledge-graph,llm-memory,local-first,provenance,personal-knowledge-management,ai,claude
10
+ Keywords: knowledge-graph,ai-memory,llm-memory,memory,context-management,local-first,provenance,personal-knowledge-management,rag,mcp,ai,claude
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Environment :: Console
15
+ Classifier: Operating System :: OS Independent
13
16
  Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
14
18
  Classifier: Programming Language :: Python :: 3.10
15
19
  Classifier: Programming Language :: Python :: 3.11
16
20
  Classifier: Programming Language :: Python :: 3.12
17
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Database
18
23
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
25
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
19
26
  Requires-Python: >=3.10
20
27
  Description-Content-Type: text/markdown
21
28
  License-File: LICENSE
@@ -83,6 +90,8 @@ matrix and [Benchmarks](docs/BENCHMARKS.md) for the offline demo-graph checks.
83
90
  ## What It Does
84
91
 
85
92
  - Ingests markdown notes into candidate graph nodes and edges.
93
+ - Generates pre-ingest deep-dive workspaces for sources that need synthesis
94
+ before graph promotion.
86
95
  - Requires provenance excerpts before claims become durable memory.
87
96
  - Lets you review, accept, reject, or edit LLM proposals before merge.
88
97
  - Searches by term, lists nodes by type, and finds paths between ideas.
@@ -209,6 +218,7 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
209
218
  | `list <type>` | List nodes of a given type |
210
219
  | `path <a> <b>` | Find the shortest path between two nodes |
211
220
  | `ingest <file.md>` | Extract, validate, review, merge, and eval candidates |
221
+ | `deep-dive <file.md>` | Generate a pre-ingest workspace with artifacts and candidates |
212
222
  | `check --provenance` | Flag nodes with missing source citations |
213
223
  | `export --ttl` | Emit Turtle/RDF |
214
224
  | `context` | Print a compact LLM-ready context snapshot |
@@ -224,6 +234,26 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
224
234
 
225
235
  You can ingest your notes with or without an API key.
226
236
 
237
+ ### How Memory Enters The Graph
238
+
239
+ Graph memory is promoted through a review lifecycle:
240
+
241
+ ```text
242
+ source note
243
+ -> candidates.json
244
+ -> validate
245
+ -> review
246
+ -> merge accepted items into MYGRAPH_PATH
247
+ ```
248
+
249
+ Candidates are proposals, not memory. Validation checks schema, IDs,
250
+ provenance excerpts, and edge endpoints. Review is the promotion gate. The
251
+ active graph changes only after accepted candidates are merged.
252
+
253
+ The product contract is:
254
+
255
+ > The model proposes. Artifacts expose reasoning. Provenance verifies. Human review promotes.
256
+
227
257
  ### Claude or Codex App, No API Key
228
258
 
229
259
  If you are already working with Claude, Codex, or ChatGPT in an app session, you do **not** need an API key. Ask the assistant to produce a `*.candidates.json` file that follows the schema in `mygraph/extractor.py`, then let the local CLI validate, review, and merge it. In Claude Code, the bundled [`/ingest-notes`](.claude/skills/ingest-notes/SKILL.md) skill runs this flow for you:
@@ -238,6 +268,28 @@ mykg ingest path/to/your/notes.md --candidates-file path/to/your/notes.candidate
238
268
 
239
269
  The app subscription helps you create the candidates file. The repo still keeps graph validation and merge local.
240
270
 
271
+ ### Deep Dive Workflow
272
+
273
+ Use `deep-dive` when a source needs synthesis, challenge, or a reasoning
274
+ workspace before it becomes graph memory:
275
+
276
+ ```bash
277
+ mykg deep-dive notes.md --out-dir ~/private/deepdives/notes
278
+ mykg deep-dive inspect ~/private/deepdives/notes
279
+ mykg deep-dive add-to-graph ~/private/deepdives/notes
280
+ ```
281
+
282
+ Generation creates a workspace with `manifest.json`, `artifact-plan.json`,
283
+ Markdown artifacts, validation reports, an artifact-local graph summary, and
284
+ canonical candidates. It does **not** mutate `MYGRAPH_PATH`.
285
+
286
+ `add-to-graph` reads the workspace manifest and delegates to the existing ingest
287
+ validation/review/merge path. Keep using `ingest` directly when you already have
288
+ a focused source note or hand-curated candidates file.
289
+
290
+ See [Deep-Dive Interaction Model](docs/DEEP_DIVE_INTERACTION_MODEL.md) for the
291
+ generate, inspect, challenge, approve, and add-to-graph semantics.
292
+
241
293
  ### Automated API-Backed Ingest
242
294
 
243
295
  If you want the CLI to call an LLM directly, use a provider API key or local Ollama.
@@ -35,6 +35,8 @@ matrix and [Benchmarks](docs/BENCHMARKS.md) for the offline demo-graph checks.
35
35
  ## What It Does
36
36
 
37
37
  - Ingests markdown notes into candidate graph nodes and edges.
38
+ - Generates pre-ingest deep-dive workspaces for sources that need synthesis
39
+ before graph promotion.
38
40
  - Requires provenance excerpts before claims become durable memory.
39
41
  - Lets you review, accept, reject, or edit LLM proposals before merge.
40
42
  - Searches by term, lists nodes by type, and finds paths between ideas.
@@ -161,6 +163,7 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
161
163
  | `list <type>` | List nodes of a given type |
162
164
  | `path <a> <b>` | Find the shortest path between two nodes |
163
165
  | `ingest <file.md>` | Extract, validate, review, merge, and eval candidates |
166
+ | `deep-dive <file.md>` | Generate a pre-ingest workspace with artifacts and candidates |
164
167
  | `check --provenance` | Flag nodes with missing source citations |
165
168
  | `export --ttl` | Emit Turtle/RDF |
166
169
  | `context` | Print a compact LLM-ready context snapshot |
@@ -176,6 +179,26 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
176
179
 
177
180
  You can ingest your notes with or without an API key.
178
181
 
182
+ ### How Memory Enters The Graph
183
+
184
+ Graph memory is promoted through a review lifecycle:
185
+
186
+ ```text
187
+ source note
188
+ -> candidates.json
189
+ -> validate
190
+ -> review
191
+ -> merge accepted items into MYGRAPH_PATH
192
+ ```
193
+
194
+ Candidates are proposals, not memory. Validation checks schema, IDs,
195
+ provenance excerpts, and edge endpoints. Review is the promotion gate. The
196
+ active graph changes only after accepted candidates are merged.
197
+
198
+ The product contract is:
199
+
200
+ > The model proposes. Artifacts expose reasoning. Provenance verifies. Human review promotes.
201
+
179
202
  ### Claude or Codex App, No API Key
180
203
 
181
204
  If you are already working with Claude, Codex, or ChatGPT in an app session, you do **not** need an API key. Ask the assistant to produce a `*.candidates.json` file that follows the schema in `mygraph/extractor.py`, then let the local CLI validate, review, and merge it. In Claude Code, the bundled [`/ingest-notes`](.claude/skills/ingest-notes/SKILL.md) skill runs this flow for you:
@@ -190,6 +213,28 @@ mykg ingest path/to/your/notes.md --candidates-file path/to/your/notes.candidate
190
213
 
191
214
  The app subscription helps you create the candidates file. The repo still keeps graph validation and merge local.
192
215
 
216
+ ### Deep Dive Workflow
217
+
218
+ Use `deep-dive` when a source needs synthesis, challenge, or a reasoning
219
+ workspace before it becomes graph memory:
220
+
221
+ ```bash
222
+ mykg deep-dive notes.md --out-dir ~/private/deepdives/notes
223
+ mykg deep-dive inspect ~/private/deepdives/notes
224
+ mykg deep-dive add-to-graph ~/private/deepdives/notes
225
+ ```
226
+
227
+ Generation creates a workspace with `manifest.json`, `artifact-plan.json`,
228
+ Markdown artifacts, validation reports, an artifact-local graph summary, and
229
+ canonical candidates. It does **not** mutate `MYGRAPH_PATH`.
230
+
231
+ `add-to-graph` reads the workspace manifest and delegates to the existing ingest
232
+ validation/review/merge path. Keep using `ingest` directly when you already have
233
+ a focused source note or hand-curated candidates file.
234
+
235
+ See [Deep-Dive Interaction Model](docs/DEEP_DIVE_INTERACTION_MODEL.md) for the
236
+ generate, inspect, challenge, approve, and add-to-graph semantics.
237
+
193
238
  ### Automated API-Backed Ingest
194
239
 
195
240
  If you want the CLI to call an LLM directly, use a provider API key or local Ollama.
@@ -1,21 +1,28 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: knowledge-worker
3
- Version: 0.6.1
3
+ Version: 0.7.0
4
4
  Summary: Provenance-backed personal knowledge graph for local AI workflows
5
5
  Author-email: Rahul Rangarao <rahulmranga@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/rahulmranga/knowledge-worker
8
8
  Project-URL: Repository, https://github.com/rahulmranga/knowledge-worker
9
9
  Project-URL: Issues, https://github.com/rahulmranga/knowledge-worker/issues
10
- Keywords: knowledge-graph,llm-memory,local-first,provenance,personal-knowledge-management,ai,claude
10
+ Keywords: knowledge-graph,ai-memory,llm-memory,memory,context-management,local-first,provenance,personal-knowledge-management,rag,mcp,ai,claude
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Environment :: Console
15
+ Classifier: Operating System :: OS Independent
13
16
  Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
14
18
  Classifier: Programming Language :: Python :: 3.10
15
19
  Classifier: Programming Language :: Python :: 3.11
16
20
  Classifier: Programming Language :: Python :: 3.12
17
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Database
18
23
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
25
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
19
26
  Requires-Python: >=3.10
20
27
  Description-Content-Type: text/markdown
21
28
  License-File: LICENSE
@@ -83,6 +90,8 @@ matrix and [Benchmarks](docs/BENCHMARKS.md) for the offline demo-graph checks.
83
90
  ## What It Does
84
91
 
85
92
  - Ingests markdown notes into candidate graph nodes and edges.
93
+ - Generates pre-ingest deep-dive workspaces for sources that need synthesis
94
+ before graph promotion.
86
95
  - Requires provenance excerpts before claims become durable memory.
87
96
  - Lets you review, accept, reject, or edit LLM proposals before merge.
88
97
  - Searches by term, lists nodes by type, and finds paths between ideas.
@@ -209,6 +218,7 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
209
218
  | `list <type>` | List nodes of a given type |
210
219
  | `path <a> <b>` | Find the shortest path between two nodes |
211
220
  | `ingest <file.md>` | Extract, validate, review, merge, and eval candidates |
221
+ | `deep-dive <file.md>` | Generate a pre-ingest workspace with artifacts and candidates |
212
222
  | `check --provenance` | Flag nodes with missing source citations |
213
223
  | `export --ttl` | Emit Turtle/RDF |
214
224
  | `context` | Print a compact LLM-ready context snapshot |
@@ -224,6 +234,26 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
224
234
 
225
235
  You can ingest your notes with or without an API key.
226
236
 
237
+ ### How Memory Enters The Graph
238
+
239
+ Graph memory is promoted through a review lifecycle:
240
+
241
+ ```text
242
+ source note
243
+ -> candidates.json
244
+ -> validate
245
+ -> review
246
+ -> merge accepted items into MYGRAPH_PATH
247
+ ```
248
+
249
+ Candidates are proposals, not memory. Validation checks schema, IDs,
250
+ provenance excerpts, and edge endpoints. Review is the promotion gate. The
251
+ active graph changes only after accepted candidates are merged.
252
+
253
+ The product contract is:
254
+
255
+ > The model proposes. Artifacts expose reasoning. Provenance verifies. Human review promotes.
256
+
227
257
  ### Claude or Codex App, No API Key
228
258
 
229
259
  If you are already working with Claude, Codex, or ChatGPT in an app session, you do **not** need an API key. Ask the assistant to produce a `*.candidates.json` file that follows the schema in `mygraph/extractor.py`, then let the local CLI validate, review, and merge it. In Claude Code, the bundled [`/ingest-notes`](.claude/skills/ingest-notes/SKILL.md) skill runs this flow for you:
@@ -238,6 +268,28 @@ mykg ingest path/to/your/notes.md --candidates-file path/to/your/notes.candidate
238
268
 
239
269
  The app subscription helps you create the candidates file. The repo still keeps graph validation and merge local.
240
270
 
271
+ ### Deep Dive Workflow
272
+
273
+ Use `deep-dive` when a source needs synthesis, challenge, or a reasoning
274
+ workspace before it becomes graph memory:
275
+
276
+ ```bash
277
+ mykg deep-dive notes.md --out-dir ~/private/deepdives/notes
278
+ mykg deep-dive inspect ~/private/deepdives/notes
279
+ mykg deep-dive add-to-graph ~/private/deepdives/notes
280
+ ```
281
+
282
+ Generation creates a workspace with `manifest.json`, `artifact-plan.json`,
283
+ Markdown artifacts, validation reports, an artifact-local graph summary, and
284
+ canonical candidates. It does **not** mutate `MYGRAPH_PATH`.
285
+
286
+ `add-to-graph` reads the workspace manifest and delegates to the existing ingest
287
+ validation/review/merge path. Keep using `ingest` directly when you already have
288
+ a focused source note or hand-curated candidates file.
289
+
290
+ See [Deep-Dive Interaction Model](docs/DEEP_DIVE_INTERACTION_MODEL.md) for the
291
+ generate, inspect, challenge, approve, and add-to-graph semantics.
292
+
241
293
  ### Automated API-Backed Ingest
242
294
 
243
295
  If you want the CLI to call an LLM directly, use a provider API key or local Ollama.
@@ -11,6 +11,7 @@ mygraph/__init__.py
11
11
  mygraph/anthropic_client.py
12
12
  mygraph/audit.py
13
13
  mygraph/check.py
14
+ mygraph/deep_dive.py
14
15
  mygraph/discover.py
15
16
  mygraph/eval_log.py
16
17
  mygraph/export_context.py
@@ -30,6 +31,8 @@ ollama_proxy/proxy.py
30
31
  ollama_proxy/server.py
31
32
  tests/test_anthropic_client.py
32
33
  tests/test_benchmarks.py
34
+ tests/test_cli_regression.py
33
35
  tests/test_cli_smoke.py
36
+ tests/test_deep_dive.py
34
37
  tests/test_discover.py
35
38
  tests/test_extractor_provenance.py