@gabrywu/knowledge-bank 0.1.2-alpha.227 → 0.1.2-alpha.252

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 CHANGED
@@ -22,8 +22,10 @@ Knowledge Bank is a lightweight Claude Code plugin that transforms your developm
22
22
  ### Quick Setup
23
23
 
24
24
  ```bash
25
- # Clone the repository
25
+ # Install Knowledge Bank globally
26
26
  npm install -g @gabrywu/knowledge-bank --registry https://registry.npmjs.org
27
+ # For alpha/beta versions, use:
28
+ npm install -g @gabrywu/knowledge-bank@alpha --registry https://registry.npmjs.org
27
29
 
28
30
  # Install the Knowledge Bank plugin
29
31
  knowledge-bank install
@@ -9,7 +9,7 @@
9
9
  "name": "core",
10
10
  "source": "./core",
11
11
  "description": "Core plugins for knowledge bank",
12
- "version": "0.1.2-alpha.227",
12
+ "version": "0.1.2-alpha.252",
13
13
  "author": {
14
14
  "name": "garbywu",
15
15
  "email": "gabrywu@apache.org"
@@ -18,6 +18,6 @@
18
18
  ],
19
19
  "metadata": {
20
20
  "description": "A marketplace for knowledge bank plugins by gabrywu",
21
- "version": "0.1.2-alpha.227"
21
+ "version": "0.1.2-alpha.252"
22
22
  }
23
23
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core",
3
3
  "description": "Core plugins for knowledge bank",
4
- "version": "0.1.2-alpha.227",
4
+ "version": "0.1.2-alpha.252",
5
5
  "author": {
6
6
  "name": "garbywu",
7
7
  "email": "gabrywu@apache.org"
@@ -18,11 +18,22 @@ Every knowledge item MUST contain these essential elements:
18
18
  ### Knowledge Qualification Criteria
19
19
 
20
20
  Knowledge MUST meet ALL of the following requirements:
21
- - **Specific**: Tied to concrete files, patterns, or decisions in this project
21
+ - **Relevant**: Tied to concrete files/patterns in this project OR applicable to personal development principles
22
22
  - **Valuable**: Saves significant time/effort for future development work
23
23
  - **Non-obvious**: Not immediately apparent from reading code alone
24
24
  - **Actionable**: Provides clear guidance for developers
25
25
 
26
+ ## Knowledge Scope
27
+
28
+ Knowledge items are scoped based on their applicability:
29
+
30
+ - **Project Scope** (`project`): Knowledge that is specific to the current codebase, its architecture, unique patterns, and project-specific configurations.
31
+ - **Personal Scope** (`personal`): Knowledge that is:
32
+ - **General/Universal**: Broad technical insights or best practices.
33
+ - **Personal Preference**: Individual development styles, coding principles, or favored patterns.
34
+ - **Cross-Project**: Logic or workflows that can be reused across different projects.
35
+ - **Philosophical**: High-level development principles and decision-making frameworks.
36
+
26
37
  ## Knowledge Categories
27
38
 
28
39
  Knowledge items are classified into the following categories:
@@ -41,7 +52,7 @@ Automatically detect and flag knowledge for SIGNIFICANT technical insights:
41
52
  - Focus on substantial technical discoveries and problem-solving
42
53
  - Capture insights with clear developmental value
43
54
  - Balance quality and comprehensiveness
44
- - Prioritize project-specific, actionable knowledge
55
+ - Prioritize project-specific or universally valuable personal knowledge
45
56
 
46
57
  ### POSITIVE Triggers - Detect Knowledge When:
47
58
  - **Problem-Solving**: Solving bugs/issues requiring investigation
@@ -61,7 +72,7 @@ Automatically detect and flag knowledge for SIGNIFICANT technical insights:
61
72
  Apply this evaluation for every potential knowledge item:
62
73
  1. **Effort Assessment**: Did this require meaningful investigation or problem-solving?
63
74
  2. **Future Impact**: Will this knowledge help future development work?
64
- 3. **Project Specificity**: Is this tied to this project's unique characteristics?
75
+ 3. **Applicability**: Is this tied to this project's unique characteristics OR a valuable personal principle?
65
76
  4. **Non-obviousness**: Would this insight be difficult to derive from code alone?
66
77
 
67
78
  **Result**: If 3+ checks pass → FLAG for knowledge capture.
@@ -3,7 +3,7 @@ name: knowledge.add
3
3
  description: Add a new knowledge item to the knowledge base with automatic content generation from user instruction
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_create, knowledge_search, knowledge_list, Write(*/tmp/*), read
6
+ allowed-tools: knowledge_create, knowledge_search, knowledge_list, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -14,7 +14,7 @@ Add a new knowledge item to the knowledge base with automatic content generation
14
14
 
15
15
  ## Knowledge Definition Standards
16
16
 
17
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
17
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
18
18
  - Knowledge categories and types
19
19
  - Quality standards and criteria
20
20
  - Content structure requirements
@@ -3,7 +3,7 @@ name: knowledge.collect
3
3
  description: Intelligent knowledge management with CRUD operations and lifecycle management
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_create, knowledge_get, knowledge_update, knowledge_delete, knowledge_list, knowledge_search, knowledge_update_status, knowledge_stats, Write(**/.knowledge-bank/tmp/*.json), Bash
6
+ allowed-tools: knowledge_create, knowledge_get, knowledge_update, knowledge_delete, knowledge_list, knowledge_search, knowledge_update_status, knowledge_stats, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -22,12 +22,12 @@ Intelligent knowledge lifecycle management system that processes detected knowle
22
22
  ## File Parameter Configuration
23
23
 
24
24
  The MCP tools support file operations through `to` and `from` parameters:
25
- - **Filename Only**: Both `to` and `from` parameters accept only filenames (e.g., `knowledge-data.json`, `search-results.md`)
25
+ - **Filename Only**: Both `to` and `from` parameters accept only filenames (e.g., `knowledge-data.json`)
26
26
  - **Path Resolution**: The MCP tools automatically resolve the complete file paths and return them in responses
27
27
 
28
28
  ## Knowledge Definition Standards
29
29
 
30
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
30
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
31
31
  - Knowledge categories and types
32
32
  - Detection criteria and quality standards
33
33
  - Core knowledge elements and qualification criteria
@@ -79,7 +79,7 @@ Reason: [Brief explanation - e.g., "Routine operations without project-specific
79
79
 
80
80
  ## 2. Duplicate Detection & Conflict Resolution
81
81
 
82
- Before creating new knowledge, search for existing similar items using the `knowledge_search` tool from the `knowledge-bank-management` MCP server. Use the `to` parameter to save search results to a file for analysis. Note: The `to` parameter only contains the filename (e.g., `{knowledge title}.json` or `{knowledge title}.md`), not the full path. The MCP tool will return the complete file path after saving.
82
+ Before creating new knowledge, search for existing similar items using the `knowledge_search` tool from the `knowledge-bank-management` MCP server. Use the `to` parameter to save search results to a file for analysis. Note: The `to` parameter only contains the filename (e.g., `{knowledge title}.json`), not the full path. The MCP tool will return the complete file path after saving.
83
83
 
84
84
  **Decision Logic:**
85
85
  - **EXACT MATCH**: Update existing knowledge
@@ -127,7 +127,7 @@ To ensure reliability and handle large content, always use file-based operations
127
127
  - Use `knowledge_update` with the `from` parameter (filename only, e.g., `merged-knowledge.json`).
128
128
 
129
129
  ## Update Existing Knowledge
130
- 1. Use `knowledge_get` with the `to` parameter (filename only, e.g., `existing-knowledge.md`) to retrieve current data into a markdown/JSON file in !`npx knowledge-bank config -t`.
130
+ 1. Use `knowledge_get` with the `to` parameter (filename only, e.g., `existing-knowledge.json`) to retrieve current data into a markdown/JSON file in !`npx knowledge-bank config -t`.
131
131
  2. Merge new insights with the retrieved content.
132
132
  3. Write the merged data to a local JSON file in !`npx knowledge-bank config -t`.
133
133
  4. Use `knowledge_update` with the `from` parameter (filename only, e.g., `updated-knowledge.json`).
@@ -3,7 +3,7 @@ name: knowledge.delete
3
3
  description: Delete a specific knowledge item from the knowledge base
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_delete, knowledge_get, knowledge_search
6
+ allowed-tools: knowledge_delete, knowledge_get, knowledge_search, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -3,7 +3,7 @@ name: knowledge.enhance
3
3
  description: Search and inject relevant knowledge into current session based on user input
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_search, knowledge_list, knowledge_get, Write(*/tmp/*), Bash
6
+ allowed-tools: knowledge_search, knowledge_list, knowledge_get, Read, Write, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -22,12 +22,12 @@ Intelligent knowledge retrieval system that searches for relevant knowledge item
22
22
  ## File Parameter Configuration
23
23
 
24
24
  The MCP tools support file operations through the `to` parameter:
25
- - **Filename Only**: The `to` parameter accepts only filenames (e.g., `knowledge-search.json`, `relevant-context.md`)
25
+ - **Filename Only**: The `to` parameter accepts only filenames (e.g., `knowledge-search.json`)
26
26
  - **Path Resolution**: The MCP tools automatically resolve the complete file paths (specifically within the `tmp` directory) and return them in responses
27
27
 
28
28
  ## Knowledge Definition Standards
29
29
 
30
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
30
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
31
31
  - Knowledge categories and types
32
32
  - Search guidance and relevance criteria
33
33
  - Quality standards for knowledge retrieval
@@ -70,13 +70,21 @@ Use `knowledge_list` for type-specific knowledge retrieval with filters.
70
70
  - **Low Relevance**: Tangential knowledge for broader context
71
71
 
72
72
  ### Context Injection Format
73
- Retrieved knowledge should be saved to a temporary file using the `to` parameter in `knowledge_search` or `knowledge_list`. Use filename only (e.g., `{knowledge title}.md`) - the MCP tool will handle the complete path (resolving to the `tmp` directory) and return it. Then, present a summary and the file path:
73
+ Retrieved knowledge should be saved to a temporary file using the `to` parameter in `knowledge_search` or `knowledge_list`. Use filename only (e.g., `{knowledge title}.json`) - the MCP tool will handle the complete path (resolving to the `tmp` directory) and return it.
74
+
75
+ **Crucial:** After the MCP tool returns the `file_path`, you MUST use the `Read` tool to read the contents of that file.
76
+
77
+ Then, present the retrieved knowledge in the following format so it can be injected into the main session:
74
78
 
75
79
  ```
76
80
  🔍 RELEVANT KNOWLEDGE FOUND
77
81
 
78
82
  **Summary:** [Brief summary of the retrieved knowledge]
79
- **Storage:** Detailed knowledge items are stored in: [file_path]
83
+ **Storage:** [file_path]
84
+
85
+ <knowledge_content>
86
+ [Insert the FULL content of the file you just read here]
87
+ </knowledge_content>
80
88
  ```
81
89
 
82
90
  **Note:** The `to` parameter only contains the filename, not the full path. The MCP tool automatically resolves the complete file path and returns it after saving.
@@ -3,7 +3,7 @@ name: knowledge.import
3
3
  description: Import knowledge items from files or external sources
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_create, read, glob, Write(*/tmp/*)
6
+ allowed-tools: knowledge_create, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -14,7 +14,7 @@ Import knowledge items from external files (JSON, Markdown) or documentation dir
14
14
 
15
15
  ## Knowledge Definition Standards
16
16
 
17
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
17
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
18
18
  - Knowledge categories and types
19
19
  - Validation criteria and quality standards
20
20
  - Import format requirements
@@ -3,7 +3,7 @@ name: knowledge.init
3
3
  description: Initialize a comprehensive knowledge base by analyzing the entire codebase
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_create, knowledge_list, glob, read, Write(*/tmp/*)
6
+ allowed-tools: knowledge_create, knowledge_list, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -14,7 +14,7 @@ Analyzes the codebase structure, patterns, and key components to create foundati
14
14
 
15
15
  ## Knowledge Definition Standards
16
16
 
17
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
17
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
18
18
  - Knowledge categories and types
19
19
  - Quality standards for foundational knowledge
20
20
  - Comprehensive coverage criteria
@@ -3,7 +3,7 @@ name: knowledge.save
3
3
  description: Manually save knowledge from current conversation session to the knowledge base
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_create, knowledge_search, knowledge_update, knowledge_list, Write(*/tmp/*)
6
+ allowed-tools: knowledge_create, knowledge_search, knowledge_update, knowledge_list, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -14,7 +14,7 @@ Analyzes the current conversation session to identify and save valuable knowledg
14
14
 
15
15
  ## Knowledge Definition Standards
16
16
 
17
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
17
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
18
18
  - Knowledge categories and types
19
19
  - Quality criteria for valuable knowledge
20
20
  - Standards for extracting insights from conversations
@@ -3,7 +3,7 @@ name: knowledge.status
3
3
  description: Show knowledge collection status and statistics
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_stats, knowledge_list
6
+ allowed-tools: knowledge_stats, knowledge_list, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -3,7 +3,7 @@ name: knowledge.update
3
3
  description: Update existing knowledge items or create new ones based on current codebase analysis
4
4
  disable-model-invocation: false
5
5
  user-invocable: true
6
- allowed-tools: knowledge_update, knowledge_list, knowledge_search, knowledge_create, glob, read, Write(*/tmp/*)
6
+ allowed-tools: knowledge_update, knowledge_list, knowledge_search, knowledge_create, Write, Read, Bash
7
7
  context: fork
8
8
  agent: general-purpose
9
9
  ---
@@ -14,7 +14,7 @@ Synchronizes the knowledge base with the current state of the codebase by updati
14
14
 
15
15
  ## Knowledge Definition Standards
16
16
 
17
- **IMPORTANT:** Refer to [KNOWLEDGE-DEFINITION.md](../KNOWLEDGE-DEFINITION.md) for:
17
+ **IMPORTANT:** Refer to KNOWLEDGE-DEFINITION.md for:
18
18
  - Knowledge categories and types
19
19
  - Quality standards for updates
20
20
  - Criteria for creating new knowledge items