Skip to content

Commit 62333ee

Browse files
feat(ai-knowledge): add Obsidian compatibility, /kb-query, /kb-organize, index & log (v2.3.3)
Add three new skills: /kb-query for querying the KB and filing synthesized answers back as articles, /kb-obsidian for one-time migration to Obsidian- compatible structure with _index.md/_log.md/folder reorganization, and /kb-organize for standalone folder reorganization. All existing /kb-* skills now maintain Obsidian-compatible ## Related body sections with [[wiki-links]], store global learnings in _global-learnings.md instead of inline CLAUDE.md, prefer subfolder organization for new files, and conditionally update _index.md and _log.md. Inspired by Karpathy's LLM Wiki pattern.
1 parent beb4886 commit 62333ee

24 files changed

Lines changed: 1085 additions & 62 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"metadata": {
88
"description": "A curated list of custom Claude Code plugins, agents, and skills for developers.",
9-
"version": "2.3.2",
9+
"version": "2.3.3",
1010
"pluginRoot": "./plugins"
1111
},
1212
"plugins": [
@@ -272,8 +272,8 @@
272272
{
273273
"name": "ai-knowledge",
274274
"source": "./plugins/ai-knowledge",
275-
"description": "AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, harvest cross-repo and web documentation, discover implicit knowledge from source code, and dynamically reference institutional knowledge in CLAUDE.md",
276-
"version": "1.2.0",
275+
"description": "AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, Obsidian-compatible knowledge graph, harvest cross-repo and web documentation, discover implicit knowledge from source code, and dynamically reference institutional knowledge in CLAUDE.md",
276+
"version": "1.3.0",
277277
"keywords": [
278278
"ai",
279279
"knowledge-base",
@@ -284,7 +284,10 @@
284284
"best-practices",
285285
"lessons-learned",
286286
"kb",
287-
"productivity"
287+
"productivity",
288+
"obsidian",
289+
"graph-view",
290+
"wiki-links"
288291
],
289292
"author": {
290293
"name": "Charles Jones",

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.3.3] - 2026-04-05
11+
12+
### Added
13+
14+
#### AI-Knowledge Plugin (v1.3.0)
15+
16+
- `/kb-query` - Query the knowledge base and synthesize answers from multiple KB files
17+
- Reads `_index.md` to find relevant pages, then drills into individual articles
18+
- Synthesizes comprehensive answers with `[[wiki-link]]` citations to source KB files
19+
- Flags contradictions between KB files and gaps in coverage
20+
- Offers to **file answers back as new KB articles** so explorations compound into the knowledge base
21+
- Filed answers include `type: synthesis`, `query`, and `sources` frontmatter fields for provenance
22+
- Inspired by Karpathy's [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) pattern
23+
24+
- `/kb-obsidian` - One-time migration to upgrade and make an existing KB Obsidian-compatible
25+
- Adds `## Related` body sections with `[[wiki-links]]` for Obsidian graph view and link navigation
26+
- Migrates inline `### Global Learnings` from CLAUDE.md to `docs/kb/_global-learnings.md`
27+
- Generates `docs/kb/_index.md` — a categorized catalog of all KB articles with one-line summaries
28+
- Creates `docs/kb/_log.md` — a chronological record of KB operations
29+
- Offers to reorganize flat KB files into category folders (architecture/, conventions/, testing/, etc.)
30+
- Audits and fixes frontmatter health issues
31+
- Fully backwards-compatible — handles all older KB structures
32+
33+
- **`_index.md` — Knowledge Base Index** - Auto-generated, pinned catalog of all KB articles organized by category with one-line summaries. The LLM reads this first to find relevant pages before drilling into individual articles. Created by `/kb-init` and maintained by all `/kb-*` commands.
34+
35+
- **`_log.md` — Activity Log** - Append-only chronological record of KB operations (ingests, queries, prunes, etc.). Provides a timeline of how the knowledge base evolved. Created by `/kb-init` and appended to by all `/kb-*` commands.
36+
37+
- `/kb-organize` - Standalone folder reorganization for existing flat KB structures
38+
- Analyzes flat KB files and suggests category folders based on tags and content
39+
- Common categories: architecture/, conventions/, testing/, tools/, external/, domain/
40+
- Preview-first — shows all proposed moves before executing
41+
- Updates CLAUDE.md table paths and `_index.md` after reorganization
42+
- Does not modify `[[wiki-links]]` (they resolve by name, not path)
43+
44+
### Changed
45+
46+
#### AI-Knowledge Plugin (v1.3.0)
47+
48+
- **Subfolder organization** - All `/kb-*` commands that create new KB files now prefer placing them in category subfolders (e.g., `docs/kb/architecture/`, `docs/kb/conventions/`, `docs/kb/testing/`) instead of flat in the root. Existing flat structures continue to work. `/kb-obsidian` offers to reorganize flat files into folders.
49+
- **Obsidian-compatible Related Links** - All `/kb-*` commands that create or update KB files now maintain a `## Related` section at the end of the file body with `[[wiki-links]]` mirroring the `related` frontmatter field. Obsidian does not parse frontmatter values as navigable links, so body links are required for graph view edges and link navigation to work.
50+
- **Global Learnings as dedicated KB file** - Global learnings are now stored in `docs/kb/_global-learnings.md` (a pinned KB file) instead of inline in CLAUDE.md's `### Global Learnings` section. This makes global learnings visible in Obsidian, searchable as a regular KB file, and eliminates duplication. Affects `/kb-init`, `/kb-learn`, `/kb-add`, `/kb-search`, `/kb-list`, and `/kb-prune`. Existing inline global learnings are preserved and can be migrated with `/kb-obsidian`.
51+
- **Index and log maintenance** - All `/kb-*` commands that modify KB files now update `_index.md` and append to `_log.md` (conditionally — only if the files exist, for backwards compatibility).
52+
- **Cross-reference cleanup now includes body links** - `/kb-remove` and `/kb-prune` now update both `related` frontmatter AND `## Related` body sections when cleaning up cross-references.
53+
- **kb-prune detects out-of-sync Related sections** - Cross-reference integrity checks now flag KB files where the `## Related` body section doesn't match the `related` frontmatter.
54+
- **kb-list and kb-search detect legacy global learnings** - These commands now check for and flag legacy inline `### Global Learnings` sections in CLAUDE.md, suggesting `/kb-obsidian` for migration.
55+
1056
## [2.3.2] - 2026-04-03
1157

1258
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Claude Code Plugins for Developers
22

3-
[![Version](https://img.shields.io/badge/version-2.3.2-blue.svg)](https://github.com/charlesjones-dev/claude-code-plugins-dev/releases)
3+
[![Version](https://img.shields.io/badge/version-2.3.3-blue.svg)](https://github.com/charlesjones-dev/claude-code-plugins-dev/releases)
44
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
55
[![GitHub Issues](https://img.shields.io/github/issues/charlesjones-dev/claude-code-plugins-dev.svg)](https://github.com/charlesjones-dev/claude-code-plugins-dev/issues)
66
[![GitHub Stars](https://img.shields.io/github/stars/charlesjones-dev/claude-code-plugins-dev.svg)](https://github.com/charlesjones-dev/claude-code-plugins-dev/stargazers)
@@ -27,7 +27,7 @@ This Claude Code plugin marketplace provides plugins that extend Claude Code's c
2727
| [ai-statusline](plugins/ai-statusline/) | AI-powered status line customization with progress bars | `/statusline-wizard`, `/statusline-edit` | - |
2828
| [ai-workflow](plugins/ai-workflow/) | AI-powered development workflow automation | `/workflow-plan-phases`, `/workflow-implement-phases`, `/workflow-preflight`, `/workflow-ship`, `/workflow-principles` | - |
2929
| [ai-compliance](plugins/ai-compliance/) | AI-powered license compliance auditing and attribution generation | `/compliance-license-audit`, `/compliance-notice-generate` | - |
30-
| [ai-knowledge](plugins/ai-knowledge/) | AI-powered knowledge base management for conversation learnings | `/kb-init`, `/kb-learn`, `/kb-add`, `/kb-import`, `/kb-ingest`, `/kb-harvest`, `/kb-discover`, `/kb-absorb`, `/kb-remove`, `/kb-list`, `/kb-search`, `/kb-prune`, `/kb-auto` | - |
30+
| [ai-knowledge](plugins/ai-knowledge/) | AI-powered knowledge base management with Obsidian compatibility | `/kb-init`, `/kb-learn`, `/kb-add`, `/kb-query`, `/kb-import`, `/kb-ingest`, `/kb-harvest`, `/kb-discover`, `/kb-absorb`, `/kb-remove`, `/kb-list`, `/kb-search`, `/kb-prune`, `/kb-auto`, `/kb-organize`, `/kb-obsidian` | - |
3131
| [ai-modernize](plugins/ai-modernize/) | AI-powered codebase modernization assessment for technical debt | `/modernize-audit`, `/modernize-scan` | `modernize-auditor` |
3232
| [ai-writing](plugins/ai-writing/) | AI-powered writing quality tools for natural-sounding text | `/writing-humanize` | - |
3333

plugins/ai-compliance/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Charles Jones
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

plugins/ai-knowledge/.claude-plugin/plugin.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ai-knowledge",
3-
"version": "1.2.0",
4-
"description": "AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, and dynamically reference institutional knowledge in CLAUDE.md",
3+
"version": "1.3.0",
4+
"description": "AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, Obsidian-compatible knowledge graph, and dynamically reference institutional knowledge in CLAUDE.md",
55
"author": {
66
"name": "Charles Jones",
77
"url": "https://charlesjones.dev"
@@ -17,6 +17,9 @@
1717
"best-practices",
1818
"lessons-learned",
1919
"kb",
20-
"productivity"
20+
"productivity",
21+
"obsidian",
22+
"graph-view",
23+
"wiki-links"
2124
]
2225
}

plugins/ai-knowledge/README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ AI-powered knowledge base management for Claude Code. Capture conversation learn
66

77
Over time, you accumulate project-specific knowledge during Claude Code conversations: things that didn't work, best practices, client requirements, and codebase gotchas. This plugin captures that knowledge so future sessions benefit from it automatically.
88

9-
Knowledge is stored in two layers:
10-
- **KB files** (`docs/kb/*.md`): Topic-specific knowledge loaded contextually when working in relevant areas
11-
- **Global Learnings** (in CLAUDE.md): Cross-cutting rules that apply everywhere
9+
The knowledge base is a persistent, compounding wiki maintained by the LLM. It has three layers:
10+
- **KB articles** (`docs/kb/{category}/*.md`): Topic-specific knowledge organized in category folders, loaded contextually
11+
- **Global Learnings** (`docs/kb/_global-learnings.md`): Cross-cutting rules that apply everywhere (pinned, always loaded)
12+
- **Index & Log** (`docs/kb/_index.md`, `docs/kb/_log.md`): Auto-generated catalog and chronological activity record
13+
14+
The knowledge base is fully **Obsidian-compatible** — open `docs/kb/` as an Obsidian vault to browse your knowledge graph, navigate between related topics, and visualize connections.
15+
16+
Inspired by Karpathy's [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) pattern — the LLM does all the summarizing, cross-referencing, filing, and bookkeeping that makes a knowledge base useful over time.
1217

1318
## Commands
1419

@@ -26,7 +31,10 @@ Knowledge is stored in two layers:
2631
| `/kb-list` | List all registered KB files with status, tags, dates, and cross-references |
2732
| `/kb-search` | Search across KB files by keyword, topic, or tag (`tag:security`) |
2833
| `/kb-prune` | Interactive cleanup: stale refs, duplicates, merges, frontmatter health |
34+
| `/kb-query` | Query the KB and synthesize answers (optionally filed back as articles) |
2935
| `/kb-auto` | Toggle automatic knowledge capture at end of conversations |
36+
| `/kb-organize` | Reorganize flat KB files into category folders |
37+
| `/kb-obsidian` | One-time upgrade for Obsidian compatibility, index, log, and folders |
3038

3139
## Getting Started
3240

@@ -42,6 +50,8 @@ Knowledge is stored in two layers:
4250

4351
6. Periodically run `/kb-prune` to keep the knowledge base organized.
4452

53+
7. Run `/kb-obsidian` to make an existing KB Obsidian-compatible, then open `docs/kb/` as an Obsidian vault.
54+
4555
## How It Works
4656

4757
The Knowledge Base table in CLAUDE.md tells Claude Code which KB files to read based on what you're working on:
@@ -75,8 +85,21 @@ scope: "packages/api/**" # Optional glob pattern for auto-matching
7585

7686
Cross-references (`related`) create a knowledge graph -- when Claude loads one KB file and sees related references, it knows to also consult the linked files for full context.
7787

88+
### Obsidian Compatibility
89+
90+
KB files also include a `## Related` section at the bottom of the file body with `[[wiki-links]]` mirroring the frontmatter:
91+
92+
```markdown
93+
## Related
94+
95+
- [[api-conventions]]
96+
- [[auth-patterns]]
97+
```
98+
99+
This is required because Obsidian does not parse frontmatter values as navigable links. The body `[[wiki-links]]` enable Obsidian's graph view edges and click-to-navigate between related topics. All `/kb-*` commands maintain this section automatically.
100+
78101
## Plugin Details
79102

80-
- **Version**: 1.2.0
103+
- **Version**: 1.3.0
81104
- **Author**: [Charles Jones](https://charlesjones.dev)
82105
- **License**: MIT

plugins/ai-knowledge/skills/kb-absorb/SKILL.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ disable-model-invocation: true
88

99
You are a knowledge base migration specialist. Your job is to analyze a project's existing documentation — CLAUDE.md, docs/ folders, and other markdown files — and help the user organize relevant content into the KB system. You must be careful not to move content that would degrade Claude Code's capabilities.
1010

11+
## Obsidian-Compatible Related Links
12+
13+
When a KB file has `related` entries in its frontmatter, you MUST also include a `## Related` section at the **end** of the file body with the same references as `[[wiki-links]]`. This enables Obsidian graph view and link navigation. Always keep the `related` frontmatter AND the body `## Related` section in sync. If there are no related files, omit the section entirely.
14+
1115
## Instructions
1216

1317
**CRITICAL**: This command MUST NOT accept any arguments. Ignore any text provided after the command.
@@ -58,7 +62,7 @@ Documentation Analysis
5862
These sections are topic-specific and could be loaded contextually:
5963
6064
1. "{Section heading}" (lines {start}-{end})
61-
→ Suggested KB file: docs/kb/{suggested-path}.md
65+
→ Suggested KB file: docs/kb/{category}/{suggested-path}.md (prefer subfolder organization)
6266
→ When to load: {context}
6367
Reason: {why this is topic-specific, not core}
6468
@@ -132,9 +136,20 @@ For each approved migration:
132136

133137
#### 4c: Cross-References
134138

135-
After all migrations, scan the newly created KB files for related topics and add `related` cross-references in frontmatter where appropriate.
139+
After all migrations, scan the newly created KB files for related topics and add `related` cross-references in frontmatter where appropriate. Also add or update the `## Related` body section on any file whose `related` frontmatter was modified (keep them in sync).
140+
141+
### Phase 5: Update Index and Log
142+
143+
1. **Update `docs/kb/_index.md`**: If this file exists, add entries for all newly created KB files with one-line summaries. Update `last-updated` in its frontmatter.
144+
2. **Append to `docs/kb/_log.md`**: If this file exists, append:
145+
```
146+
## [YYYY-MM-DD] absorb | Migrated existing documentation
147+
- From CLAUDE.md: {list of sections moved}
148+
- From docs/: {list of files absorbed}
149+
- Created: {list of new KB files}
150+
```
136151

137-
### Phase 5: Confirmation
152+
### Phase 6: Confirmation
138153

139154
Display a summary:
140155
- Sections moved from CLAUDE.md to KB files

plugins/ai-knowledge/skills/kb-add/SKILL.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ scope: "src/api/**" # Optional: glob pattern for auto-matchin
2323
---
2424
```
2525

26+
## Obsidian-Compatible Related Links
27+
28+
When a KB file has `related` entries in its frontmatter, you MUST also include a `## Related` section at the **end** of the file body with the same references as `[[wiki-links]]`. This enables Obsidian graph view and link navigation. Always keep the `related` frontmatter AND the body `## Related` section in sync. If there are no related files, omit the `## Related` section entirely.
29+
2630
## Instructions
2731

2832
### Step 1: Get the Learning
@@ -51,8 +55,8 @@ Based on the learning content, existing KB structure, and frontmatter tags, dete
5155
- Header: "KB Location"
5256
- Options should include (as applicable):
5357
- Matching existing KB file(s) if the learning fits an existing topic — prioritize tag matches (e.g., "Append to `docs/kb/api-conventions.md` (tags: api, rest)")
54-
- A suggested new KB file if no existing file fits (e.g., "Create new file: `docs/kb/deployment.md`")
55-
- "Global Learnings (CLAUDE.md)" if the learning is cross-cutting
58+
- A suggested new KB file if no existing file fits — prefer subfolder organization (e.g., "Create new file: `docs/kb/tools/deployment.md`"). Use existing folder structure as a guide.
59+
- "Global Learnings (`docs/kb/_global-learnings.md`)" if the learning is cross-cutting
5660
- "Custom location" for the user to specify their own path
5761

5862
If the user selects "Custom location", ask a follow-up:
@@ -88,7 +92,7 @@ If saving to a new KB file, gather metadata:
8892
7. Add cross-references to `related` if the learning connects to other KB files.
8993

9094
#### If creating a new KB file:
91-
1. Create the file with frontmatter and standard structure:
95+
1. Create the file with frontmatter, content, and related links:
9296
```markdown
9397
---
9498
tags: [{confirmed tags}]
@@ -106,19 +110,36 @@ If saving to a new KB file, gather metadata:
106110
## Key Rules
107111

108112
- {The learning, concise and actionable}
113+
114+
## Related
115+
116+
- [[{related-kb-file}]]
109117
```
118+
Only include the `## Related` section if there are related files. It must be the last section.
110119
2. Update the CLAUDE.md Knowledge Base table:
111120
- Remove placeholder row if present.
112121
- Add new row with Topic, File path, and When to Load (use "Always (pinned)" if pinned).
113122
- Keep table sorted alphabetically by Topic.
114-
3. Add reverse cross-references: if the new file relates to existing KB files, add `[[new-file]]` to those files' `related` frontmatter and update their `last-updated`.
123+
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`.
115124

116125
#### If adding to Global Learnings:
117-
1. Append as a bullet point under `### Global Learnings` in CLAUDE.md.
118-
2. Remove placeholder text if present.
119-
3. Deduplicate against existing entries.
126+
1. Read `docs/kb/_global-learnings.md`. If it doesn't exist, create it with frontmatter (`tags: [global, cross-cutting]`, `pinned: true`, today's dates) and a `# Global Learnings` heading.
127+
2. Append as a bullet point under `## Key Rules`.
128+
3. Remove placeholder text if present ("_No global learnings captured yet..._").
129+
4. Deduplicate against existing entries.
130+
5. Update `last-updated` in frontmatter to today's date.
131+
6. Ensure `_global-learnings.md` is registered in the CLAUDE.md Knowledge Base table as: `| Global Learnings | docs/kb/_global-learnings.md | Always (pinned) |`
132+
133+
### Step 6: Update Index and Log
134+
135+
1. **Update `docs/kb/_index.md`**: If this file exists, add or update the entry for the modified file with a one-line summary. Update `last-updated` in its frontmatter.
136+
2. **Append to `docs/kb/_log.md`**: If this file exists, append:
137+
```
138+
## [YYYY-MM-DD] add | Quick add to {destination}
139+
- Added: "{brief learning text}"
140+
```
120141

121-
### Step 6: Confirm
142+
### Step 7: Confirm
122143

123144
Display:
124145
- What was saved and where

plugins/ai-knowledge/skills/kb-auto/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You are a knowledge base configuration assistant. Your job is to toggle the auto
2222

2323
#### If auto-capture is currently DISABLED (marker not found):
2424

25-
Add the following block immediately after the Knowledge Base table and before `### Global Learnings`:
25+
Add the following block immediately after the Knowledge Base table:
2626

2727
```markdown
2828
<!-- kb-auto: enabled -->

0 commit comments

Comments
 (0)