@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.
Files changed (139) hide show
  1. package/.sdd/skills/curated/devtrack-api/SKILL.md +12 -5
  2. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
  3. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
  8. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
  9. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
  10. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +55 -0
  11. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
  12. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +2 -3
  13. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +1 -1
  14. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
  15. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
  16. package/README.md +159 -5
  17. package/dist/applications/sdd/index.d.ts +16 -0
  18. package/dist/applications/sdd/index.js +16 -0
  19. package/dist/commands/config.js +171 -10
  20. package/dist/commands/sdd/execution.js +345 -15
  21. package/dist/commands/sdd/plugin.js +5 -0
  22. package/dist/commands/sdd/shared.d.ts +1 -0
  23. package/dist/commands/sdd/shared.js +10 -0
  24. package/dist/commands/sdd.js +38 -3
  25. package/dist/core/cli/command-matrix.js +9 -0
  26. package/dist/core/cli-command-quality.js +9 -0
  27. package/dist/core/completions/command-registry.js +45 -0
  28. package/dist/core/config-schema.d.ts +18 -1
  29. package/dist/core/config-schema.js +48 -5
  30. package/dist/core/global-config.d.ts +16 -0
  31. package/dist/core/sdd/agent-binding.d.ts +10 -10
  32. package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
  33. package/dist/core/sdd/agent-runtime-contract.js +200 -0
  34. package/dist/core/sdd/check.d.ts +2 -0
  35. package/dist/core/sdd/check.js +40 -2
  36. package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
  37. package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
  38. package/dist/core/sdd/coordination/index.d.ts +1 -0
  39. package/dist/core/sdd/coordination/index.js +1 -0
  40. package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
  41. package/dist/core/sdd/coordination/redis-runtime.js +698 -0
  42. package/dist/core/sdd/deepagent-contracts.d.ts +98 -4
  43. package/dist/core/sdd/deepagent-contracts.js +62 -0
  44. package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
  45. package/dist/core/sdd/default-bootstrap-files.js +14 -8
  46. package/dist/core/sdd/default-skills.js +108 -4
  47. package/dist/core/sdd/devtrack-api-appliance.d.ts +8 -1
  48. package/dist/core/sdd/devtrack-api-appliance.js +46 -23
  49. package/dist/core/sdd/docs-sync.js +21 -15
  50. package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
  51. package/dist/core/sdd/domain/capability-diff.js +200 -0
  52. package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
  53. package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
  54. package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
  55. package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
  56. package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
  57. package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
  58. package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
  59. package/dist/core/sdd/foundation-layer-manifest.js +117 -0
  60. package/dist/core/sdd/intent-guard.d.ts +22 -0
  61. package/dist/core/sdd/intent-guard.js +67 -0
  62. package/dist/core/sdd/json-schema.js +9 -1
  63. package/dist/core/sdd/legacy-operations.js +76 -1
  64. package/dist/core/sdd/migrate-workspace.js +39 -0
  65. package/dist/core/sdd/package-security-gates.d.ts +21 -0
  66. package/dist/core/sdd/package-security-gates.js +119 -0
  67. package/dist/core/sdd/package-structure-gate.js +3 -8
  68. package/dist/core/sdd/parallel-feat-automation.d.ts +181 -3
  69. package/dist/core/sdd/parallel-feat-automation.js +212 -0
  70. package/dist/core/sdd/plugin-broker.d.ts +223 -4
  71. package/dist/core/sdd/plugin-broker.js +10 -0
  72. package/dist/core/sdd/plugin-cli.d.ts +30 -0
  73. package/dist/core/sdd/plugin-cli.js +70 -3
  74. package/dist/core/sdd/plugin-evidence.d.ts +73 -0
  75. package/dist/core/sdd/plugin-manifest.d.ts +69 -1
  76. package/dist/core/sdd/plugin-manifest.js +10 -0
  77. package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
  78. package/dist/core/sdd/plugin-registry.d.ts +141 -5
  79. package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
  80. package/dist/core/sdd/plugin-sdk-contract.js +268 -0
  81. package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
  82. package/dist/core/sdd/quality-validation.d.ts +84 -11
  83. package/dist/core/sdd/release-readiness.d.ts +19 -0
  84. package/dist/core/sdd/release-readiness.js +472 -0
  85. package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
  86. package/dist/core/sdd/runtime-boundary-contract.js +90 -0
  87. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
  88. package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
  89. package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
  90. package/dist/core/sdd/services/agent-run.service.js +73 -1
  91. package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
  92. package/dist/core/sdd/services/capability-diff.service.js +26 -0
  93. package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
  94. package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
  95. package/dist/core/sdd/services/context.service.d.ts +43 -340
  96. package/dist/core/sdd/services/context.service.js +323 -9
  97. package/dist/core/sdd/services/finalize.service.d.ts +25 -0
  98. package/dist/core/sdd/services/finalize.service.js +178 -16
  99. package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
  100. package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
  101. package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
  102. package/dist/core/sdd/state.d.ts +1 -0
  103. package/dist/core/sdd/state.js +251 -29
  104. package/dist/core/sdd/store/sdd-stores.js +2 -2
  105. package/dist/core/sdd/structural-health.d.ts +13 -13
  106. package/dist/core/sdd/types.d.ts +27 -12
  107. package/dist/core/sdd/types.js +4 -0
  108. package/dist/core/sdd/views.js +17 -0
  109. package/dist/core/sdd/workspace-schemas.d.ts +387 -7
  110. package/dist/core/sdd/workspace-schemas.js +196 -64
  111. package/dist/domains/sdd/index.d.ts +6 -0
  112. package/dist/domains/sdd/index.js +6 -0
  113. package/dist/infrastructures/sdd/index.d.ts +7 -0
  114. package/dist/infrastructures/sdd/index.js +6 -0
  115. package/dist/presentations/cli/sdd/index.d.ts +3 -0
  116. package/dist/presentations/cli/sdd/index.js +3 -0
  117. package/dist/shared/sdd/index.d.ts +3 -0
  118. package/dist/shared/sdd/index.js +2 -0
  119. package/package.json +9 -6
  120. package/schemas/sdd/2-plan.schema.json +207 -2
  121. package/schemas/sdd/5-quality.schema.json +281 -25
  122. package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
  123. package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
  124. package/schemas/sdd/codesdd-plugin.schema.json +171 -0
  125. package/schemas/sdd/deepagent-run-request.schema.json +316 -0
  126. package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
  127. package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
  128. package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
  129. package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
  130. package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
  131. package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
  132. package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
  133. package/schemas/sdd/plugin-package-governance.schema.json +74 -0
  134. package/schemas/sdd/plugin-registry.schema.json +171 -0
  135. package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
  136. package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
  137. package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
  138. package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
  139. package/schemas/sdd/workspace-catalog.schema.json +3776 -398
@@ -1,346 +1,49 @@
1
1
  import { SddStores } from "../store/sdd-stores.js";
2
+ export declare const CONTEXT_PACK_BUDGET_MODES: readonly ["compact", "standard", "full"];
3
+ export type ContextPackBudgetMode = (typeof CONTEXT_PACK_BUDGET_MODES)[number];
4
+ export type ContextServiceOptions = {
5
+ budgetMode?: ContextPackBudgetMode;
6
+ };
7
+ type ContextPackBudgetReport = {
8
+ mode: ContextPackBudgetMode;
9
+ estimated_chars_before_budget: number;
10
+ estimated_chars_after_budget: number;
11
+ deduped_fields: Array<{
12
+ field: string;
13
+ before: number;
14
+ after: number;
15
+ removed: number;
16
+ }>;
17
+ truncated_fields: string[];
18
+ };
19
+ type ContextPackDisclosureHint = {
20
+ mode: ContextPackBudgetMode;
21
+ reveal_command: string;
22
+ omitted_fields: Array<{
23
+ field: string;
24
+ omitted_count: number;
25
+ reason: 'budget';
26
+ }>;
27
+ };
28
+ type ContextPackCacheMetadata = {
29
+ schema_version: 2;
30
+ enabled: true;
31
+ hit: boolean;
32
+ key: string;
33
+ project_fingerprint: string;
34
+ source_fingerprint: string;
35
+ cache_path: string;
36
+ refreshed_at: string;
37
+ };
38
+ type ContextPackWithBudget = Record<string, unknown> & {
39
+ context_budget: ContextPackBudgetReport;
40
+ progressive_disclosure?: ContextPackDisclosureHint;
41
+ context_cache?: ContextPackCacheMetadata;
42
+ };
2
43
  export declare class ContextService {
3
44
  private readonly stores;
4
45
  constructor(stores: SddStores);
5
- execute(projectRoot: string, ref: string): Promise<{
6
- sdd_pack_version: number;
7
- target_id: string;
8
- target_type: "FEAT";
9
- summary: string;
10
- objective: string;
11
- expected_outcome: string;
12
- system_impact: string;
13
- architectural_impact: {
14
- description: string;
15
- affected_modules: string[];
16
- } | null;
17
- workspace_frontend_impact: {
18
- status: "unknown" | "none" | "required";
19
- description: string;
20
- } | null;
21
- affected_contracts: {
22
- name: string;
23
- change_type: string;
24
- }[];
25
- quality_strategy: {
26
- unit_target: number;
27
- integration_target: number;
28
- approach: string;
29
- } | null;
30
- workspace: {
31
- path: string;
32
- state: "" | "active" | "planned" | "archived";
33
- docs: string[];
34
- schema_errors: string[];
35
- };
36
- origin: {
37
- type: "radar" | "epic" | "direct" | "fast_track" | "frontend_gap" | "tech_debt";
38
- ref: string;
39
- };
40
- related_discovery: string[];
41
- related_gaps: string[];
42
- recommended_skills: string[];
43
- recommended_bundles: string[];
44
- skill_execution_contract: {
45
- required: boolean;
46
- required_skill_ids: string[];
47
- verification_location: string;
48
- verification_rule: string;
49
- };
50
- change_name: string;
51
- blocked_by: string[];
52
- lock_domains: string[];
53
- parallel_group: string | undefined;
54
- planning_mode: "local_plan" | "direct_tasks";
55
- flow_mode: "direto" | "padrao" | "rigoroso";
56
- current_stage: "proposta" | "planejamento" | "tarefas" | "execucao" | "consolidacao";
57
- gates: {
58
- proposta: {
59
- status: "nao_exigida" | "rascunho" | "pronta" | "aprovada";
60
- approved_at?: string | undefined;
61
- approved_by?: string | undefined;
62
- note?: string | undefined;
63
- };
64
- planejamento: {
65
- status: "nao_exigida" | "rascunho" | "pronta" | "aprovada";
66
- approved_at?: string | undefined;
67
- approved_by?: string | undefined;
68
- note?: string | undefined;
69
- };
70
- tarefas: {
71
- status: "nao_exigida" | "rascunho" | "pronta" | "aprovada";
72
- approved_at?: string | undefined;
73
- approved_by?: string | undefined;
74
- note?: string | undefined;
75
- };
76
- };
77
- frontend_impact_status: "unknown" | "none" | "required";
78
- frontend_impact_reason: string;
79
- frontend_impact_declared_at: string;
80
- frontend_surface_tokens: string[];
81
- quality_contract: {
82
- version: 1;
83
- enabled: boolean;
84
- scope: string;
85
- unit_target_percent: number;
86
- integration_target_percent: number;
87
- evidence_mode: "coverage" | "equivalence" | "hybrid";
88
- enforcement: "advisory" | "blocking";
89
- stack_profile: string;
90
- required_axes: string[];
91
- required_evidence: {
92
- kind: string;
93
- required: boolean;
94
- status: "planned" | "provided" | "waived";
95
- command?: string | undefined;
96
- artifact?: string | undefined;
97
- notes?: string | undefined;
98
- }[];
99
- exceptions: {
100
- id: string;
101
- scope: string;
102
- reason: string;
103
- accepted_risk: string;
104
- compensating_control: string;
105
- review_deadline: string;
106
- approved_by: string;
107
- approved_at?: string | undefined;
108
- }[];
109
- inherited_from?: string | undefined;
110
- updated_at?: string | undefined;
111
- } | null;
112
- quality_artifact: string;
113
- start_commit_sha: string;
114
- next_action: string;
115
- execution_kind: "documentation" | "feature" | "infra" | "migration" | "frontend_coverage";
116
- produces: string[];
117
- consumes: string[];
118
- predecessor_outputs: {
119
- feature_id: string;
120
- status: "ARCHIVED" | "READY" | "IN_PROGRESS" | "DONE" | "BLOCKED" | "SYNC_REQUIRED" | "VERIFY_FAILED";
121
- produces: string[];
122
- summary: string;
123
- }[];
124
- relevant_adrs: string[];
125
- relevant_services: {
126
- id: string;
127
- name: string;
128
- contracts: string[];
129
- }[];
130
- relevant_contracts: string[];
131
- relevant_frontend_decisions: {
132
- id: string;
133
- title: string;
134
- status: "APPROVED" | "DISCARDED" | "SUPERSEDED" | "PROPOSED";
135
- route_refs: string[];
136
- }[];
137
- read_order: string[];
138
- active_path: string;
139
- unresolved_blocked_by: string[];
140
- lock_conflicts_with: string[];
141
- readiness: "READY" | "BLOCKED" | "LOCK_CONFLICT";
142
- core_docs: string[];
143
- related_features?: undefined;
144
- related_debates?: undefined;
145
- source_feature?: undefined;
146
- resolved_by_feature?: undefined;
147
- routes?: undefined;
148
- related_refs?: undefined;
149
- } | {
150
- sdd_pack_version: number;
151
- target_id: string;
152
- target_type: "RAD" | "EPIC";
153
- summary: string;
154
- quality_contract: {
155
- version: 1;
156
- enabled: boolean;
157
- scope: string;
158
- unit_target_percent: number;
159
- integration_target_percent: number;
160
- evidence_mode: "coverage" | "equivalence" | "hybrid";
161
- enforcement: "advisory" | "blocking";
162
- stack_profile: string;
163
- required_axes: string[];
164
- required_evidence: {
165
- kind: string;
166
- required: boolean;
167
- status: "planned" | "provided" | "waived";
168
- command?: string | undefined;
169
- artifact?: string | undefined;
170
- notes?: string | undefined;
171
- }[];
172
- exceptions: {
173
- id: string;
174
- scope: string;
175
- reason: string;
176
- accepted_risk: string;
177
- compensating_control: string;
178
- review_deadline: string;
179
- approved_by: string;
180
- approved_at?: string | undefined;
181
- }[];
182
- inherited_from?: string | undefined;
183
- updated_at?: string | undefined;
184
- } | null;
185
- related_features: string[];
186
- related_debates: string[];
187
- read_order: string[];
188
- core_docs: string[];
189
- objective?: undefined;
190
- expected_outcome?: undefined;
191
- system_impact?: undefined;
192
- architectural_impact?: undefined;
193
- workspace_frontend_impact?: undefined;
194
- affected_contracts?: undefined;
195
- quality_strategy?: undefined;
196
- workspace?: undefined;
197
- origin?: undefined;
198
- related_discovery?: undefined;
199
- related_gaps?: undefined;
200
- recommended_skills?: undefined;
201
- recommended_bundles?: undefined;
202
- skill_execution_contract?: undefined;
203
- change_name?: undefined;
204
- blocked_by?: undefined;
205
- lock_domains?: undefined;
206
- parallel_group?: undefined;
207
- planning_mode?: undefined;
208
- flow_mode?: undefined;
209
- current_stage?: undefined;
210
- gates?: undefined;
211
- frontend_impact_status?: undefined;
212
- frontend_impact_reason?: undefined;
213
- frontend_impact_declared_at?: undefined;
214
- frontend_surface_tokens?: undefined;
215
- quality_artifact?: undefined;
216
- start_commit_sha?: undefined;
217
- next_action?: undefined;
218
- execution_kind?: undefined;
219
- produces?: undefined;
220
- consumes?: undefined;
221
- predecessor_outputs?: undefined;
222
- relevant_adrs?: undefined;
223
- relevant_services?: undefined;
224
- relevant_contracts?: undefined;
225
- relevant_frontend_decisions?: undefined;
226
- active_path?: undefined;
227
- unresolved_blocked_by?: undefined;
228
- lock_conflicts_with?: undefined;
229
- readiness?: undefined;
230
- source_feature?: undefined;
231
- resolved_by_feature?: undefined;
232
- routes?: undefined;
233
- related_refs?: undefined;
234
- } | {
235
- sdd_pack_version: number;
236
- target_id: string;
237
- target_type: "FGAP";
238
- summary: string;
239
- source_feature: string;
240
- resolved_by_feature: string;
241
- routes: string[];
242
- read_order: string[];
243
- core_docs: string[];
244
- objective?: undefined;
245
- expected_outcome?: undefined;
246
- system_impact?: undefined;
247
- architectural_impact?: undefined;
248
- workspace_frontend_impact?: undefined;
249
- affected_contracts?: undefined;
250
- quality_strategy?: undefined;
251
- workspace?: undefined;
252
- origin?: undefined;
253
- related_discovery?: undefined;
254
- related_gaps?: undefined;
255
- recommended_skills?: undefined;
256
- recommended_bundles?: undefined;
257
- skill_execution_contract?: undefined;
258
- change_name?: undefined;
259
- blocked_by?: undefined;
260
- lock_domains?: undefined;
261
- parallel_group?: undefined;
262
- planning_mode?: undefined;
263
- flow_mode?: undefined;
264
- current_stage?: undefined;
265
- gates?: undefined;
266
- frontend_impact_status?: undefined;
267
- frontend_impact_reason?: undefined;
268
- frontend_impact_declared_at?: undefined;
269
- frontend_surface_tokens?: undefined;
270
- quality_contract?: undefined;
271
- quality_artifact?: undefined;
272
- start_commit_sha?: undefined;
273
- next_action?: undefined;
274
- execution_kind?: undefined;
275
- produces?: undefined;
276
- consumes?: undefined;
277
- predecessor_outputs?: undefined;
278
- relevant_adrs?: undefined;
279
- relevant_services?: undefined;
280
- relevant_contracts?: undefined;
281
- relevant_frontend_decisions?: undefined;
282
- active_path?: undefined;
283
- unresolved_blocked_by?: undefined;
284
- lock_conflicts_with?: undefined;
285
- readiness?: undefined;
286
- related_features?: undefined;
287
- related_debates?: undefined;
288
- related_refs?: undefined;
289
- } | {
290
- sdd_pack_version: number;
291
- target_id: string;
292
- target_type: "TD";
293
- summary: string;
294
- related_refs: string[];
295
- read_order: string[];
296
- core_docs: string[];
297
- objective?: undefined;
298
- expected_outcome?: undefined;
299
- system_impact?: undefined;
300
- architectural_impact?: undefined;
301
- workspace_frontend_impact?: undefined;
302
- affected_contracts?: undefined;
303
- quality_strategy?: undefined;
304
- workspace?: undefined;
305
- origin?: undefined;
306
- related_discovery?: undefined;
307
- related_gaps?: undefined;
308
- recommended_skills?: undefined;
309
- recommended_bundles?: undefined;
310
- skill_execution_contract?: undefined;
311
- change_name?: undefined;
312
- blocked_by?: undefined;
313
- lock_domains?: undefined;
314
- parallel_group?: undefined;
315
- planning_mode?: undefined;
316
- flow_mode?: undefined;
317
- current_stage?: undefined;
318
- gates?: undefined;
319
- frontend_impact_status?: undefined;
320
- frontend_impact_reason?: undefined;
321
- frontend_impact_declared_at?: undefined;
322
- frontend_surface_tokens?: undefined;
323
- quality_contract?: undefined;
324
- quality_artifact?: undefined;
325
- start_commit_sha?: undefined;
326
- next_action?: undefined;
327
- execution_kind?: undefined;
328
- produces?: undefined;
329
- consumes?: undefined;
330
- predecessor_outputs?: undefined;
331
- relevant_adrs?: undefined;
332
- relevant_services?: undefined;
333
- relevant_contracts?: undefined;
334
- relevant_frontend_decisions?: undefined;
335
- active_path?: undefined;
336
- unresolved_blocked_by?: undefined;
337
- lock_conflicts_with?: undefined;
338
- readiness?: undefined;
339
- related_features?: undefined;
340
- related_debates?: undefined;
341
- source_feature?: undefined;
342
- resolved_by_feature?: undefined;
343
- routes?: undefined;
344
- }>;
46
+ execute(projectRoot: string, ref: string, options?: ContextServiceOptions): Promise<ContextPackWithBudget>;
345
47
  }
48
+ export {};
346
49
  //# sourceMappingURL=context.service.d.ts.map