solvdex 2.0.0-alpha.5 → 3.0.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 +68 -55
- package/agents/{wiki-capture/AGENT.md → capture.md} +60 -45
- package/agents/{wiki-duplicate-checker/AGENT.md → duplicate-checker.md} +6 -6
- package/agents/{wiki-graph/AGENT.md → graph.md} +24 -22
- package/agents/{wiki-health/AGENT.md → health.md} +20 -16
- package/agents/{wiki-scanner/AGENT.md → scanner.md} +32 -15
- package/agents/{wiki-searcher/AGENT.md → searcher.md} +7 -5
- package/agents/{wiki-stats/AGENT.md → stats.md} +3 -4
- package/agents/{wiki-validator/AGENT.md → validator.md} +6 -6
- package/docs/README.md +24 -15
- package/docs/architecture.md +43 -53
- package/docs/diagrams/architecture-overview.md +15 -18
- package/docs/diagrams/data-structures.md +2 -2
- package/docs/diagrams/knowledge-capture-flow.md +1 -1
- package/docs/diagrams/knowledge-retrieval-flow.md +2 -2
- package/docs/diagrams/session-workflow.md +2 -2
- package/docs/diagrams/system-overview.md +12 -16
- package/docs/getting-started.md +10 -13
- 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-generic-wiki-v3.md +747 -0
- package/docs/schema.md +53 -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 +42 -95
- package/docs/workflows.md +23 -25
- package/hooks/hooks.json +3 -3
- package/package.json +2 -2
- package/skills/wiki/SKILL.md +17 -29
- package/skills/wiki-add/SKILL.md +29 -29
- package/skills/wiki-export/SKILL.md +8 -8
- package/skills/wiki-fix/SKILL.md +3 -3
- package/skills/wiki-flag/SKILL.md +3 -3
- package/skills/wiki-graph/SKILL.md +15 -16
- package/skills/wiki-health/SKILL.md +30 -13
- package/skills/wiki-import/SKILL.md +3 -3
- package/skills/wiki-init/SKILL.md +15 -26
- package/skills/wiki-scan/SKILL.md +5 -6
- package/skills/wiki-search/SKILL.md +51 -25
- package/skills/wiki-stats/SKILL.md +27 -31
- 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
|
@@ -16,7 +16,7 @@ Key references:
|
|
|
16
16
|
- Entry frontmatter fields: `docs/schema.md#entry-frontmatter`
|
|
17
17
|
- Maturity rules: `docs/schema.md#maturity-rules`
|
|
18
18
|
- Confidence levels: `docs/schema.md#confidence-levels`
|
|
19
|
-
-
|
|
19
|
+
- Folders: `docs/schema.md#default-folders`
|
|
20
20
|
|
|
21
21
|
Comprehensive wiki health analysis and recommendations.
|
|
22
22
|
|
|
@@ -31,7 +31,7 @@ Comprehensive wiki health analysis and recommendations.
|
|
|
31
31
|
- Orphaned: No tags, no related entries
|
|
32
32
|
- Broken links: [[link]] to non-existent entry
|
|
33
33
|
3. **Find coverage gaps**:
|
|
34
|
-
-
|
|
34
|
+
- Folders with < 3 entries
|
|
35
35
|
- Common error patterns without entries
|
|
36
36
|
4. **Generate recommendations**
|
|
37
37
|
|
|
@@ -45,29 +45,28 @@ Comprehensive wiki health analysis and recommendations.
|
|
|
45
45
|
## Issues Found
|
|
46
46
|
|
|
47
47
|
### Stale Entries (5)
|
|
48
|
-
-
|
|
49
|
-
-
|
|
48
|
+
- solutions/old-api.md (120 days)
|
|
49
|
+
- problems/legacy-auth.md (95 days)
|
|
50
50
|
→ Consider reviewing or deprecating
|
|
51
51
|
|
|
52
52
|
### Stub Entries (3)
|
|
53
|
-
-
|
|
54
|
-
-
|
|
53
|
+
- problems/api-timeout.md - Missing Solution
|
|
54
|
+
- problems/edge-case.md - Missing Problem
|
|
55
55
|
→ Run /wiki fix <entry> to complete
|
|
56
56
|
|
|
57
57
|
### Low Confidence (4)
|
|
58
|
-
-
|
|
58
|
+
- solutions/untested.md (confidence: 30)
|
|
59
59
|
→ Verify and increase confidence
|
|
60
60
|
|
|
61
61
|
### Missing Triggers (2)
|
|
62
|
-
-
|
|
63
|
-
-
|
|
62
|
+
- problems/db-error.md
|
|
63
|
+
- problems/auth-fail.md
|
|
64
64
|
→ Add trigger patterns for auto-matching
|
|
65
65
|
|
|
66
66
|
## Coverage Gaps
|
|
67
67
|
|
|
68
|
-
### Underserved
|
|
69
|
-
-
|
|
70
|
-
- performance: 2 entries (recommend: 3+)
|
|
68
|
+
### Underserved Folders
|
|
69
|
+
- references: 1 entry (recommend: 2+)
|
|
71
70
|
|
|
72
71
|
### Suggested Entries
|
|
73
72
|
Based on common errors, consider adding:
|
|
@@ -79,8 +78,8 @@ Based on common errors, consider adding:
|
|
|
79
78
|
|
|
80
79
|
1. Review 5 stale entries
|
|
81
80
|
2. Complete 3 stub entries
|
|
82
|
-
3. Add triggers to 2
|
|
83
|
-
4. Expand
|
|
81
|
+
3. Add triggers to 2 problems
|
|
82
|
+
4. Expand references folder
|
|
84
83
|
```
|
|
85
84
|
|
|
86
85
|
## Health Indicators
|
|
@@ -102,12 +101,17 @@ Based on common errors, consider adding:
|
|
|
102
101
|
|
|
103
102
|
## Coverage Analysis
|
|
104
103
|
|
|
105
|
-
For each
|
|
104
|
+
For each folder:
|
|
106
105
|
1. Count entries
|
|
107
106
|
2. Compare to minimum (3)
|
|
108
107
|
3. Flag if under-served
|
|
109
108
|
|
|
110
|
-
Recommend expanding
|
|
109
|
+
Recommend expanding folders with:
|
|
111
110
|
- High error rates in project
|
|
112
111
|
- Recent user questions
|
|
113
112
|
- Common patterns in codebase
|
|
113
|
+
|
|
114
|
+
### Minimum Recommendations
|
|
115
|
+
- problems: 3+ entries
|
|
116
|
+
- solutions: 3+ entries
|
|
117
|
+
- references: 2+ entries
|
|
@@ -44,14 +44,35 @@ Check for these files to determine project type:
|
|
|
44
44
|
|
|
45
45
|
## Step 3: Create Entries
|
|
46
46
|
|
|
47
|
-
For each finding, create entry in appropriate
|
|
48
|
-
- `.wiki/
|
|
49
|
-
- `.wiki/
|
|
50
|
-
- `.wiki/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
For each finding, create entry in appropriate folder:
|
|
48
|
+
- `.wiki/problems/` - Bug fixes, errors, gotchas, security issues
|
|
49
|
+
- `.wiki/solutions/` - Patterns, optimizations, test strategies, how-tos
|
|
50
|
+
- `.wiki/references/` - Documentation, guides, configs
|
|
51
|
+
|
|
52
|
+
### Folder Selection
|
|
53
|
+
|
|
54
|
+
| Source Type | Folder |
|
|
55
|
+
|-------------|--------|
|
|
56
|
+
| Error logs, bug fixes, git fix commits | problems/ |
|
|
57
|
+
| TODO/HACK comments about pitfalls | problems/ |
|
|
58
|
+
| Reusable code patterns | solutions/ |
|
|
59
|
+
| Test files, test strategies | solutions/ |
|
|
60
|
+
| README, docs/, guides | references/ |
|
|
61
|
+
| Config files, .env.example | references/ |
|
|
62
|
+
|
|
63
|
+
### Generate Entry
|
|
64
|
+
|
|
65
|
+
Use the fixed template for the target folder. See `docs/templates/`.
|
|
66
|
+
|
|
67
|
+
| Folder | Template Sections |
|
|
68
|
+
|--------|-------------------|
|
|
69
|
+
| `problems/` | Problem, Cause, Solution, Prevention, Related |
|
|
70
|
+
| `solutions/` | Overview, Prerequisites, Steps, Example, Related |
|
|
71
|
+
| `references/` | Summary, Details, Links, Related |
|
|
72
|
+
|
|
73
|
+
Write to `.wiki/<folder>/<slug>.md`
|
|
74
|
+
|
|
75
|
+
### Frontmatter Reference
|
|
55
76
|
|
|
56
77
|
Use this frontmatter:
|
|
57
78
|
```yaml
|
|
@@ -78,13 +99,9 @@ Do NOT output progress. Return ONLY:
|
|
|
78
99
|
|
|
79
100
|
```
|
|
80
101
|
Scan complete: X entries created
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
- testing: N
|
|
85
|
-
- docs: N
|
|
86
|
-
- security: N
|
|
87
|
-
- performance: N
|
|
102
|
+
- problems: N
|
|
103
|
+
- solutions: N
|
|
104
|
+
- references: N
|
|
88
105
|
```
|
|
89
106
|
|
|
90
107
|
## Important Rules
|
|
@@ -19,7 +19,7 @@ Input: `{ "mode": "search", "query": "<search query>" }`
|
|
|
19
19
|
|
|
20
20
|
Process:
|
|
21
21
|
1. Glob .wiki/**/*.md to find all entries
|
|
22
|
-
2. Read frontmatter (title, tags,
|
|
22
|
+
2. Read frontmatter (title, tags, folder, status, confidence, trigger)
|
|
23
23
|
3. Understand query intent, handle typos/synonyms
|
|
24
24
|
4. Rank by semantic relevance + confidence + maturity
|
|
25
25
|
5. Return top 5 results with explanations
|
|
@@ -38,7 +38,7 @@ Input: `{ "mode": "session-context", "taskDescription": "<task>", "filePaths": [
|
|
|
38
38
|
|
|
39
39
|
Process:
|
|
40
40
|
1. Analyze task description for keywords
|
|
41
|
-
2. Detect relevant
|
|
41
|
+
2. Detect relevant folders from file paths
|
|
42
42
|
3. Search for related entries
|
|
43
43
|
4. Return top 3 recommendations
|
|
44
44
|
|
|
@@ -48,8 +48,9 @@ Process:
|
|
|
48
48
|
```
|
|
49
49
|
Found X relevant entries:
|
|
50
50
|
|
|
51
|
-
1. **{title}** ({
|
|
51
|
+
1. **{title}** ({folder}, confidence: {n})
|
|
52
52
|
Path: {path}
|
|
53
|
+
Tags: {tags}
|
|
53
54
|
Why: {explanation}
|
|
54
55
|
|
|
55
56
|
2. ...
|
|
@@ -68,8 +69,9 @@ Found X relevant entries:
|
|
|
68
69
|
### Session Context
|
|
69
70
|
```
|
|
70
71
|
📚 Solvdex: {n} relevant entries
|
|
71
|
-
- {title} (
|
|
72
|
-
-
|
|
72
|
+
- {title} (problems/)
|
|
73
|
+
- {title} (solutions/)
|
|
74
|
+
- {title} (references/)
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
## Ranking Criteria
|
|
@@ -17,7 +17,7 @@ Key references:
|
|
|
17
17
|
- Entry frontmatter fields: `docs/schema.md#entry-frontmatter`
|
|
18
18
|
- Maturity rules: `docs/schema.md#maturity-rules`
|
|
19
19
|
- Confidence levels: `docs/schema.md#confidence-levels`
|
|
20
|
-
-
|
|
20
|
+
- Folders: `docs/schema.md#default-folders`
|
|
21
21
|
|
|
22
22
|
Calculate comprehensive wiki statistics and manage maturity tracking.
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ Calculate comprehensive wiki statistics and manage maturity tracking.
|
|
|
33
33
|
1. Glob .wiki/**/*.md
|
|
34
34
|
2. Read all entries
|
|
35
35
|
3. Calculate:
|
|
36
|
-
- Entry counts by
|
|
36
|
+
- Entry counts by folder, status, maturity
|
|
37
37
|
- Confidence distribution (high/medium/low)
|
|
38
38
|
- Usage stats (total uses, most used, never used)
|
|
39
39
|
- Staleness (entries not updated in 90+ days)
|
|
@@ -61,8 +61,7 @@ Calculate comprehensive wiki statistics and manage maturity tracking.
|
|
|
61
61
|
|
|
62
62
|
## Entries
|
|
63
63
|
Total: 24
|
|
64
|
-
|
|
65
|
-
testing: 3 | docs: 2 | security: 1
|
|
64
|
+
problems: 12 | solutions: 8 | references: 4
|
|
66
65
|
|
|
67
66
|
## By Status
|
|
68
67
|
Active: 20 | Flagged: 3 | Deprecated: 1
|
|
@@ -16,7 +16,7 @@ Key references:
|
|
|
16
16
|
- Entry frontmatter fields: `docs/schema.md#entry-frontmatter`
|
|
17
17
|
- Maturity rules: `docs/schema.md#maturity-rules`
|
|
18
18
|
- Confidence levels: `docs/schema.md#confidence-levels`
|
|
19
|
-
-
|
|
19
|
+
- Folders: `docs/schema.md#default-folders`
|
|
20
20
|
|
|
21
21
|
Validate wiki entries for quality and correctness.
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ Validate wiki entries for quality and correctness.
|
|
|
32
32
|
- **Required sections**: Problem, Solution present
|
|
33
33
|
- **No placeholders**: No TODO, FIXME, TBD in content
|
|
34
34
|
- **Valid wiki links**: [[entry]] format, target exists
|
|
35
|
-
- **Trigger syntax**: Valid regex (for
|
|
35
|
+
- **Trigger syntax**: Valid regex (for problems folder, optional)
|
|
36
36
|
- **Confidence/maturity match**: Confidence appropriate for maturity level
|
|
37
37
|
- **Tags present**: At least 1 tag
|
|
38
38
|
3. Categorize issues by severity
|
|
@@ -56,7 +56,7 @@ Passed: Y | Issues: Z
|
|
|
56
56
|
- Low confidence (30) for verified maturity
|
|
57
57
|
|
|
58
58
|
### [info] {path}
|
|
59
|
-
- No trigger pattern (
|
|
59
|
+
- No trigger pattern (problems folder)
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Severity Levels
|
|
@@ -79,11 +79,11 @@ Passed: Y | Issues: Z
|
|
|
79
79
|
- validated: confidence should be 85-100
|
|
80
80
|
|
|
81
81
|
### Trigger Patterns
|
|
82
|
-
-
|
|
83
|
-
- Trigger must be valid regex
|
|
82
|
+
- Problems folder: may have trigger pattern (optional)
|
|
83
|
+
- Trigger must be valid regex if present
|
|
84
84
|
|
|
85
85
|
### Wiki Links
|
|
86
|
-
- Format: [[
|
|
86
|
+
- Format: [[folder/entry-name]]
|
|
87
87
|
- Target entry must exist
|
|
88
88
|
|
|
89
89
|
### Tags
|
package/docs/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Solvdex Documentation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A universal problem-solving journal - auto-capture and retrieve knowledge across any domain.
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
@@ -8,36 +8,45 @@ Auto-capture and retrieve project knowledge across 7 domains.
|
|
|
8
8
|
|----------|-------------|
|
|
9
9
|
| [Getting Started](./getting-started.md) | Quick setup and first steps |
|
|
10
10
|
| [Architecture](./architecture.md) | System design and components |
|
|
11
|
+
| [Schema Reference](./schema.md) | Entry structure, validation rules, constants |
|
|
11
12
|
| [Workflows](./workflows.md) | How hooks and skills work together |
|
|
12
13
|
| [Use Cases](./use-cases.md) | Common scenarios and examples |
|
|
13
14
|
|
|
15
|
+
### Reference
|
|
16
|
+
|
|
17
|
+
| Document | Description |
|
|
18
|
+
|----------|-------------|
|
|
19
|
+
| [templates/problems.md](./templates/problems.md) | Template for problems folder |
|
|
20
|
+
| [templates/solutions.md](./templates/solutions.md) | Template for solutions folder |
|
|
21
|
+
| [templates/references.md](./templates/references.md) | Template for references folder |
|
|
22
|
+
|
|
14
23
|
## Quick Links
|
|
15
24
|
|
|
16
|
-
- **Skills:**
|
|
17
|
-
- **Hooks:**
|
|
18
|
-
- **
|
|
25
|
+
- **Skills:** 12 commands for wiki management
|
|
26
|
+
- **Hooks:** 3 automated triggers for capture and retrieval
|
|
27
|
+
- **Folders:** 3 universal folders (problems, solutions, references)
|
|
19
28
|
|
|
20
29
|
## Project Structure
|
|
21
30
|
|
|
22
31
|
```
|
|
23
32
|
solvdex/
|
|
24
|
-
├──
|
|
25
|
-
├── skills/ #
|
|
26
|
-
├──
|
|
27
|
-
├── hooks/ # Automated triggers (4)
|
|
33
|
+
├── agents/ # ALL logic lives here (8 agents)
|
|
34
|
+
├── skills/ # Thin wrappers (12 commands)
|
|
35
|
+
├── hooks/ # Agent-based hooks (3)
|
|
28
36
|
├── docs/ # Documentation (you are here)
|
|
37
|
+
│ ├── templates/ # Entry templates per folder
|
|
38
|
+
│ ├── diagrams/ # Architecture diagrams
|
|
29
39
|
│ └── plans/ # Planning docs
|
|
30
|
-
└── tests/ #
|
|
40
|
+
└── tests/ # Validation tests
|
|
31
41
|
```
|
|
32
42
|
|
|
33
43
|
## Version
|
|
34
44
|
|
|
35
|
-
Current:
|
|
45
|
+
Current: v3.0.0-alpha.1
|
|
36
46
|
|
|
37
47
|
## Quick Stats
|
|
38
48
|
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **3
|
|
43
|
-
- **7 categories** - Knowledge domains (issues, patterns, gotchas, testing, docs, security, performance)
|
|
49
|
+
- **12 skills** - CLI commands for wiki management
|
|
50
|
+
- **3 hooks** - Automated capture and retrieval
|
|
51
|
+
- **8 agents** - Specialized wiki operations
|
|
52
|
+
- **3 folders** - Universal organization (problems, solutions, references)
|
package/docs/architecture.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Solvdex system design and component overview.
|
|
4
4
|
|
|
5
|
-
**Version:**
|
|
5
|
+
**Version:** 3.0.0-alpha.1 - Universal Problem-Solving Journal
|
|
6
6
|
|
|
7
7
|
## System Overview
|
|
8
8
|
|
|
9
|
-
> **[View System Diagram](./diagrams/system-overview.md)**
|
|
9
|
+
> **[View System Diagram](./diagrams/system-overview.md)** | **[Schema Reference](./schema.md)** (source of truth for data types)
|
|
10
10
|
|
|
11
11
|
The system consists of three layers:
|
|
12
|
-
- **Skills (
|
|
12
|
+
- **Skills (12)**: Thin command wrappers with `agent:` field
|
|
13
13
|
- **Agents (8)**: All business logic in markdown files
|
|
14
|
-
- **Storage**: `.wiki/` directory with
|
|
14
|
+
- **Storage**: `.wiki/` directory with 3 universal folders
|
|
15
15
|
|
|
16
16
|
## Core Components
|
|
17
17
|
|
|
@@ -21,46 +21,38 @@ All business logic lives in agent markdown files. No TypeScript.
|
|
|
21
21
|
|
|
22
22
|
| Agent | Purpose | Tools |
|
|
23
23
|
|-------|---------|-------|
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
24
|
+
| `searcher` | Search entries, find solutions, recommendations | Glob, Read |
|
|
25
|
+
| `capture` | Extract problem/solution from conversations | Glob, Read, Write |
|
|
26
|
+
| `scanner` | Scan project and create stub entries | Bash, Read, Write, Grep, Glob |
|
|
27
|
+
| `validator` | Validate entry quality, check for issues | Glob, Read |
|
|
28
|
+
| `stats` | Calculate statistics, track maturity | Glob, Read, Write |
|
|
29
|
+
| `duplicate-checker` | Detect potential duplicate entries | Glob, Read |
|
|
30
|
+
| `health` | Analyze coverage gaps, find stale entries | Glob, Read |
|
|
31
|
+
| `graph` | Generate relationship diagrams (Mermaid) | Glob, Read |
|
|
32
32
|
|
|
33
|
-
**Agent Naming:** Agent names are derived from
|
|
33
|
+
**Agent Naming:** Agent names are derived from file names without extension (e.g., `agents/scanner.md` → agent name is `scanner`). Do NOT include a `name` field in agent frontmatter.
|
|
34
34
|
|
|
35
35
|
### 2. Skills (`skills/`) - Thin Wrappers
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
12 skills that delegate to agents via `agent:` frontmatter field:
|
|
38
38
|
|
|
39
39
|
**Core:**
|
|
40
|
-
- `wiki` - Main router
|
|
41
|
-
- `wiki-init` - Initialize wiki
|
|
42
|
-
- `wiki-add` -
|
|
43
|
-
- `wiki-search` - Search entries → `
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `wiki-
|
|
48
|
-
- `wiki-
|
|
49
|
-
- `wiki-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- `wiki-
|
|
53
|
-
- `wiki-
|
|
54
|
-
- `wiki-
|
|
55
|
-
|
|
56
|
-
**Transfer:**
|
|
57
|
-
- `wiki-export` - Export to JSON → `wiki-capture`
|
|
58
|
-
- `wiki-import` - Import from JSON → `wiki-capture`
|
|
59
|
-
- `wiki-test-trigger` - Test trigger patterns → `wiki-searcher`
|
|
60
|
-
|
|
61
|
-
**Search:**
|
|
62
|
-
- `wiki-explorer` - Deep search → `wiki-searcher`
|
|
63
|
-
- `wiki-capture` - Knowledge extraction → `wiki-capture`
|
|
40
|
+
- `wiki` - Main router → `searcher`
|
|
41
|
+
- `wiki-init` - Initialize wiki → `capture`
|
|
42
|
+
- `wiki-add` - Capture knowledge → `capture`
|
|
43
|
+
- `wiki-search` - Search/browse entries → `searcher`
|
|
44
|
+
|
|
45
|
+
**Analysis:**
|
|
46
|
+
- `wiki-stats` - Statistics (--quick for summary) → `stats`
|
|
47
|
+
- `wiki-health` - Health + validation (--validate) → `health`
|
|
48
|
+
- `wiki-scan` - Project scanning → `scanner`
|
|
49
|
+
- `wiki-graph` - Relationship diagrams → `graph`
|
|
50
|
+
|
|
51
|
+
**Entry Management:**
|
|
52
|
+
- `wiki-flag` - Flag for review → `validator`
|
|
53
|
+
- `wiki-fix` - Update flagged entry → `capture`
|
|
54
|
+
- `wiki-export` - Export to JSON → `capture`
|
|
55
|
+
- `wiki-import` - Import from JSON → `capture`
|
|
64
56
|
|
|
65
57
|
### 3. Hooks (`hooks/hooks.json`) - Prompt-Based
|
|
66
58
|
|
|
@@ -68,8 +60,8 @@ Hooks provide context prompts that guide Claude to use wiki agents when appropri
|
|
|
68
60
|
|
|
69
61
|
| Hook | Purpose | Agent Suggested |
|
|
70
62
|
|------|---------|-----------------|
|
|
71
|
-
| `SessionStart` |
|
|
72
|
-
| `Stop` | Capture knowledge after tasks | `
|
|
63
|
+
| `SessionStart` | Show entry count, hint to use `/wiki search` | (prompt-based) |
|
|
64
|
+
| `Stop` | Capture knowledge after tasks | `capture` |
|
|
73
65
|
|
|
74
66
|
No TypeScript hook files - all handled by `hooks.json` with prompt-based hints.
|
|
75
67
|
|
|
@@ -80,7 +72,7 @@ No TypeScript hook files - all handled by `hooks.json` with prompt-based hints.
|
|
|
80
72
|
> **[View Capture Flow Diagram](./diagrams/knowledge-capture-flow.md)**
|
|
81
73
|
|
|
82
74
|
1. User solves a problem
|
|
83
|
-
2. Stop hook triggers `
|
|
75
|
+
2. Stop hook triggers `capture` agent
|
|
84
76
|
3. Agent detects signals (error_resolved, user_confirmation, explicit_save)
|
|
85
77
|
4. Entry created in `.wiki/`
|
|
86
78
|
|
|
@@ -89,8 +81,8 @@ No TypeScript hook files - all handled by `hooks.json` with prompt-based hints.
|
|
|
89
81
|
> **[View Retrieval Flow Diagram](./diagrams/knowledge-retrieval-flow.md)**
|
|
90
82
|
|
|
91
83
|
1. User starts task or encounters error
|
|
92
|
-
2. Hook triggers `
|
|
93
|
-
3. Agent searches by keywords, triggers,
|
|
84
|
+
2. Hook triggers `searcher` agent
|
|
85
|
+
3. Agent searches by keywords, triggers, folder
|
|
94
86
|
4. Matching solutions displayed
|
|
95
87
|
|
|
96
88
|
## Entry Structure
|
|
@@ -124,7 +116,7 @@ audit: # Audit trail
|
|
|
124
116
|
...
|
|
125
117
|
|
|
126
118
|
# Related
|
|
127
|
-
- [[
|
|
119
|
+
- [[problems/related-bug]]
|
|
128
120
|
- `src/db/config.ts:45`
|
|
129
121
|
```
|
|
130
122
|
|
|
@@ -177,13 +169,11 @@ Penalties:
|
|
|
177
169
|
.wiki/
|
|
178
170
|
├── wiki.yaml # Global configuration
|
|
179
171
|
├── README.md # Wiki overview
|
|
180
|
-
├──
|
|
181
|
-
│ ├── _overview.md #
|
|
182
|
-
│ └── *.md #
|
|
183
|
-
├── patterns
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
├── security/
|
|
188
|
-
└── performance/
|
|
172
|
+
├── problems/ # What went wrong - bugs, errors, gotchas
|
|
173
|
+
│ ├── _overview.md # Folder overview
|
|
174
|
+
│ └── *.md # Problem entries
|
|
175
|
+
├── solutions/ # How to fix/do things - patterns, recipes
|
|
176
|
+
│ └── *.md # Solution entries
|
|
177
|
+
└── references/ # Things to remember - docs, configs
|
|
178
|
+
└── *.md # Reference entries
|
|
189
179
|
```
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
```mermaid
|
|
4
4
|
graph TB
|
|
5
5
|
subgraph CC["Claude Code"]
|
|
6
|
-
subgraph Skills["Skills (
|
|
6
|
+
subgraph Skills["Skills (12)"]
|
|
7
7
|
S1["/wiki search"]
|
|
8
8
|
S2["/wiki add"]
|
|
9
9
|
S3["/wiki health"]
|
|
@@ -18,24 +18,20 @@ graph TB
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
subgraph "Agents (8) - ALL LOGIC"
|
|
21
|
-
A1["
|
|
22
|
-
A2["
|
|
23
|
-
A3["
|
|
24
|
-
A4["
|
|
25
|
-
A5["
|
|
26
|
-
A6["
|
|
27
|
-
A7["
|
|
28
|
-
A8["
|
|
21
|
+
A1["searcher"]
|
|
22
|
+
A2["capture"]
|
|
23
|
+
A3["scanner"]
|
|
24
|
+
A4["validator"]
|
|
25
|
+
A5["stats"]
|
|
26
|
+
A6["health"]
|
|
27
|
+
A7["graph"]
|
|
28
|
+
A8["duplicate-checker"]
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
subgraph ".wiki/ Storage"
|
|
32
|
-
W1["
|
|
33
|
-
W2["
|
|
34
|
-
W3["
|
|
35
|
-
W4["testing/"]
|
|
36
|
-
W5["docs/"]
|
|
37
|
-
W6["security/"]
|
|
38
|
-
W7["performance/"]
|
|
32
|
+
W1["problems/"]
|
|
33
|
+
W2["solutions/"]
|
|
34
|
+
W3["references/"]
|
|
39
35
|
end
|
|
40
36
|
|
|
41
37
|
S1 --> A1
|
|
@@ -47,8 +43,9 @@ graph TB
|
|
|
47
43
|
H3 --> A2
|
|
48
44
|
|
|
49
45
|
A1 --> W1
|
|
50
|
-
A2 --> W1
|
|
51
|
-
A3 --> W1
|
|
52
46
|
A1 --> W2
|
|
47
|
+
A1 --> W3
|
|
48
|
+
A2 --> W1
|
|
53
49
|
A2 --> W2
|
|
50
|
+
A2 --> W3
|
|
54
51
|
```
|
|
@@ -5,7 +5,7 @@ erDiagram
|
|
|
5
5
|
WikiEntry ||--|| EntryFrontmatter : has
|
|
6
6
|
WikiEntry {
|
|
7
7
|
string path
|
|
8
|
-
string
|
|
8
|
+
string folder
|
|
9
9
|
string slug
|
|
10
10
|
string content
|
|
11
11
|
}
|
|
@@ -34,7 +34,7 @@ erDiagram
|
|
|
34
34
|
WikiConfig {
|
|
35
35
|
number version
|
|
36
36
|
string project
|
|
37
|
-
array
|
|
37
|
+
array folders
|
|
38
38
|
object auto_capture
|
|
39
39
|
object auto_lookup
|
|
40
40
|
object validation
|
|
@@ -5,14 +5,14 @@ sequenceDiagram
|
|
|
5
5
|
participant User
|
|
6
6
|
participant Claude as Claude Code
|
|
7
7
|
participant Hook as SessionStart Hook
|
|
8
|
-
participant Agent as
|
|
8
|
+
participant Agent as searcher
|
|
9
9
|
participant Wiki as .wiki/
|
|
10
10
|
|
|
11
11
|
User->>Claude: Starts task / encounters error
|
|
12
12
|
Claude->>Hook: Trigger lookup
|
|
13
13
|
Hook->>Agent: Search request
|
|
14
14
|
Agent->>Wiki: Query entries
|
|
15
|
-
Note over Agent: Search by:<br/>- keywords<br/>- trigger patterns<br/>-
|
|
15
|
+
Note over Agent: Search by:<br/>- keywords<br/>- trigger patterns<br/>- folder
|
|
16
16
|
Wiki-->>Agent: Matching entries
|
|
17
17
|
Agent-->>User: Display solutions
|
|
18
18
|
```
|
|
@@ -5,7 +5,7 @@ flowchart TD
|
|
|
5
5
|
START([START]) --> SessionStart
|
|
6
6
|
|
|
7
7
|
subgraph Session["Session Lifecycle"]
|
|
8
|
-
SessionStart["SessionStart Hook<br/>(
|
|
8
|
+
SessionStart["SessionStart Hook<br/>(shows entry count)"] --> |Wiki available| Suggestions["Display: Wiki has N entries"]
|
|
9
9
|
Suggestions --> UserPrompt["User Prompt"]
|
|
10
10
|
UserPrompt --> Processing["Claude Code Processing"]
|
|
11
11
|
Processing --> ToolExec["Tool Execution"]
|
|
@@ -24,7 +24,7 @@ flowchart TD
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
subgraph Capture["Knowledge Capture"]
|
|
27
|
-
StopHook["Stop Hook<br/>(prompt: use
|
|
27
|
+
StopHook["Stop Hook<br/>(prompt: use capture)"]
|
|
28
28
|
StopHook --> DetectSignals["Detect signals"]
|
|
29
29
|
DetectSignals --> |error_resolved| CaptureKnowledge
|
|
30
30
|
DetectSignals --> |user_confirmation| CaptureKnowledge
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
```mermaid
|
|
4
4
|
graph TB
|
|
5
5
|
subgraph CC["Claude Code"]
|
|
6
|
-
subgraph Skills["Skills (
|
|
6
|
+
subgraph Skills["Skills (12)"]
|
|
7
7
|
SK["Commands"]
|
|
8
8
|
end
|
|
9
9
|
subgraph Hooks["Hooks"]
|
|
@@ -12,24 +12,20 @@ graph TB
|
|
|
12
12
|
Skills --> Agents
|
|
13
13
|
Hooks --> Agents
|
|
14
14
|
subgraph Agents["8 Agents - ALL LOGIC"]
|
|
15
|
-
A1["
|
|
16
|
-
A2["
|
|
17
|
-
A3["
|
|
18
|
-
A4["
|
|
19
|
-
A5["
|
|
20
|
-
A6["
|
|
21
|
-
A7["
|
|
22
|
-
A8["
|
|
15
|
+
A1["searcher"]
|
|
16
|
+
A2["capture"]
|
|
17
|
+
A3["scanner"]
|
|
18
|
+
A4["validator"]
|
|
19
|
+
A5["stats"]
|
|
20
|
+
A6["health"]
|
|
21
|
+
A7["graph"]
|
|
22
|
+
A8["duplicate-checker"]
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
Agents --> Storage
|
|
26
26
|
subgraph Storage[".wiki/ Storage"]
|
|
27
|
-
S1["
|
|
28
|
-
S2["
|
|
29
|
-
S3["
|
|
30
|
-
S4["testing/"]
|
|
31
|
-
S5["docs/"]
|
|
32
|
-
S6["security/"]
|
|
33
|
-
S7["performance/"]
|
|
27
|
+
S1["problems/"]
|
|
28
|
+
S2["solutions/"]
|
|
29
|
+
S3["references/"]
|
|
34
30
|
end
|
|
35
31
|
```
|