The Codex

The Codex · Trust & Evidence

Trust Methodology

How GAIA scores skill trustworthiness. A complete reference for the Trust Magnitude formula, Evidence Types, grade thresholds, the Apex Gate predicates, gameability closures, and the canonical distinction between Suites and Fusion.

Quick Math Reference

One-page, no-prose math card. Every number on every Evidence card and plaque is produced by these formulas and these formulas alone. If a row's math doesn't match, the row is wrong — not the math.

1 · Per-row score (every Evidence row)

artifact_score(row) = base # §2 type table — magnitude formula
                 × cap # min(base, type_cap)
                 × weight # §2 type table — multiplier 0.5 .. 1.5
                 × freshness # max(0, 1 − decay_per_year × age_years), or 1 if no decay
                 × creator_mult # social-signal only; else 1
                 × engagement # social-signal only; else 1
                 × inherit_mult # 1 for own-layer rows; §2.14 discount for inherited rows
                 × plateau # 1.0 for the highest-scoring row of this type, then 0.5/0.25/…

This is what the MAG bar on every Evidence card displays (pre-plateau approximation — the plateau factor is applied only when summing).

2 · Skill aggregate (Trust Magnitude)

TM(skill) = Σ artifact_score(row) # over all rows in effective_pool, after §3.2 dedup

# effective_pool = own rows ∪ inherited rows, deduped by source URL
# See §2.14 for inheritance, §3.2 for dedup

3 · Per-row Grade (S / A / B / C)

row.grade = max G in {S,A,B,C} where artifact_score(row)floor(type, G)
                clamped to type.ceiling # floors and ceilings in §3 table

Floors are calibrated per type so an S row corresponds to top-tier evidence in that type's natural distribution. Ceilings prevent self-producible types (repo-own, self-attestation) from ever reaching S alone.

4 · Overall Skill Grade

skill.grade = S if TM ≥ 250 AND diversity_gate(skill)
             A if TM ≥ 100
             B if TM ≥ 50
             C if TM ≥ 20
             ungraded otherwise

diversity_gate(skill) = ALL of:
  • ≥ 3 distinct evidence types
  • ≥ 1 S-tier row OR ≥ 3 A-tier rows of distinct types
  • ≥ 1 type from {benchmark-result, verifier-attestation, peer-review, proxy-containment}

5 · The 10 evidence types — base formula at a glance

Typebase formulaweightcapceiling
fusion-recipe20·N (N≤10) or 200+20·√(N−10) (N>10)
N = origins graded ≥ C
1.5S
github-stars-ownmin(200, stars/1000) ÷ min(skillCountInRepo, 4)1.0200S
proxy-containment(externalStars/1000) × 0.8 (min 10000)1.0160S
verifier-attestation30 × verifiers1.5S
benchmark-resultpercentile (0–100)1.4100S
arxivcitations / 51.0100S
peer-review25 × reviewers1.2S
repo-own(commits/200) + (contributors² × 2)0.660B
self-attestationflat 100.510C
social-signallog₁₀(views) × 8 × creator_mult × engagement1.080A

6 · Worked numbers from real 5★ skills

These match scripts/inspectTrustMagnitude.py exactly. If a frontend card disagrees, the frontend is wrong — file an issue, do not edit data.

SkillRowInputsbase× weight= MAG
garrytan/gstack
TM 589.3 → S
repo-owncommits=323, contrib=9(323/200)+(9²×2)=163.6 → cap 60×0.636.0
github-stars-ownstars=110930, skills=46min(200,110.93)÷min(46,4)=27.73×1.027.7
social-signalviews=500000log₁₀(500000)×8=45.59×1.045.6
fusion-recipeN=46 origins ≥C200+20·√(46−10)=320.0×1.5480.0
ruvnet/ruflo
TM 482.3 → S
repo-owncommits=6899, contrib=32(6899/200)+(32²×2)=2082.5 → cap 60×0.636.0
github-stars-ownstars=59957, skills=4min(200,59.96)÷min(4,4)=14.99×1.014.99
arxivcitations=2020/5=4.0×1.04.0
social-signalviews=null(no driver — 0)0
fusion-recipeN=27 graded (47 raw)200+20·√(27.4−10)≈283.4×1.5425.1

If you change a formula, you must update — in this exact order: docs/js/tm-config.js (frontend SoT) → src/gaia_cli/trustMagnitude.py (backend) → this page → registry/schema/meta.json (perRowGradeThresholds, gradeCeiling) → tests/test_row_grading.py + tests/test_calibrate_evidence_grades.pypython scripts/build_docs.py. Then run gaia dev calibrate-evidence-grades --yes to refresh stored grades.

Trust Magnitude Formula

Trust Magnitude (TM) is the aggregate numeric signal for a skill's trustworthiness. It is computed at build time from a skill's evidence inventory, never stored on a node.

// Top-level aggregate
TM = Σ artifactScore(e) for each evidence row e

// Per-row score
artifactScore(e) = magnitude(e.type, e.raw)
                 × weight(e.type)
                 × freshness(e.type, e.date)
                 × inheritMultiplier(e, skill) // = 1.0 for own-layer rows; per-type discount for inherited rows — see §Inheritance

// Dedup applied BEFORE summation
// When multiple rows share the same type, plateau multipliers
// are applied in descending score order before the sum.

The three sub-functions are type-specific and documented in full in the Evidence Types table below. Key invariants:

Evidence Types

Ten canonical Evidence Types, each measuring a distinct provenance signal. Weights and caps set the raw contribution ceiling; plateau limits how many rows of the same type can stack.

Type Magnitude formula Weight Cap (per row) Plateau sequence · max rows Freshness decay What it measures
github-stars-own min(200, stars / 1000) ÷ min(skillCountInRepo, 4) 1.0 200 — (1 row max) Refresh quarterly Public adoption of the contributor's own repo implementing the skill.
proxy-containment (containingRepoStars / 1000) × 0.8 1.0 160 — (1 row max; requires verifiable dep link) Quarterly The skill appears as a verifiable dependency in a widely-starred third-party repo — proxied adoption signal.
verifier-attestation 30 × N (N = number of attesting 4★+ verifiers) 1.5 30 × N total 1.0 / 0.85 / 0.7 — max 5 attestations Null on derank A 4★+ Verifier has confirmed the skill demonstration is real and reproducible.
benchmark-result percentile (0–100) 1.4 100 — (1 row max) 50 % / year (half-life decay) A public benchmark placing the skill on a measurable performance leaderboard.
arxiv citations / 5 1.0 100 1.0 / 0.5 / 0.25 / 0.125 — max 4 papers None Peer-accepted academic paper demonstrating the capability.
peer-review 25 × N (N = reviewer count) 1.2 25 × N total — (accumulates across reviewers) 25 % / 2 years Formal peer review of the implementation in a recognised venue.
repo-own (commits / 200) + (contributors² × 2) 0.6 60 1.0 / 0.5 / 0.25 — max 3 repos None Activity depth in the contributor's own repo: commit volume and collaboration breadth.
self-attestation flat 10 0.5 10 — (max 1 entry ever) None Contributor's own declaration of the skill. Lowest-weight; counts only once.
social-signal log₁₀(views) × 8 × creator_mult × engagement_ratio 1.0 80 1.0 / 0.5 / 0.25 — max 3 rows 50%/yr Public social engagement (blog posts, talks, threads) citing the skill demonstration. Views floor 1 000; creator and engagement multipliers applied.
fusion-recipe 20 × N (N ≤ 10)  |  200 + 20 × √(N−10) (N > 10) 1.5 — (1 per skill; role='origin' only) None N = graded ≥C origin skills in the fusion tree. Sqrt-softened past 10 to prevent large fusions dominating the aggregate. Suite role='variant' components do not score.

N counts only role='origin' components graded ≥C. A 20-origin skill scores 200 + 20×√10 ≈ 263 × 1.5; a 10-origin skill scores 200 × 1.5 = 300. The sqrt-softening prevents pathological 35-component fusions from running away with the leaderboard.

Evidence Inheritance — Generic and Named Layers

Every evidence row carries a layer designation — generic or named — that governs whether it can cross the generic→named boundary when computing Trust Magnitude for a Named Skill.

Layer Model

Layer is a property of an evidence row, not of the evidence type. Named Skills — those with a genericSkillRef pointing to a parent generic skill — can inherit generic-layer rows from that parent. Generic skills (no genericSkillRef) compute Trust Magnitude from their own rows only and the inheritance path is never traversed.

Effective Pool

A Named Skill’s Trust Magnitude is computed over its effective pool: the union of its own rows and all generic-layer rows inherited from the parent generic skill, deduped by source URL. Own-layer rows always receive an inheritMultiplier of 1.0 — no discount is applied. Inherited rows receive the per-type discount documented in the table below.

allowedLayers per Type

Each evidence type declares which layers it may sit at and what discount applies when a row is inherited across the generic→named boundary. Types pinned to [named] only cannot be inherited.

Pinned to named layer — cannot be inherited

Evidence Type Allowed Layers inheritMultiplier
fusion-recipe named 1.0 (own only)
github-stars-own named 1.0 (own only)
repo-own named 1.0 (own only)
self-attestation named 1.0 (own only)
verifier-attestation named 1.0 (own only)

Flexible — can sit at either layer; discount applied when inherited

Evidence Type Allowed Layers inheritMultiplier
arxiv generic, named 0.70
peer-review generic, named 0.30
social-signal generic, named 0.35
proxy-containment generic, named 0.25
benchmark-result generic, named 0.15

Rationale

The discount reflects that a capability claim (for example, an arxiv paper describing a generic algorithm) projects less cleanly onto a specific named implementation. A lower multiplier signals that the evidence type binds less tightly to individual Named Skills. benchmark-result carries the lowest multiplier (0.15) because it already carries a high artifact weight (1.4) in the scoring formula — allowing full inheritance would disproportionately amplify benchmark rows that were published against the generic capability rather than the specific named implementation.

Formula annotation — inheritMultiplier

The full per-row product in the Trust Magnitude formula is:

artifactScore(e) = magnitude(e.type, e.raw)
                 × weight(e.type)
                 × freshness(e.type, e.date)
                 × plateau(e.type, position)
                 × creatorMult(e)
                 × engagementRatio(e)
                 × mothershipDiscount(e)
                 × inheritMultiplier(e, skill) // ¹

¹ inheritMultiplier = 1.0 for own-layer rows; per-type discount (see table above) for rows inherited from a parent generic skill.

Overall Trust Grade Thresholds

The Overall Trust Grade is derived from a skill's Trust Magnitude and a diversity gate. It is computed at build time and surfaces in generated catalogs — never stored on a node.

Grade TM requirement Diversity gate (S only)
S · Platinum TM ≥ 250 All three of:
  • ≥ 3 distinct Evidence Types represented
  • ≥ 1 S-tier evidence row OR ≥ 3 A-tier rows of distinct types
  • ≥ 1 type from the non-self-producible set: benchmark-result, verifier-attestation, peer-review, or proxy-containment
A · Gold TM ≥ 100
B · Silver TM ≥ 50
C · Bronze TM ≥ 20
Ungraded TM < 20 On the record; counts toward no gate.

The diversity gate at S is the primary anti-gaming control at the highest grade. It ensures that a Platinum grade requires external validation — a skill cannot reach S through self-producible signals alone, regardless of how many stars are stacked.

Important distinction

Evidence Grade (S / A / B / C) describes the quality of one demonstration row, derived from its Trust Magnitude contribution relative to the row's own cap. Overall Trust Grade describes the skill's aggregate standing across all rows. These are different axes — a single A-grade row does not make the skill grade A.

Neither axis is the deprecated Evidence Class (the legacy Class A / B / C). Grade A ≠ Class A.

Per-Evidence Row Grade Thresholds

Each evidence type has its own artifact_score floor for each grade. Grades above a type's ceiling are not achievable — the ceiling is a hard cap, not a rounding rule.

Type S floor A floor B floor C floor Ceiling
fusion-recipe2001206030S
github-stars-own88603520S
proxy-containment112643216S
verifier-attestation90542714S
benchmark-result90704020S
arxiv95704015S
peer-review88603514S
social-signal602812A
repo-own229B
self-attestation4C

Floors are against artifact_score (magnitude × weight × freshness × multipliers). A "—" means that grade is not achievable for this type regardless of score.

Suite vs Fusion

Two orthogonal dimensions of skill composition that share an origin-count axis but serve entirely different purposes.

Suite Components

A Suite groups skills for installation readiness. A contributor's skill suite (e.g. mattpocock/skills) lists sub-skills that can be installed together or individually. The suite label is an affordance for the install pipeline — it does not imply fusion provenance.

  • Sub-skills carry role='variant' within the suite
  • Variants contribute to installation breadth
  • Variants do not contribute to fusion-recipe Trust Magnitude
  • A suite skill does not require its own links.github

Fusion Recipe

Fusion is canonical provenance. When a skill fuses origins together (via gaia fuse), those origins earn role='origin' in the fusion recipe. Only role='origin' components score the fusion-recipe Trust Magnitude term.

  • Origin components carry role='origin'
  • Only origins contribute to fusion-recipe magnitude
  • Each origin must itself be a Named Skill (2★+)
  • The Apex Gate's aGradedOriginsGte5 predicate counts role='origin' children only
Gameability closure — variant-padding attack

The single most powerful inflation attempt is "variant-padding": registering many role='variant' sub-skills inside a suite to artificially inflate the origin count used by the fusion-recipe formula. This attack is structurally blocked by the role guard: the formula reads role='origin' exclusively. Adding suite variants does not move the fusion-recipe score by one point, regardless of variant count.

Conversely, suite-only paths (installation without provenance) are excluded from the Apex Gate's depth2OnlyReachableGte1 predicate — installation breadth is not accepted as proof of fusion depth.

The Apex Gate

The Apex Gate is a 6-predicate hard gate that must be fully satisfied before a skill can ascend to the 6★ Transcendent ★ (Apex) rank. All six predicates must evaluate to true. Partial satisfaction is logged but does not advance promotion.

Any predicate that fails produces a named diagnostic in the promotion candidate output. The failure is logged against the skill's timeline as a gate-fail event so the history is auditable.

Feature-flagged OFF — deferred to 2026-Q4

Two additional predicates exist in the implementation but are excluded from gate evaluation until ecosystem conditions justify them. They return None (skipped) rather than False (failed) so callers can distinguish "not yet active" from "failed":

Removed predicates — 2026-06-17 amendments (historical context)

The following predicates existed in earlier drafts of the Apex Gate specification and were removed or consolidated in the 2026-06-17 amendments. They are recorded here for auditability — they are not active and must not be re-introduced:

Worked Example — mattpocock/skills

A concrete application of the Trust Magnitude formula and Apex Gate to an existing named skill. The table below shows a pre-G7-cutover synthesis projection — see the post-migration baseline callout for the actual registry values after I3 merged.

Post-G7-cutover baseline (as of I3 migration, 2026-06-18)

After the G7 Phase 1.5 I3 migration, registry/named-skills.json shows mattpocock/skills at TM = 0.0 / Trust Grade B. This is the expected post-cutover baseline: the G7 evidence schema uses 10 canonical evidence types (e.g. github-stars-own, fusion-recipe, verifier-attestation) and no rows of those types have been formally ingested through the new pipeline yet. The synthesis estimate below (TM ≈ 1 187) was computed from pre-migration evidence annotations and remains useful as a formula illustration; it does not reflect the live registry state.

Watch registry/named-skills.jsonmattpocock/skillstrustMagnitude and overallTrustGrade as evidence ingestion proceeds through Phase 2 (Trending Engine).

mattpocock/skills B TM 0.0 (registry) · TM ≈ 1 187 (synthesis projection) Apex Gate: 3 / 6 — not eligible for promotion

The table below uses the synthesis projection. Once 10-type evidence rows are ingested the registry will recompute TM automatically.

Evidence Type Raw signal Magnitude Weight Plateau Row score Evidence Grade
github-stars-own TypeScript repo ~34 k ★ log₂(34001) × 18 ≈ 272 1.0 1.0 (first) 200 (capped) S
github-stars-own total-typescript repo ~10 k ★ log₂(10001) × 18 ≈ 241 1.0 — (1 row max) 0 (deduped)
fusion-recipe 4 role='origin' components (graded ≥C) 20 × 4 = 80 1.5 1.0 120 A
repo-own ~4 200 commits, 89 contributors (4200/200) + (89² × 2) ≈ 15 865 → cap 60 0.6 1.0 (first) 36 B
social-signal 3 high-engagement posts ~55 per row 1.0 1.0 / 0.5 / 0.25 ≈ 96 A
verifier-attestation 2 attesting verifiers 30 × 2 = 60 1.5 1.0 / 0.85 ≈ 82.5 A
Total TM (synthesis projection) ≈ 1 187

Apex Gate evaluation

Synthesis projection result: 3 / 6 predicates pass. Under the synthesis estimate, the skill holds Overall Trust Grade S and would satisfy three gate conditions immediately upon a valid promotion PR, but the structural gaps (aGradedOriginsGte5 and depth2OnlyReachableGte1) require genuine fusion-graph work — they cannot be satisfied by adding self-producible evidence rows or suite variants. Post-I3 registry baseline: TM 0.0 / grade B. All gate evaluations above will re-run automatically as 10-type evidence rows are ingested.

Gameability Vectors Closed

The trust model is designed with explicit closures against known inflation strategies. Five primary vectors are addressed by structural rules, not policy.

Further Reading

Related pages and canonical references for this methodology.

Registry & Codex