feat(experiment): prompt create shows more example templates and agents#402
feat(experiment): prompt create shows more example templates and agents#402
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
=======================================
Coverage ? 68.05%
=======================================
Files ? 217
Lines ? 18193
Branches ? 0
=======================================
Hits ? 12382
Misses ? 4650
Partials ? 1161 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
💌 Leaving a few comments and questions ahead for future reviewers!
| languageOptions := []string{ | ||
| fmt.Sprintf("Bolt for JavaScript %s", style.Secondary("Node.js")), | ||
| fmt.Sprintf("Bolt for Python %s", style.Secondary("Python")), | ||
| fmt.Sprintf("Deno Slack SDK %s", style.Secondary("Deno")), | ||
| } | ||
| if clients.Config.WithExperimentOn(experiment.Templates) { | ||
| languageOptions = []string{ | ||
| "Bolt for JavaScript", | ||
| "Bolt for Python", | ||
| "Deno Slack SDK", | ||
| } | ||
| } |
There was a problem hiding this comment.
🔭 note: Toward confusion of #325 we focused on on a "framework" selection here - @srtaalej!
🐣 ramble: The samples command has the following flag option too but IMHO the prompt it supports feels unexpected. Perhaps it's changed to "framework" soon?
--language string runtime for the app framework
ex: "deno", "node", "python"
There was a problem hiding this comment.
Agreed, I've often felt "language" was a poor choice. We went with it back when Deno was the only choice. Now, it feels like we're choosing frameworks not languages.
question: In the spirit of focus around a survey-to-huh migration, can we consider keeping parity between the 2 prompts? Change it to framework in both places or consider doing the framework change AFTER we release the huh migration.
| categoryID = "slack-cli#getting-started" | ||
| } | ||
|
|
||
| // App categories and templates |
There was a problem hiding this comment.
🪓 note: This comment is removed in favor of godoc above.
| "github.com/spf13/cobra" | ||
| ) | ||
|
|
||
| // getSelectionOptions returns the app template options for a given category. |
There was a problem hiding this comment.
🪬 thought: The changes of this PR make me think of the create selections now as:
- Category: Choice of template, agent, or sample
- Scaffold: Feature focused examples
- Framework: Code implementation details
| { | ||
| Title: "Custom agent", | ||
| Description: "Minimal setup with the Slack MCP server", | ||
| Repository: "slack-cli#ai-apps/mcp-server", | ||
| }, |
There was a problem hiding this comment.
🔍 note: We can perhaps make effort to feature this as the agent starter template with a minimal event listener, action listener, and agentic loop to be compliment to the quickstart:
📚 https://docs.slack.dev/tools/bolt-js/getting-started
👾 question: Does this seem like the right separation with the assistant template below? I understand that "Casey" might be more useful to known cases and demonstrates adjacent frameworks also?
There was a problem hiding this comment.
The Slack MCP Server sample app is fine as a choice for now, but I think we'll need release Starter Agent templates that use our chosen Agent Frameworks and LLM Providers.
| return create.Template{}, slackerror.New(slackerror.ErrInvalidArgs). | ||
| WithMessage("The %s category was not found", categoryShortcut) |
There was a problem hiding this comment.
| categories = []categoryInfo{ | ||
| {id: "slack-cli#starter-templates/getting-started", name: "Starter templates"}, | ||
| {id: "slack-cli#starter-templates/automation-apps", name: "Automation templates"}, | ||
| {id: "slack-cli#starter-templates/search-template", name: "Search templates"}, | ||
| {id: "slack-cli#starter-templates/blank-template", name: "Blank templates"}, | ||
| {id: "slack-cli#ai-apps/support-agent", name: "Support agent"}, | ||
| {id: "slack-cli#ai-apps/mcp-server", name: "Custom agent"}, | ||
| {id: "slack-cli#ai-apps/assistant-template", name: "Assistant templates"}, | ||
| } |
There was a problem hiding this comment.
🪵 note: This file is updated in #400 and included here for demo purposes.
There was a problem hiding this comment.
🍰 note: The emoji related changes are also toward #400 changes!
| selectOptions := make([]string, len(sortedRepos)) | ||
| for i, r := range sortedRepos { | ||
| if !clients.Config.WithExperimentOn(experiment.Charm) { | ||
| selectOptions[i] = fmt.Sprint(i+1, ". ", r.Name) | ||
| } else { | ||
| selectOptions[i] = r.Name | ||
| } | ||
| } |
There was a problem hiding this comment.
👁️🗨️ note: The remaining changes of this file exist in #400!
…experiment # Conflicts: # cmd/project/create_template.go
mwbrooks
left a comment
There was a problem hiding this comment.
thought: Honestly, I'm not sure how I feel about this @zimeg. It took me a couple attempts at slack create -e templates to understand what is happening.
It feels like everything has now became a Starter Template, which I sorta understand where it's coming from, but it's adding a second layer of complexity that doesn't feel right to me.
For example, following this design I'd argue that the "Agent Custom App" is actually the "Agent Starter App" which should go under "Starter App" category. Of course, that isn't the experience that we want.
Personally, I'd prefer to keep our create experience as-is (production) while only adding the multiple choices to the type of Agent Apps that a developer can choose from (Starter Agent and Support Agent, for now).
I don't think we're ready to introduce new app choices to the create screen - Blank, Search, etc. It's something we want, but I think we should take a beat to think about the design and experience outside of a PR that is focused on introducing the Starter Agent templates.
| languagePrompt := "Select a language:" | ||
| if clients.Config.WithExperimentOn(experiment.Templates) { | ||
| languagePrompt = "Select a framework:" | ||
| } |
There was a problem hiding this comment.
note: This is fine and I appreciate the improvement. But I'll plead for ya'll to try to keep the focus on a survey-to-huh migration without introducing other changes.
The more changes, the more to review, the longer it takes to release the experiment, and the harder it is to feel confident in the release.
I'd suggest keeping a list of improvements like switching language to framework and do it as follow-ups after releasing the survey-to-huh migration. Changing "Language" to "Framework" should also update/alias our --language flag and update any internal Golang references.
| // getFrameworkOptions returns the framework choices for a given template | ||
| // selection. | ||
| // | ||
| // The order of entries should match the unfolded selection order for sake of | ||
| // new entries. This is not an implementation requirement. | ||
| func getFrameworkOptions(template string) []promptObject { |
There was a problem hiding this comment.
nit: Again, nice to have but this feels like something that could come after we release the survey-to-huh experiment.
| promptForCategory := "Select an app:" | ||
| if clients.Config.WithExperimentOn(experiment.Templates) { | ||
| promptForCategory = "Select a category:" |
There was a problem hiding this comment.
nit: Again, the drift between survey and huh while under experiment feels wrong to me. I understand it's just a title, but I'd rather see the focus on migrating one dependency to another, instead of changing the UX. If we do change the UX, please change it for both survey and huh (and any internals).

Changelog
Summary
This PR prompts
createto show more starter templates, list "typescript" projects, and show agentic examples. This includes:We include this behind a new "templates" experiment until templates have matching framework support and examples are made public.
Preview
📸 Starter templates:
🤖 Agent examples:
Requirements