Skip to content

# [DOCS] Verify and Sync 5-Tier Metric Definitions #111

Open

Description

@squid-protocol

🎯 Objective

Ensure the 14 specific metrics that utilize the Function -> Class roll-up are mathematically sound, and explicitly document why File-Level metrics (like Deep Churn or Civil War) bypass Level 1 and Level 2.

🛠️ Implementation

  • Review the logic in 08-01-methodology.md to ensure N/A is explicitly defined for Class/Function levels on non-structural metrics.
  • Ensure the new math implemented in Sub-Issue 1 perfectly mirrors the formulas defined in the methodology docs.

Activity

  1. added
    documentation
    on Jul 5, 2026
  2. squid-protocol commented on Jul 25, 2026

    @squid-protocol
    OwnerAuthor

    Read `08-01-methodology.md`'s hierarchy table closely -- it's actually already in good shape for this. The N/A definitions this issue asks to verify are already explicit and correct: Graveyard, Civil War, Ownership Entropy, Deep Churn, File Stability, and Hardcoded Secrets are all marked `N/A` at Function and Class level in the existing table, matching the 5 `RISK_SCHEMA` entries that should stay file-only (see #110 for the full cross-check against `RISK_SCHEMA`).

    Two things to fix here once #109 lands, beyond the general "does the math match the docs" review:

    1. Misattribution: nothing in this doc or the related issues should point at `prism.py` for the function-to-class linkage -- that logic lives in `detector.py` (~line 503, part of the class extractor at ~466-522). Worth a pass to make sure the wiki doesn't repeat that if it references implementation files anywhere.
    2. The 0-∞ vs. 0-100 distinction deserves its own explicit callout, not just implied by the table's column headers. The doc already correctly labels Level 2 (Class) as "count based, 0-∞" separately from Level 3 (File)'s "Sigmoid normalized, 0-100" -- but given # [REFACTOR] Upgrade SignalProcessor Risk Equations for Class-Level Aggregation #109's implementation notes originally suggested running the sigmoid at the class level too (which would contradict this table), it's worth adding a sentence stating explicitly why class-level values are raw counts and not renormalized, so this doesn't drift again later.

    This one's naturally last in the sequence -- it verifies the other two, so it can't really start until #109's actual shape is settled.

  3. added
    scope:frontier
    on Oct 16, 2026
  4. added
    metrics
    priority: low
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationmetricspriority: lowscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions