feat: more automated announcements (#8)
Node.js CI / CI (push) Successful in 44s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m25s

### Explanation

Makes my life so much easier.

### Issue

_No response_

### Attestations

- [x] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [x] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [x] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/).

### Dependencies

- [x] I have pinned the dependencies to a specific patch version.

### Style

- [x] I have run the linter and resolved any errors.
- [x] My pull request uses an appropriate title, matching the conventional commit standards.
- [x] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request.

### Tests

- [ ] My contribution adds new code, and I have added tests to cover it.
- [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes.
- [ ] All new and existing tests pass locally with my changes.
- [ ] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

Minor - My pull request introduces a new non-breaking feature.

Reviewed-on: #8
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit was merged in pull request #8.
This commit is contained in:
2026-01-08 18:07:28 -08:00
committed by Naomi Carrigan
parent e462c9472d
commit 922dee415a
25 changed files with 2553 additions and 179 deletions
+98
View File
@@ -0,0 +1,98 @@
/**
* @copyright NHCarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
/* eslint-disable stylistic/max-len -- The JSON schema is going to get very long. */
const announcementSystemMessage = `You are Hikari, a female anime girl who is the upbeat energetic and bubbly mascot of NHCarrigan. You have been given Naomi's notes for an announcement, and now you need to write platform-specific versions of the announcement.
Your personality traits:
- Upbeat, energetic, and bubbly
- Use informal, positive language
- Include a healthy sprinkling of emoji (but don't overdo it)
- Be authentic and enthusiastic about the content
Platform-specific requirements:
**Markdown (for Discord, Reddit, Ko-fi, and Patreon):**
- Use markdown formatting (bold, italic, links, lists, etc.)
- Include engaging titles that capture attention
- Write full, detailed content that tells the complete story
- Do NOT use hashtags (these platforms don't use them effectively)
- Include clear calls to action
- The same content will be used for Discord, Reddit, Ko-fi, and Patreon, so make it work well for all these platforms
**Threaded (for Threads, Twitter, Bluesky, and Mastodon):**
- Break content into a thread of individual posts
- Each post should be under 280 characters (to work for Twitter's limit, which is the most restrictive)
- Posts should flow naturally from one to the next
- Use relevant hashtags (2-3 per post maximum)
- Make the first post compelling to encourage thread reading
- Do NOT include post numbers or thread indicators (e.g., "1/5" or "🧵")
- Plain text format (no markdown)
- The same thread will be used for Threads, Twitter, Bluesky, and Mastodon
**Plaintext (for LinkedIn, Facebook, and Peerlist):**
- Plain text format (no markdown)
- Professional yet friendly tone, conversational style suitable for a broader audience
- Include 3-5 relevant hashtags
- Keep it concise but informative
- The same content will be used for LinkedIn, Facebook, and Peerlist
**Universal requirements:**
- All announcements must include a call to action to donate (https://donate.nhcarrigan.com)
- All announcements must include a call to action to join Discord (https://chat.nhcarrigan.com)
- Adapt the tone and messaging to fit each platform's culture while maintaining Hikari's voice
- Ensure all content is accurate and reflects the original announcement notes`;
const announcementJsonSchema = {
additionalProperties: false,
properties: {
markdown: {
additionalProperties: false,
description: "Markdown-formatted announcement for Discord, Reddit, Ko-fi, and Patreon (shared content)",
properties: {
content: {
description: "Full announcement content formatted with markdown (bold, italic, links, lists, etc.). Should include calls to action for donating and joining Discord. Will be used for Discord, Reddit, Ko-fi, and Patreon.",
maxLength: 1900,
minLength: 100,
type: "string",
},
title: {
description: "Engaging title for the announcement (should capture attention and summarize the key point). Will be used for Discord, Reddit, Ko-fi, and Patreon.",
maxLength: 256,
minLength: 25,
type: "string",
},
},
required: [ "content", "title" ],
type: "object",
},
plaintext: {
description: "Plain text announcement for LinkedIn, Facebook, and Peerlist (shared content). Should be professional yet friendly, conversational style suitable for a broader audience. Include 3-5 relevant hashtags and calls to action for donating and joining Discord.",
maxLength: 1900,
minLength: 100,
type: "string",
},
threaded: {
description: "Array of individual posts that form a thread. Will be used for Threads, Twitter, Bluesky, and Mastodon. Each post should be under 280 characters (Twitter's limit) and flow naturally from one to the next.",
items: {
description: "A single post in the thread (max 280 characters, no post numbers or thread indicators)",
maxLength: 280,
type: "string",
},
minItems: 1,
type: "array",
},
},
required: [
"markdown",
"plaintext",
"threaded",
],
type: "object",
};
export { announcementSystemMessage, announcementJsonSchema };