Dashboard › cli › Distillation
b024aab0-3ff2-4b17-b86d-dc0f5339a0a8["lore_tm_v1_SmCjZLA3zPceFTFdUVi7SUoQdFf7QtXWul54mMBE3Yw","lore_tm_v1_uj6Z4lhWAEnTJqwCrV9RFWTXWDZ_XTfB8CQcTp0zXWY"]
packages/cli/src/lib/command.ts: exported CommandExample has readonly description and command; exported CommandDocumentation extends Stricli docs with optional readonly examples?: readonly CommandExample[].prepareNativeDocs() in packages/cli/src/lib/command.ts strips extended examples before passing docs to Stricli and appends native-help examples as ${command} # ${description} under Examples:. It runs before enrichDocsWithSchema() so JSON field documentation remains at the end of native help.attachDocumentationMetadata() in packages/cli/src/lib/command.ts preserves the first customUsage entry as __primaryUsage and structured examples as __examples; buildCommand() calls it with the original builderArgs.docs after building the Stricli command.packages/cli/src/lib/introspect.ts imports CommandExample, adds Command.__examples?: readonly CommandExample[], and changes buildCommandInfo() to prefer structured command examples over legacy document examples, converting each to # ${description}\n${command}.getPositionalString() in packages/cli/src/lib/introspect.ts now renders optional tuple parameters as [<placeholder>] and required tuple parameters as <placeholder>; missing placeholders remain arg${i}.formatCommandExamples() from packages/cli/script/generate-skill-markdown.ts. The function returns an empty string for no examples; otherwise it emits **Examples:**, a fenced bash block, and examples separated by blank lines. Both generate-command-docs.ts and generate-skill.ts use it.packages/cli/script/generate-command-docs.ts now renders positional-table syntax according to p.optional, using `[<placeholder>]` for optional arguments and `<placeholder>` for required arguments, and appends command-metadata examples to each generated command section.packages/cli/script/generate-command-docs.ts documentation now defines generated pages as: 1. auto-generated reference and examples from CLI metadata or the environment registry; 2. hand-written guides and tips from docs/src/fragments/. Fragments are the source of truth only for content that cannot live in command definitions.packages/cli/script/check-fragments.ts now skips missing-fragment-example checks when cmd.examples.length > 0, allowing canonical examples to live in command metadata.packages/cli/src/lib/list-command.ts changes both buildListCommand docs and OrgListCommandDocs to use shared CommandDocumentation; packages/cli/src/lib/mutate-command.ts likewise changes buildDeleteCommand docs to CommandDocumentation.packages/cli/src/commands/agent-conversation/list.ts defines a reusable optional-org POSITIONAL tuple and derives USAGE_HINT with getPositionalString(POSITIONAL), producing sentry agent-conversation list [<org>]; the same POSITIONAL is used in command parameters and ContextError.agent-conversation list moved 5 canonical examples from prose/fragments into docs.examples, in order: 1. “List recent agent conversations” → sentry agent-conversation list; 2. “Explicit organization” → sentry agent-conversation list my-org; 3. “Show more, last 24 hours” → sentry agent-conversation list --limit 50 --period 24h; 4. “Filter conversations” → sentry agent-conversation list -q "has:errors"; 5. “Paginate through results” → sentry agent-conversation list my-org -c next.agent-conversation list removes customUsage: ["[<org>]"]; introspection now derives [<org>] directly from the optional positional schema. Its full description is reduced to “List recent agent conversations from a Sentry organization.” plus “The organization is auto-detected when omitted.”packages/cli/src/commands/agent-conversation/view.ts centralizes USAGE = "[<org>/]<conversation-id>", derives USAGE_HINT = "sentry agent-conversation view [<org>/]<conversation-id>", and retains customUsage: [USAGE].agent-conversation view moved 3 canonical examples into docs.examples, in order: 1. “View full transcript (organization auto-detected)” → sentry agent-conversation view conv-123; 2. “Explicit organization” → sentry agent-conversation view my-org/conv-123; 3. “JSON output” → sentry agent-conversation view my-org/conv-123 --json.apps/cli-docs/src/fragments/commands/agent-conversation.md had its entire 36-line examples section removed because agent-conversation examples now originate from command definitions.org view [<org>]; project list [<org/project>]; project view [<org/project>]; issue list [<org/project>]; alert issues list [<org/project>]; alert issues create [<target>]; alert metrics list [<target>]; cli completion [<shell>]; cli upgrade [<version>]; replay list [<org/project>]; release list [<org/project>]; release deploy <org/version> <environment> [<name>]; repo list [<org/project>]; team list [<org/project>]; explore [<target>]; feedback list [<org/project>]; monitor list [<org/project>]; trace list [<org/project>]; trial list [<org>]; trial start <name> [<org>]; and init [<target>] [<directory>].packages/cli/test/commands/agent-conversation/list.test.ts adds a resolution-error test asserting the canonical error command is exactly sentry agent-conversation list [<org>].packages/cli/test/lib/command.test.ts adds a test that buildCommand() retains structured examples on __examples, using “Select an organization explicitly” and sentry thing list my-org.packages/cli/test/lib/introspect.property.test.ts now generates tuple parameters with both placeholder and boolean optional, then verifies every positional appears as either [<placeholder>] or <placeholder> according to that flag.packages/cli/test/lib/introspect.test.ts adds coverage that a tuple with required required and optional optional renders exactly <required> [<optional>]; it also verifies structured __examples override legacy examples and become comment-plus-command strings.packages/cli/test/script/generate-skill-markdown.test.ts replaces generated-file assertions with direct command-metadata introspection: agent-conversation list has no __primaryUsage, derives positional [<org>], and includes its explicit-org example; agent-conversation view has positional [<org>/]<conversation-id> and exactly 3 ordered examples. The test also verifies formatCommandExamples() emits one fenced bash block with description comments and blank lines between examples.packages/cli/package.json identifies package sentry version 0.45.0-dev.0, requires Node >=20.0, declares development runtime Node >=22.15, and uses pnpm@10.11.0.packages/cli/package.json include @sentry/symbolic 13.7.0, @stricli/core 1.2.8, @stricli/auto-complete ^1.2.8, node-sqlite3-wasm 0.8.59, TypeScript ^5.9.3, Vitest ^4.1.9, and Biome 2.3.8.packages/cli/package.json scripts establish that typecheck runs pnpm run generate:docs && pnpm run generate:sdk && tsc --noEmit; test:unit runs documentation/SDK generation followed by vitest run test/lib test/commands test/types test/script --coverage; generate:docs runs generate:banner, generate:parser, generate:command-docs, generate:skill, and generate:docs-sections; and check:fragments runs pnpm tsx script/check-fragments.ts.