Anti-Bullshit MCP Server

by bmorphism
Verified
// Validation frameworks based on different epistemological traditions export const VALIDATION_FRAMEWORKS = { // Western empirical framework focused on evidence and logic empirical: { validateClaim: (claim: string) => ({ claim, type: "empirical", requirements: [ "Verifiable evidence from multiple sources", "Logical consistency across different contexts", "Reproducible results with documented methodology", "Cross-referenced academic and scientific sources", "Peer-reviewed validation where applicable" ] }), confidenceLevel: (evidence: any) => evidence.hasEmpirical ? "high" : "low" }, // Indigenous framework focused on responsible truth and community impact responsible: { validateClaim: (claim: string) => ({ claim, type: "responsible", requirements: [ "Benefits community wellbeing with documented impact", "Aligns with traditional knowledge and modern research", "Respects natural balance and sustainable practices", "Verified by diverse community perspectives", "Supported by both qualitative and quantitative evidence" ] }), confidenceLevel: (evidence: any) => evidence.servesWellbeing ? "high" : "low" }, // Eastern framework focused on harmony and contextual truth harmonic: { validateClaim: (claim: string) => ({ claim, type: "harmonic", requirements: [ "Maintains balance across different domains", "Considers context from multiple viewpoints", "Integrates perspectives from various disciplines", "Synthesizes traditional and modern knowledge", "Demonstrates coherence across different frameworks" ] }), confidenceLevel: (evidence: any) => evidence.maintainsHarmony ? "high" : "low" }, // Pluralistic framework that combines multiple validation approaches pluralistic: { validateClaim: (claim: string) => ({ claim, type: "pluralistic", requirements: [ "Consider multiple ways of knowing and validate across frameworks", "Evaluate contextual appropriateness in different settings", "Assess practical outcomes with measurable metrics", "Check alignment with community values and scientific consensus", "Cross-reference academic, practical, and community sources", "Integrate insights from diverse knowledge systems" ] }), confidenceLevel: (evidence: any) => { const scores = [ evidence.hasEmpirical ? 1 : 0, evidence.servesWellbeing ? 1 : 0, evidence.maintainsHarmony ? 1 : 0 ]; const avg = scores.reduce((a,b) => a + b) / scores.length; return avg > 0.7 ? "high" : avg > 0.3 ? "medium" : "low"; } } }; // Helper functions for validation export function validateWithFramework( claim: string, framework: keyof typeof VALIDATION_FRAMEWORKS, evidence: any ) { const validator = VALIDATION_FRAMEWORKS[framework]; return { requirements: validator.validateClaim(claim), confidence: validator.confidenceLevel(evidence) }; } export function getValidationSuggestions( claim: string, framework: keyof typeof VALIDATION_FRAMEWORKS ): string[] { const requirements = VALIDATION_FRAMEWORKS[framework].validateClaim(claim).requirements; return requirements.map(req => `- Verify if claim "${claim}" meets requirement: ${req}`); }