@devtrack-solution/codesdd 1.2.3 → 1.2.4-rc3
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/.sdd/skills/curated/devtrack-api/SKILL.md +12 -5
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +55 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +2 -3
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +1 -1
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
- package/README.md +159 -5
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- package/dist/commands/config.js +171 -10
- package/dist/commands/sdd/execution.js +345 -15
- package/dist/commands/sdd/plugin.js +5 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +10 -0
- package/dist/commands/sdd.js +38 -3
- package/dist/core/cli/command-matrix.js +9 -0
- package/dist/core/cli-command-quality.js +9 -0
- package/dist/core/completions/command-registry.js +45 -0
- package/dist/core/config-schema.d.ts +18 -1
- package/dist/core/config-schema.js +48 -5
- package/dist/core/global-config.d.ts +16 -0
- package/dist/core/sdd/agent-binding.d.ts +10 -10
- package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -0
- package/dist/core/sdd/check.d.ts +2 -0
- package/dist/core/sdd/check.js +40 -2
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +98 -4
- package/dist/core/sdd/deepagent-contracts.js +62 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +14 -8
- package/dist/core/sdd/default-skills.js +108 -4
- package/dist/core/sdd/devtrack-api-appliance.d.ts +8 -1
- package/dist/core/sdd/devtrack-api-appliance.js +46 -23
- package/dist/core/sdd/docs-sync.js +21 -15
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
- package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -0
- package/dist/core/sdd/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +9 -1
- package/dist/core/sdd/legacy-operations.js +76 -1
- package/dist/core/sdd/migrate-workspace.js +39 -0
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +119 -0
- package/dist/core/sdd/package-structure-gate.js +3 -8
- package/dist/core/sdd/parallel-feat-automation.d.ts +181 -3
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +223 -4
- package/dist/core/sdd/plugin-broker.js +10 -0
- package/dist/core/sdd/plugin-cli.d.ts +30 -0
- package/dist/core/sdd/plugin-cli.js +70 -3
- package/dist/core/sdd/plugin-evidence.d.ts +73 -0
- package/dist/core/sdd/plugin-manifest.d.ts +69 -1
- package/dist/core/sdd/plugin-manifest.js +10 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
- package/dist/core/sdd/plugin-registry.d.ts +141 -5
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
- package/dist/core/sdd/quality-validation.d.ts +84 -11
- package/dist/core/sdd/release-readiness.d.ts +19 -0
- package/dist/core/sdd/release-readiness.js +472 -0
- package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
- package/dist/core/sdd/services/agent-run.service.js +73 -1
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +323 -9
- package/dist/core/sdd/services/finalize.service.d.ts +25 -0
- package/dist/core/sdd/services/finalize.service.js +178 -16
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- package/dist/core/sdd/state.d.ts +1 -0
- package/dist/core/sdd/state.js +251 -29
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +13 -13
- package/dist/core/sdd/types.d.ts +27 -12
- package/dist/core/sdd/types.js +4 -0
- package/dist/core/sdd/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +387 -7
- package/dist/core/sdd/workspace-schemas.js +196 -64
- package/dist/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- package/package.json +9 -6
- package/schemas/sdd/2-plan.schema.json +207 -2
- package/schemas/sdd/5-quality.schema.json +281 -25
- package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
- package/schemas/sdd/codesdd-plugin.schema.json +171 -0
- package/schemas/sdd/deepagent-run-request.schema.json +316 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -0
- package/schemas/sdd/plugin-registry.schema.json +171 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- package/schemas/sdd/workspace-catalog.schema.json +3776 -398
|
@@ -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>>;
|
|
@@ -4,10 +4,10 @@ export declare const qualityAuthorityRefSchema: z.ZodObject<{
|
|
|
4
4
|
schema: "schema";
|
|
5
5
|
epic: "epic";
|
|
6
6
|
feature: "feature";
|
|
7
|
+
foundation: "foundation";
|
|
7
8
|
debate: "debate";
|
|
8
9
|
adr: "adr";
|
|
9
10
|
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";
|
|
@@ -55,10 +55,10 @@ export declare const qualityScenarioSchema: z.ZodObject<{
|
|
|
55
55
|
schema: "schema";
|
|
56
56
|
epic: "epic";
|
|
57
57
|
feature: "feature";
|
|
58
|
+
foundation: "foundation";
|
|
58
59
|
debate: "debate";
|
|
59
60
|
adr: "adr";
|
|
60
61
|
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";
|
|
@@ -120,10 +120,10 @@ export declare const qualityArchitectureSchema: z.ZodObject<{
|
|
|
120
120
|
schema: "schema";
|
|
121
121
|
epic: "epic";
|
|
122
122
|
feature: "feature";
|
|
123
|
+
foundation: "foundation";
|
|
123
124
|
debate: "debate";
|
|
124
125
|
adr: "adr";
|
|
125
126
|
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;
|
|
@@ -300,10 +300,10 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
|
|
|
300
300
|
schema: "schema";
|
|
301
301
|
epic: "epic";
|
|
302
302
|
feature: "feature";
|
|
303
|
+
foundation: "foundation";
|
|
303
304
|
debate: "debate";
|
|
304
305
|
adr: "adr";
|
|
305
306
|
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";
|
|
@@ -357,10 +357,10 @@ export declare const qualityEvidenceBundleSchema: z.ZodObject<{
|
|
|
357
357
|
schema: "schema";
|
|
358
358
|
epic: "epic";
|
|
359
359
|
feature: "feature";
|
|
360
|
+
foundation: "foundation";
|
|
360
361
|
debate: "debate";
|
|
361
362
|
adr: "adr";
|
|
362
363
|
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,19 @@
|
|
|
1
|
+
export type ReleaseReadinessStatus = 'ready' | 'warning' | 'blocked';
|
|
2
|
+
export interface ReleaseReadinessCheck {
|
|
3
|
+
id: string;
|
|
4
|
+
status: 'pass' | 'warn' | 'fail';
|
|
5
|
+
summary: string;
|
|
6
|
+
evidence?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ReleaseReadinessReport {
|
|
9
|
+
schema_version: 1;
|
|
10
|
+
status: ReleaseReadinessStatus;
|
|
11
|
+
generated_at: string;
|
|
12
|
+
blockers: string[];
|
|
13
|
+
warnings: string[];
|
|
14
|
+
checks: ReleaseReadinessCheck[];
|
|
15
|
+
ci_parity_commands: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function evaluateReleaseReadiness(projectRoot: string): Promise<ReleaseReadinessReport>;
|
|
18
|
+
export declare function formatReleaseReadinessReport(report: ReleaseReadinessReport): string;
|
|
19
|
+
//# sourceMappingURL=release-readiness.d.ts.map
|