mindlore 0.2.1 → 0.3.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 +8 -8
- package/SCHEMA.md +15 -2
- package/dist/scripts/init.d.ts +1 -1
- package/dist/scripts/init.js +98 -67
- package/dist/scripts/init.js.map +1 -1
- package/dist/scripts/lib/constants.d.ts +27 -0
- package/dist/scripts/lib/constants.d.ts.map +1 -1
- package/dist/scripts/lib/constants.js +74 -1
- package/dist/scripts/lib/constants.js.map +1 -1
- package/dist/scripts/lib/schemas.d.ts +93 -0
- package/dist/scripts/lib/schemas.d.ts.map +1 -0
- package/dist/scripts/lib/schemas.js +108 -0
- package/dist/scripts/lib/schemas.js.map +1 -0
- package/dist/scripts/mindlore-fts5-index.js +3 -4
- package/dist/scripts/mindlore-fts5-index.js.map +1 -1
- package/dist/scripts/mindlore-fts5-search.d.ts +1 -1
- package/dist/scripts/mindlore-fts5-search.js +87 -74
- package/dist/scripts/mindlore-fts5-search.js.map +1 -1
- package/dist/scripts/uninstall.d.ts +1 -1
- package/dist/scripts/uninstall.js +27 -17
- package/dist/scripts/uninstall.js.map +1 -1
- package/dist/tests/compounding.test.js +2 -2
- package/dist/tests/compounding.test.js.map +1 -1
- package/dist/tests/cwd-changed.test.d.ts +2 -0
- package/dist/tests/cwd-changed.test.d.ts.map +1 -0
- package/dist/tests/cwd-changed.test.js +62 -0
- package/dist/tests/cwd-changed.test.js.map +1 -0
- package/dist/tests/dedup.test.js +4 -4
- package/dist/tests/dedup.test.js.map +1 -1
- package/dist/tests/dont-repeat.test.d.ts +2 -0
- package/dist/tests/dont-repeat.test.d.ts.map +1 -0
- package/dist/tests/dont-repeat.test.js +100 -0
- package/dist/tests/dont-repeat.test.js.map +1 -0
- package/dist/tests/e2e-pipeline.test.d.ts +2 -0
- package/dist/tests/e2e-pipeline.test.d.ts.map +1 -0
- package/dist/tests/e2e-pipeline.test.js +220 -0
- package/dist/tests/e2e-pipeline.test.js.map +1 -0
- package/dist/tests/evolve.test.d.ts +2 -0
- package/dist/tests/evolve.test.d.ts.map +1 -0
- package/dist/tests/evolve.test.js +105 -0
- package/dist/tests/evolve.test.js.map +1 -0
- package/dist/tests/explore.test.d.ts +2 -0
- package/dist/tests/explore.test.d.ts.map +1 -0
- package/dist/tests/explore.test.js +146 -0
- package/dist/tests/explore.test.js.map +1 -0
- package/dist/tests/fts5.test.js +7 -7
- package/dist/tests/fts5.test.js.map +1 -1
- package/dist/tests/global-layer.test.d.ts +2 -0
- package/dist/tests/global-layer.test.d.ts.map +1 -0
- package/dist/tests/global-layer.test.js +152 -0
- package/dist/tests/global-layer.test.js.map +1 -0
- package/dist/tests/helpers/db.d.ts +14 -1
- package/dist/tests/helpers/db.d.ts.map +1 -1
- package/dist/tests/helpers/db.js +3 -3
- package/dist/tests/helpers/db.js.map +1 -1
- package/dist/tests/hook-smoke.test.js +2 -2
- package/dist/tests/hook-smoke.test.js.map +1 -1
- package/dist/tests/init.test.js +24 -0
- package/dist/tests/init.test.js.map +1 -1
- package/dist/tests/post-read.test.d.ts +2 -0
- package/dist/tests/post-read.test.d.ts.map +1 -0
- package/dist/tests/post-read.test.js +69 -0
- package/dist/tests/post-read.test.js.map +1 -0
- package/dist/tests/quality-populate.test.d.ts +2 -0
- package/dist/tests/quality-populate.test.d.ts.map +1 -0
- package/dist/tests/quality-populate.test.js +85 -0
- package/dist/tests/quality-populate.test.js.map +1 -0
- package/dist/tests/reflect.test.d.ts +2 -0
- package/dist/tests/reflect.test.d.ts.map +1 -0
- package/dist/tests/reflect.test.js +122 -0
- package/dist/tests/reflect.test.js.map +1 -0
- package/dist/tests/schemas.test.d.ts +2 -0
- package/dist/tests/schemas.test.d.ts.map +1 -0
- package/dist/tests/schemas.test.js +87 -0
- package/dist/tests/schemas.test.js.map +1 -0
- package/dist/tests/search-hook.test.js +3 -3
- package/dist/tests/search-hook.test.js.map +1 -1
- package/dist/tests/upgrade.test.d.ts +2 -0
- package/dist/tests/upgrade.test.d.ts.map +1 -0
- package/dist/tests/upgrade.test.js +91 -0
- package/dist/tests/upgrade.test.js.map +1 -0
- package/hooks/lib/mindlore-common.cjs +66 -5
- package/hooks/lib/types.d.ts +56 -0
- package/hooks/mindlore-cwd-changed.cjs +57 -0
- package/hooks/mindlore-dont-repeat.cjs +222 -0
- package/hooks/mindlore-fts5-sync.cjs +6 -9
- package/hooks/mindlore-index.cjs +3 -3
- package/hooks/mindlore-post-read.cjs +97 -0
- package/hooks/mindlore-read-guard.cjs +27 -4
- package/hooks/mindlore-search.cjs +73 -52
- package/hooks/mindlore-session-end.cjs +43 -1
- package/hooks/mindlore-session-focus.cjs +14 -0
- package/package.json +3 -2
- package/plugin.json +24 -1
- package/skills/mindlore-decide/SKILL.md +8 -0
- package/skills/mindlore-evolve/SKILL.md +81 -0
- package/skills/mindlore-explore/SKILL.md +84 -0
- package/skills/mindlore-health/SKILL.md +8 -0
- package/skills/mindlore-ingest/SKILL.md +19 -4
- package/skills/mindlore-log/SKILL.md +30 -13
- package/skills/mindlore-query/SKILL.md +8 -0
- package/templates/SCHEMA.md +15 -2
|
@@ -9,6 +9,14 @@ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch]
|
|
|
9
9
|
|
|
10
10
|
Add a new knowledge source to the `.mindlore/` knowledge base.
|
|
11
11
|
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
Determine target directory using `getActiveMindloreDir()` logic:
|
|
15
|
+
- If CWD has `.mindlore/` → write to project scope
|
|
16
|
+
- Otherwise → write to global `~/.mindlore/`
|
|
17
|
+
- `--global` flag: force write to `~/.mindlore/` even if project scope exists
|
|
18
|
+
- Never hardcode `.mindlore/` path — always resolve dynamically
|
|
19
|
+
|
|
12
20
|
## Trigger
|
|
13
21
|
|
|
14
22
|
User shares a URL, text, file, or says "kaynak ekle", "source ingest", "bu linki kaydet", "knowledge ingest".
|
|
@@ -17,8 +25,12 @@ User shares a URL, text, file, or says "kaynak ekle", "source ingest", "bu linki
|
|
|
17
25
|
|
|
18
26
|
### URL Mode
|
|
19
27
|
1. Extract content from URL:
|
|
20
|
-
- If `markitdown` is available: `markitdown <url>` (best quality, zero tokens)
|
|
28
|
+
- If `markitdown` is available (`hasMarkitdown()`): `markitdown <url>` (best quality, zero tokens)
|
|
21
29
|
- Else: use `WebFetch` or `ctx_fetch_and_index`
|
|
30
|
+
- **YouTube URL** detected (`youtube.com` or `youtu.be`):
|
|
31
|
+
1. markitdown installed → `markitdown <url>` (includes transcript)
|
|
32
|
+
2. Else youtube-transcript npm → `hasYoutubeTranscript()` check
|
|
33
|
+
3. Else → ask user to paste transcript manually
|
|
22
34
|
2. Save raw capture to `.mindlore/raw/` with frontmatter:
|
|
23
35
|
```yaml
|
|
24
36
|
---
|
|
@@ -75,9 +87,12 @@ The sources/ file should contain:
|
|
|
75
87
|
|
|
76
88
|
## Quality Assessment
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
90
|
+
Assign quality automatically during ingest using this heuristic:
|
|
91
|
+
- `high`: Official docs (anthropic, github docs, MDN), primary research, authoritative references
|
|
92
|
+
- `medium`: Blog posts, tutorials, conference talks, X threads with substance
|
|
93
|
+
- `low`: Raw notes, text pastes, quick captures, low signal-to-noise
|
|
94
|
+
|
|
95
|
+
LLM may override the heuristic based on content analysis. Always set quality — never leave it null.
|
|
81
96
|
|
|
82
97
|
## Domain Update Rules
|
|
83
98
|
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Session logging, pattern extraction, and wiki updates.
|
|
4
4
|
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
Determine target using `getActiveMindloreDir()` logic:
|
|
8
|
+
- If CWD has `.mindlore/` → write to project scope
|
|
9
|
+
- Otherwise → write to global `~/.mindlore/`
|
|
10
|
+
- Reflect mode: scans both project + global diary/ for patterns
|
|
11
|
+
- Never hardcode `.mindlore/` path — always resolve dynamically
|
|
12
|
+
|
|
5
13
|
## Trigger
|
|
6
14
|
|
|
7
15
|
`/mindlore-log <mode>` where mode is `log`, `reflect`, `status`, or `save`.
|
|
@@ -30,19 +38,28 @@ date: 2026-04-11
|
|
|
30
38
|
|
|
31
39
|
### reflect
|
|
32
40
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
**Flow (v0.
|
|
36
|
-
1. Read
|
|
37
|
-
2. Present summary
|
|
38
|
-
3.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
LLM-driven pattern extraction from diary deltas → persistent learnings.
|
|
42
|
+
|
|
43
|
+
**Flow (v0.3 — LLM-driven):**
|
|
44
|
+
1. Read last N non-archived delta files in `diary/` (no `archived: true` frontmatter)
|
|
45
|
+
2. Present summary: "Found N unprocessed deltas spanning DATE1 to DATE2"
|
|
46
|
+
3. LLM analyzes deltas for repeating patterns:
|
|
47
|
+
- Recurring topics/themes across sessions
|
|
48
|
+
- Repeated decisions (same choice made multiple times)
|
|
49
|
+
- Common mistakes or friction points
|
|
50
|
+
- Workflow patterns that worked well
|
|
51
|
+
4. Categorize found patterns by topic (git, testing, architecture, etc.)
|
|
52
|
+
5. Present findings to user with proposed learnings
|
|
53
|
+
6. User approves → write to `learnings/{topic}.md` (append if exists, create if not)
|
|
54
|
+
7. Format: `YAPMA:` / `BEST PRACTICE:` / `KRITIK:` prefixed rules
|
|
55
|
+
8. Update relevant domain page if pattern relates to an existing domain
|
|
56
|
+
9. Mark processed deltas: add `archived: true` to their frontmatter
|
|
57
|
+
10. Append to `log.md`: `| {date} | reflect | {N} deltas processed, {M} learnings written |`
|
|
58
|
+
|
|
59
|
+
**Rules:**
|
|
60
|
+
- NEVER write learnings without user approval
|
|
61
|
+
- Group related patterns into existing topic files (don't create one file per pattern)
|
|
62
|
+
- Reflect scans both project + global diary/ in `--all` mode
|
|
46
63
|
|
|
47
64
|
### status
|
|
48
65
|
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Search, ask, analyze, and retrieve knowledge from `.mindlore/`.
|
|
4
4
|
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
Determine search scope using `getActiveMindloreDir()` / `getAllDbs()` logic:
|
|
8
|
+
- Default (no flag): search project `.mindlore/` DB, fall back to global
|
|
9
|
+
- `--global`: search only `~/.mindlore/` DB
|
|
10
|
+
- `--all`: search both project + global DBs, project results first
|
|
11
|
+
- Never hardcode `.mindlore/` path — always resolve dynamically
|
|
12
|
+
|
|
5
13
|
## Trigger
|
|
6
14
|
|
|
7
15
|
`/mindlore-query <mode> [query]` where mode is `search`, `ask`, `stats`, or `brief`.
|
package/templates/SCHEMA.md
CHANGED
|
@@ -28,6 +28,18 @@ with YAML frontmatter. Search is powered by FTS5 (SQLite full-text search).
|
|
|
28
28
|
└── mindlore.db # FTS5 search database (SQLite)
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
### Global Scope (v0.3)
|
|
32
|
+
|
|
33
|
+
Mindlore supports two scopes:
|
|
34
|
+
- **Project scope:** `.mindlore/` in the current working directory (project-specific knowledge)
|
|
35
|
+
- **Global scope:** `~/.mindlore/` in the user's home directory (cross-project knowledge)
|
|
36
|
+
|
|
37
|
+
Rules:
|
|
38
|
+
- `getActiveMindloreDir()` resolves scope: project if exists, otherwise global
|
|
39
|
+
- Search is layered: project results first, global results second
|
|
40
|
+
- Skills accept `--global` (force global) and `--all` (both scopes) flags
|
|
41
|
+
- `npx mindlore init --global` creates `~/.mindlore/` with git repo for auto-sync
|
|
42
|
+
|
|
31
43
|
### Directory Rules
|
|
32
44
|
|
|
33
45
|
- Each directory corresponds to exactly one frontmatter `type` value
|
|
@@ -143,7 +155,7 @@ Discover unexpected connections between sources. Cross-reference analysis.
|
|
|
143
155
|
- Max results: 3 per query (BM25 ranking)
|
|
144
156
|
- Hook injects: file path + first 2 headings
|
|
145
157
|
|
|
146
|
-
### FTS5 Columns (
|
|
158
|
+
### FTS5 Columns (10-col schema, v0.3)
|
|
147
159
|
|
|
148
160
|
| Column | Indexed | Source |
|
|
149
161
|
|--------|---------|--------|
|
|
@@ -155,7 +167,8 @@ Discover unexpected connections between sources. Cross-reference analysis.
|
|
|
155
167
|
| `title` | Yes | Frontmatter title or first heading |
|
|
156
168
|
| `content` | Yes | Markdown body (sans frontmatter) |
|
|
157
169
|
| `tags` | Yes | Frontmatter tags (comma-separated) |
|
|
158
|
-
| `quality` | UNINDEXED | Frontmatter quality (
|
|
170
|
+
| `quality` | UNINDEXED | Frontmatter quality (high/medium/low) |
|
|
171
|
+
| `date_captured` | UNINDEXED | Frontmatter date_captured or date |
|
|
159
172
|
|
|
160
173
|
### Search Flow (UserPromptSubmit hook)
|
|
161
174
|
|