{
  "markdown": "# SignalAF — Upsilon Measurement Engine + SigRank Proof Surface\n\n> **Upsilon** is the privacy-preserving measurement engine. **SigRank** is the\n> public leaderboard and proof surface at [signalaf.com](https://signalaf.com).\n> Run `npx sigrank` to calculate Yield from four token counts. _Never prompts or code._\n\n<div align=\"center\">\n\n<p><img src=\"./.github/assets/og-card-v2.png\" alt=\"SigRank SignalAF — AI operator evaluation and token cascade efficiency leaderboard\" width=\"800\"></p>\n\n**Upsilon measures. SigRank proves. MO§ES™ governs. SignalAF is the brand.**\n\nSigRank evaluates the human using the AI, not the AI model itself. Most platforms reward volume. SigRank SignalAF rewards structure.\n\n[![CI](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/codeql.yml)\n[![audit](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/dependency-audit.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/dependency-audit.yml)\n[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-025E8C?style=flat-square&logo=dependabot)](https://github.com/SunrisesIllNeverSee/sigrank-app/network/dependencies)\n[![coverage](https://img.shields.io/badge/coverage-c8-brightgreen.svg?style=flat-square)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/ci.yml)\n[![Lighthouse](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/lighthouse.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/lighthouse.yml)\n[![E2E](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/e2e.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/e2e.yml)\n[![live](https://img.shields.io/badge/live-signalaf.com-gold.svg?style=flat-square)](https://signalaf.com)\n[![npm](https://img.shields.io/npm/v/sigrank.svg?style=flat-square&color=gold&label=sigrank)](https://www.npmjs.com/package/sigrank)\n[![npm downloads](https://img.shields.io/npm/dm/sigrank.svg?style=flat-square&color=blue&label=npm%20downloads)](https://www.npmjs.com/package/sigrank)\n[![GitHub stars](https://img.shields.io/github/stars/SunrisesIllNeverSee/sigrank-app.svg?style=flat-square&color=yellow&label=%E2%98%85%20stars)](https://github.com/SunrisesIllNeverSee/sigrank-app/stargazers)\n[![deploy](https://img.shields.io/badge/deploy-Vercel-black.svg?style=flat-square)](https://vercel.com)\n[![Next.js](https://img.shields.io/badge/Next.js-15-black.svg?style=flat-square)](https://nextjs.org)\n[![React](https://img.shields.io/badge/React-19-blue.svg?style=flat-square)](https://react.dev)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg?style=flat-square)](https://www.typescriptlang.org)\n[![Supabase](https://img.shields.io/badge/db-Supabase-green.svg?style=flat-square)](https://supabase.com)\n[![Stripe](https://img.shields.io/badge/billing-Stripe-purple.svg?style=flat-square)](https://stripe.com)\n[![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](./LICENSE)\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/sigrank\"><img src=\"https://img.shields.io/badge/$%20npx%20sigrank-gold?style=for-the-badge&logo=npm&logoColor=white&labelColor=1a1a1a&color=daa520\" alt=\"npx sigrank\" /></a>\n  &nbsp;\n  <a href=\"https://github.com/SunrisesIllNeverSee/sigrank-app/stargazers\"><img src=\"https://img.shields.io/badge/★%20Star%20this%20repo-yellow?style=for-the-badge&logo=github&labelColor=1a1a1a\" alt=\"Star this repo\" /></a>\n</p>\n\n## Table of Contents\n\n- [What is SignalAF?](#what-is-signalaf)\n- [The SigRank SignalAF ecosystem](#the-sigrank-signalaf-ecosystem)\n- [Get ranked (you don't need this repo)](#get-ranked-you-dont-need-this-repo)\n- [How it works](#how-it-works)\n- [For developers](#for-developers)\n- [Stack](#stack)\n- [Quick Start](#quick-start)\n- [Scripts](#scripts)\n- [Project Map](#project-map)\n- [Data Model](#data-model)\n- [Environment](#environment)\n- [Supabase](#supabase)\n- [Scoring Invariants](#scoring-invariants)\n- [Development Notes](#development-notes)\n- [Related](#related)\n- [Community](#community)\n- [License](#license)\n\n|                                    The leaderboard                                    |                               Your operator profile                               |\n| :-----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |\n| [![SigRank SignalAF leaderboard](./.github/assets/board.png)](https://signalaf.com/board/all)  | [![SigRank SignalAF operator profile](./.github/assets/profile.png)](https://signalaf.com) |\n| Every operator ranked by **Υ Yield** — the architecture of the cascade, not raw spend |        Cascade layer, class, and fingerprint — all from four token counts         |\n\n---\n\n## What is SignalAF?\n\nSignalAF is the umbrella brand for Upsilon and SigRank. Upsilon is the AI operator measurement engine; SigRank is the public leaderboard. Upsilon measures token cascade efficiency, not AI models. It describes **token-processing patterns**: how much reusable signal\nthey create from each unit of input, not how many tokens they burn. The rank metric:\n\n```txt\nΥ = (cache_read × output) / input²\n```\n\nThe board is anonymous by default, claimable by operators, and built around one\nquestion: **is this session compounding signal, or just burning tokens?** Volume is\nnoise; yield is signal.\n\nThis repo is the **Next.js implementation behind [signalaf.com](https://signalaf.com)**;\nthe Upsilon measurement engine plus the SigRank public board, profiles, wiki,\naccount, billing, and ingest surfaces.\n\nThe compatibility record remains versioned as `sigrank/0.1-draft`; product naming\ndoes not silently rewrite installed packages, tool names, schemas, or stored records.\n\n## The SigRank SignalAF ecosystem\n\n| Repo | What it is | Install |\n|------|-----------|---------|\n| **[sigrank-app](https://github.com/SunrisesIllNeverSee/sigrank-app)** (this repo) | Upsilon's web implementation plus the SigRank leaderboard/proof surface. | [signalaf.com](https://signalaf.com) |\n| **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** | Upsilon's compatibility instrument — extracts four pillars, computes locally, and optionally submits to SigRank. | `npx sigrank` |\n| **[bestuser-router-mcp](https://github.com/SunrisesIllNeverSee/bestuser-router-mcp)** | The intent layer — routes \"who is the best AI user?\" queries to SigRank SignalAF's leaderboard. MCP server for AI assistants. | `npx bestuser-router-mcp` |\n| **[sigarena](https://github.com/SunrisesIllNeverSee/sigarena)** | The satellite — public LLM operator evals at sigeconomy.com. Read-only leaderboard, SEO/AEO surface. | [sigeconomy.com](https://sigeconomy.com) |\n| **[sigrank-vscode](https://github.com/SunrisesIllNeverSee/sigrank-vscode)** | The IDE extension — see your cascade metrics inline in VS Code. | `code --install-extension sigrank.sigrank` |\n| **[fundscore](https://github.com/SunrisesIllNeverSee/fundscore)** | The repo scorer — investor-readiness scoring for GitHub repos. CLI + MCP server. | `npx fundscore` |\n\n### Also in the MO§ES™ suite\n\n| Site | What it is |\n| ---- | ---------- |\n| **[SIGNOMY](https://signomy.xyz)** | Governed AI agent marketplace where ranked agents form teams, fill slots, run missions, and earn revenue under constitutional protocol. Agents are free. Operators pay. |\n| **[MO§ES](https://mos2es.com)** | The constitutional governance and methodology framework—the law governing Upsilon and other governed systems. |\n\n## Get ranked (you don't need this repo)\n\nSigRank SignalAF runs from your terminal. Or wire it as an MCP server for your AI agent:\n\n```bash\nnpx sigrank                 # see your cascade now (no install, no sign-in)\n```\n\nThe client reads your local AI session logs on-device, derives your cascade,\nand publishes to the board, **token-only, no transcript content.**\n\n```bash\nnpm install -g sigrank     # bundles ccusage + tokscale + tokendash — no separate installs\nsigrank enroll             # sign in: paste a connect code from signalaf.com → Settings\nsigrank submit             # publish your verified runs to the board\n```\n\nOr explore first, no sign-in:\n\n```bash\nsigrank                    # full tabbed TUI: dashboard · compare · board · watch\nnpx sigrank board --once   # print the live leaderboard once\nbunx sigrank board --once  # same, via Bun (faster startup if you have it)\n```\n\nCautious? `sigrank submit --dry-run` prints the exact signed payload (four token\ncounts and a signature) and sends nothing.\n\n```bash\n$ sigrank submit --dry-run\n📦 Payload (not sent):\n  input:          1,251,211\n  output:        11,296,121\n  cache_create:     128,196\n  cache_read:    2,555,179,769\n  Υ Yield:          18,436.98\n  class:            TRANSMITTER\n  signature:        ed25519:9f3a...\n```\n\nFull CLI + MCP docs: **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** ·\npackage: **[sigrank on npm](https://www.npmjs.com/package/sigrank)**.\n\n## How it works\n\n- **Four raw token pillars** — `input`, `output`, `cache_creation`, `cache_read` — are the\n  only inputs. No message content, ever.\n- The **cascade engine** derives Υ Yield, Leverage, Velocity, 10xDEV, SNR, and efficiency\n  from those four numbers. The server re-scores every submission authoritatively.\n- Operators are placed in **signal classes** (Transmitter, Architect, …) by their cascade\n  shape, and ranked globally by Υ.\n- **SIGNA RATE** is the class credential; **Υ Yield** is the rank metric.\n\nDeep dive: the in-app **[wiki](https://signalaf.com/wiki)**.\n\n---\n\n# For developers\n\nThe rest of this README is for working on the app itself.\n\n## Stack\n\n- **Framework:** Next.js 15 App Router, React 19, TypeScript strict\n- **UI:** Tailwind CSS, themeable SigRank SignalAF design tokens (carbon default)\n- **Data:** Supabase with cold-store snapshot and mock fallback\n- **Billing:** Stripe Checkout, Billing Portal, webhook handlers\n- **Validation:** zod, Node test runner, TypeScript\n\n## Quick Start\n\n```bash\nnpm install\ncp .env.example .env.local      # all values optional — see Environment below\nnpm run dev                     # http://localhost:3000\n```\n\nThe app is designed to run **without** Supabase or Stripe credentials. When env vars are\nmissing, reads fall back to the cold-store snapshot and then deterministic mock data,\nwhile billing routes return configuration errors instead of crashing, so it stays\nbuildable, previewable, and testable out of the box.\n\n> Requires **Node 22.x** (see `engines` in `package.json`). On a newer Node, `next dev`\n> may fail to start; use the version manager of your choice to pin 22.\n>\n> If vendor chunks act strange, run the dev server directly: `node_modules/.bin/next dev --port 3000`\n\n## Scripts\n\n| Command                  | Purpose                                 |\n| ------------------------ | --------------------------------------- |\n| `npm run dev`            | Start the local Next.js dev server      |\n| `npm run build`          | Create a production build               |\n| `npm run start`          | Serve the production build              |\n| `npm run lint`           | Run the configured Next.js lint command |\n| `npm test`               | Run all Node test files                 |\n| `npm run test:canonical` | Run the canonical ingest parity test    |\n| `npm run snapshot`       | Refresh the database snapshot           |\n\nBefore committing, run the gates CI enforces:\n\n```bash\nnpx tsc --noEmit            # 0 errors (typescript is a devDependency)\nnpm run build               # production build green\nnpm run test:canonical      # canonical ingest parity — MO§ES Υ 18436.98\n```\n\n## Project Map\n\n| Path                  | Responsibility                                               |\n| --------------------- | ------------------------------------------------------------ |\n| `app/`                | App Router pages and API routes                              |\n| `app/api/v1/`         | Public API, ingest, claim, devices, billing, metrics         |\n| `components/`         | UI components by product area                                |\n| `components/sigrank/` | Board, profile, and shared SigRank SignalAF UI (incl. `PlatformIcon`) |\n| `lib/data/`           | Single read facade: Supabase → snapshot → mock fallback      |\n| `lib/ingest/`         | Canonical payload parsing and cascade metric materialization |\n| `lib/scoring/`        | Core scoring engine and server-only ruleset boundary         |\n| `lib/supabase/`       | Browser, server, service-role, and auth helpers              |\n| `lib/stripe/`         | Stripe server helpers, handlers, tiers, and rewards          |\n| `supabase/`           | SQL schema, migrations, seed data, policies, and tests       |\n| `__tests__/`          | Node test suites and canonical fixtures                      |\n\n## Data Model\n\nAll app code reads operator data through `@/lib/data`. The facade chooses the safest\navailable source, in order:\n\n1. **Supabase live reads** when credentials are configured.\n2. **Cold-store snapshot** (`lib/data/snapshot.json`) if live reads are unavailable or fail.\n3. **Mock fixtures** (`lib/data/mock.ts`) as the last resort.\n\n## Environment\n\nCopy `.env.example` to `.env.local` and fill values as needed. All are optional locally\n(the app degrades gracefully); production values live in **Vercel environment variables**.\n\n| Variable group                                                                           | Notes                                                   |\n| ---------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY` | Live Supabase reads + service-role writes               |\n| `STRIPE_SECRET_KEY`, `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET`       | Billing and webhook flows                               |\n| `STRIPE_PRICE_*`                                                                         | Per paid tier / claim checkout path                     |\n| `NEXT_PUBLIC_SITE_URL`                                                                   | Stripe redirects and public URLs                        |\n| `SIGRANK_RULESET`                                                                        | **Server-only** proprietary RS.xx scoring overrides     |\n| `SIGRANK_API_KEY`                                                                        | Optional trusted bulk-read key for public API consumers |\n| `SIGRANK_INGEST_WRITE`                                                                   | Ingest-write flip: `1` = persist verified snapshots to the board (see note below)        |\n| `NEXT_PUBLIC_GATE_*`                                                                     | Optional feature gates for unfinished surfaces          |\n\n**Never commit real secrets or proprietary ruleset values.**\n\n### SIGRANK_INGEST_WRITE — the ingest-write flip\n\n**Status: LIVE in Production (`1`).** The board persists verified signed snapshots\nfrom enrolled MCP devices. Set in Vercel for both Production and Preview.\n\n> **Do NOT mark this variable as sensitive in Vercel.** It is a boolean on/off\n> flag (`1` or `\"\"`), not a secret. When marked sensitive, `vercel env pull`\n> returns `\"\"` even though the runtime has `1`, which misleads agents and\n> operators into thinking the flip is OFF. If `vercel env pull` shows `\"\"` but\n> the board is receiving verified submissions, the var is likely marked\n> sensitive again. Fix it in the Vercel dashboard (remove the sensitive flag).\n\n**Authoritative verification is RUNTIME behavior, not the CLI pull:**\n1. PostHog: `snapshot_submitted` events with `source: \"agent\"` and `persisted: true`\n2. Supabase: rows in `snapshot_submissions` with `verification_tier = 'verified'` and `status = 'scored'`\n3. A real signed submit via `npx sigrank submit` returning `ranked: true`\n\nIf any of those show verified rows landing, the flip is ON regardless of what\n`vercel env pull` says.\n\n## Supabase\n\nSchema, migrations, RLS policies, and seed data live in [`supabase/`](./supabase/). See\n[`supabase/README.md`](./supabase/README.md) to run your own instance. RS.xx scoring\nweights are server-only and are not included here.\n\n## Scoring Invariants\n\nProduct contracts, not implementation details:\n\n- `Υ = (cache_read × output) / input²`\n- `T × C × R = Cr / I = Leverage`\n- `10xDEV = log₁₀(Leverage)`\n- **SIGNA RATE** is the class credential; **Υ Yield** is the rank metric.\n- RS.xx weights are server-only and must not be exposed to client components.\n\n## Development Notes\n\n- Keep changes small and aligned with existing file ownership.\n- Pages are React Server Components by default; add `'use client'` only when a component\n  needs hooks, event handlers, or browser APIs.\n- Keep `components/sigrank/tokens.ts` and Tailwind theme values in sync.\n- Use `<Placeholder />` for placeholder metrics and `<CanonId />` for canonical real values.\n- Do not import server-only scoring configuration into client code.\n- Avoid random values and wall-clock reads at module scope.\n\n## Related\n\n- **[signalaf.com](https://signalaf.com)** — the live board\n- **[signalaf.com/score](https://signalaf.com/score)** — paste four token counts, get projected yield + ghost rank\n- **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** — the CLI / TUI / MCP server (`npx sigrank`)\n- **[Smithery](https://smithery.ai/servers/burnmydays/sigrank)** — one-click MCP install for Claude Desktop, Cursor, and more\n- **[Glama](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp)** — MCP server directory listing\n\n## Community\n\n- [Contributing](./.github/CONTRIBUTING.md)\n- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)\n- [Security policy](./SECURITY.md)\n- [Changelog](./CHANGELOG.md)\n\n### Reporting issues\n\nFound a bug or have a feature request? Please\n[open an issue](https://github.com/SunrisesIllNeverSee/sigrank-app/issues) on GitHub.\nSearch existing issues first to avoid duplicates, and include repro steps, expected\nvs. actual behavior, and your environment (OS, Node version).\n\n### Pull request process\n\n1. **Fork** the repo and create a branch from `main`.\n2. Make your change, keeping it small and aligned with existing file ownership.\n3. Ensure `npx tsc --noEmit` passes with **0 errors** before pushing.\n4. Open a pull request against `main` with a clear description of what and why.\n\n## License\n\nMIT; see [`LICENSE`](./LICENSE).\n",
  "bytes": 18935,
  "sha": "3b4db705a3595d1c523ed0458d3d6425aa35d51d5b3eca78dd5ddbaa18db2cb8",
  "repo_slug": "sunrisesillneversee/sigrank-app",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_signalaf_sigrank_24818d1d/readme"
}