diff --git a/.claude/instruction-history.json b/.claude/instruction-history.json index 7a2db79b..8c36fb7e 100644 --- a/.claude/instruction-history.json +++ b/.claude/instruction-history.json @@ -932,20 +932,62 @@ ], "active": true, "notes": "CRITICAL CONTENT ACCURACY GAP 2025-10-12 - User identified that most documents still reference 'five services' instead of 'six services'. PluralisticDeliberationOrchestrator was added as 6th service in Phase 5 but existing documentation not updated. Combined with ongoing rule violation checks (inst_016, inst_017) this creates comprehensive content accuracy protocol. User quote: 'very few of the documents refer correctly to the new 6th service! most still refer to 5' and 'we need to actually reexamine the content, not only for rule violations but also for currency'. This instruction ensures systematic content review during card presentation implementation, preventing outdated/inaccurate content from being deployed with improved UI/UX." + }, + { + "id": "inst_040", + "text": "When user says 'all' (e.g., 'update all pages', 'fix all instances', 'check all files'), Claude MUST NOT choose to work on a subset. The word 'all' is an EXPLICIT requirement for COMPLETE coverage - every single item in scope must be processed. BEFORE starting work on 'all' requests: (1) Identify the COMPLETE list of items in scope (use find, grep, ls commands), (2) Present the full list to user for confirmation if scope is ambiguous, (3) Work through EVERY item systematically, (4) Verify ALL items were processed before marking task complete. If scope is too large for single session (>20 items), ask user to prioritize or break into smaller batches. NEVER silently skip items or decide 'these N are representative enough'.", + "timestamp": "2025-10-14T13:00:00Z", + "quadrant": "OPERATIONAL", + "persistence": "HIGH", + "temporal_scope": "PERMANENT", + "verification_required": "MANDATORY", + "explicitness": 1.0, + "source": "user", + "session_id": "2025-10-14-faq-fixes", + "parameters": { + "trigger_words": [ + "all", + "every", + "each" + ], + "examples": [ + "update all pages", + "fix all instances", + "check all files", + "update every page", + "fix each occurrence" + ], + "prohibited_actions": [ + "working_on_subset", + "representative_sample", + "partial_completion", + "silent_skipping" + ], + "required_actions": [ + "identify_complete_scope", + "confirm_if_ambiguous", + "process_every_item", + "verify_complete_coverage" + ], + "scope_too_large_threshold": 20, + "large_scope_action": "ask_user_to_prioritize_or_batch" + }, + "active": true, + "notes": "IDENTIFIED 2025-10-14 - User directive: 'create a rule that stipulates that when the user says \"all\" as in \"update all...\" Claude may not choose to work on a subset'. Context: Footer standardization where user asked to update all pages, and Claude initially only updated FAQ page footer then used script for remaining pages. User expects 'all' to mean complete coverage without exceptions or representative samples. This prevents pattern where Claude selectively applies changes to subset of items when user explicitly requested universal application." } ], "stats": { - "total_instructions": 39, - "active_instructions": 39, + "total_instructions": 40, + "active_instructions": 40, "by_quadrant": { "STRATEGIC": 7, - "OPERATIONAL": 17, + "OPERATIONAL": 18, "TACTICAL": 1, "SYSTEM": 10, "STOCHASTIC": 0 }, "by_persistence": { - "HIGH": 35, + "HIGH": 36, "MEDIUM": 2, "LOW": 0, "VARIABLE": 0 diff --git a/public/faq.html b/public/faq.html index 1fd6024b..7fe54105 100644 --- a/public/faq.html +++ b/public/faq.html @@ -655,7 +655,7 @@ - + diff --git a/public/js/faq.js b/public/js/faq.js index 7967909d..2b194747 100644 --- a/public/js/faq.js +++ b/public/js/faq.js @@ -2918,11 +2918,16 @@ function setupModalListeners() { */ function renderInlineFAQs() { const container = document.getElementById('inline-faq-container'); - if (!container) return; + if (!container) { + console.error('[FAQ] inline-faq-container not found'); + return; + } // Get top 6 most important FAQs (mix of all audiences) const topFAQs = FAQ_DATA.filter(faq => [19, 12, 27, 13, 1, 2].includes(faq.id)); + console.log(`[FAQ] Rendering ${topFAQs.length} inline FAQs (marked available: ${typeof marked !== 'undefined'})`); + // Sort by ID to maintain order const sorted = topFAQs.sort((a, b) => a.id - b.id); @@ -2977,7 +2982,17 @@ function createInlineFAQItemHTML(faq) { // Parse markdown answer let answerHtml = faq.answer; if (typeof marked !== 'undefined') { - answerHtml = marked.parse(faq.answer); + try { + answerHtml = marked.parse(faq.answer); + } catch (error) { + console.error('[FAQ] Inline markdown parsing failed for FAQ', faq.id, error); + // Fallback to plain text with line breaks + answerHtml = `

${faq.answer.replace(/\n\n/g, '

').replace(/\n/g, '
')}

`; + } + } else { + console.warn('[FAQ] marked.js not loaded for inline FAQs - using plain text'); + // Fallback to plain text with line breaks + answerHtml = `

${faq.answer.replace(/\n\n/g, '

').replace(/\n/g, '
')}

`; } return ` diff --git a/public/service-worker.js b/public/service-worker.js index 41cc10c2..9196b702 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -5,7 +5,7 @@ * - PWA functionality */ -const CACHE_VERSION = '1.0.4'; +const CACHE_VERSION = '1.0.5'; const CACHE_NAME = `tractatus-v${CACHE_VERSION}`; const VERSION_CHECK_INTERVAL = 3600000; // 1 hour in milliseconds diff --git a/public/version.json b/public/version.json index 6135483c..7d6f5153 100644 --- a/public/version.json +++ b/public/version.json @@ -1,12 +1,12 @@ { - "version": "1.0.4", - "buildDate": "2025-10-14T13:00:00Z", + "version": "1.0.5", + "buildDate": "2025-10-14T13:15:00Z", "changelog": [ - "Fixed modal scrolling - changed to h-[85vh] with min-h-0 for proper flex scroll", - "Removed Quick Actions section from FAQ page", - "Standardized footer across all pages with newsletter link", - "Enhanced markdown parsing with error handling" + "Fixed inline FAQ markdown rendering with error handling", + "Added logging for FAQ rendering diagnostics", + "Enhanced markdown fallback for both modal and inline FAQs", + "Created inst_040: 'all' keyword requires complete coverage" ], "forceUpdate": true, - "minVersion": "1.0.4" + "minVersion": "1.0.5" }