ai-context-engineering/risk.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
select
'breadcrumb' as component;
select
'Home' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' as link;
select
'AI Context Engineering Overview' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ai-context-engineering/index.sql' as link;
select
'Risk' as title;
-- QA Risk Panel Card
SELECT 'card' AS component, 'Risk / QA Panel' AS title;
SELECT 'text' as component,
'This page highlights potential risks and quality issues within the AI context ingestion pipeline. Review invalid frontmatter, duplicate or unordered merge groups, and oversized files to ensure prompt quality and system reliability.' as contents;
-- Risk summary table
select
'big_number' as component,
3 as columns,
'colorfull_dashboard' as id;
select
'Invalid Frontmatter' AS title,
(SELECT count_empty_frontmatter
FROM ai_ctxe_uniform_resource_risk_view
) as value,
'red' as color,
'/ai-context-engineering/file-without-frontmatter.sql' as value_link,
TRUE as value_link_new_tab;
-- === Duplicate merge group ===
SELECT
'Duplicate or Missing Order in Merge Groups' AS title,
(
SELECT count_grouped_resources
FROM ai_ctxe_uniform_resource_risk_view
) AS value,
'red' AS color,
'/ai-context-engineering/file-with-merge-group-risk-list.sql' as value_link,
TRUE as value_link_new_tab;
-- === FILES OVERSIZED ===
SELECT
'Oversized Files (> 1MB)' AS title,
(
SELECT count_large_files
FROM ai_ctxe_uniform_resource_risk_view
) AS value,
'orange' AS color,
'/ai-context-engineering/file-oversized-list.sql' as value_link;