@company-semantics/contracts 0.130.0 → 0.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.130.0",
3
+ "version": "0.131.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,15 +15,19 @@ import type { CheckResult, Soc2ControlArea } from './types';
15
15
  // =============================================================================
16
16
 
17
17
  /**
18
- * Three-tier size limit for a file role.
19
- * - target: Ideal maximum (for new code)
20
- * - warning: Soft limit (CI warns but passes)
21
- * - hard: Hard limit (CI fails)
18
+ * Role limit for the file-size guard, expressed as fractions of the repo's
19
+ * file-size envelope (envelope = universalLimit × (1 + overrideMaxOveragePct)).
20
+ *
21
+ * Only warnings are role-specific; the envelope is a single hard authority
22
+ * that applies to every file regardless of role.
23
+ *
24
+ * @field warnPct — Warning threshold as a fraction of envelope. Must be in (0, 1).
25
+ * @field targetPct — Optional ideal ceiling for new code in this role, as a
26
+ * fraction of envelope. Informational only — not enforced.
22
27
  */
23
28
  export interface RoleLimit {
24
- target: number;
25
- warning: number;
26
- hard: number;
29
+ warnPct: number;
30
+ targetPct?: number;
27
31
  }
28
32
 
29
33
  // =============================================================================
@@ -74,24 +78,6 @@ export interface GuardConfig {
74
78
  */
75
79
  universalWarningThreshold: number;
76
80
 
77
- /**
78
- * Export complexity thresholds.
79
- * Files with more exports than these limits are flagged.
80
- */
81
- exportLimits?: {
82
- warning: number;
83
- error: number;
84
- };
85
-
86
- /**
87
- * Import fanout thresholds.
88
- * Files with more imports than these limits are flagged.
89
- */
90
- importLimits?: {
91
- warning: number;
92
- error: number;
93
- };
94
-
95
81
  /**
96
82
  * Domain directories to check for READMEs.
97
83
  * Example: ['src/domain', 'src/providers', 'src/interfaces']