Nitro Sound Workflows
Route natural-language maintenance requests to the repository's canonical
workflow documents and enforce the shared native-module safeguards below.
Read The Source Of Truth
Before editing, read root AGENTS.md and the instructions nearest the changed
path. Use these files as primary evidence:
- Public API:
src/index.tsx, src/index.web.tsx, and src/specs/*.nitro.ts
- Native behavior:
ios/**/*.swift and android/**/*.{kt,cpp,h,hpp}
- Generated bindings:
nitrogen/generated/**
- Build and release behavior:
package.json and .github/workflows/*.yml
- User documentation:
README.md, docs/*.md, and CHANGELOG.md
- Workflow details:
.claude/commands/*.md
Do not restate a rule when one of those files already defines it precisely.
Route The Request
Read and follow the matching command file:
- PR feedback, CI findings, or review monitoring:
$review-pr; the legacy
slash-command adapter is .claude/commands/review-pr.md
- Broad code and API audit:
.claude/commands/audit-code.md
- Rebuild compact AI context:
.claude/commands/compile-knowledge.md
- Resolve a GitHub issue:
.claude/commands/resolve-issue.md
- Full repository health check:
.claude/commands/verify-all.md
- Device-backed audio regression:
.claude/commands/e2e-tests.md
- Stable or prerelease npm publication:
.claude/commands/release.md
- Dependency upgrade:
.claude/commands/upgrade-deps.md
- Commit, push, or open a PR:
.claude/commands/commit.md
Use $ios-audio-e2e or $android-audio-e2e when the request targets one
native platform. Use $simulator-audio-e2e for repeatable virtual-device audio
regression flows that must explicitly avoid physical phones. Use
$generate-doc for API, migration, FAQ, changelog, or
release documentation. Use $review-self for an independent final pass and
$rebase-main for branch synchronization.
Preserve The Nitro Contract
- Treat
src/specs/*.nitro.ts as the native contract. Update the spec first
when the exposed HybridObject surface changes.
- Never hand-edit
nitrogen/generated/**. Regenerate with yarn nitrogen or
run the complete build/codegen flow with yarn prepare, then inspect the
generated diff.
- Keep TypeScript, Web, Swift, Kotlin, and C++ behavior aligned unless the public
documentation explicitly identifies a platform limitation.
- Preserve millisecond units for record and playback event positions.
- Check listener registration, removal, promise settlement, cleanup, and
recorder/player state transitions for every behavior change.
- Verify microphone permission and audio-session/focus behavior for recording
changes. Treat background and interruption claims as device-backed claims.
- Preserve user changes. Never discard unrelated generated output, local
settings, or untracked files.
Select Verification By Path
Always run git diff --check, then select the smallest complete matrix:
- TypeScript/hooks/Web: run
yarn typecheck, yarn test, and yarn lint.
Also run yarn build:web when Web behavior changes.
- Nitro spec or generated bindings:
yarn prepare, inspect all generated
changes, then run typecheck, tests, and lint.
- Swift/iOS: run the iOS build procedure in
.github/workflows/ci-ios.yml; use
$ios-audio-e2e for runtime behavior.
- Kotlin/Android: run the Android build procedure in
.github/workflows/ci-android.yml; use $android-audio-e2e for runtime
behavior.
- Cross-platform public behavior: verify iOS, Android, and Web or explicitly
report every untested platform.
- Documentation/workflows only: validate referenced paths and commands, check
Markdown structure, and run the affected lightweight checks.
Do not claim a runtime pass from compilation alone.
Guard External Writes
Internal workflow changes under .claude/, .codex/, AGENTS.md, or
knowledge/_claude-context/ stay local unless the user explicitly requests a
commit, push, PR, or merge.
Before any GitHub write, resolve the exact repository, issue or PR number, and
current head. Keep public issue, PR, review, release, and commit prose in clear
English unless the user explicitly requests another language. Do not reply to
or resolve a review thread until the finding is fixed or disproved with current
repository evidence.
Before a release, require explicit publication authority, a clean and current
main, successful required checks, an unused version/tag, and the manual
workflow defined in .github/workflows/publish-package.yml.
1---2name: nitro-sound-workflows3description: Use for react-native-nitro-sound repository work that should follow the project workflows for PR review, code audit, knowledge compilation, full verification, iOS or Android audio E2E, npm releases, issue resolution, dependency upgrades, commits, pushes, PRs, Nitro code generation, and native cross-platform checks.4---56# Nitro Sound Workflows78Route natural-language maintenance requests to the repository's canonical9workflow documents and enforce the shared native-module safeguards below.1011## Read The Source Of Truth1213Before editing, read root `AGENTS.md` and the instructions nearest the changed14path. Use these files as primary evidence:1516- Public API: `src/index.tsx`, `src/index.web.tsx`, and `src/specs/*.nitro.ts`17- Native behavior: `ios/**/*.swift` and `android/**/*.{kt,cpp,h,hpp}`18- Generated bindings: `nitrogen/generated/**`19- Build and release behavior: `package.json` and `.github/workflows/*.yml`20- User documentation: `README.md`, `docs/*.md`, and `CHANGELOG.md`21- Workflow details: `.claude/commands/*.md`2223Do not restate a rule when one of those files already defines it precisely.2425## Route The Request2627Read and follow the matching command file:2829- PR feedback, CI findings, or review monitoring: `$review-pr`; the legacy30 slash-command adapter is `.claude/commands/review-pr.md`31- Broad code and API audit: `.claude/commands/audit-code.md`32- Rebuild compact AI context: `.claude/commands/compile-knowledge.md`33- Resolve a GitHub issue: `.claude/commands/resolve-issue.md`34- Full repository health check: `.claude/commands/verify-all.md`35- Device-backed audio regression: `.claude/commands/e2e-tests.md`36- Stable or prerelease npm publication: `.claude/commands/release.md`37- Dependency upgrade: `.claude/commands/upgrade-deps.md`38- Commit, push, or open a PR: `.claude/commands/commit.md`3940Use `$ios-audio-e2e` or `$android-audio-e2e` when the request targets one41native platform. Use `$simulator-audio-e2e` for repeatable virtual-device audio42regression flows that must explicitly avoid physical phones. Use43`$generate-doc` for API, migration, FAQ, changelog, or44release documentation. Use `$review-self` for an independent final pass and45`$rebase-main` for branch synchronization.4647## Preserve The Nitro Contract4849- Treat `src/specs/*.nitro.ts` as the native contract. Update the spec first50 when the exposed HybridObject surface changes.51- Never hand-edit `nitrogen/generated/**`. Regenerate with `yarn nitrogen` or52 run the complete build/codegen flow with `yarn prepare`, then inspect the53 generated diff.54- Keep TypeScript, Web, Swift, Kotlin, and C++ behavior aligned unless the public55 documentation explicitly identifies a platform limitation.56- Preserve millisecond units for record and playback event positions.57- Check listener registration, removal, promise settlement, cleanup, and58 recorder/player state transitions for every behavior change.59- Verify microphone permission and audio-session/focus behavior for recording60 changes. Treat background and interruption claims as device-backed claims.61- Preserve user changes. Never discard unrelated generated output, local62 settings, or untracked files.6364## Select Verification By Path6566Always run `git diff --check`, then select the smallest complete matrix:6768- TypeScript/hooks/Web: run `yarn typecheck`, `yarn test`, and `yarn lint`.69 Also run `yarn build:web` when Web behavior changes.70- Nitro spec or generated bindings: `yarn prepare`, inspect all generated71 changes, then run typecheck, tests, and lint.72- Swift/iOS: run the iOS build procedure in `.github/workflows/ci-ios.yml`; use73 `$ios-audio-e2e` for runtime behavior.74- Kotlin/Android: run the Android build procedure in75 `.github/workflows/ci-android.yml`; use `$android-audio-e2e` for runtime76 behavior.77- Cross-platform public behavior: verify iOS, Android, and Web or explicitly78 report every untested platform.79- Documentation/workflows only: validate referenced paths and commands, check80 Markdown structure, and run the affected lightweight checks.8182Do not claim a runtime pass from compilation alone.8384## Guard External Writes8586Internal workflow changes under `.claude/`, `.codex/`, `AGENTS.md`, or87`knowledge/_claude-context/` stay local unless the user explicitly requests a88commit, push, PR, or merge.8990Before any GitHub write, resolve the exact repository, issue or PR number, and91current head. Keep public issue, PR, review, release, and commit prose in clear92English unless the user explicitly requests another language. Do not reply to93or resolve a review thread until the finding is fixed or disproved with current94repository evidence.9596Before a release, require explicit publication authority, a clean and current97`main`, successful required checks, an unused version/tag, and the manual98workflow defined in `.github/workflows/publish-package.yml`.