reject_instinct
Deactivate an instinct and reduce its confidence by providing its ID, helping manage automated context rules in persistent chat sessions.
Instructions
Reject/deactivate an instinct and lower its confidence
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Instinct ID to reject |
Implementation Reference
- src/cli/registry.ts:86-111 (handler)The core implementation of the 'reject' logic, which deactivates an instinct and adjusts its confidence.
/** Reject an instinct: deactivate and drop confidence. */ async reject(id: string): Promise<Instinct> { const entry = await this.find(id); if (!entry) throw new Error(`Instinct not found: ${id}`); const { file, instinctFile, instinct } = entry; instinct.active = false; instinct.confidence = Math.max(0, instinct.confidence - 0.3); // Ensure min_confidence doesn't exceed new confidence (Zod invariant) instinct.min_confidence = Math.min(instinct.min_confidence, instinct.confidence); instinct.updated_at = new Date().toISOString(); // Record rejection in outcome_log const outcome: OutcomeEntry = { timestamp: new Date().toISOString(), result: 'negative', delta_confidence: -0.3, note: 'Rejected via CLI', }; instinct.outcome_log.push(outcome); instinctFile.instincts[id] = instinct; await this.loader.save(file, instinctFile); return instinct; } - src/server/index.ts:373-382 (handler)The MCP tool handler in the server that invokes the registry's reject method.
case 'reject_instinct': { const id = String(args?.['id'] ?? ''); if (!id) return { content: [{ type: 'text', text: 'Error: id is required' }] }; try { const instinct = await registry.reject(id); return { content: [{ type: 'text', text: JSON.stringify({ rejected: id, confidence: instinct.confidence, active: instinct.active }, null, 2) }] }; } catch (e) { return { content: [{ type: 'text', text: `Error: ${e instanceof Error ? e.message : String(e)}` }] }; } } - src/server/index.ts:179-188 (registration)Registration of the 'reject_instinct' tool in the MCP server list.
name: 'reject_instinct', description: 'Reject/deactivate an instinct and lower its confidence', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'Instinct ID to reject' }, }, required: ['id'], }, },