ssot-enforcer

Consolidate duplicated logic into a single source of truth.

14|1|Updated Jun 3, 2026
One-click install
npx skills add https://github.com/cohen-liel/agent-skills --skill ssot-enforcer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssot-enforcer
Source: https://github.com/cohen-liel/agent-skills/tree/main/ssot-enforcer
Command: npx skills add https://github.com/cohen-liel/agent-skills --skill ssot-enforcer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill stops duplicated logic, scattered constants, and parallel implementations from drifting into bugs by making one source of truth the only place that owns shared behavior.

Core Features & Use Cases

  • Duplicate Responsibility Detection: Finds repeated rules, calculations, routes, parsers, and policy decisions before they are copied into new places.
  • Single Owner Consolidation: Moves shared behavior into the natural owner module and routes callers through that central contract.
  • Drift Prevention: Helps teams avoid mismatched thresholds, stale defaults, and conflicting fallback logic across server, UI, and service layers.
  • Use Case: A pricing threshold is hardcoded in checkout and also shown in the UI; this Skill consolidates the threshold into one shared module and updates both paths to read from it.

Quick Start

Use the ssot-enforcer skill to find duplicated behavior in the codebase, move it behind one shared owner, and verify that all call sites now use the same source of truth.

Frequently Asked Questions about ssot-enforcer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consolidate duplicated logic into a single source of truth during refactoring?

To consolidate duplicated logic into a single source of truth, you scan producer and consumer paths to identify the natural owner module, then replace local copies with shared exports. This ensures all call sites route through one central contract instead of maintaining parallel implementations.

What is single source of truth enforcement in code review?

Single source of truth enforcement in code review detects repeated rules, calculations, and routing decisions before they are copied into new places. It prevents drift by moving shared behavior into the natural owner module and routing all callers through that central contract.

How do I prevent drift caused by scattered constants and parallel implementations?

Preventing drift caused by scattered constants requires moving shared behavior into one owner module and replacing local copies with shared exports. This approach avoids mismatched thresholds, stale defaults, and conflicting fallback logic across server, UI, and service layers.

How do I verify a consolidated contract after deduplicating shared calculations?

You verify a consolidated contract after deduplicating shared calculations by running tests and performing searches across the codebase. This confirms that all producer and consumer paths now use the same shared exports instead of local fallback branches.

Can I use single source of truth consolidation for routing decisions and policy parsers?

Yes, single source of truth consolidation applies to routing decisions, policy parsers, and shared calculations. It identifies the owner module for these repeated behaviors and updates all call sites to read from the centralized export instead of local copies.