Skip to content

Commit 7c16cf9

Browse files
committed
feat(decisions): remove bonus skills check from evaluation
- Removed checkBonusSkills AI tool from evaluation endpoint - Removed BONUS node from decision tree config - Updated edges to connect salary directly to strong/possible outcomes - Removed all bonusCheck logic from useDecisionTree hook - Removed BONUS from nodeToPreferenceMap - Updated max score calculation (removed 5 bonus points) The bonus skills check was redundant - required skills percentage already captures skill match quality. Simpler decision tree with 7 criteria instead of 8 makes evaluations clearer and faster.
1 parent 6a42f1d commit 7c16cf9

File tree

3 files changed

+7
-62
lines changed

3 files changed

+7
-62
lines changed

apps/registry/app/[username]/decisions/config/decisionTree.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ const baseNodes = [
142142
style: nodeStyle(),
143143
type: 'default',
144144
},
145-
{
146-
id: NODE_IDS.BONUS,
147-
data: { label: 'Bonus skill overlap?' },
148-
style: nodeStyle(),
149-
type: 'default',
150-
},
151145
{
152146
id: NODE_IDS.STRONG,
153147
data: { label: '✅ Strong Match' },
@@ -241,18 +235,14 @@ const baseEdges = [
241235
'No (maybe later)'
242236
),
243237

244-
// Salary → Bonus or Possible
245-
createEdge('e_sal_bonus_yes', NODE_IDS.SAL, NODE_IDS.BONUS, 'Yes'),
238+
// Salary → Strong or Possible
239+
createEdge('e_sal_strong_yes', NODE_IDS.SAL, NODE_IDS.STRONG, 'Yes'),
246240
createEdge(
247241
'e_sal_possible_no',
248242
NODE_IDS.SAL,
249243
NODE_IDS.POSSIBLE,
250244
'No (negotiate?)'
251245
),
252-
253-
// Bonus → Strong or Possible
254-
createEdge('e_bonus_strong_yes', NODE_IDS.BONUS, NODE_IDS.STRONG, 'Yes'),
255-
createEdge('e_bonus_possible_no', NODE_IDS.BONUS, NODE_IDS.POSSIBLE, 'No'),
256246
];
257247

258248
// Apply dagre layout to position nodes

apps/registry/app/[username]/decisions/hooks/useDecisionTree.js

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const nodeToPreferenceMap = {
2222
[NODE_IDS.LOC]: 'location',
2323
[NODE_IDS.TZ]: 'timezone',
2424
[NODE_IDS.SAL]: 'salary',
25-
[NODE_IDS.BONUS]: 'skills', // Bonus skills uses same preference as core skills
2625
// WR (work rights) and AVAIL (availability) always enabled
2726
};
2827

@@ -230,7 +229,6 @@ export function useDecisionTree(resume, preferences = {}) {
230229
const timezoneCheck = decisions.checkTimezone;
231230
const availCheck = decisions.checkAvailability;
232231
const salaryCheck = decisions.checkSalary;
233-
const bonusCheck = decisions.checkBonusSkills;
234232

235233
// Build reasons array
236234
if (skillsCheck) reasons.push(['Required Skills', skillsCheck.reasoning]);
@@ -241,7 +239,6 @@ export function useDecisionTree(resume, preferences = {}) {
241239
if (timezoneCheck) reasons.push(['Timezone', timezoneCheck.reasoning]);
242240
if (availCheck) reasons.push(['Availability', availCheck.reasoning]);
243241
if (salaryCheck) reasons.push(['Salary', salaryCheck.reasoning]);
244-
if (bonusCheck) reasons.push(['Bonus Skills', bonusCheck.reasoning]);
245242

246243
// COLOR ALL NODES based on their results
247244
if (skillsCheck) {
@@ -276,10 +273,6 @@ export function useDecisionTree(resume, preferences = {}) {
276273
updateNodeColor(NODE_IDS.SAL, salaryCheck.salaryAligned);
277274
if (salaryCheck.salaryAligned) score += 5;
278275
}
279-
if (bonusCheck) {
280-
updateNodeColor(NODE_IDS.BONUS, bonusCheck.hasBonusSkills);
281-
if (bonusCheck.hasBonusSkills) score += 5;
282-
}
283276

284277
// Determine outcome and where we fail on the path
285278
const matchPct = skillsCheck?.matchPercentage || 0;
@@ -310,9 +303,6 @@ export function useDecisionTree(resume, preferences = {}) {
310303
} else if (salaryCheck && !salaryCheck.salaryAligned) {
311304
finalOutcome = 'possibleMatch';
312305
failedAtNode = NODE_IDS.SAL;
313-
} else if (bonusCheck && !bonusCheck.hasBonusSkills) {
314-
finalOutcome = 'possibleMatch';
315-
failedAtNode = NODE_IDS.BONUS;
316306
}
317307

318308
// Now animate ONLY the actual path taken
@@ -498,27 +488,11 @@ export function useDecisionTree(resume, preferences = {}) {
498488
// PASSED - continue
499489
updateNodeColor(NODE_IDS.SAL, true);
500490
score += 5;
501-
highlightEdge('e_sal_bonus_yes', colors.paths.blue);
502-
503-
// Check 7: Bonus Skills
504-
if (bonusCheck) {
505-
if (!bonusCheck.hasBonusSkills) {
506-
// FAILED - end as possible match
507-
updateNodeColor(NODE_IDS.BONUS, false);
508-
highlightEdge(
509-
'e_bonus_possible_no',
510-
colors.outcomes.possibleMatch.border
511-
);
512-
} else {
513-
// PASSED - strong match!
514-
updateNodeColor(NODE_IDS.BONUS, true);
515-
score += 5;
516-
highlightEdge(
517-
'e_bonus_strong_yes',
518-
colors.outcomes.strongMatch.border
519-
);
520-
}
521-
}
491+
// PASSED salary - strong match!
492+
highlightEdge(
493+
'e_sal_strong_yes',
494+
colors.outcomes.strongMatch.border
495+
);
522496
}
523497
}
524498
}

apps/registry/app/api/decisions/evaluate/route.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ const tools = {
116116
reasoning: z.string().describe('Brief explanation of the decision'),
117117
}),
118118
}),
119-
120-
checkBonusSkills: tool({
121-
description:
122-
'Check for nice-to-have skills that make the candidate stand out.',
123-
inputSchema: z.object({
124-
hasBonusSkills: z
125-
.boolean()
126-
.describe('True if candidate has significant bonus skills'),
127-
matchedSkills: z
128-
.array(z.string())
129-
.describe('List of matched bonus skills'),
130-
reasoning: z.string().describe('Brief explanation of the decision'),
131-
}),
132-
}),
133119
};
134120

135121
export async function POST(request) {
@@ -248,11 +234,6 @@ Call ALL of these tools in order:
248234
? `(User expects ${preferences.salary.value.min}-${preferences.salary.value.max})`
249235
: ''
250236
}
251-
8. checkBonusSkills - Does candidate have valuable bonus skills? ${
252-
preferences.skills?.enabled === false
253-
? '(User disabled - be lenient)'
254-
: ''
255-
}
256237
257238
Be thorough, honest, and realistic in your evaluation. Even if the candidate fails one check, continue evaluating all remaining criteria.`;
258239

0 commit comments

Comments
 (0)