32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package examples
|
|
|
|
import (
|
|
"embed"
|
|
"git.a-wan.net/alan/pipelines/internal/protocol"
|
|
)
|
|
|
|
// Only checked-in Markdown examples are shipped. No runtime databases or user drafts.
|
|
//
|
|
//go:embed *.md
|
|
var sources embed.FS
|
|
|
|
// The examples are a graded set, read in order: each one adds a feature to the
|
|
// previous. They are offered by the template picker and seeded once into a brand
|
|
// new database (see pipeline.Store.SeedExamples).
|
|
var starters = []protocol.Template{
|
|
{Key: "research", Name: "Research and report", Description: "Research a task from authoritative sources, then produce its requested evidence-backed deliverable."},
|
|
{Key: "task", Name: "Implement, review and land", Description: "Implement a repository task, review the diff, inspect rendered changes, and commit a delivery candidate."},
|
|
}
|
|
|
|
func Catalog() []protocol.Template {
|
|
result := make([]protocol.Template, 0, len(starters))
|
|
for _, item := range starters {
|
|
data, _ := sources.ReadFile(item.Key + ".md")
|
|
item.Source = string(data)
|
|
// Schedules are saved run configurations, never starter definitions.
|
|
item.Scheduled = false
|
|
result = append(result, item)
|
|
}
|
|
return result
|
|
}
|