Dashboard › cli › Distillation
6ae6285d-a121-4710-9d68-3450797135d6["lore_tm_v1_nrDCgVfiW2RaqkHQZA1gpgKhsLRfIrlBPKo07Q6Lngk","lore_tm_v1_9kwI8NDE1J1JLDNVixa-5L1qQNp_l3bxZxLyTH_TX6g","lore_tm_v1_PHZVYsXOIqXkyOUWG8ILx3xzOcdf113RNpnH4NhBhiA","lore_tm_v1_J9smTK7RBbfGIJY9Ngubmq0rSd-mwuTuh4NdBIH87tM"]
Date: Sep 8, 2026
await promises in async functions - don't forget to use the return valueβ; use async/await rather than promise chains, handle async errors appropriately, and never use async functions as Promise executors.package.json for the latest scripts before running project commands.pnpm add -D <package> using the -D flag and placed in devDependencies, never dependencies.fast-check with { numRuns: DEFAULT_NUM_RUNS }, where DEFAULT_NUM_RUNS is 50.packages/cli/package.json: package sentry, version 0.45.0-dev.0, Node engine >=20.0, development runtime Node >=22.15, package manager pnpm@10.11.0, and CLI binary sentry at ./dist/bin.cjs.fix/agent-conversation-reference-root-cause; upstream origin/pr-1558 is gone. HEAD is commit bbaa7b3b722b87f1bccfe84063269cbbcabe2741 (bbaa7b3b7), message fix(docs): correct agent conversation argument syntax.apps/cli-docs/src/fragments/commands/agent-conversation.md, packages/cli/script/check-fragments.ts, packages/cli/script/generate-command-docs.ts, packages/cli/script/generate-skill-markdown.ts, packages/cli/script/generate-skill.ts, packages/cli/src/commands/agent-conversation/list.ts, packages/cli/src/commands/agent-conversation/view.ts, packages/cli/src/lib/command.ts, packages/cli/src/lib/introspect.ts, packages/cli/src/lib/list-command.ts, packages/cli/test/commands/agent-conversation/list.test.ts, packages/cli/test/lib/command.test.ts, packages/cli/test/lib/introspect.test.ts, and packages/cli/test/script/generate-skill-markdown.test.ts..cursor/rules/ultracite.mdc; commands are npx ultracite fix, npx ultracite check, and npx ultracite doctor. Production code must remove console.log, debugger, and alert; use descriptive Error objects, meaningful try-catch, and early returns.unknown over any, as const for immutable literals, type narrowing over assertions, meaningful constants over magic numbers, arrow callbacks, for...of, optional chaining ?., nullish coalescing ??, template literals, destructuring, and const by default; use let only for reassignment and never var.it()/test(); async tests use async/await instead of done callbacks; committed tests must not contain .only or .skip; suites should avoid excessive nested describe blocks.node:* standard-library APIs and do not reintroduce Bun.*, bun:test, or bun CLI commands. File I/O uses await readFile()/await writeFile() from node:fs/promises; process execution uses spawn()/execFile() from node:child_process; prefer execFileSync(command, args) over string-based execSync() for user-controlled values.@sentry/api supplies API response types, import them directly rather than creating redundant Valibot schemas in src/types/sentry.ts.buildCommand from src/lib/command.ts via the appropriate relative .js path, never directly from @stricli/core; the wrapper adds telemetry, --json/--fields, and rendering. Commands use async *func(), yield new CommandOutput(data), and may return { hint }; do not add a custom json flag, branch on flags.json, or call stdout.write().src/lib/formatters/<domain>.ts; files exceeding about 400 lines should extract formatter helpers. stderr.write() is prohibited in command files; use logger and CommandOutput.buildRouteMap from src/lib/route-map.ts, never directly from @stricli/core. Standard aliases are auto-injected: list β ls, view β show, delete β remove/rm, and create β new; do not manually duplicate these aliases.[<org>/<project>/]<id> parsing uses parseSlashSeparatedArg and parseOrgProjectArg from src/lib/arg-parsing.ts. Required trace/span identifiers are positional rather than flags.value.split(","), or flags.x.flatMap((v) => v.split(",")) for repeatable array flags. Every project create target is a name:platform pair, and project names cannot contain whitespace.mdKvTable(), colorTag(), escapeMarkdownCell(), and renderMarkdown(). Do not embed raw muted()/chalk in output strings. isPlainOutput() precedence is SENTRY_PLAIN_OUTPUT > NO_COLOR > FORCE_COLOR for TTY > !isTTY.buildDeleteCommand() from src/lib/mutate-command.ts; it injects --yes/-y, --force/-f, and --dry-run/-n, and rejects non-interactive destructive execution unless --yes or --force is supplied, while dry-run bypasses the guard. Related helpers are isConfirmationBypassed(), guardNonInteractive(), confirmByTyping(), requireExplicitTarget(), DESTRUCTIVE_FLAGS, and DESTRUCTIVE_ALIASES.DRY_RUN_FLAG and DRY_RUN_ALIASES from src/lib/mutate-command.ts for consistent dry-run support.buildPaginationContextKey(), resolveCursor(), advancePaginationState(), and hasPreviousPage() from src/lib/db/pagination.ts, plus paginationHint() from src/lib/list-command.ts. Supported cursor directions are next, prev, and first; last silently aliases next. JSON envelopes include both nextCursor and hasPrev.buildOrgListCommand for simple organization-scoped lists such as team/repo; 2. dispatchOrgScopedList with overrides for complex project/issue modes; 3. direct buildListCommand/manual pagination for trace/span/dashboard lists.API_MAX_PER_PAGE (100), list commands must auto-paginate, set perPage = Math.min(flags.limit, API_MAX_PER_PAGE), and loop until the limit is filled or pages are exhausted, bounded by MAX_PAGINATION_PAGES; never send an oversized per_page.validateHexId(value, label) for 32-character trace/log IDs, validateSpanId(value) for 16-character span IDs, and validateTraceId(value) as a wrapper. Validators strip UUID dashes where applicable, normalize to lowercase, and throw ValidationError for malformed input."date", not "time"; sort types are exported from the API layer, such as SpanSortValue from api/traces.ts.pnpm run generate:docs runs generate:banner, generate:parser, generate:command-docs, generate:skill, and generate:docs-sections. Generated command docs are gitignored; generated skill files under plugins/sentry-cli/skills/sentry-cli/ are committed. Positional placeholders must be descriptive, such as "org/project/trace-id" rather than "args".src/types/*.ts, types use InferOutput, and validation uses safeParse(). Type-only imports use import type, local ESM imports include .js, and imports are grouped external-first then local.ContextError means a required value was omitted, ResolutionError means a provided value was not found, and ValidationError means malformed input. ContextError.command must be a single-line CLI usage example and its constructor rejects newline-containing commands; use alternatives: [] when defaults are irrelevant.fuzzyMatch() from src/lib/fuzzy.ts and show at most 5 similar candidates instead of listing every entity.catch blocks must rethrow, log through log.debug()/log.warn(), or log before returning a fallback. The no-silent-catch Biome plugin at lint-rules/no-silent-catch.grit rejects empty, comment-only, and return-only catches; fixed grandfathered catches must remove their biome-ignore suppression because unused suppressions fail lint.looksLikeIssueShortId(), SPAN_ID_RE, HEX_ID_RE, or non-hex checks; resolve to the expected type; warn through log.warn(); and return a hint toward the correct command. Ambiguous/impossible recovery retains the error with entity-aware suggestions.src/lib/*.ts utility, extend an existing module if it covers at least 80% of the need. Every new src/lib/**/*.ts file requires module-level JSDoc.useTestConfigDir() from test/helpers.ts. Tests must not delete process.env.SENTRY_CONFIG_DIR, capture it at module scope, or manually set/delete it in beforeEach/afterEach; the helper restores the prior environment value and cleans up isolated state.resolveCursor() inside the "org-all" override, use "Project" for handleProjectSearch ContextError resources, and always set orgSlugMatchBehavior to "redirect" or "error" explicitly.queryEvents uses project:<slug> in the query via buildProjectQuery(); replay index listReplays uses projectSlugs; issue index listIssuesPaginated uses either a project parameter or query depending on mode. New explore datasets centralize behavior in resolveDatasetConfig.gh pr list --state open --search "in:title <file-or-symbol>" and gh issue list --state all --search "<symbol>"; 2. comment on or extend existing work rather than duplicate it; 3. rebase onto current main and verify the bug still exists; 4. separate correctness fixes from subjective UX changes; 5. reuse shared helpers such as autoPaginate() and safeParseJson() rather than hand-rolling fixes.pnpm run lint β biome check --no-errors-on-unmatched --error-on-warnings --max-diagnostics=none ./, pnpm run lint:fix β Biome write mode, pnpm run test:unit β generated docs/SDK plus Vitest coverage over test/lib test/commands test/types test/script, pnpm run test:e2e β Vitest over test/e2e, pnpm run check:fragments, pnpm run check:deps, pnpm run check:errors, pnpm run check:patches, pnpm run check:docs-sections, pnpm run check:env-coverage, and pnpm run check:stale-refs.