Dashboard › cli › Distillation
fb6cb36a-b4c1-4c73-9c11-a392c1cdecda["lore_tm_v1_Gv075cyRRB1VSheEl9oahRoB-nlVyedOfCUccvHsGhQ"]
packages/cli/script/generate-skill-markdown.ts defines COMMAND_HEADING_RE as /^sentry\s+([^<[\s]+(?:\s+[^<[\s]+))(?:\s(?:<|[)[^]*)?$/` to match generated command headings while excluding positional usage.extractCommandPathFromHeading(heading: string): string | undefined in packages/cli/script/generate-skill-markdown.ts extracts the literal command path from a generated heading and returns it prefixed with sentry , or undefined when unmatched.matchExampleToCommand(code, commandPaths, groupFallback, defaultCommandPath?) sorts command paths by descending length before testing code.includes(path), ensuring a longer path such as sentry auth login wins over sentry auth.matchExampleToCommand() returns the matched command path first; if code lacks groupFallback, it returns undefined; otherwise a bare group example such as sentry auth maps to defaultCommandPath ?? groupFallback, allowing it to attach to a default subcommand such as login.formatCommandExamples(examples: readonly string[]): string returns "" for no examples; otherwise it creates a **Examples:** Markdown section with one fenced bash block and joins examples using a blank line ("\n\n").