Skip to content

Extract AI prompts to editable Directus collection#114

Merged
denbec merged 1 commit intoclaude/implement-phases-5-7-jhgiGfrom
denbec/directus-ai-prompts
Feb 2, 2026
Merged

Extract AI prompts to editable Directus collection#114
denbec merged 1 commit intoclaude/implement-phases-5-7-jhgiGfrom
denbec/directus-ai-prompts

Conversation

@denbec
Copy link
Collaborator

@denbec denbec commented Feb 2, 2026

Summary

Makes AI prompts for content generation editable in Directus without requiring extension rebuilds. Extracts shownotes and social media prompts from hardcoded values into a new ai_prompts collection.

Changes

  • Created ai_prompts collection with schema and setup script
  • Updated generateContent.ts to fetch prompts at runtime from CMS
  • Added template renderer for Handlebars-like variable substitution
  • Updated schema.json with collection, fields, and relations

Test plan

  • Run setup script: node directus-cms/utils/setup-ai-prompts.mjs
  • Verify prompts appear in Directus UI
  • Edit a prompt and verify changes apply to next content generation

🤖 Generated with Claude Code

- Create ai_prompts collection for managing shownotes and social media prompts
- Add setup script to seed default prompts from existing hardcoded values
- Update generateContent.ts to fetch prompts at runtime from CMS
- Implement template renderer for Handlebars-like variable substitution
- Update schema.json with new collection, fields, and relations
- Add documentation in tasks.md about prompt management

Prompts can now be edited in Directus without rebuilding the extension.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
programmierbar-website Ready Ready Preview, Comment Feb 2, 2026 10:02am

Request Review

@denbec denbec merged commit e5c0fc2 into claude/implement-phases-5-7-jhgiG Feb 2, 2026
3 checks passed
denbec added a commit that referenced this pull request Feb 2, 2026
* Implement Phase 5 & 7: Speaker portal notifications and Heise integration

Phase 5 - Speaker Portal Notifications:
- Add speaker-portal-notifications hook for automated emails
- Email templates for: invitation, reminder (3-day), urgent reminder (1-day),
  submission confirmation, and admin notification
- Scheduled task runs daily at 9:00 AM for deadline reminders
- Sends confirmation to speaker and notification to admin on submission

Phase 7 - Heise.de Integration:
- Add heise-integration hook for document generation and email sending
- Create Heise document specification (directus-cms/docs/heise_document_spec.md)
- Generate HTML document when heise_eligible=true AND shownotes approved
- Send email to Heise when heise_document_status changes to 'approved'
- Update status to 'sent' and record timestamp after sending

Environment Variables Required:
- EMAIL_SMTP_HOST, EMAIL_SMTP_PORT, EMAIL_SMTP_USER, EMAIL_SMTP_PASSWORD
- EMAIL_FROM, WEBSITE_URL, ADMIN_NOTIFICATION_EMAIL
- HEISE_CONTACT_EMAIL (for Heise integration)

https://claude.ai/code/session_014GXrQQEggG5ktdM73mWx2F

* Add yarn.lock for Directus extension dependencies

https://claude.ai/code/session_014GXrQQEggG5ktdM73mWx2F

* Refactor email system to use Directus MailService and CMS-based templates

- Replace nodemailer with Directus built-in MailService
- Add shared email-service.ts utility for all hooks
- Create email_templates collection for editable templates in CMS
- Create automation_settings collection for CMS-based configuration
- Move Heise contact email, admin email, website URL to CMS settings
- Add setup script: utils/setup-email-templates.mjs
- Remove nodemailer dependency from package.json

Templates now editable in Directus UI:
- speaker_invitation, speaker_reminder, speaker_urgent_reminder
- speaker_submission_confirmation, speaker_admin_notification
- heise_document

Configuration now in Automation Settings collection:
- heise_contact_email, admin_notification_email
- website_url, speaker_portal_token_validity_days

https://claude.ai/code/session_014GXrQQEggG5ktdM73mWx2F

* Extract AI prompts to editable Directus collection (#114)

- Create ai_prompts collection for managing shownotes and social media prompts
- Add setup script to seed default prompts from existing hardcoded values
- Update generateContent.ts to fetch prompts at runtime from CMS
- Implement template renderer for Handlebars-like variable substitution
- Update schema.json with new collection, fields, and relations
- Add documentation in tasks.md about prompt management

Prompts can now be edited in Directus without rebuilding the extension.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>

* Enhance content generation: pass shownotes to social media prompts

Modified social media content generation to receive full shownotes as context, enabling posts to serve as proper summaries. Social media posts are now generated with access to the episode description, topics, and resources from shownotes.

Changes:
- Updated generateContent.ts to pass shownotes object to social prompt builder
- Modified all social media prompts (LinkedIn, Instagram, Bluesky, Mastodon) to include {{shownotes}} variable
- Added @directus/sdk and dotenv as dependencies for setup scripts
- Updated schema.json with email_templates and automation_settings collections
- Rebuilt extensions with updated content generation logic

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Add yarn.lock for Directus CMS dependencies

Lock file for @directus/sdk and dotenv dependencies used by setup scripts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
@denbec denbec deleted the denbec/directus-ai-prompts branch February 4, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant