43 lines
1.8 KiB
Go
43 lines
1.8 KiB
Go
package examples
|
|
|
|
import (
|
|
"embed"
|
|
"git.a-wan.net/alan/pipelines/internal/protocol"
|
|
"strings"
|
|
)
|
|
|
|
// Only checked-in Markdown examples are shipped. No runtime databases or user drafts.
|
|
//
|
|
//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.",
|
|
}
|
|
|
|
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")})
|
|
}
|
|
return result
|
|
}
|