You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Adds loading notification directive — Claude now tells users when loading KB files (e.g., `📖 Loading KB: api-conventions.md`)
21
+
- Adds Scope column to `_index.md` All Pages table for routing context
22
+
- Suggests scope patterns for KB files with empty/missing scope
23
+
- Re-runnable and idempotent — safe to run after plugin updates or any time to verify KB health
24
+
25
+
-`/kb-load` - Manually load KB articles into the current conversation
26
+
- Accepts filename, topic name, or tag filter (e.g., `/kb-load api-conventions`, `/kb-load tag:testing`)
27
+
- Interactive picker when no argument provided
28
+
- Offers to follow `related` cross-references one level deep
29
+
- Displays `📖 Loading KB:` notifications consistent with automatic loading
30
+
- Use when Claude hasn't automatically loaded a KB file you need mid-conversation
31
+
32
+
### Changed
33
+
34
+
#### AI-Knowledge Plugin (v1.4.0)
35
+
36
+
-**Structured "When to Load" format** — All KB commands now generate structured loading criteria: backtick-wrapped scope globs + topic keywords (e.g., `` `src/api/**`, `*.controller.ts` — api, rest, middleware ``). This replaces vague free-text like "When working in packages/api/" and enables efficient dynamic context matching.
37
+
-**`scope` field supports arrays** — The frontmatter `scope` field now accepts both a single string (`scope: "src/api/**"`) and an array of strings (`scope: ["src/api/**", "*.controller.ts"]`) for matching multiple file patterns.
38
+
-**CLAUDE.md preamble improved** — The Knowledge Base section preamble now includes explicit instructions for how Claude should match scope patterns, keywords, and pinned entries, plus a loading notification directive.
39
+
-**`_index.md` includes Scope column** — The All Pages table now has a Scope column showing each article's file path matching patterns.
40
+
-**`kb-organize` refreshes "When to Load"** — Reorganizing files now also regenerates the "When to Load" column values from frontmatter.
41
+
42
+
### Removed
43
+
44
+
-`/kb-obsidian` — All functionality absorbed into `/kb-upgrade`
When Claude Code starts a conversation and reads CLAUDE.md, it knows to load the relevant KB files based on the task context. Pinned files are always loaded.
@@ -79,7 +80,9 @@ related: [[api-conventions]] # Cross-references to other KB files
79
80
created: 2026-04-02# Date the file was created
80
81
last-updated: 2026-04-02# Date the file was last modified
81
82
pinned: false # If true, always loaded regardless of context
82
-
scope: "packages/api/**"# Optional glob pattern for auto-matching
83
+
scope: # Optional glob pattern(s) for auto-matching
84
+
- "packages/api/**"
85
+
- "*.controller.ts"
83
86
---
84
87
```
85
88
@@ -100,6 +103,6 @@ This is required because Obsidian does not parse frontmatter values as navigable
Copy file name to clipboardExpand all lines: plugins/ai-knowledge/skills/kb-absorb/SKILL.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,20 +119,20 @@ For each approved migration:
119
119
created: {today's date}
120
120
last-updated: {today's date}
121
121
pinned: false
122
-
scope: "{glob pattern if applicable}"
122
+
scope: ["{glob patterns if applicable}"] # String or array
123
123
---
124
124
```
125
125
2. Write the content, reformatted for KB style (concise, imperative, actionable rules).
126
126
3.**Do NOT simply copy-paste** — distill the content into KB format. Long prose should become concise rules. Remove filler and context that only matters for human reading.
127
-
4. Add a reference row to the CLAUDE.md Knowledge Base table.
127
+
4. Add a reference row to the CLAUDE.md Knowledge Base table. Format the "When to Load" column using the structured format: `` `scope-glob1`, `scope-glob2` — tag1, tag2 ``. Derive scope from the content's directory affinity and keywords from tags. For pinned files, use `Always (pinned)`.
128
128
5. Remove the section from CLAUDE.md.
129
129
6. If the removed section contained anything cross-cutting, add a brief reference in its place: `> See docs/kb/{file}.md for {topic} details.`
130
130
131
131
#### 4b: Absorbing docs/ Files
132
132
133
133
1. If the file is already well-structured, move it to `docs/kb/` and add frontmatter.
134
134
2. If the file needs reformatting, create a new KB file with distilled content. Do NOT delete the original — inform the user they can remove it manually if desired.
135
-
3. Add a reference row to the CLAUDE.md Knowledge Base table.
135
+
3. Add a reference row to the CLAUDE.md Knowledge Base table. Format the "When to Load" column using the structured format: `` `scope-glob1`, `scope-glob2` — tag1, tag2 ``. Derive scope from the content's directory affinity and keywords from tags. For pinned files, use `Always (pinned)`.
scope: "src/api/**"# Optional: glob pattern for auto-matching
22
+
scope: "src/api/**"# Optional: glob pattern(s) for auto-matching. String or array.
23
23
---
24
24
```
25
25
@@ -72,13 +72,17 @@ If saving to a new KB file, gather metadata:
72
72
- Header: "KB Tags"
73
73
- Options: "Use suggested" | "Let me adjust" (free-text follow-up)
74
74
75
-
**When to Load**: Ask about the loading context:
76
-
- Question: "When should Claude Code load this knowledge?"
75
+
**When to Load**: Determine the scope patterns and keywords for the loading context:
76
+
1.**Infer scope patterns** from the learning content. If the learning relates to specific directories or file types, suggest glob patterns (e.g., `src/api/**`, `*.controller.ts`).
77
+
2.**Use the file's tags as keywords**.
78
+
3. Present the suggested "When to Load" value in the structured format: `` `glob1`, `glob2` — keyword1, keyword2 ``.
79
+
80
+
- Question: "Suggested loading context: {formatted When to Load value}. Adjust or confirm?"
77
81
- Header: "Loading Context"
78
82
- Options:
79
-
-Suggested context based on the learning content (e.g., "When working in `src/api/`")
83
+
-"Use suggested" (show the formatted value)
80
84
- "Always load (pinned)" (for critical knowledge)
81
-
- "Custom context" (free-text)
85
+
- "Let me adjust" (free-text)
82
86
83
87
### Step 5: Write the Learning
84
88
@@ -100,7 +104,7 @@ If saving to a new KB file, gather metadata:
100
104
created: {today's date}
101
105
last-updated: {today's date}
102
106
pinned: {true if user selected "Always load", else false}
103
-
scope: "{glob pattern if applicable}"
107
+
scope: ["{glob patterns if applicable}"] # String or array
104
108
---
105
109
106
110
# {Topic Name}
@@ -119,6 +123,7 @@ If saving to a new KB file, gather metadata:
119
123
2. Update the CLAUDE.md Knowledge Base table:
120
124
- Remove placeholder row if present.
121
125
- Add new row with Topic, File path, and When to Load (use "Always (pinned)" if pinned).
126
+
- Format the "When to Load" column using the structured format: `` `scope-glob1`, `scope-glob2` — tag1, tag2 ``. Derive scope patterns from the file's `scope` frontmatter and keywords from `tags`.
122
127
- Keep table sorted alphabetically by Topic.
123
128
3. Add reverse cross-references: if the new file relates to existing KB files, add `[[new-file]]` to those files' `related` frontmatter, update their `## Related` body section to match, and update their `last-updated`.
@@ -226,7 +228,7 @@ Tech stack: TypeScript, Express, Prisma, Jest
226
228
227
229
### 3. Testing Strategy
228
230
→ docs/kb/testing-strategy.md
229
-
→ When to Load: "Writing or modifying tests"
231
+
→ When to Load: `tests/**`, `*.test.ts`, `*.spec.ts` — testing, jest, fixtures
230
232
→ Tags: [testing, jest, fixtures]
231
233
→ Discovered from: tests/, src/__tests__/
232
234
Key findings:
@@ -291,6 +293,7 @@ When appending, also present the diff (new content being added) to the user via
291
293
292
294
1.**Remove placeholder row** if present ("_No entries yet_").
293
295
2.**Add or update rows** with Topic, File path, and When to Load.
296
+
- Format the "When to Load" column using the structured format: `` `scope-glob1`, `scope-glob2` — tag1, tag2 ``. Use the `scope` patterns from frontmatter and `tags` as keywords. Pinned files use `Always (pinned)`.
294
297
3.**Deduplicate**: If a row for the same file exists, update it.
0 commit comments