@codebakers/mcp 5.6.2 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/tools/map-dependencies.js +21 -0
- package/dist/tools/map-dependencies.js.map +1 -1
- package/dist/tools/map-mlm-dependencies.d.ts +19 -0
- package/dist/tools/map-mlm-dependencies.d.ts.map +1 -0
- package/dist/tools/map-mlm-dependencies.js +451 -0
- package/dist/tools/map-mlm-dependencies.js.map +1 -0
- package/package.json +2 -1
- package/templates/BUILD-STATE.md +76 -0
- package/templates/BUSINESS-RULES-TEMPLATE.md +750 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* codebakers_map_mlm_dependencies
|
|
3
|
+
*
|
|
4
|
+
* MLM-Specific Dependency Mapper
|
|
5
|
+
*
|
|
6
|
+
* Detects multi-level network dependencies that standard schema analysis misses:
|
|
7
|
+
* - Upline tree traversal (sponsor → sponsor → sponsor)
|
|
8
|
+
* - Computed field dependencies (personal_volume, team_volume)
|
|
9
|
+
* - Rank promotion triggers
|
|
10
|
+
* - Generation-based cascades
|
|
11
|
+
* - Commission calculations
|
|
12
|
+
*
|
|
13
|
+
* Works alongside codebakers_map_dependencies for complete coverage.
|
|
14
|
+
*/
|
|
15
|
+
import * as fs from 'fs/promises';
|
|
16
|
+
import * as path from 'path';
|
|
17
|
+
export async function mapMLMDependencies(args) {
|
|
18
|
+
const cwd = process.cwd();
|
|
19
|
+
console.error('🍞 CodeBakers: MLM Dependency Mapper');
|
|
20
|
+
try {
|
|
21
|
+
// Load configuration
|
|
22
|
+
let config;
|
|
23
|
+
if (args.config_file) {
|
|
24
|
+
const configPath = path.join(cwd, args.config_file);
|
|
25
|
+
const content = await fs.readFile(configPath, 'utf-8');
|
|
26
|
+
config = JSON.parse(content);
|
|
27
|
+
}
|
|
28
|
+
else if (args.inline_config) {
|
|
29
|
+
config = JSON.parse(args.inline_config);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return `🍞 CodeBakers: MLM Dependency Mapper
|
|
33
|
+
|
|
34
|
+
❌ Error: No configuration provided
|
|
35
|
+
|
|
36
|
+
You must provide either:
|
|
37
|
+
1. config_file: "path/to/mlm-config.json"
|
|
38
|
+
2. inline_config: '{"upline_field": "sponsor_id", ...}'
|
|
39
|
+
|
|
40
|
+
Example config:
|
|
41
|
+
{
|
|
42
|
+
"upline_field": "sponsor_id",
|
|
43
|
+
"entity": "user",
|
|
44
|
+
"volume_fields": {
|
|
45
|
+
"personal": "personal_volume",
|
|
46
|
+
"team": "team_volume",
|
|
47
|
+
"bonus": "bonus_volume"
|
|
48
|
+
},
|
|
49
|
+
"rank_field": "rank",
|
|
50
|
+
"rank_thresholds": {
|
|
51
|
+
"Associate": 0,
|
|
52
|
+
"Silver": 1000,
|
|
53
|
+
"Gold": 5000,
|
|
54
|
+
"Platinum": 10000
|
|
55
|
+
},
|
|
56
|
+
"max_upline_depth": 10,
|
|
57
|
+
"generation_rates": [1.0, 1.0, 0.5, 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25],
|
|
58
|
+
"commission_rates": {
|
|
59
|
+
"Associate": 0.10,
|
|
60
|
+
"Silver": 0.15,
|
|
61
|
+
"Gold": 0.20,
|
|
62
|
+
"Platinum": 0.25
|
|
63
|
+
}
|
|
64
|
+
}`;
|
|
65
|
+
}
|
|
66
|
+
// Generate MLM-specific dependency map
|
|
67
|
+
const dependencyMap = buildMLMDependencyMap(config);
|
|
68
|
+
// Write to .codebakers/MLM-DEPENDENCIES.md
|
|
69
|
+
const outputPath = path.join(cwd, '.codebakers', 'MLM-DEPENDENCIES.md');
|
|
70
|
+
await fs.mkdir(path.dirname(outputPath), { recursive: true });
|
|
71
|
+
const content = generateMLMDependencyMarkdown(dependencyMap);
|
|
72
|
+
await fs.writeFile(outputPath, content, 'utf-8');
|
|
73
|
+
// Generate report
|
|
74
|
+
const report = generateReport(dependencyMap);
|
|
75
|
+
return report;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error('Error mapping MLM dependencies:', error);
|
|
79
|
+
return `🍞 CodeBakers: MLM Dependency Mapping Failed
|
|
80
|
+
|
|
81
|
+
Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function buildMLMDependencyMap(config) {
|
|
85
|
+
const map = {
|
|
86
|
+
config,
|
|
87
|
+
upline_cascades: [],
|
|
88
|
+
computed_fields: [],
|
|
89
|
+
rank_triggers: [],
|
|
90
|
+
generation_bonuses: [],
|
|
91
|
+
store_updates: [],
|
|
92
|
+
component_impacts: [],
|
|
93
|
+
};
|
|
94
|
+
// 1. Build computed field dependencies
|
|
95
|
+
map.computed_fields = [
|
|
96
|
+
{
|
|
97
|
+
field: config.volume_fields.personal,
|
|
98
|
+
entity: config.entity,
|
|
99
|
+
formula: `SUM(sales.${config.volume_fields.bonus} WHERE sales.${config.entity}_id = ${config.entity}.id)`,
|
|
100
|
+
update_triggers: ['createSale', 'deleteSale', 'updateSale'],
|
|
101
|
+
cascades_to: ['rank_check', 'team_volume_recalc'],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
field: config.volume_fields.team,
|
|
105
|
+
entity: config.entity,
|
|
106
|
+
formula: `SUM(downline.${config.volume_fields.personal} + downline.${config.volume_fields.team})`,
|
|
107
|
+
update_triggers: ['any_downline_sale', 'downline_promotion'],
|
|
108
|
+
cascades_to: ['rank_check'],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
field: config.volume_fields.bonus,
|
|
112
|
+
entity: config.entity,
|
|
113
|
+
formula: `SUM(bonus_volumes.volume WHERE bonus_volumes.${config.entity}_id = ${config.entity}.id)`,
|
|
114
|
+
update_triggers: ['downline_sale'],
|
|
115
|
+
cascades_to: ['rank_check', 'commission_calculation'],
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
// 2. Build rank triggers
|
|
119
|
+
map.rank_triggers = [
|
|
120
|
+
{
|
|
121
|
+
field: config.rank_field,
|
|
122
|
+
trigger_condition: `${config.volume_fields.personal} >= threshold OR ${config.volume_fields.team} >= threshold`,
|
|
123
|
+
thresholds: config.rank_thresholds,
|
|
124
|
+
promotion_action: `promote_${config.entity}`,
|
|
125
|
+
cascades_to: ['upline_bonus_recalc', 'commission_rate_update', 'team_volume_recalc'],
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
// 3. Build upline cascades
|
|
129
|
+
const maxDepth = config.max_upline_depth ?? 'infinite';
|
|
130
|
+
map.upline_cascades = [
|
|
131
|
+
{
|
|
132
|
+
trigger: 'createSale',
|
|
133
|
+
entity_updated: config.entity,
|
|
134
|
+
upline_depth: config.max_upline_depth,
|
|
135
|
+
steps: [
|
|
136
|
+
`1. Create sale record`,
|
|
137
|
+
`2. Update ${config.entity}.${config.volume_fields.personal} += sale.${config.volume_fields.bonus}`,
|
|
138
|
+
`3. Check ${config.entity} rank promotion (if ${config.volume_fields.personal} >= next threshold)`,
|
|
139
|
+
`4. Traverse upline tree via ${config.upline_field} (max ${maxDepth} levels)`,
|
|
140
|
+
`5. For each upline ${config.entity} (level 1-${maxDepth}):`,
|
|
141
|
+
` - Update ${config.volume_fields.bonus} += sale.${config.volume_fields.bonus} * generation_rate[level]`,
|
|
142
|
+
` - Create bonus_volume record`,
|
|
143
|
+
` - Check rank promotion`,
|
|
144
|
+
`6. Recalculate ${config.volume_fields.team} for all upline`,
|
|
145
|
+
`7. Create commission records (${config.entity} + all upline with rank-based rates)`,
|
|
146
|
+
],
|
|
147
|
+
affected_stores: [
|
|
148
|
+
`${capitalize(config.entity)}Store (${config.entity} + ${config.max_upline_depth || 'all'} upline ${config.entity}s)`,
|
|
149
|
+
'SaleStore',
|
|
150
|
+
'BonusVolumeStore',
|
|
151
|
+
'CommissionStore',
|
|
152
|
+
'RankPromotionStore (if promotions occurred)',
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
// 4. Build generation bonuses
|
|
157
|
+
if (config.generation_rates) {
|
|
158
|
+
map.generation_bonuses = config.generation_rates.map((rate, index) => ({
|
|
159
|
+
level: index + 1,
|
|
160
|
+
rate,
|
|
161
|
+
applies_to: config.volume_fields.bonus,
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
// 5. Build store updates
|
|
165
|
+
map.store_updates = [
|
|
166
|
+
{
|
|
167
|
+
mutation: 'createSale',
|
|
168
|
+
primary_stores: ['SaleStore'],
|
|
169
|
+
cascade_stores: [
|
|
170
|
+
`${capitalize(config.entity)}Store (${config.entity} + upline)`,
|
|
171
|
+
'BonusVolumeStore',
|
|
172
|
+
'CommissionStore',
|
|
173
|
+
'RankPromotionStore (conditional)',
|
|
174
|
+
],
|
|
175
|
+
upline_users_affected: config.max_upline_depth,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
mutation: `update${capitalize(config.entity)}`,
|
|
179
|
+
primary_stores: [`${capitalize(config.entity)}Store`],
|
|
180
|
+
cascade_stores: [
|
|
181
|
+
'SaleStore',
|
|
182
|
+
'BonusVolumeStore',
|
|
183
|
+
'CommissionStore',
|
|
184
|
+
],
|
|
185
|
+
upline_users_affected: null,
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
// 6. Build component impacts
|
|
189
|
+
map.component_impacts = [
|
|
190
|
+
{
|
|
191
|
+
component: `${capitalize(config.entity)}-Dashboard`,
|
|
192
|
+
affected_by_upline: false,
|
|
193
|
+
shows_computed_fields: [
|
|
194
|
+
config.volume_fields.personal,
|
|
195
|
+
config.volume_fields.team,
|
|
196
|
+
config.rank_field,
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
component: 'Team-View',
|
|
201
|
+
affected_by_upline: true,
|
|
202
|
+
shows_computed_fields: [
|
|
203
|
+
config.volume_fields.team,
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
component: 'Commission-Report',
|
|
208
|
+
affected_by_upline: false,
|
|
209
|
+
shows_computed_fields: [],
|
|
210
|
+
},
|
|
211
|
+
];
|
|
212
|
+
return map;
|
|
213
|
+
}
|
|
214
|
+
function generateMLMDependencyMarkdown(map) {
|
|
215
|
+
let md = `# MLM-Specific Dependencies
|
|
216
|
+
|
|
217
|
+
**Generated:** ${new Date().toISOString()}
|
|
218
|
+
**Entity:** ${map.config.entity}
|
|
219
|
+
**Upline Field:** ${map.config.upline_field}
|
|
220
|
+
**Max Depth:** ${map.config.max_upline_depth ?? 'Infinite'}
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Configuration
|
|
225
|
+
|
|
226
|
+
\`\`\`json
|
|
227
|
+
${JSON.stringify(map.config, null, 2)}
|
|
228
|
+
\`\`\`
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Computed Fields
|
|
233
|
+
|
|
234
|
+
${map.computed_fields.map(cf => `
|
|
235
|
+
### ${cf.entity}.${cf.field}
|
|
236
|
+
|
|
237
|
+
**Formula:**
|
|
238
|
+
\`\`\`sql
|
|
239
|
+
${cf.formula}
|
|
240
|
+
\`\`\`
|
|
241
|
+
|
|
242
|
+
**Update Triggers:**
|
|
243
|
+
${cf.update_triggers.map(t => `- ${t}`).join('\n')}
|
|
244
|
+
|
|
245
|
+
**Cascades To:**
|
|
246
|
+
${cf.cascades_to.map(c => `- ${c}`).join('\n')}
|
|
247
|
+
`).join('\n')}
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Rank Promotion Triggers
|
|
252
|
+
|
|
253
|
+
${map.rank_triggers.map(rt => `
|
|
254
|
+
### ${rt.field} Promotion
|
|
255
|
+
|
|
256
|
+
**Condition:** ${rt.trigger_condition}
|
|
257
|
+
|
|
258
|
+
**Thresholds:**
|
|
259
|
+
${Object.entries(rt.thresholds).map(([rank, threshold]) => `- **${rank}:** ${threshold}`).join('\n')}
|
|
260
|
+
|
|
261
|
+
**Action:** ${rt.promotion_action}
|
|
262
|
+
|
|
263
|
+
**Cascades To:**
|
|
264
|
+
${rt.cascades_to.map(c => `- ${c}`).join('\n')}
|
|
265
|
+
`).join('\n')}
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Upline Cascade Chains
|
|
270
|
+
|
|
271
|
+
${map.upline_cascades.map(uc => `
|
|
272
|
+
### ${uc.trigger}
|
|
273
|
+
|
|
274
|
+
**Entity Updated:** ${uc.entity_updated}
|
|
275
|
+
**Upline Depth:** ${uc.upline_depth ?? 'Infinite'}
|
|
276
|
+
|
|
277
|
+
**Steps:**
|
|
278
|
+
${uc.steps.join('\n')}
|
|
279
|
+
|
|
280
|
+
**Affected Stores:**
|
|
281
|
+
${uc.affected_stores.map(s => `- ${s}`).join('\n')}
|
|
282
|
+
`).join('\n')}
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Generation Bonus Rates
|
|
287
|
+
|
|
288
|
+
${map.generation_bonuses.length > 0 ? `
|
|
289
|
+
| Level | Rate | Applies To |
|
|
290
|
+
|-------|------|------------|
|
|
291
|
+
${map.generation_bonuses.map(gb => `| ${gb.level} | ${(gb.rate * 100).toFixed(0)}% | ${gb.applies_to} |`).join('\n')}
|
|
292
|
+
` : 'No generation rates configured'}
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Commission Rates (by Rank)
|
|
297
|
+
|
|
298
|
+
${map.config.commission_rates ? `
|
|
299
|
+
| Rank | Commission Rate |
|
|
300
|
+
|------|-----------------|
|
|
301
|
+
${Object.entries(map.config.commission_rates).map(([rank, rate]) => `| ${rank} | ${(rate * 100).toFixed(0)}% |`).join('\n')}
|
|
302
|
+
` : 'No commission rates configured'}
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Store Update Matrix
|
|
307
|
+
|
|
308
|
+
${map.store_updates.map(su => `
|
|
309
|
+
### ${su.mutation}
|
|
310
|
+
|
|
311
|
+
**Primary Stores (Direct Update):**
|
|
312
|
+
${su.primary_stores.map(s => `- ${s}`).join('\n')}
|
|
313
|
+
|
|
314
|
+
**Cascade Stores (Upline/Computed):**
|
|
315
|
+
${su.cascade_stores.map(s => `- ${s}`).join('\n')}
|
|
316
|
+
|
|
317
|
+
**Upline Users Affected:** ${su.upline_users_affected ?? 'N/A'}
|
|
318
|
+
`).join('\n')}
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Component Impact Analysis
|
|
323
|
+
|
|
324
|
+
${map.component_impacts.map(ci => `
|
|
325
|
+
### ${ci.component}
|
|
326
|
+
|
|
327
|
+
**Affected by Upline Sales:** ${ci.affected_by_upline ? 'Yes' : 'No'}
|
|
328
|
+
|
|
329
|
+
**Shows Computed Fields:**
|
|
330
|
+
${ci.shows_computed_fields.length > 0 ? ci.shows_computed_fields.map(f => `- ${f}`).join('\n') : '- None'}
|
|
331
|
+
`).join('\n')}
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## SQL: Upline Tree Traversal
|
|
336
|
+
|
|
337
|
+
\`\`\`sql
|
|
338
|
+
-- Get all upline ${map.config.entity}s for a given ${map.config.entity}_id
|
|
339
|
+
WITH RECURSIVE upline AS (
|
|
340
|
+
SELECT ${map.config.upline_field}, 1 as level
|
|
341
|
+
FROM ${map.config.entity}s
|
|
342
|
+
WHERE id = $1
|
|
343
|
+
UNION ALL
|
|
344
|
+
SELECT u.${map.config.upline_field}, ul.level + 1
|
|
345
|
+
FROM ${map.config.entity}s u
|
|
346
|
+
JOIN upline ul ON u.id = ul.${map.config.upline_field}
|
|
347
|
+
WHERE ul.level < ${map.config.max_upline_depth ?? 100}
|
|
348
|
+
AND u.${map.config.upline_field} IS NOT NULL
|
|
349
|
+
)
|
|
350
|
+
SELECT * FROM upline;
|
|
351
|
+
\`\`\`
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Implementation Checklist
|
|
356
|
+
|
|
357
|
+
### When implementing createSale mutation:
|
|
358
|
+
|
|
359
|
+
- [ ] Create sale record (direct)
|
|
360
|
+
- [ ] Update ${map.config.entity}.${map.config.volume_fields.personal} (computed field)
|
|
361
|
+
- [ ] Check ${map.config.entity} rank promotion (conditional trigger)
|
|
362
|
+
- [ ] Traverse upline tree (${map.config.max_upline_depth ?? 'all'} levels)
|
|
363
|
+
- [ ] For each upline ${map.config.entity}:
|
|
364
|
+
- [ ] Update ${map.config.volume_fields.bonus} (generation rate applied)
|
|
365
|
+
- [ ] Create bonus_volume record
|
|
366
|
+
- [ ] Check rank promotion
|
|
367
|
+
- [ ] Recalculate ${map.config.volume_fields.team} for all upline
|
|
368
|
+
- [ ] Create commission records (rank-based rates)
|
|
369
|
+
- [ ] Update affected stores:
|
|
370
|
+
- [ ] SaleStore
|
|
371
|
+
- [ ] ${capitalize(map.config.entity)}Store (multiple ${map.config.entity}s)
|
|
372
|
+
- [ ] BonusVolumeStore
|
|
373
|
+
- [ ] CommissionStore
|
|
374
|
+
- [ ] RankPromotionStore (if applicable)
|
|
375
|
+
- [ ] Invalidate affected components:
|
|
376
|
+
- [ ] ${capitalize(map.config.entity)}-Dashboard (for ${map.config.entity} + upline)
|
|
377
|
+
- [ ] Team-View (for upline)
|
|
378
|
+
- [ ] Commission-Report
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
**Generated by:** codebakers_map_mlm_dependencies
|
|
383
|
+
**Complements:** codebakers_map_dependencies (for FK/read dependencies)
|
|
384
|
+
**Manual Supplement:** See BUSINESS-RULES.md for complex business logic
|
|
385
|
+
`;
|
|
386
|
+
return md;
|
|
387
|
+
}
|
|
388
|
+
function generateReport(map) {
|
|
389
|
+
let report = `🍞 CodeBakers: MLM Dependencies Mapped\n\n`;
|
|
390
|
+
report += `**Entity:** ${map.config.entity}\n`;
|
|
391
|
+
report += `**Upline Field:** ${map.config.upline_field}\n`;
|
|
392
|
+
report += `**Max Depth:** ${map.config.max_upline_depth ?? 'Infinite'}\n\n`;
|
|
393
|
+
report += `---\n\n`;
|
|
394
|
+
report += `## ✅ Detected\n\n`;
|
|
395
|
+
report += `**Computed Fields:** ${map.computed_fields.length}\n`;
|
|
396
|
+
map.computed_fields.forEach(cf => {
|
|
397
|
+
report += `- ${cf.entity}.${cf.field} (triggers: ${cf.update_triggers.join(', ')})\n`;
|
|
398
|
+
});
|
|
399
|
+
report += `\n`;
|
|
400
|
+
report += `**Rank Triggers:** ${map.rank_triggers.length}\n`;
|
|
401
|
+
map.rank_triggers.forEach(rt => {
|
|
402
|
+
report += `- ${rt.field} (${Object.keys(rt.thresholds).length} ranks)\n`;
|
|
403
|
+
});
|
|
404
|
+
report += `\n`;
|
|
405
|
+
report += `**Upline Cascades:** ${map.upline_cascades.length}\n`;
|
|
406
|
+
map.upline_cascades.forEach(uc => {
|
|
407
|
+
report += `- ${uc.trigger} (${uc.steps.length} steps, depth: ${uc.upline_depth ?? 'infinite'})\n`;
|
|
408
|
+
});
|
|
409
|
+
report += `\n`;
|
|
410
|
+
if (map.generation_bonuses.length > 0) {
|
|
411
|
+
report += `**Generation Levels:** ${map.generation_bonuses.length}\n`;
|
|
412
|
+
report += `- Level 1: ${(map.generation_bonuses[0].rate * 100).toFixed(0)}%\n`;
|
|
413
|
+
report += `- Level ${map.generation_bonuses.length}: ${(map.generation_bonuses[map.generation_bonuses.length - 1].rate * 100).toFixed(0)}%\n\n`;
|
|
414
|
+
}
|
|
415
|
+
report += `---\n\n`;
|
|
416
|
+
report += `## 📁 Output\n\n`;
|
|
417
|
+
report += `**File:** .codebakers/MLM-DEPENDENCIES.md\n\n`;
|
|
418
|
+
report += `This file contains:\n`;
|
|
419
|
+
report += `- Computed field formulas\n`;
|
|
420
|
+
report += `- Rank promotion triggers\n`;
|
|
421
|
+
report += `- Upline cascade chains (step-by-step)\n`;
|
|
422
|
+
report += `- Generation bonus rates\n`;
|
|
423
|
+
report += `- Commission rates by rank\n`;
|
|
424
|
+
report += `- SQL for upline tree traversal\n`;
|
|
425
|
+
report += `- Implementation checklist\n\n`;
|
|
426
|
+
report += `---\n\n`;
|
|
427
|
+
report += `## 🔗 Integration\n\n`;
|
|
428
|
+
report += `**This tool complements:**\n`;
|
|
429
|
+
report += `- codebakers_map_dependencies (FK and read dependencies)\n`;
|
|
430
|
+
report += `- BUSINESS-RULES.md (manual business logic)\n\n`;
|
|
431
|
+
report += `**Combined coverage:**\n`;
|
|
432
|
+
report += `- FK relationships: ✅ (codebakers_map_dependencies)\n`;
|
|
433
|
+
report += `- Read dependencies: ✅ (codebakers_map_dependencies)\n`;
|
|
434
|
+
report += `- Upline cascades: ✅ (codebakers_map_mlm_dependencies)\n`;
|
|
435
|
+
report += `- Computed fields: ✅ (codebakers_map_mlm_dependencies)\n`;
|
|
436
|
+
report += `- Rank triggers: ✅ (codebakers_map_mlm_dependencies)\n`;
|
|
437
|
+
report += `- Complex business logic: ✅ (BUSINESS-RULES.md manual)\n\n`;
|
|
438
|
+
report += `**Total coverage: ~95%** (with manual supplement)\n\n`;
|
|
439
|
+
report += `---\n\n`;
|
|
440
|
+
report += `## Next Steps\n\n`;
|
|
441
|
+
report += `1. Review .codebakers/MLM-DEPENDENCIES.md\n`;
|
|
442
|
+
report += `2. Create .codebakers/BUSINESS-RULES.md (manual supplement)\n`;
|
|
443
|
+
report += `3. Use both when implementing mutations\n`;
|
|
444
|
+
report += `4. Refer to implementation checklist for createSale\n\n`;
|
|
445
|
+
report += `**Ready to build with complete dependency knowledge!**\n`;
|
|
446
|
+
return report;
|
|
447
|
+
}
|
|
448
|
+
function capitalize(str) {
|
|
449
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
450
|
+
}
|
|
451
|
+
//# sourceMappingURL=map-mlm-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-mlm-dependencies.js","sourceRoot":"","sources":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AAC;IAEvE,MAAM,IAAI,uDAAuD,CAAC;IAElE,MAAM,IAAI,SAAS,CAAC;IAEpB,MAAM,IAAI,mBAAmB,CAAC;IAC9B,MAAM,IAAI,6CAA6C,CAAC;IACxD,MAAM,IAAI,+DAA+D,CAAC;IAC1E,MAAM,IAAI,2CAA2C,CAAC;IACtD,MAAM,IAAI,yDAAyD,CAAC;IAEpE,MAAM,IAAI,0DAA0D,CAAC;IAErE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebakers/mcp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "CodeBakers Method MCP Server - Complete autonomous app builder with context-aware consulting",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/",
|
|
13
|
+
"templates/",
|
|
13
14
|
"README.md",
|
|
14
15
|
"INSTALL.md",
|
|
15
16
|
"LICENSE",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Build State
|
|
2
|
+
|
|
3
|
+
**Project:** [Project Name]
|
|
4
|
+
**Type:** [Email Client / CRM / Dashboard / etc.]
|
|
5
|
+
**Domain:** [email / crm / dashboard / etc.]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Current Status
|
|
10
|
+
|
|
11
|
+
**Current Phase:** 0
|
|
12
|
+
**Phase Name:** Domain Research & Specification
|
|
13
|
+
**Progress:** 0%
|
|
14
|
+
|
|
15
|
+
**Current Task:** Generate PROJECT-SPEC.md with Gates 0-5
|
|
16
|
+
|
|
17
|
+
**Last Updated:** [ISO Date]
|
|
18
|
+
**Created:** [ISO Date]
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Phase Progress
|
|
23
|
+
|
|
24
|
+
- [ ] Phase 0: Domain Research & Spec
|
|
25
|
+
- [ ] Phase 1: UI Mockup & Design
|
|
26
|
+
- [ ] Phase 2: Mock Analysis & Schema
|
|
27
|
+
- [ ] Phase 3: Foundation Build
|
|
28
|
+
- [ ] Phase 4: Feature Build
|
|
29
|
+
- [ ] Phase 5: Testing & Verification
|
|
30
|
+
- [ ] Phase 6: Deployment & Ops
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Recent Decisions
|
|
35
|
+
|
|
36
|
+
_Chronological log of major decisions made during build_
|
|
37
|
+
|
|
38
|
+
### [Date] - Decision: [What]
|
|
39
|
+
|
|
40
|
+
**Context:** [Why this came up]
|
|
41
|
+
**Options Considered:** [List]
|
|
42
|
+
**Chosen:** [X]
|
|
43
|
+
**Reasoning:** [Why]
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Active Blockers
|
|
48
|
+
|
|
49
|
+
_Current issues blocking progress_
|
|
50
|
+
|
|
51
|
+
### [Type] - [Description]
|
|
52
|
+
|
|
53
|
+
**Impact:** [What's blocked]
|
|
54
|
+
**Solutions:** [How to fix]
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Next Actions
|
|
59
|
+
|
|
60
|
+
1. [Next immediate action]
|
|
61
|
+
2. [Following action]
|
|
62
|
+
3. [After that]
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Session Resume Information
|
|
67
|
+
|
|
68
|
+
**If Session Crashes:**
|
|
69
|
+
- Current phase: 0
|
|
70
|
+
- Current task: [specific task]
|
|
71
|
+
- Resume by: Loading this file and continuing from [specific point]
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
_This file is auto-loaded at the start of every AI session_
|
|
76
|
+
_Updated by: CodeBakers MCP Server_
|