From 6cd1cab5cc71b7fdf70668414fe27cb3557b94ab Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Fri, 28 Aug 2026 12:13:12 +0200 Subject: [PATCH 1/2] Add prompt management default content --- ..._ai_prompt_management.ai_task.headline.yml | 8 +++ ...ai_prompt_management.ai_task.seo_title.yml | 8 +++ ...ompt_management.ai_task.teaser_summary.yml | 8 +++ ...t_management.ai_task.writing_assistant.yml | 8 +++ .../2bde7757-1da2-4602-975e-bfaa22b20170.yml | 25 +++++++ .../66973c22-8db7-4881-9864-47a839c3e132.yml | 25 +++++++ .../6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml | 25 +++++++ .../6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml | 72 +++++++++++++++++++ .../8d822488-7ccf-4485-895b-daf16bdf5cc8.yml | 25 +++++++ .../95fc4367-e114-4993-8196-0bebe1b15853.yml | 25 +++++++ .../cd67b942-d18c-4427-a05a-c81245548961.yml | 25 +++++++ .../eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml | 25 +++++++ thunder_testing_demo.info.yml | 10 +++ 13 files changed, 289 insertions(+) create mode 100644 config/optional/thunder_ai_prompt_management.ai_task.headline.yml create mode 100644 config/optional/thunder_ai_prompt_management.ai_task.seo_title.yml create mode 100644 config/optional/thunder_ai_prompt_management.ai_task.teaser_summary.yml create mode 100644 config/optional/thunder_ai_prompt_management.ai_task.writing_assistant.yml create mode 100644 content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml create mode 100644 content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml create mode 100644 content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml create mode 100644 content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml create mode 100644 content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml create mode 100644 content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml create mode 100644 content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml create mode 100644 content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml diff --git a/config/optional/thunder_ai_prompt_management.ai_task.headline.yml b/config/optional/thunder_ai_prompt_management.ai_task.headline.yml new file mode 100644 index 0000000..209cce7 --- /dev/null +++ b/config/optional/thunder_ai_prompt_management.ai_task.headline.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: + module: + - thunder_ai_prompt_management +id: headline +label: Headline +description: 'Suggest headline options for the article.' diff --git a/config/optional/thunder_ai_prompt_management.ai_task.seo_title.yml b/config/optional/thunder_ai_prompt_management.ai_task.seo_title.yml new file mode 100644 index 0000000..f19670a --- /dev/null +++ b/config/optional/thunder_ai_prompt_management.ai_task.seo_title.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: + module: + - thunder_ai_prompt_management +id: seo_title +label: 'SEO Title' +description: 'Generate a search-optimized meta title.' diff --git a/config/optional/thunder_ai_prompt_management.ai_task.teaser_summary.yml b/config/optional/thunder_ai_prompt_management.ai_task.teaser_summary.yml new file mode 100644 index 0000000..87c6f72 --- /dev/null +++ b/config/optional/thunder_ai_prompt_management.ai_task.teaser_summary.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: + module: + - thunder_ai_prompt_management +id: teaser_summary +label: 'Teaser Summary' +description: 'Write a short teaser summary for listings.' diff --git a/config/optional/thunder_ai_prompt_management.ai_task.writing_assistant.yml b/config/optional/thunder_ai_prompt_management.ai_task.writing_assistant.yml new file mode 100644 index 0000000..42ec867 --- /dev/null +++ b/config/optional/thunder_ai_prompt_management.ai_task.writing_assistant.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: + module: + - thunder_ai_prompt_management +id: writing_assistant +label: 'Writing Assistant' +description: 'Prompts for the AI chatbot to draft or review the article directly from the edit form.' diff --git a/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml b/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml new file mode 100644 index 0000000..8c5d4da --- /dev/null +++ b/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 2bde7757-1da2-4602-975e-bfaa22b20170 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'SEO-friendly headline' + prompt: + - + value: 'Write a clear, keyword-forward headline for this article that describes what it is about and would perform well in search results. Keep it under 70 characters.' + ai_task: + - + target_id: headline + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml b/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml new file mode 100644 index 0000000..ddcc687 --- /dev/null +++ b/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 66973c22-8db7-4881-9864-47a839c3e132 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Review this draft for SEO & clarity' + prompt: + - + value: 'Read the article currently open in this edit form, including any unsaved changes. Check for a missing or weak headline, SEO title, or teaser summary, unclear wording, and structural issues. Summarize what is missing or weak, then use your tools to propose concrete fixes back into the form as a reviewable change.' + ai_task: + - + target_id: writing_assistant + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml b/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml new file mode 100644 index 0000000..11029bf --- /dev/null +++ b/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 6ab47d3d-908e-4fa9-a49a-1e05d0d52da2 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Draft this article from a brief' + prompt: + - + value: 'If I have not given you a topic or brief for this article yet, ask me for one. Then draft a complete article: propose a headline, an SEO title, a short teaser summary, and an opening paragraph. Use your tools to apply the draft to the open article form as a reviewable change, rather than only describing it in chat.' + ai_task: + - + target_id: writing_assistant + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml b/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml new file mode 100644 index 0000000..56e56e9 --- /dev/null +++ b/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml @@ -0,0 +1,72 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Add an FAQ section' + prompt: + - + value: |- + ## Task: Create an FAQ from an article + + You are an experienced editorial assistant. + + Analyze the provided article and create relevant, helpful FAQ questions with matching answers from it. + + ### Rules + + * Read and understand the entire article before creating the FAQ. + * Create **5-10 relevant FAQ entries**. + * Each question must be genuinely helpful to readers of the article. + * The answers must be based exclusively on information from the article. + * Do not invent information and do not make assumptions. + * Do not use information that is not contained in the article or clearly derivable from it. + * Avoid duplicate or very similar questions. + * Phrase the questions naturally and concretely. + * Keep the answers precise and easy to understand. + * Use the same language as the article. + + ### Selection by the user + + After creating the FAQ, **you MUST call the tool `ai_chatbot_assistant_ui_ask_user`**. + + Present **all generated FAQ entries as a multiselect**. + + Each selectable option must include the corresponding **question and its answer**, so the user can judge which FAQ entries to adopt. + + The user must be able to select several FAQ entries at once. + + **Important:** + + * Use `ai_chatbot_assistant_ui_ask_user` exclusively for this presentation. + * Do not output the generated FAQ entries as a normal chat reply instead. + * Wait for the user's selection. + * Only the FAQ entries the user selected count as adopted. + + ### Inserting the selected FAQ + + After the user's selection, create **one new paragraph of type Text at the end of the article** from the selected FAQ entries. + + * Do not insert the selected FAQ anywhere else in the article. + * The new paragraph is inserted **after the article's existing last paragraph**. + * Use exclusively the FAQ entries selected by the user. + * Include the question and answer for each one. + * Format the new paragraph as a well-readable FAQ section. + * If no FAQ entries were selected, no FAQ paragraph may be added. + * The existing article content must not be changed. + ai_task: + - + target_id: writing_assistant + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml b/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml new file mode 100644 index 0000000..3f7e4ea --- /dev/null +++ b/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 8d822488-7ccf-4485-895b-daf16bdf5cc8 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Check spelling & grammar' + prompt: + - + value: 'Read the article currently open in this edit form, including the title, SEO title, and teaser text. Check it for spelling and grammar mistakes. List each mistake you find with a suggested correction, then use your tools to apply the corrections to the form as a reviewable change.' + ai_task: + - + target_id: writing_assistant + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml b/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml new file mode 100644 index 0000000..97b7cb1 --- /dev/null +++ b/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: 95fc4367-e114-4993-8196-0bebe1b15853 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Teaser summary' + prompt: + - + value: 'Write a short, 1-2 sentence teaser summarizing this article for a front-page listing. Make it inviting without repeating the headline verbatim.' + ai_task: + - + target_id: teaser_summary + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml b/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml new file mode 100644 index 0000000..c12bec5 --- /dev/null +++ b/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: cd67b942-d18c-4427-a05a-c81245548961 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'SEO meta title' + prompt: + - + value: 'Write a concise, keyword-rich SEO meta title for this article, distinct from the on-page headline, optimized for search engine results. Keep it under 60 characters.' + ai_task: + - + target_id: seo_title + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml b/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml new file mode 100644 index 0000000..729a979 --- /dev/null +++ b/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml @@ -0,0 +1,25 @@ +_meta: + version: '1.0' + entity_type: ai_prompt_content + uuid: eb86b7d1-2b33-43cd-b35c-5e9677ffebe0 + bundle: ai_prompt_content + default_langcode: en +default: + status: + - + value: true + label: + - + value: 'Punchy headline' + prompt: + - + value: 'Write a short, punchy, attention-grabbing headline for this article that would make someone want to click on it. Keep it under 70 characters.' + ai_task: + - + target_id: headline + entity_context: + - + value: node.article + model: + - + value: azure__thunder_ai_azure diff --git a/thunder_testing_demo.info.yml b/thunder_testing_demo.info.yml index 1399891..c9a53d2 100644 --- a/thunder_testing_demo.info.yml +++ b/thunder_testing_demo.info.yml @@ -7,7 +7,17 @@ dependencies: - default_content:default_content - drupal:help - drupal:tour + - thunder_ai_prompt_management:thunder_ai_prompt_management default_content: + ai_prompt_content: + - eb86b7d1-2b33-43cd-b35c-5e9677ffebe0 + - 2bde7757-1da2-4602-975e-bfaa22b20170 + - cd67b942-d18c-4427-a05a-c81245548961 + - 6ab47d3d-908e-4fa9-a49a-1e05d0d52da2 + - 66973c22-8db7-4881-9864-47a839c3e132 + - 8d822488-7ccf-4485-895b-daf16bdf5cc8 + - 6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5 + - 95fc4367-e114-4993-8196-0bebe1b15853 taxonomy_term: - 0bb70443-8172-4d8e-9335-2876bc32e356 - bfc251bc-de35-467d-af44-1f7a7012b845 From d9f53d2d73bdc281e878081711595c494529e8d7 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Fri, 28 Aug 2026 12:26:06 +0200 Subject: [PATCH 2/2] Use the default AI model for demo prompts Drop the hardcoded azure__thunder_ai_azure model so the demo prompts follow the site-wide default chat model instead. --- .../ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml | 3 --- .../ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml | 3 --- .../ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml | 3 --- .../ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml | 3 --- .../ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml | 3 --- .../ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml | 3 --- .../ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml | 3 --- .../ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml | 3 --- 8 files changed, 24 deletions(-) diff --git a/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml b/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml index 8c5d4da..84936e8 100644 --- a/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml +++ b/content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml b/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml index ddcc687..e0085d0 100644 --- a/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml +++ b/content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml b/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml index 11029bf..866844e 100644 --- a/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml +++ b/content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml b/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml index 56e56e9..cac8529 100644 --- a/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml +++ b/content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml @@ -67,6 +67,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml b/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml index 3f7e4ea..1d9c0fa 100644 --- a/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml +++ b/content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml b/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml index 97b7cb1..1dfd4a1 100644 --- a/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml +++ b/content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml b/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml index c12bec5..62e5080 100644 --- a/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml +++ b/content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure diff --git a/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml b/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml index 729a979..cf7b37f 100644 --- a/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml +++ b/content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml @@ -20,6 +20,3 @@ default: entity_context: - value: node.article - model: - - - value: azure__thunder_ai_azure