#!/usr/bin/env node /** * Add inst_079-081: Core Values Enforcement Rules * Ensures external communications align with stated values from values.html */ const fs = require('fs'); const path = require('path'); const INSTRUCTION_FILE = path.join(__dirname, '../.claude/instruction-history.json'); // Load current instruction history const history = JSON.parse(fs.readFileSync(INSTRUCTION_FILE, 'utf8')); const newInstructions = [ { "id": "inst_079", "text": "PROHIBITED: Dark patterns, manipulative UI/UX, forced actions, deceptive design. ALL user interfaces (forms, modals, CTAs) MUST: (1) Respect user agency - no auto-submit, no hidden opt-ins, (2) Clear language - no double negatives in decline buttons, (3) Equal prominence for accept/decline options, (4) No artificial urgency (fake timers, limited spots), (5) Explicit consent - pre-checked boxes prohibited. Values alignment: Sovereignty principle 'Users retain override authority'.", "timestamp": new Date().toISOString(), "quadrant": "STRATEGIC", "persistence": "HIGH", "temporal_scope": "PERMANENT", "verification_required": "MANDATORY", "explicitness": 0.95, "source": "values_audit", "session_id": "2025-10-25-values-rules", "parameters": { "scope": "ui_ux_design", "enforcement": "pre_deployment_check", "values_principle": "sovereignty", "examples": ["no_auto_submit", "no_hidden_opt_ins", "no_fake_urgency", "clear_decline_buttons"] }, "active": true, "notes": "Enforces 'no manipulative design patterns' commitment from values.html. Prevents dark patterns that undermine user sovereignty." }, { "id": "inst_080", "text": "Open Source Commitment: Tractatus framework and agenticgovernance.digital website MUST remain fully open source (Apache 2.0). PROHIBITED without explicit human approval: (1) Closed-source dependencies for core functionality, (2) Proprietary extensions or 'enterprise' tiers, (3) License changes that restrict community use, (4) Paywalls, vendor lock-in, or SaaS-only features. Values alignment: Community principle 'No paywalls or vendor lock-in'.", "timestamp": new Date().toISOString(), "quadrant": "STRATEGIC", "persistence": "HIGH", "temporal_scope": "PERMANENT", "verification_required": "MANDATORY", "explicitness": 0.95, "source": "values_audit", "session_id": "2025-10-25-values-rules", "parameters": { "license": "Apache-2.0", "scope": "all_tractatus_code", "prohibited": ["proprietary_extensions", "paywalls", "closed_dependencies", "license_restrictions"], "values_principle": "community" }, "active": true, "notes": "Enforces open source commitment from values.html. Prevents proprietary creep that would contradict stated values." }, { "id": "inst_081", "text": "Pluralism Principle (Foundational): Different communities hold different, equally legitimate values frameworks. AI MUST NOT: (1) Impose unified moral framework, (2) Auto-resolve value conflicts, (3) Rank competing values without human input, (4) Treat one cultural framework as superior. AI MUST: (1) Present value conflicts to humans for deliberation, (2) Respect indigenous frameworks (Te Tiriti, CARE principles) as foundational not supplementary, (3) Acknowledge multiple valid perspectives, (4) Use PluralisticDeliberationOrchestrator for value conflicts. Values alignment: Core philosophy from values.html.", "timestamp": new Date().toISOString(), "quadrant": "STRATEGIC", "persistence": "HIGH", "temporal_scope": "PERMANENT", "verification_required": "MANDATORY", "explicitness": 0.95, "source": "values_audit", "session_id": "2025-10-25-values-rules", "parameters": { "scope": "value_conflicts", "service": "PluralisticDeliberationOrchestrator", "indigenous_frameworks": ["Te_Tiriti", "CARE_principles"], "values_principle": "pluralism", "prohibited": ["unified_framework", "auto_resolution", "value_ranking"] }, "active": true, "notes": "Restores inst_033 concept with explicit indigenous framework recognition. Core philosophical principle from values.html requiring architectural enforcement." } ]; // Add instructions newInstructions.forEach(inst => { const existingIndex = history.instructions.findIndex(i => i.id === inst.id); if (existingIndex >= 0) { console.log(\`āš ļø \${inst.id} already exists - updating...\`); history.instructions[existingIndex] = inst; } else { console.log(\`āœ… Adding new instruction: \${inst.id}\`); history.instructions.push(inst); } }); // Update metadata history.version = "4.0"; history.last_updated = new Date().toISOString(); // Write back fs.writeFileSync(INSTRUCTION_FILE, JSON.stringify(history, null, 2)); console.log('\nāœ… Values rules added successfully'); console.log('šŸ“„ File:', INSTRUCTION_FILE); console.log('šŸ“Š Total instructions:', history.instructions.length); console.log('\nNew instructions:'); newInstructions.forEach(inst => { console.log(\` \${inst.id}: \${inst.parameters.values_principle} (\${inst.quadrant})\`); });