@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
@@ -23,8 +23,10 @@ import { SddRebuildService, formatSddRebuildReport } from "../core/sdd/services/
23
23
  import { SddMetricsService, formatSddMetricsReport } from "../core/sdd/services/metrics.service.js";
24
24
  import { FeatureLintService, formatFeatureLintReport } from "../core/sdd/services/feature-lint.service.js";
25
25
  import { SddDedupApplyService, formatSddDedupApplyReport } from "../core/sdd/services/dedup-apply.service.js";
26
+ import { evaluateSddIntentGuard } from '../core/sdd/intent-guard.js';
26
27
  import { captureFingerprintsForChange, writeMeta } from '../core/sdd/fingerprint.js';
27
- import { ensureMandatorySddMigration, parseCsvOption, parseFlowModeOption, parseLangOption, parseLayoutOption, resolveRoot, } from './sdd/shared.js';
28
+ import { REVERSA_AUTHORIZATION_SCOPES, REVERSA_BACKEND_CONTRACT_MODES, REVERSA_COMMANDS, REVERSA_MODES, REVERSA_PRESERVATION_CHOICES, REVERSA_TARGET_STACKS, REVERSA_URL_MODES, REVERSA_VOLUME_PRESETS, buildReversaCommandPlan, } from '../core/sdd/reversa-command-policy.js';
29
+ import { ensureMandatorySddMigration, parseCsvOption, parseFlowModeOption, parseLangOption, parseLayoutOption, resolveInitRoot, resolveRoot, } from './sdd/shared.js';
28
30
  import { registerExecutionCommands } from './sdd/execution.js';
29
31
  import { registerPluginCommands } from './sdd/plugin.js';
30
32
  import { registerSkillsCommands } from './sdd/skills.js';
@@ -32,6 +34,135 @@ import { registerBacklogCommands } from './sdd/backlog.js';
32
34
  import { displayLegacySpecPath, resolveLegacySpecSubpath, } from '../core/sdd/services/legacy-capability.service.js';
33
35
  export function registerSddCommand(program) {
34
36
  const sddCmd = program.command('sdd').description('SDD memory operations');
37
+ sddCmd
38
+ .command('intent-guard')
39
+ .description('Classifica uma solicitacao e informa quando o fluxo CodeSDD e obrigatorio')
40
+ .alias('guarda-intencao')
41
+ .requiredOption('--request <text>', 'Texto da solicitacao do usuario/agente')
42
+ .option('--feat <FEAT-ID>', 'FEAT ja selecionada para o contexto CodeSDD')
43
+ .option('--strict', 'Retorna exit code 2 quando a solicitacao exige CodeSDD e nenhuma FEAT foi informada')
44
+ .option('--json', 'Saida em JSON')
45
+ .action((options) => {
46
+ const result = evaluateSddIntentGuard({
47
+ request: options?.request ?? '',
48
+ featureRef: options?.feat,
49
+ });
50
+ if (options?.json) {
51
+ console.log(JSON.stringify(result, null, 2));
52
+ }
53
+ else {
54
+ console.log(`Classificacao: ${result.classification}`);
55
+ console.log(`Requer CodeSDD: ${result.requires_codesdd_planning ? 'sim' : 'nao'}`);
56
+ console.log(`Motivo: ${result.reason}`);
57
+ if (result.required_commands.length > 0) {
58
+ console.log('Comandos obrigatorios:');
59
+ for (const command of result.required_commands) {
60
+ console.log(`- ${command}`);
61
+ }
62
+ }
63
+ for (const warning of result.warnings) {
64
+ console.log(chalk.yellow(`Aviso: ${warning}`));
65
+ }
66
+ }
67
+ if (options?.strict && result.requires_codesdd_planning && !result.feature_ref) {
68
+ process.exitCode = 2;
69
+ }
70
+ });
71
+ sddCmd
72
+ .command('reversa <command> [target]')
73
+ .description('Planeja a superficie Reversa com politica governada e fail-closed')
74
+ .option('--mode <mode>', `Modo Reversa: ${REVERSA_MODES.join('|')} (padrao: read-only); para url aceita tambem ${REVERSA_URL_MODES.join('|')}`)
75
+ .option('--execution-mode <mode>', `Modo de execucao Reversa: ${REVERSA_MODES.join('|')}`)
76
+ .option('--url-mode <mode>', `Modo URL: ${REVERSA_URL_MODES.join('|')}`)
77
+ .option('--feature <FEAT-ID>', 'FEAT que recebera evidencias Reversa')
78
+ .option('--source <path>', 'Fonte legada ou diretorio alvo a inspecionar')
79
+ .option('--approval <list>', 'Aprovacoes separadas por virgula para modos apply')
80
+ .option('--accept-legal-terms', 'Aceita os termos legais obrigatorios para Reversa URL')
81
+ .option('--authorization-scope <scope>', `Escopo de autorizacao URL: ${REVERSA_AUTHORIZATION_SCOPES.join('|')}`)
82
+ .option('--authorization-note <note>', 'Referencia auditavel de autorizacao, contrato, ticket ou ordem')
83
+ .option('--volume-preset <preset>', `Preset de volumetria URL: ${REVERSA_VOLUME_PRESETS.join('|')}`)
84
+ .option('--volume-budget <file>', 'Arquivo de budget customizado para volumetria URL')
85
+ .option('--approve-volume-budget', 'Confirma que o budget customizado foi validado por schema e aprovado por humano')
86
+ .option('--target-stack <stack>', `Stack alvo URL: ${REVERSA_TARGET_STACKS.join('|')}`)
87
+ .option('--preserve-brand <decision>', `Decisao de marca: ${REVERSA_PRESERVATION_CHOICES.join('|')}`)
88
+ .option('--preserve-logo <decision>', `Decisao de logo: ${REVERSA_PRESERVATION_CHOICES.join('|')}`)
89
+ .option('--preserve-content <decision>', `Decisao de conteudo: ${REVERSA_PRESERVATION_CHOICES.join('|')}`)
90
+ .option('--preserve-assets <decision>', `Decisao de assets: ${REVERSA_PRESERVATION_CHOICES.join('|')}`)
91
+ .option('--preserve-unique-traits <text>', 'Caracteristicas unicas a preservar ou transformar')
92
+ .option('--backend-contracts <mode>', `Contratos backend observados: ${REVERSA_BACKEND_CONTRACT_MODES.join('|')}`)
93
+ .option('--backend-redaction-policy <policy>', 'Politica/arquivo de redacao para inventario de contratos backend')
94
+ .option('--brand-transform <text>', 'Instrucoes de transformacao de marca para derivacao autorizada')
95
+ .option('--intake <file>', 'Arquivo de intake guiado para execucao nao interativa')
96
+ .option('--intake-schema-validated', 'Confirma que o arquivo de intake foi validado por schema')
97
+ .option('--ack-frontend-only', 'Reconhece que a saida Reversa URL e somente frontend renderizado')
98
+ .option('--json', 'Saida em JSON')
99
+ .action((command, target, options) => {
100
+ const plan = buildReversaCommandPlan({
101
+ command,
102
+ mode: options?.mode,
103
+ executionMode: options?.executionMode,
104
+ target,
105
+ featureRef: options?.feature,
106
+ sourcePath: options?.source,
107
+ approvals: parseCsvOption(options?.approval),
108
+ urlMode: options?.urlMode,
109
+ acceptLegalTerms: options?.acceptLegalTerms,
110
+ authorizationScope: options?.authorizationScope,
111
+ authorizationNote: options?.authorizationNote,
112
+ volumePreset: options?.volumePreset,
113
+ volumeBudgetPath: options?.volumeBudget,
114
+ volumeBudgetApproved: options?.approveVolumeBudget,
115
+ targetStack: options?.targetStack,
116
+ preserveBrand: options?.preserveBrand,
117
+ preserveLogo: options?.preserveLogo,
118
+ preserveContent: options?.preserveContent,
119
+ preserveAssets: options?.preserveAssets,
120
+ preserveUniqueTraits: options?.preserveUniqueTraits,
121
+ backendContracts: options?.backendContracts,
122
+ backendRedactionPolicy: options?.backendRedactionPolicy,
123
+ brandTransform: options?.brandTransform,
124
+ intakePath: options?.intake,
125
+ intakeSchemaValidated: options?.intakeSchemaValidated,
126
+ acknowledgeFrontendOnly: options?.ackFrontendOnly,
127
+ });
128
+ if (options?.json) {
129
+ console.log(JSON.stringify(plan, null, 2));
130
+ }
131
+ else {
132
+ console.log(`Reversa command: ${plan.command}`);
133
+ console.log(`Mode: ${plan.mode}`);
134
+ console.log(`Status: ${plan.status}`);
135
+ console.log(`Evidence: ${plan.evidence_path}`);
136
+ console.log(`Supported commands: ${REVERSA_COMMANDS.join(', ')}`);
137
+ if (plan.url_policy) {
138
+ console.log(`URL mode: ${plan.url_policy.url_mode}`);
139
+ console.log(`Frontend-only: ${plan.url_policy.frontend_only_boundary ? 'yes' : 'no'}`);
140
+ console.log(`Backend copied: ${plan.url_policy.backend_implementation_copied ? 'yes' : 'no'}`);
141
+ console.log(`Volume preset: ${plan.url_policy.volume_preset}`);
142
+ if (plan.url_policy.required_questions.length > 0) {
143
+ console.log('Required guided questions:');
144
+ for (const question of plan.url_policy.required_questions) {
145
+ console.log(`- ${question}`);
146
+ }
147
+ }
148
+ }
149
+ if (plan.required_contracts.length > 0) {
150
+ console.log('Required contracts:');
151
+ for (const contract of plan.required_contracts) {
152
+ console.log(`- ${contract}`);
153
+ }
154
+ }
155
+ if (plan.warnings.length > 0) {
156
+ console.log('Warnings:');
157
+ for (const warning of plan.warnings) {
158
+ console.log(chalk.yellow(`- ${warning}`));
159
+ }
160
+ }
161
+ }
162
+ if (plan.status === 'blocked') {
163
+ process.exitCode = 2;
164
+ }
165
+ });
35
166
  sddCmd
36
167
  .command('init [path]')
37
168
  .description('Initializes the .sdd structure and base state files')
@@ -41,7 +172,7 @@ export function registerSddCommand(program) {
41
172
  .option('--layout <layout>', 'Folder layout: en-US|legacy|pt-BR')
42
173
  .option('--no-render', 'Does not generate Markdown views after initialization')
43
174
  .action(async (targetPath = '.', options) => {
44
- const root = resolveRoot(targetPath);
175
+ const root = resolveInitRoot(targetPath);
45
176
  const __config = await loadProjectSddConfig(root);
46
177
  const __paths = resolveSddPaths(root, __config);
47
178
  const stores = createSddStores(__paths);
@@ -378,7 +509,7 @@ export function registerSddCommand(program) {
378
509
  console.log(`Registros de discovery: ${report.summary.discovery}`);
379
510
  console.log(`Itens de backlog: ${report.summary.backlog}`);
380
511
  console.log(`Itens de divida tecnica: ${report.summary.techDebt}`);
381
- console.log(`Itens na fila de finalize: ${report.summary.finalizeQueue}`);
512
+ console.log(`Registros de finalize: ${report.summary.finalizeQueue} (pendentes: ${report.summary.finalizeQueuePending}; concluidos: ${report.summary.finalizeQueueDone})`);
382
513
  console.log(`Frontend ativado: ${report.summary.frontendEnabled ? 'sim' : 'nao'}`);
383
514
  console.log(`Progresso global: ${report.summary.progress_global.percent}% (${report.summary.progress_global.done}/${report.summary.progress_global.total})`);
384
515
  console.log(`Prontas para paralelo: ${report.summary.ready_for_parallel}`);
@@ -413,9 +544,28 @@ export function registerSddCommand(program) {
413
544
  }
414
545
  }
415
546
  if (report.summary.frontendEnabled) {
416
- console.log(`Gaps de frontend: ${report.summary.frontendGaps}`);
547
+ const frontendGapsSummary = report.summary.frontendGapsSummary ?? {
548
+ total: report.summary.frontendGaps,
549
+ open: report.summary.frontendGaps,
550
+ planned: 0,
551
+ in_progress: 0,
552
+ resolved: 0,
553
+ superseded: 0,
554
+ unresolved: report.summary.frontendGaps,
555
+ };
556
+ console.log(`Gaps de frontend abertos: ${frontendGapsSummary.open}`);
557
+ console.log(`Gaps de frontend em planejamento/execucao: ${frontendGapsSummary.planned + frontendGapsSummary.in_progress}`);
558
+ console.log(`Gaps de frontend resolvidos/historicos: ${frontendGapsSummary.resolved + frontendGapsSummary.superseded}`);
559
+ console.log(`Gaps de frontend total historico: ${frontendGapsSummary.total}`);
417
560
  console.log(`Rotas de frontend: ${report.summary.frontendRoutes}`);
418
561
  }
562
+ if (report.summary.lock_domain_health) {
563
+ console.log(`Lock domains compartilhados ativos: ${report.summary.lock_domain_health.active_conflicts}`);
564
+ if (report.summary.lock_domain_health.historical > 0 ||
565
+ report.summary.lock_domain_health.mixed_history > 0) {
566
+ console.log(`Lock domains compartilhados historicos/mistos: ${report.summary.lock_domain_health.historical + report.summary.lock_domain_health.mixed_history}`);
567
+ }
568
+ }
419
569
  if (report.warnings.length > 0) {
420
570
  console.log(chalk.yellow('\nAvisos:'));
421
571
  for (const warning of report.warnings) {
@@ -684,14 +834,14 @@ export function registerSddCommand(program) {
684
834
  });
685
835
  registerSkillsCommands(sddCmd);
686
836
  sddCmd
687
- .command('diagnose')
837
+ .command('diagnose [path]')
688
838
  .alias('diagnosticar')
689
839
  .description('Executa o motor de diagnostico estrutural')
690
840
  .option('--strict', 'Falha se houver inconsistencias criticas')
691
841
  .option('--json', 'Saida em formato JSON')
692
842
  .option('--output <path>', 'Caminho para salvar o relatorio JSON')
693
- .action(async (options) => {
694
- const root = resolveRoot();
843
+ .action(async (targetPath = '.', options) => {
844
+ const root = resolveRoot(targetPath);
695
845
  const command = new SddDiagnoseCommand();
696
846
  const result = await command.execute(root, {
697
847
  strict: options.strict,
@@ -1,5 +1,8 @@
1
1
  import type { Command } from 'commander';
2
2
  export type CliCoverageStrategy = 'contract' | 'spawned-e2e' | 'exception';
3
+ export type CliPublicCommandClass = 'canonical-lifecycle' | 'bootstrap-repair' | 'compatibility-workflow' | 'migration-tool' | 'diagnostics-governance' | 'experimental-internal';
4
+ export type CliCommandBoundary = 'codesdd-native' | 'compatibility-window' | 'migration-only' | 'internal-hidden';
5
+ export type CliLlmPolicy = 'teach-first' | 'advanced' | 'compatibility-only' | 'migration-only' | 'internal-only';
3
6
  export interface CliLeafCommand {
4
7
  commandPath: string;
5
8
  description: string;
@@ -11,13 +14,28 @@ export interface CliCommandMatrixEntry {
11
14
  strategy: CliCoverageStrategy;
12
15
  rationale: string;
13
16
  }
17
+ export interface CliCommandTaxonomyEntry {
18
+ commandPath: string;
19
+ publicClass: CliPublicCommandClass;
20
+ boundary: CliCommandBoundary;
21
+ llmPolicy: CliLlmPolicy;
22
+ rationale: string;
23
+ }
14
24
  export interface CliCommandMatrixValidationReport {
15
25
  leafCommands: CliLeafCommand[];
16
26
  duplicateEntries: string[];
17
27
  missingEntries: string[];
18
28
  extraEntries: string[];
19
29
  }
30
+ export interface CliCommandTaxonomyValidationReport {
31
+ leafCommands: CliLeafCommand[];
32
+ classifiedCommands: CliCommandTaxonomyEntry[];
33
+ missingTaxonomy: string[];
34
+ }
35
+ export declare const CLI_PUBLIC_COMMAND_CLASS_DESCRIPTIONS: Record<CliPublicCommandClass, string>;
20
36
  export declare function collectCliLeafCommands(command: Command, prefix?: string[]): CliLeafCommand[];
37
+ export declare function classifyCliCommandPath(commandPath: string): CliCommandTaxonomyEntry | undefined;
21
38
  export declare const CLI_COMMAND_MATRIX: ReadonlyArray<CliCommandMatrixEntry>;
22
39
  export declare function validateCliCommandMatrix(program: Command): CliCommandMatrixValidationReport;
40
+ export declare function validateCliCommandTaxonomy(program: Command): CliCommandTaxonomyValidationReport;
23
41
  //# sourceMappingURL=command-matrix.d.ts.map
@@ -1,4 +1,122 @@
1
1
  import { CLI_NAME } from '../branding.js';
2
+ export const CLI_PUBLIC_COMMAND_CLASS_DESCRIPTIONS = {
3
+ 'canonical-lifecycle': 'Preferred CodeSDD-native lifecycle commands for discovery, planning, execution, and closure.',
4
+ 'bootstrap-repair': 'Commands that create, refresh, or repair CodeSDD project or tool assets.',
5
+ 'compatibility-workflow': 'Legacy or noun-based workflow commands kept for migration and existing automation.',
6
+ 'migration-tool': 'Explicit import, migration, or upgrade commands for legacy or cross-version state.',
7
+ 'diagnostics-governance': 'Health, configuration, schema, policy, provider, catalog, and governance support commands.',
8
+ 'experimental-internal': 'Hidden, internal, or deprecated experimental surfaces that should not appear in first-run guidance.',
9
+ };
10
+ const CANONICAL_LIFECYCLE_RULE = {
11
+ publicClass: 'canonical-lifecycle',
12
+ boundary: 'codesdd-native',
13
+ llmPolicy: 'teach-first',
14
+ rationale: 'Canonical CodeSDD lifecycle surface backed by .sdd/state/*.yaml.',
15
+ };
16
+ const BOOTSTRAP_REPAIR_RULE = {
17
+ publicClass: 'bootstrap-repair',
18
+ boundary: 'codesdd-native',
19
+ llmPolicy: 'teach-first',
20
+ rationale: 'Creates or refreshes CodeSDD project state and generated tool assets.',
21
+ };
22
+ const COMPATIBILITY_WORKFLOW_RULE = {
23
+ publicClass: 'compatibility-workflow',
24
+ boundary: 'compatibility-window',
25
+ llmPolicy: 'compatibility-only',
26
+ rationale: 'Maintained for existing workflows and legacy automation; not the CodeSDD-native happy path.',
27
+ };
28
+ const MIGRATION_TOOL_RULE = {
29
+ publicClass: 'migration-tool',
30
+ boundary: 'migration-only',
31
+ llmPolicy: 'migration-only',
32
+ rationale: 'Explicitly moves or imports legacy state; never part of the default first-run flow.',
33
+ };
34
+ const DIAGNOSTICS_GOVERNANCE_RULE = {
35
+ publicClass: 'diagnostics-governance',
36
+ boundary: 'codesdd-native',
37
+ llmPolicy: 'advanced',
38
+ rationale: 'Supports health, configuration, schema, provider, catalog, policy, or governance diagnostics.',
39
+ };
40
+ const INTERNAL_RULE = {
41
+ publicClass: 'experimental-internal',
42
+ boundary: 'internal-hidden',
43
+ llmPolicy: 'internal-only',
44
+ rationale: 'Hidden or internal command surface; not documented as user onboarding guidance.',
45
+ };
46
+ const EXACT_COMMAND_TAXONOMY = new Map([
47
+ ['init', BOOTSTRAP_REPAIR_RULE],
48
+ ['reload', BOOTSTRAP_REPAIR_RULE],
49
+ ['install', BOOTSTRAP_REPAIR_RULE],
50
+ ['update', BOOTSTRAP_REPAIR_RULE],
51
+ ['sdd:init', BOOTSTRAP_REPAIR_RULE],
52
+ ['sdd:init-context', BOOTSTRAP_REPAIR_RULE],
53
+ ['sdd:insight', CANONICAL_LIFECYCLE_RULE],
54
+ ['sdd:ingest-deposito', CANONICAL_LIFECYCLE_RULE],
55
+ ['sdd:debate', CANONICAL_LIFECYCLE_RULE],
56
+ ['sdd:decide', CANONICAL_LIFECYCLE_RULE],
57
+ ['sdd:breakdown', CANONICAL_LIFECYCLE_RULE],
58
+ ['sdd:start', CANONICAL_LIFECYCLE_RULE],
59
+ ['sdd:frontend-impact', CANONICAL_LIFECYCLE_RULE],
60
+ ['sdd:finalize', CANONICAL_LIFECYCLE_RULE],
61
+ ['sdd:context', CANONICAL_LIFECYCLE_RULE],
62
+ ['sdd:onboard', CANONICAL_LIFECYCLE_RULE],
63
+ ['sdd:aprovar', CANONICAL_LIFECYCLE_RULE],
64
+ ['sdd:next', CANONICAL_LIFECYCLE_RULE],
65
+ ['sdd:plan-status', CANONICAL_LIFECYCLE_RULE],
66
+ ['sdd:execute-next', CANONICAL_LIFECYCLE_RULE],
67
+ ['sdd:check', CANONICAL_LIFECYCLE_RULE],
68
+ ['sdd:diagnose', CANONICAL_LIFECYCLE_RULE],
69
+ ['sdd:reversa', CANONICAL_LIFECYCLE_RULE],
70
+ ['list', COMPATIBILITY_WORKFLOW_RULE],
71
+ ['view', COMPATIBILITY_WORKFLOW_RULE],
72
+ ['change:show', COMPATIBILITY_WORKFLOW_RULE],
73
+ ['change:list', COMPATIBILITY_WORKFLOW_RULE],
74
+ ['change:validate', COMPATIBILITY_WORKFLOW_RULE],
75
+ ['archive', COMPATIBILITY_WORKFLOW_RULE],
76
+ ['spec:show', COMPATIBILITY_WORKFLOW_RULE],
77
+ ['spec:list', COMPATIBILITY_WORKFLOW_RULE],
78
+ ['spec:validate', COMPATIBILITY_WORKFLOW_RULE],
79
+ ['validate', COMPATIBILITY_WORKFLOW_RULE],
80
+ ['show', COMPATIBILITY_WORKFLOW_RULE],
81
+ ['status', COMPATIBILITY_WORKFLOW_RULE],
82
+ ['instructions', COMPATIBILITY_WORKFLOW_RULE],
83
+ ['templates', COMPATIBILITY_WORKFLOW_RULE],
84
+ ['schemas', COMPATIBILITY_WORKFLOW_RULE],
85
+ ['new:change', COMPATIBILITY_WORKFLOW_RULE],
86
+ ['sdd:migrate', MIGRATION_TOOL_RULE],
87
+ ['sdd:upgrade-to-codesdd', MIGRATION_TOOL_RULE],
88
+ ['sdd:migrate-workspace', MIGRATION_TOOL_RULE],
89
+ ['sdd:import-legacy-spec', MIGRATION_TOOL_RULE],
90
+ ['experimental', INTERNAL_RULE],
91
+ ['__complete', INTERNAL_RULE],
92
+ ]);
93
+ const PREFIX_COMMAND_TAXONOMY = [
94
+ { prefix: 'config:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
95
+ { prefix: 'schema:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
96
+ { prefix: 'completion:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
97
+ { prefix: 'sdd:plugin:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
98
+ { prefix: 'sdd:backlog:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
99
+ { prefix: 'sdd:skills:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
100
+ { prefix: 'sdd:sanitize:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
101
+ { prefix: 'sdd:fgap:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
102
+ { prefix: 'sdd:lint:', rule: DIAGNOSTICS_GOVERNANCE_RULE },
103
+ ];
104
+ const EXACT_DIAGNOSTICS_GOVERNANCE_COMMANDS = new Set([
105
+ 'feedback',
106
+ 'sdd:intent-guard',
107
+ 'sdd:fingerprint',
108
+ 'sdd:historical-quality-regression',
109
+ 'sdd:mcp-manifest',
110
+ 'sdd:mcp-call',
111
+ 'sdd:preflight',
112
+ 'sdd:agent:run',
113
+ 'sdd:release-readiness',
114
+ 'sdd:rebuild',
115
+ 'sdd:metrics',
116
+ 'sdd:dedup',
117
+ 'sdd:audit',
118
+ 'sdd:scan-naming',
119
+ ]);
2
120
  function commandSegments(command, prefix = []) {
3
121
  const name = command.name();
4
122
  if (!name || name === CLI_NAME) {
@@ -21,6 +139,19 @@ export function collectCliLeafCommands(command, prefix = []) {
21
139
  }
22
140
  return children.flatMap((child) => collectCliLeafCommands(child, segments));
23
141
  }
142
+ export function classifyCliCommandPath(commandPath) {
143
+ const exactRule = EXACT_COMMAND_TAXONOMY.get(commandPath);
144
+ const rule = exactRule ??
145
+ PREFIX_COMMAND_TAXONOMY.find((entry) => commandPath.startsWith(entry.prefix))?.rule ??
146
+ (EXACT_DIAGNOSTICS_GOVERNANCE_COMMANDS.has(commandPath) ? DIAGNOSTICS_GOVERNANCE_RULE : undefined);
147
+ if (!rule) {
148
+ return undefined;
149
+ }
150
+ return {
151
+ commandPath,
152
+ ...rule,
153
+ };
154
+ }
24
155
  export const CLI_COMMAND_MATRIX = [
25
156
  { commandPath: 'init', strategy: 'contract', rationale: 'Project bootstrap is deterministic and already decomposes into testable setup services.' },
26
157
  { commandPath: 'reload', strategy: 'spawned-e2e', rationale: 'Reload reapplies base setup plus SDD bootstrap with the installed CLI version and needs real-bin smoke coverage.' },
@@ -46,12 +177,17 @@ export const CLI_COMMAND_MATRIX = [
46
177
  { commandPath: 'config:reset', strategy: 'contract', rationale: 'Reset behavior is deterministic once prompts are bypassed in tests.' },
47
178
  { commandPath: 'config:edit', strategy: 'exception', rationale: 'This command delegates to an external editor process and only needs focused environment-sensitive coverage.' },
48
179
  { commandPath: 'config:profile', strategy: 'contract', rationale: 'Profile inspection is scriptable and deterministic.' },
180
+ { commandPath: 'config:redis:status', strategy: 'contract', rationale: 'Redis status reports the governed runtime backend without exposing secrets.' },
181
+ { commandPath: 'config:redis:ping', strategy: 'contract', rationale: 'Redis ping is a deterministic readiness contract with mocked and unavailable paths.' },
182
+ { commandPath: 'config:redis:bench', strategy: 'contract', rationale: 'Redis benchmark output is bounded, redacted, and suitable for direct contract assertions.' },
183
+ { commandPath: 'config:redis:flush-namespace', strategy: 'contract', rationale: 'Redis namespace cleanup is explicitly scoped and guarded by confirmation.' },
49
184
  { commandPath: 'schema:which', strategy: 'contract', rationale: 'Schema resolution is deterministic with fixture directories.' },
50
185
  { commandPath: 'schema:validate', strategy: 'contract', rationale: 'Schema validation produces deterministic reports from fixture inputs.' },
51
186
  { commandPath: 'schema:fork', strategy: 'contract', rationale: 'Schema fork output is a filesystem contract that can be asserted directly.' },
52
187
  { commandPath: 'schema:init', strategy: 'contract', rationale: 'Schema initialization is deterministic over temporary workspaces.' },
53
188
  { commandPath: 'sdd:init', strategy: 'spawned-e2e', rationale: 'SDD init seeds canonical state and generated views, so it should keep lifecycle smoke coverage.' },
54
189
  { commandPath: 'sdd:init-context', strategy: 'spawned-e2e', rationale: 'Context bootstrap reads repository structure and writes canonical state, which benefits from spawned smoke coverage.' },
190
+ { commandPath: 'sdd:intent-guard', strategy: 'contract', rationale: 'Intent guard classification is deterministic and should stay covered with direct contract tests.' },
55
191
  { commandPath: 'sdd:fingerprint', strategy: 'contract', rationale: 'Fingerprint backfill is a deterministic batch operation over change fixtures.' },
56
192
  { commandPath: 'sdd:insight', strategy: 'spawned-e2e', rationale: 'Insight creation is the first discovery lifecycle write and should stay covered in spawned flow tests.' },
57
193
  { commandPath: 'sdd:ingest-deposito', strategy: 'spawned-e2e', rationale: 'Ingestion coordinates discovery inputs, indexing, and trail generation across filesystem boundaries.' },
@@ -60,7 +196,9 @@ export const CLI_COMMAND_MATRIX = [
60
196
  { commandPath: 'sdd:breakdown', strategy: 'spawned-e2e', rationale: 'Breakdown materializes executable FEAT workspaces and needs lifecycle smoke coverage.' },
61
197
  { commandPath: 'sdd:mcp-manifest', strategy: 'contract', rationale: 'Manifest rendering is deterministic and provider-profile driven.' },
62
198
  { commandPath: 'sdd:mcp-call', strategy: 'contract', rationale: 'The MCP bridge reuses canonical services and is best guarded with direct contract assertions.' },
199
+ { commandPath: 'sdd:preflight', strategy: 'contract', rationale: 'Preflight reuses deterministic mutation guardrails without invoking agent runtime.' },
63
200
  { commandPath: 'sdd:agent:run', strategy: 'contract', rationale: 'DeepAgents run gating is a deterministic fail-closed policy contract with no direct state writes.' },
201
+ { commandPath: 'sdd:release-readiness', strategy: 'contract', rationale: 'Release readiness aggregates static gates and CI parity commands without publishing or mutating release state.' },
64
202
  { commandPath: 'sdd:start', strategy: 'spawned-e2e', rationale: 'Start transitions planned work into active execution and is a core lifecycle boundary.' },
65
203
  { commandPath: 'sdd:frontend-impact', strategy: 'spawned-e2e', rationale: 'Frontend impact is a required lifecycle declaration that should remain part of spawned finalize-path smoke.' },
66
204
  { commandPath: 'sdd:finalize', strategy: 'spawned-e2e', rationale: 'Finalize is the highest-risk lifecycle transition and must keep spawned smoke coverage.' },
@@ -68,7 +206,11 @@ export const CLI_COMMAND_MATRIX = [
68
206
  { commandPath: 'sdd:onboard', strategy: 'contract', rationale: 'Onboard is a read-oriented guidance surface with deterministic ranking output.' },
69
207
  { commandPath: 'sdd:aprovar', strategy: 'contract', rationale: 'Approval transitions are deterministic and fit fixture-driven lifecycle assertions.' },
70
208
  { commandPath: 'sdd:next', strategy: 'contract', rationale: 'Next is ranking logic over canonical state and is naturally contract-testable.' },
209
+ { commandPath: 'sdd:plan-status', strategy: 'contract', rationale: 'Plan status aggregates active and ready work without mutating state.' },
210
+ { commandPath: 'sdd:execute-next', strategy: 'spawned-e2e', rationale: 'Execute next bridges ranking into start and must preserve lifecycle guardrails.' },
71
211
  { commandPath: 'sdd:audit', strategy: 'contract', rationale: 'Audit is a deterministic report over canonical state.' },
212
+ { commandPath: 'sdd:historical-quality-regression', strategy: 'contract', rationale: 'Historical quality regression scanning is deterministic over archived quality artifacts and bounded window options.' },
213
+ { commandPath: 'sdd:reversa', strategy: 'contract', rationale: 'Reversa command planning, including the governed URL preflight surface, is deterministic, fail-closed, frontend-only by default, and has no direct extraction or state writes.' },
72
214
  { commandPath: 'sdd:plugin:inspect', strategy: 'contract', rationale: 'Plugin inspect is a read-only manifest parser surface.' },
73
215
  { commandPath: 'sdd:plugin:plan', strategy: 'contract', rationale: 'Plugin plan builds a non-executing runtime envelope from a manifest fixture.' },
74
216
  { commandPath: 'sdd:plugin:devtrack-api:scaffold-dry-run', strategy: 'contract', rationale: 'DevTrack API scaffold dry-run plans appliance artifacts without executing a generator.' },
@@ -129,4 +271,19 @@ export function validateCliCommandMatrix(program) {
129
271
  extraEntries,
130
272
  };
131
273
  }
274
+ export function validateCliCommandTaxonomy(program) {
275
+ const leafCommands = collectCliLeafCommands(program).sort((left, right) => left.commandPath.localeCompare(right.commandPath));
276
+ const classifiedCommands = leafCommands
277
+ .map((entry) => classifyCliCommandPath(entry.commandPath))
278
+ .filter((entry) => entry !== undefined);
279
+ const classifiedPaths = new Set(classifiedCommands.map((entry) => entry.commandPath));
280
+ const missingTaxonomy = leafCommands
281
+ .map((entry) => entry.commandPath)
282
+ .filter((commandPath) => !classifiedPaths.has(commandPath));
283
+ return {
284
+ leafCommands,
285
+ classifiedCommands,
286
+ missingTaxonomy,
287
+ };
288
+ }
132
289
  //# sourceMappingURL=command-matrix.js.map
@@ -43,6 +43,7 @@ export const CLI_COMMAND_QUALITY_MATRIX = [
43
43
  'sdd aprovar',
44
44
  'sdd start',
45
45
  'sdd context',
46
+ 'sdd execute-next',
46
47
  'sdd frontend-impact',
47
48
  'sdd finalize',
48
49
  'sdd init-context',
@@ -69,6 +70,10 @@ export const CLI_COMMAND_QUALITY_MATRIX = [
69
70
  'config init',
70
71
  'config list',
71
72
  'config path',
73
+ 'config redis bench',
74
+ 'config redis flush-namespace',
75
+ 'config redis ping',
76
+ 'config redis status',
72
77
  'config reset',
73
78
  'config set',
74
79
  'config unset',
@@ -96,6 +101,7 @@ export const CLI_COMMAND_QUALITY_MATRIX = [
96
101
  'sdd check',
97
102
  'sdd diagnose',
98
103
  'sdd agent run',
104
+ 'sdd historical-quality-regression',
99
105
  'sdd fgap add',
100
106
  'sdd fgap done',
101
107
  'sdd fingerprint',
@@ -107,6 +113,11 @@ export const CLI_COMMAND_QUALITY_MATRIX = [
107
113
  'sdd migrate-workspace',
108
114
  'sdd next',
109
115
  'sdd onboard',
116
+ 'sdd plan-status',
117
+ 'sdd preflight',
118
+ 'sdd release-readiness',
119
+ 'sdd reversa',
120
+ 'sdd intent-guard',
110
121
  'sdd backlog project',
111
122
  'sdd plugin devtrack-api scaffold-dry-run',
112
123
  'sdd plugin inspect',
@@ -449,6 +449,51 @@ const COMMAND_METADATA_OVERRIDES = [
449
449
  description: 'Configure workflow profile (interactive picker or preset shortcut)',
450
450
  flags: [],
451
451
  },
452
+ {
453
+ name: 'redis',
454
+ description: 'Inspect and operate the optional Redis runtime backend',
455
+ flags: [],
456
+ subcommands: [
457
+ {
458
+ name: 'status',
459
+ description: 'Show Redis runtime status',
460
+ flags: [
461
+ COMMON_FLAGS.json,
462
+ ],
463
+ },
464
+ {
465
+ name: 'ping',
466
+ description: 'Ping Redis using the effective CodeSDD configuration',
467
+ flags: [
468
+ COMMON_FLAGS.json,
469
+ ],
470
+ },
471
+ {
472
+ name: 'bench',
473
+ description: 'Run a short redacted Redis latency benchmark',
474
+ flags: [
475
+ COMMON_FLAGS.json,
476
+ {
477
+ name: 'iterations',
478
+ description: 'Number of benchmark iterations',
479
+ takesValue: true,
480
+ },
481
+ ],
482
+ },
483
+ {
484
+ name: 'flush-namespace',
485
+ description: 'Delete only keys under the effective CodeSDD Redis namespace',
486
+ flags: [
487
+ COMMON_FLAGS.json,
488
+ {
489
+ name: 'yes',
490
+ short: 'y',
491
+ description: 'Confirm namespace-scoped deletion',
492
+ },
493
+ ],
494
+ },
495
+ ],
496
+ },
452
497
  ],
453
498
  },
454
499
  {
@@ -15,6 +15,36 @@ export declare const GlobalConfigSchema: z.ZodObject<{
15
15
  both: "both";
16
16
  }>>>;
17
17
  workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ redis: z.ZodOptional<z.ZodObject<{
19
+ enabled: z.ZodOptional<z.ZodBoolean>;
20
+ url: z.ZodOptional<z.ZodString>;
21
+ url_env: z.ZodOptional<z.ZodString>;
22
+ namespace: z.ZodOptional<z.ZodString>;
23
+ tls: z.ZodOptional<z.ZodBoolean>;
24
+ connect_timeout_ms: z.ZodOptional<z.ZodNumber>;
25
+ command_timeout_ms: z.ZodOptional<z.ZodNumber>;
26
+ max_retries: z.ZodOptional<z.ZodNumber>;
27
+ fallback: z.ZodOptional<z.ZodEnum<{
28
+ none: "none";
29
+ filesystem: "filesystem";
30
+ }>>;
31
+ cache_default_ttl_ms: z.ZodOptional<z.ZodNumber>;
32
+ lock_ttl_ms: z.ZodOptional<z.ZodNumber>;
33
+ stream_max_len: z.ZodOptional<z.ZodNumber>;
34
+ }, z.core.$strip>>;
35
+ enterprise: z.ZodOptional<z.ZodObject<{
36
+ provisioning: z.ZodOptional<z.ZodObject<{
37
+ mode: z.ZodOptional<z.ZodEnum<{
38
+ local: "local";
39
+ enterprise: "enterprise";
40
+ }>>;
41
+ project_id: z.ZodOptional<z.ZodString>;
42
+ authority_url: z.ZodOptional<z.ZodString>;
43
+ authority_url_env: z.ZodOptional<z.ZodString>;
44
+ tenant_id: z.ZodOptional<z.ZodString>;
45
+ required_for_numbered_artifacts: z.ZodOptional<z.ZodBoolean>;
46
+ }, z.core.$strip>>;
47
+ }, z.core.$strip>>;
18
48
  }, z.core.$loose>;
19
49
  export type GlobalConfigType = z.infer<typeof GlobalConfigSchema>;
20
50
  /**
@@ -84,5 +114,5 @@ export declare function validateConfig(config: unknown): {
84
114
  error?: string;
85
115
  };
86
116
  export declare function isSensitiveConfigPath(path: string): boolean;
87
- export declare function redactConfigSecrets(value: unknown): unknown;
117
+ export declare function redactConfigSecrets(value: unknown, parentPath?: string): unknown;
88
118
  //# sourceMappingURL=config-schema.d.ts.map