fa0d0473cc
Keep the shipped template names as direct as their keys: Task, Plan and implement, Review, Research and Debug.
32 lines
1.2 KiB
Go
32 lines
1.2 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 starters = []protocol.Template{
|
|
{Key: "task", Name: "Task", Description: "Complete a task in your repository, then commit the change locally."},
|
|
{Key: "three-stage", Name: "Plan and implement", Description: "Plan a change, implement it, review and verify it, then commit it locally. Any language or file type."},
|
|
{Key: "review", Name: "Review", Description: "One read-only stage to review repository content and report findings."},
|
|
{Key: "research", Name: "Research", Description: "Research a question from primary sources, then write a sourced report. Requires web search support."},
|
|
{Key: "debug", Name: "Debug", Description: "Reproduce a failure, find its cause, fix it, verify the fix, then commit locally."},
|
|
}
|
|
|
|
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)
|
|
item.Scheduled = strings.Contains(item.Source, "```schedule")
|
|
result = append(result, item)
|
|
}
|
|
return result
|
|
}
|