@multisystemsuite/eg-shared
v0.1.0
Published
Shared types and utilities for engineering governance
Readme
@multisystemsuite/eg-shared
Shared types, constants, and utilities used across all engineering governance packages.
Exports
| Category | Contents |
|----------|----------|
| Types | AnalysisContext, AnalysisResult, DashboardMetrics, TenantContext, GitProviderConfig, NotificationConfig, PullRequestInfo, ReviewComment, AuditLogEntry |
| Constants | DEFAULT_THRESHOLDS, SECRET_PATTERNS, SUPPORTED_FRAMEWORKS |
| Utils | calculateOverallHealth, createRecommendation, readTextFiles, shouldExclude |
Usage
import {
DEFAULT_THRESHOLDS,
calculateOverallHealth,
createRecommendation,
type AnalysisContext,
type DashboardMetrics,
} from '@multisystemsuite/eg-shared';
const context: AnalysisContext = {
projectPath: './src',
framework: 'react',
excludePatterns: ['**/*.test.ts'],
};Default Thresholds
| Metric | Warning | Error | Critical | |--------|---------|-------|----------| | File lines | 500 | 1,000 | 2,000 | | Function lines | 50 | 100 | 200 | | Class lines | 300 | 500 | 800 | | Cyclomatic complexity | 10 | 20 | 30 | | Duplicate code % | 5 | 10 | 20 | | Documentation coverage | 70% | 50% | 30% | | Review SLA (hours) | 24 | 48 | 72 |
Scripts
pnpm --filter @multisystemsuite/eg-shared build
pnpm --filter @multisystemsuite/eg-shared typecheck