bc-code-intelligence-mcp 1.4.5 → 1.5.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.
Files changed (75) hide show
  1. package/dist/config/config-loader.d.ts.map +1 -1
  2. package/dist/config/config-loader.js +33 -1
  3. package/dist/config/config-loader.js.map +1 -1
  4. package/dist/config/config-validator.d.ts.map +1 -1
  5. package/dist/config/config-validator.js +5 -1
  6. package/dist/config/config-validator.js.map +1 -1
  7. package/dist/index.d.ts +13 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +193 -17
  10. package/dist/index.js.map +1 -1
  11. package/dist/layers/base-layer.d.ts +41 -17
  12. package/dist/layers/base-layer.d.ts.map +1 -1
  13. package/dist/layers/base-layer.js +103 -41
  14. package/dist/layers/base-layer.js.map +1 -1
  15. package/dist/layers/embedded-layer.d.ts +5 -2
  16. package/dist/layers/embedded-layer.d.ts.map +1 -1
  17. package/dist/layers/embedded-layer.js +16 -3
  18. package/dist/layers/embedded-layer.js.map +1 -1
  19. package/dist/layers/git-layer.d.ts +16 -1
  20. package/dist/layers/git-layer.d.ts.map +1 -1
  21. package/dist/layers/git-layer.js +118 -10
  22. package/dist/layers/git-layer.js.map +1 -1
  23. package/dist/layers/project-layer.d.ts +8 -0
  24. package/dist/layers/project-layer.d.ts.map +1 -1
  25. package/dist/layers/project-layer.js +33 -3
  26. package/dist/layers/project-layer.js.map +1 -1
  27. package/dist/services/methodology-service.d.ts.map +1 -1
  28. package/dist/services/methodology-service.js +5 -1
  29. package/dist/services/methodology-service.js.map +1 -1
  30. package/dist/services/multi-content-layer-service.d.ts +13 -0
  31. package/dist/services/multi-content-layer-service.d.ts.map +1 -1
  32. package/dist/services/multi-content-layer-service.js +59 -3
  33. package/dist/services/multi-content-layer-service.js.map +1 -1
  34. package/dist/services/roleplay-engine.d.ts.map +1 -1
  35. package/dist/services/roleplay-engine.js +4 -4
  36. package/dist/services/roleplay-engine.js.map +1 -1
  37. package/dist/tools/specialist-tools.d.ts.map +1 -1
  38. package/dist/tools/specialist-tools.js +7 -1
  39. package/dist/tools/specialist-tools.js.map +1 -1
  40. package/dist/tools/workspace-tools.d.ts +96 -0
  41. package/dist/tools/workspace-tools.d.ts.map +1 -0
  42. package/dist/tools/workspace-tools.js +188 -0
  43. package/dist/tools/workspace-tools.js.map +1 -0
  44. package/dist/types/bc-knowledge.d.ts +6 -0
  45. package/dist/types/bc-knowledge.d.ts.map +1 -1
  46. package/dist/types/bc-knowledge.js +3 -0
  47. package/dist/types/bc-knowledge.js.map +1 -1
  48. package/dist/types/config-types.d.ts +1 -0
  49. package/dist/types/config-types.d.ts.map +1 -1
  50. package/dist/types/config-types.js +2 -0
  51. package/dist/types/config-types.js.map +1 -1
  52. package/embedded-knowledge/domains/alex-architect/object-id-ninja-integration.md +281 -0
  53. package/embedded-knowledge/domains/alex-architect/recommend-object-id-ninja.md +248 -0
  54. package/embedded-knowledge/domains/chris-config/configuration-file-discovery.md +444 -0
  55. package/embedded-knowledge/domains/chris-config/configuration-file-formats.md +540 -0
  56. package/embedded-knowledge/domains/chris-config/content-types-structure.md +421 -0
  57. package/embedded-knowledge/domains/chris-config/layer-system-fundamentals.md +257 -0
  58. package/embedded-knowledge/domains/chris-config/workspace-detection-solutions.md +336 -0
  59. package/embedded-knowledge/domains/dean-debug/bc-telemetry-buddy-integration.md +453 -0
  60. package/embedded-knowledge/domains/dean-debug/recommend-bc-telemetry-buddy.md +160 -0
  61. package/embedded-knowledge/specialists/chris-config.md +96 -464
  62. package/embedded-knowledge/specialists/dean-debug.md +55 -0
  63. package/package.json +1 -1
  64. package/dist/services/agent-onboarding-service.d.ts +0 -45
  65. package/dist/services/agent-onboarding-service.d.ts.map +0 -1
  66. package/dist/services/agent-onboarding-service.js +0 -372
  67. package/dist/services/agent-onboarding-service.js.map +0 -1
  68. package/dist/services/specialist-handoff-service.d.ts +0 -85
  69. package/dist/services/specialist-handoff-service.d.ts.map +0 -1
  70. package/dist/services/specialist-handoff-service.js +0 -492
  71. package/dist/services/specialist-handoff-service.js.map +0 -1
  72. package/dist/streamlined-tools.d.ts +0 -328
  73. package/dist/streamlined-tools.d.ts.map +0 -1
  74. package/dist/streamlined-tools.js +0 -201
  75. package/dist/streamlined-tools.js.map +0 -1
@@ -0,0 +1,248 @@
1
+ ---
2
+ title: "Manual Object ID Management and Collision Prevention"
3
+ domain: "alex-architect"
4
+ difficulty: "intermediate"
5
+ bc_versions: "14+"
6
+ tags: ["object-ids", "architecture", "tooling", "recommendations", "collaboration"]
7
+ conditional_mcp_missing: "al-objid-mcp-server"
8
+ estimated_time: "5 minutes"
9
+ last_updated: "2025-10-27"
10
+ ---
11
+
12
+ # Manual Object ID Management and Collision Prevention
13
+
14
+ ## ⚠️ Object ID Collision Risk
15
+
16
+ I notice you don't have **Object ID Ninja** (AL Object ID MCP Server) configured in your environment. This means you'll need to **manually manage object ID ranges** and rely on careful coordination to prevent ID collisions.
17
+
18
+ ## What You're Missing
19
+
20
+ ### Automatic Collision Prevention
21
+ Without Object ID Ninja, you cannot:
22
+
23
+ - ✅ **Automatically find safe object IDs** from your assigned ranges
24
+ - ✅ **Reserve IDs** to prevent team conflicts
25
+ - ✅ **Check availability** before creating objects
26
+ - ✅ **Coordinate across team members** with backend synchronization
27
+ - ✅ **Manage publisher ranges** for AppSource development
28
+ - ✅ **Track ID assignments** across multiple projects
29
+
30
+ ### Example: What Object ID Ninja Provides
31
+
32
+ **Instead of saying:**
33
+ > "Use IDs in the 50000-99999 range and manually check for conflicts"
34
+
35
+ **I could say:**
36
+ > "Let me find you a safe ID... Object ID 52847 is available and reserved for you. Your next IDs: 52848, 52849, 52850 are also free. I'll reserve them to prevent conflicts."
37
+
38
+ ## Manual Approach (Current)
39
+
40
+ ### Customer Development Ranges
41
+ Follow these manual guidelines:
42
+
43
+ **Standard Ranges:**
44
+ - **50000-99999**: Customer development objects
45
+ - **70000-79999**: Often used for integrations/reports
46
+ - **80000-89999**: Customizations and extensions
47
+
48
+ **AppSource/ISV Ranges:**
49
+ - Request from Microsoft Partner Center
50
+ - Typically 70000000-74999999 or 75000000-79999999
51
+ - MUST be registered to avoid conflicts
52
+
53
+ ### Manual Collision Prevention Steps
54
+
55
+ 1. **Document Your Assignments**
56
+ ```markdown
57
+ # Object ID Assignments
58
+ - 50100-50199: Customer Management Extensions
59
+ - 50200-50299: Sales Process Customizations
60
+ - 50300-50399: Reporting Extensions
61
+ ```
62
+
63
+ 2. **Check Before Creating**
64
+ - Search existing objects in your workspace
65
+ - Verify with team members verbally or via documentation
66
+ - Check source control for recent additions
67
+
68
+ 3. **Team Coordination**
69
+ - Maintain shared spreadsheet of ID assignments
70
+ - Reserve ranges per developer or feature
71
+ - Regular team syncs to avoid conflicts
72
+
73
+ 4. **Version Control Checks**
74
+ - Review PR conflicts carefully
75
+ - Check for object ID collisions during code review
76
+ - Run compile checks frequently
77
+
78
+ ### Risks of Manual Management
79
+
80
+ - ❌ **Human Error**: Easy to forget to check or miscommunicate
81
+ - ❌ **Race Conditions**: Two developers pick same ID simultaneously
82
+ - ❌ **Scaling Issues**: Manual tracking breaks down with team growth
83
+ - ❌ **Merge Conflicts**: ID collisions discovered late in development
84
+ - ❌ **AppSource Violations**: Accidentally use IDs outside publisher range
85
+
86
+ ## Why Object ID Ninja is Valuable
87
+
88
+ ### LITE Mode (Individual Developers)
89
+ - Personal ID pool management
90
+ - Local ID assignment tracking
91
+ - Conflict prevention within your own projects
92
+ - No backend required
93
+
94
+ ### STANDARD Mode (Team Collaboration) ⭐
95
+ - **Centralized backend** coordinates across team
96
+ - **Real-time ID reservation** prevents conflicts
97
+ - **Multi-developer synchronization** via shared service
98
+ - **Publisher range enforcement** for AppSource compliance
99
+ - **Audit trail** of ID assignments
100
+
101
+ ### Key Features
102
+
103
+ 1. **Smart ID Discovery**
104
+ - `objid_get_next_available` - Find next safe ID
105
+ - `objid_reserve_id` - Reserve ID to prevent conflicts
106
+ - `objid_check_availability` - Verify ID is free
107
+
108
+ 2. **Range Management**
109
+ - Configure allowed ranges (customer vs AppSource)
110
+ - Enforce publisher boundaries
111
+ - Multi-range support for complex scenarios
112
+
113
+ 3. **Team Coordination**
114
+ - Backend synchronization (STANDARD mode)
115
+ - Real-time conflict prevention
116
+ - Assignment tracking and history
117
+
118
+ ## Installation Instructions
119
+
120
+ ### 1. Install Object ID Ninja MCP Server
121
+
122
+ Add to your MCP settings (VS Code: `.vscode/settings.json`):
123
+
124
+ ```json
125
+ {
126
+ "mcp.servers": {
127
+ "al-objid-mcp-server": {
128
+ "command": "npx",
129
+ "args": ["-y", "@vjeko.com/al-objid-mcp-server"]
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ Or for Claude Desktop (`claude_desktop_config.json`):
136
+
137
+ ```json
138
+ {
139
+ "mcpServers": {
140
+ "al-objid-mcp-server": {
141
+ "command": "npx",
142
+ "args": ["-y", "@vjeko.com/al-objid-mcp-server"]
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ ### 2. Choose Your Mode
149
+
150
+ **LITE Mode** (Individual):
151
+ - No additional configuration
152
+ - Works immediately for personal ID management
153
+ - Good for solo developers or small projects
154
+
155
+ **STANDARD Mode** (Teams):
156
+ - Configure backend coordination service
157
+ - See Object ID Ninja documentation for backend setup
158
+ - Essential for teams and AppSource development
159
+
160
+ ### 3. Update Workspace Configuration
161
+
162
+ Once installed, let me know it's available:
163
+
164
+ ```json
165
+ {
166
+ "tool": "set_workspace_info",
167
+ "arguments": {
168
+ "path": "C:\\Your\\Workspace\\Path",
169
+ "available_mcps": ["al-objid-mcp-server"]
170
+ }
171
+ }
172
+ ```
173
+
174
+ **Dynamic Knowledge Loading**: Once you report Object ID Ninja as available, I'll automatically delegate ID management to it instead of providing manual guidance!
175
+
176
+ ## Manual Best Practices (Until You Install)
177
+
178
+ ### 1. Range Allocation Strategy
179
+ ```
180
+ Developer A: 50000-50499
181
+ Developer B: 50500-50999
182
+ Feature X: 51000-51499
183
+ Integration: 51500-51999
184
+ Reports: 52000-52499
185
+ ```
186
+
187
+ ### 2. Pre-Commit Checklist
188
+ - [ ] Verified ID not in use locally
189
+ - [ ] Checked team assignment spreadsheet
190
+ - [ ] Updated documentation with new ID
191
+ - [ ] Confirmed in allowed range (customer/AppSource)
192
+
193
+ ### 3. Code Review Focus
194
+ - Verify object IDs are in correct range
195
+ - Check for duplicate IDs across PRs
196
+ - Confirm AppSource range compliance
197
+ - Validate team assignment tracking updated
198
+
199
+ ### 4. Documentation Template
200
+ ```markdown
201
+ ## Object ID Registry
202
+
203
+ ### Assigned Ranges
204
+ | Range | Purpose | Owner | Status |
205
+ |-------|---------|-------|--------|
206
+ | 50100-50149 | Customer Tables | TeamA | Active |
207
+ | 50150-50199 | Customer Pages | TeamA | Active |
208
+
209
+ ### Individual Assignments
210
+ | ID | Object Type | Name | Developer | Date |
211
+ |----|-------------|------|-----------|------|
212
+ | 50100 | Table | "Customer Comment" | Alice | 2025-10-27 |
213
+ ```
214
+
215
+ ## The Difference
216
+
217
+ ### Manual (Current)
218
+ > "Use ID 50147 if available. Check with your team and document the assignment in your shared tracker."
219
+
220
+ ### Automated (With Object ID Ninja)
221
+ > "I checked with Object ID Ninja - ID 50147 is available and I've reserved it for you for the next hour. Your next available IDs are 50148, 50149, 50150."
222
+
223
+ ## AppSource Development Without Object ID Ninja
224
+
225
+ If you're developing for AppSource **without** Object ID Ninja, you MUST:
226
+
227
+ 1. **Know Your Publisher Range**: Get it from Microsoft Partner Center
228
+ 2. **Strict Range Enforcement**: Never use IDs outside your publisher range
229
+ 3. **Meticulous Tracking**: Every ID assignment documented
230
+ 4. **Frequent Validation**: Regular checks against publisher boundaries
231
+ 5. **Team Discipline**: Zero tolerance for range violations
232
+
233
+ **Risk**: AppSource submission rejection due to ID range violations.
234
+
235
+ ## Next Steps
236
+
237
+ 1. **Install Object ID Ninja** following instructions above
238
+ 2. **Choose LITE or STANDARD** mode based on team size
239
+ 3. **Configure ranges** (customer vs AppSource)
240
+ 4. **Update workspace info** to report MCP availability
241
+ 5. **Ask me for object IDs again** - I'll use automated assignment!
242
+
243
+ ## See Also
244
+
245
+ - [Object ID Ninja Documentation](https://github.com/vjekob/al-objid)
246
+ - [Object ID Ranges](./object-id-ranges.md) - Range guidelines
247
+ - [Naming Conventions](../shared/naming-conventions.md) - AL naming standards
248
+ - [AppSource Guidelines](../morgan-market/appsource-guidelines.md) - Publisher requirements
@@ -0,0 +1,444 @@
1
+ ---
2
+ title: "Configuration File Discovery"
3
+ domain: "chris-config"
4
+ bc_versions: "1.5.0+"
5
+ difficulty: "beginner"
6
+ tags: ["mcp-configuration", "file-discovery", "workspace", "environment"]
7
+ related_topics:
8
+ - "configuration-file-formats.md"
9
+ - "workspace-detection-solutions.md"
10
+ - "layer-system-fundamentals.md"
11
+ applies_to:
12
+ - "BC Code Intelligence MCP Server"
13
+ last_updated: "2025-10-27"
14
+ ---
15
+
16
+ # Configuration File Discovery
17
+
18
+ ## Overview
19
+
20
+ The BC Code Intelligence MCP server searches for configuration files in multiple locations with a specific priority order. Understanding this discovery process helps you place configuration files correctly for different scenarios (workspace-specific, user-wide, or environment-based).
21
+
22
+ ## Discovery Priority Order
23
+
24
+ The MCP server searches these locations **in order** and uses the **first config file found**:
25
+
26
+ ### **1. Environment Variable** (Highest Priority)
27
+ ```bash
28
+ BC_CODE_INTEL_CONFIG=/absolute/path/to/config.json
29
+ ```
30
+
31
+ **When to use:**
32
+ - CI/CD pipelines with dynamic config paths
33
+ - Testing different configurations
34
+ - Override all other config locations
35
+
36
+ **Example:**
37
+ ```bash
38
+ # Linux/macOS
39
+ export BC_CODE_INTEL_CONFIG="/opt/configs/bc-code-intel-config.json"
40
+
41
+ # Windows PowerShell
42
+ $env:BC_CODE_INTEL_CONFIG = "C:\Configs\bc-code-intel-config.json"
43
+ ```
44
+
45
+ ### **2. Workspace Directory** (Project-Specific)
46
+ ```
47
+ ./bc-code-intel-config.json
48
+ ./bc-code-intel-config.yaml
49
+ ./bc-code-intel-config.yml
50
+ ```
51
+
52
+ **When to use:**
53
+ - Project-specific layer configurations
54
+ - Team-shared settings (committed to repo)
55
+ - Project requires specific company/team layers
56
+
57
+ **Workspace detection:** Requires workspace root to be set (see Workspace Management below).
58
+
59
+ **Example:**
60
+ ```bash
61
+ # In project root
62
+ MyBCProject/
63
+ ├── bc-code-intel-config.json ← Project-specific config
64
+ ├── app.json
65
+ └── src/
66
+ ```
67
+
68
+ ### **3. User Home Directory** (User-Wide)
69
+ ```
70
+ ~/.bc-code-intel/config.json
71
+ ~/.bc-code-intel/config.yaml
72
+ ~/.bc-code-intel/config.yml
73
+ ```
74
+
75
+ **When to use:**
76
+ - Personal configurations across all projects
77
+ - User-specific authentication tokens
78
+ - Default layer setup for all your work
79
+
80
+ **Path expansion:**
81
+ - Linux/macOS: `~` expands to `/home/username` or `/Users/username`
82
+ - Windows: `~` expands to `C:\Users\Username`
83
+
84
+ **Example:**
85
+ ```bash
86
+ # Linux/macOS
87
+ ~/.bc-code-intel/
88
+ ├── config.json ← User-wide config
89
+ └── cache/ ← Optional cache directory
90
+
91
+ # Windows
92
+ C:\Users\YourName\.bc-code-intel\
93
+ └── config.json ← User-wide config
94
+ ```
95
+
96
+ ### **4. Embedded Default** (Lowest Priority)
97
+ If no configuration file is found, the server uses **embedded defaults**:
98
+ - Only embedded knowledge layer (priority 0)
99
+ - No git layers
100
+ - Diagnostic tools disabled
101
+
102
+ **When this happens:**
103
+ - Zero-configuration first-time use
104
+ - No config file in any location
105
+ - Quick testing without setup
106
+
107
+ ## File Name Variations
108
+
109
+ The server recognizes these file names **in each location**:
110
+
111
+ ### **JSON Format** (Most Common)
112
+ - `bc-code-intel-config.json`
113
+
114
+ ### **YAML Format** (Alternative)
115
+ - `bc-code-intel-config.yaml`
116
+ - `bc-code-intel-config.yml`
117
+
118
+ **Search order within each location:**
119
+ 1. `.json` checked first
120
+ 2. `.yaml` checked second
121
+ 3. `.yml` checked last
122
+
123
+ ## Workspace Detection and Configuration Discovery
124
+
125
+ ### **The Workspace Problem**
126
+
127
+ The VS Code MCP extension doesn't set `process.cwd()` to workspace root, causing:
128
+ - Workspace directory search to fail
129
+ - Project-specific configs not found
130
+ - Project layer not loading
131
+
132
+ ### **The Solution: Workspace Management (v1.5.0+)**
133
+
134
+ Use the `set_workspace_root` MCP tool:
135
+
136
+ ```typescript
137
+ set_workspace_root({
138
+ workspace_root: "/absolute/path/to/workspace"
139
+ })
140
+ ```
141
+
142
+ **What happens after setting workspace:**
143
+ 1. `process.chdir()` changes to workspace root
144
+ 2. Configuration discovery re-runs
145
+ 3. Workspace config file (if exists) is now found
146
+ 4. All services reinitialize with new config
147
+ 5. Project layer (if configured) now loads
148
+
149
+ **Query current workspace:**
150
+ ```typescript
151
+ get_workspace_root()
152
+ // Returns: { workspace_root: "/current/path", services_initialized: true }
153
+ ```
154
+
155
+ ## Configuration Discovery Flow
156
+
157
+ ```mermaid
158
+ graph TD
159
+ A[MCP Server Starts] --> B{BC_CODE_INTEL_CONFIG set?}
160
+ B -->|Yes| C[Load config from env var path]
161
+ B -->|No| D{Workspace root set?}
162
+ D -->|No| E[Lazy init: embedded only]
163
+ D -->|Yes| F{./bc-code-intel-config.* exists?}
164
+ F -->|Yes| G[Load workspace config]
165
+ F -->|No| H{~/.bc-code-intel/config.* exists?}
166
+ H -->|Yes| I[Load user-wide config]
167
+ H -->|No| J[Use embedded defaults]
168
+
169
+ E --> K[First tool call triggers workspace prompt]
170
+ K --> L[User calls set_workspace_root]
171
+ L --> D
172
+ ```
173
+
174
+ ## Path Expansion Details
175
+
176
+ ### **Tilde (~) Expansion**
177
+
178
+ The server expands `~` to user home directory:
179
+
180
+ **Linux/macOS:**
181
+ ```bash
182
+ ~ → /home/username
183
+ ~/.bc-code-intel/config.json → /home/username/.bc-code-intel/config.json
184
+ ```
185
+
186
+ **Windows:**
187
+ ```powershell
188
+ ~ → C:\Users\Username
189
+ ~/.bc-code-intel/config.json → C:\Users\Username\.bc-code-intel\config.json
190
+ ```
191
+
192
+ ### **Relative vs Absolute Paths**
193
+
194
+ **Workspace config (relative):**
195
+ ```
196
+ ./bc-code-intel-config.json
197
+ # Relative to current working directory (workspace root after set_workspace_root)
198
+ ```
199
+
200
+ **Environment variable (absolute):**
201
+ ```bash
202
+ BC_CODE_INTEL_CONFIG=/absolute/path/to/config.json
203
+ # Must be absolute path
204
+ ```
205
+
206
+ ## Common Configuration Scenarios
207
+
208
+ ### **Scenario 1: Individual Developer (Zero Config)**
209
+
210
+ **Setup:** No config file anywhere
211
+
212
+ **Result:**
213
+ - Embedded knowledge only
214
+ - No git layers
215
+ - Works immediately
216
+
217
+ **Use case:** Trying out BC Code Intelligence, no customization needed
218
+
219
+ ---
220
+
221
+ ### **Scenario 2: User-Wide Company Layer**
222
+
223
+ **Setup:** `~/.bc-code-intel/config.json`
224
+ ```json
225
+ {
226
+ "knowledge_layers": [
227
+ {
228
+ "name": "Company Standards",
229
+ "type": "git",
230
+ "priority": 20,
231
+ "source": {
232
+ "repository_url": "https://github.com/mycompany/bc-knowledge",
233
+ "branch": "main",
234
+ "auth": {
235
+ "type": "pat",
236
+ "token_env_var": "GITHUB_TOKEN"
237
+ }
238
+ },
239
+ "enabled": true
240
+ }
241
+ ]
242
+ }
243
+ ```
244
+
245
+ **Result:**
246
+ - Applies to all projects for this user
247
+ - Company layer always available
248
+ - Personal authentication
249
+
250
+ **Use case:** Company developer wants company standards in all projects
251
+
252
+ ---
253
+
254
+ ### **Scenario 3: Project-Specific Multi-Layer**
255
+
256
+ **Setup:** `./bc-code-intel-config.json` (in project root)
257
+ ```json
258
+ {
259
+ "knowledge_layers": [
260
+ {
261
+ "name": "Company",
262
+ "type": "git",
263
+ "priority": 20,
264
+ "source": { "repository_url": "..." },
265
+ "enabled": true
266
+ },
267
+ {
268
+ "name": "Team Alpha",
269
+ "type": "git",
270
+ "priority": 50,
271
+ "source": { "repository_url": "..." },
272
+ "enabled": true
273
+ },
274
+ {
275
+ "name": "Project",
276
+ "type": "project",
277
+ "priority": 100,
278
+ "source": { "path": "./bc-code-intel-overrides" },
279
+ "enabled": true
280
+ }
281
+ ]
282
+ }
283
+ ```
284
+
285
+ **Result:**
286
+ - Project-specific layer configuration
287
+ - Committed to repo, shared with team
288
+ - Requires workspace root set in VS Code
289
+
290
+ **Use case:** Project needs specific company + team + project layers
291
+
292
+ ---
293
+
294
+ ### **Scenario 4: CI/CD with Dynamic Config**
295
+
296
+ **Setup:** Environment variable
297
+ ```bash
298
+ export BC_CODE_INTEL_CONFIG="/ci/configs/bc-code-intel-prod.json"
299
+ ```
300
+
301
+ **Result:**
302
+ - Overrides any file-based configs
303
+ - CI pipeline controls configuration
304
+ - Different configs for different pipelines
305
+
306
+ **Use case:** Automated build/test environments
307
+
308
+ ## Creating Configuration File Directories
309
+
310
+ ### **User-Wide Directory**
311
+
312
+ **Linux/macOS:**
313
+ ```bash
314
+ mkdir -p ~/.bc-code-intel
315
+ touch ~/.bc-code-intel/config.json
316
+ ```
317
+
318
+ **Windows PowerShell:**
319
+ ```powershell
320
+ New-Item -Path "$env:USERPROFILE\.bc-code-intel" -ItemType Directory -Force
321
+ New-Item -Path "$env:USERPROFILE\.bc-code-intel\config.json" -ItemType File
322
+ ```
323
+
324
+ ### **Workspace Directory**
325
+
326
+ ```bash
327
+ # Already in workspace root (after set_workspace_root)
328
+ touch bc-code-intel-config.json
329
+ ```
330
+
331
+ ## Troubleshooting Discovery Issues
332
+
333
+ ### **"Config file not found"**
334
+
335
+ **Check each location manually:**
336
+
337
+ ```bash
338
+ # 1. Environment variable
339
+ echo $BC_CODE_INTEL_CONFIG # Linux/macOS
340
+ echo $env:BC_CODE_INTEL_CONFIG # Windows PowerShell
341
+
342
+ # 2. Workspace directory (after workspace set)
343
+ ls -la ./bc-code-intel-config.*
344
+
345
+ # 3. User home directory
346
+ ls -la ~/.bc-code-intel/config.*
347
+ ```
348
+
349
+ **Verify workspace root:**
350
+ ```typescript
351
+ get_workspace_root()
352
+ ```
353
+
354
+ ### **"Wrong config being loaded"**
355
+
356
+ **Remember priority order:**
357
+ 1. Environment variable (highest)
358
+ 2. Workspace directory
359
+ 3. User home directory
360
+ 4. Embedded defaults (lowest)
361
+
362
+ **Solution:** Check if higher-priority config exists and is being used unintentionally.
363
+
364
+ ### **"Workspace config not found in VS Code"**
365
+
366
+ **Problem:** VS Code MCP extension doesn't set workspace root
367
+
368
+ **Solution:**
369
+ ```typescript
370
+ // Explicitly set workspace root first
371
+ set_workspace_root({
372
+ workspace_root: "/absolute/path/to/workspace"
373
+ })
374
+
375
+ // Now workspace config will be discovered
376
+ ```
377
+
378
+ ### **"Path expansion not working"**
379
+
380
+ **Check home directory expansion:**
381
+ ```bash
382
+ # Linux/macOS
383
+ echo ~
384
+ # Should show: /home/username or /Users/username
385
+
386
+ # Windows PowerShell
387
+ echo $env:USERPROFILE
388
+ # Should show: C:\Users\Username
389
+ ```
390
+
391
+ **Use absolute paths if tilde expansion fails:**
392
+ ```bash
393
+ # Instead of: ~/.bc-code-intel/config.json
394
+ # Use: /home/username/.bc-code-intel/config.json
395
+ ```
396
+
397
+ ## Best Practices
398
+
399
+ 1. **Choose the Right Location:**
400
+ - User-wide: Personal settings, authentication
401
+ - Workspace: Project-specific layer configuration
402
+ - Environment: CI/CD, testing, dynamic scenarios
403
+
404
+ 2. **Workspace Configuration in VS Code:**
405
+ - Always call `set_workspace_root` first
406
+ - Commit workspace config to repo for team sharing
407
+ - Document layer purposes in project README
408
+
409
+ 3. **User-Wide Configuration:**
410
+ - Personal authentication tokens
411
+ - Default company layer for all projects
412
+ - Don't commit user-wide configs (they're not in workspace)
413
+
414
+ 4. **Environment Variables:**
415
+ - Use for CI/CD pipelines
416
+ - Testing multiple configurations
417
+ - Temporary overrides
418
+
419
+ 5. **File Naming:**
420
+ - Prefer `.json` for simplicity
421
+ - Use `.yaml` for complex multi-layer configs (better readability)
422
+ - Be consistent across team
423
+
424
+ ## Configuration Loading Logs
425
+
426
+ When the server starts, it logs which config was loaded:
427
+
428
+ ```
429
+ ✅ Configuration loaded from: /path/to/bc-code-intel-config.json
430
+ ```
431
+
432
+ Or if no config found:
433
+ ```
434
+ ℹ️ No configuration file found, using embedded defaults
435
+ ```
436
+
437
+ Check MCP server logs to verify which config is being used.
438
+
439
+ ## See Also
440
+
441
+ - [Configuration File Formats](configuration-file-formats.md) - How to create config files
442
+ - [Workspace Detection Solutions](workspace-detection-solutions.md) - Solving workspace issues
443
+ - [Layer System Fundamentals](layer-system-fundamentals.md) - Understanding layer architecture
444
+ - [Git Layer Configuration](git-layer-configuration.md) - Git-specific configuration