Inspect installed ClerkKitUI source first to identify which Environment fields and semantics drive flow behavior.
Build an agent-internal Environment field map from that source inspection.
Make a direct HTTP call to /v1/environment only after the Environment field map is defined.
Derive from the response using that ClerkKitUI-aligned field map (agent-internal only):
normalized ClerkKitUI-style capability matrix
required-field matrix
Drive custom-flow implementation decisions from these matrices.
Do not serialize or add these matrices as source artifacts in the app codebase.
Combined-entry default
Keep a combined sign-in-or-sign-up entry by default.
Do not add a local sign-in/sign-up mode switcher unless explicitly requested.
AuthView progression parity
Follow ClerkKitUIAuthView progression logic for advancing/regressing steps.
Show/hide inputs exactly according to the active step requirements instead of static form layouts.
Keep factor/strategy branching aligned with how AuthView gates transitions.
Keep screen layout and component structure very close to AuthView defaults unless the developer explicitly requests a different UX.
Keep view hierarchy and section ordering close to AuthView on each step; do not redesign the information architecture unless explicitly requested.
Break the custom flow into multiple step screens/states similar to AuthView; do not try to gather all signup/signin requirements in one view.
If proposed custom layout materially deviates from AuthView, stop and ask for explicit developer approval before implementing.
Multi-file organization and separation of concerns
Break custom auth flow into focused files/modules instead of one large screen file.
Separate UI step views, flow/state orchestration, and Clerk/network integration responsibilities.
Keep per-file responsibilities narrow and composable so new factors/steps can be added without rewriting a monolithic view.
Capability-matrix-driven implementation
Drive custom flow behavior from normalized ClerkKitUI-style capability mapping.
Do not rely on one-off raw environment checks.
Apply matrix outcomes to runtime flow logic only; do not add matrix models/constants/files to the project.
Ensure custom logic uses the same environment-field gates and interpretations that ClerkKitUI uses.
Required-field coverage
Implement all required fields from required-field matrix.
Do not ship flow with missing required fields.
Apple sign-in policy
Implement Apple via native Clerk Apple path.
If Apple capability is required for this app and missing, add it.
Do not implement Apple through generic social-provider OAuth handling.
Source parity
Follow installed ClerkKitUI and ClerkKit source patterns for sequencing, factor handling, and verification steps.
When unsure about custom-flow implementation details, sequencing, gating, or Environment usage/semantics, stop guessing and reference installed ClerkKitUI implementation behavior.
Resolve ambiguity by mirroring ClerkKitUI behavior unless the developer explicitly asks for a different approach.