feat: scaffold creates per-transport bot.toml example files

New projects now get bot.toml.matrix.example, bot.toml.whatsapp-meta.example,
bot.toml.whatsapp-twilio.example, and bot.toml.slack.example in .storkit/
during scaffolding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-03-24 18:13:32 +00:00
parent f1b4894d6e
commit 438be196c9

View File

@@ -11,6 +11,13 @@ const KEY_KNOWN_PROJECTS: &str = "known_projects";
const STORY_KIT_README: &str = include_str!("../../../.storkit/README.md");
const BOT_TOML_MATRIX_EXAMPLE: &str = include_str!("../../../.storkit/bot.toml.matrix.example");
const BOT_TOML_WHATSAPP_META_EXAMPLE: &str =
include_str!("../../../.storkit/bot.toml.whatsapp-meta.example");
const BOT_TOML_WHATSAPP_TWILIO_EXAMPLE: &str =
include_str!("../../../.storkit/bot.toml.whatsapp-twilio.example");
const BOT_TOML_SLACK_EXAMPLE: &str = include_str!("../../../.storkit/bot.toml.slack.example");
const STORY_KIT_CONTEXT: &str = "<!-- storkit:scaffold-template -->\n\
# Project Context\n\
\n\
@@ -467,6 +474,24 @@ fn scaffold_story_kit(root: &Path, port: u16) -> Result<(), String> {
write_script_if_missing(&script_root.join("test"), &script_test_content)?;
write_file_if_missing(&root.join("CLAUDE.md"), STORY_KIT_CLAUDE_MD)?;
// Write per-transport bot.toml example files so users can see all options.
write_file_if_missing(
&story_kit_root.join("bot.toml.matrix.example"),
BOT_TOML_MATRIX_EXAMPLE,
)?;
write_file_if_missing(
&story_kit_root.join("bot.toml.whatsapp-meta.example"),
BOT_TOML_WHATSAPP_META_EXAMPLE,
)?;
write_file_if_missing(
&story_kit_root.join("bot.toml.whatsapp-twilio.example"),
BOT_TOML_WHATSAPP_TWILIO_EXAMPLE,
)?;
write_file_if_missing(
&story_kit_root.join("bot.toml.slack.example"),
BOT_TOML_SLACK_EXAMPLE,
)?;
// Write .mcp.json at the project root so agents can find the MCP server.
// Only written when missing — never overwrites an existing file, because
// the port is environment-specific and must not clobber a running instance.