bc-code-intelligence-mcp 1.5.6 → 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 (69) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +165 -419
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +6 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/layers/embedded-layer.js +29 -29
  7. package/dist/layers/project-layer.js +33 -33
  8. package/dist/sdk/bc-code-intel-client.d.ts.map +1 -1
  9. package/dist/sdk/bc-code-intel-client.js +1 -1
  10. package/dist/sdk/bc-code-intel-client.js.map +1 -1
  11. package/dist/services/knowledge-service.d.ts +1 -1
  12. package/dist/services/knowledge-service.d.ts.map +1 -1
  13. package/dist/services/knowledge-service.js +71 -3
  14. package/dist/services/knowledge-service.js.map +1 -1
  15. package/dist/services/methodology-service.js +14 -14
  16. package/dist/services/multi-content-layer-service.d.ts +15 -0
  17. package/dist/services/multi-content-layer-service.d.ts.map +1 -1
  18. package/dist/services/multi-content-layer-service.js +62 -0
  19. package/dist/services/multi-content-layer-service.js.map +1 -1
  20. package/dist/streamlined-handlers.d.ts +0 -7
  21. package/dist/streamlined-handlers.d.ts.map +1 -1
  22. package/dist/streamlined-handlers.js +80 -60
  23. package/dist/streamlined-handlers.js.map +1 -1
  24. package/dist/tools/core-tools.d.ts.map +1 -1
  25. package/dist/tools/core-tools.js +4 -0
  26. package/dist/tools/core-tools.js.map +1 -1
  27. package/dist/tools/onboarding-tools.d.ts +8 -0
  28. package/dist/tools/onboarding-tools.d.ts.map +1 -1
  29. package/dist/tools/onboarding-tools.js +111 -1
  30. package/dist/tools/onboarding-tools.js.map +1 -1
  31. package/dist/types/bc-knowledge.d.ts +4 -4
  32. package/embedded-knowledge/.github/ISSUE_TEMPLATE/bug-report.md +23 -23
  33. package/embedded-knowledge/.github/ISSUE_TEMPLATE/content-improvement.md +23 -23
  34. package/embedded-knowledge/.github/ISSUE_TEMPLATE/knowledge-request.md +29 -29
  35. package/embedded-knowledge/AGENTS.md +177 -177
  36. package/embedded-knowledge/CONTRIBUTING.md +57 -57
  37. package/embedded-knowledge/LICENSE +20 -20
  38. package/embedded-knowledge/README.md +31 -31
  39. package/embedded-knowledge/domains/alex-architect/samples/testability-design-patterns.md +223 -0
  40. package/embedded-knowledge/domains/alex-architect/testability-design-patterns.md +77 -0
  41. package/embedded-knowledge/domains/casey-copilot/long-running-session-instructions.md +263 -0
  42. package/embedded-knowledge/domains/casey-copilot/samples/long-running-session-instructions.md +323 -0
  43. package/embedded-knowledge/domains/eva-errors/codeunit-run-pattern.md +159 -0
  44. package/embedded-knowledge/domains/eva-errors/samples/codeunit-run-pattern.md +239 -0
  45. package/embedded-knowledge/domains/eva-errors/samples/try-function-usage.md +195 -0
  46. package/embedded-knowledge/domains/eva-errors/try-function-usage.md +129 -0
  47. package/embedded-knowledge/domains/morgan-market/partner-readiness-analysis.md +201 -0
  48. package/embedded-knowledge/domains/morgan-market/samples/partner-readiness-checklist.md +288 -0
  49. package/embedded-knowledge/domains/quinn-tester/isolation-testing-patterns.md +82 -0
  50. package/embedded-knowledge/domains/quinn-tester/samples/isolation-testing-patterns.md +424 -0
  51. package/embedded-knowledge/domains/roger-reviewer/samples/testability-code-smells.md +256 -0
  52. package/embedded-knowledge/domains/roger-reviewer/testability-code-smells.md +67 -0
  53. package/embedded-knowledge/domains/shared/al-file-naming-conventions.md +145 -145
  54. package/embedded-knowledge/methodologies/index.json +80 -80
  55. package/embedded-knowledge/methodologies/phases/analysis-full.md +207 -207
  56. package/embedded-knowledge/methodologies/phases/analysis-quick.md +43 -43
  57. package/embedded-knowledge/methodologies/phases/analysis.md +181 -181
  58. package/embedded-knowledge/methodologies/phases/execution-validation-full.md +173 -173
  59. package/embedded-knowledge/methodologies/phases/execution-validation-quick.md +30 -30
  60. package/embedded-knowledge/methodologies/phases/execution-validation.md +173 -173
  61. package/embedded-knowledge/methodologies/phases/performance-full.md +210 -210
  62. package/embedded-knowledge/methodologies/phases/performance-quick.md +31 -31
  63. package/embedded-knowledge/methodologies/phases/performance.md +210 -210
  64. package/embedded-knowledge/methodologies/phases/verification-full.md +161 -161
  65. package/embedded-knowledge/methodologies/phases/verification-quick.md +47 -47
  66. package/embedded-knowledge/methodologies/phases/verification.md +145 -145
  67. package/embedded-knowledge/methodologies/workflow-enforcement.md +141 -141
  68. package/embedded-knowledge/methodologies/workflows/code-review-workflow.md +98 -98
  69. package/package.json +81 -81
@@ -1,211 +1,211 @@
1
- # Performance Optimization Phase - BC-Specific Enhancement Methodology
2
-
3
- ## Overview
4
- **Objective**: Apply systematic Business Central performance optimizations based on analysis phase findings, achieving measurable improvements through domain-specific knowledge.
5
-
6
- **Key Principle**: When optimization opportunities are identified, applying BC-specific patterns and techniques produces dramatically superior results compared to generic optimization approaches.
7
-
8
- ---
9
-
10
- ## Phase Execution Process
11
-
12
- ### Step 1: Optimization Priority Framework
13
- **CRITICAL**: Apply optimizations in priority order for maximum cumulative impact.
14
-
15
- #### 🟢 Priority 1: Easy Win Optimizations (Apply First)
16
- **High ROI + Low Risk** - These should be implemented immediately:
17
-
18
- ##### Database-First Performance Hierarchy
19
- **CRITICAL PRINCIPLE**: Always prefer database-native operations over application-layer workarounds.
20
-
21
- **Tier 1: Database-Native Operations (HIGHEST PRIORITY)**
22
- - Direct table CalcSums, Count(), filtering
23
- - Single-table aggregations with SIFT keys
24
- - Database-level sorting and grouping
25
- ```al
26
- // ✅ PREFERRED: Direct database aggregation
27
- MyRecord.CalcSums(Amount);
28
- Total := MyRecord.Amount;
29
- ```
30
-
31
- **Tier 2: Platform-Optimized Operations (MEDIUM PRIORITY)**
32
- - SetLoadFields, efficient key usage
33
- - Only after database-native options exhausted
34
- ```al
35
- // ✅ SECONDARY: Field optimization
36
- MyRecord.SetLoadFields(Amount, Date);
37
- MyRecord.CalcSums(Amount);
38
- ```
39
-
40
- **Tier 3: Application-Level Operations (LOWER PRIORITY)**
41
- - FlowFields, multi-table relationships
42
- - Only when database-native insufficient
43
- ```al
44
- // ⚠️ LAST RESORT: Application-layer processing
45
- UnitStats.CalcFields("Total Revenue"); // FlowField calculation
46
- ```
47
-
48
- ##### Database-Level Operations vs Manual Processing
49
- **Pattern**: Replace manual loops with database aggregation operations
50
- ```al
51
- // ❌ BEFORE: Manual processing (inefficient)
52
- Total := 0;
53
- if MyRecord.FindSet() then
54
- repeat
55
- Total += MyRecord.Amount;
56
- until MyRecord.Next() = 0;
57
-
58
- // ✅ AFTER: Database aggregation (efficient)
59
- MyRecord.CalcSums(Amount);
60
- Total := MyRecord.Amount;
61
- ```
62
-
63
- ##### Field Loading Optimization
64
- **Pattern**: Use `SetLoadFields()` to load only required fields
65
- ```al
66
- // ❌ BEFORE: Loading all fields (wasteful)
67
- MyRecord.FindSet();
68
-
69
- // ✅ AFTER: Selective field loading (efficient)
70
- MyRecord.SetLoadFields(Name, Amount, Date);
71
- MyRecord.FindSet();
72
- ```
73
-
74
- #### 🟡 Priority 2: Medium Impact Optimizations
75
- **Moderate ROI + Medium Risk** - Implement after Priority 1:
76
-
77
- ##### Infrastructure Optimization Validation
78
- **CRITICAL**: For optimizations applied that rely on underlying data (tables, keys, indexes), ensure the related infrastructure is updated or extended to support the necessary change.
79
-
80
- - **Examine referenced objects**: If code references tables or other objects, analyze those for optimization opportunities
81
- - **Validate infrastructure support**: Confirm that database structures (keys, indexes, fields) support the optimization
82
- - **Update dependencies**: Modify tables, keys, or other infrastructure to enable optimization effectiveness
83
- - **Cross-reference infrastructure**: Check if shared objects provide optimization opportunities for multiple modules
84
-
85
- ##### Platform-Specific Optimization Application
86
- - **Use knowledge base**: Apply `get_topic_content` for specific optimization techniques identified in analysis phase
87
-
88
- ##### Advanced Platform Feature Application
89
- - **Apply knowledge systematically**: Use `get_topic_content` for detailed implementation of optimization techniques
90
- - **Follow best practices**: Implement optimizations according to platform-specific guidance from knowledge base
91
-
92
- ##### Database Operation Optimization
93
- - **Apply research findings**: Use optimization techniques discovered through MCP knowledge base analysis
94
- - **Implement systematically**: Follow specific guidance from `get_topic_content` for identified optimization patterns
95
-
96
- #### 🔴 Priority 3: Complex Optimizations
97
- **High Impact + Higher Risk** - Requires careful analysis:
98
-
99
- ##### Architectural Changes
100
- - Restructure algorithms for better performance characteristics
101
- - Implement caching strategies for frequently accessed data
102
- - Consider background processing for heavy operations
103
-
104
- ##### Advanced BC Features
105
- - Implement table extensions for performance gains
106
- - Utilize Business Central APIs for external integrations
107
- - Apply advanced filtering and search techniques
108
-
109
- ### Step 2: Implementation Guidelines
110
-
111
- #### ⚡ Performance Best Practices
112
- - [ ] **Measure Before Optimizing**: Establish baseline performance metrics
113
- - [ ] **Single Responsibility**: Each optimization should address one specific bottleneck
114
- - [ ] **Preserve Functionality**: Ensure business logic remains intact
115
- - [ ] **Test Thoroughly**: Validate both performance improvement and correctness
116
-
117
- #### 🛠️ Technical Implementation Standards
118
- - [ ] **Use BC-Specific Patterns**: Prefer Business Central optimizations over generic approaches
119
- - [ ] **Follow AL Conventions**: Maintain code style and naming conventions
120
- - [ ] **Document Changes**: Comment optimization reasoning for future maintenance
121
- - [ ] **Consider Scalability**: Ensure optimizations work with larger datasets
122
-
123
- ### Step 3: Validation Framework
124
-
125
- #### 📊 Performance Measurement
126
- For each optimization applied:
127
- - [ ] **Baseline Measurement**: Record original execution time/resource usage
128
- - [ ] **Implementation**: Apply the optimization technique
129
- - [ ] **Performance Testing**: Measure improved performance metrics
130
- - [ ] **Impact Calculation**: Document percentage improvement achieved
131
-
132
- #### 🎯 Success Metrics
133
- - **Execution Time**: Target reduction in processing duration
134
- - **Memory Usage**: Minimize memory consumption during operations
135
- - **Database Efficiency**: Reduce number of database calls
136
- - **Resource Utilization**: Optimize CPU and I/O usage
137
-
138
- ### Step 4: Risk Management
139
-
140
- #### ⚠️ Risk Assessment Categories
141
- - [ ] **Low Risk**: Simple field access optimizations, basic query improvements
142
- - [ ] **Medium Risk**: Algorithm changes, new BC feature usage
143
- - [ ] **High Risk**: Architectural modifications, complex business logic changes
144
-
145
- #### 🛡️ Mitigation Strategies
146
- - **Code Reviews**: Peer validation of optimization approaches
147
- - **Incremental Testing**: Apply optimizations incrementally with testing
148
- - **Rollback Planning**: Maintain ability to revert changes if needed
149
- - **Documentation**: Clear documentation of changes for troubleshooting
150
-
151
- ---
152
-
153
- ## 🔒 MANDATORY COMPLETION GATES
154
- **CRITICAL**: Performance phase CANNOT be marked complete until ALL gates pass.
155
-
156
- ### Gate 1: Optimization Coverage Validation
157
- - [ ] **Cross-reference file inventory**: Every file in analysis scope must be addressed
158
- - [ ] **Pattern application verification**: Core patterns (CalcSums, SetLoadFields) applied where identified
159
- - [ ] **BLOCKING CONDITION**: ANY file in scope missing optimization analysis = INCOMPLETE
160
-
161
- ### Gate 2: Infrastructure Validation
162
- - [ ] **Table structure verification**: Any SIFT keys or infrastructure changes properly implemented
163
- - [ ] **Dependency validation**: Related objects updated to support optimizations
164
- - [ ] **BLOCKING CONDITION**: Code optimizations without supporting infrastructure = INVALID
165
-
166
- ### Gate 3: Documentation Completeness
167
- - [ ] **Optimization log accuracy**: Every claimed optimization must reference actual file/line changes
168
- - [ ] **No phantom optimizations**: Cannot claim optimizations for non-existent files
169
- - [ ] **BLOCKING CONDITION**: Inaccurate optimization claims = VERIFICATION REQUIRED
170
-
171
- ## 🚨 EXECUTION VALIDATION CHECKPOINTS - MANDATORY
172
- **CRITICAL**: Run execution validation frequently during performance work to prevent fraud.
173
-
174
- ### Trigger Points (MUST BE EXECUTED)
175
- 1. **After optimizing 2-3 files**: `load_methodology execution-validation`
176
- 2. **Before claiming module complete**: BLOCK until execution validation passes
177
- 3. **When requesting permission to continue**: Validate all claimed work first
178
- 4. **After any substantial optimization claims** (CalcSums, SetLoadFields, etc.)
179
-
180
- ### Execution Validation Protocol
181
- ```markdown
182
- ## EXECUTION VALIDATION CHECKPOINT
183
- **MANDATORY**: Run real-time validation of optimization claims:
184
- - Load execution-validation methodology: `load_methodology execution-validation`
185
- - Validate file modifications and optimization existence
186
- - BLOCKING: Cannot proceed until all validation checks pass
187
- - Document any discrepancies and correct immediately
188
- ```
189
-
190
- ### Integration with Performance Work
191
- - **During optimization**: Run micro-validation every 2-3 files
192
- - **Before completion claims**: BLOCK until execution validation complete
193
- - **Real-time fraud detection**: Immediately catch false optimization claims
194
-
195
- ## Success Criteria
196
- ✅ **Measurable Improvement**: Documented performance gains from optimizations
197
- ✅ **Functional Preservation**: All business functionality remains intact
198
- ✅ **Best Practice Compliance**: Solutions follow Business Central optimization patterns
199
- ✅ **Scalability Validation**: Optimizations work effectively with production data volumes
200
- ✅ **MANDATORY**: ALL completion gates passed before proceeding to verification
201
-
202
- ## Quality Validation
203
- - **Performance Verification**: Are claimed improvements actually measurable?
204
- - **Code Quality**: Does the optimized code maintain readability and maintainability?
205
- - **Business Logic Integrity**: Have you preserved all original business requirements?
206
- - **BC Pattern Compliance**: Are you using Business Central features appropriately?
207
-
208
- ---
209
-
210
- ## Next Phase
1
+ # Performance Optimization Phase - BC-Specific Enhancement Methodology
2
+
3
+ ## Overview
4
+ **Objective**: Apply systematic Business Central performance optimizations based on analysis phase findings, achieving measurable improvements through domain-specific knowledge.
5
+
6
+ **Key Principle**: When optimization opportunities are identified, applying BC-specific patterns and techniques produces dramatically superior results compared to generic optimization approaches.
7
+
8
+ ---
9
+
10
+ ## Phase Execution Process
11
+
12
+ ### Step 1: Optimization Priority Framework
13
+ **CRITICAL**: Apply optimizations in priority order for maximum cumulative impact.
14
+
15
+ #### 🟢 Priority 1: Easy Win Optimizations (Apply First)
16
+ **High ROI + Low Risk** - These should be implemented immediately:
17
+
18
+ ##### Database-First Performance Hierarchy
19
+ **CRITICAL PRINCIPLE**: Always prefer database-native operations over application-layer workarounds.
20
+
21
+ **Tier 1: Database-Native Operations (HIGHEST PRIORITY)**
22
+ - Direct table CalcSums, Count(), filtering
23
+ - Single-table aggregations with SIFT keys
24
+ - Database-level sorting and grouping
25
+ ```al
26
+ // ✅ PREFERRED: Direct database aggregation
27
+ MyRecord.CalcSums(Amount);
28
+ Total := MyRecord.Amount;
29
+ ```
30
+
31
+ **Tier 2: Platform-Optimized Operations (MEDIUM PRIORITY)**
32
+ - SetLoadFields, efficient key usage
33
+ - Only after database-native options exhausted
34
+ ```al
35
+ // ✅ SECONDARY: Field optimization
36
+ MyRecord.SetLoadFields(Amount, Date);
37
+ MyRecord.CalcSums(Amount);
38
+ ```
39
+
40
+ **Tier 3: Application-Level Operations (LOWER PRIORITY)**
41
+ - FlowFields, multi-table relationships
42
+ - Only when database-native insufficient
43
+ ```al
44
+ // ⚠️ LAST RESORT: Application-layer processing
45
+ UnitStats.CalcFields("Total Revenue"); // FlowField calculation
46
+ ```
47
+
48
+ ##### Database-Level Operations vs Manual Processing
49
+ **Pattern**: Replace manual loops with database aggregation operations
50
+ ```al
51
+ // ❌ BEFORE: Manual processing (inefficient)
52
+ Total := 0;
53
+ if MyRecord.FindSet() then
54
+ repeat
55
+ Total += MyRecord.Amount;
56
+ until MyRecord.Next() = 0;
57
+
58
+ // ✅ AFTER: Database aggregation (efficient)
59
+ MyRecord.CalcSums(Amount);
60
+ Total := MyRecord.Amount;
61
+ ```
62
+
63
+ ##### Field Loading Optimization
64
+ **Pattern**: Use `SetLoadFields()` to load only required fields
65
+ ```al
66
+ // ❌ BEFORE: Loading all fields (wasteful)
67
+ MyRecord.FindSet();
68
+
69
+ // ✅ AFTER: Selective field loading (efficient)
70
+ MyRecord.SetLoadFields(Name, Amount, Date);
71
+ MyRecord.FindSet();
72
+ ```
73
+
74
+ #### 🟡 Priority 2: Medium Impact Optimizations
75
+ **Moderate ROI + Medium Risk** - Implement after Priority 1:
76
+
77
+ ##### Infrastructure Optimization Validation
78
+ **CRITICAL**: For optimizations applied that rely on underlying data (tables, keys, indexes), ensure the related infrastructure is updated or extended to support the necessary change.
79
+
80
+ - **Examine referenced objects**: If code references tables or other objects, analyze those for optimization opportunities
81
+ - **Validate infrastructure support**: Confirm that database structures (keys, indexes, fields) support the optimization
82
+ - **Update dependencies**: Modify tables, keys, or other infrastructure to enable optimization effectiveness
83
+ - **Cross-reference infrastructure**: Check if shared objects provide optimization opportunities for multiple modules
84
+
85
+ ##### Platform-Specific Optimization Application
86
+ - **Use knowledge base**: Apply `get_topic_content` for specific optimization techniques identified in analysis phase
87
+
88
+ ##### Advanced Platform Feature Application
89
+ - **Apply knowledge systematically**: Use `get_topic_content` for detailed implementation of optimization techniques
90
+ - **Follow best practices**: Implement optimizations according to platform-specific guidance from knowledge base
91
+
92
+ ##### Database Operation Optimization
93
+ - **Apply research findings**: Use optimization techniques discovered through MCP knowledge base analysis
94
+ - **Implement systematically**: Follow specific guidance from `get_topic_content` for identified optimization patterns
95
+
96
+ #### 🔴 Priority 3: Complex Optimizations
97
+ **High Impact + Higher Risk** - Requires careful analysis:
98
+
99
+ ##### Architectural Changes
100
+ - Restructure algorithms for better performance characteristics
101
+ - Implement caching strategies for frequently accessed data
102
+ - Consider background processing for heavy operations
103
+
104
+ ##### Advanced BC Features
105
+ - Implement table extensions for performance gains
106
+ - Utilize Business Central APIs for external integrations
107
+ - Apply advanced filtering and search techniques
108
+
109
+ ### Step 2: Implementation Guidelines
110
+
111
+ #### ⚡ Performance Best Practices
112
+ - [ ] **Measure Before Optimizing**: Establish baseline performance metrics
113
+ - [ ] **Single Responsibility**: Each optimization should address one specific bottleneck
114
+ - [ ] **Preserve Functionality**: Ensure business logic remains intact
115
+ - [ ] **Test Thoroughly**: Validate both performance improvement and correctness
116
+
117
+ #### 🛠️ Technical Implementation Standards
118
+ - [ ] **Use BC-Specific Patterns**: Prefer Business Central optimizations over generic approaches
119
+ - [ ] **Follow AL Conventions**: Maintain code style and naming conventions
120
+ - [ ] **Document Changes**: Comment optimization reasoning for future maintenance
121
+ - [ ] **Consider Scalability**: Ensure optimizations work with larger datasets
122
+
123
+ ### Step 3: Validation Framework
124
+
125
+ #### 📊 Performance Measurement
126
+ For each optimization applied:
127
+ - [ ] **Baseline Measurement**: Record original execution time/resource usage
128
+ - [ ] **Implementation**: Apply the optimization technique
129
+ - [ ] **Performance Testing**: Measure improved performance metrics
130
+ - [ ] **Impact Calculation**: Document percentage improvement achieved
131
+
132
+ #### 🎯 Success Metrics
133
+ - **Execution Time**: Target reduction in processing duration
134
+ - **Memory Usage**: Minimize memory consumption during operations
135
+ - **Database Efficiency**: Reduce number of database calls
136
+ - **Resource Utilization**: Optimize CPU and I/O usage
137
+
138
+ ### Step 4: Risk Management
139
+
140
+ #### ⚠️ Risk Assessment Categories
141
+ - [ ] **Low Risk**: Simple field access optimizations, basic query improvements
142
+ - [ ] **Medium Risk**: Algorithm changes, new BC feature usage
143
+ - [ ] **High Risk**: Architectural modifications, complex business logic changes
144
+
145
+ #### 🛡️ Mitigation Strategies
146
+ - **Code Reviews**: Peer validation of optimization approaches
147
+ - **Incremental Testing**: Apply optimizations incrementally with testing
148
+ - **Rollback Planning**: Maintain ability to revert changes if needed
149
+ - **Documentation**: Clear documentation of changes for troubleshooting
150
+
151
+ ---
152
+
153
+ ## 🔒 MANDATORY COMPLETION GATES
154
+ **CRITICAL**: Performance phase CANNOT be marked complete until ALL gates pass.
155
+
156
+ ### Gate 1: Optimization Coverage Validation
157
+ - [ ] **Cross-reference file inventory**: Every file in analysis scope must be addressed
158
+ - [ ] **Pattern application verification**: Core patterns (CalcSums, SetLoadFields) applied where identified
159
+ - [ ] **BLOCKING CONDITION**: ANY file in scope missing optimization analysis = INCOMPLETE
160
+
161
+ ### Gate 2: Infrastructure Validation
162
+ - [ ] **Table structure verification**: Any SIFT keys or infrastructure changes properly implemented
163
+ - [ ] **Dependency validation**: Related objects updated to support optimizations
164
+ - [ ] **BLOCKING CONDITION**: Code optimizations without supporting infrastructure = INVALID
165
+
166
+ ### Gate 3: Documentation Completeness
167
+ - [ ] **Optimization log accuracy**: Every claimed optimization must reference actual file/line changes
168
+ - [ ] **No phantom optimizations**: Cannot claim optimizations for non-existent files
169
+ - [ ] **BLOCKING CONDITION**: Inaccurate optimization claims = VERIFICATION REQUIRED
170
+
171
+ ## 🚨 EXECUTION VALIDATION CHECKPOINTS - MANDATORY
172
+ **CRITICAL**: Run execution validation frequently during performance work to prevent fraud.
173
+
174
+ ### Trigger Points (MUST BE EXECUTED)
175
+ 1. **After optimizing 2-3 files**: `load_methodology execution-validation`
176
+ 2. **Before claiming module complete**: BLOCK until execution validation passes
177
+ 3. **When requesting permission to continue**: Validate all claimed work first
178
+ 4. **After any substantial optimization claims** (CalcSums, SetLoadFields, etc.)
179
+
180
+ ### Execution Validation Protocol
181
+ ```markdown
182
+ ## EXECUTION VALIDATION CHECKPOINT
183
+ **MANDATORY**: Run real-time validation of optimization claims:
184
+ - Load execution-validation methodology: `load_methodology execution-validation`
185
+ - Validate file modifications and optimization existence
186
+ - BLOCKING: Cannot proceed until all validation checks pass
187
+ - Document any discrepancies and correct immediately
188
+ ```
189
+
190
+ ### Integration with Performance Work
191
+ - **During optimization**: Run micro-validation every 2-3 files
192
+ - **Before completion claims**: BLOCK until execution validation complete
193
+ - **Real-time fraud detection**: Immediately catch false optimization claims
194
+
195
+ ## Success Criteria
196
+ ✅ **Measurable Improvement**: Documented performance gains from optimizations
197
+ ✅ **Functional Preservation**: All business functionality remains intact
198
+ ✅ **Best Practice Compliance**: Solutions follow Business Central optimization patterns
199
+ ✅ **Scalability Validation**: Optimizations work effectively with production data volumes
200
+ ✅ **MANDATORY**: ALL completion gates passed before proceeding to verification
201
+
202
+ ## Quality Validation
203
+ - **Performance Verification**: Are claimed improvements actually measurable?
204
+ - **Code Quality**: Does the optimized code maintain readability and maintainability?
205
+ - **Business Logic Integrity**: Have you preserved all original business requirements?
206
+ - **BC Pattern Compliance**: Are you using Business Central features appropriately?
207
+
208
+ ---
209
+
210
+ ## Next Phase
211
211
  Upon completion, proceed to **Testing & Validation Phase** to confirm optimization effectiveness in production-like scenarios.
@@ -1,32 +1,32 @@
1
- # Performance Phase - Quick Reference
2
-
3
- ## 📚 NEED MORE DETAIL?
4
- For implementation examples and detailed guidance: `load_methodology performance-full`
5
-
6
- ## 🎯 OBJECTIVE
7
- Apply systematic optimizations with real-time validation to prevent execution fraud.
8
-
9
- ## ⚡ CORE PROCESS
10
- 1. **Priority Order**: Database-native (CalcSums) → Platform-optimized (SetLoadFields) → Application-level (FlowFields)
11
- 2. **Infrastructure Check**: Update tables/keys to support optimizations (SIFT keys for CalcSums)
12
- 3. **Apply Optimizations**: Focus on high-impact patterns from analysis phase
13
- 4. **Execution Validation**: Run `load_methodology execution-validation` every 2-3 files
14
-
15
- ## 🚨 EXECUTION CHECKPOINTS (MANDATORY)
16
- - **After 2-3 files**: `load_methodology execution-validation`
17
- - **Before module claims**: BLOCK until validation passes
18
- - **Before continuing**: Validate all claimed work exists
19
- - **After optimization claims**: Verify CalcSums/SetLoadFields actually implemented
20
-
21
- ## 🔍 OPTIMIZATION HIERARCHY
22
- **Tier 1**: `MyRecord.CalcSums(Amount)` - Database aggregation
23
- **Tier 2**: `MyRecord.SetLoadFields()` - Field optimization
24
- **Tier 3**: `MyRecord.CalcFields()` - FlowField calculations
25
-
26
- ## 🚨 BLOCKING CONDITIONS
27
- - **Optimization without infrastructure** = INVALID
28
- - **Claims without file modifications** = FRAUD
29
- - **Incomplete coverage** of analysis scope = INCOMPLETE
30
-
31
- ## ➡️ NEXT PHASE
1
+ # Performance Phase - Quick Reference
2
+
3
+ ## 📚 NEED MORE DETAIL?
4
+ For implementation examples and detailed guidance: `load_methodology performance-full`
5
+
6
+ ## 🎯 OBJECTIVE
7
+ Apply systematic optimizations with real-time validation to prevent execution fraud.
8
+
9
+ ## ⚡ CORE PROCESS
10
+ 1. **Priority Order**: Database-native (CalcSums) → Platform-optimized (SetLoadFields) → Application-level (FlowFields)
11
+ 2. **Infrastructure Check**: Update tables/keys to support optimizations (SIFT keys for CalcSums)
12
+ 3. **Apply Optimizations**: Focus on high-impact patterns from analysis phase
13
+ 4. **Execution Validation**: Run `load_methodology execution-validation` every 2-3 files
14
+
15
+ ## 🚨 EXECUTION CHECKPOINTS (MANDATORY)
16
+ - **After 2-3 files**: `load_methodology execution-validation`
17
+ - **Before module claims**: BLOCK until validation passes
18
+ - **Before continuing**: Validate all claimed work exists
19
+ - **After optimization claims**: Verify CalcSums/SetLoadFields actually implemented
20
+
21
+ ## 🔍 OPTIMIZATION HIERARCHY
22
+ **Tier 1**: `MyRecord.CalcSums(Amount)` - Database aggregation
23
+ **Tier 2**: `MyRecord.SetLoadFields()` - Field optimization
24
+ **Tier 3**: `MyRecord.CalcFields()` - FlowField calculations
25
+
26
+ ## 🚨 BLOCKING CONDITIONS
27
+ - **Optimization without infrastructure** = INVALID
28
+ - **Claims without file modifications** = FRAUD
29
+ - **Incomplete coverage** of analysis scope = INCOMPLETE
30
+
31
+ ## ➡️ NEXT PHASE
32
32
  Execution validation → Verification phase for final coverage audit