Dashboard › cli › Distillation
1e26cab1-099c-4cf7-9649-4c16aeff05da["lore_tm_v1_KUR75ZzEuP3wwNU4Jf_yp5v3n5vkCxwzgtKYTOwE_NY","lore_tm_v1_T_eQlS04iw1hUPfy6h2ImeM738Wx3gwrRWqdVIT-uWU"]
--log-level is always stripped from a command function’s flags because it is owned by the CLI wrapper (“always stripped (it's ours)”); a command-defined --verbose remains available to the command, while --log-level takes priority for logging level.packages/cli/test/lib/command.test.ts is 1,920 lines; the displayed section covers buildCommand introspection, telemetry, global logging flags, JSON/fields injection, and return-based output integration.packages/cli/test/lib/command.test.ts verifies buildCommand() retains docs.customUsage[0] as __primaryUsage; the test uses customUsage: ["<name>:<kind>..."] and expects __primaryUsage === "<name>:<kind>...".packages/cli/test/lib/command.test.ts added a buildCommand() introspection test proving structured docs.examples are retained verbatim as __examples; the fixture is { description: "Select an organization explicitly", command: "sentry thing list my-org" }.packages/cli/test/lib/command.test.ts verifies prompt availability is based on parsed yes and dry-run flags rather than ambiguous aliases: init -y and init -n disable prompts, init --yes=false allows prompts, and unrelated data -n 10 / data -y 2 aliases allow prompts.packages/cli/test/lib/command.test.ts verifies buildCommand() telemetry records meaningful flags as Sentry tags, skips default false booleans, and records positional arguments through Sentry.setContext("args", { values, count }); it also confirms string default "10" is parsed by numberParser into numeric 10.packages/cli/test/lib/command.test.ts verify LOG_LEVEL_FLAG is a hidden optional enum containing every LOG_LEVEL_NAMES value, VERBOSE_FLAG is hidden and defaults to false, applyLoggingFlags("debug", false) and applyLoggingFlags(undefined, true) set logger level 4, and explicit "error" overrides verbose and sets level 0.buildCommand() tests verify injected global --verbose and --log-level are accepted but omitted from the command function’s flags; --verbose sets debug level 4, --log-level trace sets level 5, and --log-level=error sets level 0.--verbose (for example, “Show HTTP details”), buildCommand() preserves that flag in the command function and also applies its debug-logging side effect; an explicit --log-level trace still wins and sets logger level 5.output: { human: ... } receive injected --json and --fields; --fields "id,title,status" is pre-parsed to ["id", "title", "status"], whitespace is trimmed, duplicates are removed, dot notation such as metadata.value and contexts.trace.traceId is preserved, and omitted --fields remains undefined.--json/--fields; passing --json causes Stricli to emit "No flag registered for --json" and prevents the command function from running. A command-owned --json is preserved while --fields is still injected.<placeholder>, optional tuple parameters render as [<placeholder>], and absent placeholders use indexed defaults such as arg0.<command...> and arrays without a placeholder use <args...>.packages/cli/test/lib/introspect.property.test.ts expanded the getPositionalString() tuple property generator to include an optional: boolean() field and now checks each generated parameter exactly: optional parameters must appear as [<${placeholder}>], required parameters as <${placeholder}>, with fallback placeholder arg${index}.packages/cli/test/lib/introspect.test.ts added a concrete optional-tuple test: parameters { placeholder: "required" } and { placeholder: "optional", optional: true } must produce "<required> [<optional>]".""; tuple placeholders org and project produce "<org> <project>"; unnamed tuple entries produce "<arg0> <arg1>"; array placeholder command produces "<command...>"; and an unnamed array produces "<args...>".packages/cli/test/lib/introspect.test.ts added a test proving buildCommandInfo() prefers structured __examples over legacy document examples. Structured examples are converted, in order, to "# Use automatic organization detection\nsentry thing list" and "# Select an organization explicitly\nsentry thing list my-org", replacing the supplied stale legacy example "sentry thing list stale-org".packages/cli/test/script/generate-skill-markdown.test.ts now imports formatCommandExamples, listCommand, viewCommand, and buildCommandInfo and adds an integration test establishing that agent-conversation documentation comes from command metadata.listCommand.__primaryUsage to be undefined, inferred list positional syntax to be "[<org>]", and list examples to contain "# Explicit organization\nsentry agent-conversation list my-org".viewCommand positional syntax to be "[<org>/]<conversation-id>" and its examples, in exact order, to be: 1. # View full transcript (organization auto-detected)\nsentry agent-conversation view conv-123; 2. # Explicit organization\nsentry agent-conversation view my-org/conv-123; 3. # JSON output\nsentry agent-conversation view my-org/conv-123 --json.formatCommandExamples(view.examples) is tested to emit **Examples:**, then a blank line, one bash fenced block, and the three comment-plus-command examples separated by blank lines before the closing fence.