- Add inst_090-094: Christopher Alexander architectural principles - Deep Interlock (service coordination) - Structure-Preserving (audit continuity) - Gradients Not Binary (intensity levels) - Living Process (evolves from failures) - Not-Separateness (architectural integration) - Add inst_095: Q&A tracking protocol (bidirectional) - Framework version: 4.2 → 4.4 - Active instructions: 62 → 68 - Integration scripts for safe deployment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
97 lines
4 KiB
JavaScript
Executable file
97 lines
4 KiB
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Add inst_095: Question Tracking and Clarification Protocol
|
|
*
|
|
* Addresses communication gap: missed questions in both directions
|
|
*/
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const INSTRUCTION_HISTORY_PATH = path.join(__dirname, '../.claude/instruction-history.json');
|
|
|
|
const inst095 = {
|
|
id: "inst_095",
|
|
text: "Track all questions in both directions (User→Claude and Claude→User). At end of each interaction, verify all questions have been addressed. Issue explicit alert if question remains unanswered. Apply to terminal interactions and documentation.",
|
|
timestamp: new Date().toISOString(),
|
|
quadrant: "OPERATIONAL",
|
|
persistence: "HIGH",
|
|
temporal_scope: "PERMANENT",
|
|
verification_required: "REQUIRED",
|
|
explicitness: 0.92,
|
|
source: "user_instruction",
|
|
session_id: "2025-10-30-qa-tracking",
|
|
parameters: {
|
|
tracking_scope: ["terminal", "documentation", "plan_mode"],
|
|
alert_threshold: "immediate",
|
|
question_types: ["explicit_query", "clarification_request", "decision_point"],
|
|
exempt_patterns: ["rhetorical_question"]
|
|
},
|
|
active: true,
|
|
notes: "Question Tracking and Clarification Protocol - Prevents missed questions in busy prompts and cross-session interactions"
|
|
};
|
|
|
|
function main() {
|
|
console.log('═══════════════════════════════════════════════════════════');
|
|
console.log(' Adding inst_095: Question Tracking Protocol');
|
|
console.log('═══════════════════════════════════════════════════════════\n');
|
|
|
|
// Read current instruction history
|
|
let history;
|
|
try {
|
|
history = JSON.parse(fs.readFileSync(INSTRUCTION_HISTORY_PATH, 'utf8'));
|
|
} catch (err) {
|
|
console.error('❌ Error reading instruction-history.json:', err.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log(`📖 Current version: ${history.version}`);
|
|
console.log(` Total instructions: ${history.instructions.length}`);
|
|
console.log(` Active instructions: ${history.instructions.filter(i => i.active).length}\n`);
|
|
|
|
// Check if inst_095 already exists
|
|
const existing = history.instructions.find(i => i.id === 'inst_095');
|
|
|
|
if (existing) {
|
|
console.log('⚠️ inst_095 already exists:');
|
|
console.log(` ${existing.text.substring(0, 60)}...`);
|
|
console.log('\n❌ Aborting to prevent duplicate\n');
|
|
process.exit(1);
|
|
}
|
|
|
|
// Add inst_095
|
|
console.log('✨ Adding inst_095:\n');
|
|
history.instructions.push(inst095);
|
|
console.log(` ✓ ${inst095.id}: ${inst095.text.substring(0, 80)}...`);
|
|
|
|
// Update version if appropriate (4.3 → 4.4 with Q&A tracking)
|
|
const shouldUpdateVersion = history.version === "4.3";
|
|
if (shouldUpdateVersion) {
|
|
history.version = "4.4";
|
|
console.log(`\n📦 Updated version: ${history.version}`);
|
|
}
|
|
|
|
history.last_updated = new Date().toISOString();
|
|
|
|
console.log(` Total instructions: ${history.instructions.length}`);
|
|
console.log(` Active instructions: ${history.instructions.filter(i => i.active).length}\n`);
|
|
|
|
// Write back to file
|
|
try {
|
|
fs.writeFileSync(INSTRUCTION_HISTORY_PATH, JSON.stringify(history, null, 2), 'utf8');
|
|
} catch (err) {
|
|
console.error('❌ Error writing instruction-history.json:', err.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('✅ Integration complete!\n');
|
|
console.log('═══════════════════════════════════════════════════════════');
|
|
console.log(' Next Steps:');
|
|
console.log('═══════════════════════════════════════════════════════════\n');
|
|
console.log('1. Run: node scripts/sync-instructions-to-db.js');
|
|
console.log('2. Test with next interaction (Q&A tracking active)');
|
|
console.log('3. Monitor effectiveness over coming sessions\n');
|
|
}
|
|
|
|
main();
|