Monorepo managed by pnpm + turbo: apps/web (Next.js 15 App Router, Tailwind UI in src/components and components/ui), apps/api (Cloudflare Workers + Hono), apps/docs (Mintlify site).
SDKs: packages/sdk-ts TypeScript client (src, generated src/gen, builds to dist); packages/sdk-py Python client (src, tests in packages/sdk-py/tests).
Shared tooling lives in scripts/, release metadata in .changeset/; canonical data/benchmarks sit under packages/data/catalog/src/data with Jest cases nearby.
Build, Test, and Development Commands
Install: pnpm install (Node >=20).
Dev servers: pnpm dev to run everything, or scope with pnpm --filter @ai-stats/web dev, pnpm --filter @ai-stats/gateway-api dev, pnpm --filter @ai-stats/docs dev.
can we review open PRs right now and see which ones are mergable?
Assistant
I’m going to pull the current open PR list from GitHub and check each PR’s mergeability/status checks so we can identify what can be merged now. I’ll start by querying PR metadata via gh.
Assistant
I found 5 open PRs. Next I’m pulling the explicit mergeable state plus a compact check summary per PR so we can separate “ready now” from “blocked by policy/checks/conflicts.”
Assistant
Checks are now clear: two PRs have failing CI and one has conflicts; I’m confirming the exact blocker on the two “all-green but blocked” PRs (likely required review) before I summarize mergeable status.
Assistant
gh pr view is failing due a CLI GraphQL field deprecation, so I’m switching to a direct GraphQL query to read branch protection requirements and confirm what’s blocking each PR.
Assistant
I’ve confirmed mergeability/check states; now I’m checking the repository’s branch/ruleset requirements so we can explain why the “green but blocked” PRs still aren’t mergeable.
Assistant
I’m finishing one clean status table that includes unresolved thread counts (the previous quick formatter dropped a couple values). Then I’ll give you a direct merge/no-merge list.
Assistant
As of April 9, 2026, there are 5 open PRs and none are mergeable right now (all are either BLOCKED or DIRTY).
You’re seeing an unusual block pattern, so I’m checking who opened those unresolved threads and where they are, to explain exactly why GitHub is blocking merges despite green CI on some PRs.
Assistant
GitHub rules are blocking merges, not a random CLI bug.
main has a ruleset requiring all PR review threads to be resolved. Those open threads are from chatgpt-codex-connector, and even outdated ones are still unresolved, so PRs stay BLOCKED.
Current blockers:
#228: 1 unresolved thread (apps/web/package.json)
#244: 2 unresolved threads
#247: 4 unresolved threads
#233: 1 unresolved thread and failing CI checks (Apps api, Apps docs, Devtools build, Build & test SDK packages)
#240: merge conflicts (DIRTY/CONFLICTING)
So the pattern is:
Green checks + unresolved thread(s) => blocked
Failing checks => blocked
Conflicts => not mergeable
If you want, I can next produce a PR-by-PR unblock checklist (exact thread links + exact failing job links).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Jest for apps/web with *.test.ts(x) or nearby __tests__; cover new logic and data validations with deterministic fixtures.
Python SDK tests rely on pytest and httpx.MockTransport; keep async cases isolated.
TS SDK lacks full coverage—add targeted unit or smoke tests when changing behavior.
Commit & Pull Request Guidelines
Commit subjects in history are short, descriptive, and scoped. Add a .changeset entry when shipping SDK/API/web changes that should version.
Never commit directly to main. Always work on a branch, open a PR, and merge via the PR flow.
When preparing PRs, always use a branch name that has not already been merged. Do not reuse previously merged branch names.
Never enable PR auto-merge (for example gh pr merge --auto) unless the user has explicitly approved auto-merge for that PR.
PRs: describe intent and scope, list commands run (lint/typecheck/build/tests/validations), link issues, and include screenshots or notes for UI changes.
When creating/editing PR descriptions via CLI/API, use real multiline Markdown (or a body file). Do not submit escaped newline text like \n in the final PR body.
Security & Configuration Tips
Never commit secrets; use .env.local per app. Required runtime keys are called out in turbo.jsonglobalEnv and app READMEs.
After OpenAPI edits, regenerate clients with pnpm openapi:gen so src/gen stays in sync before release.
Skills
A skill is a set of local instructions to follow that is stored in a SKILL.md file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.
Available skills
ai-stats-gateway: Implement and migrate AI integrations to AI Stats Gateway via OpenAI-compatible REST, the official TypeScript SDK (@ai-stats/sdk), Python SDK (ai-stats-py-sdk), and Vercel AI SDK provider (@ai-stats/ai-sdk-provider). Use when wiring new API calls, replacing OpenAI/Anthropic/OpenRouter/Vercel Gateway base URLs, adding app attribution headers, selecting model IDs, or troubleshooting auth/routing/response-shape issues. (file: Z:/ai-stats-public/.agents/skills/ai-stats-gateway/SKILL.md)
openrouter-to-ai-stats-migration: End-to-end migration guide for moving an existing OpenRouter integration to AI Stats Gateway. Use when repositories contain openrouter.ai endpoints, sk-or-v1 keys, OPENROUTER_API_KEY env vars, provider-prefixed model IDs, or OpenRouter-specific headers and the user wants a full migration with implementation, validation, and safe rollout. (file: Z:/ai-stats-public/.agents/skills/openrouter-to-ai-stats-migration/SKILL.md)
seo-audit: When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," or "SEO health check." For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. (file: Z:/ai-stats-public/.agents/skills/seo-audit/SKILL.md)
supabase-postgres-best-practices: Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations. (file: Z:/ai-stats-public/.agents/skills/supabase-postgres-best-practices/SKILL.md)
vercel-react-best-practices: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements. (file: Z:/ai-stats-public/.agents/skills/vercel-react-best-practices/SKILL.md)
yeet: Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (gh). (file: Z:/ai-stats-public/.agents/skills/yeet/SKILL.md)
codex-observatory: Use this skill when the user asks for Codex usage stats, token trends, model breakdowns, streaks, or a local dashboard. Prefer codex stats when the launcher patch is installed, otherwise run codex-observatory. (file: C:/Users/danie/.codex/skills/codex-observatory/SKILL.md)
find-skills: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. (file: C:/Users/danie/.agents/skills/find-skills/SKILL.md)
frontend-design: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics. (file: C:/Users/danie/.agents/skills/frontend-design/SKILL.md)
frontend-design: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics. (file: C:/Users/danie/.codex/skills/frontend-design/SKILL.md)
frontend-skill: Use when the task asks for a visually strong landing page, website, app, prototype, demo, or game UI. This skill enforces restrained composition, image-led hierarchy, cohesive content structure, and tasteful motion while avoiding generic cards, weak branding, and UI clutter. (file: C:/Users/danie/.codex/skills/frontend-skill/SKILL.md)
linear: Manage issues, projects & team workflows in Linear. Use when the user wants to read, create or updates tickets in Linear. (file: C:/Users/danie/.codex/skills/linear/SKILL.md)
playwright: Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script. (file: C:/Users/danie/.codex/skills/playwright/SKILL.md)
screenshot: Use when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel region), or when tool-specific capture capabilities are unavailable and an OS-level capture is needed. (file: C:/Users/danie/.codex/skills/screenshot/SKILL.md)
security-best-practices: Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks. (file: C:/Users/danie/.codex/skills/security-best-practices/SKILL.md)
security-ownership-map: Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization. Trigger only when the user explicitly wants a security-oriented ownership or bus-factor analysis grounded in git history (for example: orphaned sensitive code, security maintainers, CODEOWNERS reality checks for risk, sensitive hotspots, or ownership clusters). Do not trigger for general maintainer lists or non-security ownership questions. (file: C:/Users/danie/.codex/skills/security-ownership-map/SKILL.md)
security-threat-model: Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppSec threat modeling. Do not trigger for general architecture summaries, code review, or non-security design work. (file: C:/Users/danie/.codex/skills/security-threat-model/SKILL.md)
skill-creator: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations. (file: C:/Users/danie/.codex/skills/.system/skill-creator/SKILL.md)
skill-installer: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). (file: C:/Users/danie/.codex/skills/.system/skill-installer/SKILL.md)
How to use skills
Discovery: The list above is the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.
Trigger rules: If the user names a skill (with $SkillName or plain text) OR the task clearly matches a skill's description shown above, you must use that skill for that turn. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.
Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.
How to use a skill (progressive disclosure):
After deciding to use a skill, open its SKILL.md. Read only enough to follow the workflow.
When SKILL.md references relative paths (e.g., scripts/foo.py), resolve them relative to the skill directory listed above first, and only consider other paths if needed.
If SKILL.md points to extra folders such as references/, load only the specific files needed for the request; don't bulk-load everything.
If scripts/ exist, prefer running or patching them instead of retyping large code blocks.
If assets/ or templates exist, reuse them instead of recreating from scratch.
Coordination and sequencing:
If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.
Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.
Context hygiene:
Keep context small: summarize long sections instead of pasting them; only load extra files when needed.
Avoid deep reference-chasing: prefer opening only files directly linked from SKILL.md unless you're blocked.
When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.
Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.
AGENTS.md instructions for Z:\ai-stats-public
Project Structure & Module Organization
Monorepo managed by pnpm + turbo: apps/web (Next.js 15 App Router, Tailwind UI in src/components and components/ui), apps/api (Cloudflare Workers + Hono), apps/docs (Mintlify site).
SDKs: packages/sdk-ts TypeScript client (src, generated src/gen, builds to dist); packages/sdk-py Python client (src, tests in packages/sdk-py/tests).
Shared tooling lives in scripts/, release metadata in .changeset/; canonical data/benchmarks sit under packages/data/catalog/src/data with Jest cases nearby.
Build, Test, and Development Commands
Install: pnpm install (Node >=20).
Dev servers: pnpm dev to run everything, or scope with pnpm --filter @ai-stats/web dev, pnpm --filter @ai-stats/gateway-api dev, pnpm --filter @ai-stats/docs dev.
Data/doc checks: pnpm validate:data, pnpm validate:pricing, pnpm validate:gateway; docs via pnpm docs:links then pnpm docs:build.
Tests: pnpm --filter @ai-stats/web test; Python SDK via pnpm test:sdk-py (python -m pytest packages/sdk-py/tests); TS SDK smoke check pnpm --filter @ai-stats/ts-sdk test:smoke (full pnpm test runs SDK placeholders plus pytest).
Safety Notes
Avoid bulk repo-wide search/replace or scripted mass edits; use targeted, file-scoped changes only.
Coding Style & Naming Conventions
TypeScript-first (ES modules, absolute imports @/... in the web app); Python for the SDK. Prefer named exports for shared utilities.
Components use PascalCase; hooks useX; helpers/files camelCase. Keep shared UI pieces in apps/web/src/components before adding new primitives.
Styling via Tailwind; keep globals lean. Follow lint output for spacing/quotes since no repo-wide formatter is enforced.
Testing Guidelines
Jest for apps/web with *.test.ts(x) or nearby __tests__; cover new logic and data validations with deterministic fixtures.
Python SDK tests rely on pytest and httpx.MockTransport; keep async cases isolated.
TS SDK lacks full coverage—add targeted unit or smoke tests when changing behavior.
Commit & Pull Request Guidelines
Commit subjects in history are short, descriptive, and scoped. Add a .changeset entry when shipping SDK/API/web changes that should version.
Never commit directly to main. Always work on a branch, open a PR, and merge via the PR flow.
When preparing PRs, always use a branch name that has not already been merged. Do not reuse previously merged branch names.
Never enable PR auto-merge (for example gh pr merge --auto) unless the user has explicitly approved auto-merge for that PR.
PRs: describe intent and scope, list commands run (lint/typecheck/build/tests/validations), link issues, and include screenshots or notes for UI changes.
When creating/editing PR descriptions via CLI/API, use real multiline Markdown (or a body file). Do not submit escaped newline text like \n in the final PR body.
Security & Configuration Tips
Never commit secrets; use .env.local per app. Required runtime keys are called out in turbo.jsonglobalEnv and app READMEs.
After OpenAPI edits, regenerate clients with pnpm openapi:gen so src/gen stays in sync before release.
Skills
A skill is a set of local instructions to follow that is stored in a SKILL.md file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.
Available skills
ai-stats-gateway: Implement and migrate AI integrations to AI Stats Gateway via OpenAI-compatible REST, the official TypeScript SDK (@ai-stats/sdk), Python SDK (ai-stats-py-sdk), and Vercel AI SDK provider (@ai-stats/ai-sdk-provider). Use when wiring new API calls, replacing OpenAI/Anthropic/OpenRouter/Vercel Gateway base URLs, adding app attribution headers, selecting model IDs, or troubleshooting auth/routing/response-shape issues. (file: Z:/ai-stats-public/.agents/skills/ai-stats-gateway/SKILL.md)
openrouter-to-ai-stats-migration: End-to-end migration guide for moving an existing OpenRouter integration to AI Stats Gateway. Use when repositories contain openrouter.ai endpoints, sk-or-v1 keys, OPENROUTER_API_KEY env vars, provider-prefixed model IDs, or OpenRouter-specific headers and the user wants a full migration with implementation, validation, and safe rollout. (file: Z:/ai-stats-public/.agents/skills/openrouter-to-ai-stats-migration/SKILL.md)
seo-audit: When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," or "SEO health check." For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. (file: Z:/ai-stats-public/.agents/skills/seo-audit/SKILL.md)
supabase-postgres-best-practices: Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations. (file: Z:/ai-stats-public/.agents/skills/supabase-postgres-best-practices/SKILL.md)
vercel-react-best-practices: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements. (file: Z:/ai-stats-public/.agents/skills/vercel-react-best-practices/SKILL.md)
yeet: Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (gh). (file: Z:/ai-stats-public/.agents/skills/yeet/SKILL.md)
codex-observatory: Use this skill when the user asks for Codex usage stats, token trends, model breakdowns, streaks, or a local dashboard. Prefer codex stats when the launcher patch is installed, otherwise run codex-observatory. (file: C:/Users/danie/.codex/skills/codex-observatory/SKILL.md)
find-skills: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. (file: C:/Users/danie/.agents/skills/find-skills/SKILL.md)
How to use skills
Discovery: The list above is the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.
Trigger rules: If the user names a skill (with $SkillName or plain text) OR the task clearly matches a skill's description shown above, you must use that skill for that turn. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.
Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.
How to use a skill (progressive disclosure):
After deciding to use a skill, open its SKILL.md. Read only enough to follow the workflow.
When SKILL.md references relative paths (e.g., scripts/foo.py), resolve them relative to the skill directory listed above first, and only consider other paths if needed.
If SKILL.md points to extra folders such as references/, load only the specific files needed for the request; don't bulk-load everything.
If scripts/ exist, prefer running or patching them instead of retyping large code blocks.
If assets/ or templates exist, reuse them instead of recreating from scratch.
Coordination and sequencing:
If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.
Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.
Context hygiene:
Keep context small: summarize long sections instead of pasting them; only load extra files when needed.
Avoid deep reference-chasing: prefer opening only files directly linked from SKILL.md unless you're blocked.
When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.
Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.
feat(data): refresh catalog benchmarks and pricing
frontend-design: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics. (file: C:/Users/danie/.agents/skills/frontend-design/SKILL.md)
frontend-design: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics. (file: C:/Users/danie/.codex/skills/frontend-design/SKILL.md)
frontend-skill: Use when the task asks for a visually strong landing page, website, app, prototype, demo, or game UI. This skill enforces restrained composition, image-led hierarchy, cohesive content structure, and tasteful motion while avoiding generic cards, weak branding, and UI clutter. (file: C:/Users/danie/.codex/skills/frontend-skill/SKILL.md)
linear: Manage issues, projects & team workflows in Linear. Use when the user wants to read, create or updates tickets in Linear. (file: C:/Users/danie/.codex/skills/linear/SKILL.md)
playwright: Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script. (file: C:/Users/danie/.codex/skills/playwright/SKILL.md)
screenshot: Use when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel region), or when tool-specific capture capabilities are unavailable and an OS-level capture is needed. (file: C:/Users/danie/.codex/skills/screenshot/SKILL.md)
security-best-practices: Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks. (file: C:/Users/danie/.codex/skills/security-best-practices/SKILL.md)
security-ownership-map: Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization. Trigger only when the user explicitly wants a security-oriented ownership or bus-factor analysis grounded in git history (for example: orphaned sensitive code, security maintainers, CODEOWNERS reality checks for risk, sensitive hotspots, or ownership clusters). Do not trigger for general maintainer lists or non-security ownership questions. (file: C:/Users/danie/.codex/skills/security-ownership-map/SKILL.md)
security-threat-model: Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppSec threat modeling. Do not trigger for general architecture summaries, code review, or non-security design work. (file: C:/Users/danie/.codex/skills/security-threat-model/SKILL.md)
skill-creator: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations. (file: C:/Users/danie/.codex/skills/.system/skill-creator/SKILL.md)
skill-installer: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). (file: C:/Users/danie/.codex/skills/.system/skill-installer/SKILL.md)