fix(ax): tighten remaining source examples

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-03-31 06:20:14 +00:00
parent e8249c590e
commit 7c8542d730
7 changed files with 18 additions and 18 deletions

View file

@ -15,7 +15,7 @@ type applicationCommandSet struct {
}
// args := startupArgs()
// _ = c.Cli().Run(args...)
// _ = c.Cli().Run("version")
func startupArgs() []string {
previous := flag.CommandLine
commandLine := flag.NewFlagSet("core-agent", flag.ContinueOnError)

View file

@ -49,5 +49,5 @@ func ExampleRegister_task() {
// Completion pipeline registered as a Task
t := c.Task("agent.completion")
core.Println(t.Description)
// Output: QA → PR → Verify → Merge
// Output: QA → PR → Verify → Ingest → Poke
}

View file

@ -10,7 +10,7 @@ import (
"github.com/modelcontextprotocol/go-sdk/mcp"
)
// plan := &Plan{ID: "id-1-a3f2b1", Title: "Migrate Core", Status: "draft", Objective: "..."}
// plan := &Plan{ID: "id-1-a3f2b1", Title: "Migrate Core", Status: "draft", Objective: "Replace raw process calls with Core.Process()"}
// r := writePlanResult(PlansRoot(), plan)
type Plan struct {
ID string `json:"id"`

View file

@ -74,7 +74,7 @@ func NewPrep() *PrepSubsystem {
}
// c.Action("agentic.dispatch").Run(ctx, options)
// c.Actions() // ["agentic.dispatch", "agentic.prep", "agentic.status", ...]
// c.Actions() // ["agentic.dispatch", "agentic.prep", "agentic.status", "agentic.verify"]
func (s *PrepSubsystem) OnStartup(ctx context.Context) core.Result {
c := s.Core()
@ -142,7 +142,7 @@ func (s *PrepSubsystem) OnStartup(ctx context.Context) core.Result {
c.Action("agentic.persona", s.handlePersona).Description = "Read a persona by path"
c.Task("agent.completion", core.Task{
Description: "QA → PR → Verify → Merge",
Description: "QA → PR → Verify → Ingest → Poke",
Steps: []core.Step{
{Action: "agentic.qa"},
{Action: "agentic.auto-pr"},
@ -152,7 +152,7 @@ func (s *PrepSubsystem) OnStartup(ctx context.Context) core.Result {
},
})
c.Action("agentic.complete", s.handleComplete).Description = "Run completion pipeline (QA → PR → Verify) in background"
c.Action("agentic.complete", s.handleComplete).Description = "Run completion pipeline (QA → PR → Verify → Ingest → Poke) in background"
s.hydrateWorkspaces()
@ -175,7 +175,7 @@ func (s *PrepSubsystem) OnShutdown(ctx context.Context) core.Result {
}
// s.hydrateWorkspaces()
// s.workspaces.Names() // ["core/go-io/task-5", "ws-blocked", ...]
// s.workspaces.Names() // ["core/go-io/task-5", "ws-blocked", "ws-ready-for-review"]
func (s *PrepSubsystem) hydrateWorkspaces() {
if s.workspaces == nil {
s.workspaces = core.NewRegistry[*WorkspaceStatus]()
@ -200,7 +200,7 @@ func (s *PrepSubsystem) TrackWorkspace(name string, st *WorkspaceStatus) {
// s.Workspaces().Names() // all workspace names
// s.Workspaces().List("core/*") // org-scoped workspaces
// s.Workspaces().Each(func(name string, st *WorkspaceStatus) { ... })
// s.Workspaces().Each(func(name string, workspaceStatus *WorkspaceStatus) { core.Println(name, workspaceStatus.Status) })
func (s *PrepSubsystem) Workspaces() *core.Registry[*WorkspaceStatus] {
return s.workspaces
}

View file

@ -287,16 +287,16 @@ func WorkspaceFile(templateName, filename string) core.Result {
return embed.ReadString(filename)
}
// prompts := lib.ListPrompts() // ["coding", "review", ...]
// prompts := lib.ListPrompts() // ["coding", "conventions", "security"]
func ListPrompts() []string { return listNames("prompt") }
// flows := lib.ListFlows() // ["go", "php", "node", ...]
// flows := lib.ListFlows() // ["go", "php", "release"]
func ListFlows() []string { return listNames("flow") }
// templates := lib.ListWorkspaces() // ["default", "security", ...]
// templates := lib.ListWorkspaces() // ["default", "review", "security"]
func ListWorkspaces() []string { return listNames("workspace") }
// tasks := lib.ListTasks() // ["bug-fix", "code/review", "code/refactor", ...]
// tasks := lib.ListTasks() // ["bug-fix", "code/review", "code/refactor"]
func ListTasks() []string {
if result := ensureMounted(); !result.OK {
return nil
@ -308,7 +308,7 @@ func ListTasks() []string {
return names.AsSlice()
}
// personas := lib.ListPersonas() // ["code/go", "secops/developer", ...]
// personas := lib.ListPersonas() // ["code/backend-architect", "secops/security-developer", "testing/model-qa"]
func ListPersonas() []string {
if result := ensureMounted(); !result.OK {
return nil
@ -320,7 +320,7 @@ func ListPersonas() []string {
}
// names := listNamesRecursive("task", ".")
// core.Println(names) // ["code/review", "code/refactor", ...]
// core.Println(names) // ["bug-fix", "code/review", "code/refactor"]
func listNamesRecursive(mount, dir string) []string {
if result := ensureMounted(); !result.OK {
return nil

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: EUPL-1.2
// c.ACTION(messages.AgentCompleted{Agent: "codex", Repo: "go-io", Status: "completed"})
// c.ACTION(messages.AgentCompleted{Agent: "codex", Repo: "go-io", Workspace: "core/go-io/task-5", Status: "completed"})
package messages
// c.ACTION(messages.AgentStarted{Agent: "codex", Repo: "go-io", Workspace: "core/go-io/task-5"})
@ -26,7 +26,7 @@ type QAResult struct {
Output string
}
// c.ACTION(messages.PRCreated{Repo: "go-io", Branch: "agent/fix-tests", PRURL: "https://...", PRNum: 12})
// c.ACTION(messages.PRCreated{Repo: "go-io", Branch: "agent/fix-tests", PRURL: "https://forge.lthn.ai/core/go-io/pulls/12", PRNum: 12})
type PRCreated struct {
Repo string
Branch string
@ -34,7 +34,7 @@ type PRCreated struct {
PRNum int
}
// c.ACTION(messages.PRMerged{Repo: "go-io", PRURL: "https://...", PRNum: 12})
// c.ACTION(messages.PRMerged{Repo: "go-io", PRURL: "https://forge.lthn.ai/core/go-io/pulls/12", PRNum: 12})
type PRMerged struct {
Repo string
PRURL string

View file

@ -228,7 +228,7 @@ func (s *Service) TrackWorkspace(name string, status any) {
s.workspaces.Delete(core.Concat("pending/", workspaceStatus.Repo))
}
// s.Workspaces().Each(func(name string, workspaceStatus *WorkspaceStatus) { ... })
// s.Workspaces().Each(func(name string, workspaceStatus *WorkspaceStatus) { core.Println(name, workspaceStatus.Status) })
func (s *Service) Workspaces() *core.Registry[*WorkspaceStatus] {
return s.workspaces
}