@devtrack-solution/codesdd 1.2.3 → 1.2.4

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 (213) hide show
  1. package/.sdd/skills/curated/devtrack-api/SKILL.md +98 -12
  2. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +10 -0
  3. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +10 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +10 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +10 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +10 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +5 -3
  8. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +12 -0
  9. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +61 -5
  10. package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
  11. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1951 -0
  12. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +16 -14
  13. package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
  14. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +19 -2
  15. package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
  16. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
  17. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +42 -0
  18. package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
  19. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -7
  20. package/README.md +280 -29
  21. package/dist/applications/sdd/index.d.ts +16 -0
  22. package/dist/applications/sdd/index.js +16 -0
  23. package/dist/cli/program.js +180 -11
  24. package/dist/commands/config.js +197 -10
  25. package/dist/commands/sdd/execution.js +408 -16
  26. package/dist/commands/sdd/plugin.js +5 -0
  27. package/dist/commands/sdd/shared.d.ts +1 -0
  28. package/dist/commands/sdd/shared.js +10 -0
  29. package/dist/commands/sdd.js +157 -7
  30. package/dist/core/cli/command-matrix.d.ts +18 -0
  31. package/dist/core/cli/command-matrix.js +157 -0
  32. package/dist/core/cli-command-quality.js +11 -0
  33. package/dist/core/completions/command-registry.js +45 -0
  34. package/dist/core/config-schema.d.ts +31 -1
  35. package/dist/core/config-schema.js +79 -5
  36. package/dist/core/config.d.ts +1 -0
  37. package/dist/core/config.js +11 -0
  38. package/dist/core/global-config.d.ts +29 -0
  39. package/dist/core/init.d.ts +2 -2
  40. package/dist/core/init.js +13 -14
  41. package/dist/core/sdd/agent-binding.d.ts +19 -19
  42. package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
  43. package/dist/core/sdd/agent-runtime-contract.js +200 -0
  44. package/dist/core/sdd/allocator-recovery.d.ts +14 -0
  45. package/dist/core/sdd/allocator-recovery.js +30 -0
  46. package/dist/core/sdd/allocator-security.d.ts +18 -0
  47. package/dist/core/sdd/allocator-security.js +36 -0
  48. package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
  49. package/dist/core/sdd/api-foundation-baseline.js +151 -0
  50. package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
  51. package/dist/core/sdd/api-foundation-parity.js +131 -0
  52. package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
  53. package/dist/core/sdd/api-profile-catalog.js +132 -0
  54. package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
  55. package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
  56. package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
  57. package/dist/core/sdd/api-profile-recipes.js +484 -0
  58. package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
  59. package/dist/core/sdd/artifact-id-allocator.js +510 -0
  60. package/dist/core/sdd/check.d.ts +52 -1
  61. package/dist/core/sdd/check.js +326 -11
  62. package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
  63. package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
  64. package/dist/core/sdd/coordination/index.d.ts +1 -0
  65. package/dist/core/sdd/coordination/index.js +1 -0
  66. package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
  67. package/dist/core/sdd/coordination/redis-runtime.js +698 -0
  68. package/dist/core/sdd/deepagent-contracts.d.ts +99 -5
  69. package/dist/core/sdd/deepagent-contracts.js +62 -0
  70. package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
  71. package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
  72. package/dist/core/sdd/default-bootstrap-files.js +14 -10
  73. package/dist/core/sdd/default-skills.js +115 -9
  74. package/dist/core/sdd/devtrack-api-appliance.d.ts +42 -1
  75. package/dist/core/sdd/devtrack-api-appliance.js +159 -32
  76. package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
  77. package/dist/core/sdd/devtrack-api-architecture.js +86 -0
  78. package/dist/core/sdd/docs-sync.js +24 -18
  79. package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
  80. package/dist/core/sdd/domain/capability-diff.js +200 -0
  81. package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
  82. package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
  83. package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
  84. package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
  85. package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
  86. package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
  87. package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
  88. package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
  89. package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
  90. package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
  91. package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
  92. package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
  93. package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
  94. package/dist/core/sdd/foundation-layer-manifest.js +117 -0
  95. package/dist/core/sdd/governance-schemas.d.ts +2 -2
  96. package/dist/core/sdd/governance-schemas.js +11 -2
  97. package/dist/core/sdd/intent-guard.d.ts +22 -0
  98. package/dist/core/sdd/intent-guard.js +67 -0
  99. package/dist/core/sdd/json-schema.js +13 -1
  100. package/dist/core/sdd/legacy-operations.js +169 -5
  101. package/dist/core/sdd/migrate-workspace.js +39 -0
  102. package/dist/core/sdd/package-security-gates.d.ts +21 -0
  103. package/dist/core/sdd/package-security-gates.js +121 -0
  104. package/dist/core/sdd/package-structure-gate.d.ts +85 -3
  105. package/dist/core/sdd/package-structure-gate.js +384 -11
  106. package/dist/core/sdd/parallel-feat-automation.d.ts +185 -7
  107. package/dist/core/sdd/parallel-feat-automation.js +212 -0
  108. package/dist/core/sdd/plugin-broker.d.ts +223 -4
  109. package/dist/core/sdd/plugin-broker.js +10 -0
  110. package/dist/core/sdd/plugin-cli.d.ts +30 -0
  111. package/dist/core/sdd/plugin-cli.js +70 -3
  112. package/dist/core/sdd/plugin-evidence.d.ts +73 -0
  113. package/dist/core/sdd/plugin-manifest.d.ts +69 -1
  114. package/dist/core/sdd/plugin-manifest.js +10 -0
  115. package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
  116. package/dist/core/sdd/plugin-policy.js +6 -1
  117. package/dist/core/sdd/plugin-registry.d.ts +138 -2
  118. package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
  119. package/dist/core/sdd/plugin-sdk-contract.js +268 -0
  120. package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
  121. package/dist/core/sdd/quality-validation.d.ts +89 -16
  122. package/dist/core/sdd/release-readiness.d.ts +68 -0
  123. package/dist/core/sdd/release-readiness.js +767 -0
  124. package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
  125. package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
  126. package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
  127. package/dist/core/sdd/reversa-artifact-writer.js +40 -0
  128. package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
  129. package/dist/core/sdd/reversa-command-policy.js +361 -0
  130. package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
  131. package/dist/core/sdd/reversa-data-extractor.js +73 -0
  132. package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
  133. package/dist/core/sdd/reversa-equivalence.js +34 -0
  134. package/dist/core/sdd/reversa-evidence.d.ts +298 -0
  135. package/dist/core/sdd/reversa-evidence.js +118 -0
  136. package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
  137. package/dist/core/sdd/reversa-reconstruction.js +32 -0
  138. package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
  139. package/dist/core/sdd/reversa-rules-extractor.js +86 -0
  140. package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
  141. package/dist/core/sdd/reversa-source-safety.js +105 -0
  142. package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
  143. package/dist/core/sdd/reversa-surface-scout.js +85 -0
  144. package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
  145. package/dist/core/sdd/reversa-ux-mapper.js +73 -0
  146. package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
  147. package/dist/core/sdd/runtime-boundary-contract.js +90 -0
  148. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
  149. package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
  150. package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
  151. package/dist/core/sdd/services/agent-run.service.js +73 -1
  152. package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
  153. package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
  154. package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
  155. package/dist/core/sdd/services/capability-diff.service.js +26 -0
  156. package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
  157. package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
  158. package/dist/core/sdd/services/context.service.d.ts +43 -340
  159. package/dist/core/sdd/services/context.service.js +323 -9
  160. package/dist/core/sdd/services/decide.service.js +1 -1
  161. package/dist/core/sdd/services/finalize.service.d.ts +27 -0
  162. package/dist/core/sdd/services/finalize.service.js +226 -18
  163. package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
  164. package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
  165. package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
  166. package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
  167. package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
  168. package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
  169. package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
  170. package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
  171. package/dist/core/sdd/state.d.ts +1 -0
  172. package/dist/core/sdd/state.js +266 -34
  173. package/dist/core/sdd/store/sdd-stores.js +2 -2
  174. package/dist/core/sdd/structural-health.d.ts +13 -13
  175. package/dist/core/sdd/types.d.ts +30 -15
  176. package/dist/core/sdd/types.js +4 -0
  177. package/dist/core/sdd/views.js +17 -0
  178. package/dist/core/sdd/workspace-schemas.d.ts +428 -7
  179. package/dist/core/sdd/workspace-schemas.js +223 -70
  180. package/dist/core/shared/skill-generation.d.ts +2 -0
  181. package/dist/core/shared/skill-generation.js +19 -2
  182. package/dist/core/shared/tool-detection.d.ts +19 -0
  183. package/dist/core/shared/tool-detection.js +89 -0
  184. package/dist/domains/sdd/index.d.ts +6 -0
  185. package/dist/domains/sdd/index.js +6 -0
  186. package/dist/infrastructures/sdd/index.d.ts +7 -0
  187. package/dist/infrastructures/sdd/index.js +6 -0
  188. package/dist/presentations/cli/sdd/index.d.ts +3 -0
  189. package/dist/presentations/cli/sdd/index.js +3 -0
  190. package/dist/shared/sdd/index.d.ts +3 -0
  191. package/dist/shared/sdd/index.js +2 -0
  192. package/package.json +14 -10
  193. package/schemas/sdd/2-plan.schema.json +207 -2
  194. package/schemas/sdd/5-quality.schema.json +324 -25
  195. package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
  196. package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
  197. package/schemas/sdd/codesdd-plugin.schema.json +171 -0
  198. package/schemas/sdd/deepagent-run-request.schema.json +316 -0
  199. package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
  200. package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
  201. package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
  202. package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
  203. package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
  204. package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
  205. package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
  206. package/schemas/sdd/plugin-package-governance.schema.json +74 -0
  207. package/schemas/sdd/plugin-registry.schema.json +171 -0
  208. package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
  209. package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
  210. package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
  211. package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
  212. package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
  213. package/schemas/sdd/workspace-catalog.schema.json +5298 -1409
@@ -0,0 +1,268 @@
1
+ import { toJSONSchema, z } from 'zod';
2
+ const JSON_SCHEMA_DRAFT = 'https://json-schema.org/draft/2020-12/schema';
3
+ export const CODESDD_PLUGIN_SDK_PACKAGE_NAME = '@devtrack-solution/codesdd-plugin-sdk';
4
+ export const CODESDD_PLUGIN_PACKAGE_PREFIX = '@devtrack-solution/codesdd-plugin-';
5
+ const SDK_PACKAGE_PATTERN = /^@devtrack-solution\/codesdd-plugin-sdk$/;
6
+ const PLUGIN_PACKAGE_PATTERN = /^@devtrack-solution\/codesdd-plugin-[a-z0-9][a-z0-9-]*$/;
7
+ const SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
8
+ const SEMVER_RANGE_PATTERN = /^(?:[~^]?\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?|[<>]=?\d+\.\d+\.\d+(?:\s+<\d+\.\d+\.\d+)?|\*)$/;
9
+ const FEATURE_REF_PATTERN = /^FEAT-\d{4}$/;
10
+ const DECISION_REF_PATTERN = /^(?:ADR|DEB|EPIC|FEAT|INS)-\d{4}$/;
11
+ const OPERATION_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
12
+ const SAFE_RELATIVE_PATH_PATTERN = /^(?!\/)(?![A-Za-z]:[\\/])(?!.*(?:^|[\\/])\.\.(?:[\\/]|$)).+$/;
13
+ const jsonObjectSchema = z.record(z.string(), z.unknown());
14
+ export const pluginRuntimeLanguageSchema = z.enum([
15
+ 'typescript',
16
+ 'javascript',
17
+ 'python',
18
+ 'java',
19
+ 'go',
20
+ 'rust',
21
+ 'csharp',
22
+ 'php',
23
+ 'ruby',
24
+ 'shell',
25
+ 'other',
26
+ ]);
27
+ export const pluginRuntimeBridgeSchema = z.enum([
28
+ 'node-library',
29
+ 'stdio-json',
30
+ 'process-cli',
31
+ 'http-local',
32
+ 'container',
33
+ 'wasm',
34
+ ]);
35
+ export const pluginRuntimeTransportSchema = z.enum([
36
+ 'sdk-call',
37
+ 'stdin-json',
38
+ 'stdout-json',
39
+ 'file-envelope',
40
+ 'http-json',
41
+ ]);
42
+ export const pluginPackageKindSchema = z.enum([
43
+ 'frontend',
44
+ 'backend',
45
+ 'full-stack',
46
+ 'generator',
47
+ 'validator',
48
+ 'evidence',
49
+ 'agent-adapter',
50
+ 'policy-pack',
51
+ ]);
52
+ export const pluginPackageGovernanceSchema = z
53
+ .object({
54
+ package_name: z.string().regex(PLUGIN_PACKAGE_PATTERN),
55
+ sdk_package: z.string().regex(SDK_PACKAGE_PATTERN).default(CODESDD_PLUGIN_SDK_PACKAGE_NAME),
56
+ sdk_version: z.string().regex(SEMVER_RANGE_PATTERN).default('*'),
57
+ package_kind: pluginPackageKindSchema,
58
+ versioning: z.literal('semver').default('semver'),
59
+ registry: z.enum(['workspace', 'npm', 'private-npm', 'artifact-registry', 'custom']).default('workspace'),
60
+ keywords: z.array(z.string().min(1)).default([]),
61
+ internal_package: z.boolean().default(false),
62
+ })
63
+ .superRefine((value, context) => {
64
+ const requiredKeywords = ['codesdd-plugin', value.package_kind];
65
+ for (const keyword of requiredKeywords) {
66
+ if (!value.keywords.includes(keyword)) {
67
+ context.addIssue({
68
+ code: 'custom',
69
+ path: ['keywords'],
70
+ message: `Plugin package governance must include keyword '${keyword}'.`,
71
+ });
72
+ }
73
+ }
74
+ });
75
+ export const pluginLanguageRuntimeSchema = z
76
+ .object({
77
+ language: pluginRuntimeLanguageSchema,
78
+ runtime: z.string().min(1),
79
+ bridge: pluginRuntimeBridgeSchema,
80
+ input_transport: pluginRuntimeTransportSchema,
81
+ output_transport: pluginRuntimeTransportSchema,
82
+ command: z.string().min(1).optional(),
83
+ args: z.array(z.string()).default([]),
84
+ package_manager: z.string().min(1).optional(),
85
+ min_versions: z.record(z.string(), z.string()).default({}),
86
+ env_allowlist: z.array(z.string().regex(/^[A-Z_][A-Z0-9_]*$/)).default([]),
87
+ })
88
+ .superRefine((runtime, context) => {
89
+ const nodeNative = runtime.language === 'typescript' || runtime.language === 'javascript';
90
+ if (runtime.bridge === 'node-library' && !nodeNative) {
91
+ context.addIssue({
92
+ code: 'custom',
93
+ path: ['bridge'],
94
+ message: 'node-library bridge is only valid for TypeScript or JavaScript plugins.',
95
+ });
96
+ }
97
+ if (runtime.bridge !== 'node-library' && !runtime.command) {
98
+ context.addIssue({
99
+ code: 'custom',
100
+ path: ['command'],
101
+ message: 'Non Node-library plugin runtimes must declare an executable command.',
102
+ });
103
+ }
104
+ if (runtime.bridge === 'stdio-json' && runtime.input_transport !== 'stdin-json') {
105
+ context.addIssue({
106
+ code: 'custom',
107
+ path: ['input_transport'],
108
+ message: 'stdio-json runtimes must receive invocation envelopes through stdin-json.',
109
+ });
110
+ }
111
+ if (runtime.bridge === 'stdio-json' && runtime.output_transport !== 'stdout-json') {
112
+ context.addIssue({
113
+ code: 'custom',
114
+ path: ['output_transport'],
115
+ message: 'stdio-json runtimes must emit responses through stdout-json.',
116
+ });
117
+ }
118
+ });
119
+ export const pluginArtifactLayerSchema = z.enum([
120
+ 'root',
121
+ 'domain',
122
+ 'application',
123
+ 'infrastructure',
124
+ 'presentation',
125
+ 'shared',
126
+ 'tests',
127
+ 'docs',
128
+ 'sdd',
129
+ 'config',
130
+ 'assets',
131
+ ]);
132
+ export const pluginArtifactKindSchema = z.enum([
133
+ 'source',
134
+ 'test',
135
+ 'documentation',
136
+ 'configuration',
137
+ 'schema',
138
+ 'evidence',
139
+ 'migration',
140
+ 'asset',
141
+ 'package-metadata',
142
+ ]);
143
+ export const pluginArtifactRoleSchema = z.enum([
144
+ 'interface',
145
+ 'type',
146
+ 'implementation',
147
+ 'abstraction',
148
+ 'business-object',
149
+ 'value-object',
150
+ 'entity',
151
+ 'repository-port',
152
+ 'use-case',
153
+ 'service',
154
+ 'handler',
155
+ 'adapter',
156
+ 'mapper',
157
+ 'module',
158
+ 'controller',
159
+ 'dto',
160
+ 'validator',
161
+ 'policy',
162
+ 'manifest',
163
+ 'fixture',
164
+ 'test',
165
+ 'documentation',
166
+ 'evidence',
167
+ ]);
168
+ export const pluginArtifactOperationSchema = z.enum([
169
+ 'planned',
170
+ 'created',
171
+ 'modified',
172
+ 'deleted',
173
+ 'unchanged',
174
+ 'validated',
175
+ ]);
176
+ export const pluginArtifactMapEntrySchema = z
177
+ .object({
178
+ path: z.string().regex(SAFE_RELATIVE_PATH_PATTERN),
179
+ operation: pluginArtifactOperationSchema,
180
+ artifact_kind: pluginArtifactKindSchema,
181
+ role: pluginArtifactRoleSchema,
182
+ layer: pluginArtifactLayerSchema,
183
+ content_type: z.string().min(1),
184
+ reason: z.string().min(1),
185
+ language: pluginRuntimeLanguageSchema.optional(),
186
+ context: z.string().min(1).optional(),
187
+ implementation: z.enum(['concrete', 'abstract', 'contract', 'generated', 'manual']).default('manual'),
188
+ decision_refs: z.array(z.string().regex(DECISION_REF_PATTERN)).default([]),
189
+ source_refs: z.array(z.string().min(1)).default([]),
190
+ tags: z.array(z.string().min(1)).default([]),
191
+ metadata: jsonObjectSchema.default({}),
192
+ })
193
+ .superRefine((entry, context) => {
194
+ if (entry.layer === 'domain' && entry.role === 'repository-port') {
195
+ context.addIssue({
196
+ code: 'custom',
197
+ path: ['role'],
198
+ message: 'Repository ports in new Foundation BO-pattern contexts belong in application ports/out, not domain.',
199
+ });
200
+ }
201
+ if (entry.layer === 'domain' && entry.role === 'entity' && !entry.decision_refs.some((ref) => ref.startsWith('ADR-'))) {
202
+ context.addIssue({
203
+ code: 'custom',
204
+ path: ['decision_refs'],
205
+ message: 'Domain entities require an ADR reference unless they are part of an approved legacy entity-pattern context.',
206
+ });
207
+ }
208
+ });
209
+ export const pluginArtifactMapSchema = z.object({
210
+ schema_version: z.literal(1),
211
+ sdk_package: z.literal(CODESDD_PLUGIN_SDK_PACKAGE_NAME).default(CODESDD_PLUGIN_SDK_PACKAGE_NAME),
212
+ feature_ref: z.string().regex(FEATURE_REF_PATTERN).optional(),
213
+ operation_id: z.string().regex(OPERATION_ID_PATTERN).optional(),
214
+ plugin_ref: z
215
+ .object({
216
+ id: z.string().min(1),
217
+ version: z.string().regex(SEMVER_PATTERN),
218
+ })
219
+ .optional(),
220
+ generated_at: z.string().datetime(),
221
+ artifacts: z.array(pluginArtifactMapEntrySchema).default([]),
222
+ });
223
+ export function buildPluginPackageName(pluginId) {
224
+ const normalized = pluginId
225
+ .trim()
226
+ .toLowerCase()
227
+ .replace(/^codesdd-plugin-/u, '')
228
+ .replace(/[^a-z0-9]+/gu, '-')
229
+ .replace(/^-+|-+$/gu, '');
230
+ if (!normalized) {
231
+ throw new Error('Plugin id cannot produce an empty package name.');
232
+ }
233
+ return `${CODESDD_PLUGIN_PACKAGE_PREFIX}${normalized}`;
234
+ }
235
+ export function validatePluginPackageGovernance(value, sourceLabel = 'plugin package governance') {
236
+ const result = pluginPackageGovernanceSchema.safeParse(value);
237
+ if (!result.success) {
238
+ throw new Error(`${sourceLabel} validation failed: ${result.error.issues.map(formatIssue).join('; ')}`);
239
+ }
240
+ return result.data;
241
+ }
242
+ export function validatePluginArtifactMap(value, sourceLabel = 'plugin artifact map') {
243
+ const result = pluginArtifactMapSchema.safeParse(value);
244
+ if (!result.success) {
245
+ throw new Error(`${sourceLabel} validation failed: ${result.error.issues.map(formatIssue).join('; ')}`);
246
+ }
247
+ return result.data;
248
+ }
249
+ export function buildPluginSdkJsonSchemas() {
250
+ return {
251
+ 'plugin-package-governance.yaml': normalizeJsonSchema(pluginPackageGovernanceSchema, 'CodeSDD Plugin SDK Package Governance', 'Package naming, versioning, registry, and keyword contract for @devtrack-solution/codesdd-plugin-sdk plugin packages.'),
252
+ 'plugin-language-runtime.yaml': normalizeJsonSchema(pluginLanguageRuntimeSchema, 'CodeSDD Plugin SDK Language Runtime', 'Language-agnostic runtime bridge contract for TypeScript, JavaScript, Python, Java, Go, Rust, C#, shell, and custom plugin implementations.'),
253
+ 'plugin-artifact-map.yaml': normalizeJsonSchema(pluginArtifactMapSchema, 'CodeSDD Plugin SDK Artifact Map', 'Typed file map for plugin-planned artifacts with layer, role, kind, operation, decision refs, and source refs.'),
254
+ };
255
+ }
256
+ function normalizeJsonSchema(schema, title, description) {
257
+ return {
258
+ ...toJSONSchema(schema),
259
+ $schema: JSON_SCHEMA_DRAFT,
260
+ title,
261
+ description,
262
+ };
263
+ }
264
+ function formatIssue(issue) {
265
+ const issuePath = issue.path.length > 0 ? issue.path.join('.') : '<root>';
266
+ return `${issuePath}: ${issue.message}`;
267
+ }
268
+ //# sourceMappingURL=plugin-sdk-contract.js.map
@@ -67,8 +67,8 @@ export declare const pluginSkillBindingResolutionSchema: z.ZodObject<{
67
67
  schema_version: z.ZodLiteral<1>;
68
68
  created_at: z.ZodString;
69
69
  status: z.ZodEnum<{
70
- resolved: "resolved";
71
70
  fallback: "fallback";
71
+ resolved: "resolved";
72
72
  }>;
73
73
  request: z.ZodObject<{
74
74
  schema_version: z.ZodDefault<z.ZodLiteral<1>>;
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  export declare const qualityAuthorityRefSchema: z.ZodObject<{
3
3
  type: z.ZodEnum<{
4
+ skill: "skill";
4
5
  schema: "schema";
5
6
  epic: "epic";
6
7
  feature: "feature";
8
+ foundation: "foundation";
7
9
  debate: "debate";
8
10
  adr: "adr";
9
- skill: "skill";
10
- foundation: "foundation";
11
11
  }>;
12
12
  ref: z.ZodString;
13
13
  path: z.ZodOptional<z.ZodString>;
@@ -17,8 +17,8 @@ export declare const qualityAuthorityRefSchema: z.ZodObject<{
17
17
  export declare const qualityGateRefSchema: z.ZodObject<{
18
18
  id: z.ZodString;
19
19
  type: z.ZodEnum<{
20
- schema: "schema";
21
20
  filesystem: "filesystem";
21
+ schema: "schema";
22
22
  runtime: "runtime";
23
23
  evidence: "evidence";
24
24
  import: "import";
@@ -52,13 +52,13 @@ export declare const qualityScenarioSchema: z.ZodObject<{
52
52
  intent: z.ZodString;
53
53
  authority: z.ZodArray<z.ZodObject<{
54
54
  type: z.ZodEnum<{
55
+ skill: "skill";
55
56
  schema: "schema";
56
57
  epic: "epic";
57
58
  feature: "feature";
59
+ foundation: "foundation";
58
60
  debate: "debate";
59
61
  adr: "adr";
60
- skill: "skill";
61
- foundation: "foundation";
62
62
  }>;
63
63
  ref: z.ZodString;
64
64
  path: z.ZodOptional<z.ZodString>;
@@ -79,8 +79,8 @@ export declare const qualityScenarioSchema: z.ZodObject<{
79
79
  gates: z.ZodArray<z.ZodObject<{
80
80
  id: z.ZodString;
81
81
  type: z.ZodEnum<{
82
- schema: "schema";
83
82
  filesystem: "filesystem";
83
+ schema: "schema";
84
84
  runtime: "runtime";
85
85
  evidence: "evidence";
86
86
  import: "import";
@@ -117,13 +117,13 @@ export declare const qualityArchitectureSchema: z.ZodObject<{
117
117
  stack: z.ZodString;
118
118
  authority: z.ZodArray<z.ZodObject<{
119
119
  type: z.ZodEnum<{
120
+ skill: "skill";
120
121
  schema: "schema";
121
122
  epic: "epic";
122
123
  feature: "feature";
124
+ foundation: "foundation";
123
125
  debate: "debate";
124
126
  adr: "adr";
125
- skill: "skill";
126
- foundation: "foundation";
127
127
  }>;
128
128
  ref: z.ZodString;
129
129
  path: z.ZodOptional<z.ZodString>;
@@ -158,8 +158,8 @@ export declare const qualityRunFindingSchema: z.ZodObject<{
158
158
  code: z.ZodString;
159
159
  severity: z.ZodEnum<{
160
160
  error: "error";
161
- warn: "warn";
162
161
  info: "info";
162
+ warn: "warn";
163
163
  blocker: "blocker";
164
164
  }>;
165
165
  message: z.ZodString;
@@ -202,8 +202,8 @@ export declare const qualityRunSchema: z.ZodObject<{
202
202
  code: z.ZodString;
203
203
  severity: z.ZodEnum<{
204
204
  error: "error";
205
- warn: "warn";
206
205
  info: "info";
206
+ warn: "warn";
207
207
  blocker: "blocker";
208
208
  }>;
209
209
  message: z.ZodString;
@@ -271,8 +271,8 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
271
271
  code: z.ZodString;
272
272
  severity: z.ZodEnum<{
273
273
  error: "error";
274
- warn: "warn";
275
274
  info: "info";
275
+ warn: "warn";
276
276
  blocker: "blocker";
277
277
  }>;
278
278
  message: z.ZodString;
@@ -297,13 +297,13 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
297
297
  intent: z.ZodString;
298
298
  authority: z.ZodArray<z.ZodObject<{
299
299
  type: z.ZodEnum<{
300
+ skill: "skill";
300
301
  schema: "schema";
301
302
  epic: "epic";
302
303
  feature: "feature";
304
+ foundation: "foundation";
303
305
  debate: "debate";
304
306
  adr: "adr";
305
- skill: "skill";
306
- foundation: "foundation";
307
307
  }>;
308
308
  ref: z.ZodString;
309
309
  path: z.ZodOptional<z.ZodString>;
@@ -324,8 +324,8 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
324
324
  gates: z.ZodArray<z.ZodObject<{
325
325
  id: z.ZodString;
326
326
  type: z.ZodEnum<{
327
- schema: "schema";
328
327
  filesystem: "filesystem";
328
+ schema: "schema";
329
329
  runtime: "runtime";
330
330
  evidence: "evidence";
331
331
  import: "import";
@@ -354,13 +354,13 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
354
354
  stack: z.ZodString;
355
355
  authority: z.ZodArray<z.ZodObject<{
356
356
  type: z.ZodEnum<{
357
+ skill: "skill";
357
358
  schema: "schema";
358
359
  epic: "epic";
359
360
  feature: "feature";
361
+ foundation: "foundation";
360
362
  debate: "debate";
361
363
  adr: "adr";
362
- skill: "skill";
363
- foundation: "foundation";
364
364
  }>;
365
365
  ref: z.ZodString;
366
366
  path: z.ZodOptional<z.ZodString>;
@@ -426,6 +426,79 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
426
426
  checksum_before: z.ZodOptional<z.ZodString>;
427
427
  checksum_after: z.ZodOptional<z.ZodString>;
428
428
  content_type: z.ZodOptional<z.ZodString>;
429
+ artifact_kind: z.ZodOptional<z.ZodEnum<{
430
+ documentation: "documentation";
431
+ schema: "schema";
432
+ configuration: "configuration";
433
+ source: "source";
434
+ migration: "migration";
435
+ evidence: "evidence";
436
+ test: "test";
437
+ asset: "asset";
438
+ "package-metadata": "package-metadata";
439
+ }>>;
440
+ role: z.ZodOptional<z.ZodEnum<{
441
+ documentation: "documentation";
442
+ type: "type";
443
+ validator: "validator";
444
+ evidence: "evidence";
445
+ test: "test";
446
+ interface: "interface";
447
+ implementation: "implementation";
448
+ abstraction: "abstraction";
449
+ "business-object": "business-object";
450
+ "value-object": "value-object";
451
+ entity: "entity";
452
+ "repository-port": "repository-port";
453
+ "use-case": "use-case";
454
+ service: "service";
455
+ handler: "handler";
456
+ adapter: "adapter";
457
+ mapper: "mapper";
458
+ module: "module";
459
+ controller: "controller";
460
+ dto: "dto";
461
+ policy: "policy";
462
+ manifest: "manifest";
463
+ fixture: "fixture";
464
+ }>>;
465
+ layer: z.ZodOptional<z.ZodEnum<{
466
+ sdd: "sdd";
467
+ config: "config";
468
+ domain: "domain";
469
+ docs: "docs";
470
+ root: "root";
471
+ application: "application";
472
+ infrastructure: "infrastructure";
473
+ presentation: "presentation";
474
+ shared: "shared";
475
+ tests: "tests";
476
+ assets: "assets";
477
+ }>>;
478
+ language: z.ZodOptional<z.ZodEnum<{
479
+ shell: "shell";
480
+ other: "other";
481
+ typescript: "typescript";
482
+ javascript: "javascript";
483
+ python: "python";
484
+ java: "java";
485
+ go: "go";
486
+ rust: "rust";
487
+ csharp: "csharp";
488
+ php: "php";
489
+ ruby: "ruby";
490
+ }>>;
491
+ context: z.ZodOptional<z.ZodString>;
492
+ implementation: z.ZodOptional<z.ZodEnum<{
493
+ contract: "contract";
494
+ manual: "manual";
495
+ concrete: "concrete";
496
+ abstract: "abstract";
497
+ generated: "generated";
498
+ }>>;
499
+ decision_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
500
+ source_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
429
502
  }, z.core.$strip>>>;
430
503
  validation_evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
431
504
  command: z.ZodString;
@@ -0,0 +1,68 @@
1
+ export type ReleaseReadinessStatus = 'ready' | 'warning' | 'blocked';
2
+ export interface ReleaseReadinessCheck {
3
+ id: string;
4
+ status: 'pass' | 'warn' | 'fail';
5
+ classification?: ReleaseReadinessClassification;
6
+ owner?: string;
7
+ delta?: string;
8
+ next_action?: string;
9
+ history?: string[];
10
+ exception?: ReleaseReadinessExceptionState;
11
+ summary: string;
12
+ evidence?: string;
13
+ }
14
+ export type ReleaseReadinessClassification = 'passed' | 'failed' | 'excepted' | 'follow_up' | 'not_applicable';
15
+ export interface ReleaseReadinessExceptionState {
16
+ status: 'none' | 'active' | 'stale';
17
+ source?: string;
18
+ scope?: string;
19
+ reason?: string;
20
+ accepted_risk?: string;
21
+ compensating_control?: string;
22
+ review_deadline?: string;
23
+ approver?: string;
24
+ }
25
+ export interface ReleaseReadinessReport {
26
+ schema_version: 1;
27
+ status: ReleaseReadinessStatus;
28
+ generated_at: string;
29
+ blocker_classification: Array<{
30
+ check_id: string;
31
+ classification: ReleaseReadinessClassification;
32
+ owner: string;
33
+ next_action: string;
34
+ stale_exception: boolean;
35
+ }>;
36
+ blockers: string[];
37
+ warnings: string[];
38
+ checks: ReleaseReadinessCheck[];
39
+ handoff_sections: ReleaseReadinessHandoffSection[];
40
+ ci_parity_commands: string[];
41
+ }
42
+ export type ReleaseReadinessHandoffSectionId = 'governance' | 'tests' | 'release_readiness' | 'git_cleanliness' | 'runtime_env';
43
+ export interface ReleaseReadinessHandoffSection {
44
+ id: ReleaseReadinessHandoffSectionId;
45
+ title: string;
46
+ status: ReleaseReadinessStatus;
47
+ owner: string;
48
+ next_action: string;
49
+ checks: ReleaseReadinessCheck[];
50
+ evidence: {
51
+ json_snapshot: {
52
+ section_id: ReleaseReadinessHandoffSectionId;
53
+ status: ReleaseReadinessStatus;
54
+ checks: Array<{
55
+ id: string;
56
+ status: ReleaseReadinessCheck['status'];
57
+ classification: ReleaseReadinessClassification;
58
+ owner: string;
59
+ next_action: string;
60
+ evidence?: string;
61
+ }>;
62
+ };
63
+ human_snapshot: string[];
64
+ };
65
+ }
66
+ export declare function evaluateReleaseReadiness(projectRoot: string): Promise<ReleaseReadinessReport>;
67
+ export declare function formatReleaseReadinessReport(report: ReleaseReadinessReport): string;
68
+ //# sourceMappingURL=release-readiness.d.ts.map