⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
fix: Remove informational console.error calls from hooks to prevent false errors (#572)
Mantodea Relicd0589929c008
diff --git a/Releases/v2.5/.claude/hooks/AgentOutputCapture.hook.ts b/Releases/v2.5/.claude/hooks/AgentOutputCapture.hook.tsindex b92971a7..5dd4969b 100755--- a/Releases/v2.5/.claude/hooks/AgentOutputCapture.hook.ts+++ b/Releases/v2.5/.claude/hooks/AgentOutputCapture.hook.ts@@ -86,7 +86,7 @@ async function delay(ms: number): Promise<void> {}async function findTaskResult(transcriptPath: string, maxAttempts: number = 2): Promise<{ result: string | null, agentType: string | null, description: string | null, toolInput: any | null }> {- console.error(`📂 Looking for Task result in transcript: ${transcriptPath}`);+ // Looking for Task result in transcript// If the provided transcript path doesn't exist, try to find the most recent agent transcriptlet actualTranscriptPath = transcriptPath;@@ -101,7 +101,7 @@ async function findTaskResult(transcriptPath: string, maxAttempts: number = 2):}if (!existsSync(actualTranscriptPath)) {- console.error(`❌ Transcript file doesn't exist: ${actualTranscriptPath} (attempt ${attempt + 1}/${maxAttempts})`);+ // Transcript file doesn't exist yet// Try to find agent transcript in the same directoryconst dir = require('path').dirname(transcriptPath);@@ -114,7 +114,7 @@ async function findTaskResult(transcriptPath: string, maxAttempts: number = 2):if (files.length > 0) {actualTranscriptPath = join(dir, files[0].name);- console.error(`🔄 Found recent agent transcript: ${actualTranscriptPath}`);+ // Found recent agent transcript}}@@ -138,7 +138,7 @@ async function findTaskResult(transcriptPath: string, maxAttempts: number = 2):if (content.type === 'tool_use' && content.name === 'Task') {const toolInput = content.input;const description = toolInput?.description || null;- console.error(`✅ Found Task invocation with subagent: ${toolInput?.subagent_type}, description: ${description}`);+ // Found Task invocation// Found a Task invocation, now look for its result// The result should be in a subsequent user messagefor (let j = i + 1; j < lines.length; j++) {@@ -158,7 +158,7 @@ async function findTaskResult(transcriptPath: string, maxAttempts: number = 2):.map((item: any) => item.text).join('\n');} else {- console.error('❌ Unexpected tool_result content type');+ // Unexpected tool_result content typecontinue;}@@ -190,9 +190,7 @@ async function findTaskResult(transcriptPath: string, maxAttempts: number = 2):}function extractCompletionMessage(taskOutput: string): { message: string | null, agentType: string | null } {- console.error('🔍 DEBUG - Extracting from task output, length:', taskOutput.length);- console.error('🔍 DEBUG - First 200 chars:', taskOutput.substring(0, 200));- console.error('🔍 DEBUG - Last 200 chars:', taskOutput.substring(taskOutput.length - 200));+ // Debug extraction from task output// Look for the COMPLETED section in the agent's output// Priority: 1) New 🗣️ format, 2) Legacy [AGENT:type] format@@ -246,7 +244,7 @@ function extractCompletionMessage(taskOutput: string): { message: string | null,? message // Just the message for greetings/questions/status: `${agentName} completed ${message}`; // Prepend "completed" for tasks- console.error(`✅ FOUND AGENT MATCH: [${agentType}] ${fullMessage}`);+ // Found agent match// Return agent type and messagereturn { message: fullMessage, agentType };@@ -306,7 +304,7 @@ async function main() {function debug(msg: string) {const timestamp = new Date().toISOString();appendFileSync(debugLog, `[${timestamp}] ${msg}\n`);- console.error(msg);+ // No stderr output - write to debug log file only}debug('🔍 SubagentStop hook started');@@ -396,7 +394,7 @@ async function main() {try {await captureAgentOutput(finalAgentType, completionMessage, taskOutput, transcriptPath);} catch (e) {- console.error('Failed to capture agent output:', e);+ // Failed to capture agent output - non-critical}// Send push notification for background agents@@ -539,4 +537,4 @@ ${taskOutput}console.log(`📝 UOCS: Captured agent output to ${category}/${yearMonth}/${filename}`);}-main().catch(console.error);\ No newline at end of file+main().catch(() => { /* silent fail */ });\ No newline at end of filediff --git a/Releases/v2.5/.claude/hooks/AutoWorkCreation.hook.ts b/Releases/v2.5/.claude/hooks/AutoWorkCreation.hook.tsindex 604fc244..29efaf2e 100755--- a/Releases/v2.5/.claude/hooks/AutoWorkCreation.hook.ts+++ b/Releases/v2.5/.claude/hooks/AutoWorkCreation.hook.ts@@ -133,7 +133,7 @@ status: "ACTIVE"`;writeFileSync(join(sessionPath, 'META.yaml'), meta, 'utf-8');- console.error(`[AutoWork] Created session: ${sessionPath}`);+ // Created session directoryreturn sessionPath;}@@ -227,7 +227,7 @@ _Important observations during execution..._} catch { /* ignore if doesn't exist */ }symlinkSync(taskDirName, currentLink);- console.error(`[AutoWork] Created task: ${taskPath}`);+ // Created task directoryreturn taskDirName;}@@ -263,7 +263,7 @@ async function classifyPrompt(prompt: string, hasExistingSession: boolean): Prom};}} catch (err) {- console.error(`[AutoWork] Classification failed: ${err}`);+ // Classification failed - using fallback}// Fallback@@ -295,7 +295,7 @@ async function main() {// Skip task creation for pure conversationalif (classification.type === 'conversational' && !classification.is_new_topic) {- console.error('[AutoWork] Conversational continuation, no new task');+ // Conversational continuation, no new taskprocess.exit(0);}@@ -322,7 +322,7 @@ async function main() {};writeCurrentWork(currentWork);- console.error(`[AutoWork] New session with task: ${taskDirName}`);+ // New session with task created} else if (classification.is_new_topic) {// Existing session, new topic: create new taskconst sessionPath = join(WORK_DIR, currentWork!.session_dir);@@ -341,15 +341,14 @@ async function main() {currentWork!.task_count = newTaskNumber;writeCurrentWork(currentWork!);- console.error(`[AutoWork] New task in session: ${taskDirName}`);+ // New task in session} else {// Continuation of current task - no new task needed- console.error(`[AutoWork] Continuing task: ${currentWork!.current_task}`);}process.exit(0);} catch (err) {- console.error(`[AutoWork] Error: ${err}`);+ // AutoWork error - non-blockingprocess.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/CheckVersion.hook.ts b/Releases/v2.5/.claude/hooks/CheckVersion.hook.tsindex 83517340..0f184477 100755--- a/Releases/v2.5/.claude/hooks/CheckVersion.hook.ts+++ b/Releases/v2.5/.claude/hooks/CheckVersion.hook.ts@@ -81,7 +81,7 @@ async function main() {]);if (currentVersion !== 'unknown' && latestVersion !== 'unknown' && currentVersion !== latestVersion) {- console.error(`💡 Update available: CC ${currentVersion} → ${latestVersion}`);+ // Update available - not surfaced to stderr to avoid false hook errors}process.exit(0);diff --git a/Releases/v2.5/.claude/hooks/ExplicitRatingCapture.hook.ts b/Releases/v2.5/.claude/hooks/ExplicitRatingCapture.hook.tsindex 3a8efece..aefa4c87 100755--- a/Releases/v2.5/.claude/hooks/ExplicitRatingCapture.hook.ts+++ b/Releases/v2.5/.claude/hooks/ExplicitRatingCapture.hook.ts@@ -144,7 +144,7 @@ function writeRating(entry: RatingEntry): void {const jsonLine = JSON.stringify(entry) + '\n';appendFileSync(ratingsFile, jsonLine, 'utf-8');- console.error(`[ExplicitRatingCapture] Wrote rating ${entry.rating} to ${ratingsFile}`);+ // Wrote rating to ratings file}/**@@ -231,12 +231,12 @@ ${comment ? `**${getPrincipalName()}'s feedback:** ${comment}` : ''}`;writeFileSync(filepath, content, 'utf-8');- console.error(`[ExplicitRatingCapture] Captured low rating learning to ${filepath}`);+ // Captured low rating learning}async function main() {try {- console.error('[ExplicitRatingCapture] Hook started');+ // ExplicitRatingCapture hook startedconst input = await readStdinWithTimeout();const data: HookInput = JSON.parse(input);const prompt = data.prompt || '';@@ -244,11 +244,11 @@ async function main() {const result = parseRating(prompt);if (!result) {- console.error('[ExplicitRatingCapture] Not a rating, exiting');+ // Not a rating, exitingprocess.exit(0);}- console.error(`[ExplicitRatingCapture] Detected rating: ${result.rating}${result.comment ? ` - ${result.comment}` : ''}`);+ // Detected explicit ratingconst entry: RatingEntry = {timestamp: getISOTimestamp(),@@ -269,7 +269,7 @@ async function main() {stdout: 'ignore',stderr: 'ignore'});- console.error('[ExplicitRatingCapture] Triggered TrendingAnalysis update');+ // Triggered TrendingAnalysis update}if (result.rating < 6) {@@ -286,17 +286,17 @@ async function main() {detailedContext: responseContext,sessionId: data.session_id,});- console.error(`[ExplicitRatingCapture] Created full failure capture for rating ${result.rating}`);+ // Created full failure capture} catch (err) {- console.error(`[ExplicitRatingCapture] Error creating failure capture: ${err}`);+ // Error creating failure capture - non-critical}}}- console.error('[ExplicitRatingCapture] Done');+ // ExplicitRatingCapture doneprocess.exit(0);} catch (err) {- console.error(`[ExplicitRatingCapture] Error: ${err}`);+ // ExplicitRatingCapture error - non-blockingprocess.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/ImplicitSentimentCapture.hook.ts b/Releases/v2.5/.claude/hooks/ImplicitSentimentCapture.hook.tsindex 8e69b560..cddddeb9 100755--- a/Releases/v2.5/.claude/hooks/ImplicitSentimentCapture.hook.ts+++ b/Releases/v2.5/.claude/hooks/ImplicitSentimentCapture.hook.ts@@ -269,7 +269,7 @@ async function analyzeSentiment(prompt: string, context: string): Promise<Sentim});if (!result.success || !result.parsed) {- console.error(`[ImplicitSentimentCapture] Inference failed: ${result.error}`);+ // Inference failedreturn null;}@@ -290,7 +290,7 @@ function writeImplicitRating(entry: ImplicitRatingEntry): void {}appendFileSync(ratingsFile, JSON.stringify(entry) + '\n', 'utf-8');- console.error(`[ImplicitSentimentCapture] Wrote implicit rating ${entry.rating} to ${ratingsFile}`);+ // Wrote implicit rating to ratings file}/**@@ -388,12 +388,12 @@ This response triggered a ${rating}/10 implicit rating based on detected user se`;writeFileSync(filepath, content, 'utf-8');- console.error(`[ImplicitSentimentCapture] Captured low rating learning to ${filepath}`);+ // Captured low rating learning}async function main() {try {- console.error('[ImplicitSentimentCapture] Hook started');+ // ImplicitSentimentCapture hook startedconst input = await readStdinWithTimeout();const data: HookInput = JSON.parse(input);// The payload uses 'prompt' (Claude Code) - user_prompt is legacy@@ -401,12 +401,12 @@ async function main() {// Skip if explicit rating (let ExplicitRatingCapture handle)if (isExplicitRating(prompt)) {- console.error('[ImplicitSentimentCapture] Explicit rating detected, deferring to ExplicitRatingCapture');+ // Explicit rating detected, deferring to ExplicitRatingCaptureprocess.exit(0);}if (prompt.length < MIN_PROMPT_LENGTH) {- console.error('[ImplicitSentimentCapture] Prompt too short, exiting');+ // Prompt too short, exitingprocess.exit(0);}@@ -420,22 +420,22 @@ async function main() {const sentiment = await Promise.race([analysisPromise, timeoutPromise]);if (!sentiment) {- console.error('[ImplicitSentimentCapture] Analysis failed or timed out');+ // Analysis failed or timed outprocess.exit(0);}// Neutral sentiment gets rating 5 (baseline for feature requests)if (sentiment.rating === null) {sentiment.rating = 5;- console.error('[ImplicitSentimentCapture] Neutral sentiment, assigning baseline rating 5');+ // Neutral sentiment, assigning baseline rating 5}if (sentiment.confidence < MIN_CONFIDENCE) {- console.error(`[ImplicitSentimentCapture] Low confidence (${sentiment.confidence}), not logging`);+ // Low confidence, not loggingprocess.exit(0);}- console.error(`[ImplicitSentimentCapture] Detected: ${sentiment.rating}/10 - ${sentiment.summary}`);+ // Detected sentiment ratingconst entry: ImplicitRatingEntry = {timestamp: getISOTimestamp(),@@ -456,7 +456,7 @@ async function main() {stdout: 'ignore',stderr: 'ignore'});- console.error('[ImplicitSentimentCapture] Triggered TrendingAnalysis update');+ // Triggered TrendingAnalysis update}if (sentiment.rating < 6) {@@ -477,17 +477,17 @@ async function main() {detailedContext: sentiment.detailed_context || '',sessionId: data.session_id,});- console.error(`[ImplicitSentimentCapture] Created full failure capture for rating ${sentiment.rating}`);+ // Created full failure capture} catch (err) {- console.error(`[ImplicitSentimentCapture] Error creating failure capture: ${err}`);+ // Error creating failure capture - non-critical}}}- console.error('[ImplicitSentimentCapture] Done');+ // ImplicitSentimentCapture doneprocess.exit(0);} catch (err) {- console.error(`[ImplicitSentimentCapture] Error: ${err}`);+ // ImplicitSentimentCapture error - non-blockingprocess.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/LoadContext.hook.ts b/Releases/v2.5/.claude/hooks/LoadContext.hook.tsindex 5822135f..4f6a9365 100755--- a/Releases/v2.5/.claude/hooks/LoadContext.hook.ts+++ b/Releases/v2.5/.claude/hooks/LoadContext.hook.ts@@ -63,7 +63,7 @@ function resetTabTitle(paiDir: string): void {`kitten @ set-tab-color --self active_bg=#002B80 active_fg=#FFFFFF inactive_bg=none inactive_fg=#A0A0A0`,{ stdio: 'ignore', timeout: 2000 });- console.error('🔄 Tab title reset to clean state');+ // Tab title reset to clean state}// Reset state file to prevent any stale data@@ -74,9 +74,9 @@ function resetTabTitle(paiDir: string): void {state: 'idle'};writeFileSync(stateFile, JSON.stringify(cleanState, null, 2));- console.error('🔄 Tab state file reset');+ // Tab state file reset} catch (err) {- console.error(`⚠️ Failed to reset tab title: ${err}`);+ // Failed to reset tab title - non-fatal// Non-fatal, continue with session}}@@ -90,7 +90,7 @@ async function getCurrentDate(): Promise<string> {const output = await new Response(proc.stdout).text();return output.trim();} catch (error) {- console.error('Failed to get current date:', error);+ // Failed to get current date - using fallbackreturn new Date().toISOString();}}@@ -109,7 +109,7 @@ function loadSettings(paiDir: string): Settings {try {return JSON.parse(readFileSync(settingsPath, 'utf-8'));} catch (err) {- console.error(`⚠️ Failed to parse settings.json: ${err}`);+ // Failed to parse settings.json}}return {};@@ -135,9 +135,9 @@ function loadContextFiles(paiDir: string, settings: Settings): string {const content = readFileSync(fullPath, 'utf-8');if (combinedContent) combinedContent += '\n\n---\n\n';combinedContent += content;- console.error(`✅ Loaded ${relativePath} (${content.length} chars)`);+ // Loaded context file} else {- console.error(`⚠️ Context file not found: ${relativePath}`);+ // Context file not found}}@@ -185,7 +185,7 @@ function loadRelationshipContext(paiDir: string): string | null {parts.push(highConfidence.slice(0, 6).join('\n'));}} catch (err) {- console.error(`⚠️ Failed to load opinions: ${err}`);+ // Failed to load opinions - non-fatal}}@@ -296,7 +296,7 @@ async function checkActiveProgress(paiDir: string): Promise<string | null> {return summary;} catch (error) {- console.error('Error checking active progress:', error);+ // Error checking active progress - non-fatalreturn null;}}@@ -310,7 +310,7 @@ async function main() {if (isSubagent) {// Subagent sessions don't need PAI context loading- console.error('🤖 Subagent session - skipping PAI context loading');+ // Subagent session - skipping PAI context loadingprocess.exit(0);}@@ -322,7 +322,7 @@ async function main() {// Record session start time for notification timingrecordSessionStart();- console.error('⏱️ Session start time recorded for notification timing');+ // Session start time recorded// Only rebuild SKILL.md if source components are newer than the output// This saves ~200-500ms on most session starts@@ -357,39 +357,38 @@ async function main() {}if (needsRebuild) {- console.error('🔨 Rebuilding SKILL.md (components changed)...');+ // Rebuilding SKILL.md (components changed)try {execSync('bun ~/.claude/skills/PAI/Tools/CreateDynamicCore.ts', {cwd: paiDir,stdio: 'pipe',timeout: 5000});- console.error('✅ SKILL.md rebuilt from latest components');+ // SKILL.md rebuilt from latest components} catch (err) {- console.error(`⚠️ Failed to rebuild SKILL.md: ${err}`);- console.error('⚠️ Continuing with existing SKILL.md...');+ // Failed to rebuild SKILL.md - continuing with existing}} else {- console.error('✅ SKILL.md up-to-date (skipped rebuild)');+ // SKILL.md up-to-date (skipped rebuild)}- console.error('📚 Reading PAI core context...');+ // Reading PAI core context// Load settings.json to get contextFiles arrayconst settings = loadSettings(paiDir);- console.error(`✅ Loaded settings.json`);+ // Loaded settings.json// Load all context files from settings.json arrayconst contextContent = loadContextFiles(paiDir, settings);if (!contextContent) {- console.error('❌ No context files loaded');+ // No context files loaded - fatal errorprocess.exit(1);}// Get current date/time to prevent confusion about datesconst currentDate = await getCurrentDate();- console.error(`📅 Current Date: ${currentDate}`);+ // Current date obtained// Extract identity values from settings for injection into contextconst PRINCIPAL_NAME = (settings as Record<string, unknown>).principal &&@@ -401,12 +400,12 @@ async function main() {? ((settings as Record<string, unknown>).daidentity as Record<string, unknown>).name || 'PAI': 'PAI';- console.error(`👤 Principal: ${PRINCIPAL_NAME}, DA: ${DA_NAME}`);+ // Identity loaded// Load relationship context (lightweight summary)const relationshipContext = loadRelationshipContext(paiDir);if (relationshipContext) {- console.error('💕 Loaded relationship context');+ // Loaded relationship context}const message = `<system-reminder>@@ -445,13 +444,13 @@ This context is now active. Additional context loads dynamically as needed.const activeProgress = await checkActiveProgress(paiDir);if (activeProgress) {console.log(activeProgress);- console.error('📋 Active work found from previous sessions');+ // Active work found from previous sessions}- console.error('✅ PAI context injected into session');+ // PAI context injected into sessionprocess.exit(0);} catch (error) {- console.error('❌ Error in load-pai-context hook:', error);+ // Fatal error in load-pai-context hookprocess.exit(1);}}diff --git a/Releases/v2.5/.claude/hooks/QuestionAnswered.hook.ts b/Releases/v2.5/.claude/hooks/QuestionAnswered.hook.tsindex ffb6bdb8..f01d4a7e 100755--- a/Releases/v2.5/.claude/hooks/QuestionAnswered.hook.ts+++ b/Releases/v2.5/.claude/hooks/QuestionAnswered.hook.ts@@ -49,10 +49,9 @@ async function main() {// Set working titleawait Bun.$`kitty @ set-tab-title "⚙️Processing answer…"`.quiet();- console.error('[QuestionAnswered] Tab reset to working state (orange on inactive only)');+ // Tab reset to working state (orange on inactive only)} catch (error) {// Silently fail if kitty remote control is not available- console.error('[QuestionAnswered] Kitty remote control unavailable');}process.exit(0);diff --git a/Releases/v2.5/.claude/hooks/RelationshipMemory.hook.ts b/Releases/v2.5/.claude/hooks/RelationshipMemory.hook.tsindex cf40937c..67cdd089 100755--- a/Releases/v2.5/.claude/hooks/RelationshipMemory.hook.ts+++ b/Releases/v2.5/.claude/hooks/RelationshipMemory.hook.ts@@ -261,28 +261,21 @@ function initDailyFile(filepath: string): void {async function main() {try {- console.error('[RelationshipMemory] Hook started');-const input = await readStdinWithTimeout();const data: HookInput = JSON.parse(input);if (!data.transcript_path) {- console.error('[RelationshipMemory] No transcript path, exiting');process.exit(0);}// Read and analyze transcriptconst entries = readTranscript(data.transcript_path);if (entries.length === 0) {- console.error('[RelationshipMemory] No transcript entries, exiting');process.exit(0);}- console.error(`[RelationshipMemory] Analyzing ${entries.length} transcript entries`);-const notes = analyzeForRelationship(entries);if (notes.length === 0) {- console.error('[RelationshipMemory] No relationship notes to capture');process.exit(0);}@@ -293,12 +286,10 @@ async function main() {const formatted = formatNotes(notes);appendFileSync(filepath, formatted, 'utf-8');-- console.error(`[RelationshipMemory] Captured ${notes.length} notes to ${filepath}`);process.exit(0);} catch (err) {- console.error(`[RelationshipMemory] Error: ${err}`);+ // RelationshipMemory error - non-blockingprocess.exit(0); // Don't fail the session end}}diff --git a/Releases/v2.5/.claude/hooks/SecurityValidator.hook.ts b/Releases/v2.5/.claude/hooks/SecurityValidator.hook.tsindex 4699e623..e65584da 100755--- a/Releases/v2.5/.claude/hooks/SecurityValidator.hook.ts+++ b/Releases/v2.5/.claude/hooks/SecurityValidator.hook.ts@@ -130,7 +130,6 @@ function logSecurityEvent(event: SecurityEvent): void {writeFileSync(logPath, content);} catch {// Logging failure should not block operations- console.error('Warning: Failed to log security event');}}diff --git a/Releases/v2.5/.claude/hooks/SessionSummary.hook.ts b/Releases/v2.5/.claude/hooks/SessionSummary.hook.tsindex 0615e379..08bb9641 100755--- a/Releases/v2.5/.claude/hooks/SessionSummary.hook.ts+++ b/Releases/v2.5/.claude/hooks/SessionSummary.hook.ts@@ -69,7 +69,7 @@ interface CurrentWork {function clearSessionWork(): void {try {if (!existsSync(CURRENT_WORK_FILE)) {- console.error('[SessionSummary] No current work to complete');+ // No current work to completereturn;}@@ -85,15 +85,15 @@ function clearSessionWork(): void {metaContent = metaContent.replace(/^status: "ACTIVE"$/m, 'status: "COMPLETED"');metaContent = metaContent.replace(/^completed_at: null$/m, `completed_at: "${getISOTimestamp()}"`);writeFileSync(metaPath, metaContent, 'utf-8');- console.error(`[SessionSummary] Marked work directory as COMPLETED: ${currentWork.work_dir}`);+ // Marked work directory as COMPLETED}}// Delete state fileunlinkSync(CURRENT_WORK_FILE);- console.error('[SessionSummary] Cleared session work state');+ // Cleared session work state} catch (error) {- console.error(`[SessionSummary] Error clearing session work: ${error}`);+ // Error clearing session work - non-critical}}@@ -109,11 +109,9 @@ async function main() {// NOTE: Does NOT write to SESSIONS/ - WORK/ is the primary systemclearSessionWork();- console.error('[SessionSummary] Session ended, work marked complete');process.exit(0);} catch (error) {// Silent failure - don't disrupt workflow- console.error(`[SessionSummary] SessionEnd hook error: ${error}`);process.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/SetQuestionTab.hook.ts b/Releases/v2.5/.claude/hooks/SetQuestionTab.hook.tsindex 3370214e..c95d3dca 100755--- a/Releases/v2.5/.claude/hooks/SetQuestionTab.hook.ts+++ b/Releases/v2.5/.claude/hooks/SetQuestionTab.hook.ts@@ -57,10 +57,9 @@ async function main() {// Set simple question title - teal background provides visual distinctionawait Bun.$`kitty @ set-tab-title ${QUESTION_TITLE}`;- console.error('[SetQuestionTab] Tab set to teal with question indicator');+ // Tab set to teal with question indicator} catch (error) {// Silently fail if kitty remote control is not available- console.error('[SetQuestionTab] Kitty remote control unavailable');}process.exit(0);diff --git a/Releases/v2.5/.claude/hooks/SoulEvolution.hook.ts b/Releases/v2.5/.claude/hooks/SoulEvolution.hook.tsindex b5797d86..c705e34e 100755--- a/Releases/v2.5/.claude/hooks/SoulEvolution.hook.ts+++ b/Releases/v2.5/.claude/hooks/SoulEvolution.hook.ts@@ -288,14 +288,11 @@ function sendEvolutionNotification(update: SoulUpdate): void {});} catch {}- // Log to stderr- console.error(`[SoulEvolution] ${message}`);+ // Notification sent (no stderr logging to avoid false hook errors)}async function main() {try {- console.error('[SoulEvolution] Hook started');-const input = await readStdinWithTimeout();const data: HookInput = JSON.parse(input);@@ -304,7 +301,6 @@ async function main() {// Load current soul fileconst soulContent = loadSoulFile(paiDir);if (!soulContent) {- console.error('[SoulEvolution] No soul file found, exiting');process.exit(0);}@@ -313,17 +309,13 @@ async function main() {const relationshipNotes = loadRecentRelationshipNotes(paiDir);if (learnings.length === 0 && relationshipNotes.length === 0) {- console.error('[SoulEvolution] No recent learnings or notes, exiting');process.exit(0);}- console.error(`[SoulEvolution] Analyzing ${learnings.length} learnings, ${relationshipNotes.length} notes`);-// Analyze for potential evolutionconst updates = analyzeSoulEvolution(soulContent, learnings, relationshipNotes);if (updates.length === 0) {- console.error('[SoulEvolution] No evolution detected this session');process.exit(0);}@@ -334,26 +326,22 @@ async function main() {if (update.requiresApproval) {// Queue for approvalqueue.updates.push(update);- console.error(`[SoulEvolution] Queued for approval: ${update.section}`);} else {// Auto-apply with notificationconst applied = applySoulUpdate(paiDir, update);if (applied) {update.status = 'applied';sendEvolutionNotification(update);- console.error(`[SoulEvolution] Applied: ${update.section} - ${update.reason}`);}}}queue.lastProcessed = getISOTimestamp();saveEvolutionQueue(paiDir, queue);-- console.error(`[SoulEvolution] Processed ${updates.length} updates`);process.exit(0);} catch (err) {- console.error(`[SoulEvolution] Error: ${err}`);+ // SoulEvolution error - non-blockingprocess.exit(0); // Don't fail the session end}}diff --git a/Releases/v2.5/.claude/hooks/StopOrchestrator.hook.ts b/Releases/v2.5/.claude/hooks/StopOrchestrator.hook.tsindex 1c35b852..7b4dd152 100755--- a/Releases/v2.5/.claude/hooks/StopOrchestrator.hook.ts+++ b/Releases/v2.5/.claude/hooks/StopOrchestrator.hook.ts@@ -103,14 +103,14 @@ async function main() {const hookInput = await readStdin();if (!hookInput || !hookInput.transcript_path) {- console.error('[StopOrchestrator] No transcript path provided');+ // No transcript path - exit silentlyprocess.exit(0);}// SINGLE READ, SINGLE PARSEconst parsed = parseTranscript(hookInput.transcript_path);- console.error(`[StopOrchestrator] Parsed transcript: ${parsed.plainCompletion.slice(0, 50)}...`);+ // Parsed transcript successfully// Run non-blocking handlers firstconst [voiceResult, captureResult, tabResult, integrityResult, rebuildResult, countsResult] = await Promise.allSettled([@@ -140,7 +140,7 @@ async function main() {decision: 'block',reason: iscResult.blockReason,}));- console.error('[StopOrchestrator] ISC validation BLOCKED response');+ // ISC validation blocked responseprocess.exit(0);}} catch (err) {diff --git a/Releases/v2.5/.claude/hooks/UpdateTabTitle.hook.ts b/Releases/v2.5/.claude/hooks/UpdateTabTitle.hook.tsindex 1aaa4e5e..96076fc3 100755--- a/Releases/v2.5/.claude/hooks/UpdateTabTitle.hook.ts+++ b/Releases/v2.5/.claude/hooks/UpdateTabTitle.hook.ts@@ -147,7 +147,7 @@ function getRecentContext(transcriptPath: string, maxTurns: number = 3): string// CRITICAL: Skip CONTEXT: summaries - these are overflow artifacts from previous sessionsif (text.trim().startsWith('CONTEXT:')) {- console.error('[UpdateTabTitle] Skipping CONTEXT: summary (overflow artifact)');+ // Skipping CONTEXT: summary (overflow artifact)continue;}@@ -171,7 +171,7 @@ function getRecentContext(transcriptPath: string, maxTurns: number = 3): stringreturn recentTurns.map(t => `User: ${t}`).join('\n');} catch (err) {- console.error('[UpdateTabTitle] Error reading transcript:', err);+ // Error reading transcript - return empty contextreturn '';}}@@ -287,17 +287,17 @@ function setTabTitle(title: string, state: TabState = 'normal'): void {`kitten @ set-tab-color --self active_bg=${ACTIVE_TAB_BG} active_fg=${ACTIVE_TEXT} inactive_bg=${TAB_INFERENCE_BG} inactive_fg=${INACTIVE_TEXT}`,{ stdio: 'ignore', timeout: 2000 });- console.error('[UpdateTabTitle] Set inference color (purple on inactive only)');+ // Set inference color (purple on inactive only)} else if (state === 'working') {// Orange for actively working - active tab stays dark blue, inactive shows orangeexecSync(`kitten @ set-tab-color --self active_bg=${ACTIVE_TAB_BG} active_fg=${ACTIVE_TEXT} inactive_bg=${TAB_WORKING_BG} inactive_fg=${INACTIVE_TEXT}`,{ stdio: 'ignore', timeout: 2000 });- console.error('[UpdateTabTitle] Set working color (orange on inactive only)');+ // Set working color (orange on inactive only)}- console.error('[UpdateTabTitle] Set via Kitty remote control');+ // Set via Kitty remote control} else {// Fallback to escape codes for other terminalsexecSync(`printf '\\033]0;${escaped}\\007' >&2`, { stdio: ['pipe', 'pipe', 'inherit'] });@@ -305,7 +305,7 @@ function setTabTitle(title: string, state: TabState = 'normal'): void {execSync(`printf '\\033]30;${escaped}\\007' >&2`, { stdio: ['pipe', 'pipe', 'inherit'] });}} catch (err) {- console.error(`[UpdateTabTitle] Failed to set title: ${err}`);+ // Failed to set title - non-critical}}@@ -343,44 +343,38 @@ async function announceVoice(summary: string): Promise<void> {});if (!response.ok) {- console.error('[UpdateTabTitle] Voice server error:', response.statusText);+ // Voice server error - non-critical} else {- console.error(`[UpdateTabTitle] Voice sent: "${message}"`);+ // Voice sent successfully}} catch (err) {- console.error('[UpdateTabTitle] Voice failed:', err);+ // Voice failed - non-critical}}async function main() {try {- console.error('[UpdateTabTitle] Hook started');const input = await readStdinWithTimeout();const data: HookInput = JSON.parse(input);const prompt = data.prompt || '';- console.error(`[UpdateTabTitle] Prompt: "${prompt.slice(0, 50)}..."`);if (!prompt || prompt.length < 3) {- console.error('[UpdateTabTitle] Prompt too short, exiting');process.exit(0);}// Skip ratings (single digit 1-10) - preserve current tab title for the work contextconst trimmedPrompt = prompt.trim();if (/^([1-9]|10)$/.test(trimmedPrompt)) {- console.error(`[UpdateTabTitle] Detected rating input (${trimmedPrompt}), preserving current tab title`);+ // Rating input detected - preserving current tab titleprocess.exit(0);}// Set quick fallback title immediately with inference state (purple + "…")const quickFallback = quickTitle(prompt);- console.error(`[UpdateTabTitle] Quick fallback: "${quickFallback}"`);setTabTitle(`🧠${quickFallback}`, 'inference'); // Brain = AI thinking/inference// Get summary from Sonnet inference with conversation context- console.error('[UpdateTabTitle] Calling Sonnet inference...');const { summary: rawSummary, fromInference } = await summarizePrompt(prompt, data.transcript_path);- console.error(`[UpdateTabTitle] Raw summary: "${rawSummary}" (fromInference: ${fromInference})`);// Validate summary - reject garbage, fragments, and generic subjectslet summary = rawSummary;@@ -399,13 +393,11 @@ async function main() {const isGenericSummary = (s: string) => GENERIC_PHRASES.some(p => p.test(s.trim()));if (!isValidTabSummary(rawSummary) || isGenericSummary(rawSummary)) {- console.error(`[UpdateTabTitle] Invalid or generic summary: "${rawSummary}", using fallback`);+ // Invalid or generic summary - using fallbacksummary = 'Working on task.';usedFallback = true;}- console.error(`[UpdateTabTitle] Final summary: "${summary}" (fallback: ${usedFallback})`);-// Update tab with SHORT title (5 words max - gerund + topic) + working stateconst shortTitle = summary.split(/\s+/).slice(0, 5).join(' ');setTabTitle(`⚙️${shortTitle}`, 'working'); // Orange = actively working on task@@ -414,16 +406,11 @@ async function main() {// ONLY announce if we got a REAL summary from inference, NOT fallbacksif (!usedFallback && isValidTabSummary(shortTitle)) {await announceVoice(shortTitle);- console.error(`[UpdateTabTitle] Voice announced: "${shortTitle}"`);- } else {- console.error(`[UpdateTabTitle] Skipped voice - using fallback (fromInference=${fromInference}, usedFallback=${usedFallback})`);}- console.error('[UpdateTabTitle] Complete');-process.exit(0);} catch (err) {- console.error(`[UpdateTabTitle] Error: ${err}`);+ // Error in UpdateTabTitle - non-blockingprocess.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/WorkCompletionLearning.hook.ts b/Releases/v2.5/.claude/hooks/WorkCompletionLearning.hook.tsindex bc35a108..56664deb 100755--- a/Releases/v2.5/.claude/hooks/WorkCompletionLearning.hook.ts+++ b/Releases/v2.5/.claude/hooks/WorkCompletionLearning.hook.ts@@ -182,7 +182,7 @@ function writeLearning(workMeta: WorkMeta, idealContent: string): void {// Don't overwrite existing learningsif (existsSync(filepath)) {- console.error(`[WorkCompletionLearning] Learning already exists: ${filename}`);+ // Learning already exists - skipreturn;}@@ -234,7 +234,7 @@ ${idealContent || 'Not specified'}`;writeFileSync(filepath, content);- console.error(`[WorkCompletionLearning] Created learning: ${filename}`);+ // Created learning file}async function main() {@@ -247,7 +247,7 @@ async function main() {// Check if there's an active work sessionif (!existsSync(CURRENT_WORK_FILE)) {- console.error('[WorkCompletionLearning] No active work session');+ // No active work sessionprocess.exit(0);}@@ -255,7 +255,7 @@ async function main() {const currentWork: CurrentWork = JSON.parse(readFileSync(CURRENT_WORK_FILE, 'utf-8'));if (!currentWork.work_dir) {- console.error('[WorkCompletionLearning] No work directory in current session');+ // No work directory in current sessionprocess.exit(0);}@@ -264,7 +264,7 @@ async function main() {const metaPath = join(workPath, 'META.yaml');if (!existsSync(metaPath)) {- console.error('[WorkCompletionLearning] No META.yaml found');+ // No META.yaml foundprocess.exit(0);}@@ -308,13 +308,12 @@ async function main() {if (hasSignificantWork) {writeLearning(workMeta, idealContent);} else {- console.error('[WorkCompletionLearning] Trivial work session, skipping learning capture');+ // Trivial work session, skipping learning capture}process.exit(0);} catch (error) {// Silent failure - don't disrupt workflow- console.error(`[WorkCompletionLearning] Error: ${error}`);process.exit(0);}}diff --git a/Releases/v2.5/.claude/hooks/handlers/ISCValidator.ts b/Releases/v2.5/.claude/hooks/handlers/ISCValidator.tsindex 3547a944..346a4a9a 100755--- a/Releases/v2.5/.claude/hooks/handlers/ISCValidator.ts+++ b/Releases/v2.5/.claude/hooks/handlers/ISCValidator.ts@@ -156,19 +156,19 @@ export async function handleISCValidation(const currentWork = readCurrentWork();if (!currentWork) {- console.error('[ISCValidator] No current work found - skipping validation');+ // No current work found - skipping validationreturn result;}// Skip if session IDs don't matchif (currentWork.session_id !== hookInput.session_id) {- console.error('[ISCValidator] Session ID mismatch - skipping validation');+ // Session ID mismatch - skipping validationreturn result;}const taskPath = join(WORK_DIR, currentWork.session_dir, 'tasks', currentWork.current_task);if (!existsSync(taskPath)) {- console.error(`[ISCValidator] Task path not found: ${taskPath}`);+ // Task path not foundreturn result;}@@ -176,16 +176,7 @@ export async function handleISCValidation(result.warnings = validationResult.warnings;result.errors = validationResult.errors;- // Log results- if (result.errors.length > 0) {- console.error('[ISCValidator] ERRORS:');- result.errors.forEach((e) => console.error(` ❌ ${e}`));- }-- if (result.warnings.length > 0) {- console.error('[ISCValidator] WARNINGS:');- result.warnings.forEach((w) => console.error(` ⚠️ ${w}`));- }+ // Results logged to validation result object (not stderr)// Check if OBSERVE phase was attempted (algorithm was run)const responseText = parsed.plainCompletion || '';@@ -211,9 +202,7 @@ Example criterion: "Research agents return findings within two minutes"Fix the ISC.json and try again.`;}- if (validationResult.valid && result.warnings.length === 0) {- console.error('[ISCValidator] ✓ All validation checks passed');- }+ // Validation completereturn result;}diff --git a/Releases/v2.5/.claude/hooks/handlers/RebuildSkill.ts b/Releases/v2.5/.claude/hooks/handlers/RebuildSkill.tsindex 313b037a..b8948caf 100755--- a/Releases/v2.5/.claude/hooks/handlers/RebuildSkill.ts+++ b/Releases/v2.5/.claude/hooks/handlers/RebuildSkill.ts@@ -36,7 +36,7 @@ export async function handleRebuildSkill(): Promise<void> {skillStat = statSync(SKILL_MD);} catch {// SKILL.md doesn't exist - rebuild needed- console.error('[RebuildSkill] SKILL.md missing - rebuilding');+ // SKILL.md missing - rebuildingrebuild(BUILD_SCRIPT);return;}@@ -50,13 +50,13 @@ export async function handleRebuildSkill(): Promise<void> {});if (anyNewer) {- console.error('[RebuildSkill] Components modified - rebuilding SKILL.md');+ // Components modified - rebuilding SKILL.mdrebuild(BUILD_SCRIPT);} else {- console.error('[RebuildSkill] SKILL.md is current - no rebuild needed');+ // SKILL.md is current - no rebuild needed}} catch (error) {- console.error('[RebuildSkill] Error checking/rebuilding:', error);+ // Error checking/rebuilding - non-critical}}@@ -66,9 +66,5 @@ function rebuild(buildScript: string): void {encoding: 'utf-8',});- if (result.error) {- console.error('[RebuildSkill] Build failed:', result.error);- } else {- console.error('[RebuildSkill]', result.stdout?.trim() || 'Build completed');- }+ // Build completed (or failed silently)}diff --git a/Releases/v2.5/.claude/hooks/handlers/ResponseCapture.ts b/Releases/v2.5/.claude/hooks/handlers/ResponseCapture.tsindex 57965061..18956333 100755--- a/Releases/v2.5/.claude/hooks/handlers/ResponseCapture.ts+++ b/Releases/v2.5/.claude/hooks/handlers/ResponseCapture.ts@@ -106,7 +106,7 @@ function updateTaskISC(sessionDir: string, currentTask: string, text: string): vconst iscPath = join(taskPath, 'ISC.json');if (!existsSync(iscPath)) {- console.error(`[ISC] Task ISC.json not found: ${iscPath}`);+ // Task ISC.json not foundreturn;}@@ -135,9 +135,9 @@ function updateTaskISC(sessionDir: string, currentTask: string, text: string): vdoc.updatedAt = timestamp;writeFileSync(iscPath, JSON.stringify(doc, null, 2), 'utf-8');- console.error(`[ISC] Updated task ISC: ${currentTask}`);+ // Updated task ISC} catch (err) {- console.error(`[ISC] Error updating task ISC: ${err}`);+ // Error updating task ISC - non-critical}}@@ -149,7 +149,7 @@ function updateTaskMeta(sessionDir: string, currentTask: string, structured: Strconst threadPath = join(taskPath, 'THREAD.md');if (!existsSync(threadPath)) {- console.error(`[Capture] Task THREAD.md not found: ${threadPath}`);+ // Task THREAD.md not foundreturn;}@@ -174,9 +174,9 @@ function updateTaskMeta(sessionDir: string, currentTask: string, structured: Str}writeFileSync(threadPath, content, 'utf-8');- console.error(`[Capture] Updated task THREAD: ${currentTask}`);+ // Updated task THREAD} catch (err) {- console.error(`[Capture] Error updating task META: ${err}`);+ // Error updating task META - non-critical}}@@ -311,7 +311,7 @@ async function captureWorkSummary(text: string, structured: StructuredResponse):console.log(`✅ Captured learning to: ${filePath}`);}} catch (error) {- console.error('[Capture] Error capturing work summary:', error);+ // Error capturing work summary - non-critical}}@@ -323,16 +323,14 @@ export async function handleCapture(parsed: ParsedTranscript, hookInput: HookInp// Capture work summary (async, non-blocking)if (lastMessage) {- captureWorkSummary(lastMessage, structured).catch(err => {- console.error('[Capture] History capture failed (non-critical):', err);+ captureWorkSummary(lastMessage, structured).catch(() => {+ // History capture failed - non-critical});}// Push notifications for long tasksconst duration = getSessionDurationMinutes();- if (duration > 0) {- console.error(`⏱️ Session duration: ${duration.toFixed(1)} minutes`);- }+ // Session duration tracked internallyconst hasError = lastMessage && (/error|failed|exception|crash/i.test(lastMessage) &&diff --git a/Releases/v2.5/.claude/hooks/handlers/SystemIntegrity.ts b/Releases/v2.5/.claude/hooks/handlers/SystemIntegrity.tsindex 25f19b6d..361710eb 100755--- a/Releases/v2.5/.claude/hooks/handlers/SystemIntegrity.ts+++ b/Releases/v2.5/.claude/hooks/handlers/SystemIntegrity.ts@@ -100,9 +100,9 @@ function updateIntegrityState(changes: FileChange[]): void {};writeFileSync(STATE_FILE, JSON.stringify(state, null, 2));- console.error('[SystemIntegrity] Updated state file');+ // Updated integrity state file} catch (error) {- console.error('[SystemIntegrity] Failed to update state:', error);+ // Failed to update integrity state - non-critical}}@@ -116,7 +116,7 @@ function spawnIntegrityMaintenance(try {// Check if script existsif (!existsSync(INTEGRITY_SCRIPT)) {- console.error('[SystemIntegrity] IntegrityMaintenance.ts not found:', INTEGRITY_SCRIPT);+ // IntegrityMaintenance.ts not foundreturn;}@@ -126,9 +126,7 @@ function spawnIntegrityMaintenance(const significance = determineSignificance(filteredChanges);const changeType = inferChangeType(filteredChanges);- console.error(`[SystemIntegrity] Title: ${title}`);- console.error(`[SystemIntegrity] Significance: ${significance}`);- console.error(`[SystemIntegrity] Change type: ${changeType}`);+ // Pre-computed: title, significance, change type// Prepare input dataconst inputData = JSON.stringify({@@ -157,9 +155,9 @@ function spawnIntegrityMaintenance(// Detach from parentchild.unref();- console.error(`[SystemIntegrity] Spawned IntegrityMaintenance (pid: ${child.pid})`);+ // Spawned IntegrityMaintenance background process} catch (error) {- console.error('[SystemIntegrity] Failed to spawn IntegrityMaintenance:', error);+ // Failed to spawn IntegrityMaintenance - non-critical}}@@ -176,47 +174,40 @@ export async function handleSystemIntegrity(parsed: ParsedTranscript,hookInput: HookInput): Promise<void> {- console.error('[SystemIntegrity] Checking for system changes...');+ // Checking for system changes// Check cooldownif (isInCooldown()) {- console.error('[SystemIntegrity] In cooldown period, skipping');+ // In cooldown period, skippingreturn;}// Parse changes from transcriptconst changes = parseToolUseBlocks(hookInput.transcript_path);- console.error(`[SystemIntegrity] Found ${changes.length} file changes in transcript`);+ // Found file changes in transcript// Filter to only PAI system changesconst systemChanges = changes.filter(c => c.category !== null);- console.error(`[SystemIntegrity] ${systemChanges.length} are PAI system changes`);+ // Filtered to PAI system changesif (systemChanges.length === 0) {- console.error('[SystemIntegrity] No system changes detected, skipping');+ // No system changes detected, skippingreturn;}// Check if significantif (!isSignificantChange(systemChanges)) {- console.error('[SystemIntegrity] Changes not significant enough, skipping');+ // Changes not significant enough, skippingreturn;}// Check for duplicate runif (isDuplicateRun(changes)) {- console.error('[SystemIntegrity] Duplicate change set, skipping');+ // Duplicate change set, skippingreturn;}- // Log what we found- console.error('[SystemIntegrity] Significant changes detected:');- for (const change of systemChanges.slice(0, 5)) {- console.error(` - [${change.category}] ${change.path}`);- }- if (systemChanges.length > 5) {- console.error(` ... and ${systemChanges.length - 5} more`);- }+ // Significant changes detected// Update state before spawningupdateIntegrityState(systemChanges);@@ -227,5 +218,5 @@ export async function handleSystemIntegrity(// Spawn background processspawnIntegrityMaintenance(systemChanges, hookInput);- console.error('[SystemIntegrity] Background integrity check started');+ // Background integrity check started}diff --git a/Releases/v2.5/.claude/hooks/handlers/TabState.ts b/Releases/v2.5/.claude/hooks/handlers/TabState.tsindex f5bcc6e7..8ae276e2 100755--- a/Releases/v2.5/.claude/hooks/handlers/TabState.ts+++ b/Releases/v2.5/.claude/hooks/handlers/TabState.ts@@ -64,9 +64,9 @@ function persistTabTitle(title: string, rawTitle: string, state: ResponseState):};writeFileSync(TAB_STATE_PATH, JSON.stringify(tabState, null, 2), 'utf-8');- console.error(`[TabState] Persisted title: "${rawTitle}"`);+ // Persisted tab title} catch (error) {- console.error('[TabState] Failed to persist title:', error);+ // Failed to persist title - non-critical}}@@ -140,8 +140,7 @@ async function generateCompletionSummary(voiceLine: string): Promise<string> {// Reject generic subjects — "Task completed." tells you nothingif (hasGenericSubject(summary)) {- console.error(`[TabState] Rejected generic summary: "${summary}"`);- // Try to extract something specific from the voice line itself+ // Rejected generic summary - try to extract something specificconst fallback = extractSpecificSubject(voiceLine);return fallback;}@@ -149,7 +148,7 @@ async function generateCompletionSummary(voiceLine: string): Promise<string> {return summary;}} catch (error) {- console.error('[TabState] Inference failed:', error);+ // Inference failed - using fallback}return getTabFallback('end');}@@ -184,7 +183,7 @@ export async function handleTabState(parsed: ParsedTranscript): Promise<void> {// Validate completionif (!isValidVoiceCompletion(plainCompletion)) {- console.error(`[TabState] Invalid completion: "${plainCompletion.slice(0, 50)}..."`);+ // Invalid completion, using fallbackplainCompletion = getTabFallback('end');}@@ -198,7 +197,7 @@ export async function handleTabState(parsed: ParsedTranscript): Promise<void> {// Simple checkmark for completion - color indicates success vs errorconst tabTitle = `✓${shortTitle}`;- console.error(`[TabState] State: ${state}, Title: "${tabTitle}"`);+ // Tab state updated// Persist title for recovery after compaction/restartpersistTabTitle(tabTitle, shortTitle, state);@@ -209,6 +208,6 @@ export async function handleTabState(parsed: ParsedTranscript): Promise<void> {// Set tab titleawait Bun.$`kitty @ set-tab-title ${tabTitle}`;} catch (error) {- console.error('[TabState] Failed to update Kitty tab:', error);+ // Failed to update Kitty tab - non-critical}}diff --git a/Releases/v2.5/.claude/hooks/handlers/UpdateCounts.ts b/Releases/v2.5/.claude/hooks/handlers/UpdateCounts.tsindex bf244996..6b862e8c 100755--- a/Releases/v2.5/.claude/hooks/handlers/UpdateCounts.ts+++ b/Releases/v2.5/.claude/hooks/handlers/UpdateCounts.ts@@ -158,9 +158,9 @@ export async function handleUpdateCounts(): Promise<void> {// Write backwriteFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');- console.error(`[UpdateCounts] Updated settings.json: ${counts.skills} skills, ${counts.workflows} workflows, ${counts.hooks} hooks, ${counts.signals} signals, ${counts.files} files`);+ // Updated settings.json with fresh counts} catch (error) {- console.error('[UpdateCounts] Failed to update counts:', error);+ // Failed to update counts - non-fatal// Non-fatal - don't throw, let other handlers continue}}diff --git a/Releases/v2.5/.claude/hooks/handlers/VoiceNotification.ts b/Releases/v2.5/.claude/hooks/handlers/VoiceNotification.tsindex d5070a3a..674550a9 100755--- a/Releases/v2.5/.claude/hooks/handlers/VoiceNotification.ts+++ b/Releases/v2.5/.claude/hooks/handlers/VoiceNotification.ts@@ -109,7 +109,7 @@ async function sendNotification(payload: ElevenLabsNotificationPayload, sessionI});if (!response.ok) {- console.error('[Voice] Server error:', response.statusText);+ // Voice server error - logged to voice event filelogVoiceEvent({...baseEvent,event_type: 'failed',@@ -124,7 +124,7 @@ async function sendNotification(payload: ElevenLabsNotificationPayload, sessionI});}} catch (error) {- console.error('[Voice] Failed to send:', error);+ // Voice send failed - logged to voice event filelogVoiceEvent({...baseEvent,event_type: 'failed',@@ -142,13 +142,13 @@ export async function handleVoice(parsed: ParsedTranscript, sessionId: string):// Validate voice completionif (!isValidVoiceCompletion(voiceCompletion)) {- console.error(`[Voice] Invalid completion: "${voiceCompletion.slice(0, 50)}..."`);+ // Invalid voice completion, using fallbackvoiceCompletion = getVoiceFallback();}// Skip empty or too-short messagesif (!voiceCompletion || voiceCompletion.length < 5) {- console.error('[Voice] Skipping - message too short or empty');+ // Skipping - message too short or emptyreturn;}diff --git a/Releases/v2.5/.claude/hooks/lib/change-detection.ts b/Releases/v2.5/.claude/hooks/lib/change-detection.tsindex f99494be..02571a6d 100755--- a/Releases/v2.5/.claude/hooks/lib/change-detection.ts+++ b/Releases/v2.5/.claude/hooks/lib/change-detection.ts@@ -110,7 +110,7 @@ const STRUCTURAL_PATTERNS = [export function parseToolUseBlocks(transcriptPath: string): FileChange[] {try {if (!existsSync(transcriptPath)) {- console.error('[ChangeDetection] Transcript not found:', transcriptPath);+ // Transcript not foundreturn [];}@@ -170,7 +170,7 @@ export function parseToolUseBlocks(transcriptPath: string): FileChange[] {return changes;} catch (error) {- console.error('[ChangeDetection] Error parsing transcript:', error);+ // Error parsing transcriptreturn [];}}diff --git a/Releases/v2.5/.claude/hooks/lib/notifications.ts b/Releases/v2.5/.claude/hooks/lib/notifications.tsindex 8db50e51..ac005de6 100755--- a/Releases/v2.5/.claude/hooks/lib/notifications.ts+++ b/Releases/v2.5/.claude/hooks/lib/notifications.ts@@ -129,7 +129,7 @@ export function getNotificationConfig(): NotificationConfig {}} catch (error) {// Fail gracefully, use defaults- console.error('Failed to load notification config:', error);+ // Failed to load notification config - using defaults}return DEFAULT_CONFIG;@@ -240,7 +240,7 @@ export async function sendPush(return response.ok;} catch (error) {// Fail silently - don't block hook execution- console.error('ntfy send failed:', error);+ // ntfy send failed - silentreturn false;}}@@ -288,7 +288,7 @@ export async function sendDiscord(return response.ok;} catch (error) {- console.error('Discord send failed:', error);+ // Discord send failed - silentreturn false;}}@@ -315,7 +315,7 @@ export async function sendDesktop(return proc.exitCode === 0;} catch (error) {- console.error('Desktop notification failed:', error);+ // Desktop notification failed - silentreturn false;}}@@ -335,14 +335,14 @@ export async function sendSMS(message: string): Promise<boolean> {const authToken = process.env.TWILIO_AUTH_TOKEN;if (!accountSid || !authToken) {- console.error('Twilio credentials not found in environment');+ // Twilio credentials not found in environmentreturn false;}try {const fromNumber = process.env.TWILIO_FROM_NUMBER;if (!fromNumber) {- console.error('TWILIO_FROM_NUMBER not set in environment');+ // TWILIO_FROM_NUMBER not set in environmentreturn false;}const DA_NAME = getIdentity().name;@@ -361,7 +361,7 @@ export async function sendSMS(message: string): Promise<boolean> {await proc.exited;return proc.exitCode === 0;} catch (error) {- console.error('SMS send failed:', error);+ // SMS send failed - silentreturn false;}}diff --git a/Releases/v2.5/.claude/hooks/lib/observability.ts b/Releases/v2.5/.claude/hooks/lib/observability.tsindex 6c5eadc2..43144dbd 100755--- a/Releases/v2.5/.claude/hooks/lib/observability.ts+++ b/Releases/v2.5/.claude/hooks/lib/observability.ts@@ -39,7 +39,7 @@ export async function sendEventToObservability(event: ObservabilityEvent): Promiif (!response.ok) {// Log error but don't throw - dashboard may be offline- console.error(`Observability server returned status: ${response.status}`);+ // Observability server returned non-OK status - dashboard may be offline}} catch (error) {// Fail silently - dashboard may not be running