Dashboard › cli › Distillation
981597c6-3250-405e-9b48-caa57945fa3d["lore_tm_v1_EsDsnfPc4W1oyYxvs5ym73iikByhcDjYZp-PyG24tOg","lore_tm_v1_zcFDq3lJATYrCT0J4e9QBnzv-rp-maZbokZtXnUUsKU","lore_tm_v1_1tBoGyCXtOaOFzCApn9TOAlVyiJ_YEVv4cbZnjc89xA","lore_tm_v1_6x9Djvyd4hu1iJMW_10zpxjx9LO19zZXPlB1bWaSQTQ","lore_tm_v1_rhJbxkGwnfQAFGzqzIsq_dbrHO65RDyHFBfHSC0n_oY"]
worker is a deprecated alias of implement.explore uses OpenAI gpt-5-mini; implement uses Moonshot kimi-k2.7-code; ship uses xAI Grok grok-build-0.1.New operator chat / Operator guidance: turns skip triage and must be treated directly as the task..lore.md when present, and target repositories require reading their AGENTS.md / CONTRIBUTING.md first..agents/skills/, generated from canonical skills/ by scripts/sync-skills.mjs.repo-setup before situation skills.packages/cli in a pnpm workspace, uses Node.js, pnpm, and Stricli, while the docs site lives in apps/cli-docs..cursor/rules/ultracite.mdc before working on the codebase.package.json for the latest scripts; commands run from packages/cli or via pnpm --filter sentry run <script> from the repository root.devDependencies, never dependencies, because everything is bundled by esbuild and CI enforces this with pnpm run check:deps.pnpm add -D <package> using the -D flag.@sentry/api provides API-response types, they must be imported directly rather than duplicated as Valibot schemas in src/types/sentry.ts.node:* standard-library APIs and do not introduce Bun.*, bun:test, or bun CLI commands.execFileSync() with array arguments rather than execSync() strings when values are user-controlled, to avoid shell injection.buildCommand from src/lib/command.ts via paths such as ../../lib/command.js, never directly from @stricli/core; the wrapper adds telemetry, --json/--fields, and output rendering.async *func() generators, yield new CommandOutput(data), and may return { hint }; commands must not add a custom json flag, branch on flags.json, or use stdout.write().src/lib/formatters/<domain>.ts, and files exceeding approximately 400 lines should extract formatter helpers.stderr.write() is banned in command files; use logger for diagnostics and CommandOutput for data.buildRouteMap from src/lib/route-map.ts, never directly from @stricli/core; standard aliases are list β ls, view β show, delete β remove, rm, and create β new, and these must not be manually duplicated.parseSlashSeparatedArg from src/lib/arg-parsing.ts for [<org>/<project>/]<id> and required identifiers such as trace IDs and span IDs as positional arguments rather than flags.mdKvTable(), colorTag(), escapeMarkdownCell(), and renderMarkdown(); raw muted()/chalk must not be embedded in output strings.isPlainOutput() precedence is SENTRY_PLAIN_OUTPUT > NO_COLOR > FORCE_COLOR (TTY only) > !isTTY; implementation is in src/lib/formatters/plain-detect.ts.buildDeleteCommand(), which injects --yes, --force, and --dry-run with aliases -y, -f, and -n, and guards non-interactive execution unless bypassed.DRY_RUN_FLAG and DRY_RUN_ALIASES from src/lib/mutate-command.ts.-c next, -c prev, and -c first; "last" is a silent alias for "next".paginationHint() from src/lib/list-command.ts, not manually assembled navParts.buildOrgListCommand for simple org-scoped lists; 2. dispatchOrgScopedList with overrides for complex org-scoped lists; 3. buildListCommand with manual pagination for standalone lists.--limit > API_MAX_PER_PAGE to transparently fetch multiple pages; API_MAX_PER_PAGE is 100, perPage must be Math.min(flags.limit, API_MAX_PER_PAGE), and API requests must never pass a larger per_page.validateHexId(value, label) for 32-character hex IDs, validateSpanId(value) for 16-character span IDs, and validateTraceId(value) as the trace wrapper; validators strip dashes as applicable, normalize lowercase, and throw ValidationError."date", not "time".pnpm run generate:docs; generated command docs under docs/src/content/docs/commands/*.md are gitignored, while generated skills under plugins/sentry-cli/skills/sentry-cli/ are committed.src/types/*.ts and are re-exported from src/types/index.ts.upsert() or runUpsert() from src/lib/db/utils.ts.CliError from src/lib/errors.ts, and code must use EXIT.* constants rather than hardcoded numeric exit codes outside errors.ts.CliError default 1; AuthError 10β12; HostScopeError 13; ConfigError 20; ValidationError 21; ContextError 22; ResolutionError 23; ApiError 30; TimeoutError 31; SeerError 40β42; UpgradeError 50; DeviceFlowError 51; OutputError 60; WizardError 61β64.ContextError; provided-but-not-found values use ResolutionError; malformed input uses ValidationError.ContextError.command must be a single-line CLI usage example, alternatives: [] is used when defaults are irrelevant, and plural resources use " and " for grammar.fuzzyMatch() from src/lib/fuzzy.ts and show at most 5 fuzzy suggestions.catch block to rethrow, log with log.debug()/log.warn(), or return a fallback accompanied by log.debug(); silent catches are prohibited and enforced by lint-rules/no-silent-catch.grit in biome.jsonc.log.warn(), and returning a hint toward the correct command; ambiguous cases retain errors with entity-aware suggestions.getAuthToken(), isAuthenticated(), and setAuthToken().src/lib/*.ts; if a module covers at least 80% of the need, extend it instead, and every new src/lib/**/*.ts file must begin with module-level JSDoc..js, external imports to precede local imports, and type-only imports to use type.resolveCursor() must be invoked inside the org-all override closure, and dispatchOrgScopedList must always specify orgSlugMatchBehavior as "redirect" or "error" as appropriate.project:<slug> in the query via buildProjectQuery(); replay index uses projectSlugs; issue index uses a project parameter or query depending on mode; never apply two mechanisms simultaneously.explore datasets to centralize sort, query, fetch, and field-validation behavior in resolveDatasetConfig rather than scattering dataset checks through func.useTestConfigDir() from test/helpers.ts; tests must not delete process.env.SENTRY_CONFIG_DIR, capture it at module scope, or manually manage it with beforeEach/afterEach.DEFAULT_NUM_RUNS is 50 for shared fast-check test runs.main and verify the bug still exists before review; 3. separate correctness fixes from subjective UX changes; 4. prefer shared helpers such as autoPaginate() and safeParseJson() over one-off fixes.fc5d50e2324e2b6bb2067976bf1515dab45224fb, bd065083c3b82677747b97a6cc7f5cf57532d3bc, fc5d50e2324e2b6bb2067976bf1515dab45224fb.