diff --git a/.lore.md b/.lore.md index 14443f438..4e0fc50c2 100644 --- a/.lore.md +++ b/.lore.md @@ -94,6 +94,9 @@ * **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. + +* **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 \:\ 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 \`\[/]\` bracket prefix, and to make the parsing logic independently unit-testable. + * **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 \`.\.\.\.tmp\` in same dir → \`rename()\` into place, guaranteeing readers never observe a partial file.