From 5a7fea56e223c9db7eb2cdb4c0507f650011b131 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Tue, 22 Sep 2026 22:58:52 +1000 Subject: [PATCH] Document the interactive seam in AGENTS.md --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index b6fbe32..1b2bfcb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -44,7 +44,9 @@ dist/ # build output: binaries, RPM, checksums (not comm - **`run(args, stdout, stderr) int`** is the testable entry point; `main()` only wires it to the real streams and `os.Exit`. Cobra runs with `SilenceUsage` and - `SilenceErrors` so nothing reaches stderr unless the run failed. + `SilenceErrors` so nothing reaches stderr unless the run failed. `run` derives + interactivity from `isTerminal(stdout)` and hands it to `runWith`, which tests + call directly to pin either side. - **Flat CLI**: the root command takes `common_name` positionally (`cobra.MaximumNArgs(1)`); no args prints help only when stdout is a terminal and otherwise fails, args-less flags fail. `ca`, `completion` and `help` are