Draft and post a course announcement with AI-assisted writing and tone matching
Draft a course announcement with AI assistance and post it to Canvas after user approval.
Take a topic or rough notes, draft an announcement matching the course's tone and formality settings, present it for approval and editing, then post via the dauber CLI. Keeps the instructor in the loop while saving time on routine communications.
Read dauber/config.toml to get canvas_course_id,
course_title, course_code, feedback_language, and formality.
If missing: Report error and tell user to run /course:setup first. Stop.
The user provides {{topic}} which may be:
uv run dauber discussions list {canvas_course_id} --announcements --format json
If there are recent announcements, note their titles and style to maintain consistency. Do not display these to the user unless asked.
Using the topic input, course context, and formality setting, draft the announcement. Follow these guidelines:
Title: Short, clear subject line (under 60 characters).
Body: Write in the language specified by feedback_language.
Content structure:
Do not:
Display the drafted announcement clearly:
Announcement Draft
==================
Title: {title}
Language: {feedback_language}
Tone: {formality}
---
{announcement_body}
---
Use AskUserQuestion:
If "Edit the draft": Ask the user what changes they want. Revise and present the updated draft again. Repeat until approved or cancelled.
If "Start over": Ask for new direction and return to Step 3.
Once approved, post the announcement:
uv run dauber discussions create {canvas_course_id} "{title}" \
--message "{announcement_body}" \
--announcement \
--publish \
--format json
Notes:
--announcement flag creates it as an announcement rather than a
discussion topic--publish flag makes it immediately visibleParse the JSON response to extract the announcement id and posted_at.
Announcement Posted
===================
Course: {course_title} ({course_code})
Title: {title}
Posted: {posted_at}
ID: {announcement_id}
The announcement is now visible to all enrolled students.
To view:
uv run dauber discussions show {canvas_course_id} {announcement_id}
To edit later:
uv run dauber discussions update {canvas_course_id} {announcement_id} --message "..."
/course:setup$(cat /tmp/dauber_announcement.html) patternBegin drafting now.