ai-context-engineering/prompt-detail-anythingllm.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
'Prompt' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ai-context-engineering/prompts-anythingllm.sql' as link;
select
"title" as title,
"#" as link
from uniform_resource_build_anythingllm
where uniform_resource_id = $uniform_resource_id;
SELECT 'title' AS component, 'Prompt Details' AS contents;
-- First card for accordion (frontmatter details)
SELECT 'html' AS component,
'<details open>
<summary>Frontmatter details</summary>
<div>' AS html;
SELECT 'card' AS component, 1 as columns;
SELECT
'
**Title** : ' || a.title AS description_md,
'
**Summary** : ' || a.frontmatter_summary AS description_md,
'
**Lifecycle** : ' || a.frontmatter_lifecycle AS description_md,
'
**Product name** : ' || a.frontmatter_product_name AS description_md,
'
**Provenance source uri** : ' || a.frontmatter_provenance_source_uri AS description_md,
'
**Provenance dependencies**:
' ||
ifnull((
SELECT group_concat('- ' || value, char(10))
FROM json_each(a.frontmatter_provenance_dependencies)
), 'None')
AS description_md,
'
**Reviewers** : ' || a.frontmatter_reviewers AS description_md,
'
**Product features** : ' || a.frontmatter_product_features AS description_md,
'
Merge group: [' || a.frontmatter_merge_group || '](' ||
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ai-context-engineering/merge-group-detail.sql' ||
'?uniform_resource_id=' || uniform_resource_id || ')'
AS description_md
FROM ai_ctxe_uniform_resource_frontmatter_view_anythingllm a
WHERE a.uniform_resource_id = $uniform_resource_id;
SELECT 'html' AS component, '</div></details>' AS html;
SELECT 'card' AS component, 1 as columns;
SELECT
'
' || p.body_text AS description_md
FROM uniform_resource_build_anythingllm p
WHERE p.uniform_resource_id = $uniform_resource_id;