Replace niche templates with simple starters and direct template submission

This commit is contained in:
2026-10-10 02:37:31 +01:00
parent 4cae37f950
commit 7b10e3889e
38 changed files with 389 additions and 1195 deletions
+12 -23
View File
@@ -11,32 +11,21 @@ import (
//go:embed *.md
var sources embed.FS
var descriptions = map[string]string{
"anime-today": "Today's anime episodes, verified links/images, and a Markdown ntfy report.",
"notification-test": "Manual success/failure notification smoke test with fictional fixtures.",
"bug-fix": "Plan, implement, verify, review, and report a focused bug fix.",
"new-feature": "Sequential UI/API fork with verification and review.",
"dependency-upgrade": "Dependency migration with regression checks and approval.",
"incident-diagnosis": "Read-only incident investigation with evidence and uncertainty.",
"nested-forks": "Tool-free exclusive branching and nested forks.",
"scheduled-summary": "A scheduled text summary. Submitting activates its schedule.",
"scheduled-web-research": "Scheduled web research; requires a configured search provider.",
"anime-digest": "Scheduled current-season anime digest with notifications.",
"dashboard-screenshots": "Capture/review workflow example; browser capture is not currently supported.",
var starters = []protocol.Template{
{Key: "task", Name: "Complete a task", Description: "One stage to complete a task in your repository and report actual results."},
{Key: "summary", Name: "Summarize text", Description: "One tool-free stage to summarize supplied text without inventing facts."},
{Key: "three-stage", Name: "Plan, implement, review", Description: "Plan a change, implement it, then review and verify it. Any language or file type."},
{Key: "review", Name: "Review a repository", Description: "One read-only stage to review repository content and report findings."},
{Key: "research", Name: "Research a topic", Description: "Research a topic on the web, then write a sourced report. Requires web search support."},
}
func Catalog() []protocol.Template {
entries, _ := sources.ReadDir(".")
result := make([]protocol.Template, 0, len(entries))
for _, entry := range entries {
key := strings.TrimSuffix(entry.Name(), ".md")
description, ok := descriptions[key]
if !ok {
continue
}
data, _ := sources.ReadFile(entry.Name())
source := string(data)
result = append(result, protocol.Template{Key: key, Name: strings.ReplaceAll(key, "-", " "), Description: description, Source: source, Scheduled: strings.Contains(source, "```schedule")})
result := make([]protocol.Template, 0, len(starters))
for _, item := range starters {
data, _ := sources.ReadFile(item.Key + ".md")
item.Source = string(data)
item.Scheduled = strings.Contains(item.Source, "```schedule")
result = append(result, item)
}
return result
}