Skip to content
Open
Show file tree
Hide file tree
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
142 changes: 142 additions & 0 deletions .agents/skills/autoreview-sdk-update-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
name: autoreview-sdk-update-pr
description: Auto-review SDK docs update PRs for ios, android, flutter, expo, or react-native. Runs review-sdk-update-pr in fresh read-only sub-agents, validates and fixes real issues in the parent session, and repeats until no valid issues remain.
---

# Auto Review SDK Update PR

Orchestrate a closeout loop for SDK docs update pull requests in this repository. This skill wraps `review-sdk-update-pr`; it does not replace that review checklist.

Use when:

- user asks for `autoreview-sdk-update-pr`
- user asks to run `review-sdk-update-pr`, fix valid issues, and repeat until clean
- closing out an SDK docs update PR after review comments or CI feedback
- validating updates produced by `update-sdk-docs`

## Contract

- Run each review round through a **fresh sub-agent** that reads and follows `../review-sdk-update-pr/SKILL.md`.
- Sub-agents are read-only reviewers. They must not edit files, commit, push, resolve threads, or launch nested reviewers.
- Treat review output as advisory. The parent must verify every finding against repo files and upstream SDK sources before fixing.
- Fix only valid, concrete issues. Reject speculative findings, broad rewrites, or changes that would diverge from upstream source-of-truth docs.
- If a fix changes files, run the relevant verification commands, then launch another fresh `review-sdk-update-pr` sub-agent on the updated working tree.
- Stop as soon as a full fresh review round reports no valid remaining issues. Do not run extra rounds for polish.
- Never commit, push, create a PR, deploy, or resolve GitHub threads unless the user explicitly asks.

## Required Inputs

Collect or infer:

1. `sdk`: one of `ios`, `android`, `flutter`, `expo`, or `react-native`
2. `newVersion`: semantic version, including `v` prefix only when the docs convention already uses it
3. Review target: PR number, PR branch, or confirmation that current `HEAD` / working tree is the candidate
4. Optional reported issues: GitHub comments, files under `.context/attachments/comments/`, CI failures, or user notes

If `sdk` or `newVersion` cannot be inferred from branch name, changed files, version markers, or PR metadata, ask one concise question before launching reviewers.

## Establish Target

Before the first sub-agent:

- Check `git status --short --branch`.
- Identify the base branch. Prefer PR metadata (`gh pr view --json baseRefName`) when available; otherwise use `origin/main`.
- Inspect changed files with `git diff --name-status <base>...HEAD` and include dirty working-tree files if present.
- Read any user-provided reported issue files before launching the reviewer.
- If review comments are supplied, include their paths and summaries in the reviewer prompt.

## Review Round

Launch one fresh read-only sub-agent per round. Give it the SDK review skill and the target details.

Sub-agent prompt template:

```text
You are running an SDK docs update closeout review. Read and follow the skill at <repo>/.agents/skills/review-sdk-update-pr/SKILL.md completely.

## Review target
Repository: <repo path>
Base: <base branch or PR base>
Candidate: <PR branch / HEAD / current working tree>
SDK: <sdk>
New version: <newVersion>
Changed files: <file list or discovery command>

## Reported issues to include
<attached GitHub comments, CI notes, or "none">

## Requirements
- Be read-only. Do not edit files, commit, push, resolve comments, or launch nested reviewers.
- Verify upstream tags, raw diff, and changelog according to review-sdk-update-pr.
- Validate reported issues and say whether each one is valid, already fixed, or invalid.
- Return findings first with file/line references and concrete fix guidance.
- End with Verdict: CLEAN if no valid issues remain, or NEEDS_WORK if any valid issue remains.
```

## Triage And Fix

When the sub-agent returns:

1. Merge duplicate findings.
2. Verify each finding locally:
- Read the cited docs lines.
- Check upstream `reference/<sdk>/CHANGELOG.md`, tags, and raw diff.
- Confirm repository authoring rules, especially SDK changelog verbatim-copy requirements.
3. Accept findings that are real mismatches, missing SDK docs updates, stale version strings, broken navigation, or verification failures.
4. Reject findings that are already fixed, not part of the SDK docs update, unsupported by upstream source, or not worth the complexity.
5. Apply minimal fixes in the parent session.

Keep a short loop note for each round:

- reviewer verdict
- accepted findings fixed
- findings rejected and why
- files changed
- tests or commands run

## Verification

After any accepted fix, run:

```bash
bun run build:cf
bun test
git diff --check
```

Also run or confirm:

```bash
bun run download:references
```

If `download:references` fails because of a local reference checkout issue, do not ignore upstream verification. Compensate with direct SDK reference commands such as:

```bash
git -C reference/<sdk> fetch --all --tags --prune
git -C reference/<sdk> log --oneline <prevTag>..<newTag>
git -C reference/<sdk> diff --stat <prevTag>...<newTag>
git -C reference/<sdk> show <newTag>:CHANGELOG.md
```

Document the failure and the compensating commands in the final report.

## Repeat Rule

- If no files changed and the reviewer verdict is `CLEAN`, stop.
- If files changed, run verification, then start a new fresh review round on the updated working tree.
- If a reviewer reports `NEEDS_WORK` but the parent rejects every finding after verification, run one more fresh round only when rejection could be disputed or the user asked for strict repeat-until-clean.
- Stop after a fresh round reports no valid issues remain.

## Final Report

Include:

- review target: SDK, version, branch/PR, and base
- number of review rounds
- final reviewer verdict
- accepted findings and fixes
- rejected findings, if any, with short reasons
- verification results
- remaining risks or blocked steps, especially `download:references` failures
- current git status
1 change: 1 addition & 0 deletions .claude/skills/autoreview-sdk-update-pr
6 changes: 6 additions & 0 deletions content/docs/expo/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ description: "Release notes for the Superwall Expo SDK"

# Changelog

## 1.1.5

### Patch Changes

- 45be124: Fix purchase events being dropped on cold start when using a custom purchase controller, which left the paywall spinner stuck forever. The native module emitted events through a single static reference that was overwritten by every module instance, so when more than one app context exists (e.g. expo-dev-client's launcher plus the app) the reference could point at an instance whose JS runtime never subscribed and `onPurchase`/`onPurchaseRestore` were silently dropped. Native events are now emitted to every live module instance (tracked weakly) instead of only the most recently created one.

## 1.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion content/docs/expo/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues).

<SdkLatestVersion version="v1.1.4" repoUrl="https://github.com/superwall/expo-superwall" />
<SdkLatestVersion version="v1.1.5" repoUrl="https://github.com/superwall/expo-superwall" />
2 changes: 1 addition & 1 deletion content/docs/expo/sdk-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues).

<SdkLatestVersion version="v1.1.4" repoUrl="https://github.com/superwall/expo-superwall" />
<SdkLatestVersion version="v1.1.5" repoUrl="https://github.com/superwall/expo-superwall" />
Loading