bc-code-intelligence-mcp 1.5.7 → 1.5.8

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.
Files changed (48) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +165 -165
  3. package/dist/layers/embedded-layer.js +29 -29
  4. package/dist/layers/project-layer.js +33 -33
  5. package/dist/services/knowledge-service.d.ts +1 -1
  6. package/dist/services/knowledge-service.d.ts.map +1 -1
  7. package/dist/services/knowledge-service.js +71 -3
  8. package/dist/services/knowledge-service.js.map +1 -1
  9. package/dist/services/methodology-service.js +14 -14
  10. package/dist/services/multi-content-layer-service.d.ts +15 -0
  11. package/dist/services/multi-content-layer-service.d.ts.map +1 -1
  12. package/dist/services/multi-content-layer-service.js +62 -0
  13. package/dist/services/multi-content-layer-service.js.map +1 -1
  14. package/dist/streamlined-handlers.d.ts +0 -7
  15. package/dist/streamlined-handlers.d.ts.map +1 -1
  16. package/dist/streamlined-handlers.js +80 -60
  17. package/dist/streamlined-handlers.js.map +1 -1
  18. package/dist/tools/core-tools.d.ts.map +1 -1
  19. package/dist/tools/core-tools.js +4 -0
  20. package/dist/tools/core-tools.js.map +1 -1
  21. package/dist/tools/onboarding-tools.d.ts +8 -0
  22. package/dist/tools/onboarding-tools.d.ts.map +1 -1
  23. package/dist/tools/onboarding-tools.js +111 -1
  24. package/dist/tools/onboarding-tools.js.map +1 -1
  25. package/embedded-knowledge/.github/ISSUE_TEMPLATE/bug-report.md +23 -23
  26. package/embedded-knowledge/.github/ISSUE_TEMPLATE/content-improvement.md +23 -23
  27. package/embedded-knowledge/.github/ISSUE_TEMPLATE/knowledge-request.md +29 -29
  28. package/embedded-knowledge/AGENTS.md +177 -177
  29. package/embedded-knowledge/CONTRIBUTING.md +57 -57
  30. package/embedded-knowledge/LICENSE +20 -20
  31. package/embedded-knowledge/README.md +31 -31
  32. package/embedded-knowledge/domains/shared/al-file-naming-conventions.md +145 -145
  33. package/embedded-knowledge/methodologies/index.json +80 -80
  34. package/embedded-knowledge/methodologies/phases/analysis-full.md +207 -207
  35. package/embedded-knowledge/methodologies/phases/analysis-quick.md +43 -43
  36. package/embedded-knowledge/methodologies/phases/analysis.md +181 -181
  37. package/embedded-knowledge/methodologies/phases/execution-validation-full.md +173 -173
  38. package/embedded-knowledge/methodologies/phases/execution-validation-quick.md +30 -30
  39. package/embedded-knowledge/methodologies/phases/execution-validation.md +173 -173
  40. package/embedded-knowledge/methodologies/phases/performance-full.md +210 -210
  41. package/embedded-knowledge/methodologies/phases/performance-quick.md +31 -31
  42. package/embedded-knowledge/methodologies/phases/performance.md +210 -210
  43. package/embedded-knowledge/methodologies/phases/verification-full.md +161 -161
  44. package/embedded-knowledge/methodologies/phases/verification-quick.md +47 -47
  45. package/embedded-knowledge/methodologies/phases/verification.md +145 -145
  46. package/embedded-knowledge/methodologies/workflow-enforcement.md +141 -141
  47. package/embedded-knowledge/methodologies/workflows/code-review-workflow.md +98 -98
  48. package/package.json +81 -81
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Business Central Knowledge Base
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
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Business Central Knowledge Base
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
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,165 +1,165 @@
1
- # BC Code Intelligence MCP Server
2
-
3
- [![Install with NPX in VS Code](https://img.shields.io/badge/Install%20with%20NPX-VS%20Code-blue?style=for-the-badge&logo=visual-studio-code)](https://vscode.dev/redirect/mcp/install?name=bc-code-intel&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22bc-code-intelligence-mcp%22%5D%7D)
4
- [![Installation Guide](https://img.shields.io/badge/Installation%20Guide-All%20Platforms-green?style=for-the-badge&logo=github)](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide)
5
-
6
- **Get instant help from AI Business Central experts** right in your favorite AI tool. No more searching docs - just ask and get expert guidance tailored to your specific BC development challenges.
7
-
8
- ---
9
-
10
- ## 🚀 Quick Start
11
-
12
- 1. **Click the blue "Install with NPX" button above** (VS Code users)
13
- 2. **Switch to Agent Mode** in VS Code's Copilot Chat
14
- 3. **Just ask!** - Start with any prompt below
15
-
16
- > **Other platforms?** See the [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) for Claude Desktop, Cursor, and more.
17
-
18
- ---
19
-
20
- ## 🤝 New to AI-Assisted Development? Start with Parker
21
-
22
- If you're not sure how to work with AI tools, or you're skeptical about letting AI touch your code—**that's exactly why Parker exists**.
23
-
24
- Parker is a grizzled veteran who helps you work WITH AI safely:
25
- - Creates **reviewable proposals** instead of making direct changes
26
- - **Explains AI reasoning** so you understand what's happening and why
27
- - **Coordinates other specialists** to validate suggestions before you commit
28
- - Builds trust **gradually** through transparency and verification
29
-
30
- **Just say:**
31
- - "Parker, I'm new to AI development tools. Help me understand how this works."
32
- - "Parker, I don't trust AI to write my code. What's a safe way to start?"
33
- - "Parker, review what the AI just suggested before I accept it."
34
-
35
- Once you're comfortable, you can work directly with any specialist—but Parker's always there when you want that extra layer of verification and explanation.
36
-
37
- ---
38
-
39
- ## 💬 Just Ask - Example Prompts
40
-
41
- The BC Code Intelligence specialists are ready to help. Just type naturally - here are some examples:
42
-
43
- ### 🔍 Debugging & Performance (Dean)
44
- - "Dean, help me debug this error: 'The record in table Customer already exists'"
45
- - "I'm seeing slow performance when posting sales orders. Can Dean take a look?"
46
- - "Ask Dean why my FlowField is always showing zero"
47
-
48
- ### 🏛️ Legacy Code & Upgrades (Logan)
49
- - "Logan, I need to upgrade my extension from BC v24 to v27"
50
- - "I inherited this old extension - can Logan help me understand what it does?"
51
- - "Help me modernize this C/AL-style code to proper AL patterns"
52
-
53
- ### 🏗️ Architecture & Design (Alex)
54
- - "Alex, review my extension's architecture before I submit to AppSource"
55
- - "I need to design an integration with an external warehouse system"
56
- - "What's the best way to structure a multi-company solution?"
57
-
58
- ### 💻 Coding & Implementation (Sam)
59
- - "Sam, help me write a function to calculate weighted average cost"
60
- - "I need to create a FactBox that shows related sales history"
61
- - "Show me the best way to implement a posting routine"
62
-
63
- ### 🧪 Testing & Quality (Quinn)
64
- - "Quinn, help me create test coverage for my posting codeunit"
65
- - "What test scenarios should I include for this validation?"
66
- - "Review my test codeunit for completeness"
67
-
68
- ### 📝 Code Review (Roger)
69
- - "Roger, review this codeunit for best practices"
70
- - "Check if my code follows BC naming conventions"
71
- - "Are there any code smells in my Customer Card extension?"
72
-
73
- ### 🔒 Security (Seth)
74
- - "Seth, review my permission sets for security issues"
75
- - "How should I handle user permissions for this sensitive data?"
76
- - "Check if my API is exposing too much information"
77
-
78
- ### 🌉 Integration & Events (Jordan)
79
- - "Jordan, help me design an event-driven integration"
80
- - "What's the best way to subscribe to posting events?"
81
- - "How do I create a clean API for external systems?"
82
-
83
- ### ⚠️ Error Handling (Eva)
84
- - "Eva, help me implement proper error handling for this process"
85
- - "What's the best way to validate user input before posting?"
86
- - "Review my Try/Catch implementation"
87
-
88
- ### 🎨 User Experience (Uma)
89
- - "Uma, help me improve my page layout for better usability"
90
- - "Can we switch from simple Error calls in this app to ErrorInfo with suggested actions?"
91
- - "Review my action menu structure"
92
-
93
- ### 🏪 AppSource & ISV (Morgan)
94
- - "Morgan, help me prepare my app for AppSource submission"
95
- - "What are the common AppSource validation failures?"
96
- - "Review my app's technical baseline for AppSource"
97
-
98
- ### 👩‍🏫 Learning & Mentoring (Maya)
99
- - "Maya, explain how dimensions work in BC"
100
- - "I'm new to AL - help me understand events and subscribers"
101
- - "Walk me through how posting routines work"
102
-
103
- ### 📚 Documentation (Taylor)
104
- - "Taylor, help me document this complex codeunit"
105
- - "Generate XML documentation for my public procedures"
106
- - "Review my app's README for completeness"
107
-
108
- ### 🤖 AI-Assisted Development (Casey)
109
- - "Casey, help me use AI tools effectively in my BC development"
110
- - "Based on this current project, what are some good instructions to help future agents understand working with this app immediately?"
111
-
112
- ---
113
-
114
- ## 👥 Meet Your BC Specialist Team
115
-
116
- | Specialist | Expertise | Best For |
117
- |------------|-----------|----------|
118
- | **🤝 Parker** | AI Trust & Transparency | New to AI tools, safe collaboration, verification-first |
119
- | **🏗️ Alex** | Architecture & Design | Solution design, extension structure, integration patterns |
120
- | **💻 Sam** | Expert Coder | Writing AL code, implementation patterns, coding questions |
121
- | **🔍 Dean** | Debugging & Performance | Errors, slow queries, troubleshooting |
122
- | **⚠️ Eva** | Error Handling | Validation, Try/Catch, error messages |
123
- | **🧪 Quinn** | Testing | Test codeunits, test scenarios, code coverage |
124
- | **📝 Roger** | Code Review | Best practices, naming conventions, code quality |
125
- | **🔒 Seth** | Security | Permissions, data protection, API security |
126
- | **🌉 Jordan** | Integration | APIs, events, external connections |
127
- | **🏛️ Logan** | Legacy & Upgrades | Version migrations, old code, modernization |
128
- | **🎨 Uma** | User Experience | Page design, usability, UI patterns |
129
- | **🏪 Morgan** | AppSource & ISV | Publishing, validation, business concerns |
130
- | **👩‍🏫 Maya** | Mentoring | Learning concepts, explanations, training |
131
- | **📚 Taylor** | Documentation | Code docs, READMEs, knowledge sharing |
132
- | **🤖 Casey** | AI Development | Using AI tools, prompt engineering |
133
- | **⚙️ Chris** | MCP Configuiration | Company/Project MCP knowledge layer help|
134
-
135
- ---
136
-
137
- ## 📚 Learn More
138
-
139
- | Topic | Link |
140
- |-------|------|
141
- | **Full Installation Options** | [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) |
142
- | **Common Scenarios** | [Usage Patterns](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Common-Scenarios) |
143
- | **All MCP Tools** | [Tools Reference](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/MCP-Tools-Reference) |
144
- | **Company Standards** | [Enterprise Configuration](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Enterprise-Configuration) |
145
- | **Structured Workflows** | [Methodology Framework](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Methodology-Framework) |
146
- | **Troubleshooting** | [Common Issues](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Troubleshooting) |
147
-
148
- ---
149
-
150
- ## 💡 Tips
151
-
152
- - **Just use first names** - "Ask Dean" works just as well as "Ask Dean Debug"
153
- - **Be specific** - Include error messages, code snippets, or version numbers when relevant
154
- - **Specialists collaborate** - They'll hand off to each other when needed
155
- - **Context carries over** - Continue conversations naturally
156
-
157
- ---
158
-
159
- ## 🤝 Contributing
160
-
161
- See the [Contributing Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Contributing-Guide) for how to contribute to this project.
162
-
163
- ## 📄 License
164
-
165
- MIT License - see [LICENSE](LICENSE) for details.
1
+ # BC Code Intelligence MCP Server
2
+
3
+ [![Install with NPX in VS Code](https://img.shields.io/badge/Install%20with%20NPX-VS%20Code-blue?style=for-the-badge&logo=visual-studio-code)](https://vscode.dev/redirect/mcp/install?name=bc-code-intel&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22bc-code-intelligence-mcp%22%5D%7D)
4
+ [![Installation Guide](https://img.shields.io/badge/Installation%20Guide-All%20Platforms-green?style=for-the-badge&logo=github)](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide)
5
+
6
+ **Get instant help from AI Business Central experts** right in your favorite AI tool. No more searching docs - just ask and get expert guidance tailored to your specific BC development challenges.
7
+
8
+ ---
9
+
10
+ ## 🚀 Quick Start
11
+
12
+ 1. **Click the blue "Install with NPX" button above** (VS Code users)
13
+ 2. **Switch to Agent Mode** in VS Code's Copilot Chat
14
+ 3. **Just ask!** - Start with any prompt below
15
+
16
+ > **Other platforms?** See the [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) for Claude Desktop, Cursor, and more.
17
+
18
+ ---
19
+
20
+ ## 🤝 New to AI-Assisted Development? Start with Parker
21
+
22
+ If you're not sure how to work with AI tools, or you're skeptical about letting AI touch your code—**that's exactly why Parker exists**.
23
+
24
+ Parker is a grizzled veteran who helps you work WITH AI safely:
25
+ - Creates **reviewable proposals** instead of making direct changes
26
+ - **Explains AI reasoning** so you understand what's happening and why
27
+ - **Coordinates other specialists** to validate suggestions before you commit
28
+ - Builds trust **gradually** through transparency and verification
29
+
30
+ **Just say:**
31
+ - "Parker, I'm new to AI development tools. Help me understand how this works."
32
+ - "Parker, I don't trust AI to write my code. What's a safe way to start?"
33
+ - "Parker, review what the AI just suggested before I accept it."
34
+
35
+ Once you're comfortable, you can work directly with any specialist—but Parker's always there when you want that extra layer of verification and explanation.
36
+
37
+ ---
38
+
39
+ ## 💬 Just Ask - Example Prompts
40
+
41
+ The BC Code Intelligence specialists are ready to help. Just type naturally - here are some examples:
42
+
43
+ ### 🔍 Debugging & Performance (Dean)
44
+ - "Dean, help me debug this error: 'The record in table Customer already exists'"
45
+ - "I'm seeing slow performance when posting sales orders. Can Dean take a look?"
46
+ - "Ask Dean why my FlowField is always showing zero"
47
+
48
+ ### 🏛️ Legacy Code & Upgrades (Logan)
49
+ - "Logan, I need to upgrade my extension from BC v24 to v27"
50
+ - "I inherited this old extension - can Logan help me understand what it does?"
51
+ - "Help me modernize this C/AL-style code to proper AL patterns"
52
+
53
+ ### 🏗️ Architecture & Design (Alex)
54
+ - "Alex, review my extension's architecture before I submit to AppSource"
55
+ - "I need to design an integration with an external warehouse system"
56
+ - "What's the best way to structure a multi-company solution?"
57
+
58
+ ### 💻 Coding & Implementation (Sam)
59
+ - "Sam, help me write a function to calculate weighted average cost"
60
+ - "I need to create a FactBox that shows related sales history"
61
+ - "Show me the best way to implement a posting routine"
62
+
63
+ ### 🧪 Testing & Quality (Quinn)
64
+ - "Quinn, help me create test coverage for my posting codeunit"
65
+ - "What test scenarios should I include for this validation?"
66
+ - "Review my test codeunit for completeness"
67
+
68
+ ### 📝 Code Review (Roger)
69
+ - "Roger, review this codeunit for best practices"
70
+ - "Check if my code follows BC naming conventions"
71
+ - "Are there any code smells in my Customer Card extension?"
72
+
73
+ ### 🔒 Security (Seth)
74
+ - "Seth, review my permission sets for security issues"
75
+ - "How should I handle user permissions for this sensitive data?"
76
+ - "Check if my API is exposing too much information"
77
+
78
+ ### 🌉 Integration & Events (Jordan)
79
+ - "Jordan, help me design an event-driven integration"
80
+ - "What's the best way to subscribe to posting events?"
81
+ - "How do I create a clean API for external systems?"
82
+
83
+ ### ⚠️ Error Handling (Eva)
84
+ - "Eva, help me implement proper error handling for this process"
85
+ - "What's the best way to validate user input before posting?"
86
+ - "Review my Try/Catch implementation"
87
+
88
+ ### 🎨 User Experience (Uma)
89
+ - "Uma, help me improve my page layout for better usability"
90
+ - "Can we switch from simple Error calls in this app to ErrorInfo with suggested actions?"
91
+ - "Review my action menu structure"
92
+
93
+ ### 🏪 AppSource & ISV (Morgan)
94
+ - "Morgan, help me prepare my app for AppSource submission"
95
+ - "What are the common AppSource validation failures?"
96
+ - "Review my app's technical baseline for AppSource"
97
+
98
+ ### 👩‍🏫 Learning & Mentoring (Maya)
99
+ - "Maya, explain how dimensions work in BC"
100
+ - "I'm new to AL - help me understand events and subscribers"
101
+ - "Walk me through how posting routines work"
102
+
103
+ ### 📚 Documentation (Taylor)
104
+ - "Taylor, help me document this complex codeunit"
105
+ - "Generate XML documentation for my public procedures"
106
+ - "Review my app's README for completeness"
107
+
108
+ ### 🤖 AI-Assisted Development (Casey)
109
+ - "Casey, help me use AI tools effectively in my BC development"
110
+ - "Based on this current project, what are some good instructions to help future agents understand working with this app immediately?"
111
+
112
+ ---
113
+
114
+ ## 👥 Meet Your BC Specialist Team
115
+
116
+ | Specialist | Expertise | Best For |
117
+ |------------|-----------|----------|
118
+ | **🤝 Parker** | AI Trust & Transparency | New to AI tools, safe collaboration, verification-first |
119
+ | **🏗️ Alex** | Architecture & Design | Solution design, extension structure, integration patterns |
120
+ | **💻 Sam** | Expert Coder | Writing AL code, implementation patterns, coding questions |
121
+ | **🔍 Dean** | Debugging & Performance | Errors, slow queries, troubleshooting |
122
+ | **⚠️ Eva** | Error Handling | Validation, Try/Catch, error messages |
123
+ | **🧪 Quinn** | Testing | Test codeunits, test scenarios, code coverage |
124
+ | **📝 Roger** | Code Review | Best practices, naming conventions, code quality |
125
+ | **🔒 Seth** | Security | Permissions, data protection, API security |
126
+ | **🌉 Jordan** | Integration | APIs, events, external connections |
127
+ | **🏛️ Logan** | Legacy & Upgrades | Version migrations, old code, modernization |
128
+ | **🎨 Uma** | User Experience | Page design, usability, UI patterns |
129
+ | **🏪 Morgan** | AppSource & ISV | Publishing, validation, business concerns |
130
+ | **👩‍🏫 Maya** | Mentoring | Learning concepts, explanations, training |
131
+ | **📚 Taylor** | Documentation | Code docs, READMEs, knowledge sharing |
132
+ | **🤖 Casey** | AI Development | Using AI tools, prompt engineering |
133
+ | **⚙️ Chris** | MCP Configuiration | Company/Project MCP knowledge layer help|
134
+
135
+ ---
136
+
137
+ ## 📚 Learn More
138
+
139
+ | Topic | Link |
140
+ |-------|------|
141
+ | **Full Installation Options** | [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) |
142
+ | **Common Scenarios** | [Usage Patterns](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Common-Scenarios) |
143
+ | **All MCP Tools** | [Tools Reference](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/MCP-Tools-Reference) |
144
+ | **Company Standards** | [Enterprise Configuration](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Enterprise-Configuration) |
145
+ | **Structured Workflows** | [Methodology Framework](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Methodology-Framework) |
146
+ | **Troubleshooting** | [Common Issues](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Troubleshooting) |
147
+
148
+ ---
149
+
150
+ ## 💡 Tips
151
+
152
+ - **Just use first names** - "Ask Dean" works just as well as "Ask Dean Debug"
153
+ - **Be specific** - Include error messages, code snippets, or version numbers when relevant
154
+ - **Specialists collaborate** - They'll hand off to each other when needed
155
+ - **Context carries over** - Continue conversations naturally
156
+
157
+ ---
158
+
159
+ ## 🤝 Contributing
160
+
161
+ See the [Contributing Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Contributing-Guide) for how to contribute to this project.
162
+
163
+ ## 📄 License
164
+
165
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -37,20 +37,20 @@ export class EmbeddedKnowledgeLayer extends BaseKnowledgeLayer {
37
37
  console.error(`Initializing ${this.name} layer from ${this.embeddedPath}...`);
38
38
  // Early validation: Check if embedded knowledge directory exists and has content
39
39
  if (!existsSync(this.embeddedPath)) {
40
- throw new Error(`
41
- 🚨 BC Code Intelligence MCP Server Setup Issue
42
-
43
- PROBLEM: Embedded knowledge directory not found
44
- PATH: ${this.embeddedPath}
45
-
46
- LIKELY CAUSE: The git submodule 'embedded-knowledge' was not initialized when this package was built/installed.
47
-
48
- SOLUTIONS:
49
- 📦 For NPM users: Update to the latest version with: npm update bc-code-intelligence-mcp
50
- 🔧 For developers: Run: git submodule init && git submodule update
51
- 🏢 For package maintainers: Ensure submodules are initialized before npm publish
52
-
53
- The embedded-knowledge directory should contain BC expertise (domains/ or topics/, specialists/, methodologies/) required for the MCP server to function.
40
+ throw new Error(`
41
+ 🚨 BC Code Intelligence MCP Server Setup Issue
42
+
43
+ PROBLEM: Embedded knowledge directory not found
44
+ PATH: ${this.embeddedPath}
45
+
46
+ LIKELY CAUSE: The git submodule 'embedded-knowledge' was not initialized when this package was built/installed.
47
+
48
+ SOLUTIONS:
49
+ 📦 For NPM users: Update to the latest version with: npm update bc-code-intelligence-mcp
50
+ 🔧 For developers: Run: git submodule init && git submodule update
51
+ 🏢 For package maintainers: Ensure submodules are initialized before npm publish
52
+
53
+ The embedded-knowledge directory should contain BC expertise (domains/ or topics/, specialists/, methodologies/) required for the MCP server to function.
54
54
  `.trim());
55
55
  }
56
56
  // Check if directory has the expected structure (domains/ or topics/ are both valid)
@@ -66,21 +66,21 @@ The embedded-knowledge directory should contain BC expertise (domains/ or topics
66
66
  if (!hasMethodologies)
67
67
  missingDirs.push('methodologies');
68
68
  if (missingDirs.length > 0) {
69
- throw new Error(`
70
- 🚨 BC Code Intelligence MCP Server Setup Issue
71
-
72
- PROBLEM: Incomplete embedded knowledge structure
73
- PATH: ${this.embeddedPath}
74
- MISSING: ${missingDirs.join(', ')}
75
-
76
- LIKELY CAUSE: The embedded-knowledge submodule is present but incomplete or corrupted.
77
-
78
- SOLUTIONS:
79
- 📦 For NPM users: Update to the latest version with: npm update bc-code-intelligence-mcp
80
- 🔧 For developers: Run: git submodule update --remote --force
81
- 🏢 For package maintainers: Verify submodule content before npm publish
82
-
83
- Expected structure: (domains/ or topics/), specialists/, methodologies/ directories with BC expertise content.
69
+ throw new Error(`
70
+ 🚨 BC Code Intelligence MCP Server Setup Issue
71
+
72
+ PROBLEM: Incomplete embedded knowledge structure
73
+ PATH: ${this.embeddedPath}
74
+ MISSING: ${missingDirs.join(', ')}
75
+
76
+ LIKELY CAUSE: The embedded-knowledge submodule is present but incomplete or corrupted.
77
+
78
+ SOLUTIONS:
79
+ 📦 For NPM users: Update to the latest version with: npm update bc-code-intelligence-mcp
80
+ 🔧 For developers: Run: git submodule update --remote --force
81
+ 🏢 For package maintainers: Verify submodule content before npm publish
82
+
83
+ Expected structure: (domains/ or topics/), specialists/, methodologies/ directories with BC expertise content.
84
84
  `.trim());
85
85
  }
86
86
  // Load topics, specialists, and indexes in parallel
@@ -247,39 +247,39 @@ export class ProjectKnowledgeLayer extends BaseKnowledgeLayer {
247
247
  * Create a sample project override structure
248
248
  */
249
249
  static generateSampleStructure() {
250
- return `
251
- bckb-overrides/
252
- ├── domains/
253
- │ ├── performance/
254
- │ │ └── al-performance-optimization.md # Override embedded topic
255
- │ └── custom-domain/
256
- │ └── company-specific-pattern.md # New company-specific topic
257
- ├── indexes/
258
- │ └── company-standards.json # Company-specific standards
259
- └── README.md # Documentation for overrides
260
-
261
- Example override topic (bckb-overrides/domains/performance/al-performance-optimization.md):
262
- ---
263
- title: "AL Performance Optimization - Company Standards"
264
- domain: "performance"
265
- difficulty: "intermediate"
266
- bc_versions: "14+"
267
- tags: ["performance", "sift", "company-standard"]
268
- related_topics: ["database-optimization", "query-patterns"]
269
- ---
270
-
271
- # AL Performance Optimization - Company Standards
272
-
273
- This topic overrides the standard performance optimization guidance with
274
- company-specific requirements and standards.
275
-
276
- ## Company Requirements
277
-
278
- - All queries must use SetLoadFields
279
- - SIFT optimization is mandatory for all reporting
280
- - Performance testing required for all table operations
281
-
282
- [Company-specific content here...]
250
+ return `
251
+ bckb-overrides/
252
+ ├── domains/
253
+ │ ├── performance/
254
+ │ │ └── al-performance-optimization.md # Override embedded topic
255
+ │ └── custom-domain/
256
+ │ └── company-specific-pattern.md # New company-specific topic
257
+ ├── indexes/
258
+ │ └── company-standards.json # Company-specific standards
259
+ └── README.md # Documentation for overrides
260
+
261
+ Example override topic (bckb-overrides/domains/performance/al-performance-optimization.md):
262
+ ---
263
+ title: "AL Performance Optimization - Company Standards"
264
+ domain: "performance"
265
+ difficulty: "intermediate"
266
+ bc_versions: "14+"
267
+ tags: ["performance", "sift", "company-standard"]
268
+ related_topics: ["database-optimization", "query-patterns"]
269
+ ---
270
+
271
+ # AL Performance Optimization - Company Standards
272
+
273
+ This topic overrides the standard performance optimization guidance with
274
+ company-specific requirements and standards.
275
+
276
+ ## Company Requirements
277
+
278
+ - All queries must use SetLoadFields
279
+ - SIFT optimization is mandatory for all reporting
280
+ - Performance testing required for all table operations
281
+
282
+ [Company-specific content here...]
283
283
  `.trim();
284
284
  }
285
285
  }
@@ -25,7 +25,7 @@ export declare class KnowledgeService {
25
25
  /**
26
26
  * Get a specific topic by ID with layer resolution
27
27
  */
28
- getTopic(topicId: string, includeSamples?: boolean): Promise<AtomicTopic | null>;
28
+ getTopic(topicId: string, includeSamples?: boolean, contextDomain?: string): Promise<AtomicTopic | null>;
29
29
  /**
30
30
  * Get topic relationships and learning paths from layers
31
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"knowledge-service.d.ts","sourceRoot":"","sources":["../../src/services/knowledge-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EAGX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAIf,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAS;gBAER,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,wBAAwB;IAgB/E;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAoCjC,OAAO,CAAC,aAAa;IAsBrB;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAU3E;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,UAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAkBpF;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,MAAM;IAsB3C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAa5B;;OAEG;YACW,mBAAmB;IA6BjC;;OAEG;IACG,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAkB5D;;OAEG;IACH,aAAa;;;;;;;;;;IAyBb;;OAEG;IACG,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAmB9G;;;OAGG;IA+BH;;OAEG;IACH;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAS1D;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IASjF;;OAEG;IACG,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAW3D;;;OAGG;IAOH;;OAEG;IACH,OAAO,CAAC,2BAA2B;CAqCpC"}
1
+ {"version":3,"file":"knowledge-service.d.ts","sourceRoot":"","sources":["../../src/services/knowledge-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EAGX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAIf,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAS;gBAER,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,wBAAwB;IAgB/E;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAoCjC,OAAO,CAAC,aAAa;IAsBrB;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAU3E;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,UAAQ,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IA4F5G;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,MAAM;IAsB3C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAa5B;;OAEG;YACW,mBAAmB;IA6BjC;;OAEG;IACG,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAkB5D;;OAEG;IACH,aAAa;;;;;;;;;;IAyBb;;OAEG;IACG,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAmB9G;;;OAGG;IA+BH;;OAEG;IACH;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAS1D;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IASjF;;OAEG;IACG,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAW3D;;;OAGG;IAOH;;OAEG;IACH,OAAO,CAAC,2BAA2B;CAqCpC"}
@@ -93,14 +93,82 @@ export class KnowledgeService {
93
93
  /**
94
94
  * Get a specific topic by ID with layer resolution
95
95
  */
96
- async getTopic(topicId, includeSamples = false) {
96
+ async getTopic(topicId, includeSamples = false, contextDomain) {
97
97
  if (!this.initialized) {
98
98
  await this.initialize();
99
99
  }
100
100
  // Resolve topic through layer system
101
101
  const resolution = await this.layerService.resolveTopic(topicId);
102
- if (!resolution)
103
- return null;
102
+ if (!resolution) {
103
+ // If exact match fails, suggest similar topics
104
+ const suggestions = await this.layerService.findPartialTopicMatches(topicId);
105
+ if (suggestions.length > 0) {
106
+ const error = {
107
+ error: 'Topic not found',
108
+ message: `Topic ID '${topicId}' not found. Did you mean one of these?`,
109
+ suggestions: suggestions.map(s => ({
110
+ topic_id: s.id,
111
+ title: s.title,
112
+ domain: s.domain
113
+ }))
114
+ };
115
+ // Return error object disguised as a topic for better UX
116
+ return error;
117
+ }
118
+ // No partial matches found - try to extract domain from topic_id and show domain topics
119
+ const domainMatch = topicId.match(/^([^/]+)\//);
120
+ if (domainMatch) {
121
+ const domain = domainMatch[1];
122
+ const domainTopics = await this.layerService.getTopicsByDomain(domain);
123
+ if (domainTopics.length > 0) {
124
+ return {
125
+ error: 'Topic not found',
126
+ message: `Topic ID '${topicId}' not found in domain '${domain}'. Available topics in this domain:`,
127
+ available_topics: domainTopics.map(t => ({
128
+ topic_id: t.id,
129
+ title: t.title
130
+ }))
131
+ };
132
+ }
133
+ }
134
+ // If we have context domain (from active specialist), show topics from that domain
135
+ if (contextDomain) {
136
+ const domainTopics = await this.layerService.getTopicsByDomain(contextDomain);
137
+ if (domainTopics.length > 0) {
138
+ return {
139
+ error: 'Topic not found',
140
+ message: `Topic ID '${topicId}' not found. Available topics in '${contextDomain}' domain:`,
141
+ available_topics: domainTopics.map(t => ({
142
+ topic_id: t.id,
143
+ title: t.title
144
+ })),
145
+ hint: `You are currently working with the '${contextDomain}' specialist. Use full topic IDs like '${contextDomain}/topic-name'`
146
+ };
147
+ }
148
+ }
149
+ // Last resort: show topics grouped by domain for easy navigation
150
+ const allTopicIds = this.layerService.getAllTopicIds();
151
+ const topicsByDomain = {};
152
+ for (const id of allTopicIds) {
153
+ const domain = id.split('/')[0];
154
+ if (!topicsByDomain[domain])
155
+ topicsByDomain[domain] = [];
156
+ topicsByDomain[domain].push(id);
157
+ }
158
+ // Show max 3 topics per domain, max 10 domains
159
+ const domainSample = {};
160
+ const domains = Object.keys(topicsByDomain).slice(0, 10);
161
+ for (const domain of domains) {
162
+ domainSample[domain] = topicsByDomain[domain].slice(0, 3);
163
+ }
164
+ return {
165
+ error: 'Topic not found',
166
+ message: `Topic ID '${topicId}' not found. Available topics by domain (showing ${domains.length} domains):`,
167
+ topics_by_domain: domainSample,
168
+ total_topics: allTopicIds.length,
169
+ hint: 'Topic IDs follow the format: domain/topic-name. Use the domain that matches your current specialist.'
170
+ };
171
+ }
104
172
  // Return copy to prevent mutation
105
173
  const result = { ...resolution.topic };
106
174
  if (!includeSamples) {