Sign In

faf-scoring-kernel

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faf-scoring-kernel

FAF Mk4 Scoring Kernel — WASM-compiled Rust engine for scoring .faf files and compiling .fafb binaries. The Foundry.

Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
648
48.28%
Maintainers
1
Weekly downloads
 
Created
Source

FAF WASM SDK

AI Context Format for Browsers and Edge Compute. Sub-10ms context loads globally.

Features

  • YAML parsing via serde_yaml (WASM-proven)
  • Glass Hood AI-readiness scoring
  • 8-tier rating system (🤍 to 🏆)
  • Cloudflare Workers / Vercel Edge ready
  • <2ms parse + score performance

Installation

npm install @faf/wasm-sdk

Usage

Browser / Node.js

import { initialize, createFAF, scoreFAF } from '@faf/wasm-sdk';

await initialize();

const faf = createFAF(`
project:
  name: my-project
  stack: typescript
`);

console.log(faf.weighted_score);  // 45.0
console.log(faf.tier);            // 🟢

Cloudflare Workers

import init, { FAF } from '@faf/wasm-sdk';

export default {
  async fetch(request) {
    await init();
    const faf = new FAF(yamlContent);
    return Response.json({ score: faf.weighted_score });
  }
};

API

FAF Class

  • new FAF(yamlContent) - Parse and score FAF content
  • name - Project name
  • stack - Technology stack
  • weighted_score - Weighted AI-readiness (0-100)
  • truth_score - Unweighted average (0-100)
  • tier - Tier emoji (🤍🔴🟡🟢🥉🥈🥇🏆)
  • completeness - Core DNA score (40% weight)
  • clarity - Instructions score (35% weight)
  • structure - Context score (15% weight)
  • metadata - Metadata score (10% weight)

Hot Path Functions

For maximum edge performance:

import { score_weights_fast, WEIGHTS_F32 } from '@faf/wasm-sdk';

const values = new Float32Array([80, 70, 60, 50]);
const score = score_weights_fast(WEIGHTS_F32, values);

Build

# Install wasm-pack
cargo install wasm-pack

# Build WASM
wasm-pack build --target web --release

# Run tests
wasm-pack test --headless --chrome

Deploy to Cloudflare

npm install -g wrangler
wrangler deploy

Scoring Algorithm

Glass Hood - Full transparency scoring:

CategoryWeightDescription
Completeness40%Core project DNA fields
Clarity35%AI instructions quality
Structure15%Context organization
Metadata10%Versioning and tags

Tier System

ScoreTierEmoji
0-12White🤍
13-25Red🔴
26-38Yellow🟡
39-51Green🟢
52-64Bronze🥉
65-77Silver🥈
78-90Gold🥇
91-100Championship🏆

License

MIT

  • FAF Format
  • IANA Registration

Keywords

faf

FAQs

Package last updated on 15 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts