===== TARGET ===== DOC_ID=devon_dev_mission CATEGORY_ID=overview_scope ISSUE=UI selected Mission Canonical but rendered Master content MODE=evidence only ===== FILE CHECK ===== PASS: docs index exists PASS: hub index exists ===== HUB MISSION OBJECT ===== { "id": "devon_dev_mission", "label": "Mission Canonical", "type": "json" } ===== RENDER FUNCTION LOCATIONS ===== 1361: function resolveArchitectureDoc(doc){ 1542: async function loadDocSource(doc){ 1749: function renderStructuredCategoryView(doc, sourceMeta){ 1901: function renderArchitectureSummaryView(doc, sourceMeta){ 1966: function renderArchitectureView(doc, sourceMeta){ 52583: const structured = renderStructuredCategoryView(doc, sourceMeta); 52591: function renderDocContent(payload){ 52601: function renderContractView(doc, sourceMeta){ 52622: async function renderDocViewer(){ 52631: const sourceMeta = await loadDocSource(doc); 52693: const architectureDoc = resolveArchitectureDoc(doc); 52695: const architectureMeta = await loadDocSource(architectureDoc); 52696: const structured = renderStructuredCategoryView(doc, architectureMeta); 52706: architecturePayload = renderArchitectureView(doc, sourceMeta); 52709: renderDocContent(architecturePayload); 52747: renderDocContent(renderArchitectureView(doc, fallbackMeta)); 52779:function render(){ ===== RENDER MAIN BLOCK AROUND architectureDoc ===== PASS: architectureDoc assignment line=52693 const category = getCategory(state.categoryId); const doc = getDoc(state.categoryId, state.docId); const phase = getPhase(state.phaseId); if (!category || !doc || !phase) return; docViewer.textContent = "Loading canon source..."; try { const sourceMeta = await loadDocSource(doc); setHero(doc, phase, category, sourceMeta); buildDocMap(doc, sourceMeta); buildRelationMap(doc, category, sourceMeta); if (state.mode === "architecture") { let architecturePayload = null; const forceDirectArchitectureRender = (doc.id === "panel_manifest" && state.categoryId === "overview_scope") || (doc.id === "master_architecture_index" && state.categoryId === "overview_scope") || (doc.id === "project_scope" && state.categoryId === "overview_scope") || (doc.id === "deployment_order" && state.categoryId === "overview_scope") || (doc.id === "sandbox_environment" && state.categoryId === "overview_scope") || (doc.id === "server_registry" && state.categoryId === "overview_scope") || (doc.id === "project_progress_canonical" && state.categoryId === "overview_scope") || (doc.id === "project_progress_model" && state.categoryId === "overview_scope") || (doc.id === "cas" && state.categoryId === "architecture_engineering_core") || (doc.id === "cgs" && state.categoryId === "architecture_engineering_core") || (doc.id === "acs" && state.categoryId === "architecture_engineering_core") || (doc.id === "css" && state.categoryId === "architecture_engineering_core") || (doc.id === "ncs" && state.categoryId === "architecture_engineering_core") || (doc.id === "sts" && state.categoryId === "architecture_engineering_core") || (doc.id === "brps" && state.categoryId === "architecture_engineering_core") || (doc.id === "cdms" && state.categoryId === "architecture_engineering_core") || (doc.id === "ris" && state.categoryId === "architecture_engineering_core") || (doc.id === "ofms" && state.categoryId === "architecture_engineering_core") || (doc.id === "card_contract_minimums" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_data_contract" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_component_contract" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_sync_contract" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_canonical_tree" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_navigation_spec" && state.categoryId === "architecture_engineering_core") || (doc.id === "panel_ui_blueprint" && state.categoryId === "architecture_engineering_core") || (doc.id === "canonical_matrix_v1" && state.categoryId === "architecture_engineering_core") || (doc.id === "cfc" && state.categoryId === "cognitive_flow") || (doc.id === "ccc" && state.categoryId === "cognitive_flow") || (doc.id === "cdms" && state.categoryId === "containerization") || (doc.id === "lpc" && state.categoryId === "latency_performance") || (doc.id === "nrc" && state.categoryId === "noise_reduction") || (doc.id === "oac" && state.categoryId === "observability_audit") || (doc.id === "panel_runtime_bridge" && state.categoryId === "observability_audit") || (doc.id === "host_runtime_support" && state.categoryId === "observability_audit") || (doc.id === "docker_runtime_support" && state.categoryId === "observability_audit") || (doc.id === "runtime_status_support" && state.categoryId === "observability_audit") || (doc.id === "runtime_row_semantics" && state.categoryId === "observability_audit") || (doc.id === "sec" && state.categoryId === "security_governance") || (doc.id === "host_security" && state.categoryId === "security_governance") || (doc.id === "app_security" && state.categoryId === "security_governance") || (doc.id === "module_security" && state.categoryId === "security_governance") || (doc.id === "runtime_security" && state.categoryId === "security_governance") || (doc.id === "delivery_security" && state.categoryId === "security_governance") || (doc.id === "approval_policy" && state.categoryId === "security_governance") || (doc.id === "memory_isolation" && state.categoryId === "security_governance") || (doc.id === "security_monitoring" && state.categoryId === "security_governance") || (doc.id === "ofc" && state.categoryId === "operational_flows") || (doc.id === "subcategory_pipelines" && state.categoryId === "delivery_layer") || (doc.id === "panel_content_index" && state.categoryId === "delivery_layer") || (doc.id === "memory_arch" && state.categoryId === "memory_learning_reasoning"); if (!forceDirectArchitectureRender) { try { const architectureDoc = resolveArchitectureDoc(doc); if (architectureDoc && architectureDoc.id !== doc.id) { const architectureMeta = await loadDocSource(architectureDoc); const structured = renderStructuredCategoryView(doc, architectureMeta); if (structured) { architecturePayload = { kind: "html", content: structured }; } } } catch (architectureErr) { } } if (!architecturePayload) { architecturePayload = renderArchitectureView(doc, sourceMeta); } renderDocContent(architecturePayload); return; } if (state.mode === "contract") { setStructuredMode(false, ""); docViewer.textContent = renderContractView(doc, sourceMeta); return; } setStructuredMode(false, ""); docViewer.textContent = sourceMeta.sourceText || (doc.id === "memory_lifecycle" && state.categoryId === "memory_learning_reasoning") || (doc.id === "memory_lifecycle" && state.categoryId === "memory_learning_reasoning") || (doc.id === "learning_gov" && state.categoryId === "memory_learning_reasoning") || (doc.id === "learning_gov" && state.categoryId === "memory_learning_reasoning") || (doc.id === "planning_reasoning" && state.categoryId === "memory_learning_reasoning") || (doc.id === "planning_reasoning" && state.categoryId === "memory_learning_reasoning") || (doc.id === "tool_execution" && state.categoryId === "memory_learning_reasoning") || (doc.id === "tool_execution" && state.categoryId === "memory_learning_reasoning") || (doc.id === "knowledge_ingestion" && state.categoryId === "memory_learning_reasoning") || (doc.id === "monitoring_canonical" && state.categoryId === "monitoring_observability") || (doc.id === "monitoring_canonical" && state.categoryId === "monitoring_observability") || (doc.id === "sse_bridge_canonical" && state.categoryId === "monitoring_observability") || (doc.id === "sse_bridge_canonical" && state.categoryId === "monitoring_observability"); } catch (err) { const fallbackMeta = { kind: doc.type, summary: "Failed to load source.", extra: { keys: [], headings: [], preview: [] } }; setStructuredMode(false, ""); setHero(doc, phase, category, fallbackMeta); buildDocMap(doc, fallbackMeta); buildRelationMap(doc, category, fallbackMeta); if (state.mode === "architecture") { renderDocContent(renderArchitectureView(doc, fallbackMeta)); return; } docViewer.textContent = "Failed to load source\n\n" + String(err); } } function bindModes(){ btnViewArchitecture.onclick = () => { state.mode = "architecture"; renderDocViewer(); }; btnViewContract.onclick = () => { state.mode = "contract"; renderDocViewer(); }; btnViewSource.onclick = () => { state.mode = "source"; renderDocViewer(); }; } function init(){ state.phaseId = HUB.phases[0].id; state.categoryId = HUB.categories[0].id; state.docId = HUB.categories[0].docs[0].id; bindModes(); render(); } function render(){ buildTree(); buildPhases(); buildMetrics(); buildPhaseMap(); ===== loadDocSource FUNCTION ===== PASS: loadDocSource line=1542 const preview = lines.slice(0, 8); const summary = preview.slice(0, 3).join(" ").slice(0, 220) || "Text source loaded."; return { headings, preview, summary }; } function summarizeJson(data){ const keys = data && typeof data === "object" ? Object.keys(data) : []; return { keys: keys.slice(0, 12), summary: keys.length ? `JSON source with top-level keys: ${keys.slice(0, 6).join(", ")}` : "JSON source loaded." }; } async function loadDocSource(doc){ const cacheKey = doc.path; if (docSourceCache.has(cacheKey)) return docSourceCache.get(cacheKey); const promise = (async () => { const res = await fetch(doc.path, { cache: "no-store" }); if (!res.ok) throw new Error("HTTP " + res.status); if (doc.type === "json") { const data = await res.json(); const info = summarizeJson(data); return { kind: "json", raw: data, sourceText: JSON.stringify(data, null, 2), summary: info.summary, extra: info }; } const raw = await res.text(); const info = summarizeText(raw); return { kind: "text", raw: raw, sourceText: raw, summary: info.summary, extra: info }; })(); docSourceCache.set(cacheKey, promise); return promise; } function buildDocMap(doc, sourceMeta){ docPanelTitle.textContent = doc.label; docTypeBadge.textContent = doc.type; const previewInfo = sourceMeta.kind === "json" ? (sourceMeta.extra.keys.length ? sourceMeta.extra.keys.join(", ") : "no top-level keys") : (sourceMeta.extra.headings.length ? sourceMeta.extra.headings.join(" | ") : "no markdown headings"); docMap.innerHTML = ""; docMap.appendChild(docMapRow("Source path", doc.path)); docMap.appendChild(docMapRow("Phase", doc.phase)); docMap.appendChild(docMapRow("Layer", doc.layer)); docMap.appendChild(docMapRow("Source type", sourceMeta.kind)); docMap.appendChild(docMapRow("Source summary", sourceMeta.summary)); docMap.appendChild(docMapRow("Detected structure", previewInfo)); docMap.appendChild(docMapRow("Depends on", doc.depends_on.join(", "))); docMap.appendChild(docMapRow("Used by", doc.used_by.join(", "))); } function buildRelationMap(doc, category, sourceMeta){ relationMap.innerHTML = ""; const primaryRole = sourceMeta.kind === "json" ? "Structured canonical data source." : "Canonical text document."; [ { title: "Where this fits", text: `Belongs to ${category.title}.` }, { title: "Depends on", text: doc.depends_on.join(", ") }, { title: "Used by", text: doc.used_by.join(", ") }, { title: "Primary role", text: primaryRole } ].forEach(item => { const el = document.createElement("div"); el.className = "mini-item"; el.innerHTML = `${item.title}${item.text}`; relationMap.appendChild(el); }); } function escapeHtml(value){ return String(value ?? "") .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } function slugifyLabel(value){ return String(value || "") .normalize("NFD").replace(/[\u0300-\u036f]/g, "") .toLowerCase() .replace(/[^a-z0-9]+/g, " ") .trim(); } ===== renderArchitectureView FUNCTION ===== PASS: renderArchitectureView line=1966

${escapeHtml(previewTitle)}

architecture
Summary Preview
${ previewItems.length ? `
    ${previewItems.map(item => `
  • ${escapeHtml(item)}
  • `).join("")}
` : `
No preview lines available.
` }
`; } function renderArchitectureView(doc, sourceMeta){ if (doc.id === "cas" && state.categoryId === "architecture_engineering_core") { const renderPendingCard = (title) => ` `; const renderExecutionItem = (item) => { const lines = String(item) .split("\n") .map(line => line.trimEnd()) .filter(line => line.trim() !== ""); return lines.map(line => { const section = line.match(/^([A-Z_]+):\s*(.*)$/); if (section) { const label = escapeHtml(section[1] + ":"); const rest = section[2] ? " " + escapeHtml(section[2]) : ""; return `
${label}${rest}
`; } if (line.startsWith("- ")) { return `
• ${escapeHtml(line.slice(2))}
`; } return `
${escapeHtml(line)}
`; }).join(""); }; const renderStructuredCard = (title, buckets) => ` `; const overviewHtml = `

Overview

${escapeHtml("CAS is the phase gate that turns Architecture & Engineering Canon into a usable execution map. In Devon, this category must define the cognitive architecture contract that the Documentation Hub exposes today and the execution panel will consume later: domains, responsibilities, limits, dependencies and the conditions that make a behavior architectural instead of accidental.")}

`; queueMicrotask(() => { const btn = document.getElementById("cas-overview-toggle"); const more = document.getElementById("cas-overview-more"); if (!btn || !more) return; const toggle = () => { const expanded = btn.getAttribute("aria-expanded") === "true"; btn.setAttribute("aria-expanded", expanded ? "false" : "true"); more.hidden = expanded; more.style.display = expanded ? "none" : "grid"; btn.textContent = expanded ? "mais..." : "menos"; }; if (btn.dataset.bound !== "true") { btn.dataset.bound = "true"; btn.addEventListener("click", toggle); btn.addEventListener("keydown", (event) => { if (event.key === "Enter" || event.key === " ") { event.preventDefault(); toggle(); } }); } btn.setAttribute("aria-expanded", "false"); btn.textContent = "mais..."; more.hidden = true; more.style.display = "none"; }); const prerequisitesBuckets = [ { ===== ROUTE FUNCTION STATE ===== function getArchitectureAuthorityDoc(){ return findDocById("master_architecture_index") || null; } function resolveArchitectureDoc(doc){ const master = getArchitectureAuthorityDoc(); if (!master) return doc; return master; } function metricData(){ const totalCategories = HUB.categories.length; ===== DEAD CODE CHECK ===== PASS: no mission custom branch PASS: mission not forced ===== SYNTAX ===== PASS: hub_index valid JSON No syntax errors detected in /home/yeff/public_html/devon/docs/index.php PASS: render-flow evidence collected; no files changed OUTPUT_FILE=/home/yeff/public_html/devon/_debug_render_flow_mission_20260430_193827.txt