Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .claude/commands/audit-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ Compare current implementation against latest platform APIs:

**Internal Rules Compliance:**

- [ ] Canonical KISS/SSOT rules in `03-coding-style.md` pass

packages/apple (Swift):

- [ ] iOS-specific functions end with `IOS` suffix
Expand Down Expand Up @@ -192,7 +194,8 @@ After identifying issues:

1. Read the relevant knowledge file for the rule
2. Read the violating code file
3. Fix the code to comply with the rule
3. Fix the code to comply with the rule, simplifying or consolidating before
adding another layer
4. For missing features: add to roadmap or implement

### 7. Update Documentation
Expand Down
9 changes: 6 additions & 3 deletions .claude/commands/review-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Based on changed files, run these checks BEFORE committing:

When reviewing, check these project-specific rules:

- **KISS/SSOT**: Enforce the canonical release rules in
`knowledge/internal/03-coding-style.md`
- **iOS functions**: Must end with `IOS` suffix (e.g., `syncIOS`)
- **Android functions in packages/google**: NO `Android` suffix (it's Android-only)
- **Generated files**: Do NOT edit `packages/apple/Sources/Models/Types.swift` or `packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt`
Expand Down Expand Up @@ -104,9 +106,10 @@ When fallback is required:
acceptance criteria, changed-path conventions, and existing commit/push
authority. Explicitly request one pass so `review-pr` remains the only polling
owner.
3. Do not let the fallback round re-enter `review-pr`, request reviewers, or
schedule its own five-minute loop. It may inspect current review/CI evidence,
but this workflow owns thread handling and polling.
3. Do not let the fallback round re-enter `review-pr`, request reviewers, handle
trigger comments, invoke this fallback again, or schedule any recurring loop.
It may inspect current review/CI evidence, but this workflow owns thread
handling and polling.
4. Fix and verify every validated finding using the normal response rules. If a
fix changes the head, request CodeRabbit again after the fix batch and run
fallback again only if it remains unavailable for the new head.
Expand Down
20 changes: 10 additions & 10 deletions .claude/skills/review-self/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
name: review-self
description: Independently review and improve the agent's current implementation, working-tree changes, or pull request; fix actionable in-scope gaps; rerun relevant verification; and recheck at five-minute intervals until the work is stable or genuinely blocked. Use when the user says "review-self", asks Claude to review its own changes, requests a self-review loop, or wants current work monitored for new issues after implementation.
description: Independently review and simplify the agent's current implementation, working-tree changes, or pull request; enforce KISS and repository SSOT rules, fix actionable in-scope gaps, rerun relevant verification, and recheck at the user-requested interval (five minutes by default) until stable or genuinely blocked. Use when the user says "review-self", asks Claude to review its own changes, requests a self-review loop, or wants current work monitored for new issues after implementation.
---

# Review Self (Claude Code)

The canonical loop definition lives in `.codex/skills/review-self/SKILL.md`.
Read it and follow every section — authority and scope preservation, target
establishment, the review round, related OpenIAP workflows, the five-minute
recheck contract, safe stopping conditions, and per-round communication are
agent-agnostic and apply as written.
establishment, the KISS/SSOT review round, related OpenIAP workflows, the
requested-interval recheck contract, safe stopping conditions, and per-round
communication are agent-agnostic and apply as written.

## Claude Code Notes

- Where the canonical file routes through `$openiap-workflows`, read the
matching `.claude/commands/*.md` file directly (or use the
`.claude/skills/openiap-workflows` skill).
- For the five-minute recheck, use Claude's real wake-up mechanism for the
current surface (for example a scheduled reminder / wake-up tool in Cowork
or the Agent SDK). If no such mechanism is available in the current session,
complete the current round and report that automatic re-entry could not be
scheduled — never emulate the loop with `sleep 300`, `while true`, or an
abandoned background process.
- For interval rechecks, use Claude's real wake-up mechanism for the current
surface (for example a scheduled reminder / wake-up tool in Cowork or the
Agent SDK). Honor the user's interval, defaulting to five minutes. If no such
mechanism is available in the current session, complete the current round and
report that automatic re-entry could not be scheduled — never emulate the
loop with `sleep`, `while true`, or an abandoned background process.
- Use read-only subagents (Task/Agent tool with an Explore-style agent) for
independent review lenses on large or cross-cutting diffs.
2 changes: 2 additions & 0 deletions .codex/skills/openiap-workflows/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ appropriate labels before merging.

## Non-Negotiables

- Apply the canonical KISS/SSOT release criteria in
`knowledge/internal/03-coding-style.md`.
- Before any public GitHub write, apply the English-only communication guard in
`knowledge/internal/06-git-deployment.md`. Private maintainer conversation
language must never leak into issue, PR, review, release, or commit prose.
Expand Down
48 changes: 28 additions & 20 deletions .codex/skills/review-self/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: review-self
description: Independently review and improve Codex's current implementation, working-tree changes, or pull request; fix actionable in-scope gaps; rerun relevant verification; and recheck at five-minute intervals until the work is stable or genuinely blocked. Use when the user says "review-self", asks Codex to review its own changes, requests a self-review loop, or wants current work monitored for new issues after implementation.
description: Independently review and simplify Codex's current implementation, working-tree changes, or pull request; enforce KISS and repository SSOT rules, fix actionable in-scope gaps, rerun relevant verification, and recheck at the user-requested interval (five minutes by default) until stable or genuinely blocked. Use when the user says "review-self", asks Codex to review its own changes, requests a self-review loop, or wants current work monitored for new issues after implementation.
---

# Review Self

Review the current work immediately, fix validated gaps, and use five-minute
confirmation rounds until the result is stable.
Review the current work immediately, fix validated gaps, and use confirmation
rounds at the user's requested interval, or five minutes by default, until the
result is stable.

## Preserve Authority And Scope

Expand Down Expand Up @@ -51,15 +52,18 @@ confirmation rounds until the result is stable.
- public contracts, naming, compatibility, generated-file rules, and
cross-package or SDK parity;
- missing or weak tests, documentation, examples, migrations, and operational
safeguards required by the change.
safeguards required by the change;
- the canonical KISS/SSOT release rules in
`knowledge/internal/03-coding-style.md`.
4. Use independent read-only subagents for separate review lenses when the diff
is large or cross-cutting. Give them the raw target and request, not suspected
findings or an expected answer.
5. Validate every finding against the current code and applicable instructions.
Reject pure taste, cosmetic churn, duplicate findings, and unrelated
nice-to-have work.
6. Fix all validated in-scope findings in one coherent batch. Regenerate generated
files only through their documented generator and preserve unrelated edits.
6. Fix all validated in-scope findings in one coherent batch under those
canonical KISS/SSOT rules. Regenerate generated files only through their
documented generator and preserve unrelated edits.
7. Re-read the resulting diff, then run the path-specific lint, typecheck, tests,
builds, audits, and `git diff --check` required by the repository. Do not rerun
an expensive unchanged check fingerprint unless new state can affect it.
Expand Down Expand Up @@ -105,7 +109,7 @@ the current PR head:
requirements, and acceptance criteria. Preserve the commit/push and external
write authority supplied by the calling workflow.
- Do not re-enter `review-pr`, request external reviewers, handle its trigger
comments, invoke this fallback again, or schedule this skill's five-minute
comments, invoke this fallback again, or schedule this skill's recurring
Comment thread
hyochan marked this conversation as resolved.
loop. `review-pr` remains the sole thread-handling and polling owner.
- Return the reviewed head and working-tree fingerprints, validated findings and
fixes, checks run, and a clean or blocked result. The caller may cache a clean
Expand All @@ -114,38 +118,42 @@ the current PR head:
This single-round override prevents nested polling loops while still replacing
the missing external review coverage with the full self-review procedure.

## Recheck Every Five Minutes
## Recheck At The Requested Interval

- Run the first round immediately; never wait before the initial review.
- If the user explicitly requests one pass, finish after that round and do not
schedule a confirmation.
- Use the product's real recurring-monitor or wake-up mechanism to schedule the
next round for 300 seconds after the current round. Make the scheduled prompt
explicitly invoke `$review-self`; re-enter this skill rather than trying to
perform semantic review inside a shell loop.
next round after the user's explicit interval, or 300 seconds by default.
Make the scheduled prompt explicitly invoke `$review-self`; re-enter this
skill rather than trying to perform semantic review inside a shell loop.
- Keep at most one outstanding wake-up for the same target. Cancel or supersede
stale duplicate wake-ups when the mechanism supports it.
- Carry a compact state capsule in the scheduled prompt or monitor state. Include
the original goal and acceptance criteria, target and base, head/tree and
working-tree fingerprints, seen feedback and check IDs, poll count, clean
count, start time, finding fingerprints with fix attempts, and the existing
commit/push authority.
count, start time, the requested interval, the active interval, the current
pending-state fingerprint and first-seen time, finding fingerprints with fix
attempts, and the existing commit/push authority.
- Keep loop state out of tracked repository files. Revalidate it against disk and
remote state on every wake-up.
- Validate the requested and active intervals on every wake-up. Preserve an
explicit user interval unless the user changes it; otherwise use the default.
- Increment the clean count only after a complete round has no actionable
findings, all requested verification passes, required checks are terminal and
successful or explicitly allowed to skip, no actionable feedback remains, and
the final diff has been reread. Reset it when any material state or finding
changes, then allow the fully clean post-change result to start a new count.
- Finish successfully after two consecutive clean snapshots separated by a
five-minute interval. Continue without a fixed round cap while new findings or
- Finish successfully after two consecutive clean snapshots separated by the
active interval. Continue without a fixed round cap while new findings or
state changes lead to meaningful progress.
- Treat pending CI or review automation as neither clean nor failed. Poll it every
five minutes without repeating expensive local checks on an unchanged
fingerprint.
- Treat pending CI or review automation as neither clean nor failed. Poll it at
the active interval without repeating expensive local checks on an unchanged
fingerprint. Reset its first-seen time whenever the pending-state fingerprint
changes.
- If no recurring mechanism is available, complete the current round and report
that automatic re-entry could not be scheduled. Do not emulate it with
`sleep 300`, `while true`, `nohup`, or an abandoned background process, and
`sleep`, `while true`, `nohup`, or an abandoned background process, and
never claim a future pass was scheduled unless the mechanism actually accepted
it.

Expand All @@ -161,7 +169,7 @@ Stop the loop and report the exact state when any of these conditions holds:
- the same root finding remains after two fix attempts;
- the same authentication, rate-limit, tool, or environment failure blocks three
consecutive rounds;
- only unchanged pending external state remains after 12 polls (about one hour).
- only unchanged pending external state remains for at least one hour.

Do not call a blocked or interrupted result clean. Do not stop merely because one
poll is a no-op while asynchronous state is still pending.
Expand Down
4 changes: 2 additions & 2 deletions .codex/skills/review-self/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface:
display_name: "Review Self"
short_description: "Review current work in five-minute loops"
default_prompt: "Use $review-self to review the current work, fix actionable findings, and recheck it every five minutes until stable."
short_description: "Review and simplify current work until stable"
default_prompt: "Use $review-self to review and simplify the current work under KISS and SSOT rules, fix actionable findings, and recheck at the requested interval until stable."
9 changes: 8 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ Before posting or editing issues, pull requests, reviews, discussions, commits,
release notes, or GitHub Releases, follow the mandatory language guard in
[`knowledge/internal/06-git-deployment.md`](knowledge/internal/06-git-deployment.md#public-github-communication-language).

### KISS and SSOT

KISS and SSOT are mandatory release criteria. The canonical rules live in
[`knowledge/internal/03-coding-style.md`](knowledge/internal/03-coding-style.md#0-kiss-and-ssot-are-release-requirements).
Apply that section before implementation and during every review.

### Platform Function Naming

- **iOS functions**: Must end with `IOS` suffix (e.g., `syncIOS`, `getReceiptDataIOS`)
Expand Down Expand Up @@ -255,7 +261,8 @@ keep its wording agent-neutral.
1. Reviews the complete current diff, including staged, unstaged, and untracked
work, against the original request and repository conventions
2. Fixes validated in-scope findings and runs path-specific verification
3. Rechecks through a real recurring wake-up after five minutes
3. Rechecks through a real recurring wake-up at the user's requested interval,
defaulting to five minutes
4. Finishes after two consecutive clean snapshots, or reports the exact blocker

`review-self` does not grant commit, push, PR, merge, deploy, or release authority
Expand Down
24 changes: 23 additions & 1 deletion knowledge/_claude-context/context.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenIAP Project Context

> **Auto-generated for Claude Code**
> Last updated: 2026-08-09T13:54:08.141Z
> Last updated: 2026-08-09T21:46:58.647Z
>
> Usage: `claude --context knowledge/_claude-context/context.md`

Expand Down Expand Up @@ -541,6 +541,28 @@ isBillingProgramAvailableAndroid(program: BillingProgramAndroid!): BillingProgra

## General Principles

### 0. KISS and SSOT Are Release Requirements

Prefer the simplest correct design that satisfies verified requirements. KISS
does not justify skipping error handling, lifecycle safety, tests, or public
contracts; it requires meeting them with the fewest independent concepts.

- Give each stateful resource one clear owner and one terminal cleanup path.
Pass or reference that owner instead of creating fallback stores, scopes,
caches, or managers at multiple layers.
- Keep each fact in one canonical source. Generate or link mirrors and adapters;
never maintain equivalent rules, versions, schemas, or lifecycle decisions in
parallel files.
- Reuse an existing abstraction when it already owns the invariant. Add a new
helper only for real reuse, a necessary platform boundary, or isolated testing;
keep single-use helpers local.
- Do not add speculative configuration, indirection, background work, or state.
Every new layer must name the invariant it protects, its owner, its cleanup,
and the test that proves it is needed.
- When fixing a bug, first look for state or code that can be deleted or
consolidated. Prefer one understandable path over several defensive fallback
paths.

### 1. Explicit Over Implicit

Always be explicit about types and intentions:
Expand Down
22 changes: 22 additions & 0 deletions knowledge/internal/03-coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@

## General Principles

### 0. KISS and SSOT Are Release Requirements

Prefer the simplest correct design that satisfies verified requirements. KISS
does not justify skipping error handling, lifecycle safety, tests, or public
contracts; it requires meeting them with the fewest independent concepts.

- Give each stateful resource one clear owner and one terminal cleanup path.
Pass or reference that owner instead of creating fallback stores, scopes,
caches, or managers at multiple layers.
- Keep each fact in one canonical source. Generate or link mirrors and adapters;
never maintain equivalent rules, versions, schemas, or lifecycle decisions in
parallel files.
- Reuse an existing abstraction when it already owns the invariant. Add a new
helper only for real reuse, a necessary platform boundary, or isolated testing;
keep single-use helpers local.
- Do not add speculative configuration, indirection, background work, or state.
Every new layer must name the invariant it protects, its owner, its cleanup,
and the test that proves it is needed.
- When fixing a bug, first look for state or code that can be deleted or
consolidated. Prefer one understandable path over several defensive fallback
paths.

### 1. Explicit Over Implicit

Always be explicit about types and intentions:
Expand Down
7 changes: 6 additions & 1 deletion libraries/expo-iap/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export interface AdvancedCommerceInfoIOS {
estimatedTax?: (string | null);
/** The items purchased as part of this transaction */
items: AdvancedCommerceItemIOS[];
/** Subscription period for this transaction */
/**
* Subscription period for this transaction.
* Available in OpenIAP Spec 3.1.0 / openiap-apple 3.1.0
* (requires iOS 18.4+, macOS 15.4+, tvOS 18.4+, watchOS 11.4+,
* or visionOS 2.4+).
*/
period?: (SubscriptionPeriodValueIOS | null);
/** Request reference identifier for tracking */
requestReferenceId?: (string | null);
Expand Down
5 changes: 4 additions & 1 deletion libraries/flutter_inapp_purchase/lib/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,10 @@ class AdvancedCommerceInfoIOS {
final String? estimatedTax;
/// The items purchased as part of this transaction
final List<AdvancedCommerceItemIOS> items;
/// Subscription period for this transaction
/// Subscription period for this transaction.
/// Available in OpenIAP Spec 3.1.0 / openiap-apple 3.1.0
/// (requires iOS 18.4+, macOS 15.4+, tvOS 18.4+, watchOS 11.4+,
/// or visionOS 2.4+).
final SubscriptionPeriodValueIOS? period;
/// Request reference identifier for tracking
final String? requestReferenceId;
Expand Down
2 changes: 1 addition & 1 deletion libraries/godot-iap/addons/godot-iap/types.gd
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class ActiveSubscription:
class AdvancedCommerceInfoIOS:
## The items purchased as part of this transaction
var items: Array[AdvancedCommerceItemIOS] = []
## Subscription period for this transaction
## Subscription period for this transaction. Available in OpenIAP Spec 3.1.0 / openiap-apple 3.1.0 (requires iOS 18.4+, macOS 15.4+, tvOS 18.4+, watchOS 11.4+, or visionOS 2.4+).
var period: SubscriptionPeriodValueIOS
## Request reference identifier for tracking
var request_reference_id: Variant = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,10 @@ public data class AdvancedCommerceInfoIOS(
*/
val items: List<AdvancedCommerceItemIOS>,
/**
* Subscription period for this transaction
* Subscription period for this transaction.
* Available in OpenIAP Spec 3.1.0 / openiap-apple 3.1.0
* (requires iOS 18.4+, macOS 15.4+, tvOS 18.4+, watchOS 11.4+,
* or visionOS 2.4+).
*/
val period: SubscriptionPeriodValueIOS? = null,
/**
Expand Down
Loading