mneme-cli 0.5.0__tar.gz → 0.5.1__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 (50) hide show
  1. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/AGENTS.md +35 -0
  2. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/CHANGELOG.md +33 -0
  3. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/CLAUDE.md +1 -1
  4. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/CODER.md +1 -1
  5. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/EXAMPLES.md +2 -2
  6. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/FEATURES.md +8 -1
  7. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/PKG-INFO +10 -3
  8. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/README.md +8 -1
  9. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/__init__.py +2 -2
  10. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/config.py +2 -2
  11. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/core.py +962 -42
  12. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/server.py +2 -2
  13. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/README.md +1 -1
  14. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/ui.html +2 -2
  15. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/pyproject.toml +1 -1
  16. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_core.py +386 -4
  17. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/LICENSE +0 -0
  18. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/MANIFEST.in +0 -0
  19. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/__main__.py +0 -0
  20. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/eu-mdr.md +0 -0
  21. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/iso-13485.md +0 -0
  22. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/mappings/dds.json +0 -0
  23. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/mappings/requirements.json +0 -0
  24. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/mappings/risk-register.json +0 -0
  25. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/mappings/test-cases.json +0 -0
  26. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/profiles/mappings/user-needs.json +0 -0
  27. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/search.py +0 -0
  28. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/.gitignore +0 -0
  29. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/AGENTS.md +0 -0
  30. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/inbox/.gitkeep +0 -0
  31. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/index.md +0 -0
  32. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/log.md +0 -0
  33. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/profiles/README.md +0 -0
  34. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/profiles/mappings/.gitkeep +0 -0
  35. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/schema/entities.json +0 -0
  36. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/schema/graph.json +0 -0
  37. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/schema/tags.json +0 -0
  38. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/sources/.gitkeep +0 -0
  39. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme/templates/workspace/wiki/_templates/page.md +0 -0
  40. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/mneme_cli.egg-info/SOURCES.txt +0 -0
  41. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/setup.cfg +0 -0
  42. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/__init__.py +0 -0
  43. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_agent_loop.py +0 -0
  44. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_bug_regressions.py +0 -0
  45. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_ingest_csv.py +0 -0
  46. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_profile.py +0 -0
  47. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_schema_search.py +0 -0
  48. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_search.py +0 -0
  49. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_tornado_lint.py +0 -0
  50. {mneme_cli-0.5.0 → mneme_cli-0.5.1}/tests/test_trace.py +0 -0
@@ -213,6 +213,10 @@ out manually, then run `resync-resolve`.
213
213
  mneme tags suggest <client>/<page> # build tag packet
214
214
  mneme tags suggest <client>/<page> --json # raw dict
215
215
  mneme tags apply <client>/<page> --add t1,t2 --remove t3
216
+
217
+ # Bulk variants -- packet up to N pages in one round-trip
218
+ mneme tags bulk-suggest --client <c> --filter req- --limit 50 --out packet.md
219
+ mneme tags bulk-apply response.json # response: {"pages": [{wiki_path, add, remove}, ...]}
216
220
  ```
217
221
 
218
222
  `mneme tags suggest` builds a **tag packet**: the page content, current
@@ -245,6 +249,37 @@ mneme tags list # all tags + counts
245
249
  mneme tags merge <old> <new> # rename across all pages
246
250
  ```
247
251
 
252
+ ### 3.7 ENTITY — agent-driven classification
253
+
254
+ ```bash
255
+ mneme entity suggest --client <c> --limit 50 # classification packet
256
+ mneme entity apply --id iso-13485 --type standard # one at a time
257
+ mneme entity bulk-apply classifications.json # batch
258
+ ```
259
+
260
+ `mneme entity suggest` builds an **entity packet**: every `unknown`-typed
261
+ entity, the workspace's current type distribution, the valid type
262
+ vocabulary, an example wiki page per entity, and a prompt. The agent
263
+ returns a JSON array of `{id, type}` objects which `bulk-apply` writes
264
+ back atomically. Same philosophy as tags: mneme stays deterministic, the
265
+ LLM does the classification.
266
+
267
+ Valid types: `standard`, `company`, `person`, `product`, `technology`,
268
+ `concept`, `brand`, `unknown`.
269
+
270
+ ### 3.8 HOME — generated landing page
271
+
272
+ ```bash
273
+ mneme home --client <c> # wiki/<c>/HOME.md
274
+ mneme home --all-clients # wiki/HOME.md (cross-client)
275
+ ```
276
+
277
+ Generates an Obsidian-friendly navigation hub with Dataview queries
278
+ (group by type, by ID prefix like `REQ-*` / `DDS-*`, top tags) and a
279
+ plain-markdown `<details>` fallback so the page is useful outside
280
+ Obsidian. Run after a large ingest, or whenever the wiki's shape
281
+ changes meaningfully.
282
+
248
283
  ---
249
284
 
250
285
  ## 4. Profiles and the writing-style contract
@@ -58,6 +58,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
58
  - Chunking logic (`chunk_body`, `MAX_CHUNK_SIZE`, frame management).
59
59
  - Tantivy-reserved-word query sanitizer (FTS5 has different syntax).
60
60
 
61
+ ## [0.5.1] - 2026-04-14
62
+
63
+ ### Added
64
+ - **`mneme entity suggest` / `entity apply` / `entity bulk-apply`** — agent-driven
65
+ entity classification (same packet pattern as `tags suggest`). Mneme builds a
66
+ packet of unclassified entities + the workspace type taxonomy + example pages;
67
+ the LLM agent classifies; mneme writes the types back atomically.
68
+ - **`mneme tags bulk-suggest` / `tags bulk-apply`** — operate on many pages at
69
+ once. `bulk-suggest --client X --filter req- --limit 50` packets up to 50
70
+ matching pages; agent returns one JSON file; `bulk-apply` runs all the changes
71
+ with per-page error tolerance. Critical for tagging workspaces of hundreds of
72
+ pages.
73
+ - **`mneme home --client <slug>` / `--all-clients`** — generates a `HOME.md`
74
+ navigation hub with Obsidian Dataview queries (group by type, by ID prefix
75
+ like REQ-*/DDS-*, top tags) plus a plain-markdown `<details>` fallback for
76
+ non-Obsidian viewers.
77
+ - **`mneme ingest-dir --preserve-structure`** — mirrors source directory
78
+ hierarchy into wiki subdirectories. `sources/client/REQUIREMENTS/req-001.md`
79
+ becomes `wiki/client/requirements/req-001.md` instead of flattening. Also
80
+ resolves same-basename-different-directory collisions naturally.
81
+ - **`mneme resync` auto-detects subpath** from a source's location under
82
+ `sources/<client>/`, so resyncs of preserve-structure ingests target the
83
+ correct nested wiki page instead of creating a duplicate flat one.
84
+ - **Progress bar** for `ingest-dir` and `ingest-csv` long loops. TTY-aware
85
+ (in-place updates) with non-TTY fallback (periodic line output) so CI logs
86
+ stay readable.
87
+
88
+ ### Fixed
89
+ - `mneme status` crashed with `UnboundLocalError` because a local `status` in
90
+ the `agent show` branch shadowed the function name throughout `main()`.
91
+ - `wiki/HOME.md` and `wiki/<client>/HOME.md` are now skipped during HOME
92
+ generation so re-running is idempotent.
93
+
61
94
  ## [Unreleased]
62
95
 
63
96
  ### Added
@@ -1,4 +1,4 @@
1
- # Mnemosyne - Wiki Protocol
1
+ # mneme - Wiki Protocol
2
2
 
3
3
  > **If you are an LLM agent driving mneme**, read [AGENTS.md](AGENTS.md) **first**. It is the canonical agent protocol: the agent loop, the standard task templates, the sub-agent spawning patterns, and the hard rules you must never violate. CLAUDE.md (this file) describes the wiki layer; AGENTS.md describes the agent's job.
4
4
 
@@ -1,4 +1,4 @@
1
- # CODER.md - Developer Guide for Mnemosyne
1
+ # CODER.md - Developer Guide for mneme
2
2
 
3
3
  This is the engineering reference for anyone building on or extending mneme. Read this before writing code.
4
4
 
@@ -1,4 +1,4 @@
1
- # EXAMPLES.md - Mnemosyne Usage Guide
1
+ # EXAMPLES.md - mneme Usage Guide
2
2
 
3
3
  Real-world workflows, core concepts, and entity types used in mneme.
4
4
 
@@ -256,7 +256,7 @@ cp ~/old-qms/*.pdf inbox/
256
256
  # Let tornado figure it out
257
257
  mneme tornado --client cardio-monitor
258
258
 
259
- # === Mnemosyne Tornado ===
259
+ # === mneme Tornado ===
260
260
  #
261
261
  # Scanning inbox/... found 50 files
262
262
  #
@@ -1,4 +1,4 @@
1
- # Mnemosyne - Feature Roadmap
1
+ # mneme - Feature Roadmap
2
2
 
3
3
  ## Current Features (v0.4.0)
4
4
 
@@ -34,6 +34,13 @@
34
34
  | `mneme tags merge` | Merge one tag into another across all pages |
35
35
  | `mneme tags suggest <page>` | Build a *tag packet* for an LLM agent (page content + taxonomy + prompt) |
36
36
  | `mneme tags apply <page> --add t1,t2 --remove t3` | Atomic tag update: rewrites frontmatter, updates schema/tags.json, re-syncs FTS5 index |
37
+ | `mneme tags bulk-suggest --client X --filter req- --limit 50` | Bulk tag packet for many pages in one round-trip |
38
+ | `mneme tags bulk-apply response.json` | Apply tag changes from an agent JSON response (per-page error tolerance) |
39
+ | `mneme entity suggest --client X` | Agent-driven entity-classification packet (entities + taxonomy + example pages) |
40
+ | `mneme entity apply --id <id> --type <type>` | Set one entity's type atomically |
41
+ | `mneme entity bulk-apply classifications.json` | Bulk classify entities from a JSON file |
42
+ | `mneme home --client X` / `--all-clients` | Generate a `HOME.md` navigation hub with Dataview queries and plain-markdown fallback |
43
+ | `mneme ingest-dir --preserve-structure` | Mirror source directory hierarchy into wiki subdirectories (resync auto-detects matching subpath) |
37
44
  | `mneme diff` | Git-aware diff for a wiki page |
38
45
  | `mneme snapshot` | Versioned zip archive of a client + git tag |
39
46
  | `mneme dedupe` | Detect near-duplicate wiki pages |
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mneme-cli
3
- Version: 0.5.0
4
- Summary: Mnemosyne - CLI tool that turns documents into a searchable second brain. Ingest once, query forever.
3
+ Version: 0.5.1
4
+ Summary: mneme - CLI tool that turns documents into a searchable second brain. Ingest once, query forever.
5
5
  Author-email: Tolis Moustaklis <apostolos.moustaklis@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/tolism/mneme
@@ -42,7 +42,7 @@ Requires-Dist: twine>=5.0.0; extra == "release"
42
42
  Dynamic: license-file
43
43
 
44
44
  <p align="center">
45
- <img src="https://raw.githubusercontent.com/tolism/mneme/main/assets/logo.png" alt="Mnemosyne" width="400">
45
+ <img src="https://raw.githubusercontent.com/tolism/mneme/main/assets/logo.png" alt="mneme" width="400">
46
46
  </p>
47
47
 
48
48
  <h1 align="center"></h1>
@@ -167,6 +167,13 @@ One installed CLI serves many projects — each workspace is just a directory.
167
167
  | `mneme validate writing-style <page>` | Build a *review packet* for an LLM agent to grade a page |
168
168
  | `mneme tags suggest <page>` | Build a *tag packet* for an LLM agent to choose tags |
169
169
  | `mneme tags apply <page> --add t1,t2 --remove t3` | Atomic tag update (frontmatter + schema + search index) |
170
+ | `mneme tags bulk-suggest --client X --filter req- --limit 50` | Build one *bulk packet* covering many pages |
171
+ | `mneme tags bulk-apply response.json` | Apply tag changes from an agent JSON response |
172
+ | `mneme entity suggest --client X` | Build an *entity-classification packet* for an LLM agent |
173
+ | `mneme entity apply --id <id> --type <type>` | Set one entity's type atomically |
174
+ | `mneme entity bulk-apply classifications.json` | Bulk classify many entities |
175
+ | `mneme home --client X` / `--all-clients` | Generate a `HOME.md` navigation hub (Dataview + fallback) |
176
+ | `mneme ingest-dir --recursive --preserve-structure` | Mirror source directory hierarchy into the wiki |
170
177
  | `mneme agent plan --goal "..." --doc-type <t> --client <c>` | Generate a deterministic TODO plan from the active profile |
171
178
  | `mneme agent next-task` | Return the next ready task in the active plan |
172
179
  | `mneme agent task-done <id>` | Mark a task as done |
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/tolism/mneme/main/assets/logo.png" alt="Mnemosyne" width="400">
2
+ <img src="https://raw.githubusercontent.com/tolism/mneme/main/assets/logo.png" alt="mneme" width="400">
3
3
  </p>
4
4
 
5
5
  <h1 align="center"></h1>
@@ -124,6 +124,13 @@ One installed CLI serves many projects — each workspace is just a directory.
124
124
  | `mneme validate writing-style <page>` | Build a *review packet* for an LLM agent to grade a page |
125
125
  | `mneme tags suggest <page>` | Build a *tag packet* for an LLM agent to choose tags |
126
126
  | `mneme tags apply <page> --add t1,t2 --remove t3` | Atomic tag update (frontmatter + schema + search index) |
127
+ | `mneme tags bulk-suggest --client X --filter req- --limit 50` | Build one *bulk packet* covering many pages |
128
+ | `mneme tags bulk-apply response.json` | Apply tag changes from an agent JSON response |
129
+ | `mneme entity suggest --client X` | Build an *entity-classification packet* for an LLM agent |
130
+ | `mneme entity apply --id <id> --type <type>` | Set one entity's type atomically |
131
+ | `mneme entity bulk-apply classifications.json` | Bulk classify many entities |
132
+ | `mneme home --client X` / `--all-clients` | Generate a `HOME.md` navigation hub (Dataview + fallback) |
133
+ | `mneme ingest-dir --recursive --preserve-structure` | Mirror source directory hierarchy into the wiki |
127
134
  | `mneme agent plan --goal "..." --doc-type <t> --client <c>` | Generate a deterministic TODO plan from the active profile |
128
135
  | `mneme agent next-task` | Return the next ready task in the active plan |
129
136
  | `mneme agent task-done <id>` | Mark a task as done |
@@ -1,8 +1,8 @@
1
- """Mnemosyne - knowledge engine for documents.
1
+ """mneme - knowledge engine for documents.
2
2
 
3
3
  Public API:
4
4
  from mneme import core, config
5
5
  from mneme.core import ingest_source_to_both, dual_search, ...
6
6
  """
7
7
 
8
- __version__ = "0.5.0"
8
+ __version__ = "0.5.1"
@@ -1,5 +1,5 @@
1
1
  """
2
- Mnemosyne configuration and path resolution.
2
+ mneme configuration and path resolution.
3
3
 
4
4
  Two distinct roots:
5
5
 
@@ -83,7 +83,7 @@ LOG_MAX_ENTRIES = 500 # archive after this many entries
83
83
  ENTITY_STOPWORDS = {
84
84
  'key facts', 'open questions', 'page title', 'page types', 'special files',
85
85
  'client directories', 'cross references', 'source summary', 'detail section',
86
- 'wiki page', 'wiki pages', 'wiki protocol', 'knowledge engine', 'mnemosyne', 'mneme', 'summary section',
86
+ 'wiki page', 'wiki pages', 'wiki protocol', 'knowledge engine', 'mneme', 'summary section',
87
87
  'how to', 'last updated', 'activity log', 'health report', 'action plan',
88
88
  'executive summary', 'final verdict', 'risk scorecard', 'prior art',
89
89
  'patent strategy', 'filing strategy', 'negotiation strategy',