Dashboard › cli › Distillation
50ac3743-9eaa-4c4e-b38d-f0eddcdf64b7["lore_tm_v1_VKtkOx__1i9USFm6OuR9cRChctIaa2KwOvBIc8933wI","lore_tm_v1_h0xt3Qloep1rdRdEEeCgTryO-hgW-Nw0_n48P4c5HWw","lore_tm_v1_SxwXEmRokBadH3eT6Rs4WCKgvv795FP4Zl2K_zB30gk","lore_tm_v1_APiOUEZIMlRD_gtENfCMeBhuzXnKhQgm0onzMO6Wv1Q","lore_tm_v1_W_FEMJw45mAIcQSQ2Mf7i1_c8ZeivdSq1-kBtOvsSHs"]
packages/cli/script/check-fragments.ts: while checking multi-command routes, commands with cmd.examples.length > 0 now continue, so a command-owned example satisfies the examples requirement without a hand-written fragment.packages/cli/script/generate-command-docs.ts documentation architecture: generated pages combine “Auto-generated reference and examples from CLI metadata or env registry” with “Hand-written guides and tips from docs/src/fragments/”; fragments remain the committed source of truth only for content that cannot live in command definitions.formatPositionalsTable() in packages/cli/script/generate-command-docs.ts so optional positional arguments render as `[<placeholder>]` and required arguments as `<placeholder>`.formatCommandExamples into packages/cli/script/generate-command-docs.ts; generateCommandSection(cmd) now appends the formatted cmd.examples section when non-empty.formatCommandExamples(examples: readonly string[]) to packages/cli/script/generate-skill-markdown.ts. It returns "" for zero examples; otherwise it renders **Examples:**, a fenced bash block, and examples separated by blank lines via examples.join("\n\n").generateFullCommandDoc(cmd) in packages/cli/script/generate-skill.ts to use the shared formatCommandExamples(cmd.examples) helper instead of assembling the Markdown example section inline.packages/cli/src/commands/agent-conversation/list.ts: adds a shared POSITIONAL tuple containing optional org with placeholder "org", brief "Organization slug", and parse: String; USAGE_HINT is generated as sentry agent-conversation list ${getPositionalString(POSITIONAL)}, yielding sentry agent-conversation list [<org>].agent-conversation list docs: removes customUsage: ["[<org>]"]; fullDescription now says the organization is auto-detected when omitted; structured examples are, in order: 1. sentry agent-conversation list (“List recent agent conversations”), 2. sentry agent-conversation list my-org (“Explicit organization”), 3. sentry agent-conversation list --limit 50 --period 24h (“Show more, last 24 hours”), 4. sentry agent-conversation list -q "has:errors" (“Filter conversations”), 5. sentry agent-conversation list my-org -c next (“Paginate through results”).ContextError in agent-conversation/list.ts from hard-coded sentry agent-conversation list <org> to canonical USAGE_HINT, preserving the optional organization as [<org>].packages/cli/src/commands/agent-conversation/view.ts: canonical suffix is stored as USAGE = "[<org>/]<conversation-id>"; USAGE_HINT is derived from it; docs.customUsage is [USAGE].agent-conversation view examples into structured command metadata, in order: 1. sentry agent-conversation view conv-123 (“View full transcript (organization auto-detected)”), 2. sentry agent-conversation view my-org/conv-123 (“Explicit organization”), 3. sentry agent-conversation view my-org/conv-123 --json (“JSON output”).CommandExample in packages/cli/src/lib/command.ts, with readonly description: string and readonly command: string; exported CommandDocumentation extends native Stricli docs with optional readonly examples?: readonly CommandExample[].prepareNativeDocs() in packages/cli/src/lib/command.ts: it strips extended examples metadata before passing docs to Stricli and appends native-help examples as ${command} # ${description} under an Examples: heading. With no examples it returns native docs unchanged.attachDocumentationMetadata() in packages/cli/src/lib/command.ts: it preserves the first customUsage entry as __primaryUsage and non-empty structured examples as __examples on the built command.buildCommand() ordering prepares command-owned examples before enrichDocsWithSchema(), ensuring JSON fields retain their established position at the end of native help; the built command receives docs: stricliDocs, then attachDocumentationMetadata(cmd, builderArgs.docs) is called.packages/cli/src/lib/introspect.ts: Command gains __examples?: readonly CommandExample[]; getPositionalString() wraps optional tuple positionals as [<placeholder>]; array positionals remain <placeholder...>.buildCommandInfo() in packages/cli/src/lib/introspect.ts: non-empty cmd.__examples take precedence over legacy externally supplied examples and are transformed to # ${description}\n${command}; legacy examples remain the fallback.buildListCommand() and OrgListCommandDocs in packages/cli/src/lib/list-command.ts, plus buildDeleteCommand() in packages/cli/src/lib/mutate-command.ts, now use CommandDocumentation, allowing structured examples and native Stricli documentation fields.packages/cli/test/commands/agent-conversation/list.test.ts verifies failed org resolution reports command: "sentry agent-conversation list [<org>]".packages/cli/test/lib/command.test.ts verifies buildCommand() retains structured examples verbatim in __examples, using sentry thing list my-org with description "Select an organization explicitly".packages/cli/test/lib/introspect.property.test.ts now generates tuple parameters with optional: boolean() and verifies each positional renders as either [<placeholder>] or <placeholder> according to that property.packages/cli/test/lib/introspect.test.ts verify: 1. required plus optional tuple parameters render as <required> [<optional>]; 2. structured __examples override stale legacy examples and become comment-prefixed command blocks.packages/cli/test/script/generate-skill-markdown.test.ts replaces generated-file assertions with command-metadata assertions: agent-conversation list has no __primaryUsage, introspects to [<org>], and contains the explicit-org example; agent-conversation view introspects to [<org>/]<conversation-id> and exposes exactly 3 ordered structured examples.formatCommandExamples() test expects the 3 agent-conversation view examples in one bash fence, each description rendered as a # comment immediately above its command, with blank lines between examples./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/introspect.ts confirm PositionalParam.optional?: boolean, PositionalInfo.optional: boolean, Command.__examples?: readonly CommandExample[], and tuple rendering logic return p.optional ? \[${placeholder}]` : placeholder`.extractPositionals() behavior in packages/cli/src/lib/introspect.ts: tuple entries preserve placeholder, brief, and optional ?? false; array positional metadata appends ... to its placeholder and always reports optional: true.rebase, new, or squash records the conflict in the resulting commit for later resolution..jj/ exists, mutations must use jj, not git; in colocated .jj/ and .git/ repositories, Git is suitable only for read-only operations or unsupported tasks.-i, --interactive, and jj resolve; require -m "msg" when describing or committing; and require verification with jj st and jj log after squash, abandon, rebase, restore, or commit.main@origin as --destination, and identifies jj undo, jj op log, and jj op restore <op-id> as recovery mechanisms.%%%%%%% diff from:, +++++++, and >>>>>>>; jj st automatically shows when the conflict is cleared.jj commit, move one with jj bookmark set <name> -r @-, while jj bookmark create <name> -r @ before working can track the change ID through rewrites.@ is an empty working-copy commit after jj commit, the completed content is in @-, jj new creates a new empty change rather than committing like Git, :: is a DAG range while .. is set difference, and stale working copies should be repaired with jj workspace update-stale.No files found; the queried path or pattern was unavailable.No files found; the queried path or pattern was unavailable.