@devtrack-solution/codesdd 1.2.4-rc3 → 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.
- package/.sdd/skills/curated/devtrack-api/SKILL.md +91 -12
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +3 -3
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +2 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +59 -3
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1898 -2
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +3 -1
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +20 -2
- package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +4 -3
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -5
- package/README.md +122 -25
- package/dist/cli/program.js +180 -11
- package/dist/commands/config.js +27 -1
- package/dist/commands/sdd/execution.js +64 -2
- package/dist/commands/sdd.js +119 -4
- package/dist/core/cli/command-matrix.d.ts +18 -0
- package/dist/core/cli/command-matrix.js +148 -0
- package/dist/core/cli-command-quality.js +2 -0
- package/dist/core/config-schema.d.ts +14 -1
- package/dist/core/config-schema.js +32 -1
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.js +11 -0
- package/dist/core/global-config.d.ts +13 -0
- package/dist/core/init.d.ts +2 -2
- package/dist/core/init.js +13 -14
- package/dist/core/sdd/agent-binding.d.ts +9 -9
- package/dist/core/sdd/agent-runtime-contract.d.ts +4 -4
- package/dist/core/sdd/allocator-recovery.d.ts +14 -0
- package/dist/core/sdd/allocator-recovery.js +30 -0
- package/dist/core/sdd/allocator-security.d.ts +18 -0
- package/dist/core/sdd/allocator-security.js +36 -0
- package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
- package/dist/core/sdd/api-foundation-baseline.js +151 -0
- package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
- package/dist/core/sdd/api-foundation-parity.js +131 -0
- package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
- package/dist/core/sdd/api-profile-catalog.js +132 -0
- package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
- package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
- package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
- package/dist/core/sdd/api-profile-recipes.js +484 -0
- package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
- package/dist/core/sdd/artifact-id-allocator.js +510 -0
- package/dist/core/sdd/check.d.ts +50 -1
- package/dist/core/sdd/check.js +286 -9
- package/dist/core/sdd/deepagent-contracts.d.ts +4 -4
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
- package/dist/core/sdd/default-bootstrap-files.d.ts +1 -1
- package/dist/core/sdd/default-bootstrap-files.js +0 -2
- package/dist/core/sdd/default-skills.js +7 -5
- package/dist/core/sdd/devtrack-api-appliance.d.ts +34 -0
- package/dist/core/sdd/devtrack-api-appliance.js +138 -34
- package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
- package/dist/core/sdd/devtrack-api-architecture.js +86 -0
- package/dist/core/sdd/docs-sync.js +3 -3
- package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
- package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
- package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
- package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
- package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
- package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
- package/dist/core/sdd/governance-schemas.d.ts +2 -2
- package/dist/core/sdd/governance-schemas.js +11 -2
- package/dist/core/sdd/json-schema.js +4 -0
- package/dist/core/sdd/legacy-operations.js +93 -4
- package/dist/core/sdd/package-security-gates.js +2 -0
- package/dist/core/sdd/package-structure-gate.d.ts +85 -3
- package/dist/core/sdd/package-structure-gate.js +386 -8
- package/dist/core/sdd/parallel-feat-automation.d.ts +6 -6
- package/dist/core/sdd/plugin-policy.js +6 -1
- package/dist/core/sdd/plugin-registry.d.ts +3 -3
- package/dist/core/sdd/quality-validation.d.ts +5 -5
- package/dist/core/sdd/release-readiness.d.ts +49 -0
- package/dist/core/sdd/release-readiness.js +303 -8
- package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
- package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
- package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
- package/dist/core/sdd/reversa-artifact-writer.js +40 -0
- package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
- package/dist/core/sdd/reversa-command-policy.js +361 -0
- package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
- package/dist/core/sdd/reversa-data-extractor.js +73 -0
- package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
- package/dist/core/sdd/reversa-equivalence.js +34 -0
- package/dist/core/sdd/reversa-evidence.d.ts +298 -0
- package/dist/core/sdd/reversa-evidence.js +118 -0
- package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
- package/dist/core/sdd/reversa-reconstruction.js +32 -0
- package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
- package/dist/core/sdd/reversa-rules-extractor.js +86 -0
- package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
- package/dist/core/sdd/reversa-source-safety.js +105 -0
- package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
- package/dist/core/sdd/reversa-surface-scout.js +85 -0
- package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
- package/dist/core/sdd/reversa-ux-mapper.js +73 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +1 -1
- package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
- package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
- package/dist/core/sdd/services/decide.service.js +1 -1
- package/dist/core/sdd/services/finalize.service.d.ts +2 -0
- package/dist/core/sdd/services/finalize.service.js +48 -2
- package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
- package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
- package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
- package/dist/core/sdd/state.js +15 -5
- package/dist/core/sdd/types.d.ts +3 -3
- package/dist/core/sdd/workspace-schemas.d.ts +45 -4
- package/dist/core/sdd/workspace-schemas.js +27 -6
- package/dist/core/shared/skill-generation.d.ts +2 -0
- package/dist/core/shared/skill-generation.js +19 -2
- package/dist/core/shared/tool-detection.d.ts +19 -0
- package/dist/core/shared/tool-detection.js +89 -0
- package/package.json +6 -5
- package/schemas/sdd/5-quality.schema.json +43 -0
- package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
- package/schemas/sdd/workspace-catalog.schema.json +511 -0
|
@@ -336,6 +336,32 @@ export const workspaceRuntimeQualityGatesSchema = z.object({
|
|
|
336
336
|
performance: z.array(workspaceRuntimePerformanceTelemetrySchema).default([]),
|
|
337
337
|
flakiness: z.array(workspaceFlakinessTelemetrySchema).default([]),
|
|
338
338
|
});
|
|
339
|
+
export const workspaceCriticalEvidenceProvenanceSchema = z.object({
|
|
340
|
+
command: z.string().min(1),
|
|
341
|
+
exit_code: z.number().int(),
|
|
342
|
+
timestamp_iso: z.string().datetime(),
|
|
343
|
+
commit_sha: z.string().regex(/^[0-9a-f]{7,40}$/i),
|
|
344
|
+
artifact_path: z.string().min(1),
|
|
345
|
+
artifact_hash: z.string().min(1),
|
|
346
|
+
});
|
|
347
|
+
export const workspaceEvidenceLogEntrySchema = z
|
|
348
|
+
.object({
|
|
349
|
+
timestamp: z.string(),
|
|
350
|
+
kind: z.string(),
|
|
351
|
+
result: z.string(),
|
|
352
|
+
artifact: z.string().optional(),
|
|
353
|
+
critical: z.boolean().optional(),
|
|
354
|
+
provenance: workspaceCriticalEvidenceProvenanceSchema.optional(),
|
|
355
|
+
})
|
|
356
|
+
.superRefine((entry, ctx) => {
|
|
357
|
+
if (entry.critical === true && !entry.provenance) {
|
|
358
|
+
ctx.addIssue({
|
|
359
|
+
code: z.ZodIssueCode.custom,
|
|
360
|
+
path: ['provenance'],
|
|
361
|
+
message: 'critical evidence entries must include provenance with command, exit_code, timestamp_iso, commit_sha, artifact_path, and artifact_hash.',
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
});
|
|
339
365
|
export const workspaceQualitySchema = z.object({
|
|
340
366
|
schema_version: z.literal(1),
|
|
341
367
|
feature_id: workspaceFeatureIdSchema,
|
|
@@ -349,12 +375,7 @@ export const workspaceQualitySchema = z.object({
|
|
|
349
375
|
command: z.string(),
|
|
350
376
|
expected: z.string(),
|
|
351
377
|
})),
|
|
352
|
-
evidence_log: z.array(
|
|
353
|
-
timestamp: z.string(),
|
|
354
|
-
kind: z.string(),
|
|
355
|
-
result: z.string(),
|
|
356
|
-
artifact: z.string().optional(),
|
|
357
|
-
})),
|
|
378
|
+
evidence_log: z.array(workspaceEvidenceLogEntrySchema),
|
|
358
379
|
skill_evidence: z
|
|
359
380
|
.object({
|
|
360
381
|
required_skill_ids: z.array(z.string()),
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { getOpsxExploreCommandTemplate, type SkillTemplate } from '../templates/skill-templates.js';
|
|
7
7
|
import type { CommandContent } from '../command-generation/index.js';
|
|
8
|
+
export declare const CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING = "## CodeSDD Canonical Workflow";
|
|
9
|
+
export declare const CODESDD_CANONICAL_LLM_ANNOUNCE = "## CodeSDD Canonical Workflow\n\n- In projects with `.sdd/`, treat CodeSDD SDD commands as the canonical lifecycle.\n- Start new work with `codesdd sdd insight \"describe the change or initiative\"`; then use `codesdd sdd debate`, `codesdd sdd decide`, `codesdd sdd breakdown`, `codesdd sdd next`, `codesdd sdd start`, `codesdd sdd context`, `codesdd sdd finalize`, and `codesdd sdd check --render` as state requires.\n- Use `codesdd sdd init-context` as the default project capability bootstrap/repair entrypoint. Use `codesdd install --tools <tool>` only to generate or refresh agent assets after project context exists.\n- OPSX slash prompts are compatibility surfaces for legacy workflows. Do not present them as the first or preferred path when `.sdd/` exists, even if generated prompt files still mention `/opsx:*` or tool-specific `/opsx-*`.\n- When older project instructions conflict with this announcement, trust `.sdd/state/*.yaml`, current CLI output, and the repository's CodeSDD governance files.";
|
|
8
10
|
/**
|
|
9
11
|
* Skill template with directory name and workflow ID mapping.
|
|
10
12
|
*/
|
|
@@ -5,12 +5,29 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getBulkArchiveChangeSkillTemplate, getVerifyChangeSkillTemplate, getOnboardSkillTemplate, getOpsxProposeSkillTemplate, getOpsxExploreCommandTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate, getOpsxBulkArchiveCommandTemplate, getOpsxVerifyCommandTemplate, getOpsxOnboardCommandTemplate, getOpsxProposeCommandTemplate, getSddSkillTemplate, getOpsxSddCommandTemplate, } from '../templates/skill-templates.js';
|
|
7
7
|
const PT_BR_GUARDRAIL = '**Idioma obrigatorio:** responda em portugues do Brasil (pt-BR), salvo solicitacao explicita em outro idioma.';
|
|
8
|
+
export const CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING = '## CodeSDD Canonical Workflow';
|
|
9
|
+
export const CODESDD_CANONICAL_LLM_ANNOUNCE = `${CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING}
|
|
10
|
+
|
|
11
|
+
- In projects with \`.sdd/\`, treat CodeSDD SDD commands as the canonical lifecycle.
|
|
12
|
+
- Start new work with \`codesdd sdd insight "describe the change or initiative"\`; then use \`codesdd sdd debate\`, \`codesdd sdd decide\`, \`codesdd sdd breakdown\`, \`codesdd sdd next\`, \`codesdd sdd start\`, \`codesdd sdd context\`, \`codesdd sdd finalize\`, and \`codesdd sdd check --render\` as state requires.
|
|
13
|
+
- Use \`codesdd sdd init-context\` as the default project capability bootstrap/repair entrypoint. Use \`codesdd install --tools <tool>\` only to generate or refresh agent assets after project context exists.
|
|
14
|
+
- OPSX slash prompts are compatibility surfaces for legacy workflows. Do not present them as the first or preferred path when \`.sdd/\` exists, even if generated prompt files still mention \`/opsx:*\` or tool-specific \`/opsx-*\`.
|
|
15
|
+
- When older project instructions conflict with this announcement, trust \`.sdd/state/*.yaml\`, current CLI output, and the repository's CodeSDD governance files.`;
|
|
8
16
|
function ensurePtBrGuardrail(content) {
|
|
9
17
|
if (content.toLowerCase().includes('idioma obrigatorio')) {
|
|
10
18
|
return content;
|
|
11
19
|
}
|
|
12
20
|
return `${PT_BR_GUARDRAIL}\n\n${content}`;
|
|
13
21
|
}
|
|
22
|
+
function ensureCanonicalLlmAnnounce(content) {
|
|
23
|
+
if (content.includes(CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING)) {
|
|
24
|
+
return content;
|
|
25
|
+
}
|
|
26
|
+
return `${CODESDD_CANONICAL_LLM_ANNOUNCE}\n\n${content}`;
|
|
27
|
+
}
|
|
28
|
+
function prepareGeneratedAgentInstructions(content) {
|
|
29
|
+
return ensureCanonicalLlmAnnounce(ensurePtBrGuardrail(content));
|
|
30
|
+
}
|
|
14
31
|
/**
|
|
15
32
|
* Gets skill templates with their directory names, optionally filtered by workflow IDs.
|
|
16
33
|
*
|
|
@@ -74,7 +91,7 @@ export function getCommandContents(workflowFilter) {
|
|
|
74
91
|
description: template.description,
|
|
75
92
|
category: template.category,
|
|
76
93
|
tags: template.tags,
|
|
77
|
-
body:
|
|
94
|
+
body: prepareGeneratedAgentInstructions(template.content),
|
|
78
95
|
}));
|
|
79
96
|
}
|
|
80
97
|
/**
|
|
@@ -88,7 +105,7 @@ export function generateSkillContent(template, generatedByVersion, transformInst
|
|
|
88
105
|
const transformedInstructions = transformInstructions
|
|
89
106
|
? transformInstructions(template.instructions)
|
|
90
107
|
: template.instructions;
|
|
91
|
-
const instructions =
|
|
108
|
+
const instructions = prepareGeneratedAgentInstructions(transformedInstructions);
|
|
92
109
|
return `---
|
|
93
110
|
name: ${template.name}
|
|
94
111
|
description: ${template.description}
|
|
@@ -39,6 +39,24 @@ export interface ToolVersionStatus {
|
|
|
39
39
|
/** Whether the tool needs updating (version mismatch or missing) */
|
|
40
40
|
needsUpdate: boolean;
|
|
41
41
|
}
|
|
42
|
+
export interface GeneratedInstructionDriftEntry {
|
|
43
|
+
toolId: string;
|
|
44
|
+
toolName: string;
|
|
45
|
+
kind: 'skill' | 'command';
|
|
46
|
+
path: string;
|
|
47
|
+
issue: 'missing_canonical_announcement';
|
|
48
|
+
}
|
|
49
|
+
export interface GeneratedInstructionDriftReport {
|
|
50
|
+
schema_version: 1;
|
|
51
|
+
status: 'not_configured' | 'clean' | 'stale';
|
|
52
|
+
checked_count: number;
|
|
53
|
+
stale_count: number;
|
|
54
|
+
canonical_heading: string;
|
|
55
|
+
compatibility_warning: string;
|
|
56
|
+
stale_files: GeneratedInstructionDriftEntry[];
|
|
57
|
+
warnings: string[];
|
|
58
|
+
next_action: string;
|
|
59
|
+
}
|
|
42
60
|
/**
|
|
43
61
|
* Gets the list of tools with skillsDir configured.
|
|
44
62
|
*/
|
|
@@ -68,4 +86,5 @@ export declare function getConfiguredTools(projectRoot: string): string[];
|
|
|
68
86
|
* Gets version status for all configured tools.
|
|
69
87
|
*/
|
|
70
88
|
export declare function getAllToolVersionStatus(projectRoot: string, currentVersion: string): ToolVersionStatus[];
|
|
89
|
+
export declare function buildGeneratedInstructionDriftReport(projectRoot: string): GeneratedInstructionDriftReport;
|
|
71
90
|
//# sourceMappingURL=tool-detection.d.ts.map
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import * as fs from 'fs';
|
|
8
8
|
import { AI_TOOLS } from '../config.js';
|
|
9
|
+
import { CommandAdapterRegistry } from '../command-generation/registry.js';
|
|
10
|
+
import { CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING } from './skill-generation.js';
|
|
9
11
|
/**
|
|
10
12
|
* Names of skill directories created by codesdd init.
|
|
11
13
|
*/
|
|
@@ -155,4 +157,91 @@ export function getAllToolVersionStatus(projectRoot, currentVersion) {
|
|
|
155
157
|
const configuredTools = getConfiguredTools(projectRoot);
|
|
156
158
|
return configuredTools.map((toolId) => getToolVersionStatus(projectRoot, toolId, currentVersion));
|
|
157
159
|
}
|
|
160
|
+
function formatInstructionPath(projectRoot, filePath) {
|
|
161
|
+
if (!path.isAbsolute(filePath)) {
|
|
162
|
+
return filePath;
|
|
163
|
+
}
|
|
164
|
+
const relative = path.relative(projectRoot, filePath);
|
|
165
|
+
if (relative && !relative.startsWith('..') && !path.isAbsolute(relative)) {
|
|
166
|
+
return relative;
|
|
167
|
+
}
|
|
168
|
+
return filePath;
|
|
169
|
+
}
|
|
170
|
+
function inspectGeneratedInstructionFile(projectRoot, toolId, toolName, kind, filePath) {
|
|
171
|
+
if (!fs.existsSync(filePath)) {
|
|
172
|
+
return { checked: false };
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
176
|
+
const checked = true;
|
|
177
|
+
if (content.includes(CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING)) {
|
|
178
|
+
return { checked };
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
checked,
|
|
182
|
+
stale: {
|
|
183
|
+
toolId,
|
|
184
|
+
toolName,
|
|
185
|
+
kind,
|
|
186
|
+
path: formatInstructionPath(projectRoot, filePath),
|
|
187
|
+
issue: 'missing_canonical_announcement',
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return { checked: false };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
export function buildGeneratedInstructionDriftReport(projectRoot) {
|
|
196
|
+
const staleFiles = [];
|
|
197
|
+
let checkedCount = 0;
|
|
198
|
+
for (const tool of AI_TOOLS.filter((item) => item.skillsDir)) {
|
|
199
|
+
if (!tool.skillsDir)
|
|
200
|
+
continue;
|
|
201
|
+
const skillStatus = getToolSkillStatus(projectRoot, tool.value);
|
|
202
|
+
const skillsDir = path.join(projectRoot, tool.skillsDir, 'skills');
|
|
203
|
+
for (const skillName of SKILL_NAMES) {
|
|
204
|
+
const skillFile = path.join(skillsDir, skillName, 'SKILL.md');
|
|
205
|
+
const result = inspectGeneratedInstructionFile(projectRoot, tool.value, tool.name, 'skill', skillFile);
|
|
206
|
+
if (result.checked)
|
|
207
|
+
checkedCount++;
|
|
208
|
+
if (result.stale)
|
|
209
|
+
staleFiles.push(result.stale);
|
|
210
|
+
}
|
|
211
|
+
const adapter = CommandAdapterRegistry.get(tool.value);
|
|
212
|
+
if (!adapter)
|
|
213
|
+
continue;
|
|
214
|
+
for (const commandId of COMMAND_IDS) {
|
|
215
|
+
const adapterPath = adapter.getFilePath(commandId);
|
|
216
|
+
if (path.isAbsolute(adapterPath) && !skillStatus.configured) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const commandFile = path.isAbsolute(adapterPath) ? adapterPath : path.join(projectRoot, adapterPath);
|
|
220
|
+
const result = inspectGeneratedInstructionFile(projectRoot, tool.value, tool.name, 'command', commandFile);
|
|
221
|
+
if (result.checked)
|
|
222
|
+
checkedCount++;
|
|
223
|
+
if (result.stale)
|
|
224
|
+
staleFiles.push(result.stale);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const staleCount = staleFiles.length;
|
|
228
|
+
const status = checkedCount === 0 ? 'not_configured' : staleCount > 0 ? 'stale' : 'clean';
|
|
229
|
+
const warnings = staleCount > 0
|
|
230
|
+
? [
|
|
231
|
+
`${staleCount} generated CodeSDD instruction file(s) are missing the canonical LLM announcement.`,
|
|
232
|
+
'Regenerate instructions with `codesdd update` or rerun `codesdd install --tools <tool>` for the affected tools.',
|
|
233
|
+
]
|
|
234
|
+
: [];
|
|
235
|
+
return {
|
|
236
|
+
schema_version: 1,
|
|
237
|
+
status,
|
|
238
|
+
checked_count: checkedCount,
|
|
239
|
+
stale_count: staleCount,
|
|
240
|
+
canonical_heading: CODESDD_CANONICAL_LLM_ANNOUNCE_HEADING,
|
|
241
|
+
compatibility_warning: 'OPSX slash prompts are compatibility surfaces; prefer CodeSDD SDD commands when .sdd/ exists.',
|
|
242
|
+
stale_files: staleFiles,
|
|
243
|
+
warnings,
|
|
244
|
+
next_action: staleCount > 0 ? 'codesdd update' : 'none',
|
|
245
|
+
};
|
|
246
|
+
}
|
|
158
247
|
//# sourceMappingURL=tool-detection.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtrack-solution/codesdd",
|
|
3
|
-
"version": "1.2.4
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "AI-native system for spec-driven development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codesdd",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"test:coverage": "vitest run --coverage --silent=passed-only",
|
|
74
74
|
"coverage": "vitest run --coverage --silent=passed-only",
|
|
75
75
|
"quality": "pnpm run cleanup:install && pnpm run build && pnpm run lint && pnpm run test && pnpm run test:e2e && pnpm run coverage",
|
|
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
|
+
"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 && node bin/codesdd.js sdd check --render --strict",
|
|
77
77
|
"prepublishOnly": "node build.js",
|
|
78
78
|
"prepare": "node scripts/install-git-hooks.mjs",
|
|
79
79
|
"check:pack-version": "node scripts/pack-version-check.mjs",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"sdd:schema:check": "node scripts/export-sdd-schemas.mjs --check",
|
|
82
82
|
"sdd:scan-naming": "node bin/codesdd.js sdd scan-naming",
|
|
83
83
|
"sdd:scan-naming:strict": "node bin/codesdd.js sdd scan-naming --strict",
|
|
84
|
+
"sdd:service-catalog:maturity": "node scripts/audit-service-catalog-maturity.mjs",
|
|
84
85
|
"sdd:precommit:fast": "node scripts/pre-commit-sdd-fast.mjs",
|
|
85
86
|
"sdd:validate:no-build": "node bin/codesdd.js sdd check --render --strict && node bin/codesdd.js sdd diagnose --strict && node bin/codesdd.js sdd scan-naming",
|
|
86
87
|
"sdd:validate": "pnpm run build && pnpm run sdd:schema:check && pnpm run sdd:validate:no-build",
|
|
@@ -96,13 +97,13 @@
|
|
|
96
97
|
"@changesets/changelog-github": "^0.7.0",
|
|
97
98
|
"@changesets/cli": "^2.31.0",
|
|
98
99
|
"@mermaid-js/mermaid-cli": "^11.15.0",
|
|
99
|
-
"@vitest/coverage-v8": "^
|
|
100
|
-
"@vitest/ui": "^
|
|
100
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
101
|
+
"@vitest/ui": "^4.1.8",
|
|
101
102
|
"eslint": "^10.4.0",
|
|
102
103
|
"puppeteer": "24.43.1",
|
|
103
104
|
"ts-morph": "^28.0.0",
|
|
104
105
|
"typescript-eslint": "^8.59.4",
|
|
105
|
-
"vitest": "^
|
|
106
|
+
"vitest": "^4.1.8"
|
|
106
107
|
},
|
|
107
108
|
"dependencies": {
|
|
108
109
|
"@inquirer/core": "^11.1.10",
|
|
@@ -80,6 +80,49 @@
|
|
|
80
80
|
},
|
|
81
81
|
"artifact": {
|
|
82
82
|
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"critical": {
|
|
85
|
+
"type": "boolean"
|
|
86
|
+
},
|
|
87
|
+
"provenance": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"command": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1
|
|
93
|
+
},
|
|
94
|
+
"exit_code": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"minimum": -9007199254740991,
|
|
97
|
+
"maximum": 9007199254740991
|
|
98
|
+
},
|
|
99
|
+
"timestamp_iso": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"format": "date-time",
|
|
102
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
103
|
+
},
|
|
104
|
+
"commit_sha": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"pattern": "^[0-9a-f]{7,40}$"
|
|
107
|
+
},
|
|
108
|
+
"artifact_path": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1
|
|
111
|
+
},
|
|
112
|
+
"artifact_hash": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": [
|
|
118
|
+
"command",
|
|
119
|
+
"exit_code",
|
|
120
|
+
"timestamp_iso",
|
|
121
|
+
"commit_sha",
|
|
122
|
+
"artifact_path",
|
|
123
|
+
"artifact_hash"
|
|
124
|
+
],
|
|
125
|
+
"additionalProperties": false
|
|
83
126
|
}
|
|
84
127
|
},
|
|
85
128
|
"required": [
|