chore: establish AI-native maintenance + bump nitro deps#786
Conversation
📝 WalkthroughWalkthroughAdds four AI command workflow docs under Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub as "GitHub (Issue/Comment)"
participant Actions as "GitHub Actions (ai-dispatch)"
participant API as "gh api /repos/:owner/:repo/dispatches"
participant Downstream as "Downstream handler"
User->>GitHub: open issue / post comment with `/ai <command> ...`
GitHub->>Actions: trigger (issues opened / issue_comment / workflow_dispatch)
Actions->>Actions: parse body for `/ai <command> <target> <notes>`
Actions-->>GitHub: post acknowledgement comment (if issue trigger)
Actions->>API: POST repository_dispatch {event_type: "ai-<command>", client_payload: {...}}
API->>Downstream: deliver repository_dispatch payload
Downstream->>Downstream: execute requested AI command workflow
Downstream-->>GitHub: update issue/PR with results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a4dca87 to
cd2ffcd
Compare
There was a problem hiding this comment.
Code Review
This pull request updates dependencies for react-native-nitro-sound, including nitrogen, react-native-nitro-modules, and @react-native-community/slider, and adds documentation for AI-native maintenance workflows in .claude/commands/. I have reviewed the changes and identified a potential issue with the peer dependency range update in package.json that may break compatibility for consumers, as well as a documentation inconsistency in the commit command guide.
| "react": "*", | ||
| "react-native": "*", | ||
| "react-native-nitro-modules": ">=0.35.0" | ||
| "react-native-nitro-modules": ">=0.35.4" |
There was a problem hiding this comment.
The peer dependency range for react-native-nitro-modules was updated to >=0.35.4. Ensure that this change is backward compatible with the existing codebase, as this is a breaking change for consumers using older versions of the module.
| "react-native-nitro-modules": ">=0.35.4" | |
| "react-native-nitro-modules": ">=0.35.0" |
| - `--push` / `-p`: Push to remote after commit | ||
| - `--pr`: Create PR after push | ||
| - `--all` / `-a`: Commit all changes at once | ||
| - `<path>`: Commit only specific path (e.g., `ios/`, `android/`, `src/`) |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
README.md (1)
20-20: Markdown lint: blank line inside blockquote causes MD028 warning.There's a blank line between the two blockquote sections (after line 20, before line 22). While this renders fine, it triggers a markdownlint warning.
📝 Suggested fix to merge into a single blockquote or add non-blank separator
Option 1 — Remove blank line and use
>continuation:> ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`. - +> > ℹ️ **Swift 6 build warning**: If Xcode shows ...Option 2 — Accept the warning if intentional visual separation is preferred.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` at line 20, Remove the blank line breaking the blockquote that contains the `/ai resolve-issue` command so the two blockquote lines are merged into a single continuous `>` block (or alternatively add a non-blank separator like an HTML comment if you want visual gap); update the README.md blockquote around the `/ai resolve-issue` (and the following supported commands line) to eliminate the empty line causing the MD028 warning..claude/commands/commit.md (1)
187-220: Add language specifier to fenced code blocks (MD040).The example commit message blocks at lines 187, 199, and 213 lack a language specifier, triggering markdownlint MD040 warnings. Adding
textsatisfies the linter while preserving readability.📝 Suggested fix
-``` +```text feat(nitro): add segmented recording API ...Apply the same change to lines 199 and 213.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/commit.md around lines 187 - 220, The three fenced commit-message code blocks in .claude/commands/commit.md are missing a language specifier (triggering MD040); update each opening triple-backtick for the commit blocks that contain "feat(nitro): add segmented recording API", "fix(ios): prevent crash on corrupted std::optional<double>", and "chore(deps): bump react-native-nitro-modules to 0.35.4" to include `text` (i.e., change ``` to ```text) so markdownlint MD040 is satisfied while preserving the commit message content..github/workflows/ai-dispatch.yml (1)
118-136: Consider validating command before dispatch.The workflow dispatches
ai-${CMD}without validating thatCMDis a known command. Forworkflow_dispatch, this is controlled by thechoiceinput, but for comment-triggered runs, any/ai foowould dispatchai-foo. This may be intentional for extensibility, but consider adding validation if unknown commands should be rejected.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ai-dispatch.yml around lines 118 - 136, The workflow currently posts "event_type=ai-${CMD}" using the CMD env var without validating it; add validation in the "Emit repository_dispatch for the Claude agent to pick up" run step to check CMD against an allowlist of known commands (e.g., a shell array like ALLOWED=("help" "summarize" "deploy") or similar) before calling gh api, and if CMD is not in the allowlist emit a clear error and exit non‑zero (or fallback to a safe default) so unknown `/ai` commands are rejected instead of dispatching arbitrary event types.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ai-dispatch.yml:
- Around line 108-117: Replace the problematic multiline --body argument to the
gh issue comment invocation with a safe heredoc or properly escaped string so
YAML parsing won't fail; specifically update the run block that invokes gh issue
comment (the lines using CMD, TGT, NOTES and the --body flag) to use a heredoc
(or an escaped/quoted multiline string) that preserves variable expansion for
$CMD, $TGT and ${NOTES:-(none)} and keeps the final line "_This repo is
maintained in an AI-native workflow — see README._" intact; ensure the heredoc
delimiter and quoting are chosen so YAML remains valid and the shell variables
expand (e.g., use an unquoted heredoc or substitute variables before a
single-quoted heredoc) for the gh issue comment --body invocation.
In `@package.json`:
- Around line 96-101: Update the example package dependency to match the root
bump: in example/package.json change the react-native-nitro-modules dependency
from 0.35.0 to 0.35.4 so it aligns with the root package.json (ensure the
"react-native-nitro-modules" entry uses "0.35.4" and run npm/yarn install to
update lockfile and pass the CI version alignment check referenced in
.claude/commands/upgrade-deps.md).
In `@README.md`:
- Around line 18-20: The README advertises the `/ai triage-all` command but
there is no corresponding documentation file triage-all.md for the command
referenced in the ai-dispatch.yml workflow; either add a new command doc named
triage-all.md describing usage/flags/output and commit it alongside the other
command docs, or remove `/ai triage-all` from the README and from the workflow
command list to keep them in sync.
---
Nitpick comments:
In @.claude/commands/commit.md:
- Around line 187-220: The three fenced commit-message code blocks in
.claude/commands/commit.md are missing a language specifier (triggering MD040);
update each opening triple-backtick for the commit blocks that contain
"feat(nitro): add segmented recording API", "fix(ios): prevent crash on
corrupted std::optional<double>", and "chore(deps): bump
react-native-nitro-modules to 0.35.4" to include `text` (i.e., change ``` to
```text) so markdownlint MD040 is satisfied while preserving the commit message
content.
In @.github/workflows/ai-dispatch.yml:
- Around line 118-136: The workflow currently posts "event_type=ai-${CMD}" using
the CMD env var without validating it; add validation in the "Emit
repository_dispatch for the Claude agent to pick up" run step to check CMD
against an allowlist of known commands (e.g., a shell array like ALLOWED=("help"
"summarize" "deploy") or similar) before calling gh api, and if CMD is not in
the allowlist emit a clear error and exit non‑zero (or fallback to a safe
default) so unknown `/ai` commands are rejected instead of dispatching arbitrary
event types.
In `@README.md`:
- Line 20: Remove the blank line breaking the blockquote that contains the `/ai
resolve-issue` command so the two blockquote lines are merged into a single
continuous `>` block (or alternatively add a non-blank separator like an HTML
comment if you want visual gap); update the README.md blockquote around the `/ai
resolve-issue` (and the following supported commands line) to eliminate the
empty line causing the MD028 warning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 44bea90e-f0a6-4fcf-a951-1941776145e6
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
.claude/commands/commit.md.claude/commands/compile-knowledge.md.claude/commands/resolve-issue.md.claude/commands/upgrade-deps.md.github/workflows/ai-dispatch.yml.gitignoreREADME.mdpackage.json
| run: | | ||
| set -eu | ||
| : "${CMD:?command missing}" | ||
| gh issue comment "$ISSUE" \ | ||
| --repo "${{ github.repository }}" \ | ||
| --body "🤖 AI dispatch queued: \`$CMD\` (target: \`$TGT\`). | ||
| Claude will pick this up shortly. Notes: ${NOTES:-(none)}. | ||
|
|
||
| _This repo is maintained in an AI-native workflow — see README._" | ||
|
|
There was a problem hiding this comment.
Fix YAML syntax error in acknowledgement comment step.
Static analysis reports a YAML syntax error around lines 116-118. The issue is the multiline string construction in the --body argument. The em-dash (—) and underscores combined with the string structure cause YAML parsing to fail.
🔧 Suggested fix using heredoc or escaped string
run: |
set -eu
: "${CMD:?command missing}"
- gh issue comment "$ISSUE" \
- --repo "${{ github.repository }}" \
- --body "🤖 AI dispatch queued: \`$CMD\` (target: \`$TGT\`).
-Claude will pick this up shortly. Notes: ${NOTES:-(none)}.
-
-_This repo is maintained in an AI-native workflow — see README._"
+ gh issue comment "$ISSUE" \
+ --repo "${{ github.repository }}" \
+ --body "🤖 AI dispatch queued: \`$CMD\` (target: \`$TGT\`). Claude will pick this up shortly. Notes: ${NOTES:-(none)}. _This repo is maintained in an AI-native workflow - see README._"Alternatively, use a heredoc:
run: |
set -eu
: "${CMD:?command missing}"
gh issue comment "$ISSUE" \
--repo "${{ github.repository }}" \
--body "$(cat <<'COMMENT'
🤖 AI dispatch queued: `$CMD` (target: `$TGT`).
Claude will pick this up shortly. Notes: ${NOTES:-(none)}.
_This repo is maintained in an AI-native workflow — see README._
COMMENT
)"Note: With heredoc, variable expansion ($CMD, etc.) won't work inside single-quoted 'COMMENT'. Use unquoted COMMENT or substitute variables before the heredoc.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| run: | | |
| set -eu | |
| : "${CMD:?command missing}" | |
| gh issue comment "$ISSUE" \ | |
| --repo "${{ github.repository }}" \ | |
| --body "🤖 AI dispatch queued: \`$CMD\` (target: \`$TGT\`). | |
| Claude will pick this up shortly. Notes: ${NOTES:-(none)}. | |
| _This repo is maintained in an AI-native workflow — see README._" | |
| run: | | |
| set -eu | |
| : "${CMD:?command missing}" | |
| gh issue comment "$ISSUE" \ | |
| --repo "${{ github.repository }}" \ | |
| --body "🤖 AI dispatch queued: \`$CMD\` (target: \`$TGT\`). Claude will pick this up shortly. Notes: ${NOTES:-(none)}. _This repo is maintained in an AI-native workflow - see README._" |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 116-116: could not parse as YAML: could not find expected ':'
(syntax-check)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ai-dispatch.yml around lines 108 - 117, Replace the
problematic multiline --body argument to the gh issue comment invocation with a
safe heredoc or properly escaped string so YAML parsing won't fail; specifically
update the run block that invokes gh issue comment (the lines using CMD, TGT,
NOTES and the --body flag) to use a heredoc (or an escaped/quoted multiline
string) that preserves variable expansion for $CMD, $TGT and ${NOTES:-(none)}
and keeps the final line "_This repo is maintained in an AI-native workflow —
see README._" intact; ensure the heredoc delimiter and quoting are chosen so
YAML remains valid and the shell variables expand (e.g., use an unquoted heredoc
or substitute variables before a single-quoted heredoc) for the gh issue comment
--body invocation.
| > 🤖 **This repository is now AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited time (currently focused on [hyodotdev/openiap](https://github.com/hyodotdev/openiap)), so day-to-day triage, bug fixes, and dependency bumps here are handled by Claude on his behalf. Commits and pull requests labeled `🤖 Autogenerated by Claude` are produced through the `.claude/commands/` skills in this repo and the `.github/workflows/ai-dispatch.yml` workflow. If you see something off with an AI-generated change, please comment on the issue or PR — Hyo still reviews direction, and humans are always welcome to send PRs. | ||
| > | ||
| > ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`. |
There was a problem hiding this comment.
Missing documentation for /ai triage-all command.
Line 20 advertises /ai triage-all as a supported command, and it's also listed in .github/workflows/ai-dispatch.yml (line 25). However, there's no corresponding .claude/commands/triage-all.md file in this PR. Either add the documentation file or remove this command from the list until it's implemented.
🧰 Tools
🪛 LanguageTool
[style] ~18-~18: Consider using a synonym to be more concise.
Context: ...AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited tim...
(A_LOT_OF)
[uncategorized] ~18-~18: The official name of this software platform is spelled with a capital “H”.
Context: .../commands/skills in this repo and the.github/workflows/ai-dispatch.yml` workflow. If...
(GITHUB)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 18 - 20, The README advertises the `/ai triage-all`
command but there is no corresponding documentation file triage-all.md for the
command referenced in the ai-dispatch.yml workflow; either add a new command doc
named triage-all.md describing usage/flags/output and commit it alongside the
other command docs, or remove `/ai triage-all` from the README and from the
workflow command list to keep them in sync.
cd2ffcd to
5b53bde
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/ai-dispatch.yml (1)
82-96: Consider anchoring the regex more precisely.The grep pattern
'^/ai[[:space:]]+[a-z-]+.*'correctly matches/aiat line start, but in multi-line issue bodies, this requires the/aicommand to be on its own line. This is probably the intended behavior, but worth documenting in the workflow comments if users expect inline commands like "Please /ai resolve-issue" to work.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ai-dispatch.yml around lines 82 - 96, The current grep pattern '^/ai[[:space:]]+[a-z-]+.*' only matches commands at the start of a line; update the grep to allow commands appearing after whitespace (e.g., change to grep -Eo '(^|[[:space:]])/ai[[:space:]]+[a-z-]+.*' or similar) so inline commands like "please /ai resolve-issue" are captured, then ensure extraction of cmd and rest (variables line, cmd, rest) still works (you may need to strip a leading space from the captured line before using awk/cut), or alternatively add a brief comment above the grep explaining the intentional line-start requirement if you prefer to keep the original anchored pattern..claude/commands/commit.md (1)
187-220: Consider adding language specifier to example commit blocks.The fenced code blocks for example commits (lines 187, 199, 213) lack a language specifier, triggering markdownlint MD040. Since these are commit message examples rather than executable code, you could use
textas the language specifier for consistency.♻️ Optional fix
-``` +```text feat(nitro): add segmented recording APIApply similarly to the other two example blocks.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/commit.md around lines 187 - 220, The three fenced commit-message example blocks (the blocks containing "feat(nitro): add segmented recording API", "fix(ios): prevent crash on corrupted std::optional<double>", and "chore(deps): bump react-native-nitro-modules to 0.35.4") are missing a language specifier and trigger markdownlint MD040; update each triple-backtick fence to include the language specifier "text" (e.g., ```text) so the examples are treated as plain text and the lint rule is satisfied.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/commit.md:
- Around line 187-220: The three fenced commit-message example blocks (the
blocks containing "feat(nitro): add segmented recording API", "fix(ios): prevent
crash on corrupted std::optional<double>", and "chore(deps): bump
react-native-nitro-modules to 0.35.4") are missing a language specifier and
trigger markdownlint MD040; update each triple-backtick fence to include the
language specifier "text" (e.g., ```text) so the examples are treated as plain
text and the lint rule is satisfied.
In @.github/workflows/ai-dispatch.yml:
- Around line 82-96: The current grep pattern '^/ai[[:space:]]+[a-z-]+.*' only
matches commands at the start of a line; update the grep to allow commands
appearing after whitespace (e.g., change to grep -Eo
'(^|[[:space:]])/ai[[:space:]]+[a-z-]+.*' or similar) so inline commands like
"please /ai resolve-issue" are captured, then ensure extraction of cmd and rest
(variables line, cmd, rest) still works (you may need to strip a leading space
from the captured line before using awk/cut), or alternatively add a brief
comment above the grep explaining the intentional line-start requirement if you
prefer to keep the original anchored pattern.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 255e31cb-9716-4cb8-8010-7d290e43158c
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
.claude/commands/commit.md.claude/commands/compile-knowledge.md.claude/commands/resolve-issue.md.claude/commands/upgrade-deps.md.github/workflows/ai-dispatch.yml.gitignoreREADME.mdpackage.json
✅ Files skipped from review due to trivial changes (2)
- .gitignore
- .claude/commands/upgrade-deps.md
🚧 Files skipped from review as they are similar to previous changes (2)
- package.json
- .claude/commands/compile-knowledge.md
- .claude/commands/resolve-issue.md: auto-triage and resolve GitHub issues - .claude/commands/commit.md: structured commit/PR workflow - .claude/commands/compile-knowledge.md: regenerate AI context files - .claude/commands/upgrade-deps.md: bump nitro-modules + audio deps safely - .github/workflows/ai-dispatch.yml: workflow_dispatch + /ai comment trigger so Hyo can nudge the AI maintainer from the GitHub mobile app - .gitignore: only ignore .claude/settings.local.json, share skills This establishes react-native-nitro-sound as an AI-native maintained repo. 🤖 Autogenerated by Claude (AI-native maintenance). Co-Authored-By: Claude <noreply@anthropic.com>
Add a prominent banner explaining that this repo is maintained by Claude on Hyo's behalf while he focuses on hyodotdev/openiap, and document the /ai mobile-trigger commands. 🤖 Autogenerated by Claude (AI-native maintenance). Co-Authored-By: Claude <noreply@anthropic.com>
- react-native-nitro-modules: 0.35.0 → 0.35.4 (also peer floor) - nitrogen: 0.35.0 → 0.35.4 (lockstep with nitro-modules) - react-native-builder-bob: 0.38.4 → 0.41.0 - @react-native-community/slider: ^5.0.1 → ^5.2.0 All patch/minor bumps; no API changes in nitro-modules 0.35.x. Lockfile updated via yarn install --mode=update-lockfile. 🤖 Autogenerated by Claude (AI-native maintenance). Co-Authored-By: Claude <noreply@anthropic.com>
5b53bde to
a570c37
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/resolve-issue.md:
- Line 105: Update the documentation line that references the wrong npm script:
replace the incorrect `yarn specs` with the actual script `yarn nitrogen` so the
instruction reads to run `yarn nitrogen` (then regenerate Nitrogen and run iOS &
Android builds); reference the script name `yarn nitrogen` when editing the line
that currently contains `yarn specs`.
- Around line 29-34: The script uses $ISSUE_NUMBER on the gh pr list command
without ever setting it; define and initialize ISSUE_NUMBER before it’s
referenced (e.g., derive it from the script input/ARGUMENTS or parse the issue
view output) so subsequent commands like `gh pr list --search "$ISSUE_NUMBER
in:body"` have a value to search for; update the top of the snippet to set
ISSUE_NUMBER (for example by assigning ISSUE_NUMBER from ARGUMENTS or extracting
the issue number from gh issue view output) so all later uses of ISSUE_NUMBER
succeed.
- Around line 124-129: The PR body heredoc is single-quoted so variables like
$ISSUE_NUMBER are not expanded; change the heredoc delimiter to an unquoted or
double-quoted form (e.g., <<EOF or <<"EOF") or interpolate the variable before
the heredoc so that the gh pr create command emits "Closes #<number>" correctly;
update the gh pr create invocation that uses <<'EOF' to use an unquoted heredoc
(<<EOF) or build the body string with $ISSUE_NUMBER substituted prior to passing
it to gh pr create.
In @.github/workflows/ai-dispatch.yml:
- Around line 84-90: The workflow currently takes the extracted cmd (variable
cmd) and later emits an event_type like event_type=ai-${CMD} without validation;
add an allowlist of permitted command names (e.g., an array or space-separated
string in the workflow like ALLOWED_CMDS="assist summarize translate" or
similar), normalize cmd to a safe form (lowercase, strip
non-alphanumerics/hyphens), and check membership before proceeding — if cmd is
not in ALLOWED_CMDS then set no-ai-command=true (or exit 0) and do not emit
event_type; update the parsing block that defines cmd/rest and the place that
builds event_type=ai-${CMD} to perform this validation and early-return on
disallowed commands.
- Around line 44-47: The workflow's permissions block grants "contents: read"
which prevents the repository dispatch call (the POST
/repos/{owner}/{repo}/dispatches invoked via the gh api at the later job) from
succeeding; update the permissions entry under the top-level permissions mapping
so that contents: write is set instead of contents: read to allow repository
dispatches to be created (i.e., change the "contents" permission value to
"write" in the permissions section).
In `@README.md`:
- Around line 18-21: The blockquote in README.md violates MD028 by containing a
blank line inside the quoted block; fix it by removing the empty line(s) within
the blockquote so every paragraph line remains prefixed with '>' (or replace the
blank line with a '>' line to separate paragraphs), ensuring the block that
starts with "🤖 **This repository is now AI-native maintained.**" and the
following command list (➡️ To nudge...) are continuous '>'-prefixed lines with
no blank lines between them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d59c6da9-daf4-40db-814c-5141e1afa285
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (9)
.claude/commands/commit.md.claude/commands/compile-knowledge.md.claude/commands/resolve-issue.md.claude/commands/upgrade-deps.md.github/workflows/ai-dispatch.yml.gitignoreREADME.mdexample/package.jsonpackage.json
✅ Files skipped from review due to trivial changes (5)
- .gitignore
- example/package.json
- .claude/commands/compile-knowledge.md
- .claude/commands/upgrade-deps.md
- .claude/commands/commit.md
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
| gh issue view $ARGUMENTS --repo hyochan/react-native-nitro-sound \ | ||
| --json number,title,body,state,labels,author,comments | ||
| # Related PRs | ||
| gh pr list --repo hyochan/react-native-nitro-sound \ | ||
| --search "$ISSUE_NUMBER in:body" --json number,title,state | ||
| ``` |
There was a problem hiding this comment.
Initialize ISSUE_NUMBER before first use.
Line 33 uses $ISSUE_NUMBER without defining it first, so related PR lookup (and later steps) can fail.
✅ Suggested fix
+ISSUE_NUMBER="$(echo "$ARGUMENTS" | sed -E 's#^.*/issues/([0-9]+)$#\1#')"
+ISSUE_NUMBER="${ISSUE_NUMBER:-$ARGUMENTS}"
gh issue view $ARGUMENTS --repo hyochan/react-native-nitro-sound \
--json number,title,body,state,labels,author,comments
# Related PRs
gh pr list --repo hyochan/react-native-nitro-sound \
--search "$ISSUE_NUMBER in:body" --json number,title,state📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| gh issue view $ARGUMENTS --repo hyochan/react-native-nitro-sound \ | |
| --json number,title,body,state,labels,author,comments | |
| # Related PRs | |
| gh pr list --repo hyochan/react-native-nitro-sound \ | |
| --search "$ISSUE_NUMBER in:body" --json number,title,state | |
| ``` | |
| ISSUE_NUMBER="$(echo "$ARGUMENTS" | sed -E 's#^.*/issues/([0-9]+)$#\1#')" | |
| ISSUE_NUMBER="${ISSUE_NUMBER:-$ARGUMENTS}" | |
| gh issue view $ARGUMENTS --repo hyochan/react-native-nitro-sound \ | |
| --json number,title,body,state,labels,author,comments | |
| # Related PRs | |
| gh pr list --repo hyochan/react-native-nitro-sound \ | |
| --search "$ISSUE_NUMBER in:body" --json number,title,state |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/resolve-issue.md around lines 29 - 34, The script uses
$ISSUE_NUMBER on the gh pr list command without ever setting it; define and
initialize ISSUE_NUMBER before it’s referenced (e.g., derive it from the script
input/ARGUMENTS or parse the issue view output) so subsequent commands like `gh
pr list --search "$ISSUE_NUMBER in:body"` have a value to search for; update the
top of the snippet to set ISSUE_NUMBER (for example by assigning ISSUE_NUMBER
from ARGUMENTS or extracting the issue number from gh issue view output) so all
later uses of ISSUE_NUMBER succeed.
| | TypeScript (`src/`) | `yarn typecheck && yarn lint` | | ||
| | iOS (`ios/`) | `cd example/ios && pod install && xcodebuild -workspace NitroSoundExample.xcworkspace -scheme NitroSoundExample -configuration Debug -sdk iphonesimulator build` | | ||
| | Android (`android/`) | `cd example/android && ./gradlew :app:assembleDebug` | | ||
| | Nitrogen specs | `yarn specs` (regenerate nitrogen) then run iOS & Android builds | |
There was a problem hiding this comment.
Use the actual Nitrogen script name.
Line 105 says yarn specs, but the repo scripts expose yarn nitrogen. This step will fail as written.
🔧 Suggested fix
-| Nitrogen specs | `yarn specs` (regenerate nitrogen) then run iOS & Android builds |
+| Nitrogen specs | `yarn nitrogen` (regenerate nitrogen) then run iOS & Android builds |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Nitrogen specs | `yarn specs` (regenerate nitrogen) then run iOS & Android builds | | |
| | Nitrogen specs | `yarn nitrogen` (regenerate nitrogen) then run iOS & Android builds | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/resolve-issue.md at line 105, Update the documentation line
that references the wrong npm script: replace the incorrect `yarn specs` with
the actual script `yarn nitrogen` so the instruction reads to run `yarn
nitrogen` (then regenerate Nitrogen and run iOS & Android builds); reference the
script name `yarn nitrogen` when editing the line that currently contains `yarn
specs`.
| gh pr create --title "fix(<scope>): <description>" --body "$(cat <<'EOF' | ||
| ## Summary | ||
| <1-3 bullet points> | ||
|
|
||
| Closes #$ISSUE_NUMBER | ||
|
|
There was a problem hiding this comment.
$ISSUE_NUMBER won’t expand in the PR body heredoc.
Because the heredoc is single-quoted (<<'EOF'), Closes #$ISSUE_NUMBER is emitted literally instead of linking the issue.
🔧 Suggested fix
-gh pr create --title "fix(<scope>): <description>" --body "$(cat <<'EOF'
+gh pr create --title "fix(<scope>): <description>" --body "$(cat <<EOF
## Summary
<1-3 bullet points>
-Closes #$ISSUE_NUMBER
+Closes #${ISSUE_NUMBER}
@@
EOF
)"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| gh pr create --title "fix(<scope>): <description>" --body "$(cat <<'EOF' | |
| ## Summary | |
| <1-3 bullet points> | |
| Closes #$ISSUE_NUMBER | |
| gh pr create --title "fix(<scope>): <description>" --body "$(cat <<EOF | |
| ## Summary | |
| <1-3 bullet points> | |
| Closes #${ISSUE_NUMBER} | |
| EOF | |
| )" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/resolve-issue.md around lines 124 - 129, The PR body
heredoc is single-quoted so variables like $ISSUE_NUMBER are not expanded;
change the heredoc delimiter to an unquoted or double-quoted form (e.g., <<EOF
or <<"EOF") or interpolate the variable before the heredoc so that the gh pr
create command emits "Closes #<number>" correctly; update the gh pr create
invocation that uses <<'EOF' to use an unquoted heredoc (<<EOF) or build the
body string with $ISSUE_NUMBER substituted prior to passing it to gh pr create.
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
For GitHub Actions GITHUB_TOKEN, what permission is required to call POST /repos/{owner}/{repo}/dispatches (repository_dispatch)?
💡 Result:
To use the GITHUB_TOKEN in a GitHub Actions workflow to call POST /repos/{owner}/{repo}/dispatches (repository_dispatch event), the workflow job must be granted the contents: write permission. By default, since 2023, GITHUB_TOKEN has read-only permissions, so you need to explicitly set permissions: contents: write in the job or workflow YAML. Example: jobs: dispatch: runs-on: ubuntu-latest permissions: contents: write steps: - name: Dispatch run: | curl -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -d '{"event_type": "my-event"}' This is confirmed by multiple sources including the popular repository-dispatch action README and GitHub issues where users report "Resource not accessible by integration" error resolved by adding contents: write. The official REST API docs for the endpoint do not specify exact permissions, but practical usage shows contents: write is required for GITHUB_TOKEN.
Citations:
- 1: https://github.com/peter-evans/repository-dispatch
- 2: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
- 3: Error: Resource not accessible by integration peter-evans/repository-dispatch#196
- 4: https://docs.github.com/rest/repos/repos
- 5: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs/
🏁 Script executed:
# Check if the file exists and read relevant sections
if [ -f ".github/workflows/ai-dispatch.yml" ]; then
echo "=== File exists ==="
echo "=== Lines 40-50 (permissions section) ==="
sed -n '40,50p' .github/workflows/ai-dispatch.yml
echo ""
echo "=== Lines 125-135 (dispatch section) ==="
sed -n '125,135p' .github/workflows/ai-dispatch.yml
else
echo "File not found"
fiRepository: hyochan/react-native-nitro-sound
Length of output: 710
Change contents: read to contents: write for repository dispatch.
The workflow calls POST /repos/{owner}/{repo}/dispatches at lines 128-135 using gh api, which requires contents: write permission. The current permission set at line 45 only grants contents: read, causing the endpoint to fail with "Resource not accessible by integration" error.
Suggested fix
permissions:
- contents: read
+ contents: write
issues: write
pull-requests: write🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ai-dispatch.yml around lines 44 - 47, The workflow's
permissions block grants "contents: read" which prevents the repository dispatch
call (the POST /repos/{owner}/{repo}/dispatches invoked via the gh api at the
later job) from succeeding; update the permissions entry under the top-level
permissions mapping so that contents: write is set instead of contents: read to
allow repository dispatches to be created (i.e., change the "contents"
permission value to "write" in the permissions section).
| line=$(echo "$body" | grep -Eo '^/ai[[:space:]]+[a-z-]+.*' | head -n1 || true) | ||
| if [ -z "$line" ]; then | ||
| echo "no-ai-command=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| cmd=$(echo "$line" | awk '{print $2}') | ||
| rest=$(echo "$line" | cut -d' ' -f3-) |
There was a problem hiding this comment.
Validate comment-derived commands against an allowlist before dispatch.
Line 84 accepts any /ai <command> token and forwards it into event_type=ai-${CMD} (Line 132). That allows arbitrary event names from public issue comments.
🛡️ Suggested hardening
cmd=$(echo "$line" | awk '{print $2}')
rest=$(echo "$line" | cut -d' ' -f3-)
+ case "$cmd" in
+ resolve-issue|upgrade-deps|compile-knowledge|triage-all)
+ ;;
+ *)
+ echo "no-ai-command=true" >> "$GITHUB_OUTPUT"
+ exit 0
+ ;;
+ esac
echo "command=$cmd" >> "$GITHUB_OUTPUT"Also applies to: 132-136
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ai-dispatch.yml around lines 84 - 90, The workflow
currently takes the extracted cmd (variable cmd) and later emits an event_type
like event_type=ai-${CMD} without validation; add an allowlist of permitted
command names (e.g., an array or space-separated string in the workflow like
ALLOWED_CMDS="assist summarize translate" or similar), normalize cmd to a safe
form (lowercase, strip non-alphanumerics/hyphens), and check membership before
proceeding — if cmd is not in ALLOWED_CMDS then set no-ai-command=true (or exit
0) and do not emit event_type; update the parsing block that defines cmd/rest
and the place that builds event_type=ai-${CMD} to perform this validation and
early-return on disallowed commands.
| > 🤖 **This repository is now AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited time (currently focused on [hyodotdev/openiap](https://github.com/hyodotdev/openiap)), so day-to-day triage, bug fixes, and dependency bumps here are handled by Claude on his behalf. Commits and pull requests labeled `🤖 Autogenerated by Claude` are produced through the `.claude/commands/` skills in this repo and the `.github/workflows/ai-dispatch.yml` workflow. If you see something off with an AI-generated change, please comment on the issue or PR — Hyo still reviews direction, and humans are always welcome to send PRs. | ||
| > | ||
| > ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`. | ||
|
|
There was a problem hiding this comment.
Fix blockquote formatting to satisfy MD028.
The changed blockquote includes a blank line pattern that trips markdownlint (no-blanks-blockquote) at Line 21.
🧹 Suggested markdown fix
> 🤖 **This repository is now AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited time (currently focused on [hyodotdev/openiap](https://github.com/hyodotdev/openiap)), so day-to-day triage, bug fixes, and dependency bumps here are handled by Claude on his behalf. Commits and pull requests labeled `🤖 Autogenerated by Claude` are produced through the `.claude/commands/` skills in this repo and the `.github/workflows/ai-dispatch.yml` workflow. If you see something off with an AI-generated change, please comment on the issue or PR — Hyo still reviews direction, and humans are always welcome to send PRs.
->
> ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > 🤖 **This repository is now AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited time (currently focused on [hyodotdev/openiap](https://github.com/hyodotdev/openiap)), so day-to-day triage, bug fixes, and dependency bumps here are handled by Claude on his behalf. Commits and pull requests labeled `🤖 Autogenerated by Claude` are produced through the `.claude/commands/` skills in this repo and the `.github/workflows/ai-dispatch.yml` workflow. If you see something off with an AI-generated change, please comment on the issue or PR — Hyo still reviews direction, and humans are always welcome to send PRs. | |
| > | |
| > ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`. | |
| > 🤖 **This repository is now AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited time (currently focused on [hyodotdev/openiap](https://github.com/hyodotdev/openiap)), so day-to-day triage, bug fixes, and dependency bumps here are handled by Claude on his behalf. Commits and pull requests labeled `🤖 Autogenerated by Claude` are produced through the `.claude/commands/` skills in this repo and the `.github/workflows/ai-dispatch.yml` workflow. If you see something off with an AI-generated change, please comment on the issue or PR — Hyo still reviews direction, and humans are always welcome to send PRs. | |
| > ➡️ To nudge the AI maintainer on an issue from the GitHub mobile app, just comment `/ai resolve-issue` on the issue. Supported commands: `/ai resolve-issue`, `/ai upgrade-deps`, `/ai compile-knowledge`, `/ai triage-all`. |
🧰 Tools
🪛 LanguageTool
[style] ~18-~18: Consider using a synonym to be more concise.
Context: ...AI-native maintained.** Hyo is juggling a lot of open-source repos with very limited tim...
(A_LOT_OF)
[uncategorized] ~18-~18: The official name of this software platform is spelled with a capital “H”.
Context: .../commands/skills in this repo and the.github/workflows/ai-dispatch.yml` workflow. If...
(GITHUB)
🪛 markdownlint-cli2 (0.22.0)
[warning] 21-21: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 18 - 21, The blockquote in README.md violates MD028
by containing a blank line inside the quoted block; fix it by removing the empty
line(s) within the blockquote so every paragraph line remains prefixed with '>'
(or replace the blank line with a '>' line to separate paragraphs), ensuring the
block that starts with "🤖 **This repository is now AI-native maintained.**" and
the following command list (➡️ To nudge...) are continuous '>'-prefixed lines
with no blank lines between them.
|
Acknowledged! This PR establishes the AI-native maintenance model and bumps the Nitro deps. Flagged for human review by @hyochan before merging — this touches release configuration and project structure, so keeping it in the queue for your explicit approval. Summary of changes detected:
When you're ready to merge, just approve it and I'll pick it up on the next run (or merge manually).
|
|
/gemini review |
|
Automated triage (daily-triage run, 2026-04-23 KST): Short-circuit gate §3.2 tripped: this PR modifies Bot review state:
CI is green (all required checks passing). Merge when you're comfortable with the peerDep bump. |
There was a problem hiding this comment.
Code Review
This pull request transitions the repository to an AI-native maintenance model by introducing a set of Claude command definitions for automated workflows, including committing changes, compiling a knowledge base, resolving issues, and upgrading dependencies. It also updates the README to inform contributors of the AI-maintained status and bumps several core dependencies like react-native-nitro-modules and nitrogen. Review feedback correctly identified several inaccuracies in the documentation regarding file paths and Xcode workspace names that need to be corrected to ensure the AI commands function as intended.
| - `ios/HybridSound.swift` | ||
| - `android/src/main/java/com/margelo/nitro/sound/HybridSound.kt` |
There was a problem hiding this comment.
The file paths for the native implementations do not match the actual repository structure. Based on the provided file list, the iOS implementation is in ios/Sound.swift and the Android implementation is in android/src/main/java/com/margelo/nitro/audiorecorderplayer/Sound.kt. Using incorrect paths will prevent the AI from correctly reading the source of truth.
| - `ios/HybridSound.swift` | |
| - `android/src/main/java/com/margelo/nitro/sound/HybridSound.kt` | |
| - `ios/Sound.swift` | |
| - `android/src/main/java/com/margelo/nitro/audiorecorderplayer/Sound.kt` |
| | Area touched | Commands | | ||
| | ------------------------ | ------------------------------------------------------------------------- | | ||
| | TypeScript (`src/`) | `yarn typecheck && yarn lint` | | ||
| | iOS (`ios/`) | `cd example/ios && pod install && xcodebuild -workspace NitroSoundExample.xcworkspace -scheme NitroSoundExample -configuration Debug -sdk iphonesimulator build` | |
There was a problem hiding this comment.
The xcodebuild command references a scheme and workspace named NitroSoundExample, but the example/package.json (line 12) indicates the scheme is SoundExample. It is highly likely the workspace is also named SoundExample.xcworkspace.
| | iOS (`ios/`) | `cd example/ios && pod install && xcodebuild -workspace NitroSoundExample.xcworkspace -scheme NitroSoundExample -configuration Debug -sdk iphonesimulator build` | | |
| | iOS (`ios/`) | cd example/ios && pod install && xcodebuild -workspace SoundExample.xcworkspace -scheme SoundExample -configuration Debug -sdk iphonesimulator build | |
Summary
This PR transitions
react-native-nitro-soundto an AI-native maintenance model. Hyo is juggling many OSS repos with very limited personal time (currently focused on hyodotdev/openiap), so routine triage, fixes, and dep bumps will now be handled by Claude on his behalf. Direction and final review stay with Hyo; human contributors are still 100% welcome.Changes
.claude/commands/skills (shared, committed)resolve-issue.md— triage + fix workflow keyed to this repo's label setcommit.md— conventional commit/PR helpercompile-knowledge.md— regenerate AI context underknowledge/_claude-context/upgrade-deps.md— safe bump flow for nitro-modules/nitrogen/audio deps.github/workflows/ai-dispatch.ymlMobile-friendly entrypoints: GitHub mobile app → Actions → Run workflow with a choice of
resolve-issue | upgrade-deps | compile-knowledge | triage-all | custom. Also picks up/ai <command>comments on issues. Dispatches arepository_dispatchevent for a local Claude agent to act on.README
Added a top-of-README banner announcing the AI-native model and documenting
/ai …commands.Dependency bumps
react-native-nitro-modulesfloorAll patch/minor bumps.
yarn.lockregenerated viayarn install --mode=update-lockfile.Test plan
yarn typecheck,yarn lint) greenworkflow_dispatchvisible under Actions tab on GitHub mobile/ai resolve-issueon an issue triggers the workflow🤖 Autogenerated by Claude (AI-native maintenance).
Summary by CodeRabbit
Chores
Documentation