# Contribution Exchange [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/SunrisesIllNeverSee/sigrank-app  
**GitHub Stars:** 6  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/contribution-exchange

## Description
Contribution Exchange MCP: domain discovery, policies, preflight, proposals, and signals.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "contribution-exchange": {
    "command": "npx",
    "args": ["-y","sigrank"]
  }
}
```

## Documentation & README

# SigRank SignalAF

> **🏆 SigRank SignalAF is live: [signalaf.com](https://signalaf.com)** — the AI operator
> evaluation leaderboard. Ranks how efficiently you use AI by token cascade
> efficiency (Υ = cache_read × output / input²), not how much. Run `npx sigrank`
> to see your cascade now. _Token counts only. Never your prompts._

<div align="center">

<p><img src="https://raw.githubusercontent.com/SunrisesIllNeverSee/sigrank-app/HEAD/.github/assets/og-card-v2.png" alt="SigRank SignalAF — AI operator evaluation and token cascade efficiency leaderboard" width="800"></p>

**A privacy-preserving AI operator evaluation leaderboard.**

SigRank evaluates the human using the AI — not the AI model itself. Most platforms reward volume. SigRank SignalAF rewards structure.

[![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)
[![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)
[![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)
[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-025E8C?style=flat-square&logo=dependabot)](https://github.com/SunrisesIllNeverSee/sigrank-app/network/dependencies)
[![coverage](https://img.shields.io/badge/coverage-c8-brightgreen.svg?style=flat-square)](https://github.com/SunrisesIllNeverSee/sigrank-app/actions/workflows/ci.yml)
[![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)
[![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)
[![live](https://img.shields.io/badge/live-signalaf.com-gold.svg?style=flat-square)](https://signalaf.com)
[![npm](https://img.shields.io/npm/v/sigrank.svg?style=flat-square&color=gold&label=sigrank)](https://www.npmjs.com/package/sigrank)
[![npm downloads](https://img.shields.io/npm/dm/sigrank.svg?style=flat-square&color=blue&label=npm%20downloads)](https://www.npmjs.com/package/sigrank)
[![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)
[![deploy](https://img.shields.io/badge/deploy-Vercel-black.svg?style=flat-square)](https://vercel.com)
[![Next.js](https://img.shields.io/badge/Next.js-15-black.svg?style=flat-square)](https://nextjs.org)
[![React](https://img.shields.io/badge/React-19-blue.svg?style=flat-square)](https://react.dev)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg?style=flat-square)](https://www.typescriptlang.org)
[![Supabase](https://img.shields.io/badge/db-Supabase-green.svg?style=flat-square)](https://supabase.com)
[![Stripe](https://img.shields.io/badge/billing-Stripe-purple.svg?style=flat-square)](https://stripe.com)
[![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](./LICENSE)

</div>

<p align="center">
  <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>
  &nbsp;
  <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>
</p>

## Table of Contents

- [What is SigRank SignalAF?](#what-is-sigrank-signalaf)
- [The SigRank SignalAF ecosystem](#the-sigrank-signalaf-ecosystem)
- [Get ranked (you don't need this repo)](#get-ranked-you-dont-need-this-repo)
- [How it works](#how-it-works)
- [For developers](#for-developers)
- [Stack](#stack)
- [Quick Start](#quick-start)
- [Scripts](#scripts)
- [Project Map](#project-map)
- [Data Model](#data-model)
- [Environment](#environment)
- [Supabase](#supabase)
- [Scoring Invariants](#scoring-invariants)
- [Development Notes](#development-notes)
- [Related](#related)
- [Community](#community)
- [License](#license)

|                                    The leaderboard                                    |                               Your operator profile                               |
| :-----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |
| [![SigRank SignalAF leaderboard](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/.github/assets/board.png)](https://signalaf.com/board/all)  | [![SigRank SignalAF operator profile](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/.github/assets/profile.png)](https://signalaf.com) |
| Every operator ranked by **Υ Yield** — the architecture of the cascade, not raw spend |        Cascade layer, class, and fingerprint — all from four token counts         |

---

## What is SigRank SignalAF?

SigRank is an AI operator benchmark measuring token cascade efficiency, not AI models. It scores AI operators by **token cascade efficiency**: how much reusable signal
they create from each unit of input — not how many tokens they burn. The rank metric:

```txt
Υ = (cache_read × output) / input²
```

The board is anonymous by default, claimable by operators, and built around one
question: **is this session compounding signal, or just burning tokens?** Volume is
noise; yield is signal.

This repo is the **Next.js app behind [signalaf.com](https://signalaf.com)** — the
public board, operator profiles, the wiki, account + billing, and the scoring/ingest
engine. You don't clone this to _use_ SigRank SignalAF (see below) — you clone it to work on it.

## The SigRank SignalAF ecosystem

| Repo | What it is | Install |
|------|-----------|---------|
| **[sigrank-app](https://github.com/SunrisesIllNeverSee/sigrank-app)** (this repo) | The leaderboard — signalaf.com. Privacy-preserving operator profiles, class tiers, board rankings. | [signalaf.com](https://signalaf.com) |
| **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** | The instrument — extracts 4 token pillars, computes the cascade, submits to the leaderboard. MCP server + TUI dashboard. | `npx sigrank` |
| **[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` |
| **[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) |
| **[signaf](https://github.com/SunrisesIllNeverSee/signa)** | The coach — reads your session logs, builds a taste profile, measures ASI, coaches you on token efficiency. | `npx @burnmydays/signaf` |
| **[sigrank-vscode](https://github.com/SunrisesIllNeverSee/sigrank-vscode)** | The IDE extension — see your cascade metrics inline in VS Code. | `code --install-extension sigrank.sigrank` |
| **[fundscore](https://github.com/SunrisesIllNeverSee/fundscore)** | The repo scorer — investor-readiness scoring for GitHub repos. CLI + MCP server. | `npx fundscore` |

### Also in the MO§ES™ suite

| Site | What it is |
| ---- | ---------- |
| **[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. |
| **[MO§ES](https://mos2es.com)** | The governance framework that underpins SigRank SignalAF, SIGNOMY, and all governed agent operations. Structural accountability for agentic systems. |

## Get ranked (you don't need this repo)

SigRank SignalAF runs from your terminal — or wire it as an MCP server for your AI agent:

```bash
npx sigrank                 # see your cascade now (no install, no sign-in)
```

The client reads your local AI session logs on-device, derives your cascade,
and publishes to the board — **token-only, no transcript content.**

```bash
npm install -g sigrank     # bundles ccusage + tokscale + tokendash — no separate installs
sigrank enroll             # sign in: paste a connect code from signalaf.com → Settings
sigrank submit             # publish your verified runs to the board
```

Or explore first, no sign-in:

```bash
sigrank                    # full tabbed TUI: dashboard · compare · board · watch
npx sigrank board --once   # print the live leaderboard once
bunx sigrank board --once  # same, via Bun (faster startup if you have it)
```

Cautious? `sigrank submit --dry-run` prints the exact signed payload — four token
counts and a signature — and sends nothing.

```bash
$ sigrank submit --dry-run
📦 Payload (not sent):
  input:          1,251,211
  output:        11,296,121
  cache_create:     128,196
  cache_read:    2,555,179,769
  Υ Yield:          18,436.98
  class:            TRANSMITTER
  signature:        ed25519:9f3a...
```

Full CLI + MCP docs: **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** ·
package: **[sigrank on npm](https://www.npmjs.com/package/sigrank)**.

## How it works

- **Four raw token pillars** — `input`, `output`, `cache_creation`, `cache_read` — are the
  only inputs. No message content, ever.
- The **cascade engine** derives Υ Yield, Leverage, Velocity, 10xDEV, SNR, and efficiency
  from those four numbers. The server re-scores every submission authoritatively.
- Operators are placed in **signal classes** (Transmitter, Architect, …) by their cascade
  shape, and ranked globally by Υ.
- **SIGNA RATE** is the class credential; **Υ Yield** is the rank metric.

Deep dive: the in-app **[wiki](https://signalaf.com/wiki)**.

---

# For developers

The rest of this README is for working on the app itself.

## Stack

- **Framework:** Next.js 15 App Router, React 19, TypeScript strict
- **UI:** Tailwind CSS, themeable SigRank SignalAF design tokens (carbon default)
- **Data:** Supabase with cold-store snapshot and mock fallback
- **Billing:** Stripe Checkout, Billing Portal, webhook handlers
- **Validation:** zod, Node test runner, TypeScript

## Quick Start

```bash
npm install
cp .env.example .env.local      # all values optional — see Environment below
npm run dev                     # http://localhost:3000
```

The app is designed to run **without** Supabase or Stripe credentials. When env vars are
missing, reads fall back to the cold-store snapshot and then deterministic mock data,
while billing routes return configuration errors instead of crashing — so it stays
buildable, previewable, and testable out of the box.

> Requires **Node 22.x** (see `engines` in `package.json`). On a newer Node, `next dev`
> may fail to start — use the version manager of your choice to pin 22.
>
> If vendor chunks act strange, run the dev server directly: `node_modules/.bin/next dev --port 3000`

## Scripts

| Command                  | Purpose                                 |
| ------------------------ | --------------------------------------- |
| `npm run dev`            | Start the local Next.js dev server      |
| `npm run build`          | Create a production build               |
| `npm run start`          | Serve the production build              |
| `npm run lint`           | Run the configured Next.js lint command |
| `npm test`               | Run all Node test files                 |
| `npm run test:canonical` | Run the canonical ingest parity test    |
| `npm run snapshot`       | Refresh the database snapshot           |

Before committing, run the gates CI enforces:

```bash
npx tsc --noEmit            # 0 errors (typescript is a devDependency)
npm run build               # production build green
npm run test:canonical      # canonical ingest parity — MO§ES Υ 18436.98
```

## Project Map

| Path                  | Responsibility                                               |
| --------------------- | ------------------------------------------------------------ |
| `app/`                | App Router pages and API routes                              |
| `app/api/v1/`         | Public API, ingest, claim, devices, billing, metrics         |
| `components/`         | UI components by product area                                |
| `components/sigrank/` | Board, profile, and shared SigRank SignalAF UI (incl. `PlatformIcon`) |
| `lib/data/`           | Single read facade: Supabase → snapshot → mock fallback      |
| `lib/ingest/`         | Canonical payload parsing and cascade metric materialization |
| `lib/scoring/`        | Core scoring engine and server-only ruleset boundary         |
| `lib/supabase/`       | Browser, server, service-role, and auth helpers              |
| `lib/stripe/`         | Stripe server helpers, handlers, tiers, and rewards          |
| `supabase/`           | SQL schema, migrations, seed data, policies, and tests       |
| `__tests__/`          | Node test suites and canonical fixtures                      |

## Data Model

All app code reads operator data through `@/lib/data`. The facade chooses the safest
available source, in order:

1. **Supabase live reads** when credentials are configured.
2. **Cold-store snapshot** (`lib/data/snapshot.json`) if live reads are unavailable or fail.
3. **Mock fixtures** (`lib/data/mock.ts`) as the last resort.

## Environment

Copy `.env.example` to `.env.local` and fill values as needed. All are optional locally
(the app degrades gracefully); production values live in **Vercel environment variables**.

| Variable group                                                                           | Notes                                                   |
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY` | Live Supabase reads + service-role writes               |
| `STRIPE_SECRET_KEY`, `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET`       | Billing and webhook flows                               |
| `STRIPE_PRICE_*`                                                                         | Per paid tier / claim checkout path                     |
| `NEXT_PUBLIC_SITE_URL`                                                                   | Stripe redirects and public URLs                        |
| `SIGRANK_RULESET`                                                                        | **Server-only** proprietary RS.xx scoring overrides     |
| `SIGRANK_API_KEY`                                                                        | Optional trusted bulk-read key for public API consumers |
| `SIGRANK_INGEST_WRITE`                                                                   | Ingest-write flip: `1` = persist verified snapshots to the board (see note below)        |
| `NEXT_PUBLIC_GATE_*`                                                                     | Optional feature gates for unfinished surfaces          |

**Never commit real secrets or proprietary ruleset values.**

### SIGRANK_INGEST_WRITE — the ingest-write flip

**Status: LIVE in Production (`1`).** The board persists verified signed snapshots
from enrolled MCP devices. Set in Vercel for both Production and Preview.

> **Do NOT mark this variable as sensitive in Vercel.** It is a boolean on/off
> flag (`1` or `""`), not a secret. When marked sensitive, `vercel env pull`
> returns `""` even though the runtime has `1` — which misleads agents and
> operators into thinking the flip is OFF. If `vercel env pull` shows `""` but
> the board is receiving verified submissions, the var is likely marked
> sensitive again. Fix it in the Vercel dashboard (remove the sensitive flag).

**Authoritative verification is RUNTIME behavior, not the CLI pull:**
1. PostHog: `snapshot_submitted` events with `source: "agent"` and `persisted: true`
2. Supabase: rows in `snapshot_submissions` with `verification_tier = 'verified'` and `status = 'scored'`
3. A real signed submit via `npx sigrank submit` returning `ranked: true`

If any of those show verified rows landing, the flip is ON regardless of what
`vercel env pull` says.

## Supabase

Schema, migrations, RLS policies, and seed data live in [`supabase/`](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/supabase/). See
[`supabase/README.md`](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/supabase/README.md) to run your own instance. RS.xx scoring
weights are server-only and are not included here.

## Scoring Invariants

Product contracts, not implementation details:

- `Υ = (cache_read × output) / input²`
- `T × C × R = Cr / I = Leverage`
- `10xDEV = log₁₀(Leverage)`
- **SIGNA RATE** is the class credential; **Υ Yield** is the rank metric.
- RS.xx weights are server-only and must not be exposed to client components.

## Development Notes

- Keep changes small and aligned with existing file ownership.
- Pages are React Server Components by default; add `'use client'` only when a component
  needs hooks, event handlers, or browser APIs.
- Keep `components/sigrank/tokens.ts` and Tailwind theme values in sync.
- Use `<Placeholder />` for placeholder metrics and `<CanonId />` for canonical real values.
- Do not import server-only scoring configuration into client code.
- Avoid random values and wall-clock reads at module scope.

## Related

- **[signalaf.com](https://signalaf.com)** — the live board
- **[signalaf.com/score](https://signalaf.com/score)** — paste four token counts, get projected yield + ghost rank
- **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** — the CLI / TUI / MCP server (`npx sigrank`)
- **[Smithery](https://smithery.ai/servers/burnmydays/sigrank-mcp)** — one-click MCP install for Claude Desktop, Cursor, and more
- **[Glama](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp)** — MCP server directory listing

## Community

- [Contributing](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/.github/CONTRIBUTING.md)
- [Code of Conduct](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/.github/CODE_OF_CONDUCT.md)
- [Security policy](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/SECURITY.md)
- [Changelog](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/CHANGELOG.md)

### Reporting issues

Found a bug or have a feature request? Please
[open an issue](https://github.com/SunrisesIllNeverSee/sigrank-app/issues) on GitHub.
Search existing issues first to avoid duplicates, and include repro steps, expected
vs. actual behavior, and your environment (OS, Node version).

### Pull request process

1. **Fork** the repo and create a branch from `main`.
2. Make your change, keeping it small and aligned with existing file ownership.
3. Ensure `npx tsc --noEmit` passes with **0 errors** before pushing.
4. Open a pull request against `main` with a clear description of what and why.

## License

MIT — see [`LICENSE`](https://github.com/SunrisesIllNeverSee/sigrank-app/blob/HEAD/LICENSE).

