Use yarn: yarn install, yarn build, yarn test, yarn fix
AI commits MUST include a Co-Authored-By trailer with the model name:
Co-Authored-By: <Model Name> <noreply@<provider>.com>
Examples:
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Co-Authored-By: GPT-4o <noreply@openai.com>Co-Authored-By: Gemini Pro <noreply@google.com>
- No
anytype — use proper types orunknown - No
console.log— use clack prompts or chalk - No
@ts-expect-errorunless for clack/magicast ESM imports - Prefix unused variables with
_ - Run
yarn fixbefore committing - Run
runPrettierIfInstalled()after modifying user files
- Update
CHANGELOG.mdunder## Unreleased - Format:
- type(scope): Description ([#PR](link)) - Types:
feat,fix,ref,chore,docs(add!for breaking)
- One shell command + minimal user input to get SDK running
- Transparent: log every file created/modified, package installed, and failure
- Respect user decisions: never enable features users declined (e.g. don't set
tracesSampleRateif tracing was declined) - Cater to 80%: cover typical projects, fail gracefully on edge cases
- Support self-hosted Sentry via
--urlparam
- Store in
.sentryclirc,sentry.properties, or.env.sentry-build-plugins - NEVER inject auth tokens into user code
- Ensure token files are added to
.gitignore
- Prefer
magicast/recastfor AST modifications - Regex only when safe and well-scoped (beware of matching comments)
- Detect existing Sentry code before modifying; ask to proceed if found
clack.log.success/chalk.green— success messagesclack.log.warn/chalk.yellow— warnings (e.g. existing Sentry code found)clack.log.error/chalk.red— errorsclack.log.info— informational messagesclack.log.step— step progresschalk.cyan— highlight file names, package namesclack.spinner— long operations (downloads, installs)console.log(no clack) — copy/paste code snippets only
- Wrap wizards with
withTelemetry(); usetraceStep()for individual spans - Never capture stack traces (may contain absolute paths)
- Use
Sentry.setTag()for user decisions, SDK versions, package managers
All wizards in src/<integration>/<integration>-wizard.ts follow:
printWelcome()+confirmContinueIfNoOrDirtyGitRepo()getOrAskForProjectData()featureSelectionPrompt()ensurePackageIsInstalled()+installPackage()- Config files, build tools, code injection
offerProjectScopedMcpConfig()- Outro
- Wrap all prompts with
abortIfCancelled() - Wrap wizards with
withTelemetry()
- Entry:
bin.ts→src/run.ts - Integrations:
src/{nextjs,react-native,react-router,remix,nuxt,sveltekit,angular,apple,android,flutter,sourcemaps}/ - Shared utils:
src/utils/(AST viaast-utils.ts, packages viapackage-json.ts, UI viaclack/) - Tests mirror
src/intest/; E2E ine2e-tests/
| Command | Description |
|---|---|
yarn build |
Clean + compile TypeScript |
yarn test |
Unit tests with coverage (vitest) |
yarn test:e2e [framework] |
E2E tests |
yarn lint |
Prettier + ESLint check |
yarn fix |
Auto-fix lint + format |
yarn try -i <integration> |
Run wizard locally |
npx vitest run test/path.test.ts |
Single test file |
/review-wizard <integration>— Review wizard implementation. See.agents/skills/review-wizard//test-wizard <integration>— Test wizard locally. See.agents/skills/test-wizard//catchup— Resume session context. See.agents/skills/catchup/