#!/usr/bin/env node const fs = require('fs'); const path = require('path'); const historyPath = path.join(__dirname, '../.claude/instruction-history.json'); const history = JSON.parse(fs.readFileSync(historyPath, 'utf8')); // Archive inst_010 and inst_050 ['inst_010', 'inst_050'].forEach(id => { const inst = history.instructions.find(i => i.id === id); if (inst && inst.active) { inst.active = false; inst.archived_date = new Date().toISOString(); inst.archived_reason = id === 'inst_010' ? 'Covered by general quality standards (inst_004) and deployment checklist (inst_071)' : 'Best practice covered by general development workflow, not framework-critical'; console.log(`āœ“ Archived ${id}`); } }); history.last_updated = new Date().toISOString(); fs.writeFileSync(historyPath, JSON.stringify(history, null, 2)); const activeCount = history.instructions.filter(i => i.active).length; console.log(`\nāœ“ Active instructions: ${activeCount}`); if (activeCount < 50) { console.log(`āœ“ TARGET ACHIEVED: <50 active instructions!`); }