@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
|
@@ -20,6 +20,65 @@ export const workspacePolicyInjectionSchema = z.object({
|
|
|
20
20
|
generated_from: z.literal('recommended_skills'),
|
|
21
21
|
required_policies: z.array(workspacePolicyRequirementSchema).default([]),
|
|
22
22
|
});
|
|
23
|
+
const workspacePercentSchema = z.number().min(0).max(100);
|
|
24
|
+
export const workspaceValidationGateSchema = z.object({
|
|
25
|
+
name: z.string().min(1),
|
|
26
|
+
command: z.string().min(1),
|
|
27
|
+
expected: z.string().min(1),
|
|
28
|
+
});
|
|
29
|
+
export const workspaceExecutionStepSchema = z.object({
|
|
30
|
+
name: z.string().min(1),
|
|
31
|
+
command: z.string().min(1),
|
|
32
|
+
writes_state: z.boolean().default(false),
|
|
33
|
+
expected_state_writes: z.array(z.string().min(1)).default([]),
|
|
34
|
+
});
|
|
35
|
+
export const workspacePlanExecutionSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
mode: z.enum(['single-feature', 'parallel-wave', 'chained-features']).default('single-feature'),
|
|
38
|
+
state_boundary_ref: z.literal('codesdd-canonical-sdd-state').default('codesdd-canonical-sdd-state'),
|
|
39
|
+
command_sequence: z.array(workspaceExecutionStepSchema).min(1),
|
|
40
|
+
allowed_state_writes: z.array(z.string().min(1)).default([]),
|
|
41
|
+
forbidden_state_writes: z.array(z.string().min(1)).default(['.codesdd/**', 'external-context/**']),
|
|
42
|
+
handoff_artifacts: z.array(z.string().min(1)).default([]),
|
|
43
|
+
})
|
|
44
|
+
.default({
|
|
45
|
+
mode: 'single-feature',
|
|
46
|
+
state_boundary_ref: 'codesdd-canonical-sdd-state',
|
|
47
|
+
command_sequence: [
|
|
48
|
+
{
|
|
49
|
+
name: 'SDD check',
|
|
50
|
+
command: 'codesdd sdd check --render',
|
|
51
|
+
writes_state: false,
|
|
52
|
+
expected_state_writes: [],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
allowed_state_writes: [],
|
|
56
|
+
forbidden_state_writes: ['.codesdd/**', 'external-context/**'],
|
|
57
|
+
handoff_artifacts: [],
|
|
58
|
+
});
|
|
59
|
+
export const workspacePlanGovernanceSchema = z
|
|
60
|
+
.object({
|
|
61
|
+
state_boundary: z.literal('codesdd-canonical-sdd-state').default('codesdd-canonical-sdd-state'),
|
|
62
|
+
planning_artifacts: z.array(z.string().min(1)).min(1),
|
|
63
|
+
decision_refs: z.array(z.string().min(1)).default([]),
|
|
64
|
+
planned_state_writes: z.array(z.string().min(1)).default([]),
|
|
65
|
+
rollback_plan: z.string().min(20),
|
|
66
|
+
validation_gates: z.array(workspaceValidationGateSchema).min(1),
|
|
67
|
+
})
|
|
68
|
+
.default({
|
|
69
|
+
state_boundary: 'codesdd-canonical-sdd-state',
|
|
70
|
+
planning_artifacts: ['.sdd/state/backlog.yaml'],
|
|
71
|
+
decision_refs: [],
|
|
72
|
+
planned_state_writes: [],
|
|
73
|
+
rollback_plan: 'Review and revert only the scoped CodeSDD feature workspace and state changes if validation fails.',
|
|
74
|
+
validation_gates: [
|
|
75
|
+
{
|
|
76
|
+
name: 'SDD check',
|
|
77
|
+
command: 'codesdd sdd check --render',
|
|
78
|
+
expected: 'CodeSDD state and generated views remain valid.',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
});
|
|
23
82
|
export const workspaceSpecSchema = z.object({
|
|
24
83
|
schema_version: z.literal(1),
|
|
25
84
|
feature_id: workspaceFeatureIdSchema,
|
|
@@ -52,6 +111,8 @@ export const workspaceSpecSchema = z.object({
|
|
|
52
111
|
export const workspacePlanSchema = z.object({
|
|
53
112
|
schema_version: z.literal(1),
|
|
54
113
|
feature_id: workspaceFeatureIdSchema,
|
|
114
|
+
governance: workspacePlanGovernanceSchema,
|
|
115
|
+
execution_plan: workspacePlanExecutionSchema,
|
|
55
116
|
architectural_impact: z.object({
|
|
56
117
|
description: z.string(),
|
|
57
118
|
affected_modules: z.array(z.string()),
|
|
@@ -65,8 +126,8 @@ export const workspacePlanSchema = z.object({
|
|
|
65
126
|
change_type: z.string(),
|
|
66
127
|
})),
|
|
67
128
|
quality_strategy: z.object({
|
|
68
|
-
unit_target:
|
|
69
|
-
integration_target:
|
|
129
|
+
unit_target: workspacePercentSchema,
|
|
130
|
+
integration_target: workspacePercentSchema,
|
|
70
131
|
approach: z.string(),
|
|
71
132
|
}),
|
|
72
133
|
suggested_skills: z.array(z.string()),
|
|
@@ -156,13 +217,132 @@ export const workspaceTraceabilitySchema = z.object({
|
|
|
156
217
|
}),
|
|
157
218
|
requirements: z.array(workspaceTraceabilityRequirementSchema).default([]),
|
|
158
219
|
});
|
|
220
|
+
export const workspaceQualityLedgerAxisSchema = z.object({
|
|
221
|
+
raw_score: workspacePercentSchema,
|
|
222
|
+
weighted_score: workspacePercentSchema,
|
|
223
|
+
rationale: z.string().min(1),
|
|
224
|
+
});
|
|
225
|
+
export const workspaceQualityLedgerWeightsSchema = z
|
|
226
|
+
.object({
|
|
227
|
+
coverage: workspacePercentSchema.default(30),
|
|
228
|
+
traceability: workspacePercentSchema.default(20),
|
|
229
|
+
integrity: workspacePercentSchema.default(20),
|
|
230
|
+
naming: workspacePercentSchema.default(10),
|
|
231
|
+
token: workspacePercentSchema.default(20),
|
|
232
|
+
})
|
|
233
|
+
.superRefine((weights, ctx) => {
|
|
234
|
+
const total = weights.coverage + weights.traceability + weights.integrity + weights.naming + weights.token;
|
|
235
|
+
if (total !== 100) {
|
|
236
|
+
ctx.addIssue({
|
|
237
|
+
code: z.ZodIssueCode.custom,
|
|
238
|
+
message: `q95_ledger.weights must total 100, got ${total}.`,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
export const workspaceQualityLedgerSchema = z
|
|
243
|
+
.object({
|
|
244
|
+
threshold: workspacePercentSchema.default(95),
|
|
245
|
+
score: workspacePercentSchema.default(0),
|
|
246
|
+
status: z.enum(['pass', 'fail', 'pending']).default('pending'),
|
|
247
|
+
computed_at: z.string().default(''),
|
|
248
|
+
weights: workspaceQualityLedgerWeightsSchema.default({
|
|
249
|
+
coverage: 30,
|
|
250
|
+
traceability: 20,
|
|
251
|
+
integrity: 20,
|
|
252
|
+
naming: 10,
|
|
253
|
+
token: 20,
|
|
254
|
+
}),
|
|
255
|
+
axes: z
|
|
256
|
+
.object({
|
|
257
|
+
coverage: workspaceQualityLedgerAxisSchema,
|
|
258
|
+
traceability: workspaceQualityLedgerAxisSchema,
|
|
259
|
+
integrity: workspaceQualityLedgerAxisSchema,
|
|
260
|
+
naming: workspaceQualityLedgerAxisSchema,
|
|
261
|
+
token: workspaceQualityLedgerAxisSchema,
|
|
262
|
+
})
|
|
263
|
+
.default({
|
|
264
|
+
coverage: {
|
|
265
|
+
raw_score: 0,
|
|
266
|
+
weighted_score: 0,
|
|
267
|
+
rationale: 'Computed during finalize.'
|
|
268
|
+
},
|
|
269
|
+
traceability: {
|
|
270
|
+
raw_score: 0,
|
|
271
|
+
weighted_score: 0,
|
|
272
|
+
rationale: 'Computed during finalize.'
|
|
273
|
+
},
|
|
274
|
+
integrity: {
|
|
275
|
+
raw_score: 0,
|
|
276
|
+
weighted_score: 0,
|
|
277
|
+
rationale: 'Computed during finalize.'
|
|
278
|
+
},
|
|
279
|
+
naming: {
|
|
280
|
+
raw_score: 0,
|
|
281
|
+
weighted_score: 0,
|
|
282
|
+
rationale: 'Computed during finalize.'
|
|
283
|
+
},
|
|
284
|
+
token: {
|
|
285
|
+
raw_score: 0,
|
|
286
|
+
weighted_score: 0,
|
|
287
|
+
rationale: 'Computed during finalize.'
|
|
288
|
+
},
|
|
289
|
+
}),
|
|
290
|
+
next_best_action: z.string().default('Record missing evidence to raise the lowest weighted axis.'),
|
|
291
|
+
})
|
|
292
|
+
.superRefine((ledger, ctx) => {
|
|
293
|
+
if (ledger.status === 'pass' && ledger.score < ledger.threshold) {
|
|
294
|
+
ctx.addIssue({
|
|
295
|
+
code: z.ZodIssueCode.custom,
|
|
296
|
+
path: ['status'],
|
|
297
|
+
message: 'q95_ledger.status cannot be pass when score is below threshold.',
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
export const workspaceTokenTelemetrySchema = z.object({
|
|
302
|
+
mode: z.enum(['compact', 'standard', 'full']).optional(),
|
|
303
|
+
budget_chars: z.number().int().positive().optional(),
|
|
304
|
+
actual_chars: z.number().int().nonnegative().optional(),
|
|
305
|
+
efficiency_percent: workspacePercentSchema.optional(),
|
|
306
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
307
|
+
evidence_ref: z.string().min(1).optional(),
|
|
308
|
+
notes: z.string().optional(),
|
|
309
|
+
});
|
|
310
|
+
export const workspaceTokenBudgetGatesSchema = z.object({
|
|
311
|
+
max_context_chars: z.number().int().positive().optional(),
|
|
312
|
+
require_numeric_efficiency: z.boolean().default(true),
|
|
313
|
+
fail_below_percent: workspacePercentSchema.default(95),
|
|
314
|
+
telemetry: z.array(workspaceTokenTelemetrySchema).default([]),
|
|
315
|
+
});
|
|
316
|
+
export const workspaceRuntimePerformanceTelemetrySchema = z.object({
|
|
317
|
+
command: z.string().min(1),
|
|
318
|
+
metric: z.enum(['duration_ms', 'p95_ms', 'memory_mb', 'cpu_percent']).default('duration_ms'),
|
|
319
|
+
threshold: z.number().nonnegative().optional(),
|
|
320
|
+
actual: z.number().nonnegative().optional(),
|
|
321
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
322
|
+
evidence_ref: z.string().min(1).optional(),
|
|
323
|
+
notes: z.string().optional(),
|
|
324
|
+
});
|
|
325
|
+
export const workspaceFlakinessTelemetrySchema = z.object({
|
|
326
|
+
command: z.string().min(1),
|
|
327
|
+
attempts: z.number().int().positive().optional(),
|
|
328
|
+
failures: z.number().int().nonnegative().optional(),
|
|
329
|
+
failure_rate_percent: workspacePercentSchema.optional(),
|
|
330
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
331
|
+
evidence_ref: z.string().min(1).optional(),
|
|
332
|
+
notes: z.string().optional(),
|
|
333
|
+
});
|
|
334
|
+
export const workspaceRuntimeQualityGatesSchema = z.object({
|
|
335
|
+
mode: z.enum(['observe', 'enforce']).default('observe'),
|
|
336
|
+
performance: z.array(workspaceRuntimePerformanceTelemetrySchema).default([]),
|
|
337
|
+
flakiness: z.array(workspaceFlakinessTelemetrySchema).default([]),
|
|
338
|
+
});
|
|
159
339
|
export const workspaceQualitySchema = z.object({
|
|
160
340
|
schema_version: z.literal(1),
|
|
161
341
|
feature_id: workspaceFeatureIdSchema,
|
|
162
342
|
coverage_targets: z.object({
|
|
163
|
-
unit:
|
|
164
|
-
integration:
|
|
165
|
-
modules: z.record(z.string(),
|
|
343
|
+
unit: workspacePercentSchema,
|
|
344
|
+
integration: workspacePercentSchema,
|
|
345
|
+
modules: z.record(z.string(), workspacePercentSchema).optional(),
|
|
166
346
|
}),
|
|
167
347
|
validation_strategies: z.array(z.object({
|
|
168
348
|
name: z.string(),
|
|
@@ -234,65 +414,17 @@ export const workspaceQualitySchema = z.object({
|
|
|
234
414
|
notes: z.string().optional(),
|
|
235
415
|
})
|
|
236
416
|
.optional(),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
naming: z.number().default(10),
|
|
249
|
-
token: z.number().default(20),
|
|
250
|
-
})
|
|
251
|
-
.default({
|
|
252
|
-
coverage: 30,
|
|
253
|
-
traceability: 20,
|
|
254
|
-
integrity: 20,
|
|
255
|
-
naming: 10,
|
|
256
|
-
token: 20,
|
|
257
|
-
}),
|
|
258
|
-
axes: z
|
|
259
|
-
.object({
|
|
260
|
-
coverage: z.object({ raw_score: z.number(), weighted_score: z.number(), rationale: z.string() }),
|
|
261
|
-
traceability: z.object({ raw_score: z.number(), weighted_score: z.number(), rationale: z.string() }),
|
|
262
|
-
integrity: z.object({ raw_score: z.number(), weighted_score: z.number(), rationale: z.string() }),
|
|
263
|
-
naming: z.object({ raw_score: z.number(), weighted_score: z.number(), rationale: z.string() }),
|
|
264
|
-
token: z.object({ raw_score: z.number(), weighted_score: z.number(), rationale: z.string() }),
|
|
265
|
-
})
|
|
266
|
-
.default({
|
|
267
|
-
coverage: {
|
|
268
|
-
raw_score: 0,
|
|
269
|
-
weighted_score: 0,
|
|
270
|
-
rationale: 'Computed during finalize.'
|
|
271
|
-
},
|
|
272
|
-
traceability: {
|
|
273
|
-
raw_score: 0,
|
|
274
|
-
weighted_score: 0,
|
|
275
|
-
rationale: 'Computed during finalize.'
|
|
276
|
-
},
|
|
277
|
-
integrity: {
|
|
278
|
-
raw_score: 0,
|
|
279
|
-
weighted_score: 0,
|
|
280
|
-
rationale: 'Computed during finalize.'
|
|
281
|
-
},
|
|
282
|
-
naming: {
|
|
283
|
-
raw_score: 0,
|
|
284
|
-
weighted_score: 0,
|
|
285
|
-
rationale: 'Computed during finalize.'
|
|
286
|
-
},
|
|
287
|
-
token: {
|
|
288
|
-
raw_score: 0,
|
|
289
|
-
weighted_score: 0,
|
|
290
|
-
rationale: 'Computed during finalize.'
|
|
291
|
-
},
|
|
292
|
-
}),
|
|
293
|
-
next_best_action: z.string().default('Record missing evidence to raise the lowest weighted axis.'),
|
|
294
|
-
})
|
|
295
|
-
.default({
|
|
417
|
+
token_budget_gates: workspaceTokenBudgetGatesSchema.default({
|
|
418
|
+
require_numeric_efficiency: true,
|
|
419
|
+
fail_below_percent: 95,
|
|
420
|
+
telemetry: [],
|
|
421
|
+
}),
|
|
422
|
+
runtime_quality_gates: workspaceRuntimeQualityGatesSchema.default({
|
|
423
|
+
mode: 'observe',
|
|
424
|
+
performance: [],
|
|
425
|
+
flakiness: [],
|
|
426
|
+
}),
|
|
427
|
+
q95_ledger: workspaceQualityLedgerSchema.default({
|
|
296
428
|
threshold: 95,
|
|
297
429
|
score: 0,
|
|
298
430
|
status: 'pending',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { buildFeatureTitle, computeCanonicalTitle, markdownInsightTemplate, slugify, stripFunctionalTitlePrefixes, } from '../../core/sdd/domain/helpers.js';
|
|
2
|
+
export { evaluateFeatureFinalizeGuardrails, evaluateFeatureStartGuardrails, type FeatureFinalizeGuardrails, type FeatureStartGuardrails, type LifecycleDependencyCheck, type LifecycleLockCheck, } from '../../core/sdd/domain/lifecycle-guardrails.js';
|
|
3
|
+
export { clearLifecycleHooks, registerLifecycleHook, runLifecycleHooks, unregisterLifecycleHook, type LifecycleHook, type LifecycleHookContext, type LifecycleHookEvent, } from '../../core/sdd/domain/lifecycle-hooks.js';
|
|
4
|
+
export { TransitionEngine, type EntityStatus } from '../../core/sdd/domain/transition-engine.js';
|
|
5
|
+
export { evaluateWorkspaceTraceability } from '../../core/sdd/domain/traceability.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { buildFeatureTitle, computeCanonicalTitle, markdownInsightTemplate, slugify, stripFunctionalTitlePrefixes, } from '../../core/sdd/domain/helpers.js';
|
|
2
|
+
export { evaluateFeatureFinalizeGuardrails, evaluateFeatureStartGuardrails, } from '../../core/sdd/domain/lifecycle-guardrails.js';
|
|
3
|
+
export { clearLifecycleHooks, registerLifecycleHook, runLifecycleHooks, unregisterLifecycleHook, } from '../../core/sdd/domain/lifecycle-hooks.js';
|
|
4
|
+
export { TransitionEngine } from '../../core/sdd/domain/transition-engine.js';
|
|
5
|
+
export { evaluateWorkspaceTraceability } from '../../core/sdd/domain/traceability.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { FileSystemLockAdapter, InMemoryCoordinationCache, InMemoryCoordinationEventBus, InMemoryCoordinationQueue, MultiTierCoordinationCache, createFilesystemFirstCoordinationAdapters, type CoordinationCacheAdapter, type CoordinationEvent, type CoordinationEventBusAdapter, type CoordinationLockAdapter, type CoordinationQueueAdapter, type SddCoordinationAdapters, } from '../../core/sdd/coordination/coordination-adapters.js';
|
|
2
|
+
export { RedisClientFactory, RedisCoordinationCache, RedisEventBusAdapter, RedisLockAdapter, RedisQueueAdapter, RedisWorkDeduper, buildRedisKey, hashRedisKey, redactRedisUrl, resolveRedisBoundaryConfig, resolveRedisRuntimeConfig, sanitizeRedisError, type RedisOperationalReport, type RedisRuntimeConfig, type RedisRuntimeStatus, } from '../../core/sdd/coordination/redis-runtime.js';
|
|
3
|
+
export { InMemoryAdapter } from '../../core/sdd/store/in-memory-adapter.js';
|
|
4
|
+
export { YamlFileAdapter } from '../../core/sdd/store/yaml-file-adapter.js';
|
|
5
|
+
export { createInMemorySddStores, createSddStores, type SddStores } from '../../core/sdd/store/sdd-stores.js';
|
|
6
|
+
export type { StateStore } from '../../core/sdd/store/state-store.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { FileSystemLockAdapter, InMemoryCoordinationCache, InMemoryCoordinationEventBus, InMemoryCoordinationQueue, MultiTierCoordinationCache, createFilesystemFirstCoordinationAdapters, } from '../../core/sdd/coordination/coordination-adapters.js';
|
|
2
|
+
export { RedisClientFactory, RedisCoordinationCache, RedisEventBusAdapter, RedisLockAdapter, RedisQueueAdapter, RedisWorkDeduper, buildRedisKey, hashRedisKey, redactRedisUrl, resolveRedisBoundaryConfig, resolveRedisRuntimeConfig, sanitizeRedisError, } from '../../core/sdd/coordination/redis-runtime.js';
|
|
3
|
+
export { InMemoryAdapter } from '../../core/sdd/store/in-memory-adapter.js';
|
|
4
|
+
export { YamlFileAdapter } from '../../core/sdd/store/yaml-file-adapter.js';
|
|
5
|
+
export { createInMemorySddStores, createSddStores } from '../../core/sdd/store/sdd-stores.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { BacklogItem, BacklogState, DiscoveryIndexState, DiscoveryRecord, FinalizeQueueState, FrontendGapsState, FrontendMapState, RepoMapState, ServiceCatalogState, TransitionLogState, } from '../../core/sdd/types.js';
|
|
2
|
+
export { stringifyWorkspaceYamlDocument, workspaceDocumentSchemas, workspaceSchemaForFile, type WorkspaceChangelogDocument, type WorkspaceDocumentFileName, type WorkspacePlanDocument, type WorkspaceQualityDocument, type WorkspaceSpecDocument, type WorkspaceTasksDocument, } from '../../core/sdd/workspace-schemas.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtrack-solution/codesdd",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4-rc3",
|
|
4
4
|
"description": "AI-native system for spec-driven development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codesdd",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"packageManager": "pnpm@10.33.2",
|
|
24
24
|
"publishConfig": {
|
|
25
|
-
"access": "public"
|
|
25
|
+
"access": "public",
|
|
26
|
+
"provenance": true
|
|
26
27
|
},
|
|
27
28
|
"pnpm": {
|
|
28
29
|
"overrides": {
|
|
@@ -64,13 +65,13 @@
|
|
|
64
65
|
"build": "node build.js",
|
|
65
66
|
"dev": "tsc --watch",
|
|
66
67
|
"dev:cli": "pnpm build && node bin/codesdd.js",
|
|
67
|
-
"test": "vitest run",
|
|
68
|
+
"test": "vitest run --silent=passed-only",
|
|
68
69
|
"test:watch": "vitest",
|
|
69
|
-
"test:e2e": "vitest run test/e2e test/cli-e2e",
|
|
70
|
+
"test:e2e": "vitest run test/e2e test/cli-e2e --silent=passed-only",
|
|
70
71
|
"test:deepagents-smoke": "vitest run test/e2e/deepagents-agent-run-smoke.test.ts",
|
|
71
72
|
"test:ui": "vitest --ui",
|
|
72
|
-
"test:coverage": "vitest run --coverage",
|
|
73
|
-
"coverage": "vitest run --coverage",
|
|
73
|
+
"test:coverage": "vitest run --coverage --silent=passed-only",
|
|
74
|
+
"coverage": "vitest run --coverage --silent=passed-only",
|
|
74
75
|
"quality": "pnpm run cleanup:install && pnpm run build && pnpm run lint && pnpm run test && pnpm run test:e2e && pnpm run coverage",
|
|
75
76
|
"quality:review": "pnpm run build && pnpm run lint && pnpm run test && pnpm run test:e2e && pnpm run coverage && pnpm run sdd:validate && pnpm run check:pack-version",
|
|
76
77
|
"prepublishOnly": "node build.js",
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
"sdd:validate": "pnpm run build && pnpm run sdd:schema:check && pnpm run sdd:validate:no-build",
|
|
86
87
|
"release": "pnpm run release:ci",
|
|
87
88
|
"release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
|
|
89
|
+
"release:sbom": "npm sbom --sbom-format cyclonedx",
|
|
88
90
|
"changeset": "changeset"
|
|
89
91
|
},
|
|
90
92
|
"engines": {
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
"fast-glob": "^3.3.3",
|
|
115
117
|
"ora": "^9.4.0",
|
|
116
118
|
"posthog-node": "^5.35.1",
|
|
119
|
+
"redis": "^6.0.0",
|
|
117
120
|
"typescript": "^6.0.3",
|
|
118
121
|
"yaml": "^2.9.0",
|
|
119
122
|
"zod": "^4.4.3"
|
|
@@ -10,6 +10,205 @@
|
|
|
10
10
|
"type": "string",
|
|
11
11
|
"pattern": "^FEAT-\\d{4}$"
|
|
12
12
|
},
|
|
13
|
+
"governance": {
|
|
14
|
+
"default": {
|
|
15
|
+
"state_boundary": "codesdd-canonical-sdd-state",
|
|
16
|
+
"planning_artifacts": [
|
|
17
|
+
".sdd/state/backlog.yaml"
|
|
18
|
+
],
|
|
19
|
+
"decision_refs": [],
|
|
20
|
+
"planned_state_writes": [],
|
|
21
|
+
"rollback_plan": "Review and revert only the scoped CodeSDD feature workspace and state changes if validation fails.",
|
|
22
|
+
"validation_gates": [
|
|
23
|
+
{
|
|
24
|
+
"name": "SDD check",
|
|
25
|
+
"command": "codesdd sdd check --render",
|
|
26
|
+
"expected": "CodeSDD state and generated views remain valid."
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"state_boundary": {
|
|
33
|
+
"default": "codesdd-canonical-sdd-state",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"const": "codesdd-canonical-sdd-state"
|
|
36
|
+
},
|
|
37
|
+
"planning_artifacts": {
|
|
38
|
+
"minItems": 1,
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"decision_refs": {
|
|
46
|
+
"default": [],
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"planned_state_writes": {
|
|
54
|
+
"default": [],
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"rollback_plan": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 20
|
|
64
|
+
},
|
|
65
|
+
"validation_gates": {
|
|
66
|
+
"minItems": 1,
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"properties": {
|
|
71
|
+
"name": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"command": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"expected": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"name",
|
|
86
|
+
"command",
|
|
87
|
+
"expected"
|
|
88
|
+
],
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"state_boundary",
|
|
95
|
+
"planning_artifacts",
|
|
96
|
+
"decision_refs",
|
|
97
|
+
"planned_state_writes",
|
|
98
|
+
"rollback_plan",
|
|
99
|
+
"validation_gates"
|
|
100
|
+
],
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
},
|
|
103
|
+
"execution_plan": {
|
|
104
|
+
"default": {
|
|
105
|
+
"mode": "single-feature",
|
|
106
|
+
"state_boundary_ref": "codesdd-canonical-sdd-state",
|
|
107
|
+
"command_sequence": [
|
|
108
|
+
{
|
|
109
|
+
"name": "SDD check",
|
|
110
|
+
"command": "codesdd sdd check --render",
|
|
111
|
+
"writes_state": false,
|
|
112
|
+
"expected_state_writes": []
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"allowed_state_writes": [],
|
|
116
|
+
"forbidden_state_writes": [
|
|
117
|
+
".codesdd/**",
|
|
118
|
+
"external-context/**"
|
|
119
|
+
],
|
|
120
|
+
"handoff_artifacts": []
|
|
121
|
+
},
|
|
122
|
+
"type": "object",
|
|
123
|
+
"properties": {
|
|
124
|
+
"mode": {
|
|
125
|
+
"default": "single-feature",
|
|
126
|
+
"type": "string",
|
|
127
|
+
"enum": [
|
|
128
|
+
"single-feature",
|
|
129
|
+
"parallel-wave",
|
|
130
|
+
"chained-features"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"state_boundary_ref": {
|
|
134
|
+
"default": "codesdd-canonical-sdd-state",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"const": "codesdd-canonical-sdd-state"
|
|
137
|
+
},
|
|
138
|
+
"command_sequence": {
|
|
139
|
+
"minItems": 1,
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"name": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1
|
|
147
|
+
},
|
|
148
|
+
"command": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1
|
|
151
|
+
},
|
|
152
|
+
"writes_state": {
|
|
153
|
+
"default": false,
|
|
154
|
+
"type": "boolean"
|
|
155
|
+
},
|
|
156
|
+
"expected_state_writes": {
|
|
157
|
+
"default": [],
|
|
158
|
+
"type": "array",
|
|
159
|
+
"items": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"minLength": 1
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": [
|
|
166
|
+
"name",
|
|
167
|
+
"command",
|
|
168
|
+
"writes_state",
|
|
169
|
+
"expected_state_writes"
|
|
170
|
+
],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"allowed_state_writes": {
|
|
175
|
+
"default": [],
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"forbidden_state_writes": {
|
|
183
|
+
"default": [
|
|
184
|
+
".codesdd/**",
|
|
185
|
+
"external-context/**"
|
|
186
|
+
],
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"minLength": 1
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"handoff_artifacts": {
|
|
194
|
+
"default": [],
|
|
195
|
+
"type": "array",
|
|
196
|
+
"items": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": [
|
|
203
|
+
"mode",
|
|
204
|
+
"state_boundary_ref",
|
|
205
|
+
"command_sequence",
|
|
206
|
+
"allowed_state_writes",
|
|
207
|
+
"forbidden_state_writes",
|
|
208
|
+
"handoff_artifacts"
|
|
209
|
+
],
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
},
|
|
13
212
|
"architectural_impact": {
|
|
14
213
|
"type": "object",
|
|
15
214
|
"properties": {
|
|
@@ -73,10 +272,14 @@
|
|
|
73
272
|
"type": "object",
|
|
74
273
|
"properties": {
|
|
75
274
|
"unit_target": {
|
|
76
|
-
"type": "number"
|
|
275
|
+
"type": "number",
|
|
276
|
+
"minimum": 0,
|
|
277
|
+
"maximum": 100
|
|
77
278
|
},
|
|
78
279
|
"integration_target": {
|
|
79
|
-
"type": "number"
|
|
280
|
+
"type": "number",
|
|
281
|
+
"minimum": 0,
|
|
282
|
+
"maximum": 100
|
|
80
283
|
},
|
|
81
284
|
"approach": {
|
|
82
285
|
"type": "string"
|
|
@@ -259,6 +462,8 @@
|
|
|
259
462
|
"required": [
|
|
260
463
|
"schema_version",
|
|
261
464
|
"feature_id",
|
|
465
|
+
"governance",
|
|
466
|
+
"execution_plan",
|
|
262
467
|
"architectural_impact",
|
|
263
468
|
"frontend_impact",
|
|
264
469
|
"affected_contracts",
|