@mnemonik/shared 6.16.0 → 6.17.0

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.
@@ -4,12 +4,12 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for the usage guide.
5
5
  * Shared usage guide content imported by the server.
6
6
  *
7
- * Version: 2.82
8
- * Updated: 2026-05-27 - Doc-truth-contract-rebuild: teach authority-backed
9
- * truth findings and keep legacy coupling drift diagnostic only.
7
+ * Version: 2.83
8
+ * Updated: 2026-07-17 - Doc-drift-throughput: teach bounded document packets,
9
+ * current locators, and independently evidenced verdict batches.
10
10
  *
11
11
  * This guide focuses on HOW to use Mnemonik effectively, not WHAT tools exist.
12
12
  * Tool schemas already tell agents what's available - they need the workflow.
13
13
  */
14
- export declare const USAGE_GUIDE = "# Mnemonik Workflow Guide (v2.82)\n\n## Workflow\n\nsession_bootstrap \u2192 memory_search \u2192 file_context \u2192 [work] \u2192 memory_add \u2192 memory_state\n\n## Tool Selection by Stage\n\n### Session start\n- session_bootstrap: loads context, policies, pending tasks (call once, first thing)\n- memory_search: search by task domain; set workflowContext (feature_implementation, debugging, exploration, policy_review)\n- projects: resolve project IDs if context unclear\n- policy: review safety rules\n\n### Before editing files\n- file_context: fetch memories for the file \u2014 call for EVERY file you edit\n- memory_search: second search scoped to file/module if needed\n- mnemonik.docs({ action: 'links' }): check doc couplings for the file\n\n### During implementation\n- memory_get: retrieve specific memory by id\n- memory_update: refine memory created this session\n- memory_info: query history, provenance, confidence breakdown, links, graph\n- assist: get tool guidance if uncertain\n\n### After significant work\n- memory_add: save decisions, outcomes, patterns, bug root causes\n- memory_state: reinforce (memory helped), supersede (replace outdated), deprecate, penalize, dispute\n- tasks: mark tasks in progress or complete\n- mnemonik.docs({ action: 'status' }): view doc-truth health (legacy coupling counts are diagnostic only \u2014 do not act on them as drift)\n\n### Diagnostics\n- doctor: when tool calls fail or behavior is inconsistent\n- scanner: refresh embeddings, trigger scans, check drift\n\n## Skip conditions\n\nSkip memory tools for: formatting-only edits, trivial one-line changes, mechanical refactors, git operations, running tests.\n\n## Completion gate\n\nNever tell the user significant work is done without calling memory_add first in the same response. Changes made + responding next = completion. \"Progress updates\" count.\n\n## Memory search tips\n\n- Query should include task intent + key entities\n- Set workflowContext when you know the phase\n- Use currentFile to boost file-linked memories\n- Use filterOnly:true only for narrow filters (no embedding, requires >=1 filter)\n\n## Proactive heuristics\n\n- Long sessions: re-run memory_search after switching topics\n- Conflicting info: use memory_state to supersede/dispute\n- High-impact changes: save memory immediately after verification\n- Act on docTruthFindings/_docDrift only when the finding has authority, observed mismatch, and agentAction='update_doc'; linkedDocs and stale-coupling counts are legacy diagnostics\n\n## Anti-fade (every ~10 tool calls)\n\nCheck: (1) memory_search before work? (2) file_context before edit? (3) memory_add after completing? No session_bootstrap? Call it now.\n";
14
+ export declare const USAGE_GUIDE = "# Mnemonik Workflow Guide (v2.83)\n\n## Workflow\n\nsession_bootstrap \u2192 memory_search \u2192 file_context \u2192 [work] \u2192 memory_add \u2192 memory_state\n\n## Tool Selection by Stage\n\n### Session start\n- session_bootstrap: loads context, policies, pending tasks (call once, first thing)\n- memory_search: search by task domain; set workflowContext (feature_implementation, debugging, exploration, policy_review)\n- projects: resolve project IDs if context unclear\n- policy: review safety rules\n\n### Before editing files\n- file_context: fetch memories for the file \u2014 call for EVERY file you edit\n- memory_search: second search scoped to file/module if needed\n- mnemonik.docs({ action: 'links' }): check doc couplings for the file\n\n### During implementation\n- memory_get: retrieve specific memory by id\n- memory_update: refine memory created this session\n- memory_info: query history, provenance, confidence breakdown, links, graph\n- assist: get tool guidance if uncertain\n\n### Documentation drift\n- Drift is drift: every finding returned by mnemonik.docs({ action: 'drift' }) is normal development work, including prose that requires agent reasoning. Queue size is never a reason to defer or dismiss it.\n- Start with mnemonik.docs({ action: 'drift', summaryOnly: true }) for the document inventory, choose a document, then use its exact retrieve call for a bounded work packet.\n- Each packet resolves the current Markdown heading range and current code locations from stable heading/symbol/snippet identities. Use those current locations; line numbers are display metadata and may move.\n- Fix update_doc/regenerate_doc findings in the document. For verify_and_report findings, inspect the cited code and submit mnemonik.docs({ action: 'verdicts', items: [...] }) with an independent cited evidence string for every item.\n- Follow each document's retrieveMore call and the inventory cursor until complete. Do not sample, suppress, or down-rank obligations because the queue is large.\n\n### After significant work\n- memory_add: save decisions, outcomes, patterns, bug root causes\n- memory_state: reinforce (memory helped), supersede (replace outdated), deprecate, penalize, dispute\n- tasks: mark tasks in progress or complete\n- mnemonik.docs({ action: 'status' }): view doc-truth health (legacy coupling counts are diagnostic only \u2014 do not act on them as drift)\n\n### Diagnostics\n- doctor: when tool calls fail or behavior is inconsistent\n- scanner: refresh embeddings, trigger scans, check drift\n\n## Skip conditions\n\nSkip memory tools for: formatting-only edits, trivial one-line changes, mechanical refactors, git operations, running tests.\n\n## Completion gate\n\nNever tell the user significant work is done without calling memory_add first in the same response. Changes made + responding next = completion. \"Progress updates\" count.\n\n## Memory search tips\n\n- Query should include task intent + key entities\n- Set workflowContext when you know the phase\n- Use currentFile to boost file-linked memories\n- Use filterOnly:true only for narrow filters (no embedding, requires >=1 filter)\n\n## Proactive heuristics\n\n- Long sessions: re-run memory_search after switching topics\n- Conflicting info: use memory_state to supersede/dispute\n- High-impact changes: save memory immediately after verification\n- Act on every docTruthFindings/_docDrift obligation: edit update_doc/regenerate_doc findings and reason through verify_and_report prose findings. linkedDocs and stale-coupling counts alone remain legacy diagnostics\n\n## Anti-fade (every ~10 tool calls)\n\nCheck: (1) memory_search before work? (2) file_context before edit? (3) memory_add after completing? No session_bootstrap? Call it now.\n";
15
15
  //# sourceMappingURL=usageGuide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usageGuide.d.ts","sourceRoot":"","sources":["../src/usageGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,WAAW,2pFA4DvB,CAAC"}
1
+ {"version":3,"file":"usageGuide.d.ts","sourceRoot":"","sources":["../src/usageGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,WAAW,urHAmEvB,CAAC"}
@@ -4,14 +4,14 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for the usage guide.
5
5
  * Shared usage guide content imported by the server.
6
6
  *
7
- * Version: 2.82
8
- * Updated: 2026-05-27 - Doc-truth-contract-rebuild: teach authority-backed
9
- * truth findings and keep legacy coupling drift diagnostic only.
7
+ * Version: 2.83
8
+ * Updated: 2026-07-17 - Doc-drift-throughput: teach bounded document packets,
9
+ * current locators, and independently evidenced verdict batches.
10
10
  *
11
11
  * This guide focuses on HOW to use Mnemonik effectively, not WHAT tools exist.
12
12
  * Tool schemas already tell agents what's available - they need the workflow.
13
13
  */
14
- export const USAGE_GUIDE = `# Mnemonik Workflow Guide (v2.82)
14
+ export const USAGE_GUIDE = `# Mnemonik Workflow Guide (v2.83)
15
15
 
16
16
  ## Workflow
17
17
 
@@ -36,6 +36,13 @@ session_bootstrap → memory_search → file_context → [work] → memory_add
36
36
  - memory_info: query history, provenance, confidence breakdown, links, graph
37
37
  - assist: get tool guidance if uncertain
38
38
 
39
+ ### Documentation drift
40
+ - Drift is drift: every finding returned by mnemonik.docs({ action: 'drift' }) is normal development work, including prose that requires agent reasoning. Queue size is never a reason to defer or dismiss it.
41
+ - Start with mnemonik.docs({ action: 'drift', summaryOnly: true }) for the document inventory, choose a document, then use its exact retrieve call for a bounded work packet.
42
+ - Each packet resolves the current Markdown heading range and current code locations from stable heading/symbol/snippet identities. Use those current locations; line numbers are display metadata and may move.
43
+ - Fix update_doc/regenerate_doc findings in the document. For verify_and_report findings, inspect the cited code and submit mnemonik.docs({ action: 'verdicts', items: [...] }) with an independent cited evidence string for every item.
44
+ - Follow each document's retrieveMore call and the inventory cursor until complete. Do not sample, suppress, or down-rank obligations because the queue is large.
45
+
39
46
  ### After significant work
40
47
  - memory_add: save decisions, outcomes, patterns, bug root causes
41
48
  - memory_state: reinforce (memory helped), supersede (replace outdated), deprecate, penalize, dispute
@@ -66,7 +73,7 @@ Never tell the user significant work is done without calling memory_add first in
66
73
  - Long sessions: re-run memory_search after switching topics
67
74
  - Conflicting info: use memory_state to supersede/dispute
68
75
  - High-impact changes: save memory immediately after verification
69
- - Act on docTruthFindings/_docDrift only when the finding has authority, observed mismatch, and agentAction='update_doc'; linkedDocs and stale-coupling counts are legacy diagnostics
76
+ - Act on every docTruthFindings/_docDrift obligation: edit update_doc/regenerate_doc findings and reason through verify_and_report prose findings. linkedDocs and stale-coupling counts alone remain legacy diagnostics
70
77
 
71
78
  ## Anti-fade (every ~10 tool calls)
72
79
 
@@ -1 +1 @@
1
- {"version":3,"file":"usageGuide.js","sourceRoot":"","sources":["../src/usageGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D1B,CAAC"}
1
+ {"version":3,"file":"usageGuide.js","sourceRoot":"","sources":["../src/usageGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmE1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnemonik/shared",
3
- "version": "6.16.0",
3
+ "version": "6.17.0",
4
4
  "description": "Shared constants and utilities for Mnemonik packages",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/usageGuide.ts CHANGED
@@ -4,15 +4,15 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for the usage guide.
5
5
  * Shared usage guide content imported by the server.
6
6
  *
7
- * Version: 2.82
8
- * Updated: 2026-05-27 - Doc-truth-contract-rebuild: teach authority-backed
9
- * truth findings and keep legacy coupling drift diagnostic only.
7
+ * Version: 2.83
8
+ * Updated: 2026-07-17 - Doc-drift-throughput: teach bounded document packets,
9
+ * current locators, and independently evidenced verdict batches.
10
10
  *
11
11
  * This guide focuses on HOW to use Mnemonik effectively, not WHAT tools exist.
12
12
  * Tool schemas already tell agents what's available - they need the workflow.
13
13
  */
14
14
 
15
- export const USAGE_GUIDE = `# Mnemonik Workflow Guide (v2.82)
15
+ export const USAGE_GUIDE = `# Mnemonik Workflow Guide (v2.83)
16
16
 
17
17
  ## Workflow
18
18
 
@@ -37,6 +37,13 @@ session_bootstrap → memory_search → file_context → [work] → memory_add
37
37
  - memory_info: query history, provenance, confidence breakdown, links, graph
38
38
  - assist: get tool guidance if uncertain
39
39
 
40
+ ### Documentation drift
41
+ - Drift is drift: every finding returned by mnemonik.docs({ action: 'drift' }) is normal development work, including prose that requires agent reasoning. Queue size is never a reason to defer or dismiss it.
42
+ - Start with mnemonik.docs({ action: 'drift', summaryOnly: true }) for the document inventory, choose a document, then use its exact retrieve call for a bounded work packet.
43
+ - Each packet resolves the current Markdown heading range and current code locations from stable heading/symbol/snippet identities. Use those current locations; line numbers are display metadata and may move.
44
+ - Fix update_doc/regenerate_doc findings in the document. For verify_and_report findings, inspect the cited code and submit mnemonik.docs({ action: 'verdicts', items: [...] }) with an independent cited evidence string for every item.
45
+ - Follow each document's retrieveMore call and the inventory cursor until complete. Do not sample, suppress, or down-rank obligations because the queue is large.
46
+
40
47
  ### After significant work
41
48
  - memory_add: save decisions, outcomes, patterns, bug root causes
42
49
  - memory_state: reinforce (memory helped), supersede (replace outdated), deprecate, penalize, dispute
@@ -67,7 +74,7 @@ Never tell the user significant work is done without calling memory_add first in
67
74
  - Long sessions: re-run memory_search after switching topics
68
75
  - Conflicting info: use memory_state to supersede/dispute
69
76
  - High-impact changes: save memory immediately after verification
70
- - Act on docTruthFindings/_docDrift only when the finding has authority, observed mismatch, and agentAction='update_doc'; linkedDocs and stale-coupling counts are legacy diagnostics
77
+ - Act on every docTruthFindings/_docDrift obligation: edit update_doc/regenerate_doc findings and reason through verify_and_report prose findings. linkedDocs and stale-coupling counts alone remain legacy diagnostics
71
78
 
72
79
  ## Anti-fade (every ~10 tool calls)
73
80