solvdex 2.0.0-alpha.8 → 3.1.0-alpha.1
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +102 -56
- package/agents/capture.md +122 -43
- package/agents/duplicate-checker.md +9 -11
- package/agents/graph.md +26 -25
- package/agents/health.md +84 -21
- package/agents/scanner.md +125 -26
- package/agents/searcher.md +46 -17
- package/agents/stats.md +31 -10
- package/agents/validator.md +26 -11
- package/docs/README.md +28 -10
- package/docs/architecture.md +64 -39
- package/docs/diagrams/architecture-overview.md +8 -11
- package/docs/diagrams/data-structures.md +2 -2
- package/docs/diagrams/knowledge-retrieval-flow.md +1 -1
- package/docs/diagrams/session-workflow.md +1 -1
- package/docs/diagrams/system-overview.md +4 -8
- package/docs/getting-started.md +15 -18
- package/docs/plans/2025-01-22-marketplace-distribution.md +2 -0
- package/docs/plans/2025-01-22-solvdex-design.md +2 -0
- package/docs/plans/2025-02-02-agent-first-architecture.md +16 -0
- package/docs/plans/2025-02-02-generic-wiki-v3.md +747 -0
- package/docs/plans/2026-02-03-index-scaling-design.md +145 -0
- package/docs/plans/2026-02-03-v3.1-index-implementation.md +856 -0
- package/docs/schema.md +140 -29
- package/docs/templates/problems.md +141 -0
- package/docs/templates/references.md +171 -0
- package/docs/templates/solutions.md +156 -0
- package/docs/use-cases.md +40 -93
- package/docs/workflows.md +19 -21
- package/hooks/hooks.json +7 -7
- package/package.json +2 -2
- package/skills/wiki/SKILL.md +17 -29
- package/skills/wiki-add/SKILL.md +27 -27
- package/skills/wiki-export/SKILL.md +6 -6
- package/skills/wiki-fix/SKILL.md +1 -1
- package/skills/wiki-flag/SKILL.md +1 -1
- package/skills/wiki-graph/SKILL.md +14 -15
- package/skills/wiki-health/SKILL.md +29 -12
- package/skills/wiki-import/SKILL.md +1 -1
- package/skills/wiki-init/SKILL.md +15 -26
- package/skills/wiki-scan/SKILL.md +4 -5
- package/skills/wiki-search/SKILL.md +49 -23
- package/skills/wiki-stats/SKILL.md +26 -30
- package/agents/templates/docs.md +0 -35
- package/agents/templates/gotchas.md +0 -31
- package/agents/templates/issues.md +0 -36
- package/agents/templates/patterns.md +0 -35
- package/agents/templates/performance.md +0 -36
- package/agents/templates/security.md +0 -36
- package/agents/templates/testing.md +0 -39
- package/docs/plans/2025-02-02-implementation-tasks.md +0 -1211
- package/skills/wiki-browse/SKILL.md +0 -74
- package/skills/wiki-capture/SKILL.md +0 -121
- package/skills/wiki-explorer/SKILL.md +0 -93
- package/skills/wiki-status/SKILL.md +0 -53
- package/skills/wiki-test-trigger/SKILL.md +0 -97
- package/skills/wiki-validate/SKILL.md +0 -61
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Knowledge management plugins for Claude Code",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "3.1.0-alpha.1"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"source": "url",
|
|
16
16
|
"url": "https://github.com/ducdmdev/solvdex.git"
|
|
17
17
|
},
|
|
18
|
-
"description": "
|
|
19
|
-
"version": "
|
|
18
|
+
"description": "Universal problem-solving journal - auto-capture and retrieve knowledge (problems, solutions, references)",
|
|
19
|
+
"version": "3.1.0-alpha.1"
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solvdex",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "
|
|
3
|
+
"description": "Universal problem-solving journal - auto-captures and retrieves knowledge across problems, solutions, and references",
|
|
4
|
+
"version": "3.1.0-alpha.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "duc.do",
|
|
7
7
|
"email": "ducdm.dev.work@gmail.com"
|
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# Solvdex
|
|
2
2
|
|
|
3
|
+
[](https://github.com/ducdmdev/solvdex)
|
|
4
|
+
[](./package.json)
|
|
3
5
|
[](./tests)
|
|
4
|
-
[](./package.json)
|
|
5
6
|
[](./LICENSE)
|
|
6
|
-
[](./docs/schema.md)
|
|
7
7
|
|
|
8
|
-
> **An index of solved problems.** A Claude Code plugin that auto-captures and retrieves
|
|
8
|
+
> **An index of solved problems.** A Claude Code plugin that auto-captures and retrieves knowledge across any domain.
|
|
9
|
+
|
|
10
|
+
**Quick Install:**
|
|
11
|
+
```bash
|
|
12
|
+
/plugin marketplace add https://raw.githubusercontent.com/ducdmdev/solvdex/main/.claude-plugin/marketplace.json
|
|
13
|
+
/plugin install solvdex
|
|
14
|
+
```
|
|
9
15
|
|
|
10
16
|
```
|
|
11
17
|
+-------------------------------------------------------------+
|
|
@@ -25,7 +31,7 @@
|
|
|
25
31
|
|---------|-------------|
|
|
26
32
|
| **Auto-Capture** | Saves solutions when errors are resolved |
|
|
27
33
|
| **Auto-Lookup** | Surfaces relevant knowledge on errors |
|
|
28
|
-
| **
|
|
34
|
+
| **3 Folders** | Organized knowledge: problems, solutions, references |
|
|
29
35
|
| **Trigger Patterns** | Regex matching for automatic error detection |
|
|
30
36
|
| **Confidence Tracking** | Trust scores with decay over time |
|
|
31
37
|
| **Cross-References** | Link related entries and source files |
|
|
@@ -34,16 +40,16 @@
|
|
|
34
40
|
|
|
35
41
|
**Pure Agent Plugin - No Code Required**
|
|
36
42
|
|
|
37
|
-
Solvdex
|
|
43
|
+
Solvdex 3.0 uses a pure agent-based architecture. All logic is implemented in agent markdown files - no TypeScript compilation needed. Fixed templates per folder ensure consistency. See [docs/templates/](./docs/templates/).
|
|
38
44
|
|
|
39
45
|
> **[View Architecture Diagram](./docs/diagrams/architecture-overview.md)**
|
|
40
46
|
|
|
41
47
|
| Layer | Components |
|
|
42
48
|
|-------|------------|
|
|
43
|
-
| **Skills (
|
|
44
|
-
| **Hooks** | SessionStart →
|
|
49
|
+
| **Skills (12)** | `/wiki search`, `/wiki add`, `/wiki health`, etc. |
|
|
50
|
+
| **Hooks** | SessionStart → entry count, PreToolUse → context hints, Stop → capture prompt |
|
|
45
51
|
| **Agents (8)** | searcher, capture, scanner, validator, stats, health, graph, duplicate-checker |
|
|
46
|
-
| **Storage** | `.wiki/` with
|
|
52
|
+
| **Storage** | `.wiki/` with 3 universal folders |
|
|
47
53
|
|
|
48
54
|
## Project Structure
|
|
49
55
|
|
|
@@ -57,26 +63,22 @@ solvdex/
|
|
|
57
63
|
│ ├── stats.md
|
|
58
64
|
│ ├── duplicate-checker.md
|
|
59
65
|
│ ├── health.md
|
|
60
|
-
│
|
|
61
|
-
|
|
62
|
-
├── skills/ # 18 Claude Code skills (thin wrappers)
|
|
66
|
+
│ └── graph.md
|
|
67
|
+
├── skills/ # 12 Claude Code skills (thin wrappers)
|
|
63
68
|
├── hooks/ # hooks.json (prompt-based hints)
|
|
64
69
|
├── docs/ # Documentation
|
|
65
|
-
│
|
|
70
|
+
│ ├── schema.md # Entry schema & constants (source of truth)
|
|
71
|
+
│ └── templates/ # Fixed templates per folder
|
|
66
72
|
└── tests/ # Validation tests
|
|
67
73
|
```
|
|
68
74
|
|
|
69
|
-
##
|
|
75
|
+
## Folders
|
|
70
76
|
|
|
71
77
|
```
|
|
72
78
|
.wiki/
|
|
73
|
-
├──
|
|
74
|
-
├──
|
|
75
|
-
|
|
76
|
-
├── testing/ # Test strategies, mocks
|
|
77
|
-
├── docs/ # Documentation guides
|
|
78
|
-
├── security/ # Auth, vulnerabilities
|
|
79
|
-
└── performance/ # Optimizations, benchmarks
|
|
79
|
+
├── problems/ # What went wrong - bugs, errors, gotchas
|
|
80
|
+
├── solutions/ # How to fix/do things - patterns, recipes
|
|
81
|
+
└── references/ # Things to remember - docs, configs
|
|
80
82
|
```
|
|
81
83
|
|
|
82
84
|
## Quick Start
|
|
@@ -89,10 +91,10 @@ solvdex/
|
|
|
89
91
|
/wiki search "database timeout"
|
|
90
92
|
|
|
91
93
|
# Add current solution
|
|
92
|
-
/wiki add --
|
|
94
|
+
/wiki add --folder=problems
|
|
93
95
|
|
|
94
|
-
# Browse entries
|
|
95
|
-
/wiki
|
|
96
|
+
# Browse all entries
|
|
97
|
+
/wiki search
|
|
96
98
|
```
|
|
97
99
|
|
|
98
100
|
## Commands
|
|
@@ -102,30 +104,26 @@ solvdex/
|
|
|
102
104
|
| Command | Description |
|
|
103
105
|
|---------|-------------|
|
|
104
106
|
| `/wiki init` | Create `.wiki/` structure |
|
|
105
|
-
| `/wiki add` |
|
|
106
|
-
| `/wiki search
|
|
107
|
-
| `/wiki browse` | List entries with filters |
|
|
107
|
+
| `/wiki add` | Capture knowledge from conversation |
|
|
108
|
+
| `/wiki search [query]` | Search or browse entries (no query = list all) |
|
|
108
109
|
|
|
109
|
-
###
|
|
110
|
+
### Analysis Commands
|
|
110
111
|
|
|
111
112
|
| Command | Description |
|
|
112
113
|
|---------|-------------|
|
|
113
|
-
| `/wiki
|
|
114
|
-
| `/wiki
|
|
115
|
-
| `/wiki validate` | Check for issues |
|
|
114
|
+
| `/wiki stats [--quick]` | Statistics and health score |
|
|
115
|
+
| `/wiki health [--validate]` | Health analysis with validation |
|
|
116
116
|
| `/wiki scan` | Generate stubs from project |
|
|
117
|
-
| `/wiki flag <entry>` | Mark for review |
|
|
118
|
-
| `/wiki fix <entry>` | Update flagged entry |
|
|
119
|
-
| `/wiki health` | Coverage gaps and health analysis |
|
|
120
117
|
| `/wiki graph` | Relationship diagrams |
|
|
121
118
|
|
|
122
|
-
###
|
|
119
|
+
### Entry Management
|
|
123
120
|
|
|
124
121
|
| Command | Description |
|
|
125
122
|
|---------|-------------|
|
|
123
|
+
| `/wiki flag <entry>` | Mark for review |
|
|
124
|
+
| `/wiki fix <entry>` | Update flagged entry |
|
|
126
125
|
| `/wiki export [file]` | Export to JSON |
|
|
127
126
|
| `/wiki import <file>` | Import from JSON |
|
|
128
|
-
| `/wiki test-trigger` | Test regex patterns |
|
|
129
127
|
|
|
130
128
|
### Agents
|
|
131
129
|
|
|
@@ -133,14 +131,14 @@ All logic is implemented by specialized agents:
|
|
|
133
131
|
|
|
134
132
|
| Agent | Commands | Description |
|
|
135
133
|
|-------|----------|-------------|
|
|
136
|
-
| `searcher` | `/wiki search
|
|
137
|
-
| `capture` | `/wiki add`, `/wiki
|
|
134
|
+
| `searcher` | `/wiki search` | Search + browse |
|
|
135
|
+
| `capture` | `/wiki add`, `/wiki fix` | Knowledge extraction |
|
|
138
136
|
| `scanner` | `/wiki scan` | Project scanning |
|
|
139
|
-
| `validator` | `/wiki
|
|
137
|
+
| `validator` | `/wiki flag` | Quality checks |
|
|
140
138
|
| `stats` | `/wiki stats` | Analytics + maturity |
|
|
141
|
-
| `
|
|
142
|
-
| `health` | `/wiki health` | Coverage gaps |
|
|
139
|
+
| `health` | `/wiki health` | Coverage gaps + validation |
|
|
143
140
|
| `graph` | `/wiki graph` | Relationship diagrams |
|
|
141
|
+
| `duplicate-checker` | (internal) | Prevent duplicates |
|
|
144
142
|
|
|
145
143
|
## How It Works
|
|
146
144
|
|
|
@@ -153,9 +151,9 @@ All logic is implemented by specialized agents:
|
|
|
153
151
|
+--------------+ +--------------+ +--------------+
|
|
154
152
|
|
|
155
153
|
Signals detected:
|
|
156
|
-
- error_resolved ->
|
|
157
|
-
- workaround ->
|
|
158
|
-
- user confirms -> auto-detect
|
|
154
|
+
- error_resolved -> problems/
|
|
155
|
+
- workaround -> solutions/
|
|
156
|
+
- user confirms -> auto-detect folder
|
|
159
157
|
- explicit save -> "remember this"
|
|
160
158
|
```
|
|
161
159
|
|
|
@@ -170,7 +168,7 @@ Signals detected:
|
|
|
170
168
|
Lookup triggers:
|
|
171
169
|
- Session start -> relevant context
|
|
172
170
|
- Error match -> trigger patterns
|
|
173
|
-
- Prompt keywords ->
|
|
171
|
+
- Prompt keywords -> folder detection
|
|
174
172
|
```
|
|
175
173
|
|
|
176
174
|
## Entry Format
|
|
@@ -179,10 +177,20 @@ Lookup triggers:
|
|
|
179
177
|
---
|
|
180
178
|
title: Database Connection Timeout
|
|
181
179
|
created: 2025-01-20
|
|
180
|
+
updated: 2025-01-20
|
|
182
181
|
status: active
|
|
183
182
|
confidence: 85
|
|
183
|
+
maturity: verified
|
|
184
184
|
tags: [database, timeout, postgres]
|
|
185
185
|
trigger: "ETIMEDOUT.*postgres"
|
|
186
|
+
use_count: 5
|
|
187
|
+
last_used: 2025-01-20
|
|
188
|
+
related_entries:
|
|
189
|
+
- .wiki/solutions/connection-pool-config.md
|
|
190
|
+
audit:
|
|
191
|
+
- date: 2025-01-20
|
|
192
|
+
action: created
|
|
193
|
+
by: user
|
|
186
194
|
---
|
|
187
195
|
|
|
188
196
|
## Problem
|
|
@@ -192,11 +200,11 @@ Connection times out after 30 seconds...
|
|
|
192
200
|
Increase timeout and add connection pool...
|
|
193
201
|
|
|
194
202
|
## Related
|
|
195
|
-
- [[
|
|
203
|
+
- [[solutions/connection-pool-config]]
|
|
196
204
|
- `src/db/config.ts:45`
|
|
197
205
|
```
|
|
198
206
|
|
|
199
|
-
> **Note:** For complete schema details including all fields, maturity levels, and constants, see [docs/schema.md](./docs/schema.md).
|
|
207
|
+
> **Note:** For complete schema details including all fields, maturity levels, and constants, see [docs/schema.md](./docs/schema.md). For entry templates, see [docs/templates/](./docs/templates/).
|
|
200
208
|
|
|
201
209
|
### Entry Maturity System
|
|
202
210
|
|
|
@@ -235,28 +243,65 @@ Confidence auto-decays for entries unused for 90+ days.
|
|
|
235
243
|
|
|
236
244
|
Real-time integration with Claude Code via contextual prompts:
|
|
237
245
|
|
|
238
|
-
| Hook |
|
|
239
|
-
|
|
240
|
-
| `SessionStart` |
|
|
241
|
-
| `
|
|
246
|
+
| Hook | When | Purpose |
|
|
247
|
+
|------|------|---------|
|
|
248
|
+
| `SessionStart` | New conversation | Shows entry count, hints to use `/wiki search` |
|
|
249
|
+
| `PreToolUse` | Before Edit/Write | Shows problems/solutions count for context |
|
|
250
|
+
| `Stop` | Task completes | Hint to capture valuable knowledge |
|
|
242
251
|
|
|
243
252
|
Hooks are configured in `hooks/hooks.json` and provide prompt-based guidance to use wiki agents.
|
|
244
253
|
|
|
245
254
|
## Installation
|
|
246
255
|
|
|
247
|
-
###
|
|
256
|
+
### Option 1: Via Marketplace (Recommended)
|
|
257
|
+
|
|
258
|
+
Add the Solvdex marketplace to Claude Code, then install:
|
|
248
259
|
|
|
249
260
|
```bash
|
|
261
|
+
# Step 1: Add marketplace
|
|
262
|
+
/plugin marketplace add https://raw.githubusercontent.com/ducdmdev/solvdex/main/.claude-plugin/marketplace.json
|
|
263
|
+
|
|
264
|
+
# Step 2: Install plugin
|
|
265
|
+
/plugin install solvdex
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Option 2: Load Directly from GitHub
|
|
269
|
+
|
|
270
|
+
Clone and load the plugin directly:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Clone the repository
|
|
250
274
|
git clone https://github.com/ducdmdev/solvdex.git
|
|
251
|
-
|
|
252
|
-
|
|
275
|
+
|
|
276
|
+
# Start Claude Code with the plugin
|
|
277
|
+
claude --plugin-dir ./solvdex
|
|
253
278
|
```
|
|
254
279
|
|
|
255
|
-
###
|
|
280
|
+
### Option 3: Add to Project Settings
|
|
281
|
+
|
|
282
|
+
For team projects, add to `.claude/settings.json`:
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"plugins": {
|
|
287
|
+
"solvdex": {
|
|
288
|
+
"source": "https://github.com/ducdmdev/solvdex.git"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### After Installation
|
|
256
295
|
|
|
257
296
|
```bash
|
|
258
|
-
#
|
|
259
|
-
/
|
|
297
|
+
# Initialize your wiki
|
|
298
|
+
/wiki init
|
|
299
|
+
|
|
300
|
+
# Scan your project for existing knowledge
|
|
301
|
+
/wiki scan
|
|
302
|
+
|
|
303
|
+
# Start using!
|
|
304
|
+
/wiki search "your query"
|
|
260
305
|
```
|
|
261
306
|
|
|
262
307
|
## Development
|
|
@@ -272,6 +317,7 @@ npm run test:watch # Watch mode
|
|
|
272
317
|
| Document | Description |
|
|
273
318
|
|----------|-------------|
|
|
274
319
|
| [Schema Reference](./docs/schema.md) | Entry schema & constants (source of truth) |
|
|
320
|
+
| [Entry Templates](./docs/templates/) | Fixed templates per folder |
|
|
275
321
|
| [Getting Started](./docs/getting-started.md) | Quick setup guide |
|
|
276
322
|
| [Architecture](./docs/architecture.md) | System design |
|
|
277
323
|
| [Workflows](./docs/workflows.md) | Hook and skill flows |
|
package/agents/capture.md
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tools:
|
|
5
|
-
- Glob
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
2
|
+
name: capture
|
|
3
|
+
description: Extract problem/solution from conversation context and create wiki entry. Smart categorization, duplicate checking, tag suggestions.
|
|
4
|
+
tools: Glob, Read, Write
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# Wiki Capture Agent
|
|
@@ -14,10 +11,11 @@ tools:
|
|
|
14
11
|
For entry structure, validation rules, and constants, see: `docs/schema.md`
|
|
15
12
|
|
|
16
13
|
Key references:
|
|
17
|
-
- Entry frontmatter fields: `docs/schema.md#
|
|
14
|
+
- Entry frontmatter fields: `docs/schema.md#entryfrontmatter`
|
|
18
15
|
- Maturity rules: `docs/schema.md#maturity-rules`
|
|
19
|
-
- Confidence levels: `docs/schema.md#confidence-
|
|
20
|
-
-
|
|
16
|
+
- Confidence levels: `docs/schema.md#confidence-constants`
|
|
17
|
+
- Folders: `docs/schema.md#default-folders`
|
|
18
|
+
- Entry Templates: `docs/templates/` (problems.md, solutions.md, references.md)
|
|
21
19
|
|
|
22
20
|
Intelligently extract problem and solution from conversation context to create a wiki entry.
|
|
23
21
|
|
|
@@ -30,7 +28,7 @@ You will receive conversation context containing:
|
|
|
30
28
|
|
|
31
29
|
Optional parameters:
|
|
32
30
|
- `mode: "auto-capture"` - Auto-capture from conversation (hook)
|
|
33
|
-
- `
|
|
31
|
+
- `folder: "<folder>"` - Force specific folder (problems, solutions, references)
|
|
34
32
|
- `title: "<title>"` - Force specific title
|
|
35
33
|
|
|
36
34
|
## Process
|
|
@@ -58,9 +56,9 @@ Include relevant code snippets (max 20 lines).
|
|
|
58
56
|
|
|
59
57
|
**IMPORTANT: Always check before creating!**
|
|
60
58
|
|
|
61
|
-
1. Search existing entries in detected
|
|
59
|
+
1. Search existing entries in detected folder:
|
|
62
60
|
```
|
|
63
|
-
Glob .wiki/<
|
|
61
|
+
Glob .wiki/<folder>/*.md
|
|
64
62
|
```
|
|
65
63
|
|
|
66
64
|
2. Compare semantically:
|
|
@@ -70,29 +68,29 @@ Include relevant code snippets (max 20 lines).
|
|
|
70
68
|
|
|
71
69
|
3. If >80% similarity found:
|
|
72
70
|
```
|
|
73
|
-
Similar entry exists:
|
|
74
|
-
Consider updating it instead: /wiki fix
|
|
71
|
+
Similar entry exists: folder/existing-entry.md
|
|
72
|
+
Consider updating it instead: /wiki fix folder/existing-entry.md
|
|
75
73
|
```
|
|
76
74
|
Do NOT create new entry.
|
|
77
75
|
|
|
78
76
|
4. If 50-79% similarity:
|
|
79
77
|
```
|
|
80
|
-
Related entry found:
|
|
78
|
+
Related entry found: folder/related-entry.md
|
|
81
79
|
Creating new entry and linking to related.
|
|
82
80
|
```
|
|
83
81
|
Create entry with `related_entries` field.
|
|
84
82
|
|
|
85
|
-
### Step 4: Determine
|
|
83
|
+
### Step 4: Determine Folder
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
Analyze content to determine the appropriate folder:
|
|
86
|
+
|
|
87
|
+
| Content Analysis | Folder |
|
|
88
|
+
|------------------|--------|
|
|
89
|
+
| Problem encountered, error, failure, blocker, bug, crash, exception, pitfall, gotcha, warning, careful, avoid, security issue | problems/ |
|
|
90
|
+
| How-to, procedure, recipe, pattern, template, approach, optimization, test strategy, workflow, steps to do something | solutions/ |
|
|
91
|
+
| Documentation, reference, config, link, guide, API docs, notes, information to remember | references/ |
|
|
92
|
+
|
|
93
|
+
**AI decides automatically.** If genuinely uncertain (>30% confidence in multiple folders), default to `problems/` for issues or `references/` for informational content.
|
|
96
94
|
|
|
97
95
|
### Step 5: Generate Tags
|
|
98
96
|
|
|
@@ -119,36 +117,117 @@ Create a concise, descriptive title:
|
|
|
119
117
|
- Include technology: "TypeScript Generic Constraint Issue"
|
|
120
118
|
- Max 60 characters
|
|
121
119
|
|
|
122
|
-
### Step 7: Create Entry Using Template
|
|
120
|
+
### Step 7: Create Entry Using Fixed Template
|
|
123
121
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
**Use the fixed template for the target folder.** See `docs/templates/` for full templates.
|
|
123
|
+
|
|
124
|
+
1. **Select template** based on folder:
|
|
125
|
+
|
|
126
|
+
| Folder | Template Sections |
|
|
127
|
+
|--------|-------------------|
|
|
128
|
+
| `problems/` | Problem, Cause, Solution, Prevention, Related |
|
|
129
|
+
| `solutions/` | Overview, Prerequisites, Steps, Example, Related |
|
|
130
|
+
| `references/` | Summary, Details, Links, Related |
|
|
131
|
+
|
|
132
|
+
2. **Fill frontmatter**:
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
---
|
|
136
|
+
title: {{generated_title}}
|
|
137
|
+
created: {{today YYYY-MM-DD}}
|
|
138
|
+
updated: {{today YYYY-MM-DD}}
|
|
139
|
+
status: active
|
|
140
|
+
confidence: 40
|
|
141
|
+
maturity: captured
|
|
142
|
+
tags: [{{extracted_tags}}]
|
|
143
|
+
trigger: "{{error_regex}}" # problems/ only
|
|
144
|
+
source: capture-agent
|
|
145
|
+
use_count: 0
|
|
146
|
+
audit:
|
|
147
|
+
- date: {{today YYYY-MM-DD}}
|
|
148
|
+
action: created
|
|
149
|
+
by: capture-agent
|
|
150
|
+
---
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
3. **Fill template sections** with extracted content:
|
|
128
154
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- `{{trigger}}` → error regex pattern (issues/security/performance only)
|
|
135
|
-
- `{{source}}` → "conversation" or "capture-agent"
|
|
136
|
-
- `{{created_by}}` → "capture-agent"
|
|
137
|
-
- Section placeholders → extracted content
|
|
155
|
+
**For problems/**:
|
|
156
|
+
- Problem: The error or issue encountered
|
|
157
|
+
- Cause: Root cause analysis
|
|
158
|
+
- Solution: Fix steps or code
|
|
159
|
+
- Prevention: How to avoid in future
|
|
138
160
|
|
|
139
|
-
|
|
161
|
+
**For solutions/**:
|
|
162
|
+
- Overview: What this does and when to use
|
|
163
|
+
- Prerequisites: What's needed first
|
|
164
|
+
- Steps: Numbered procedure
|
|
165
|
+
- Example: Code or config sample
|
|
166
|
+
|
|
167
|
+
**For references/**:
|
|
168
|
+
- Summary: Brief description
|
|
169
|
+
- Details: Information to remember
|
|
170
|
+
- Links: External resources
|
|
171
|
+
|
|
172
|
+
4. **Add Related section** with relative paths (NOT absolute):
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## Related
|
|
176
|
+
|
|
177
|
+
- `internal/auth/handler.go` ✅ Relative from project root
|
|
178
|
+
- `docs/api.md` ✅ Relative from project root
|
|
179
|
+
- [Other Entry](../problems/x.md) ✅ Wiki cross-link
|
|
180
|
+
- `/Users/foo/project/file.go` ❌ Never use absolute paths
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
5. **Write to** `.wiki/<folder>/<slug>.md`
|
|
140
184
|
|
|
141
185
|
### Step 8: Return Confirmation
|
|
142
186
|
|
|
143
187
|
```
|
|
144
|
-
Captured:
|
|
188
|
+
Captured: folder/entry-name.md
|
|
145
189
|
Title: Entry Title
|
|
190
|
+
Folder: problems | solutions | references
|
|
146
191
|
Tags: tag1, tag2, tag3
|
|
147
192
|
Confidence: 40 (captured)
|
|
148
193
|
|
|
149
|
-
Edit: /wiki fix
|
|
194
|
+
Edit: /wiki fix folder/entry-name.md
|
|
150
195
|
```
|
|
151
196
|
|
|
197
|
+
### Step 9: Update Index
|
|
198
|
+
|
|
199
|
+
After creating the entry file, update the index:
|
|
200
|
+
|
|
201
|
+
1. **Read index**: Try Read `.wiki/index.json`
|
|
202
|
+
- If missing: create new index with this entry only
|
|
203
|
+
- If exists: parse JSON
|
|
204
|
+
|
|
205
|
+
2. **Add entry to index**:
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"path": "<folder>/<slug>.md",
|
|
209
|
+
"title": "<generated_title>",
|
|
210
|
+
"folder": "<folder>",
|
|
211
|
+
"tags": ["<tags>"],
|
|
212
|
+
"trigger": "<regex>",
|
|
213
|
+
"confidence": 40,
|
|
214
|
+
"maturity": "captured",
|
|
215
|
+
"status": "active",
|
|
216
|
+
"use_count": 0
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
3. **Update stats**:
|
|
221
|
+
- Increment `stats.total`
|
|
222
|
+
- Increment `stats.by_folder[folder]`
|
|
223
|
+
- Increment `stats.by_maturity.captured`
|
|
224
|
+
|
|
225
|
+
4. **Update timestamp**: Set `updated` to current ISO timestamp
|
|
226
|
+
|
|
227
|
+
5. **Write index**: Write `.wiki/index.json`
|
|
228
|
+
|
|
229
|
+
**If index write fails**: Log warning but don't fail entry creation. Index can be rebuilt with `/wiki health --reindex`.
|
|
230
|
+
|
|
152
231
|
## Important Rules
|
|
153
232
|
|
|
154
233
|
1. **Always check duplicates first** - don't create redundant entries
|
|
@@ -156,5 +235,5 @@ Captured: category/entry-name.md
|
|
|
156
235
|
3. **Include code** - solutions need concrete examples
|
|
157
236
|
4. **Keep it concise** - problem/solution should be scannable
|
|
158
237
|
5. **Set confidence 40** - captured entries start at maturity baseline
|
|
159
|
-
6. **Add trigger patterns** - for
|
|
238
|
+
6. **Add trigger patterns** - for problems folder, extract regex
|
|
160
239
|
7. **Link related entries** - build the knowledge graph
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tools:
|
|
5
|
-
- Glob
|
|
6
|
-
- Read
|
|
2
|
+
name: duplicate-checker
|
|
3
|
+
description: Check if a new entry would duplicate existing knowledge. Uses semantic similarity, not just title matching.
|
|
4
|
+
tools: Glob, Read
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
# Wiki Duplicate Checker Agent
|
|
@@ -16,7 +14,7 @@ Key references:
|
|
|
16
14
|
- Entry frontmatter fields: `docs/schema.md#entry-frontmatter`
|
|
17
15
|
- Maturity rules: `docs/schema.md#maturity-rules`
|
|
18
16
|
- Confidence levels: `docs/schema.md#confidence-levels`
|
|
19
|
-
-
|
|
17
|
+
- Folders: `docs/schema.md#default-folders`
|
|
20
18
|
|
|
21
19
|
Detect potential duplicate entries before creation.
|
|
22
20
|
|
|
@@ -26,14 +24,14 @@ Detect potential duplicate entries before creation.
|
|
|
26
24
|
{
|
|
27
25
|
"title": "Database Connection Timeout",
|
|
28
26
|
"tags": ["database", "timeout", "postgres"],
|
|
29
|
-
"
|
|
27
|
+
"folder": "problems",
|
|
30
28
|
"contentSummary": "Fix for connection pool exhaustion..."
|
|
31
29
|
}
|
|
32
30
|
```
|
|
33
31
|
|
|
34
32
|
## Process
|
|
35
33
|
|
|
36
|
-
1. Load existing entries in same
|
|
34
|
+
1. Load existing entries in same folder
|
|
37
35
|
2. Compare semantically:
|
|
38
36
|
- Title similarity (exact, partial, synonym)
|
|
39
37
|
- Tag overlap (Jaccard similarity)
|
|
@@ -48,7 +46,7 @@ Detect potential duplicate entries before creation.
|
|
|
48
46
|
{
|
|
49
47
|
"isDuplicate": true,
|
|
50
48
|
"similarity": 85,
|
|
51
|
-
"matchedEntry": "
|
|
49
|
+
"matchedEntry": "problems/db-timeout.md",
|
|
52
50
|
"matchedTitle": "Database Timeout Fix",
|
|
53
51
|
"reason": "Very similar title and tags",
|
|
54
52
|
"suggestion": "Consider updating existing entry instead"
|
|
@@ -60,7 +58,7 @@ Detect potential duplicate entries before creation.
|
|
|
60
58
|
{
|
|
61
59
|
"isDuplicate": false,
|
|
62
60
|
"similarity": 20,
|
|
63
|
-
"closestMatch": "
|
|
61
|
+
"closestMatch": "problems/connection-error.md",
|
|
64
62
|
"suggestion": "Safe to create new entry"
|
|
65
63
|
}
|
|
66
64
|
```
|
|
@@ -94,5 +92,5 @@ Detect potential duplicate entries before creation.
|
|
|
94
92
|
|
|
95
93
|
1. Be conservative - prefer false positives over duplicates
|
|
96
94
|
2. Consider synonyms (e.g., "timeout" ≈ "connection timeout")
|
|
97
|
-
3. Same
|
|
95
|
+
3. Same folder increases likelihood
|
|
98
96
|
4. Different maturity levels can coexist (stub vs detailed)
|