bc-code-intelligence-mcp 1.4.0 → 1.4.2

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 (51) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +86 -43
  4. package/dist/index.js.map +1 -1
  5. package/dist/layers/base-layer.d.ts +26 -0
  6. package/dist/layers/base-layer.d.ts.map +1 -1
  7. package/dist/layers/base-layer.js +54 -0
  8. package/dist/layers/base-layer.js.map +1 -1
  9. package/dist/layers/embedded-layer.d.ts.map +1 -1
  10. package/dist/layers/embedded-layer.js.map +1 -1
  11. package/dist/services/multi-content-layer-service.d.ts.map +1 -1
  12. package/dist/services/multi-content-layer-service.js +36 -15
  13. package/dist/services/multi-content-layer-service.js.map +1 -1
  14. package/dist/tools/core-tools.d.ts +26 -0
  15. package/dist/tools/core-tools.d.ts.map +1 -0
  16. package/dist/{streamlined-tools.js → tools/core-tools.js} +30 -13
  17. package/dist/tools/core-tools.js.map +1 -0
  18. package/dist/tools/handoff-tools.d.ts +37 -0
  19. package/dist/tools/handoff-tools.d.ts.map +1 -0
  20. package/dist/tools/handoff-tools.js +265 -0
  21. package/dist/tools/handoff-tools.js.map +1 -0
  22. package/dist/tools/index.d.ts +61 -0
  23. package/dist/tools/index.d.ts.map +1 -0
  24. package/dist/tools/index.js +75 -0
  25. package/dist/tools/index.js.map +1 -0
  26. package/dist/tools/onboarding-tools.d.ts +35 -0
  27. package/dist/tools/onboarding-tools.d.ts.map +1 -0
  28. package/dist/tools/onboarding-tools.js +243 -0
  29. package/dist/tools/onboarding-tools.js.map +1 -0
  30. package/dist/tools/specialist-tools.d.ts.map +1 -1
  31. package/dist/tools/specialist-tools.js +6 -1
  32. package/dist/tools/specialist-tools.js.map +1 -1
  33. package/dist/types/bc-knowledge.d.ts +8 -8
  34. package/dist/types/config-types.d.ts +4 -4
  35. package/dist/types/config-types.d.ts.map +1 -1
  36. package/dist/types/config-types.js +1 -1
  37. package/dist/types/config-types.js.map +1 -1
  38. package/embedded-knowledge/domains/chris-config/knowledge-content-creation.md +437 -0
  39. package/embedded-knowledge/domains/chris-config/multi-team-layer-configuration.md +302 -0
  40. package/package.json +8 -11
  41. package/dist/services/agent-onboarding-service.d.ts +0 -45
  42. package/dist/services/agent-onboarding-service.d.ts.map +0 -1
  43. package/dist/services/agent-onboarding-service.js +0 -372
  44. package/dist/services/agent-onboarding-service.js.map +0 -1
  45. package/dist/services/specialist-handoff-service.d.ts +0 -85
  46. package/dist/services/specialist-handoff-service.d.ts.map +0 -1
  47. package/dist/services/specialist-handoff-service.js +0 -492
  48. package/dist/services/specialist-handoff-service.js.map +0 -1
  49. package/dist/streamlined-tools.d.ts +0 -328
  50. package/dist/streamlined-tools.d.ts.map +0 -1
  51. package/dist/streamlined-tools.js.map +0 -1
@@ -0,0 +1,302 @@
1
+ ---
2
+ title: "Multi-Team Layer Configuration for Organizations"
3
+ domain: "chris-config"
4
+ difficulty: "intermediate"
5
+ bc_versions: "14+"
6
+ tags: ["configuration", "enterprise", "layers", "git-repositories", "team-collaboration"]
7
+ related_topics: ["knowledge-overrides", "layer-system-architecture"]
8
+ applies_to: ["MCP Server", "VS Code Integration", "Team Environments"]
9
+ last_updated: "2025-01-01"
10
+ ---
11
+
12
+ # Multi-Team Layer Configuration for Organizations
13
+
14
+ ## Overview
15
+
16
+ Configure the BC Code Intelligence MCP Server for organizations needing shared team knowledge, centralized BC standards, and Git-based knowledge management. This guide covers the simple but effective layer-based override system for organizational hierarchy.
17
+
18
+ **Key Benefit**: Teams can share BC knowledge while maintaining project-specific customizations through a priority-based layer system.
19
+
20
+ ## What This System Actually Provides
21
+
22
+ ### ✅ Real Capabilities
23
+ - **Local file overrides** - Project-specific knowledge in `./bc-code-intel-overrides/`
24
+ - **Git repository layers** - Team/company knowledge from Git repos
25
+ - **Priority-based resolution** - Higher priority layers override lower ones
26
+ - **Basic authentication** - Token-based auth for private Git repos
27
+ - **Embedded knowledge base** - 87+ BC topics across 24 domains
28
+ - **Simple configuration** - JSON/YAML config files
29
+
30
+ ### ❌ What This Does NOT Do
31
+ - Multi-tenant architecture (doesn't exist)
32
+ - Azure AD integration (not implemented)
33
+ - Business unit isolation (fantasy)
34
+ - Enterprise monitoring dashboards (not built)
35
+ - Kubernetes deployments (unnecessary complexity)
36
+
37
+ ## Layer Architecture
38
+
39
+ The system uses a straightforward override hierarchy:
40
+
41
+ ```
42
+ Project Layer (Priority 100) ← ./bc-code-intel-overrides/
43
+ ↓ overrides
44
+ Team Layer (Priority 50) ← Git repo: team-bc-knowledge
45
+ ↓ overrides
46
+ Company Layer (Priority 25) ← Git repo: company-bc-standards
47
+ ↓ overrides
48
+ Embedded Layer (Priority 0) ← Built-in BC knowledge base
49
+ ```
50
+
51
+ ## VS Code MCP Integration Setup
52
+
53
+ Most users integrate through VS Code's `mcp.json` configuration:
54
+
55
+ ### Basic VS Code Setup
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "bc-code-intelligence": {
60
+ "command": "npx",
61
+ "args": ["bc-code-intelligence-mcp"],
62
+ "env": {
63
+ "GITHUB_TOKEN": "your_github_token_here"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### Project-Specific Configuration
71
+ ```bash
72
+ # In your BC project root
73
+ echo '{
74
+ "layers": [
75
+ {"name": "embedded", "priority": 0, "source": {"type": "embedded"}, "enabled": true},
76
+ {"name": "company", "priority": 25, "source": {"type": "git", "url": "https://github.com/yourcompany/bc-standards"}, "enabled": true, "auth": {"type": "token", "token_env_var": "GITHUB_TOKEN"}},
77
+ {"name": "project", "priority": 100, "source": {"type": "local", "path": "./bc-code-intel-overrides"}, "enabled": true}
78
+ ]
79
+ }' > bc-code-intel-config.json
80
+ ```
81
+
82
+ ### User-Wide Configuration
83
+ ```bash
84
+ # Windows (PowerShell/CMD)
85
+ echo '{...}' > %USERPROFILE%\bc-code-intel-config.json
86
+
87
+ # macOS/Linux
88
+ echo '{...}' > ~/bc-code-intel-config.json
89
+ ```
90
+
91
+ ## Multi-Team Configuration Example
92
+
93
+ ```json
94
+ {
95
+ "layers": [
96
+ {
97
+ "name": "embedded",
98
+ "priority": 0,
99
+ "source": { "type": "embedded" },
100
+ "enabled": true
101
+ },
102
+ {
103
+ "name": "company-standards",
104
+ "priority": 25,
105
+ "source": {
106
+ "type": "git",
107
+ "url": "https://github.com/yourcompany/bc-standards",
108
+ "branch": "main"
109
+ },
110
+ "enabled": true,
111
+ "auth": {
112
+ "type": "token",
113
+ "token_env_var": "GITHUB_TOKEN"
114
+ }
115
+ },
116
+ {
117
+ "name": "team-practices",
118
+ "priority": 50,
119
+ "source": {
120
+ "type": "git",
121
+ "url": "https://github.com/yourcompany/team-bc-knowledge",
122
+ "branch": "main"
123
+ },
124
+ "enabled": true,
125
+ "auth": {
126
+ "type": "token",
127
+ "token_env_var": "GITHUB_TOKEN"
128
+ }
129
+ },
130
+ {
131
+ "name": "project-overrides",
132
+ "priority": 100,
133
+ "source": {
134
+ "type": "local",
135
+ "path": "./bc-code-intel-overrides"
136
+ },
137
+ "enabled": true
138
+ }
139
+ ],
140
+ "cache": {
141
+ "strategy": "moderate",
142
+ "ttl": {
143
+ "git": "1h",
144
+ "local": "immediate",
145
+ "embedded": "permanent"
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ ## Layer Types and Use Cases
152
+
153
+ ### Embedded Layer (Priority 0)
154
+ - **Content**: 87+ topics across 24 domains, 14 specialist definitions
155
+ - **Use case**: Foundation knowledge everyone gets
156
+ - **Always available**: Provides fallback when other layers fail
157
+
158
+ ### Company Standards Layer (Priority 25)
159
+ - **Content**: Organization BC coding standards and approved patterns
160
+ - **Use case**: Organization-wide standards that override defaults
161
+ - **Authentication**: Usually requires private Git repository access
162
+
163
+ ### Team Practice Layer (Priority 50)
164
+ - **Content**: Team-specific approaches and specialized knowledge
165
+ - **Use case**: Team expertise that extends company standards
166
+ - **Collaboration**: Multiple teams can have different practice repositories
167
+
168
+ ### Project Override Layer (Priority 100)
169
+ - **Content**: Project-specific customizations and experiments
170
+ - **Use case**: Project needs that override everything else
171
+ - **Local files**: No authentication required, immediate changes
172
+
173
+ ## Configuration File Discovery
174
+
175
+ The MCP server searches for configuration files in this order:
176
+ 1. `./bc-code-intel-config.json` (current directory)
177
+ 2. `./bc-code-intel-config.yaml` (current directory)
178
+ 3. **Windows**: `%USERPROFILE%\bc-code-intel-config.json`
179
+ 4. **Windows**: `%USERPROFILE%\bc-code-intel-config.yaml`
180
+ 5. **macOS/Linux**: `~/bc-code-intel-config.json`
181
+ 6. **macOS/Linux**: `~/bc-code-intel-config.yaml`
182
+
183
+ ## Authentication Options
184
+
185
+ ### GitHub Token Authentication
186
+ ```bash
187
+ # Set environment variable
188
+ export GITHUB_TOKEN="ghp_your_token_here"
189
+ ```
190
+
191
+ ```json
192
+ {
193
+ "auth": {
194
+ "type": "token",
195
+ "token_env_var": "GITHUB_TOKEN"
196
+ }
197
+ }
198
+ ```
199
+
200
+ ### SSH Key Authentication
201
+ ```json
202
+ {
203
+ "auth": {
204
+ "type": "ssh",
205
+ "key_path": "~/.ssh/id_rsa"
206
+ }
207
+ }
208
+ ```
209
+
210
+ ## Setup Checklist
211
+
212
+ ### Basic Multi-Team Setup
213
+ - [ ] Create company BC standards repository
214
+ - [ ] Define team knowledge repository structure
215
+ - [ ] Set up GitHub token for private repositories
216
+ - [ ] Create configuration file with layer priorities
217
+ - [ ] Test layer resolution with sample content
218
+ - [ ] Train team leads on knowledge contribution
219
+
220
+ ### Content Creation
221
+ - [ ] Migrate existing BC standards to markdown format
222
+ - [ ] Create team-specific specialist definitions (optional)
223
+ - [ ] Document local coding patterns and decisions
224
+ - [ ] Set up project override directory structure
225
+ - [ ] Create contribution guidelines for team knowledge
226
+
227
+ ## Common Issues and Solutions
228
+
229
+ ### Layer Not Loading
230
+ ```bash
231
+ # Debug layer loading
232
+ bc-code-intel --debug-layers
233
+ bc-code-intel --test-layer company-standards
234
+ ```
235
+
236
+ **Common causes:**
237
+ - Invalid Git URL or authentication
238
+ - Wrong branch name in configuration
239
+ - Network connectivity issues
240
+ - Invalid JSON/YAML in config file
241
+
242
+ ### Authentication Failed
243
+ ```bash
244
+ # Test authentication
245
+ export GITHUB_TOKEN="your_token"
246
+ bc-code-intel --test-auth
247
+ ```
248
+
249
+ **Common causes:**
250
+ - Expired or invalid GitHub token
251
+ - Token doesn't have repository access
252
+ - SSH key not configured properly
253
+ - Repository is private but no auth configured
254
+
255
+ ## ROI and Cost-Benefit Analysis
256
+
257
+ ### Implementation Costs
258
+ - **Software**: Free (open source)
259
+ - **Setup time**: 2-4 hours for basic multi-team setup
260
+ - **Maintenance**: Minimal - just updating Git repositories
261
+ - **Training**: 30 minutes per developer
262
+
263
+ ### Expected Benefits
264
+ - **Consistent practices**: Teams follow the same BC patterns
265
+ - **Knowledge sharing**: Easy to share team discoveries
266
+ - **Faster onboarding**: New developers see team-specific guidance
267
+ - **Flexible customization**: Projects can override anything when needed
268
+
269
+ ### Team Size ROI
270
+ - **Small teams (2-5 devs)**: Pays for itself in first month
271
+ - **Medium teams (6-15 devs)**: 3-5x productivity improvement on BC questions
272
+ - **Large teams (15+ devs)**: Significant standardization and knowledge leverage
273
+
274
+ ## Best Practices
275
+
276
+ ### Security Considerations
277
+ - **Validate sources**: Only load from trusted repositories
278
+ - **Use authentication**: Secure access to private knowledge
279
+ - **Limit permissions**: Use read-only tokens when possible
280
+
281
+ ### Configuration Management
282
+ - **Start simple**: Begin with embedded + project layers
283
+ - **Add gradually**: Add organizational layers as needed
284
+ - **Document overrides**: Clearly explain why overrides exist
285
+ - **Version control**: Keep layer configurations in git
286
+ - **Test changes**: Validate layer configurations before sharing
287
+
288
+ ### Anti-Patterns to Avoid
289
+ - ❌ **Too many layers**: More than 4-5 layers becomes complex
290
+ - ❌ **Conflicting priorities**: Multiple layers with same priority
291
+ - ❌ **No fallback**: Always ensure embedded layer is available
292
+ - ❌ **Complex authentication**: Keep auth simple and documented
293
+
294
+ ## Related Topics
295
+
296
+ - **[Knowledge Content Creation](knowledge-overrides)**: How to create custom BC knowledge content
297
+ - **[Layer System Architecture](layer-system-architecture)**: Understanding the technical implementation
298
+ - **[Specialist Customization](specialist-customization)**: Creating custom AI specialists
299
+
300
+ ---
301
+
302
+ *This configuration guide enables organizations to scale BC knowledge sharing while maintaining flexibility for team and project needs.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-code-intelligence-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -14,22 +14,19 @@
14
14
  "bc-code-intelligence-mcp": "dist/index.js"
15
15
  },
16
16
  "scripts": {
17
- "build": "npm run validate:embedded-knowledge && tsc",
17
+ "build": "tsc",
18
18
  "dev": "tsx src/index.ts",
19
19
  "start": "node dist/index.js",
20
- "test": "vitest run",
21
- "test:watch": "vitest",
22
- "test:coverage": "vitest run --coverage",
20
+ "test": "npm run validate:contracts && vitest run",
21
+ "test:contracts": "tsx scripts/validate-contracts.ts",
23
22
  "test:unit": "vitest run --config vitest.unit.config.ts",
24
23
  "test:integration": "vitest run --config vitest.integration.config.ts",
25
- "test:contracts": "tsx scripts/validate-contracts.ts",
26
- "test:prompts": "vitest run tests/prompt-validation/ --reporter=verbose",
27
- "test:all": "npm run validate:embedded-knowledge && npm run test:contracts && npm run test:unit && npm run test:integration",
24
+ "test:prompts": "vitest run --config vitest.config.ts tests/prompt-validation",
25
+ "test:coverage": "vitest run --coverage",
26
+ "test:all": "npm run test:contracts && npm run test:unit && npm run test:integration && npm run test:prompts",
28
27
  "validate:contracts": "tsx scripts/validate-contracts.ts",
29
- "validate:embedded-knowledge": "tsx scripts/validate-embedded-knowledge.ts",
30
28
  "pretest": "npm run validate:contracts",
31
- "prebuild": "npm run validate:embedded-knowledge",
32
- "prepublishOnly": "npm run test:all && npm run build",
29
+ "prepublishOnly": "npm run validate:contracts && npm run build",
33
30
  "lint": "eslint src/**/*.ts",
34
31
  "format": "prettier --write src/**/*.ts",
35
32
  "prepare": "npm run build"
@@ -1,45 +0,0 @@
1
- /**
2
- * Agent-Friendly Onboarding Service
3
- *
4
- * Designed to make ANY coding agent naturally recognize when to introduce
5
- * BC specialists during Business Central development conversations.
6
- */
7
- import { CallToolRequest, CallToolResult, Tool } from '@modelcontextprotocol/sdk/types.js';
8
- import { SpecialistDiscoveryService } from '../services/specialist-discovery.js';
9
- import { MultiContentLayerService } from '../services/multi-content-layer-service.js';
10
- export declare const BC_ONBOARDING_TOOLS: Tool[];
11
- export declare class AgentOnboardingService {
12
- private discoveryService;
13
- private layerService;
14
- constructor(discoveryService: SpecialistDiscoveryService, layerService: MultiContentLayerService);
15
- handleToolCall(request: CallToolRequest): Promise<CallToolResult>;
16
- /**
17
- * Main tool: Introduce BC specialists based on conversation context
18
- */
19
- private introduceBCSpecialists;
20
- /**
21
- * Get introduction content for specific specialist
22
- */
23
- private getSpecialistIntroduction;
24
- /**
25
- * Suggest when to bring in specialists during conversation
26
- */
27
- private suggestNextSpecialist;
28
- /**
29
- * Generate contextual example question
30
- */
31
- private generateContextualExample;
32
- /**
33
- * Extract main subject from context for personalized examples
34
- */
35
- private extractSubject;
36
- /**
37
- * Get emoji for specialist
38
- */
39
- private getSpecialistEmoji;
40
- /**
41
- * Get tool definitions for MCP registration
42
- */
43
- getToolDefinitions(): Tool[];
44
- }
45
- //# sourceMappingURL=agent-onboarding-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-onboarding-service.d.ts","sourceRoot":"","sources":["../../src/services/agent-onboarding-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AA2BtF,eAAO,MAAM,mBAAmB,EAAE,IAAI,EAwFrC,CAAC;AAEF,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,YAAY;gBADZ,gBAAgB,EAAE,0BAA0B,EAC5C,YAAY,EAAE,wBAAwB;IAG1C,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC;IAyBvE;;OAEG;YACW,sBAAsB;IAkEpC;;OAEG;YACW,yBAAyB;IAmDvC;;OAEG;YACW,qBAAqB;IAsCnC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA0CjC;;OAEG;IACH,OAAO,CAAC,cAAc;IAetB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,kBAAkB,IAAI,IAAI,EAAE;CAG7B"}