constants-governance

Official

Ensure safe, consistent financial constants

AuthorNorfolk-Group
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents undefined or inconsistent financial defaults and NaN propagation in a hospitality financial model by centralizing constants, enforcing naming rules, and applying numeric guards and tests.

Core Features & Use Cases

  • Single source of truth for financial defaults in a shared constants file so server and client use identical fallback values.
  • Client barrel pattern that re-exports shared constants and defines client-only presentation defaults.
  • Safe-number guard patterns and zero-guards around loan calculations to stop NaN and Infinity from corrupting downstream results.
  • Automated detection tests that prevent magic numbers and ensure tests derive expectations from constants.
  • Use when adding or changing financial constants, diagnosing NaN incidents, or writing tests that depend on default values.

Quick Start

Validate and update the shared constants file, add safe-number guards around any new arithmetic, and run the hardcoded-number detection test to confirm no magic literals were introduced.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: constants-governance
Download link: https://github.com/Norfolk-Group/H-Analytics/archive/main.zip#constants-governance

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.