feat(cultural-sensitivity): add Phase 3 daily reminder for learning & refinement
Created daily recurring task to ensure continuous improvement of cultural sensitivity detection system. Implementation: - scripts/add-cultural-sensitivity-phase3-reminder.js - Creates DAILY ScheduledTask in MongoDB - Appears in session-init every day - Reminds to review audit logs, identify false positives/negatives - Update detection patterns based on real-world usage - Document findings in CULTURAL_SENSITIVITY_REFINEMENTS.md Task Details: - Title: "DAILY: Cultural Sensitivity Phase 3 - Learning & Refinement" - Recurrence: daily - Priority: MEDIUM - Category: governance - Shows in session-init daily until dismissed/completed Review Workflow: 1. Check PluralisticDeliberationOrchestrator audit logs 2. Analyze flagged content vs. human decisions 3. Identify pattern improvements needed 4. Update assessCulturalSensitivity() if needed 5. Monitor success metrics (< 10% false positives, < 5% false negatives) User request: "ensure we are reminded of phase 3 daily until further notice" Next session will show this reminder in session-init output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cd97a5384d
commit
66e81f469a
1 changed files with 129 additions and 0 deletions
129
scripts/add-cultural-sensitivity-phase3-reminder.js
Executable file
129
scripts/add-cultural-sensitivity-phase3-reminder.js
Executable file
|
|
@ -0,0 +1,129 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Add Daily Cultural Sensitivity Phase 3 Reminder
|
||||
*
|
||||
* Creates a DAILY recurring task to remind about Phase 3:
|
||||
* - Review cultural sensitivity detection performance
|
||||
* - Analyze false positives/negatives
|
||||
* - Refine patterns based on real-world usage
|
||||
* - Update PluralisticDeliberationOrchestrator as needed
|
||||
*
|
||||
* This task will appear in session-init DAILY until dismissed or completed.
|
||||
*/
|
||||
|
||||
const mongoose = require('mongoose');
|
||||
const ScheduledTask = require('../src/models/ScheduledTask.model.js');
|
||||
|
||||
const MONGODB_URI = 'mongodb://localhost:27017/tractatus_dev';
|
||||
|
||||
async function addPhase3ReminderTask() {
|
||||
console.log('═══════════════════════════════════════════════════════════');
|
||||
console.log(' Adding Cultural Sensitivity Phase 3 Daily Reminder');
|
||||
console.log('═══════════════════════════════════════════════════════════');
|
||||
console.log('');
|
||||
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
|
||||
// Start tomorrow at 9am
|
||||
const dueDate = new Date();
|
||||
dueDate.setDate(dueDate.getDate() + 1);
|
||||
dueDate.setHours(9, 0, 0, 0);
|
||||
|
||||
const task = new ScheduledTask({
|
||||
title: 'DAILY: Cultural Sensitivity Phase 3 - Learning & Refinement',
|
||||
description: `Review cultural sensitivity detection system performance and refine as needed.
|
||||
|
||||
**Daily Review Checklist:**
|
||||
1. Review audit logs: PluralisticDeliberationOrchestrator cultural_sensitivity_check
|
||||
2. Identify false positives (flagged but culturally appropriate)
|
||||
3. Identify false negatives (missed culturally insensitive content)
|
||||
4. Analyze patterns across media responses and blog posts
|
||||
5. Update detection patterns in assessCulturalSensitivity() if needed
|
||||
|
||||
**What to Look For:**
|
||||
- Western-centric language that was APPROPRIATE for the audience
|
||||
- Indigenous exclusion that was APPROPRIATE for the context
|
||||
- Culturally insensitive content that was NOT flagged
|
||||
- New patterns emerging from real-world usage
|
||||
- Feedback from human reviewers on flagged content
|
||||
|
||||
**Success Metrics:**
|
||||
- < 10% false positive rate (flagged but appropriate)
|
||||
- < 5% false negative rate (missed insensitive content)
|
||||
- Consistent improvement in detection accuracy
|
||||
- Human reviewer confidence in AI flagging
|
||||
|
||||
**Update Process:**
|
||||
1. Document findings in docs/governance/CULTURAL_SENSITIVITY_REFINEMENTS.md
|
||||
2. Update patterns in PluralisticDeliberationOrchestrator.service.js
|
||||
3. Test new patterns with historical examples
|
||||
4. Commit changes with rationale
|
||||
5. Monitor impact in next review cycle
|
||||
|
||||
**Context:**
|
||||
Phase 1: Detection & flagging (COMPLETED)
|
||||
Phase 2: UI & workflow (IN PROGRESS)
|
||||
Phase 3: Learning & refinement (THIS REMINDER)
|
||||
|
||||
User request: "ensure we are reminded of phase 3 daily until further notice"`,
|
||||
dueDate: dueDate,
|
||||
priority: 'MEDIUM',
|
||||
category: 'governance',
|
||||
recurrence: 'daily',
|
||||
assignedTo: 'PM',
|
||||
showInSessionInit: true,
|
||||
reminderDaysBefore: 0, // Show every day
|
||||
tags: ['cultural-sensitivity', 'inst-081', 'pluralism', 'learning', 'refinement', 'daily'],
|
||||
metadata: {
|
||||
source: 'user-request-2025-10-24',
|
||||
phase: 'phase_3',
|
||||
implementation: 'cultural_sensitivity_layer',
|
||||
instruction: 'inst_081',
|
||||
review_type: 'performance_analysis'
|
||||
}
|
||||
});
|
||||
|
||||
await task.save();
|
||||
|
||||
console.log('✓ Daily reminder task created successfully!');
|
||||
console.log('');
|
||||
console.log('Task Details:');
|
||||
console.log(` Title: ${task.title}`);
|
||||
console.log(` Due: ${task.dueDate.toISOString().split('T')[0]} (and daily thereafter)`);
|
||||
console.log(` Recurrence: DAILY`);
|
||||
console.log(` Priority: ${task.priority}`);
|
||||
console.log(` Category: ${task.category}`);
|
||||
console.log('');
|
||||
console.log('This task will appear in session-init EVERY DAY until:');
|
||||
console.log(' • User dismisses it (when Phase 3 complete)');
|
||||
console.log(' • User marks it complete');
|
||||
console.log(' • User updates recurrence');
|
||||
console.log('');
|
||||
console.log('📊 View in calendar: http://localhost:9000/admin/calendar.html');
|
||||
console.log('📋 View audit logs: http://localhost:9000/admin/audit-analytics.html');
|
||||
console.log('');
|
||||
console.log('Daily review workflow:');
|
||||
console.log(' 1. Check audit logs for cultural_sensitivity_check entries');
|
||||
console.log(' 2. Review flagged content with human decision outcomes');
|
||||
console.log(' 3. Update patterns if false positives/negatives found');
|
||||
console.log(' 4. Document changes in CULTURAL_SENSITIVITY_REFINEMENTS.md');
|
||||
console.log('');
|
||||
|
||||
await mongoose.connection.close();
|
||||
process.exit(0);
|
||||
|
||||
} catch (err) {
|
||||
console.error('Error adding task:', err.message);
|
||||
await mongoose.connection.close();
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Run if called directly
|
||||
if (require.main === module) {
|
||||
addPhase3ReminderTask();
|
||||
}
|
||||
|
||||
module.exports = { addPhase3ReminderTask };
|
||||
Loading…
Add table
Reference in a new issue