@diff-review-system/drs 4.0.1 → 4.1.0

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/.pi/agents/review/unified-reviewer.md +2 -6
  2. package/.pi/agents/task/review-assistant.md +22 -0
  3. package/.pi/workflows/github-pr-fix-review-issues-stacked.yaml +10 -4
  4. package/.pi/workflows/github-pr-review-post.yaml +0 -1
  5. package/.pi/workflows/github-pr-review.yaml +14 -8
  6. package/.pi/workflows/github-pr-visual-explain.yaml +46 -1
  7. package/.pi/workflows/gitlab-mr-fix-review-issues-stacked.yaml +10 -4
  8. package/.pi/workflows/gitlab-mr-review.yaml +14 -8
  9. package/.pi/workflows/gitlab-mr-visual-explain.yaml +46 -1
  10. package/.pi/workflows/local-fix-review-issues.yaml +13 -6
  11. package/.pi/workflows/local-review.yaml +7 -1
  12. package/.pi/workflows/local-visual-explain.yaml +46 -1
  13. package/.pi/workflows/temporal-control-smoke.yaml +63 -0
  14. package/README.md +39 -0
  15. package/dist/cli/index.js +211 -4
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/init.d.ts +6 -1
  18. package/dist/cli/init.d.ts.map +1 -1
  19. package/dist/cli/init.js +29 -10
  20. package/dist/cli/init.js.map +1 -1
  21. package/dist/cli/run-agent.d.ts +2 -7
  22. package/dist/cli/run-agent.d.ts.map +1 -1
  23. package/dist/cli/run-agent.js.map +1 -1
  24. package/dist/cli/workflow-executor-selection.d.ts +3 -0
  25. package/dist/cli/workflow-executor-selection.d.ts.map +1 -0
  26. package/dist/cli/workflow-executor-selection.js +15 -0
  27. package/dist/cli/workflow-executor-selection.js.map +1 -0
  28. package/dist/cli/workflow.d.ts +38 -42
  29. package/dist/cli/workflow.d.ts.map +1 -1
  30. package/dist/cli/workflow.js +190 -838
  31. package/dist/cli/workflow.js.map +1 -1
  32. package/dist/lib/agent-result.d.ts +8 -0
  33. package/dist/lib/agent-result.d.ts.map +1 -0
  34. package/dist/lib/agent-result.js +2 -0
  35. package/dist/lib/agent-result.js.map +1 -0
  36. package/dist/lib/config.d.ts +21 -0
  37. package/dist/lib/config.d.ts.map +1 -1
  38. package/dist/lib/config.js.map +1 -1
  39. package/dist/lib/output-paths.d.ts +0 -1
  40. package/dist/lib/output-paths.d.ts.map +1 -1
  41. package/dist/lib/output-paths.js +0 -1
  42. package/dist/lib/output-paths.js.map +1 -1
  43. package/dist/lib/project-setup.d.ts +10 -0
  44. package/dist/lib/project-setup.d.ts.map +1 -0
  45. package/dist/lib/project-setup.js +25 -0
  46. package/dist/lib/project-setup.js.map +1 -0
  47. package/dist/lib/review-artifact-store.d.ts +16 -0
  48. package/dist/lib/review-artifact-store.d.ts.map +1 -0
  49. package/dist/lib/review-artifact-store.js +84 -0
  50. package/dist/lib/review-artifact-store.js.map +1 -0
  51. package/dist/lib/review-artifact.d.ts.map +1 -1
  52. package/dist/lib/review-artifact.js +1 -0
  53. package/dist/lib/review-artifact.js.map +1 -1
  54. package/dist/lib/review-core.d.ts +1 -0
  55. package/dist/lib/review-core.d.ts.map +1 -1
  56. package/dist/lib/review-core.js +11 -14
  57. package/dist/lib/review-core.js.map +1 -1
  58. package/dist/lib/review-parser.d.ts.map +1 -1
  59. package/dist/lib/review-parser.js +15 -12
  60. package/dist/lib/review-parser.js.map +1 -1
  61. package/dist/lib/skills.d.ts +16 -0
  62. package/dist/lib/skills.d.ts.map +1 -0
  63. package/dist/lib/skills.js +140 -0
  64. package/dist/lib/skills.js.map +1 -0
  65. package/dist/lib/workflow/artifact-store.d.ts +71 -0
  66. package/dist/lib/workflow/artifact-store.d.ts.map +1 -0
  67. package/dist/lib/workflow/artifact-store.js +121 -0
  68. package/dist/lib/workflow/artifact-store.js.map +1 -0
  69. package/dist/lib/workflow/compiled-plan.d.ts +87 -0
  70. package/dist/lib/workflow/compiled-plan.d.ts.map +1 -0
  71. package/dist/lib/workflow/compiled-plan.js +62 -0
  72. package/dist/lib/workflow/compiled-plan.js.map +1 -0
  73. package/dist/lib/workflow/executor.d.ts +18 -0
  74. package/dist/lib/workflow/executor.d.ts.map +1 -0
  75. package/dist/lib/workflow/executor.js +2 -0
  76. package/dist/lib/workflow/executor.js.map +1 -0
  77. package/dist/lib/workflow/graph.d.ts +30 -0
  78. package/dist/lib/workflow/graph.d.ts.map +1 -0
  79. package/dist/lib/workflow/graph.js +139 -0
  80. package/dist/lib/workflow/graph.js.map +1 -0
  81. package/dist/lib/workflow/input.d.ts +4 -0
  82. package/dist/lib/workflow/input.d.ts.map +1 -0
  83. package/dist/lib/workflow/input.js +4 -0
  84. package/dist/lib/workflow/input.js.map +1 -0
  85. package/dist/lib/workflow/node-executor.d.ts +19 -0
  86. package/dist/lib/workflow/node-executor.d.ts.map +1 -0
  87. package/dist/lib/workflow/node-executor.js +2 -0
  88. package/dist/lib/workflow/node-executor.js.map +1 -0
  89. package/dist/lib/workflow/planning.d.ts +51 -0
  90. package/dist/lib/workflow/planning.d.ts.map +1 -0
  91. package/dist/lib/workflow/planning.js +814 -0
  92. package/dist/lib/workflow/planning.js.map +1 -0
  93. package/dist/lib/workflow/types.d.ts +66 -0
  94. package/dist/lib/workflow/types.d.ts.map +1 -0
  95. package/dist/lib/workflow/types.js +2 -0
  96. package/dist/lib/workflow/types.js.map +1 -0
  97. package/dist/lib/write-json-output.d.ts.map +1 -1
  98. package/dist/lib/write-json-output.js +3 -8
  99. package/dist/lib/write-json-output.js.map +1 -1
  100. package/dist/pi/sdk.d.ts.map +1 -1
  101. package/dist/pi/sdk.js +6 -2
  102. package/dist/pi/sdk.js.map +1 -1
  103. package/dist/runtime/built-in-paths.d.ts +1 -0
  104. package/dist/runtime/built-in-paths.d.ts.map +1 -1
  105. package/dist/runtime/built-in-paths.js +7 -0
  106. package/dist/runtime/built-in-paths.js.map +1 -1
  107. package/dist/temporal/activities.d.ts +26 -0
  108. package/dist/temporal/activities.d.ts.map +1 -0
  109. package/dist/temporal/activities.js +219 -0
  110. package/dist/temporal/activities.js.map +1 -0
  111. package/dist/temporal/config.d.ts +4 -0
  112. package/dist/temporal/config.d.ts.map +1 -0
  113. package/dist/temporal/config.js +36 -0
  114. package/dist/temporal/config.js.map +1 -0
  115. package/dist/temporal/executor.d.ts +7 -0
  116. package/dist/temporal/executor.d.ts.map +1 -0
  117. package/dist/temporal/executor.js +233 -0
  118. package/dist/temporal/executor.js.map +1 -0
  119. package/dist/temporal/retry-policy.d.ts +28 -0
  120. package/dist/temporal/retry-policy.d.ts.map +1 -0
  121. package/dist/temporal/retry-policy.js +56 -0
  122. package/dist/temporal/retry-policy.js.map +1 -0
  123. package/dist/temporal/types.d.ts +86 -0
  124. package/dist/temporal/types.d.ts.map +1 -0
  125. package/dist/temporal/types.js +2 -0
  126. package/dist/temporal/types.js.map +1 -0
  127. package/dist/temporal/worker.d.ts +3 -0
  128. package/dist/temporal/worker.d.ts.map +1 -0
  129. package/dist/temporal/worker.js +18 -0
  130. package/dist/temporal/worker.js.map +1 -0
  131. package/dist/temporal/workflow-id.d.ts +27 -0
  132. package/dist/temporal/workflow-id.d.ts.map +1 -0
  133. package/dist/temporal/workflow-id.js +53 -0
  134. package/dist/temporal/workflow-id.js.map +1 -0
  135. package/dist/temporal/workflows.d.ts +6 -0
  136. package/dist/temporal/workflows.d.ts.map +1 -0
  137. package/dist/temporal/workflows.js +342 -0
  138. package/dist/temporal/workflows.js.map +1 -0
  139. package/package.json +6 -1
@@ -96,12 +96,8 @@ Follow these steps **in order** before reporting any issues:
96
96
 
97
97
  ## Output Requirements
98
98
 
99
- - You MUST call the `write_json_output` tool with:
100
- - `outputType`: `"review_output"`
101
- - `payload`: the JSON object described below
102
- - After calling the tool, return **only** the JSON pointer returned by the tool
103
- (e.g. `{"outputType":"review_output","outputPath":".drs/review-output.json"}`)
104
- - Do **not** return raw JSON directly.
99
+ - Return **only** the raw JSON object described below.
100
+ - Do **not** call `write_json_output`.
105
101
  - Do **not** include markdown, code fences, or extra text.
106
102
  - Follow this exact schema:
107
103
 
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Conversational assistant for DRS review and workflow artifacts
3
+ color: "#2563eb"
4
+ hidden: false
5
+ tools:
6
+ Read: true
7
+ Glob: true
8
+ Grep: true
9
+ ---
10
+
11
+ You are the conversational DRS review assistant.
12
+
13
+ Users ask questions about DRS review output, workflow output, local diffs, and specific findings. Use the supplied artifacts as the source of truth. Cite finding ids, file paths, severities, and workflow names when they are available.
14
+
15
+ ## Rules
16
+
17
+ - Prefer concise, direct answers grounded in the artifact content.
18
+ - If the user asks why a finding matters, explain the risk and the smallest safe remediation.
19
+ - If the user asks whether a finding is valid, inspect relevant repository context before answering when tools are available.
20
+ - If the user asks for a fix, first state the intended scope and keep any changes minimal. Do not commit changes.
21
+ - Do not invent findings or workflow results that are not present in the supplied artifacts.
22
+ - If artifact context is missing, say what is missing and answer only from available repository context.
@@ -1,5 +1,12 @@
1
1
  name: github-pr-fix-review-issues-stacked
2
2
  description: Fix high-severity GitHub PR review issues and open a stacked PR
3
+ metadata:
4
+ kind: review
5
+ tags: [review, fix, github, pull-request]
6
+ review:
7
+ source: github-pr
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  owner: ''
5
12
  repo: ''
@@ -37,7 +44,6 @@ nodes:
37
44
  if: '{{artifacts.stackGuard.allowed}} == true'
38
45
  with:
39
46
  source: change
40
- artifact: persistedReviewArtifact
41
47
  output: review
42
48
 
43
49
  threshold:
@@ -70,7 +76,7 @@ nodes:
70
76
 
71
77
  Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
72
78
 
73
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
79
+ Review artifact path: {{artifacts.reviewArtifact.path}}
74
80
 
75
81
  Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
76
82
 
@@ -121,7 +127,7 @@ nodes:
121
127
 
122
128
  Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
123
129
 
124
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
130
+ Review artifact: {{artifacts.reviewArtifact.path}}
125
131
 
126
132
  <!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
127
133
  <!-- drs-stack-kind: fix -->
@@ -138,7 +144,7 @@ nodes:
138
144
  repo: '{{inputs.repo}}'
139
145
  pr: '{{inputs.pr}}'
140
146
  source: change
141
- reviewArtifact: persistedReviewArtifact
147
+ reviewArtifact: reviewArtifact
142
148
  severity: '{{inputs.severity}}'
143
149
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
144
150
  marker: drs-fix-status
@@ -30,7 +30,6 @@ nodes:
30
30
  - describe
31
31
  with:
32
32
  source: change
33
- artifact: persistedReviewArtifact
34
33
  output: review
35
34
 
36
35
  post-comments:
@@ -1,5 +1,12 @@
1
1
  name: github-pr-review
2
2
  description: Review a GitHub pull request, optionally posting a description, DRS comments, a visual HTML explainer, and a stacked fix PR
3
+ metadata:
4
+ kind: review
5
+ tags: [review, github, pull-request]
6
+ review:
7
+ source: github-pr
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  owner:
5
12
  type: string
@@ -88,7 +95,6 @@ nodes:
88
95
  - change
89
96
  with:
90
97
  source: change
91
- artifact: persistedReviewArtifact
92
98
  output: review
93
99
 
94
100
  visual:
@@ -166,7 +172,7 @@ nodes:
166
172
 
167
173
  Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
168
174
 
169
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
175
+ Review artifact path: {{artifacts.reviewArtifact.path}}
170
176
 
171
177
  Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
172
178
 
@@ -213,7 +219,7 @@ nodes:
213
219
  if: inputs.fixMode == internal
214
220
  with:
215
221
  source: verificationChange
216
- reviewArtifact: persistedReviewArtifact
222
+ reviewArtifact: reviewArtifact
217
223
  severity: '{{inputs.fixSeverity}}'
218
224
  output: reReview
219
225
 
@@ -224,12 +230,12 @@ nodes:
224
230
  - fix-change
225
231
  if: inputs.fixMode == internal
226
232
  with:
227
- artifact: persistedReviewArtifact
233
+ artifact: reviewArtifact
228
234
  review: reReview
229
235
  fixChange: fixChange
230
236
  severity: '{{inputs.fixSeverity}}'
231
237
  minIssues: '1'
232
- output: persistedReviewArtifact
238
+ output: reviewArtifact
233
239
 
234
240
  fix-loop:
235
241
  control: loop
@@ -252,7 +258,7 @@ nodes:
252
258
  repo: '{{inputs.repo}}'
253
259
  pr: '{{inputs.pr}}'
254
260
  source: change
255
- reviewArtifact: persistedReviewArtifact
261
+ reviewArtifact: reviewArtifact
256
262
  fixReview: reReview
257
263
  fixChange: fixChange
258
264
  severity: '{{inputs.fixSeverity}}'
@@ -320,7 +326,7 @@ nodes:
320
326
  Automated DRS fix stacked on PR #{{inputs.pr}} from the main github-pr-review workflow.
321
327
 
322
328
  Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
323
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
329
+ Review artifact: {{artifacts.reviewArtifact.path}}
324
330
 
325
331
  <!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
326
332
  <!-- drs-stack-kind: fix -->
@@ -354,7 +360,7 @@ nodes:
354
360
  repo: '{{inputs.repo}}'
355
361
  pr: '{{inputs.pr}}'
356
362
  source: change
357
- reviewArtifact: persistedReviewArtifact
363
+ reviewArtifact: reviewArtifact
358
364
  severity: '{{inputs.fixSeverity}}'
359
365
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
360
366
  marker: drs-fix-status
@@ -17,10 +17,31 @@ nodes:
17
17
  pr: '{{inputs.pr}}'
18
18
  output: change
19
19
 
20
- visual:
20
+ review-artifact:
21
+ action: artifact-exists
22
+ needs:
23
+ - change
24
+ with:
25
+ kind: review
26
+ source: change
27
+ output: reviewArtifactStatus
28
+
29
+ load-review-artifact:
30
+ action: load-artifact
31
+ needs:
32
+ - review-artifact
33
+ if: artifacts.reviewArtifactStatus.exists == true
34
+ with:
35
+ kind: review
36
+ source: change
37
+ output: reviewArtifact
38
+
39
+ visual-with-review:
21
40
  agent: visual/pr-explainer
22
41
  needs:
23
42
  - change
43
+ - load-review-artifact
44
+ if: artifacts.reviewArtifactStatus.exists == true
24
45
  input: |
25
46
  Generate a visual PR explainer HTML artifact.
26
47
 
@@ -31,5 +52,29 @@ nodes:
31
52
 
32
53
  DRS change-source context:
33
54
  {{artifacts.change}}
55
+
56
+ Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
57
+
58
+ Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
59
+ writes: '{{inputs.outputPath}}'
60
+ output: visualExplainer
61
+
62
+ visual:
63
+ agent: visual/pr-explainer
64
+ needs:
65
+ - review-artifact
66
+ if: artifacts.reviewArtifactStatus.exists == false
67
+ input: |
68
+ Generate a visual PR explainer HTML artifact.
69
+
70
+ Output path: {{inputs.outputPath}}
71
+ Slide mode: {{inputs.slides}}
72
+
73
+ Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
74
+
75
+ DRS change-source context:
76
+ {{artifacts.change}}
77
+
78
+ No current DRS review artifact exists for this PR. Label the artifact as a PR explainer with no DRS findings included.
34
79
  writes: '{{inputs.outputPath}}'
35
80
  output: visualExplainer
@@ -1,5 +1,12 @@
1
1
  name: gitlab-mr-fix-review-issues-stacked
2
2
  description: Fix high-severity GitLab MR review issues and open a stacked MR
3
+ metadata:
4
+ kind: review
5
+ tags: [review, fix, gitlab, merge-request]
6
+ review:
7
+ source: gitlab-mr
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  project: ''
5
12
  mr: ''
@@ -35,7 +42,6 @@ nodes:
35
42
  if: '{{artifacts.stackGuard.allowed}} == true'
36
43
  with:
37
44
  source: change
38
- artifact: persistedReviewArtifact
39
45
  output: review
40
46
 
41
47
  threshold:
@@ -68,7 +74,7 @@ nodes:
68
74
 
69
75
  Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
70
76
 
71
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
77
+ Review artifact path: {{artifacts.reviewArtifact.path}}
72
78
 
73
79
  Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
74
80
 
@@ -118,7 +124,7 @@ nodes:
118
124
 
119
125
  Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
120
126
 
121
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
127
+ Review artifact: {{artifacts.reviewArtifact.path}}
122
128
 
123
129
  <!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
124
130
  <!-- drs-stack-kind: fix -->
@@ -134,7 +140,7 @@ nodes:
134
140
  project: '{{inputs.project}}'
135
141
  mr: '{{inputs.mr}}'
136
142
  source: change
137
- reviewArtifact: persistedReviewArtifact
143
+ reviewArtifact: reviewArtifact
138
144
  severity: '{{inputs.severity}}'
139
145
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
140
146
  marker: drs-fix-status
@@ -1,5 +1,12 @@
1
1
  name: gitlab-mr-review
2
2
  description: Review a GitLab merge request, optionally posting a description, DRS comments, Code Quality, and a visual HTML explainer
3
+ metadata:
4
+ kind: review
5
+ tags: [review, gitlab, merge-request]
6
+ review:
7
+ source: gitlab-mr
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  project:
5
12
  type: string
@@ -82,7 +89,6 @@ nodes:
82
89
  - change
83
90
  with:
84
91
  source: change
85
- artifact: persistedReviewArtifact
86
92
  output: review
87
93
 
88
94
  visual:
@@ -170,7 +176,7 @@ nodes:
170
176
 
171
177
  Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
172
178
 
173
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
179
+ Review artifact path: {{artifacts.reviewArtifact.path}}
174
180
 
175
181
  Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
176
182
 
@@ -217,7 +223,7 @@ nodes:
217
223
  if: inputs.fixMode == internal
218
224
  with:
219
225
  source: verificationChange
220
- reviewArtifact: persistedReviewArtifact
226
+ reviewArtifact: reviewArtifact
221
227
  severity: '{{inputs.fixSeverity}}'
222
228
  output: reReview
223
229
 
@@ -228,12 +234,12 @@ nodes:
228
234
  - fix-change
229
235
  if: inputs.fixMode == internal
230
236
  with:
231
- artifact: persistedReviewArtifact
237
+ artifact: reviewArtifact
232
238
  review: reReview
233
239
  fixChange: fixChange
234
240
  severity: '{{inputs.fixSeverity}}'
235
241
  minIssues: '1'
236
- output: persistedReviewArtifact
242
+ output: reviewArtifact
237
243
 
238
244
  fix-loop:
239
245
  control: loop
@@ -255,7 +261,7 @@ nodes:
255
261
  project: '{{inputs.project}}'
256
262
  mr: '{{inputs.mr}}'
257
263
  source: change
258
- reviewArtifact: persistedReviewArtifact
264
+ reviewArtifact: reviewArtifact
259
265
  fixReview: reReview
260
266
  fixChange: fixChange
261
267
  severity: '{{inputs.fixSeverity}}'
@@ -322,7 +328,7 @@ nodes:
322
328
  Automated DRS fix stacked on MR !{{inputs.mr}} from the main gitlab-mr-review workflow.
323
329
 
324
330
  Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
325
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
331
+ Review artifact: {{artifacts.reviewArtifact.path}}
326
332
 
327
333
  <!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
328
334
  <!-- drs-stack-kind: fix -->
@@ -354,7 +360,7 @@ nodes:
354
360
  project: '{{inputs.project}}'
355
361
  mr: '{{inputs.mr}}'
356
362
  source: change
357
- reviewArtifact: persistedReviewArtifact
363
+ reviewArtifact: reviewArtifact
358
364
  severity: '{{inputs.fixSeverity}}'
359
365
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
360
366
  marker: drs-fix-status
@@ -15,10 +15,31 @@ nodes:
15
15
  mr: '{{inputs.mr}}'
16
16
  output: change
17
17
 
18
- visual:
18
+ review-artifact:
19
+ action: artifact-exists
20
+ needs:
21
+ - change
22
+ with:
23
+ kind: review
24
+ source: change
25
+ output: reviewArtifactStatus
26
+
27
+ load-review-artifact:
28
+ action: load-artifact
29
+ needs:
30
+ - review-artifact
31
+ if: artifacts.reviewArtifactStatus.exists == true
32
+ with:
33
+ kind: review
34
+ source: change
35
+ output: reviewArtifact
36
+
37
+ visual-with-review:
19
38
  agent: visual/pr-explainer
20
39
  needs:
21
40
  - change
41
+ - load-review-artifact
42
+ if: artifacts.reviewArtifactStatus.exists == true
22
43
  input: |
23
44
  Generate a visual MR explainer HTML artifact.
24
45
 
@@ -29,5 +50,29 @@ nodes:
29
50
 
30
51
  DRS change-source context:
31
52
  {{artifacts.change}}
53
+
54
+ Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
55
+
56
+ Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
57
+ writes: '{{inputs.outputPath}}'
58
+ output: visualExplainer
59
+
60
+ visual:
61
+ agent: visual/pr-explainer
62
+ needs:
63
+ - review-artifact
64
+ if: artifacts.reviewArtifactStatus.exists == false
65
+ input: |
66
+ Generate a visual MR explainer HTML artifact.
67
+
68
+ Output path: {{inputs.outputPath}}
69
+ Slide mode: {{inputs.slides}}
70
+
71
+ Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
72
+
73
+ DRS change-source context:
74
+ {{artifacts.change}}
75
+
76
+ No current DRS review artifact exists for this MR. Label the artifact as an MR explainer with no DRS findings included.
32
77
  writes: '{{inputs.outputPath}}'
33
78
  output: visualExplainer
@@ -1,5 +1,12 @@
1
1
  name: local-fix-review-issues
2
2
  description: Fix actionable issues from a saved local DRS review artifact with verification loop
3
+ metadata:
4
+ kind: review
5
+ tags: [review, fix, local]
6
+ review:
7
+ source: local
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  review:
5
12
  type: string
@@ -14,7 +21,7 @@ inputs:
14
21
  fixMaxIterations:
15
22
  type: number
16
23
  default: 3
17
- output: persistedReviewArtifact
24
+ output: reviewArtifact
18
25
  nodes:
19
26
  change:
20
27
  action: change-source
@@ -31,7 +38,7 @@ nodes:
31
38
  kind: review
32
39
  source: change
33
40
  id: '{{inputs.review}}'
34
- output: persistedReviewArtifact
41
+ output: reviewArtifact
35
42
 
36
43
  fix-issues:
37
44
  agent: task/review-issue-fixer
@@ -42,7 +49,7 @@ nodes:
42
49
 
43
50
  Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
44
51
 
45
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
52
+ Review artifact path: {{artifacts.reviewArtifact.path}}
46
53
 
47
54
  Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
48
55
 
@@ -77,7 +84,7 @@ nodes:
77
84
  - verification-change
78
85
  with:
79
86
  source: verificationChange
80
- reviewArtifact: persistedReviewArtifact
87
+ reviewArtifact: reviewArtifact
81
88
  severity: '{{inputs.fixSeverity}}'
82
89
  output: reReview
83
90
 
@@ -88,12 +95,12 @@ nodes:
88
95
  - load-review-artifact
89
96
  - final-change
90
97
  with:
91
- artifact: persistedReviewArtifact
98
+ artifact: reviewArtifact
92
99
  review: reReview
93
100
  fixChange: finalChange
94
101
  severity: '{{inputs.fixSeverity}}'
95
102
  minIssues: '1'
96
- output: persistedReviewArtifact
103
+ output: reviewArtifact
97
104
 
98
105
  fix-loop:
99
106
  control: loop
@@ -1,5 +1,12 @@
1
1
  name: local-review
2
2
  description: Review local git diff
3
+ metadata:
4
+ kind: review
5
+ tags: [review, local]
6
+ review:
7
+ source: local
8
+ diff: true
9
+ issues: true
3
10
  inputs:
4
11
  staged:
5
12
  type: boolean
@@ -20,5 +27,4 @@ nodes:
20
27
  - change
21
28
  with:
22
29
  source: change
23
- artifact: persistedReviewArtifact
24
30
  output: review
@@ -13,10 +13,31 @@ nodes:
13
13
  staged: '{{inputs.staged}}'
14
14
  output: change
15
15
 
16
- visual:
16
+ review-artifact:
17
+ action: artifact-exists
18
+ needs:
19
+ - change
20
+ with:
21
+ kind: review
22
+ source: change
23
+ output: reviewArtifactStatus
24
+
25
+ load-review-artifact:
26
+ action: load-artifact
27
+ needs:
28
+ - review-artifact
29
+ if: artifacts.reviewArtifactStatus.exists == true
30
+ with:
31
+ kind: review
32
+ source: change
33
+ output: reviewArtifact
34
+
35
+ visual-with-review:
17
36
  agent: visual/pr-explainer
18
37
  needs:
19
38
  - change
39
+ - load-review-artifact
40
+ if: artifacts.reviewArtifactStatus.exists == true
20
41
  input: |
21
42
  Generate a visual local-diff explainer HTML artifact.
22
43
 
@@ -27,5 +48,29 @@ nodes:
27
48
 
28
49
  DRS change-source context:
29
50
  {{artifacts.change}}
51
+
52
+ Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
53
+
54
+ Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
55
+ writes: '{{inputs.outputPath}}'
56
+ output: visualExplainer
57
+
58
+ visual:
59
+ agent: visual/pr-explainer
60
+ needs:
61
+ - review-artifact
62
+ if: artifacts.reviewArtifactStatus.exists == false
63
+ input: |
64
+ Generate a visual local-diff explainer HTML artifact.
65
+
66
+ Output path: {{inputs.outputPath}}
67
+ Slide mode: {{inputs.slides}}
68
+
69
+ Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
70
+
71
+ DRS change-source context:
72
+ {{artifacts.change}}
73
+
74
+ No current DRS review artifact exists for this diff. Label the artifact as a diff explainer with no DRS findings included.
30
75
  writes: '{{inputs.outputPath}}'
31
76
  output: visualExplainer
@@ -0,0 +1,63 @@
1
+ name: temporal-control-smoke
2
+ description: Smoke test Temporal control-flow execution with safe local write actions
3
+ inputs:
4
+ mode:
5
+ type: enum
6
+ values:
7
+ - loop
8
+ - pass
9
+ - end
10
+ default: loop
11
+ description: 'Control route to exercise: loop, passThrough, or end'
12
+ output: final
13
+ nodes:
14
+ start:
15
+ action: write
16
+ input: '{{inputs.mode}}'
17
+ writes: .drs/artifacts/temporal-smoke/start.txt
18
+ output: mode
19
+
20
+ route:
21
+ control: switch
22
+ needs:
23
+ - start
24
+ value: '{{artifacts.mode}}'
25
+ cases:
26
+ loop: loop-body
27
+ end: stop
28
+ default: pass
29
+
30
+ loop-body:
31
+ action: write
32
+ needs:
33
+ - route
34
+ input: 'loop body for {{artifacts.mode}}'
35
+ writes: .drs/artifacts/temporal-smoke/loop-body.txt
36
+ output: loopBody
37
+
38
+ again:
39
+ control: loop
40
+ needs:
41
+ - loop-body
42
+ if: 'true'
43
+ target: loop-body
44
+ exit: done
45
+ maxIterations: 2
46
+ onMaxIterations: exit
47
+
48
+ pass:
49
+ control: passThrough
50
+ needs:
51
+ - route
52
+ target: done
53
+
54
+ stop:
55
+ control: end
56
+ needs:
57
+ - route
58
+
59
+ done:
60
+ action: write
61
+ input: 'temporal control smoke complete via {{inputs.mode}}'
62
+ writes: .drs/artifacts/temporal-smoke/done.txt
63
+ output: final
package/README.md CHANGED
@@ -519,6 +519,45 @@ workflow:
519
519
 
520
520
  See [docs/WORKFLOWS.md](docs/WORKFLOWS.md) for the full workflow configuration reference.
521
521
 
522
+ ### Temporal Execution (Experimental)
523
+
524
+ DRS can dispatch workflows through Temporal. The workflow YAML remains the source of truth; DRS compiles it to a JSON plan, runs deterministic scheduling in a generic Temporal workflow, and executes workflow nodes as Temporal activities.
525
+
526
+ Configure Temporal in `.drs/drs.config.yaml` when the defaults do not match your environment:
527
+
528
+ ```yaml
529
+ temporal:
530
+ address: localhost:7233
531
+ namespace: default
532
+ taskQueue: drs-workflows
533
+ workflowIdPrefix: drs
534
+ ```
535
+
536
+ Start a worker in the repository where node activities should execute:
537
+
538
+ ```bash
539
+ drs temporal worker
540
+ ```
541
+
542
+ Run a supported workflow through Temporal:
543
+
544
+ ```bash
545
+ drs workflow run local-review --executor temporal
546
+ drs workflow run github-pr-show-changes --executor temporal --input owner=octocat --input repo=hello-world --input pr=456
547
+ drs workflow run local-review --executor temporal --no-wait
548
+ drs workflow run local-review --executor temporal --trace
549
+ ```
550
+
551
+ For a safe local smoke test that does not require model or platform credentials, run the packaged control-flow workflow:
552
+
553
+ ```bash
554
+ drs workflow run temporal-control-smoke --executor temporal --input mode=loop
555
+ drs workflow run temporal-control-smoke --executor temporal --input mode=pass
556
+ drs workflow run temporal-control-smoke --executor temporal --input mode=end
557
+ ```
558
+
559
+ Temporal mode is experimental. It supports DAG workflows and DRS control-flow nodes (`loop`, `switch`, `passThrough`, `end`), structured logs, workflow queries, cancellation state, trace artifacts, and side-effect retry safeguards. See [docs/TEMPORAL.md](docs/TEMPORAL.md) for worker deployment, Temporal UI troubleshooting, and opt-in smoke coverage. See [TEMPORAL_EXECUTION_PLAN.md](TEMPORAL_EXECUTION_PLAN.md) for the rollout plan.
560
+
522
561
  ### Configure Review Behavior
523
562
 
524
563
  Edit `.drs/drs.config.yaml`: