Skip to content

NAICS Code Guide

Rewritten 2026-10-21 (#764): 4-digit NAICS is the one path (ADR 0026). The earlier version of this guide described 2-digit sector codes, range codes such as 31-33, db/NAICS-codes.json and a /api/data/naics-codes endpoint. The file and the range handling are gone, and the endpoint never existed.

What NAICS is used for

The North American Industry Classification System (NAICS, 2022 vintage) classifies businesses. PRIAM uses it to tailor the risk assessment to a tenant's industry: which questions it gets, how much each category counts toward its score, the order of categories, and its recommendations. NAICS is a tenant-level setting chosen once at registration. It isn't used by the Asset Management module: customers and suppliers have no NAICS code.

Production industries (the only codes the app serves)

Each production industry is a 4-digit code with a profile in db/risks/naics-profiles.json (isMvp: true). On 2026-10-21 there are 12:

Code Industry Short title
2211 Electric Power Generation, Transmission and Distribution Electric Power
2371 Utility System Construction Utility Construction
3222 Converted Paper Product Manufacturing Converted Paper Products
3251 Basic Chemical Manufacturing Basic Chemicals
4452 Specialty Food Retailers Specialty Food Retail
4841 General Freight Trucking General Freight Trucking
4842 Specialized Freight Trucking Specialized Freight Trucking
5132 Software Publishers Software Publishers
5242 Agencies, Brokerages, and Other Insurance Related Activities Insurance Agencies & Brokerages
5413 Architectural, Engineering, and Related Services Architecture & Engineering
6241 Individual and Family Services Individual & Family Services
6243 Vocational Rehabilitation Services Vocational Rehabilitation

Plus default ("Other / General"), for a tenant whose industry has no profile.

Where a tenant's code is used

Concern How it uses the code Code
Registration The Industry drop-down offers the production profiles plus "Other / General" (REGISTRATION_NAICS_OPTIONS). The tenant stores naicsCode, plus naicsProfileCode from resolveProfile() src/lib/naics/profiles.ts, src/app/api/auth/register-verify/route.ts
Which questions A question targets industries with industryProfile.appliesTo: ["2211", …] or universal: true (optionally exclude). It's compiled into each DAG node's naicsApplicability, which governs visibility (ADR 0015) src/lib/risk-content/question-applies.ts, src/lib/dag-engine.ts
Score weights The tenant's row in Firestore risk_industry_weights: own code → longest prefix → default (#761/#762) src/lib/risk-content/industry-weights-source.ts, src/lib/risk-scorer.ts
Category order The same weights row orders an assessment's categories, highest first (#764) src/lib/assessment/group-categories.ts
Recommendations risk_recommendations/{code}, one entry per production code db/actionable-risk-recommendations.json
Titles on screen industryTitle(code) / industryShortTitle(code) and <IndustryLabel> (#763) src/lib/naics/industry-title.ts, src/components/naics/IndustryLabel.tsx
Policy template rules A rule's industryCode matches by prefix (62 matches 6241); rules haven't been moved to 4-digit codes yet src/lib/policies/rule-engine.ts

The full 2022 NAICS list (~2,100 codes, including official sector ranges like 31-33) is in db/naics-2022-full.json, read through src/lib/naics/full-list.ts. It's used to look up and validate arbitrary codes (e.g. a company's own NAICS selection elsewhere); it is not a list of served industries.

Rules for content (enforced by pnpm lint:risk-content)

  • Targeting: appliesTo codes must be 4-digit production codes.
  • Other fields: exclude codes and weightMultipliers keys must be 4-digit codes. 2-/3-digit and range codes are errors (#764).
  • Weights: every production code needs a row in the industry weights, and default must exist.
  • Recommendations: every production code needs an entry in the recommendations.
  • Future release: a question with no current industry is saved as mvpScope: false, which the admin UI shows as "Future release".

Adding a production industry

See parking lot › Adding a new production industry. In short: profile, weights row, questions, recommendations entry, then lint and publish. 2371 (#760) is the worked example.

Common questions

Q: What if a tenant registered with an older or longer code? A: resolveProfile() maps any code to the longest matching profile prefix, and weights do the same. A 6-digit 221122 uses 2211. A code with no matching profile uses default.

Q: Why don't customer assets have a NAICS code? A: NAICS classifies the tenant's own industry, for the risk assessment only.

Q: Where is a tenant's NAICS validated? A: At registration the client can only submit a value from REGISTRATION_NAICS_OPTIONS, and the server re-resolves it with resolveProfile().


Last updated: 2026-10-21