Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .lore.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
<!-- lore:019c8b60-d21a-7d44-8a88-729f74ec7e02 -->
* **Sentry CLI resolve-target cascade has 5 priority levels with env var support**: Resolve-target cascade: (1) CLI flags, (2) SENTRY\_ORG/SENTRY\_PROJECT env vars, (3) SQLite defaults, (4) DSN auto-detection, (5) directory name inference. SENTRY\_PROJECT supports \`org/project\` combo — SENTRY\_ORG ignored if set. Schema v13 merged \`defaults\` table into \`metadata\` KV with keys \`defaults.{org,project,telemetry,url}\`; getters/setters in \`src/lib/db/defaults.ts\`. Prefer dedicated SQLite tables + migrations over \`metadata\` KV for non-trivial caches. Hidden global \`--org\`/\`--project\` flags: \`mergeGlobalFlags()\` in command.ts injects hidden flag shapes, \`applyOrgProjectFlags()\` writes to \`SENTRY\_ORG\`/\`SENTRY\_PROJECT\` before auth guard. No short aliases (\`-p\` conflicts). \`@sentry/api\` SDK: wrap types at \`src/lib/api/\*.ts\` with \`as unknown as SentryX\` casts; never leak to commands. \`unwrapResult\`/\`unwrapPaginatedResult\` must stay CLI-owned. \`apiRequestToRegion\` auto-sets JSON Content-Type; \`rawApiRequest\` preserves strings.

<!-- lore:019fc7ac-2eb9-78b3-a4dc-2adb247ab3e8 -->
* **sentry project create: the platform must always be attached with a colon**: \`sentry project create\` accepts only two forms, both with the platform joined to the name by \`:\` — there is no space-separated form, with or without an explicit org: (1) \`proj:platform...\` (org auto-detected) and (2) \`org/proj:platform...\` (org explicit); both support chaining multiple pairs in one call, e.g. \`web:node api:python worker:node\`. Spaces are never valid in slugs — \`looksLikeDisplayName()\` uses space presence as the display-name signal. \`buildPlatformError()\` only ever shows the colon form; \`parsePairedProjectSpec()\` rejects anything else with "must use \<name>:\<platform> syntax"; \`parseProjectSpecs()\`'s legacy two-positional branch was removed entirely; completions never offer space-separated platform completions for a bare positional. \`teamAutoCreateSlug\` (commit \`13727f266\`) searches the whole batch for the first non-empty slug via \`parsed.map(p => slugify(p.name)).find(slug => slug !== "")\`, so one project with a punctuation-only name doesn't block team auto-create for the rest of the batch. \`generate-skill-markdown.ts\` extracts \`extractCommandPathFromHeading()\` and \`matchExampleToCommand()\` out of \`generate-skill.ts\` to fix a heading-parsing regex that broke on the new \`\[<org>/]\` bracket prefix, and to make the parsing logic independently unit-testable.

<!-- lore:019f00ac-ffa5-7edd-93fb-6ff73f6a5075 -->
* **sentry-cli skill install paths: ~/.claude/ and ~/.agents/ only — OpenCode is never a target**: Skill source-of-truth: \`plugins/sentry-cli/skills/sentry-cli/SKILL.md\` (602 lines) + \`references/\` (28 per-command .md files). \`installAgentSkills()\` in \`src/lib/agent-skills.ts\` installs to \`~/.agents/skills/sentry-cli/\` and \`~/.claude/skills/sentry-cli/\` only — no OpenCode path. OpenCode IS detected via \`OPENCODE\_CLIENT\` env in \`src/lib/detect-agent.ts\` but only for telemetry, not skill installation. \`.opencode/\` and \`opencode.json\*\` are gitignored (lines 72–74). Cursor symlinks live at \`.cursor/skills/sentry-cli/\` pointing into \`plugins/\`. OpenCode scans \`~/.claude/skills/\*\*/SKILL.md\` and \`~/.agents/\*\*/SKILL.md\` — \`.cursor/\` is NOT scanned. \`installAgentSkills()\` never creates top-level agent roots — their presence is the detection signal that the user already has a compatible agent installed. Skills are updated on every version bump (write-if-changed optimization is unnecessary). Writes use atomic rename: temp file \`.\<name>.\<pid>.\<rand>.tmp\` in same dir → \`rename()\` into place, guaranteeing readers never observe a partial file.

Expand Down
Loading