mindlore 0.6.8 → 0.7.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.
- package/README.md +259 -259
- package/SCHEMA.md +292 -292
- package/dist/scripts/cc-memory-bulk-sync.d.ts.map +1 -1
- package/dist/scripts/cc-memory-bulk-sync.js +4 -2
- package/dist/scripts/cc-memory-bulk-sync.js.map +1 -1
- package/dist/scripts/cc-session-sync.d.ts.map +1 -1
- package/dist/scripts/cc-session-sync.js +9 -7
- package/dist/scripts/cc-session-sync.js.map +1 -1
- package/dist/scripts/fetch-raw.js +5 -4
- package/dist/scripts/fetch-raw.js.map +1 -1
- package/dist/scripts/init.js +16 -12
- package/dist/scripts/init.js.map +1 -1
- package/dist/scripts/lib/consolidation.js +10 -10
- package/dist/scripts/lib/constants.d.ts +3 -0
- package/dist/scripts/lib/constants.d.ts.map +1 -1
- package/dist/scripts/lib/constants.js +11 -1
- package/dist/scripts/lib/constants.js.map +1 -1
- package/dist/scripts/lib/decay.js +9 -9
- package/dist/scripts/lib/episodes.js +23 -23
- package/dist/scripts/lib/err-msg.d.ts +2 -0
- package/dist/scripts/lib/err-msg.d.ts.map +1 -0
- package/dist/scripts/lib/err-msg.js +7 -0
- package/dist/scripts/lib/err-msg.js.map +1 -0
- package/dist/scripts/lib/mcp-namespace.d.ts +2 -0
- package/dist/scripts/lib/mcp-namespace.d.ts.map +1 -0
- package/dist/scripts/lib/mcp-namespace.js +21 -0
- package/dist/scripts/lib/mcp-namespace.js.map +1 -0
- package/dist/scripts/lib/mcp-telemetry.d.ts +11 -0
- package/dist/scripts/lib/mcp-telemetry.d.ts.map +1 -0
- package/dist/scripts/lib/mcp-telemetry.js +37 -0
- package/dist/scripts/lib/mcp-telemetry.js.map +1 -0
- package/dist/scripts/lib/mcp-tools.d.ts +10 -0
- package/dist/scripts/lib/mcp-tools.d.ts.map +1 -0
- package/dist/scripts/lib/mcp-tools.js +121 -0
- package/dist/scripts/lib/mcp-tools.js.map +1 -0
- package/dist/scripts/lib/migrations-v061.js +21 -21
- package/dist/scripts/lib/migrations-v062.js +11 -11
- package/dist/scripts/lib/migrations-v063.js +14 -14
- package/dist/scripts/lib/migrations-v067.js +11 -11
- package/dist/scripts/lib/rrf.d.ts.map +1 -1
- package/dist/scripts/lib/rrf.js +2 -1
- package/dist/scripts/lib/rrf.js.map +1 -1
- package/dist/scripts/lib/schema-version.js +6 -6
- package/dist/scripts/lib/search-cache.js +11 -11
- package/dist/scripts/lib/search-engine.d.ts +1 -0
- package/dist/scripts/lib/search-engine.d.ts.map +1 -1
- package/dist/scripts/lib/search-engine.js +9 -5
- package/dist/scripts/lib/search-engine.js.map +1 -1
- package/dist/scripts/lib/secure-io.d.ts +11 -0
- package/dist/scripts/lib/secure-io.d.ts.map +1 -0
- package/dist/scripts/lib/secure-io.js +26 -0
- package/dist/scripts/lib/secure-io.js.map +1 -0
- package/dist/scripts/lib/session-payload.js +7 -7
- package/dist/scripts/lib/slugify.d.ts +2 -0
- package/dist/scripts/lib/slugify.d.ts.map +1 -0
- package/dist/scripts/lib/slugify.js +13 -0
- package/dist/scripts/lib/slugify.js.map +1 -0
- package/dist/scripts/lib/smart-snippet.d.ts +9 -0
- package/dist/scripts/lib/smart-snippet.d.ts.map +1 -0
- package/dist/scripts/lib/smart-snippet.js +47 -0
- package/dist/scripts/lib/smart-snippet.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/brief-adapter.d.ts +15 -0
- package/dist/scripts/lib/tool-adapters/brief-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/brief-adapter.js +66 -0
- package/dist/scripts/lib/tool-adapters/brief-adapter.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/decide-adapter.d.ts +31 -0
- package/dist/scripts/lib/tool-adapters/decide-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/decide-adapter.js +71 -0
- package/dist/scripts/lib/tool-adapters/decide-adapter.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/ingest-adapter.d.ts +16 -0
- package/dist/scripts/lib/tool-adapters/ingest-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/ingest-adapter.js +58 -0
- package/dist/scripts/lib/tool-adapters/ingest-adapter.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/recall-adapter.d.ts +20 -0
- package/dist/scripts/lib/tool-adapters/recall-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/recall-adapter.js +69 -0
- package/dist/scripts/lib/tool-adapters/recall-adapter.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/search-adapter.d.ts +22 -0
- package/dist/scripts/lib/tool-adapters/search-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/search-adapter.js +32 -0
- package/dist/scripts/lib/tool-adapters/search-adapter.js.map +1 -0
- package/dist/scripts/lib/tool-adapters/stats-adapter.d.ts +15 -0
- package/dist/scripts/lib/tool-adapters/stats-adapter.d.ts.map +1 -0
- package/dist/scripts/lib/tool-adapters/stats-adapter.js +66 -0
- package/dist/scripts/lib/tool-adapters/stats-adapter.js.map +1 -0
- package/dist/scripts/lib/triage.js +3 -3
- package/dist/scripts/lib/validate-manifest.d.ts +8 -0
- package/dist/scripts/lib/validate-manifest.d.ts.map +1 -0
- package/dist/scripts/lib/validate-manifest.js +80 -0
- package/dist/scripts/lib/validate-manifest.js.map +1 -0
- package/dist/scripts/maintain-cleanup.d.ts.map +1 -1
- package/dist/scripts/maintain-cleanup.js +3 -2
- package/dist/scripts/maintain-cleanup.js.map +1 -1
- package/dist/scripts/mcp-server.d.ts +3 -0
- package/dist/scripts/mcp-server.d.ts.map +1 -0
- package/dist/scripts/mcp-server.js +85 -0
- package/dist/scripts/mcp-server.js.map +1 -0
- package/dist/scripts/mindlore-backup.js +9 -9
- package/dist/scripts/mindlore-doctor.d.ts.map +1 -1
- package/dist/scripts/mindlore-doctor.js +4 -6
- package/dist/scripts/mindlore-doctor.js.map +1 -1
- package/dist/scripts/mindlore-fts5-index.js +12 -12
- package/dist/scripts/mindlore-fts5-index.js.map +1 -1
- package/dist/scripts/mindlore-health-check.d.ts.map +1 -1
- package/dist/scripts/mindlore-health-check.js +2 -2
- package/dist/scripts/mindlore-health-check.js.map +1 -1
- package/dist/scripts/validate-manifest-cli.d.ts +2 -0
- package/dist/scripts/validate-manifest-cli.d.ts.map +1 -0
- package/dist/scripts/validate-manifest-cli.js +38 -0
- package/dist/scripts/validate-manifest-cli.js.map +1 -0
- package/dist/tests/cc-memory-sync.test.js +3 -3
- package/dist/tests/chunks-migration.test.js +1 -1
- package/dist/tests/compaction-snapshot.test.js +2 -2
- package/dist/tests/consolidation.test.js +3 -3
- package/dist/tests/decay.test.js +9 -9
- package/dist/tests/diary.test.js +4 -4
- package/dist/tests/episode-file.test.js +2 -1
- package/dist/tests/episode-file.test.js.map +1 -1
- package/dist/tests/episodes-inject.test.js +9 -9
- package/dist/tests/err-msg.test.d.ts +2 -0
- package/dist/tests/err-msg.test.d.ts.map +1 -0
- package/dist/tests/err-msg.test.js +24 -0
- package/dist/tests/err-msg.test.js.map +1 -0
- package/dist/tests/fetch-raw.test.js +1 -2
- package/dist/tests/fetch-raw.test.js.map +1 -1
- package/dist/tests/fts5.test.js +75 -75
- package/dist/tests/fuzzy.test.js +1 -1
- package/dist/tests/git-snapshot.test.js +3 -5
- package/dist/tests/git-snapshot.test.js.map +1 -1
- package/dist/tests/helpers/db.d.ts +1 -2
- package/dist/tests/helpers/db.d.ts.map +1 -1
- package/dist/tests/helpers/db.js +18 -26
- package/dist/tests/helpers/db.js.map +1 -1
- package/dist/tests/manifest-v2.test.d.ts +2 -0
- package/dist/tests/manifest-v2.test.d.ts.map +1 -0
- package/dist/tests/manifest-v2.test.js +67 -0
- package/dist/tests/manifest-v2.test.js.map +1 -0
- package/dist/tests/mcp-server.test.d.ts +2 -0
- package/dist/tests/mcp-server.test.d.ts.map +1 -0
- package/dist/tests/mcp-server.test.js +118 -0
- package/dist/tests/mcp-server.test.js.map +1 -0
- package/dist/tests/mcp-tools.test.d.ts +2 -0
- package/dist/tests/mcp-tools.test.d.ts.map +1 -0
- package/dist/tests/mcp-tools.test.js +243 -0
- package/dist/tests/mcp-tools.test.js.map +1 -0
- package/dist/tests/migrations-v053.test.js +16 -16
- package/dist/tests/migrations-v061.test.js +10 -10
- package/dist/tests/migrations-v063.test.js +4 -4
- package/dist/tests/migrations-v068.test.js +6 -3
- package/dist/tests/migrations-v068.test.js.map +1 -1
- package/dist/tests/nomination-counts.test.js +6 -6
- package/dist/tests/nomination-counts.test.js.map +1 -1
- package/dist/tests/pre-compact.test.js +2 -1
- package/dist/tests/pre-compact.test.js.map +1 -1
- package/dist/tests/recall-telemetry.test.js +12 -11
- package/dist/tests/recall-telemetry.test.js.map +1 -1
- package/dist/tests/rrf.test.js +3 -3
- package/dist/tests/search-engine.test.js +1 -1
- package/dist/tests/search-hook.test.js +2 -2
- package/dist/tests/search-offload.test.js +1 -1
- package/dist/tests/search-offload.test.js.map +1 -1
- package/dist/tests/secure-io.test.d.ts +2 -0
- package/dist/tests/secure-io.test.d.ts.map +1 -0
- package/dist/tests/secure-io.test.js +65 -0
- package/dist/tests/secure-io.test.js.map +1 -0
- package/dist/tests/session-payload.test.js +1 -1
- package/dist/tests/session-summary.test.js +1 -1
- package/dist/tests/similarity.test.js +1 -1
- package/dist/tests/skill-path-resolution.test.js +22 -3
- package/dist/tests/skill-path-resolution.test.js.map +1 -1
- package/dist/tests/smart-snippet.test.d.ts +2 -0
- package/dist/tests/smart-snippet.test.d.ts.map +1 -0
- package/dist/tests/smart-snippet.test.js +67 -0
- package/dist/tests/smart-snippet.test.js.map +1 -0
- package/dist/tests/triage.test.js +1 -1
- package/hooks/lib/constants.cjs +15 -15
- package/hooks/lib/mindlore-common.cjs +975 -974
- package/hooks/mindlore-cwd-changed.cjs +57 -57
- package/hooks/mindlore-decision-detector.cjs +54 -54
- package/hooks/mindlore-dont-repeat.cjs +222 -222
- package/hooks/mindlore-fts5-sync.cjs +98 -97
- package/hooks/mindlore-index.cjs +230 -229
- package/hooks/mindlore-model-router.cjs +54 -54
- package/hooks/mindlore-post-compact.cjs +69 -69
- package/hooks/mindlore-post-read.cjs +106 -106
- package/hooks/mindlore-pre-compact.cjs +154 -154
- package/hooks/mindlore-read-guard.cjs +105 -105
- package/hooks/mindlore-research-guard.cjs +176 -176
- package/hooks/mindlore-search.cjs +200 -200
- package/hooks/mindlore-session-end.cjs +510 -509
- package/hooks/mindlore-session-focus.cjs +256 -256
- package/package.json +77 -75
- package/plugin.json +8 -1
- package/skills/mindlore-diary/SKILL.md +85 -85
- package/skills/mindlore-evolve/SKILL.md +126 -126
- package/skills/mindlore-explore/SKILL.md +109 -109
- package/skills/mindlore-ingest/SKILL.md +195 -195
- package/skills/mindlore-maintain/SKILL.md +125 -125
- package/skills/mindlore-query/SKILL.md +151 -151
- package/skills/mindlore-reflect/SKILL.md +141 -141
- package/skills/mindlore-stats/SKILL.md +106 -106
- package/templates/INDEX.md +14 -14
- package/templates/SCHEMA.md +292 -292
- package/templates/config.json +1 -1
- package/templates/extraction/article.md +15 -15
- package/templates/extraction/changelog.md +15 -15
- package/templates/extraction/default.md +15 -15
- package/templates/extraction/docs.md +15 -15
- package/templates/extraction/github-repo.md +17 -17
package/package.json
CHANGED
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mindlore",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "AI-native knowledge system for Claude Code",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"bin": {
|
|
7
|
-
"mindlore": "dist/scripts/init.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"prebuild": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
12
|
-
"test": "jest --config jest.config.cjs",
|
|
13
|
-
"lint": "eslint -c eslint.config.cjs scripts/ hooks/ tests/",
|
|
14
|
-
"typecheck": "tsc --noEmit",
|
|
15
|
-
"prepublishOnly": "npm run build",
|
|
16
|
-
"health": "node dist/scripts/mindlore-health-check.js",
|
|
17
|
-
"index": "node dist/scripts/mindlore-fts5-index.js",
|
|
18
|
-
"search": "node dist/scripts/mindlore-fts5-search.js",
|
|
19
|
-
"quality": "node dist/scripts/quality-populate.js",
|
|
20
|
-
"fetch-raw": "node dist/scripts/fetch-raw.js",
|
|
21
|
-
"cc-sync": "node dist/scripts/cc-memory-bulk-sync.js",
|
|
22
|
-
"cleanup": "node dist/scripts/maintain-cleanup.js",
|
|
23
|
-
"perf": "node dist/scripts/mindlore-perf.js",
|
|
24
|
-
"doctor": "node dist/scripts/mindlore-doctor.js",
|
|
25
|
-
"audit": "npm audit --audit-level=moderate"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"@types/
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"eslint": "^
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "mindlore",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "AI-native knowledge system for Claude Code",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mindlore": "dist/scripts/init.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"prebuild": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
12
|
+
"test": "jest --config jest.config.cjs",
|
|
13
|
+
"lint": "eslint -c eslint.config.cjs scripts/ hooks/ tests/",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"prepublishOnly": "npm run build",
|
|
16
|
+
"health": "node dist/scripts/mindlore-health-check.js",
|
|
17
|
+
"index": "node dist/scripts/mindlore-fts5-index.js",
|
|
18
|
+
"search": "node dist/scripts/mindlore-fts5-search.js",
|
|
19
|
+
"quality": "node dist/scripts/quality-populate.js",
|
|
20
|
+
"fetch-raw": "node dist/scripts/fetch-raw.js",
|
|
21
|
+
"cc-sync": "node dist/scripts/cc-memory-bulk-sync.js",
|
|
22
|
+
"cleanup": "node dist/scripts/maintain-cleanup.js",
|
|
23
|
+
"perf": "node dist/scripts/mindlore-perf.js",
|
|
24
|
+
"doctor": "node dist/scripts/mindlore-doctor.js",
|
|
25
|
+
"audit": "npm audit --audit-level=moderate",
|
|
26
|
+
"validate-manifest": "node dist/scripts/validate-manifest-cli.js"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"claude-code",
|
|
30
|
+
"knowledge-base",
|
|
31
|
+
"second-brain",
|
|
32
|
+
"ai-native",
|
|
33
|
+
"fts5",
|
|
34
|
+
"karpathy",
|
|
35
|
+
"llm",
|
|
36
|
+
"wiki"
|
|
37
|
+
],
|
|
38
|
+
"author": "omrfc",
|
|
39
|
+
"license": "AGPL-3.0-only",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/mindlore/mindlore.git"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/mindlore/mindlore/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/mindlore/mindlore#readme",
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.0.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
53
|
+
"better-sqlite3": "^12.9.0",
|
|
54
|
+
"zod": "^4.3.6"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
58
|
+
"@types/jest": "^30.0.0",
|
|
59
|
+
"@types/node": "^25.6.0",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.59.0",
|
|
61
|
+
"@typescript-eslint/parser": "^8.58.1",
|
|
62
|
+
"eslint": "^10.2.0",
|
|
63
|
+
"globals": "^17.5.0",
|
|
64
|
+
"jest": "^30.3.0",
|
|
65
|
+
"ts-jest": "^29.4.9",
|
|
66
|
+
"typescript": "^6.0.2"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"agents/",
|
|
70
|
+
"dist/",
|
|
71
|
+
"hooks/",
|
|
72
|
+
"skills/",
|
|
73
|
+
"templates/",
|
|
74
|
+
"SCHEMA.md",
|
|
75
|
+
"plugin.json"
|
|
76
|
+
]
|
|
77
|
+
}
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"manifestVersion": 2,
|
|
2
3
|
"name": "mindlore",
|
|
3
4
|
"description": "AI-native knowledge system for Claude Code. Persistent, searchable, evolving knowledge base with FTS5.",
|
|
4
|
-
"version": "0.
|
|
5
|
+
"version": "0.7.0",
|
|
5
6
|
"skills": [
|
|
6
7
|
{
|
|
7
8
|
"name": "mindlore-ingest",
|
|
@@ -76,6 +77,12 @@
|
|
|
76
77
|
"description": "Periodic maintenance, stale detection, health trends"
|
|
77
78
|
}
|
|
78
79
|
],
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"mindlore": {
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["mindlore", "mcp"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
79
86
|
"hooks": [
|
|
80
87
|
{
|
|
81
88
|
"event": "SessionStart",
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mindlore-diary
|
|
3
|
-
description: LLM-powered session analysis — decisions, discoveries, frictions, learnings. Promotes episodes to semantic knowledge.
|
|
4
|
-
context: fork
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Script Resolution
|
|
8
|
-
|
|
9
|
-
Resolve `MINDLORE_PKG` (package root) using one of these methods, in order:
|
|
10
|
-
1. If CC injected "Base directory for this skill: /path/to/skills/mindlore-diary" → `MINDLORE_PKG = {base_directory}/../..`
|
|
11
|
-
2. Fallback: run `node -e "console.log(require('path').join(require('child_process').execSync('npm root -g',{encoding:'utf8'}).trim(),'mindlore')))"`
|
|
12
|
-
|
|
13
|
-
Use: `node "$MINDLORE_PKG/dist/scripts/..."` for all script commands.
|
|
14
|
-
|
|
15
|
-
# /mindlore-diary
|
|
16
|
-
|
|
17
|
-
## Scope
|
|
18
|
-
|
|
19
|
-
Determine target using `getActiveMindloreDir()` logic:
|
|
20
|
-
- If CWD has `.mindlore/` -> project scope
|
|
21
|
-
- Otherwise -> global `~/.mindlore/`
|
|
22
|
-
|
|
23
|
-
## Trigger
|
|
24
|
-
|
|
25
|
-
`/mindlore-diary` or `/mindlore-log diary`
|
|
26
|
-
|
|
27
|
-
## On Start — Read skill_memory
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" get mindlore-diary last_diary_date
|
|
31
|
-
```
|
|
32
|
-
If last_diary_date is today, warn: "Diary already ran today. Continue anyway?"
|
|
33
|
-
|
|
34
|
-
## Flow
|
|
35
|
-
|
|
36
|
-
1. Read active episodes: `WHERE status = 'active' AND source IN ('hook', 'diary')`
|
|
37
|
-
2. Filter by time: default last 24h, or `--days N` flag
|
|
38
|
-
3. Present summary: "Found N episodes spanning DATE1 to DATE2"
|
|
39
|
-
4. LLM analyzes episodes for semantic patterns:
|
|
40
|
-
- **Decisions:** choices made, alternatives considered
|
|
41
|
-
- **Discoveries:** new insights, broken assumptions
|
|
42
|
-
- **Frictions:** recurring blockers, errors, slowdowns
|
|
43
|
-
- **Learnings:** techniques that worked, patterns validated
|
|
44
|
-
- **Preferences:** user workflow preferences detected
|
|
45
|
-
- **Events:** notable milestones, completions
|
|
46
|
-
|
|
47
|
-
5. For each detected item, create enriched episode:
|
|
48
|
-
```sql
|
|
49
|
-
INSERT INTO episodes (summary, body, kind, source, status, project, created_at)
|
|
50
|
-
VALUES (?, ?, ?, 'diary', 'active', ?, ?)
|
|
51
|
-
```
|
|
52
|
-
Where kind = 'decision' | 'discovery' | 'friction' | 'learning' | 'preference' | 'event'
|
|
53
|
-
|
|
54
|
-
6. Output structured report:
|
|
55
|
-
```
|
|
56
|
-
-- Diary Raporu ({date}, {N} episode analiz edildi) --
|
|
57
|
-
|
|
58
|
-
Decisions ({count}):
|
|
59
|
-
- {summary}
|
|
60
|
-
|
|
61
|
-
Discoveries ({count}):
|
|
62
|
-
- {summary}
|
|
63
|
-
|
|
64
|
-
Frictions ({count}):
|
|
65
|
-
- {summary}
|
|
66
|
-
|
|
67
|
-
Learnings ({count}):
|
|
68
|
-
- {summary}
|
|
69
|
-
|
|
70
|
-
{M} yeni episode olusturuldu.
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## On End — Write skill_memory
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" set mindlore-diary last_diary_date "$(date -I)"
|
|
77
|
-
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" set mindlore-diary last_episode_count "{N}"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Rules
|
|
81
|
-
|
|
82
|
-
- NEVER create episodes without user seeing the analysis first
|
|
83
|
-
- Each episode must have proper `kind` field — don't default everything to 'event'
|
|
84
|
-
- Group related items — don't create 5 episodes for the same friction
|
|
85
|
-
- Append to `log.md`: `| {date} | diary | {N} episodes created |`
|
|
1
|
+
---
|
|
2
|
+
name: mindlore-diary
|
|
3
|
+
description: LLM-powered session analysis — decisions, discoveries, frictions, learnings. Promotes episodes to semantic knowledge.
|
|
4
|
+
context: fork
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Script Resolution
|
|
8
|
+
|
|
9
|
+
Resolve `MINDLORE_PKG` (package root) using one of these methods, in order:
|
|
10
|
+
1. If CC injected "Base directory for this skill: /path/to/skills/mindlore-diary" → `MINDLORE_PKG = {base_directory}/../..`
|
|
11
|
+
2. Fallback: run `node -e "console.log(require('path').join(require('child_process').execSync('npm root -g',{encoding:'utf8'}).trim(),'mindlore')))"`
|
|
12
|
+
|
|
13
|
+
Use: `node "$MINDLORE_PKG/dist/scripts/..."` for all script commands.
|
|
14
|
+
|
|
15
|
+
# /mindlore-diary
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
|
|
19
|
+
Determine target using `getActiveMindloreDir()` logic:
|
|
20
|
+
- If CWD has `.mindlore/` -> project scope
|
|
21
|
+
- Otherwise -> global `~/.mindlore/`
|
|
22
|
+
|
|
23
|
+
## Trigger
|
|
24
|
+
|
|
25
|
+
`/mindlore-diary` or `/mindlore-log diary`
|
|
26
|
+
|
|
27
|
+
## On Start — Read skill_memory
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" get mindlore-diary last_diary_date
|
|
31
|
+
```
|
|
32
|
+
If last_diary_date is today, warn: "Diary already ran today. Continue anyway?"
|
|
33
|
+
|
|
34
|
+
## Flow
|
|
35
|
+
|
|
36
|
+
1. Read active episodes: `WHERE status = 'active' AND source IN ('hook', 'diary')`
|
|
37
|
+
2. Filter by time: default last 24h, or `--days N` flag
|
|
38
|
+
3. Present summary: "Found N episodes spanning DATE1 to DATE2"
|
|
39
|
+
4. LLM analyzes episodes for semantic patterns:
|
|
40
|
+
- **Decisions:** choices made, alternatives considered
|
|
41
|
+
- **Discoveries:** new insights, broken assumptions
|
|
42
|
+
- **Frictions:** recurring blockers, errors, slowdowns
|
|
43
|
+
- **Learnings:** techniques that worked, patterns validated
|
|
44
|
+
- **Preferences:** user workflow preferences detected
|
|
45
|
+
- **Events:** notable milestones, completions
|
|
46
|
+
|
|
47
|
+
5. For each detected item, create enriched episode:
|
|
48
|
+
```sql
|
|
49
|
+
INSERT INTO episodes (summary, body, kind, source, status, project, created_at)
|
|
50
|
+
VALUES (?, ?, ?, 'diary', 'active', ?, ?)
|
|
51
|
+
```
|
|
52
|
+
Where kind = 'decision' | 'discovery' | 'friction' | 'learning' | 'preference' | 'event'
|
|
53
|
+
|
|
54
|
+
6. Output structured report:
|
|
55
|
+
```
|
|
56
|
+
-- Diary Raporu ({date}, {N} episode analiz edildi) --
|
|
57
|
+
|
|
58
|
+
Decisions ({count}):
|
|
59
|
+
- {summary}
|
|
60
|
+
|
|
61
|
+
Discoveries ({count}):
|
|
62
|
+
- {summary}
|
|
63
|
+
|
|
64
|
+
Frictions ({count}):
|
|
65
|
+
- {summary}
|
|
66
|
+
|
|
67
|
+
Learnings ({count}):
|
|
68
|
+
- {summary}
|
|
69
|
+
|
|
70
|
+
{M} yeni episode olusturuldu.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## On End — Write skill_memory
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" set mindlore-diary last_diary_date "$(date -I)"
|
|
77
|
+
node "$MINDLORE_PKG/dist/scripts/lib/skill-memory.js" set mindlore-diary last_episode_count "{N}"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
|
|
82
|
+
- NEVER create episodes without user seeing the analysis first
|
|
83
|
+
- Each episode must have proper `kind` field — don't default everything to 'event'
|
|
84
|
+
- Group related items — don't create 5 episodes for the same friction
|
|
85
|
+
- Append to `log.md`: `| {date} | diary | {N} episodes created |`
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mindlore-evolve
|
|
3
|
-
description: Knowledge schema co-evolution — scan domains+sources, detect inconsistencies, suggest updates
|
|
4
|
-
effort: medium
|
|
5
|
-
context: fork
|
|
6
|
-
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Script Resolution
|
|
10
|
-
|
|
11
|
-
Resolve `MINDLORE_PKG` (package root) using one of these methods, in order:
|
|
12
|
-
1. If CC injected "Base directory for this skill: /path/to/skills/mindlore-evolve" → `MINDLORE_PKG = {base_directory}/../..`
|
|
13
|
-
2. Fallback: run `node -e "console.log(require('path').join(require('child_process').execSync('npm root -g',{encoding:'utf8'}).trim(),'mindlore')))"`
|
|
14
|
-
|
|
15
|
-
Use: `node "$MINDLORE_PKG/dist/scripts/..."` for all script commands.
|
|
16
|
-
|
|
17
|
-
# /mindlore-evolve
|
|
18
|
-
|
|
19
|
-
Knowledge schema co-evolution. Karpathy's 4th operation (ingest/query/health/**evolve**).
|
|
20
|
-
|
|
21
|
-
## Scope
|
|
22
|
-
|
|
23
|
-
Default: `--scope all` (project + global birlikte taranır).
|
|
24
|
-
Options: `--scope project` | `--scope global` | `--scope all`
|
|
25
|
-
|
|
26
|
-
1. Determine scope from argument (default: all)
|
|
27
|
-
2. If `all`: scan both project `.mindlore/` and global `~/.mindlore/`
|
|
28
|
-
3. If `project`: scan only project-scoped content (current CWD's `.mindlore/`)
|
|
29
|
-
4. If `global`: scan only global `~/.mindlore/` content
|
|
30
|
-
- Never hardcode `.mindlore/` path — always resolve dynamically via `getActiveMindloreDir()`
|
|
31
|
-
|
|
32
|
-
## Trigger
|
|
33
|
-
|
|
34
|
-
User says `/mindlore-evolve`, "knowledge evolve", "bilgi sistemi evrimle", "sema guncelle".
|
|
35
|
-
|
|
36
|
-
## Modes
|
|
37
|
-
|
|
38
|
-
### scan (default)
|
|
39
|
-
|
|
40
|
-
Scan all domains and sources for inconsistencies.
|
|
41
|
-
|
|
42
|
-
**Pre-check (before scan):**
|
|
43
|
-
|
|
44
|
-
Before spawning the agent, check KB maturity:
|
|
45
|
-
```bash
|
|
46
|
-
# Count domains and sources
|
|
47
|
-
DOMAIN_COUNT=$(ls ~/.mindlore/domains/ 2>/dev/null | grep -c '.md$' || echo 0)
|
|
48
|
-
SOURCE_COUNT=$(ls ~/.mindlore/sources/ 2>/dev/null | grep -c '.md$' || echo 0)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
If `DOMAIN_COUNT == 0`:
|
|
52
|
-
- Show: "Fresh KB detected (0 domains, N sources). Evolve works best with at least 1 domain. Run `/mindlore-ingest` to add sources, then manually create domain files to organize them."
|
|
53
|
-
- If `SOURCE_COUNT < 3`: Show "Too few sources for meaningful evolution scan. Add more knowledge first." and STOP.
|
|
54
|
-
- If `SOURCE_COUNT >= 3` but 0 domains: Show warning but continue scan — findings will be limited to orphan/tag checks.
|
|
55
|
-
|
|
56
|
-
**Agent Delegation:** Tarama işini subagent'a delege et (context koruma).
|
|
57
|
-
|
|
58
|
-
**Flow:**
|
|
59
|
-
1. Spawn an Agent for scanning:
|
|
60
|
-
```
|
|
61
|
-
Agent({
|
|
62
|
-
description: "mindlore evolve: scan",
|
|
63
|
-
subagent_type: "Explore",
|
|
64
|
-
prompt: "[mindlore:evolve] Scan .mindlore/ for inconsistencies. <aşağıdaki talimatları buraya koy>"
|
|
65
|
-
})
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Agent talimatları:
|
|
69
|
-
a. Read INDEX.md to get domain and source file lists
|
|
70
|
-
b. Read all domain files (from `domains/`)
|
|
71
|
-
c. Read all source files (from `sources/`)
|
|
72
|
-
d. Detect issues (see list below)
|
|
73
|
-
e. Return findings as structured table
|
|
74
|
-
|
|
75
|
-
2. After agent returns — review findings
|
|
76
|
-
3. Show findings table to user
|
|
77
|
-
4. Detect issues:
|
|
78
|
-
- **Orphan files:** .md files in content directories not listed in INDEX.md
|
|
79
|
-
- **Missing references:** Source exists but no domain mentions it
|
|
80
|
-
- **Stale domains:** Source updated more recently than referencing domain
|
|
81
|
-
- **Tag inconsistencies:** Tags in frontmatter don't match content
|
|
82
|
-
- **Missing cross-references:** Related sources not linked
|
|
83
|
-
5. Report findings as a table:
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
| # | Type | File | Issue | Suggested Fix |
|
|
87
|
-
|---|------|------|-------|---------------|
|
|
88
|
-
| 1 | orphan | sources/old.md | Not in INDEX.md | Add to INDEX or delete |
|
|
89
|
-
| 2 | missing-ref | sources/react-hooks.md | No domain reference | Add to domains/frontend.md |
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
6. If `--dry-run`: stop here, no change suggestions
|
|
93
|
-
|
|
94
|
-
### apply
|
|
95
|
-
|
|
96
|
-
Apply suggested changes with user approval.
|
|
97
|
-
|
|
98
|
-
**Flow:**
|
|
99
|
-
1. Run scan first (reuse findings)
|
|
100
|
-
2. For each finding, show proposed change (diff format)
|
|
101
|
-
3. Wait for user approval before each change
|
|
102
|
-
4. Apply approved changes
|
|
103
|
-
5. Update INDEX.md with new entries
|
|
104
|
-
6. Append EVOLVE entry to log.md
|
|
105
|
-
7. Max 2 domain updates per run (prevent scope creep)
|
|
106
|
-
|
|
107
|
-
**Rules:**
|
|
108
|
-
- NEVER make automatic changes — always require user approval
|
|
109
|
-
- Show diff preview before applying
|
|
110
|
-
- After changes, run `node "$MINDLORE_PKG/dist/scripts/mindlore-fts5-index.js"` for FTS5 sync
|
|
111
|
-
- Log every change to log.md with timestamp
|
|
112
|
-
- The `[mindlore:evolve]` marker in the Agent prompt is required — it triggers the model-router hook to use the cost-optimized model (sonnet by default)
|
|
113
|
-
|
|
114
|
-
## Output Format
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
Mindlore Evolve — Scan Results
|
|
118
|
-
|
|
119
|
-
Scope: project (.mindlore/)
|
|
120
|
-
Files scanned: 12 sources, 5 domains
|
|
121
|
-
Issues found: 3
|
|
122
|
-
|
|
123
|
-
[table of findings]
|
|
124
|
-
|
|
125
|
-
Run `/mindlore-evolve apply` to fix with approval.
|
|
126
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: mindlore-evolve
|
|
3
|
+
description: Knowledge schema co-evolution — scan domains+sources, detect inconsistencies, suggest updates
|
|
4
|
+
effort: medium
|
|
5
|
+
context: fork
|
|
6
|
+
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Script Resolution
|
|
10
|
+
|
|
11
|
+
Resolve `MINDLORE_PKG` (package root) using one of these methods, in order:
|
|
12
|
+
1. If CC injected "Base directory for this skill: /path/to/skills/mindlore-evolve" → `MINDLORE_PKG = {base_directory}/../..`
|
|
13
|
+
2. Fallback: run `node -e "console.log(require('path').join(require('child_process').execSync('npm root -g',{encoding:'utf8'}).trim(),'mindlore')))"`
|
|
14
|
+
|
|
15
|
+
Use: `node "$MINDLORE_PKG/dist/scripts/..."` for all script commands.
|
|
16
|
+
|
|
17
|
+
# /mindlore-evolve
|
|
18
|
+
|
|
19
|
+
Knowledge schema co-evolution. Karpathy's 4th operation (ingest/query/health/**evolve**).
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
Default: `--scope all` (project + global birlikte taranır).
|
|
24
|
+
Options: `--scope project` | `--scope global` | `--scope all`
|
|
25
|
+
|
|
26
|
+
1. Determine scope from argument (default: all)
|
|
27
|
+
2. If `all`: scan both project `.mindlore/` and global `~/.mindlore/`
|
|
28
|
+
3. If `project`: scan only project-scoped content (current CWD's `.mindlore/`)
|
|
29
|
+
4. If `global`: scan only global `~/.mindlore/` content
|
|
30
|
+
- Never hardcode `.mindlore/` path — always resolve dynamically via `getActiveMindloreDir()`
|
|
31
|
+
|
|
32
|
+
## Trigger
|
|
33
|
+
|
|
34
|
+
User says `/mindlore-evolve`, "knowledge evolve", "bilgi sistemi evrimle", "sema guncelle".
|
|
35
|
+
|
|
36
|
+
## Modes
|
|
37
|
+
|
|
38
|
+
### scan (default)
|
|
39
|
+
|
|
40
|
+
Scan all domains and sources for inconsistencies.
|
|
41
|
+
|
|
42
|
+
**Pre-check (before scan):**
|
|
43
|
+
|
|
44
|
+
Before spawning the agent, check KB maturity:
|
|
45
|
+
```bash
|
|
46
|
+
# Count domains and sources
|
|
47
|
+
DOMAIN_COUNT=$(ls ~/.mindlore/domains/ 2>/dev/null | grep -c '.md$' || echo 0)
|
|
48
|
+
SOURCE_COUNT=$(ls ~/.mindlore/sources/ 2>/dev/null | grep -c '.md$' || echo 0)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If `DOMAIN_COUNT == 0`:
|
|
52
|
+
- Show: "Fresh KB detected (0 domains, N sources). Evolve works best with at least 1 domain. Run `/mindlore-ingest` to add sources, then manually create domain files to organize them."
|
|
53
|
+
- If `SOURCE_COUNT < 3`: Show "Too few sources for meaningful evolution scan. Add more knowledge first." and STOP.
|
|
54
|
+
- If `SOURCE_COUNT >= 3` but 0 domains: Show warning but continue scan — findings will be limited to orphan/tag checks.
|
|
55
|
+
|
|
56
|
+
**Agent Delegation:** Tarama işini subagent'a delege et (context koruma).
|
|
57
|
+
|
|
58
|
+
**Flow:**
|
|
59
|
+
1. Spawn an Agent for scanning:
|
|
60
|
+
```
|
|
61
|
+
Agent({
|
|
62
|
+
description: "mindlore evolve: scan",
|
|
63
|
+
subagent_type: "Explore",
|
|
64
|
+
prompt: "[mindlore:evolve] Scan .mindlore/ for inconsistencies. <aşağıdaki talimatları buraya koy>"
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Agent talimatları:
|
|
69
|
+
a. Read INDEX.md to get domain and source file lists
|
|
70
|
+
b. Read all domain files (from `domains/`)
|
|
71
|
+
c. Read all source files (from `sources/`)
|
|
72
|
+
d. Detect issues (see list below)
|
|
73
|
+
e. Return findings as structured table
|
|
74
|
+
|
|
75
|
+
2. After agent returns — review findings
|
|
76
|
+
3. Show findings table to user
|
|
77
|
+
4. Detect issues:
|
|
78
|
+
- **Orphan files:** .md files in content directories not listed in INDEX.md
|
|
79
|
+
- **Missing references:** Source exists but no domain mentions it
|
|
80
|
+
- **Stale domains:** Source updated more recently than referencing domain
|
|
81
|
+
- **Tag inconsistencies:** Tags in frontmatter don't match content
|
|
82
|
+
- **Missing cross-references:** Related sources not linked
|
|
83
|
+
5. Report findings as a table:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
| # | Type | File | Issue | Suggested Fix |
|
|
87
|
+
|---|------|------|-------|---------------|
|
|
88
|
+
| 1 | orphan | sources/old.md | Not in INDEX.md | Add to INDEX or delete |
|
|
89
|
+
| 2 | missing-ref | sources/react-hooks.md | No domain reference | Add to domains/frontend.md |
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. If `--dry-run`: stop here, no change suggestions
|
|
93
|
+
|
|
94
|
+
### apply
|
|
95
|
+
|
|
96
|
+
Apply suggested changes with user approval.
|
|
97
|
+
|
|
98
|
+
**Flow:**
|
|
99
|
+
1. Run scan first (reuse findings)
|
|
100
|
+
2. For each finding, show proposed change (diff format)
|
|
101
|
+
3. Wait for user approval before each change
|
|
102
|
+
4. Apply approved changes
|
|
103
|
+
5. Update INDEX.md with new entries
|
|
104
|
+
6. Append EVOLVE entry to log.md
|
|
105
|
+
7. Max 2 domain updates per run (prevent scope creep)
|
|
106
|
+
|
|
107
|
+
**Rules:**
|
|
108
|
+
- NEVER make automatic changes — always require user approval
|
|
109
|
+
- Show diff preview before applying
|
|
110
|
+
- After changes, run `node "$MINDLORE_PKG/dist/scripts/mindlore-fts5-index.js"` for FTS5 sync
|
|
111
|
+
- Log every change to log.md with timestamp
|
|
112
|
+
- The `[mindlore:evolve]` marker in the Agent prompt is required — it triggers the model-router hook to use the cost-optimized model (sonnet by default)
|
|
113
|
+
|
|
114
|
+
## Output Format
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Mindlore Evolve — Scan Results
|
|
118
|
+
|
|
119
|
+
Scope: project (.mindlore/)
|
|
120
|
+
Files scanned: 12 sources, 5 domains
|
|
121
|
+
Issues found: 3
|
|
122
|
+
|
|
123
|
+
[table of findings]
|
|
124
|
+
|
|
125
|
+
Run `/mindlore-evolve apply` to fix with approval.
|
|
126
|
+
```
|