From 4fb9bf9a5a1a4ab93f696df33dbd438f3bade7bc Mon Sep 17 00:00:00 2001 From: Bjoern Kalkbrenner Date: Tue, 1 Dec 2026 10:20:25 +0100 Subject: [PATCH] solutions: the guide is its own program, not part of yet Default program name in messages is yetano-solutions; comments no longer describe mounting the commands into yet (owner decision 2026-12-01, docs/knowledge-solutions ADR-0006 in the meta-repo). Co-Authored-By: Claude Opus 5.5 --- solutions/cli/cli.go | 15 +++++---------- solutions/cli/cli_test.go | 4 ++-- solutions/cmd/yetano-solutions/main.go | 7 ++++--- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/solutions/cli/cli.go b/solutions/cli/cli.go index 923b735..93d15e5 100644 --- a/solutions/cli/cli.go +++ b/solutions/cli/cli.go @@ -1,12 +1,7 @@ // Package cli implements the guide's commands -- solution, task, // knowledge and open -- with yet's conventions (stdlib flag, --json on -// every command, data on stdout, messages on stderr, stable exit codes), -// so yet mounts them with one case in its dispatcher: -// -// case "solution", "task", "knowledge", "open": -// return cli.Run(ctx, args, env) -// -// The same package backs the standalone yetano-solutions binary. +// every command, data on stdout, messages on stderr, stable exit codes). +// The guide's own program calls Run from main; yet does not embed it. package cli import ( @@ -45,7 +40,7 @@ type Env struct { // Interactive: stdin and stdout are a terminal. Without it no command // ever waits for input (CLI-03). Interactive bool - // Program is the command name in messages ("yet" or "yetano-solutions"). + // Program is the command name in messages. Program string // Catalogs are default catalog directories (an installed knowledge // bundle); --catalog and $YETANO_SOLUTIONS_CATALOG come first. @@ -86,7 +81,7 @@ func Run(ctx context.Context, args []string, env Env) int { env.Getenv = os.Getenv } if env.Program == "" { - env.Program = "yet" + env.Program = "yetano-solutions" } if env.Stdin == nil { env.Stdin = os.Stdin @@ -160,7 +155,7 @@ func (a *app) dispatch(args []string) error { return a.usage(cmd) } -// Usage is the help text (also for yet's usage()). +// Usage is the help text. const Usage = `Solutions Guide -- describe what you want to achieve, get native configuration: solution list|search|show|setup|generate|validate|plan|doctor diff --git a/solutions/cli/cli_test.go b/solutions/cli/cli_test.go index 6b28ed0..9304fbf 100644 --- a/solutions/cli/cli_test.go +++ b/solutions/cli/cli_test.go @@ -20,7 +20,7 @@ func run(t *testing.T, store string, args ...string) result { var out, errb bytes.Buffer code := Run(context.Background(), args, Env{ Stdin: strings.NewReader(""), Stdout: &out, Stderr: &errb, - Program: "yet", StoreDir: store, Catalogs: []string{"../engine/testdata/cat"}, + Program: "yetano-solutions", StoreDir: store, Catalogs: []string{"../engine/testdata/cat"}, Getenv: func(string) string { return "" }, }) return result{code, out.String(), errb.String()} @@ -132,7 +132,7 @@ func TestInteractiveWizard(t *testing.T) { // size: Enter (default small), hosts: a.example.org, then actions: 6 export, 8 quit in := strings.NewReader("\na.example.org\n6\n8\n") code := Run(context.Background(), []string{"solution", "setup", "app-run", "--output", out}, Env{ - Stdin: in, Stdout: &o, Stderr: &e, Interactive: true, Program: "yet", StoreDir: store, + Stdin: in, Stdout: &o, Stderr: &e, Interactive: true, Program: "yetano-solutions", StoreDir: store, Catalogs: []string{"../engine/testdata/cat"}, Getenv: func(string) string { return "" }, }) if code != 0 { diff --git a/solutions/cmd/yetano-solutions/main.go b/solutions/cmd/yetano-solutions/main.go index 14bd709..4b91bb6 100644 --- a/solutions/cmd/yetano-solutions/main.go +++ b/solutions/cmd/yetano-solutions/main.go @@ -1,6 +1,7 @@ -// Command yetano-solutions runs the Solutions Guide commands on their own -// (CI of the catalog, development). In a normal installation the same -// commands are part of yet: yet solution, yet task, yet knowledge, yet open. +// Command yetano-solutions runs the Solutions Guide commands (CI of the +// catalog, development). The guide is deliberately not part of yet, which +// stays a general tool; the full program with TUI and GUI moves to its +// own repository (docs/knowledge-solutions ADR-0006). // // yetano-solutions solution list --catalog assets/solutions package main