@vee-stack/delta-cli 2.0.8 → 2.0.10

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.
Files changed (183) hide show
  1. package/dist/adapters/analysis.adapter.d.ts +29 -0
  2. package/dist/analyzer/commands/analyze.d.ts +14 -0
  3. package/dist/analyzer/commands/config.d.ts +12 -0
  4. package/dist/analyzer/commands/report.d.ts +11 -0
  5. package/dist/analyzer/generators/report.generator.d.ts +43 -0
  6. package/dist/analyzer/index.d.ts +8 -0
  7. package/dist/analyzer/scanners/project.scanner.d.ts +29 -0
  8. package/dist/analyzer/validators/contracts.validator.d.ts +27 -0
  9. package/dist/analyzer/validators/maintainability.validator.d.ts +27 -0
  10. package/dist/analyzer/validators/observability.validator.d.ts +27 -0
  11. package/dist/analyzer/validators/performance.validator.d.ts +27 -0
  12. package/dist/analyzer/validators/security.validator.d.ts +27 -0
  13. package/dist/analyzer/validators/soc.validator.d.ts +27 -0
  14. package/dist/auth/device-auth.d.ts +18 -0
  15. package/dist/auth/secure-auth.d.ts +35 -0
  16. package/dist/bundle.mjs +422 -0
  17. package/dist/commands/analyze.d.ts +12 -0
  18. package/dist/commands/auth-new.d.ts +6 -0
  19. package/dist/commands/auth.d.ts +17 -0
  20. package/dist/commands/config.d.ts +8 -0
  21. package/dist/commands/deploy.d.ts +5 -0
  22. package/dist/commands/init.d.ts +7 -0
  23. package/dist/commands/logout.d.ts +2 -0
  24. package/dist/commands/plugins.d.ts +7 -0
  25. package/dist/commands/status.d.ts +5 -0
  26. package/dist/commands/sync.d.ts +5 -0
  27. package/dist/commands/whoami.d.ts +4 -0
  28. package/dist/components/Dashboard.d.ts +8 -0
  29. package/dist/components/DeltaApp.d.ts +13 -0
  30. package/dist/components/UnifiedManager.d.ts +10 -0
  31. package/dist/core/audit.d.ts +60 -0
  32. package/dist/core/completion.d.ts +79 -0
  33. package/dist/core/contracts.d.ts +127 -0
  34. package/dist/core/engine.d.ts +26 -0
  35. package/dist/core/exit-codes.d.ts +19 -0
  36. package/dist/core/hooks.d.ts +50 -0
  37. package/dist/{apps/cli/src/core/index.js → core/index.d.ts} +1 -1
  38. package/dist/core/policy.d.ts +24 -0
  39. package/dist/core/profiles.d.ts +45 -0
  40. package/dist/core/wizard.d.ts +28 -0
  41. package/dist/interactive/index.d.ts +5 -0
  42. package/dist/plugins/GitStatusPlugin.d.ts +25 -0
  43. package/dist/providers/ai-provider.d.ts +21 -0
  44. package/dist/providers/local-provider.d.ts +21 -0
  45. package/dist/providers/remote-provider.d.ts +15 -0
  46. package/dist/telemetry/wrapper.d.ts +18 -0
  47. package/dist/types/api.d.ts +46 -0
  48. package/dist/ui.d.ts +52 -0
  49. package/dist/welcome.d.ts +8 -0
  50. package/package.json +8 -8
  51. package/dist/analyzer/commands/analyze.js +0 -260
  52. package/dist/analyzer/commands/config.js +0 -83
  53. package/dist/analyzer/commands/report.js +0 -38
  54. package/dist/analyzer/generators/report.generator.js +0 -123
  55. package/dist/analyzer/index.js +0 -44
  56. package/dist/analyzer/scanners/project.scanner.js +0 -92
  57. package/dist/analyzer/validators/contracts.validator.js +0 -42
  58. package/dist/analyzer/validators/maintainability.validator.js +0 -40
  59. package/dist/analyzer/validators/observability.validator.js +0 -39
  60. package/dist/analyzer/validators/performance.validator.js +0 -42
  61. package/dist/analyzer/validators/security.validator.js +0 -66
  62. package/dist/analyzer/validators/soc.validator.js +0 -75
  63. package/dist/apps/cli/src/analyzer/commands/analyze.js +0 -256
  64. package/dist/apps/cli/src/analyzer/commands/config.js +0 -83
  65. package/dist/apps/cli/src/analyzer/commands/report.js +0 -38
  66. package/dist/apps/cli/src/analyzer/generators/report.generator.js +0 -123
  67. package/dist/apps/cli/src/analyzer/index.js +0 -44
  68. package/dist/apps/cli/src/analyzer/scanners/project.scanner.js +0 -92
  69. package/dist/apps/cli/src/analyzer/validators/contracts.validator.js +0 -42
  70. package/dist/apps/cli/src/analyzer/validators/maintainability.validator.js +0 -40
  71. package/dist/apps/cli/src/analyzer/validators/observability.validator.js +0 -39
  72. package/dist/apps/cli/src/analyzer/validators/performance.validator.js +0 -42
  73. package/dist/apps/cli/src/analyzer/validators/security.validator.js +0 -66
  74. package/dist/apps/cli/src/analyzer/validators/soc.validator.js +0 -75
  75. package/dist/apps/cli/src/auth/secure-auth.js +0 -312
  76. package/dist/apps/cli/src/commands/analyze.js +0 -286
  77. package/dist/apps/cli/src/commands/auth-new.js +0 -37
  78. package/dist/apps/cli/src/commands/auth.js +0 -122
  79. package/dist/apps/cli/src/commands/config.js +0 -49
  80. package/dist/apps/cli/src/commands/deploy.js +0 -6
  81. package/dist/apps/cli/src/commands/init.js +0 -47
  82. package/dist/apps/cli/src/commands/logout.js +0 -23
  83. package/dist/apps/cli/src/commands/plugins.js +0 -21
  84. package/dist/apps/cli/src/commands/status.js +0 -80
  85. package/dist/apps/cli/src/commands/sync.js +0 -6
  86. package/dist/apps/cli/src/commands/whoami.js +0 -115
  87. package/dist/apps/cli/src/components/Dashboard.js +0 -168
  88. package/dist/apps/cli/src/components/DeltaApp.js +0 -56
  89. package/dist/apps/cli/src/components/UnifiedManager.js +0 -324
  90. package/dist/apps/cli/src/core/audit.js +0 -184
  91. package/dist/apps/cli/src/core/completion.js +0 -294
  92. package/dist/apps/cli/src/core/contracts.js +0 -6
  93. package/dist/apps/cli/src/core/engine.js +0 -124
  94. package/dist/apps/cli/src/core/exit-codes.js +0 -71
  95. package/dist/apps/cli/src/core/hooks.js +0 -181
  96. package/dist/apps/cli/src/core/policy.js +0 -115
  97. package/dist/apps/cli/src/core/profiles.js +0 -161
  98. package/dist/apps/cli/src/core/wizard.js +0 -203
  99. package/dist/apps/cli/src/index.js +0 -636
  100. package/dist/apps/cli/src/interactive/index.js +0 -11
  101. package/dist/apps/cli/src/plugins/GitStatusPlugin.js +0 -99
  102. package/dist/apps/cli/src/providers/ai-provider.js +0 -74
  103. package/dist/apps/cli/src/providers/local-provider.js +0 -302
  104. package/dist/apps/cli/src/providers/remote-provider.js +0 -100
  105. package/dist/apps/cli/src/types/api.js +0 -3
  106. package/dist/apps/cli/src/ui.js +0 -219
  107. package/dist/apps/cli/src/welcome.js +0 -81
  108. package/dist/auth/secure-auth.js +0 -372
  109. package/dist/bundle.js +0 -504
  110. package/dist/commands/analyze.js +0 -390
  111. package/dist/commands/auth-new.js +0 -37
  112. package/dist/commands/auth.js +0 -134
  113. package/dist/commands/config.js +0 -51
  114. package/dist/commands/deploy.js +0 -6
  115. package/dist/commands/init.js +0 -47
  116. package/dist/commands/logout.js +0 -31
  117. package/dist/commands/plugins.js +0 -21
  118. package/dist/commands/status.js +0 -82
  119. package/dist/commands/sync.js +0 -6
  120. package/dist/commands/whoami.js +0 -72
  121. package/dist/components/Dashboard.js +0 -169
  122. package/dist/components/DeltaApp.js +0 -57
  123. package/dist/components/UnifiedManager.js +0 -344
  124. package/dist/core/audit.js +0 -184
  125. package/dist/core/completion.js +0 -294
  126. package/dist/core/contracts.js +0 -6
  127. package/dist/core/engine.js +0 -124
  128. package/dist/core/exit-codes.js +0 -71
  129. package/dist/core/hooks.js +0 -181
  130. package/dist/core/index.js +0 -7
  131. package/dist/core/policy.js +0 -115
  132. package/dist/core/profiles.js +0 -161
  133. package/dist/core/wizard.js +0 -203
  134. package/dist/index.js +0 -387
  135. package/dist/interactive/index.js +0 -11
  136. package/dist/packages/domain/src/constitution/contracts/index.js +0 -43
  137. package/dist/packages/domain/src/constitution/contracts/ts.rules.js +0 -268
  138. package/dist/packages/domain/src/constitution/index.js +0 -139
  139. package/dist/packages/domain/src/constitution/maintainability/index.js +0 -43
  140. package/dist/packages/domain/src/constitution/maintainability/ts.rules.js +0 -344
  141. package/dist/packages/domain/src/constitution/observability/index.js +0 -43
  142. package/dist/packages/domain/src/constitution/observability/ts.rules.js +0 -307
  143. package/dist/packages/domain/src/constitution/performance/index.js +0 -43
  144. package/dist/packages/domain/src/constitution/performance/ts.rules.js +0 -325
  145. package/dist/packages/domain/src/constitution/security/index.js +0 -50
  146. package/dist/packages/domain/src/constitution/security/ts.rules.js +0 -267
  147. package/dist/packages/domain/src/constitution/soc/index.js +0 -43
  148. package/dist/packages/domain/src/constitution/soc/ts.rules.js +0 -360
  149. package/dist/packages/domain/src/contracts/analysis.contract.js +0 -18
  150. package/dist/packages/domain/src/contracts/index.js +0 -7
  151. package/dist/packages/domain/src/contracts/projects.contract.js +0 -18
  152. package/dist/packages/domain/src/control/registry/rules.registry.js +0 -29
  153. package/dist/packages/domain/src/control/schemas/policies.js +0 -6
  154. package/dist/packages/domain/src/core/analysis/discovery.js +0 -163
  155. package/dist/packages/domain/src/core/analysis/engine.contract.js +0 -298
  156. package/dist/packages/domain/src/core/analysis/engine.js +0 -77
  157. package/dist/packages/domain/src/core/analysis/index.js +0 -14
  158. package/dist/packages/domain/src/core/analysis/orchestrator.js +0 -242
  159. package/dist/packages/domain/src/core/comparison/engine.js +0 -29
  160. package/dist/packages/domain/src/core/comparison/index.js +0 -5
  161. package/dist/packages/domain/src/core/documentation/index.js +0 -5
  162. package/dist/packages/domain/src/core/documentation/pipeline.js +0 -41
  163. package/dist/packages/domain/src/core/fs/adapter.js +0 -111
  164. package/dist/packages/domain/src/core/fs/index.js +0 -5
  165. package/dist/packages/domain/src/core/parser/unified-parser.js +0 -166
  166. package/dist/packages/domain/src/index.js +0 -33
  167. package/dist/packages/domain/src/plugin/registry.js +0 -195
  168. package/dist/packages/domain/src/plugin/types.js +0 -6
  169. package/dist/packages/domain/src/ports/analysis.engine.js +0 -7
  170. package/dist/packages/domain/src/ports/audit.logger.js +0 -7
  171. package/dist/packages/domain/src/ports/project.repository.js +0 -7
  172. package/dist/packages/domain/src/rules/index.js +0 -134
  173. package/dist/packages/domain/src/types/analysis.js +0 -6
  174. package/dist/packages/domain/src/types/errors.js +0 -53
  175. package/dist/packages/domain/src/types/fs.js +0 -6
  176. package/dist/packages/domain/src/types/index.js +0 -7
  177. package/dist/plugins/GitStatusPlugin.js +0 -93
  178. package/dist/providers/ai-provider.js +0 -74
  179. package/dist/providers/local-provider.js +0 -304
  180. package/dist/providers/remote-provider.js +0 -100
  181. package/dist/types/api.js +0 -3
  182. package/dist/ui.js +0 -219
  183. package/dist/welcome.js +0 -81
@@ -1,268 +0,0 @@
1
- /**
2
- * Delta Constitution - Contracts Rules
3
- * @description Contract standards and API interface definitions
4
- * @version 1.0.0
5
- * @see docs/architecture/CONSTITUTION.md
6
- */
7
- // =============================================================================
8
- // CONTRACTS RULE DEFINITIONS
9
- // =============================================================================
10
- export const ContractsRules = {
11
- version: '1.0.0',
12
- lastUpdated: '2026-02-10',
13
- // ============================================================================
14
- // 1. CONTRACT REQUIREMENTS
15
- // ============================================================================
16
- requirements: {
17
- enabled: true,
18
- required: true,
19
- description: 'Every Module must have a corresponding Contract',
20
- requiredContracts: [
21
- {
22
- name: 'AuthContract',
23
- file: 'src/contracts/auth.contract.ts',
24
- module: 'src/modules/auth/',
25
- features: ['src/features/auth/'],
26
- },
27
- {
28
- name: 'UploadContract',
29
- file: 'src/contracts/upload.contract.ts',
30
- module: 'src/modules/upload/',
31
- features: ['src/features/upload/'],
32
- },
33
- {
34
- name: 'ProjectsContract',
35
- file: 'src/contracts/projects.contract.ts',
36
- module: 'src/modules/projects/',
37
- features: ['src/features/projects/'],
38
- },
39
- {
40
- name: 'AnalysisContract',
41
- file: 'src/contracts/analysis.contract.ts',
42
- module: 'src/modules/analysis/',
43
- features: ['src/features/dashboard/'],
44
- },
45
- ],
46
- rules: [
47
- {
48
- id: 'CONTRACT-001',
49
- name: 'One Contract Per Module',
50
- description: 'Every module must export a corresponding contract',
51
- severity: 'error',
52
- },
53
- {
54
- id: 'CONTRACT-002',
55
- name: 'Features Use Contracts Only',
56
- description: 'Features can only import from Contracts, not Modules directly',
57
- severity: 'error',
58
- },
59
- ],
60
- },
61
- // ============================================================================
62
- // 2. CONTRACT STRUCTURE
63
- // ============================================================================
64
- structure: {
65
- enabled: true,
66
- required: true,
67
- description: 'Standard contract file structure',
68
- requiredSections: {
69
- header: {
70
- description: 'JSDoc header with version and stability',
71
- template: `
72
- /**
73
- * [Name] Contract v[version]
74
- * @description [Description]
75
- * @version [major].[minor].[patch]
76
- * @stability [stable|experimental|deprecated]
77
- */`,
78
- },
79
- inputContracts: {
80
- description: 'Input interfaces and types',
81
- naming: '[Action]Input',
82
- example: 'InitUploadInput, UploadChunkInput',
83
- },
84
- outputContracts: {
85
- description: 'Output interfaces and types',
86
- naming: '[Action]Output or [Entity]',
87
- example: 'UploadSession, UploadResult',
88
- },
89
- errorContracts: {
90
- description: 'Error types and codes',
91
- required: true,
92
- },
93
- },
94
- example: `
95
- /**
96
- * Upload Contract v1.0.0
97
- * @description Public API for File Upload operations
98
- * @version 1.0.0
99
- * @stability stable
100
- */
101
-
102
- // Input Contracts
103
- export interface InitUploadInput {
104
- filename: string;
105
- fileSize: number;
106
- // ...
107
- }
108
-
109
- // Output Contracts
110
- export interface UploadSession {
111
- id: string;
112
- status: 'initializing' | 'uploading' | 'completed';
113
- // ...
114
- }
115
-
116
- // Error Contracts
117
- export interface UploadError {
118
- code: string;
119
- message: string;
120
- statusCode: number;
121
- }
122
- `,
123
- },
124
- // ============================================================================
125
- // 3. VERSIONING
126
- // ============================================================================
127
- versioning: {
128
- enabled: true,
129
- required: true,
130
- description: 'Semantic versioning for contracts',
131
- scheme: 'semver',
132
- rules: {
133
- major: {
134
- bump: 'Breaking changes',
135
- examples: [
136
- 'Removing or renaming interfaces',
137
- 'Changing required fields',
138
- 'Changing behavior significantly',
139
- ],
140
- },
141
- minor: {
142
- bump: 'New features, backwards compatible',
143
- examples: ['Adding optional fields', 'Adding new interfaces', 'Extending functionality'],
144
- },
145
- patch: {
146
- bump: 'Bug fixes, documentation',
147
- examples: ['Fixing types', 'Documentation updates', 'Non-breaking corrections'],
148
- },
149
- },
150
- stability: {
151
- stable: 'Production ready, no breaking changes expected',
152
- experimental: 'May change, not recommended for production',
153
- deprecated: 'Will be removed in next major version',
154
- },
155
- },
156
- // ============================================================================
157
- // 4. INTERFACE DESIGN
158
- // ============================================================================
159
- interfaceDesign: {
160
- enabled: true,
161
- required: true,
162
- description: 'Best practices for contract interfaces',
163
- naming: {
164
- inputs: '[Action]Input',
165
- outputs: '[Action]Output or descriptive noun',
166
- errors: '[Domain]Error',
167
- enums: 'PascalCase',
168
- },
169
- requiredFields: {
170
- id: 'Unique identifier for tracking',
171
- timestamp: 'ISO 8601 timestamp',
172
- userId: 'Actor who performed the action',
173
- },
174
- optionalFields: {
175
- metadata: 'Additional context (key-value)',
176
- tags: 'Labels for categorization',
177
- },
178
- documentation: {
179
- required: true,
180
- format: 'JSDoc',
181
- content: 'Purpose, type, examples for each field',
182
- },
183
- },
184
- // ============================================================================
185
- // 5. VALIDATION
186
- // ============================================================================
187
- validation: {
188
- enabled: true,
189
- required: true,
190
- description: 'Contract input validation requirements',
191
- schemas: {
192
- required: true,
193
- tool: 'Zod',
194
- location: 'Contracts must include Zod schemas',
195
- },
196
- runtime: {
197
- description: 'Validate at runtime using Zod',
198
- pattern: 'parse() or safeParse()',
199
- },
200
- compileTime: {
201
- description: 'TypeScript types from Zod schemas',
202
- pattern: 'z.infer<typeof Schema>',
203
- },
204
- },
205
- // ============================================================================
206
- // 6. BREAKING CHANGES
207
- // ============================================================================
208
- breakingChanges: {
209
- enabled: true,
210
- required: true,
211
- description: 'Handling breaking changes in contracts',
212
- policy: {
213
- deprecation: 'Mark old contract as deprecated for 1 major version',
214
- migration: 'Provide migration guide',
215
- coexistence: 'Support both versions during transition period',
216
- },
217
- process: [
218
- '1. Mark current contract as @deprecated',
219
- '2. Create new contract with v[major+1]',
220
- '3. Update all consumers gradually',
221
- '4. Remove deprecated contract in next major release',
222
- ],
223
- },
224
- };
225
- export function validateContract(check) {
226
- const violations = [];
227
- let score = 100;
228
- if (!check.hasVersion) {
229
- violations.push('CONTRACT-STRUCT-001: Missing version in contract header');
230
- score -= 15;
231
- }
232
- if (!check.hasStability) {
233
- violations.push('CONTRACT-STRUCT-002: Missing stability annotation');
234
- score -= 10;
235
- }
236
- if (!check.hasInputContracts) {
237
- violations.push('CONTRACT-STRUCT-003: Missing input contracts');
238
- score -= 20;
239
- }
240
- if (!check.hasOutputContracts) {
241
- violations.push('CONTRACT-STRUCT-004: Missing output contracts');
242
- score -= 20;
243
- }
244
- if (!check.hasErrorContracts) {
245
- violations.push('CONTRACT-STRUCT-005: Missing error contracts');
246
- score -= 15;
247
- }
248
- if (!check.hasZodSchemas) {
249
- violations.push('CONTRACT-VALID-001: Missing Zod validation schemas');
250
- score -= 20;
251
- }
252
- return {
253
- valid: violations.length === 0,
254
- violations,
255
- score: Math.max(0, score),
256
- };
257
- }
258
- export function checkContractCoverage(existingContracts, requiredContracts) {
259
- const missing = requiredContracts.filter(required => !existingContracts.some(existing => existing.includes(required)));
260
- const percentage = Math.round(((requiredContracts.length - missing.length) / requiredContracts.length) * 100);
261
- return {
262
- complete: missing.length === 0,
263
- missing,
264
- percentage,
265
- };
266
- }
267
- export default ContractsRules;
268
- //# sourceMappingURL=ts.rules.js.map
@@ -1,139 +0,0 @@
1
- /**
2
- * Delta Constitution
3
- * @description The 7 Axes of Delta Architecture - Multi-language support
4
- * @version 1.0.0
5
- * @see docs/architecture/CONSTITUTION.md
6
- *
7
- * This module exports all constitutional rules for analyzing projects
8
- * against the Delta Architecture standards.
9
- */
10
- // =============================================================================
11
- // 7 AXES EXPORTS
12
- // =============================================================================
13
- export * as Security from './security';
14
- export * as Performance from './performance';
15
- export * as Soc from './soc';
16
- export * as Contracts from './contracts';
17
- export * as Maintainability from './maintainability';
18
- export * as Observability from './observability';
19
- // =============================================================================
20
- // 7 AXES METADATA
21
- // =============================================================================
22
- export const SevenAxes = [
23
- {
24
- name: 'Security',
25
- weight: 25,
26
- description: 'Policy-driven, Fail-Closed, Audit, Rate Limiting',
27
- critical: true,
28
- },
29
- {
30
- name: 'Performance',
31
- weight: 20,
32
- description: 'Lazy Loading, Caching, Code Splitting',
33
- critical: false,
34
- },
35
- {
36
- name: 'Separation of Concerns',
37
- weight: 20,
38
- description: 'Layer boundaries, import rules, locality',
39
- critical: true,
40
- },
41
- {
42
- name: 'Contracts',
43
- weight: 15,
44
- description: 'Type-safe, versioned interfaces',
45
- critical: true,
46
- },
47
- {
48
- name: 'Maintainability',
49
- weight: 10,
50
- description: 'Tests, Docs, Pure Functions',
51
- critical: false,
52
- },
53
- {
54
- name: 'Observability',
55
- weight: 5,
56
- description: 'Health Checks, Logging, Metrics',
57
- critical: false,
58
- },
59
- {
60
- name: 'Best Practices',
61
- weight: 5,
62
- description: 'Clean Architecture, Stateless Core',
63
- critical: false,
64
- },
65
- ];
66
- // =============================================================================
67
- // SUPPORTED LANGUAGES
68
- // =============================================================================
69
- export const SupportedLanguages = [
70
- {
71
- code: 'ts',
72
- name: 'TypeScript',
73
- extension: '.ts',
74
- runtime: 'Node.js',
75
- status: 'stable',
76
- },
77
- {
78
- code: 'js',
79
- name: 'JavaScript',
80
- extension: '.js',
81
- runtime: 'Node.js',
82
- status: 'stable',
83
- },
84
- // Future support:
85
- // { code: 'py', name: 'Python', extension: '.py', runtime: 'CPython', status: 'planned' },
86
- // { code: 'java', name: 'Java', extension: '.java', runtime: 'JVM', status: 'planned' },
87
- // { code: 'cs', name: 'C#', extension: '.cs', runtime: '.NET', status: 'planned' },
88
- // { code: 'go', name: 'Go', extension: '.go', runtime: 'Go', status: 'planned' },
89
- ];
90
- // =============================================================================
91
- // CONSTITUTION VERSION
92
- // =============================================================================
93
- export const ConstitutionVersion = {
94
- major: 1,
95
- minor: 0,
96
- patch: 0,
97
- full: '1.0.0',
98
- date: '2026-02-10',
99
- status: 'stable',
100
- };
101
- export function calculateOverallScore(axisScores) {
102
- const totalWeight = SevenAxes.reduce((sum, axis) => sum + axis.weight, 0);
103
- let weightedScore = 0;
104
- SevenAxes.forEach(axis => {
105
- const score = axisScores[axis.name] || 0;
106
- weightedScore += (score * axis.weight) / 100;
107
- });
108
- const percentage = Math.round((weightedScore / totalWeight) * 100);
109
- const grade = percentage >= 90
110
- ? 'A'
111
- : percentage >= 80
112
- ? 'B'
113
- : percentage >= 70
114
- ? 'C'
115
- : percentage >= 60
116
- ? 'D'
117
- : 'F';
118
- return { total: weightedScore, percentage, grade };
119
- }
120
- export function getRulesForLanguage(_language) {
121
- // Language-specific rules can be loaded from axis subdirectories
122
- // e.g., Security.ts, Performance.ts, etc.
123
- return null;
124
- }
125
- export function isLanguageSupported(language) {
126
- return SupportedLanguages.some(lang => lang.code === language.toLowerCase() || lang.name.toLowerCase() === language.toLowerCase());
127
- }
128
- // =============================================================================
129
- // DEFAULT EXPORT
130
- // =============================================================================
131
- export default {
132
- version: ConstitutionVersion,
133
- axes: SevenAxes,
134
- languages: SupportedLanguages,
135
- calculateOverallScore,
136
- getRulesForLanguage,
137
- isLanguageSupported,
138
- };
139
- //# sourceMappingURL=index.js.map
@@ -1,43 +0,0 @@
1
- /**
2
- * Delta Constitution - Maintainability Rules Index
3
- * @description Maintainability rules for all supported languages
4
- * @version 1.0.0
5
- */
6
- // TypeScript / Node.js Rules
7
- export { default as ts, MaintainabilityRules as TSMaintainabilityRules } from './ts.rules';
8
- // Language-agnostic exports
9
- export const MaintainabilityAxis = {
10
- name: 'Maintainability',
11
- description: 'Locality of Behavior, Tests, Docs, Pure Functions',
12
- weight: 10,
13
- languages: ['typescript', 'javascript', 'node'],
14
- principles: [
15
- {
16
- id: 'MAINT-001',
17
- name: 'Locality of Behavior',
18
- description: 'All related code in one place',
19
- },
20
- {
21
- id: 'MAINT-002',
22
- name: 'Testing',
23
- description: 'Unit ≥80%, Integration ≥60%, E2E ≥30% coverage',
24
- },
25
- {
26
- id: 'MAINT-003',
27
- name: 'Documentation',
28
- description: 'JSDoc, READMEs, Blueprints for every layer',
29
- },
30
- {
31
- id: 'MAINT-004',
32
- name: 'Pure Functions',
33
- description: 'Core uses pure functions only',
34
- },
35
- {
36
- id: 'MAINT-005',
37
- name: 'Code Quality',
38
- description: 'Linting, formatting, complexity limits',
39
- },
40
- ],
41
- };
42
- export default MaintainabilityAxis;
43
- //# sourceMappingURL=index.js.map