@instruments/sustainability
v0.1.0
Published
A canonical taxonomy for building-material sustainability claims. It ships the reference vocabulary and a deterministic classifier that turns messy manufacturer language ("GREENGUARD Gold", "PFAS free", "LEED Compliant") into stable canonical ids, togethe
Readme
@instruments/sustainability
A canonical taxonomy for building-material sustainability claims. It ships the reference vocabulary and a deterministic classifier that turns messy manufacturer language ("GREENGUARD Gold", "PFAS free", "LEED Compliant") into stable canonical ids, together with the evidence each claim actually requires.
The package is pure and dependency-light (only zod). It carries:
- Frameworks — building-rating and material-health programmes (LEED, WELL, BREEAM, Living Building Challenge, …) with versioned rule references.
- Claim families — the canonical claims a product can make, each with its
evidence
sourceRequirements,frameworkMappings, and a greenwashing-risk rating. - Source types — the evidence instruments (EPDs, HPDs, Declare labels, emissions certificates, …) that can substantiate a claim.
- A deterministic classifier — alias-based matching from raw text to canonical claim families, with no model calls and no guessing.
- A greenwash lens and decision contexts — plain-language interpretation of what a claim does and does not prove.
Install
pnpm add @instruments/sustainabilityUsage
Classify raw claims
import { classifyClaims } from "@instruments/sustainability";
const matches = classifyClaims("GREENGUARD Gold | PFAS free | LEED Compliant");
for (const match of matches) {
console.log(match.claimFamilyId, match.greenwashingRisk);
// has_greenguard_gold_certification low
// claims_pfas_free high
// rating_system_leed_contribution_hint medium
}Look up a claim family and its evidence requirements
import { getClaimFamily, getSourceRequirements } from "@instruments/sustainability";
const family = getClaimFamily("has_environmental_product_declaration");
console.log(family.canonicalName); // "Has an Environmental Product Declaration"
const requirements = getSourceRequirements("has_environmental_product_declaration");
console.log(requirements[0]?.requiredFields);
// ["program_operator", "product_category_rule", "declared_unit", ...]