@diff-review-system/drs 4.0.1 → 5.0.0-rc.1

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 (218) hide show
  1. package/.pi/agents/review/unified-reviewer.md +2 -6
  2. package/.pi/agents/task/okf-wiki-maintainer.md +72 -0
  3. package/.pi/agents/task/review-assistant.md +22 -0
  4. package/.pi/workflows/github-pr-fix-review-issues-stacked.yaml +12 -4
  5. package/.pi/workflows/github-pr-review-post.yaml +29 -20
  6. package/.pi/workflows/github-pr-review.yaml +37 -8
  7. package/.pi/workflows/github-pr-update-agents-md-stacked.yaml +2 -0
  8. package/.pi/workflows/github-pr-visual-explain.yaml +46 -1
  9. package/.pi/workflows/gitlab-mr-fix-review-issues-stacked.yaml +12 -4
  10. package/.pi/workflows/gitlab-mr-review.yaml +20 -8
  11. package/.pi/workflows/gitlab-mr-update-agents-md-stacked.yaml +2 -0
  12. package/.pi/workflows/gitlab-mr-visual-explain.yaml +46 -1
  13. package/.pi/workflows/local-fix-review-issues.yaml +13 -6
  14. package/.pi/workflows/local-review.yaml +7 -1
  15. package/.pi/workflows/local-visual-explain.yaml +46 -1
  16. package/.pi/workflows/release-changelog-finalize.yaml +10 -0
  17. package/.pi/workflows/repository-wiki-check.yaml +40 -0
  18. package/.pi/workflows/repository-wiki-sync.yaml +187 -0
  19. package/.pi/workflows/temporal-control-smoke.yaml +63 -0
  20. package/.wiki-site/.vitepress/config.mts +452 -0
  21. package/.wiki-site/.vitepress/theme/PageLead.vue +122 -0
  22. package/.wiki-site/.vitepress/theme/index.ts +12 -0
  23. package/.wiki-site/.vitepress/theme/style.css +270 -0
  24. package/README.md +77 -4
  25. package/dist/cli/index.js +87 -4
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/cli/init.d.ts +6 -1
  28. package/dist/cli/init.d.ts.map +1 -1
  29. package/dist/cli/init.js +26 -10
  30. package/dist/cli/init.js.map +1 -1
  31. package/dist/cli/run-agent.d.ts +5 -7
  32. package/dist/cli/run-agent.d.ts.map +1 -1
  33. package/dist/cli/run-agent.js +56 -5
  34. package/dist/cli/run-agent.js.map +1 -1
  35. package/dist/cli/wiki.d.ts +3 -0
  36. package/dist/cli/wiki.d.ts.map +1 -0
  37. package/dist/cli/wiki.js +174 -0
  38. package/dist/cli/wiki.js.map +1 -0
  39. package/dist/cli/workflow-executor-selection.d.ts +3 -0
  40. package/dist/cli/workflow-executor-selection.d.ts.map +1 -0
  41. package/dist/cli/workflow-executor-selection.js +15 -0
  42. package/dist/cli/workflow-executor-selection.js.map +1 -0
  43. package/dist/cli/workflow.d.ts +40 -42
  44. package/dist/cli/workflow.d.ts.map +1 -1
  45. package/dist/cli/workflow.js +533 -868
  46. package/dist/cli/workflow.js.map +1 -1
  47. package/dist/github/client.d.ts.map +1 -1
  48. package/dist/github/client.js +2 -2
  49. package/dist/github/client.js.map +1 -1
  50. package/dist/github/platform-adapter.d.ts.map +1 -1
  51. package/dist/github/platform-adapter.js +15 -1
  52. package/dist/github/platform-adapter.js.map +1 -1
  53. package/dist/gitlab/client.d.ts +4 -0
  54. package/dist/gitlab/client.d.ts.map +1 -1
  55. package/dist/gitlab/client.js +17 -1
  56. package/dist/gitlab/client.js.map +1 -1
  57. package/dist/gitlab/platform-adapter.d.ts.map +1 -1
  58. package/dist/gitlab/platform-adapter.js +17 -1
  59. package/dist/gitlab/platform-adapter.js.map +1 -1
  60. package/dist/lib/agent-permissions.d.ts +44 -0
  61. package/dist/lib/agent-permissions.d.ts.map +1 -0
  62. package/dist/lib/agent-permissions.js +358 -0
  63. package/dist/lib/agent-permissions.js.map +1 -0
  64. package/dist/lib/agent-result.d.ts +10 -0
  65. package/dist/lib/agent-result.d.ts.map +1 -0
  66. package/dist/lib/agent-result.js +2 -0
  67. package/dist/lib/agent-result.js.map +1 -0
  68. package/dist/lib/comment-poster.d.ts +1 -1
  69. package/dist/lib/comment-poster.d.ts.map +1 -1
  70. package/dist/lib/comment-poster.js +38 -16
  71. package/dist/lib/comment-poster.js.map +1 -1
  72. package/dist/lib/config.d.ts +27 -1
  73. package/dist/lib/config.d.ts.map +1 -1
  74. package/dist/lib/config.js +17 -0
  75. package/dist/lib/config.js.map +1 -1
  76. package/dist/lib/error-comment-poster.d.ts +1 -1
  77. package/dist/lib/error-comment-poster.d.ts.map +1 -1
  78. package/dist/lib/error-comment-poster.js +15 -7
  79. package/dist/lib/error-comment-poster.js.map +1 -1
  80. package/dist/lib/okf-wiki.d.ts +65 -0
  81. package/dist/lib/okf-wiki.d.ts.map +1 -0
  82. package/dist/lib/okf-wiki.js +647 -0
  83. package/dist/lib/okf-wiki.js.map +1 -0
  84. package/dist/lib/output-paths.d.ts +0 -1
  85. package/dist/lib/output-paths.d.ts.map +1 -1
  86. package/dist/lib/output-paths.js +0 -1
  87. package/dist/lib/output-paths.js.map +1 -1
  88. package/dist/lib/platform-client.d.ts +2 -0
  89. package/dist/lib/platform-client.d.ts.map +1 -1
  90. package/dist/lib/project-setup.d.ts +7 -0
  91. package/dist/lib/project-setup.d.ts.map +1 -0
  92. package/dist/lib/project-setup.js +11 -0
  93. package/dist/lib/project-setup.js.map +1 -0
  94. package/dist/lib/review-artifact-store.d.ts +16 -0
  95. package/dist/lib/review-artifact-store.d.ts.map +1 -0
  96. package/dist/lib/review-artifact-store.js +84 -0
  97. package/dist/lib/review-artifact-store.js.map +1 -0
  98. package/dist/lib/review-artifact.d.ts +11 -1
  99. package/dist/lib/review-artifact.d.ts.map +1 -1
  100. package/dist/lib/review-artifact.js +203 -0
  101. package/dist/lib/review-artifact.js.map +1 -1
  102. package/dist/lib/review-core.d.ts +1 -0
  103. package/dist/lib/review-core.d.ts.map +1 -1
  104. package/dist/lib/review-core.js +11 -14
  105. package/dist/lib/review-core.js.map +1 -1
  106. package/dist/lib/review-orchestrator.d.ts +6 -1
  107. package/dist/lib/review-orchestrator.d.ts.map +1 -1
  108. package/dist/lib/review-orchestrator.js +3 -1
  109. package/dist/lib/review-orchestrator.js.map +1 -1
  110. package/dist/lib/review-parser.d.ts.map +1 -1
  111. package/dist/lib/review-parser.js +15 -12
  112. package/dist/lib/review-parser.js.map +1 -1
  113. package/dist/lib/wiki-delta.d.ts +71 -0
  114. package/dist/lib/wiki-delta.d.ts.map +1 -0
  115. package/dist/lib/wiki-delta.js +524 -0
  116. package/dist/lib/wiki-delta.js.map +1 -0
  117. package/dist/lib/wiki-run-summary.d.ts +45 -0
  118. package/dist/lib/wiki-run-summary.d.ts.map +1 -0
  119. package/dist/lib/wiki-run-summary.js +168 -0
  120. package/dist/lib/wiki-run-summary.js.map +1 -0
  121. package/dist/lib/wiki-search.d.ts +24 -0
  122. package/dist/lib/wiki-search.d.ts.map +1 -0
  123. package/dist/lib/wiki-search.js +200 -0
  124. package/dist/lib/wiki-search.js.map +1 -0
  125. package/dist/lib/wiki-site-graph.d.ts +33 -0
  126. package/dist/lib/wiki-site-graph.d.ts.map +1 -0
  127. package/dist/lib/wiki-site-graph.js +446 -0
  128. package/dist/lib/wiki-site-graph.js.map +1 -0
  129. package/dist/lib/wiki-site-safety.d.ts +6 -0
  130. package/dist/lib/wiki-site-safety.d.ts.map +1 -0
  131. package/dist/lib/wiki-site-safety.js +83 -0
  132. package/dist/lib/wiki-site-safety.js.map +1 -0
  133. package/dist/lib/wiki-site-smoke.d.ts +16 -0
  134. package/dist/lib/wiki-site-smoke.d.ts.map +1 -0
  135. package/dist/lib/wiki-site-smoke.js +270 -0
  136. package/dist/lib/wiki-site-smoke.js.map +1 -0
  137. package/dist/lib/wiki-site.d.ts +26 -0
  138. package/dist/lib/wiki-site.d.ts.map +1 -0
  139. package/dist/lib/wiki-site.js +221 -0
  140. package/dist/lib/wiki-site.js.map +1 -0
  141. package/dist/lib/workflow/artifact-store.d.ts +71 -0
  142. package/dist/lib/workflow/artifact-store.d.ts.map +1 -0
  143. package/dist/lib/workflow/artifact-store.js +121 -0
  144. package/dist/lib/workflow/artifact-store.js.map +1 -0
  145. package/dist/lib/workflow/compiled-plan.d.ts +87 -0
  146. package/dist/lib/workflow/compiled-plan.d.ts.map +1 -0
  147. package/dist/lib/workflow/compiled-plan.js +62 -0
  148. package/dist/lib/workflow/compiled-plan.js.map +1 -0
  149. package/dist/lib/workflow/executor.d.ts +18 -0
  150. package/dist/lib/workflow/executor.d.ts.map +1 -0
  151. package/dist/lib/workflow/executor.js +2 -0
  152. package/dist/lib/workflow/executor.js.map +1 -0
  153. package/dist/lib/workflow/graph.d.ts +30 -0
  154. package/dist/lib/workflow/graph.d.ts.map +1 -0
  155. package/dist/lib/workflow/graph.js +139 -0
  156. package/dist/lib/workflow/graph.js.map +1 -0
  157. package/dist/lib/workflow/input.d.ts +4 -0
  158. package/dist/lib/workflow/input.d.ts.map +1 -0
  159. package/dist/lib/workflow/input.js +4 -0
  160. package/dist/lib/workflow/input.js.map +1 -0
  161. package/dist/lib/workflow/node-executor.d.ts +19 -0
  162. package/dist/lib/workflow/node-executor.d.ts.map +1 -0
  163. package/dist/lib/workflow/node-executor.js +2 -0
  164. package/dist/lib/workflow/node-executor.js.map +1 -0
  165. package/dist/lib/workflow/planning.d.ts +52 -0
  166. package/dist/lib/workflow/planning.d.ts.map +1 -0
  167. package/dist/lib/workflow/planning.js +865 -0
  168. package/dist/lib/workflow/planning.js.map +1 -0
  169. package/dist/lib/workflow/types.d.ts +71 -0
  170. package/dist/lib/workflow/types.d.ts.map +1 -0
  171. package/dist/lib/workflow/types.js +2 -0
  172. package/dist/lib/workflow/types.js.map +1 -0
  173. package/dist/lib/workflow-artifacts.d.ts.map +1 -1
  174. package/dist/lib/workflow-artifacts.js +23 -1
  175. package/dist/lib/workflow-artifacts.js.map +1 -1
  176. package/dist/lib/write-json-output.d.ts.map +1 -1
  177. package/dist/lib/write-json-output.js +3 -8
  178. package/dist/lib/write-json-output.js.map +1 -1
  179. package/dist/pi/sdk.d.ts.map +1 -1
  180. package/dist/pi/sdk.js +276 -19
  181. package/dist/pi/sdk.js.map +1 -1
  182. package/dist/runtime/client.d.ts +3 -0
  183. package/dist/runtime/client.d.ts.map +1 -1
  184. package/dist/runtime/client.js +4 -0
  185. package/dist/runtime/client.js.map +1 -1
  186. package/dist/temporal/activities.d.ts +26 -0
  187. package/dist/temporal/activities.d.ts.map +1 -0
  188. package/dist/temporal/activities.js +219 -0
  189. package/dist/temporal/activities.js.map +1 -0
  190. package/dist/temporal/config.d.ts +4 -0
  191. package/dist/temporal/config.d.ts.map +1 -0
  192. package/dist/temporal/config.js +36 -0
  193. package/dist/temporal/config.js.map +1 -0
  194. package/dist/temporal/executor.d.ts +7 -0
  195. package/dist/temporal/executor.d.ts.map +1 -0
  196. package/dist/temporal/executor.js +240 -0
  197. package/dist/temporal/executor.js.map +1 -0
  198. package/dist/temporal/retry-policy.d.ts +28 -0
  199. package/dist/temporal/retry-policy.d.ts.map +1 -0
  200. package/dist/temporal/retry-policy.js +61 -0
  201. package/dist/temporal/retry-policy.js.map +1 -0
  202. package/dist/temporal/types.d.ts +86 -0
  203. package/dist/temporal/types.d.ts.map +1 -0
  204. package/dist/temporal/types.js +2 -0
  205. package/dist/temporal/types.js.map +1 -0
  206. package/dist/temporal/worker.d.ts +3 -0
  207. package/dist/temporal/worker.d.ts.map +1 -0
  208. package/dist/temporal/worker.js +18 -0
  209. package/dist/temporal/worker.js.map +1 -0
  210. package/dist/temporal/workflow-id.d.ts +27 -0
  211. package/dist/temporal/workflow-id.d.ts.map +1 -0
  212. package/dist/temporal/workflow-id.js +53 -0
  213. package/dist/temporal/workflow-id.js.map +1 -0
  214. package/dist/temporal/workflows.d.ts +6 -0
  215. package/dist/temporal/workflows.d.ts.map +1 -0
  216. package/dist/temporal/workflows.js +355 -0
  217. package/dist/temporal/workflows.js.map +1 -0
  218. package/package.json +24 -9
@@ -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,72 @@
1
+ ---
2
+ description: Generates and maintains an OKF v0.1 repository wiki
3
+ color: "#0f766e"
4
+ hidden: false
5
+ tools:
6
+ Read: true
7
+ Glob: true
8
+ Grep: true
9
+ Bash: false
10
+ Edit: true
11
+ Write: true
12
+ write_json_output: false
13
+ delete_file: true
14
+ git_diff: true
15
+ ---
16
+
17
+ You generate and maintain one repository wiki as an Open Knowledge Format (OKF) v0.1 bundle.
18
+
19
+ Inspect the repository and existing bundle, edit concept documents in place, then return a concise summary. Never commit or push.
20
+
21
+ ## Scope
22
+
23
+ - Filesystem permissions enforce writes below the bundle root supplied by the workflow. You may read the rest of the repository.
24
+ - Treat tracked files as the primary source of truth. Inspect relevant working changes, tests, existing documentation, agent guidance, and recent git history when useful.
25
+ - Do not document ignored files, secrets, dependency caches, build output, DRS artifacts, or unrelated untracked files.
26
+ - Do not create or edit `index.md`; DRS generates directory indexes deterministically after you finish.
27
+ - Do not create DRS state or metadata inside the bundle.
28
+ - Never create or edit the workflow-provided state path. The deterministic `record-wiki-state` action owns that file after validation.
29
+
30
+ ## OKF v0.1
31
+
32
+ Every Markdown file other than the reserved `index.md` and `log.md` is a concept and must begin with parseable YAML frontmatter:
33
+
34
+ ```yaml
35
+ ---
36
+ type: Architecture
37
+ title: Review workflow runtime
38
+ description: How DRS plans and executes repository review workflows.
39
+ tags: [workflow, runtime]
40
+ ---
41
+ ```
42
+
43
+ - `type` is the only required field and must be a non-empty string.
44
+ - `title`, `description`, `resource`, `tags`, and `timestamp` are optional standard fields.
45
+ - Declare the repository evidence behind every concept with the producer-defined `drs_sources` field: a list of repository-relative paths with optional `symbols`, for example `drs_sources: [{path: src/lib/wiki-delta.ts, symbols: [planWikiUpdate]}]`. Keep citations current when you edit a concept, cite new concepts you create, and remove citations to files that no longer exist.
46
+ - Preserve unknown producer-defined frontmatter fields. OKF explicitly permits extensions.
47
+ - Use `resource` only for a canonical URI. Cite repository source paths in the Markdown body using backticks.
48
+ - `index.md` and `log.md` are reserved and are not concepts. `log.md`, when present, has no frontmatter and groups entries under `## YYYY-MM-DD` headings.
49
+ - Standard Markdown links between concepts are directed relationships. State the relationship in surrounding prose rather than adding links solely for navigation.
50
+ - Prefer bundle-root links such as `/architecture/runtime.md` when they improve stability. Verify links before finishing.
51
+ - Every substantive concept must participate in the concept graph through at least one evidence-backed Markdown relationship link outside generated indexes. Do not leave the bundle as disconnected pages.
52
+
53
+ ## Content
54
+
55
+ - Create `quickstart.md` as the entrypoint when initializing a bundle.
56
+ - Use actual Markdown links from `quickstart.md` to every major concept; code-formatted paths are not navigation links.
57
+ - Document architecture, major workflows, domain concepts, integrations, operations, tests, and extension points at the appropriate level rather than inventorying every source file.
58
+ - Keep each concept in one canonical document and link to it from related concepts.
59
+ - Explain why important behavior exists, where it is implemented, and what checks matter when changing it.
60
+ - Keep pages concise and evidence-based. Do not invent behavior, ownership, or product intent.
61
+ - Avoid thin pages and one-file directories. Start with no more than eight concept pages unless the repository is clearly tiny.
62
+
63
+ ## Maintenance
64
+
65
+ - Read the current bundle before editing it.
66
+ - Treat the workflow's deterministic delta plan as authoritative. In update mode, start from `candidateConcepts` (concepts whose cited `drs_sources` changed) and `changedPaths`, and map each source change to affected concepts before editing. Changed paths without provenance may need new or updated citations.
67
+ - Treat the workflow-provided repository wiki brief (persistent `.drs/wiki-instructions.md` plus any one-run addition) as authoritative for scope, priorities, exclusions, terminology, and audience.
68
+ - Preserve accurate content, stable concept paths, human-authored material, and extension frontmatter.
69
+ - Build a source-change-to-document impact plan before editing. Make surgical updates and allow a no-op when the bundle is current.
70
+ - Remove obsolete claims and concepts only when repository evidence clearly shows they are no longer valid.
71
+ - Use `delete_file` for obsolete concept files; generated indexes remain owned by DRS.
72
+ - Do not make formatting-only changes or rewrite unaffected pages.
@@ -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: ''
@@ -9,6 +16,7 @@ inputs:
9
16
  branchPrefix: 'drs-fix/pr-'
10
17
  allowStackedSource: 'false'
11
18
  draft: 'false'
19
+ useChangeRequestAuthor: 'true'
12
20
  output: changeRequest
13
21
  nodes:
14
22
  change:
@@ -37,7 +45,6 @@ nodes:
37
45
  if: '{{artifacts.stackGuard.allowed}} == true'
38
46
  with:
39
47
  source: change
40
- artifact: persistedReviewArtifact
41
48
  output: review
42
49
 
43
50
  threshold:
@@ -70,7 +77,7 @@ nodes:
70
77
 
71
78
  Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
72
79
 
73
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
80
+ Review artifact path: {{artifacts.reviewArtifact.path}}
74
81
 
75
82
  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
83
 
@@ -94,6 +101,7 @@ nodes:
94
101
  with:
95
102
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
96
103
  paths: '.'
104
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
97
105
  output: commit
98
106
 
99
107
  push:
@@ -121,7 +129,7 @@ nodes:
121
129
 
122
130
  Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
123
131
 
124
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
132
+ Review artifact: {{artifacts.reviewArtifact.path}}
125
133
 
126
134
  <!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
127
135
  <!-- drs-stack-kind: fix -->
@@ -138,7 +146,7 @@ nodes:
138
146
  repo: '{{inputs.repo}}'
139
147
  pr: '{{inputs.pr}}'
140
148
  source: change
141
- reviewArtifact: persistedReviewArtifact
149
+ reviewArtifact: reviewArtifact
142
150
  severity: '{{inputs.severity}}'
143
151
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
144
152
  marker: drs-fix-status
@@ -1,10 +1,26 @@
1
1
  name: github-pr-review-post
2
- description: Describe and review a GitHub pull request, posting the description and DRS comments
2
+ description: Validate and post a canonical DRS review artifact to a GitHub pull request
3
+ metadata:
4
+ kind: review-post
5
+ tags: [review, github, pull-request, artifact]
3
6
  inputs:
4
- owner: ''
5
- repo: ''
6
- pr: ''
7
- output: review
7
+ owner:
8
+ type: string
9
+ required: true
10
+ description: GitHub repository owner
11
+ repo:
12
+ type: string
13
+ required: true
14
+ description: GitHub repository name
15
+ pr:
16
+ type: number
17
+ required: true
18
+ description: Pull request number
19
+ expectedHeadSha:
20
+ type: string
21
+ required: true
22
+ description: Pull request head SHA reviewed by the producing job
23
+ output: postedReview
8
24
  nodes:
9
25
  change:
10
26
  action: change-source
@@ -13,31 +29,24 @@ nodes:
13
29
  owner: '{{inputs.owner}}'
14
30
  repo: '{{inputs.repo}}'
15
31
  pr: '{{inputs.pr}}'
32
+ requireCompleteDiff: true
16
33
  output: change
17
34
 
18
- describe:
19
- action: describe
35
+ load-review:
36
+ action: load-artifact
20
37
  needs:
21
38
  - change
22
39
  with:
40
+ kind: review
23
41
  source: change
24
- post: true
25
- output: description
26
-
27
- review:
28
- action: review
29
- needs:
30
- - describe
31
- with:
32
- source: change
33
- artifact: persistedReviewArtifact
34
- output: review
42
+ output: reviewArtifact
35
43
 
36
44
  post-comments:
37
45
  action: post-review-comments
38
46
  needs:
39
- - review
47
+ - load-review
40
48
  with:
41
49
  source: change
42
- review: review
50
+ review: reviewArtifact
51
+ expectedHeadSha: '{{inputs.expectedHeadSha}}'
43
52
  output: postedReview
@@ -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
@@ -21,6 +28,10 @@ inputs:
21
28
  type: boolean
22
29
  default: false
23
30
  description: Post DRS review comments to the PR
31
+ requireCompleteDiff:
32
+ type: boolean
33
+ default: false
34
+ description: Fail when GitHub cannot provide a stable, complete file and patch snapshot
24
35
  visual:
25
36
  type: boolean
26
37
  default: false
@@ -55,6 +66,10 @@ inputs:
55
66
  allowStackedSource:
56
67
  type: boolean
57
68
  default: false
69
+ useChangeRequestAuthor:
70
+ type: boolean
71
+ default: true
72
+ description: Attribute generated fix commits to the pull request creator
58
73
  fixDraft:
59
74
  type: boolean
60
75
  default: false
@@ -70,6 +85,7 @@ nodes:
70
85
  owner: '{{inputs.owner}}'
71
86
  repo: '{{inputs.repo}}'
72
87
  pr: '{{inputs.pr}}'
88
+ requireCompleteDiff: '{{inputs.requireCompleteDiff}}'
73
89
  output: change
74
90
 
75
91
  describe:
@@ -88,7 +104,12 @@ nodes:
88
104
  - change
89
105
  with:
90
106
  source: change
91
- artifact: persistedReviewArtifact
107
+ permissions:
108
+ filesystem:
109
+ read:
110
+ roots: ['.']
111
+ allow: ['**']
112
+ shell: false
92
113
  output: review
93
114
 
94
115
  visual:
@@ -166,7 +187,7 @@ nodes:
166
187
 
167
188
  Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
168
189
 
169
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
190
+ Review artifact path: {{artifacts.reviewArtifact.path}}
170
191
 
171
192
  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
193
 
@@ -213,8 +234,14 @@ nodes:
213
234
  if: inputs.fixMode == internal
214
235
  with:
215
236
  source: verificationChange
216
- reviewArtifact: persistedReviewArtifact
237
+ reviewArtifact: reviewArtifact
217
238
  severity: '{{inputs.fixSeverity}}'
239
+ permissions:
240
+ filesystem:
241
+ read:
242
+ roots: ['.']
243
+ allow: ['**']
244
+ shell: false
218
245
  output: reReview
219
246
 
220
247
  verify-fix:
@@ -224,12 +251,12 @@ nodes:
224
251
  - fix-change
225
252
  if: inputs.fixMode == internal
226
253
  with:
227
- artifact: persistedReviewArtifact
254
+ artifact: reviewArtifact
228
255
  review: reReview
229
256
  fixChange: fixChange
230
257
  severity: '{{inputs.fixSeverity}}'
231
258
  minIssues: '1'
232
- output: persistedReviewArtifact
259
+ output: reviewArtifact
233
260
 
234
261
  fix-loop:
235
262
  control: loop
@@ -252,7 +279,7 @@ nodes:
252
279
  repo: '{{inputs.repo}}'
253
280
  pr: '{{inputs.pr}}'
254
281
  source: change
255
- reviewArtifact: persistedReviewArtifact
282
+ reviewArtifact: reviewArtifact
256
283
  fixReview: reReview
257
284
  fixChange: fixChange
258
285
  severity: '{{inputs.fixSeverity}}'
@@ -267,6 +294,7 @@ nodes:
267
294
  with:
268
295
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
269
296
  paths: '.'
297
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
270
298
  output: internalFixCommit
271
299
 
272
300
  push-internal-fix:
@@ -294,6 +322,7 @@ nodes:
294
322
  with:
295
323
  message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
296
324
  paths: '.'
325
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
297
326
  output: fixCommit
298
327
 
299
328
  fix-push:
@@ -320,7 +349,7 @@ nodes:
320
349
  Automated DRS fix stacked on PR #{{inputs.pr}} from the main github-pr-review workflow.
321
350
 
322
351
  Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
323
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
352
+ Review artifact: {{artifacts.reviewArtifact.path}}
324
353
 
325
354
  <!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
326
355
  <!-- drs-stack-kind: fix -->
@@ -354,7 +383,7 @@ nodes:
354
383
  repo: '{{inputs.repo}}'
355
384
  pr: '{{inputs.pr}}'
356
385
  source: change
357
- reviewArtifact: persistedReviewArtifact
386
+ reviewArtifact: reviewArtifact
358
387
  severity: '{{inputs.fixSeverity}}'
359
388
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
360
389
  marker: drs-fix-status
@@ -8,6 +8,7 @@ inputs:
8
8
  branchPrefix: 'drs-guidance/pr-'
9
9
  allowStackedSource: 'false'
10
10
  draft: 'false'
11
+ useChangeRequestAuthor: 'true'
11
12
  output: changeRequest
12
13
  nodes:
13
14
  change:
@@ -70,6 +71,7 @@ nodes:
70
71
  with:
71
72
  message: 'docs: update agent guidance for PR #{{inputs.pr}}'
72
73
  paths: '{{inputs.paths}}'
74
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
73
75
  output: commit
74
76
 
75
77
  push:
@@ -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: ''
@@ -8,6 +15,7 @@ inputs:
8
15
  branchPrefix: 'drs-fix/mr-'
9
16
  allowStackedSource: 'false'
10
17
  draft: 'false'
18
+ useChangeRequestAuthor: 'true'
11
19
  output: changeRequest
12
20
  nodes:
13
21
  change:
@@ -35,7 +43,6 @@ nodes:
35
43
  if: '{{artifacts.stackGuard.allowed}} == true'
36
44
  with:
37
45
  source: change
38
- artifact: persistedReviewArtifact
39
46
  output: review
40
47
 
41
48
  threshold:
@@ -68,7 +75,7 @@ nodes:
68
75
 
69
76
  Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
70
77
 
71
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
78
+ Review artifact path: {{artifacts.reviewArtifact.path}}
72
79
 
73
80
  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
81
 
@@ -92,6 +99,7 @@ nodes:
92
99
  with:
93
100
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
94
101
  paths: '.'
102
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
95
103
  output: commit
96
104
 
97
105
  push:
@@ -118,7 +126,7 @@ nodes:
118
126
 
119
127
  Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
120
128
 
121
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
129
+ Review artifact: {{artifacts.reviewArtifact.path}}
122
130
 
123
131
  <!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
124
132
  <!-- drs-stack-kind: fix -->
@@ -134,7 +142,7 @@ nodes:
134
142
  project: '{{inputs.project}}'
135
143
  mr: '{{inputs.mr}}'
136
144
  source: change
137
- reviewArtifact: persistedReviewArtifact
145
+ reviewArtifact: reviewArtifact
138
146
  severity: '{{inputs.severity}}'
139
147
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
140
148
  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
@@ -44,6 +51,10 @@ inputs:
44
51
  allowStackedSource:
45
52
  type: boolean
46
53
  default: false
54
+ useChangeRequestAuthor:
55
+ type: boolean
56
+ default: true
57
+ description: Attribute generated fix commits to the merge request creator
47
58
  fixDraft:
48
59
  type: boolean
49
60
  default: false
@@ -82,7 +93,6 @@ nodes:
82
93
  - change
83
94
  with:
84
95
  source: change
85
- artifact: persistedReviewArtifact
86
96
  output: review
87
97
 
88
98
  visual:
@@ -170,7 +180,7 @@ nodes:
170
180
 
171
181
  Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
172
182
 
173
- Review artifact path: {{artifacts.persistedReviewArtifact.path}}
183
+ Review artifact path: {{artifacts.reviewArtifact.path}}
174
184
 
175
185
  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
186
 
@@ -217,7 +227,7 @@ nodes:
217
227
  if: inputs.fixMode == internal
218
228
  with:
219
229
  source: verificationChange
220
- reviewArtifact: persistedReviewArtifact
230
+ reviewArtifact: reviewArtifact
221
231
  severity: '{{inputs.fixSeverity}}'
222
232
  output: reReview
223
233
 
@@ -228,12 +238,12 @@ nodes:
228
238
  - fix-change
229
239
  if: inputs.fixMode == internal
230
240
  with:
231
- artifact: persistedReviewArtifact
241
+ artifact: reviewArtifact
232
242
  review: reReview
233
243
  fixChange: fixChange
234
244
  severity: '{{inputs.fixSeverity}}'
235
245
  minIssues: '1'
236
- output: persistedReviewArtifact
246
+ output: reviewArtifact
237
247
 
238
248
  fix-loop:
239
249
  control: loop
@@ -255,7 +265,7 @@ nodes:
255
265
  project: '{{inputs.project}}'
256
266
  mr: '{{inputs.mr}}'
257
267
  source: change
258
- reviewArtifact: persistedReviewArtifact
268
+ reviewArtifact: reviewArtifact
259
269
  fixReview: reReview
260
270
  fixChange: fixChange
261
271
  severity: '{{inputs.fixSeverity}}'
@@ -270,6 +280,7 @@ nodes:
270
280
  with:
271
281
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
272
282
  paths: '.'
283
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
273
284
  output: internalFixCommit
274
285
 
275
286
  push-internal-fix:
@@ -297,6 +308,7 @@ nodes:
297
308
  with:
298
309
  message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
299
310
  paths: '.'
311
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
300
312
  output: fixCommit
301
313
 
302
314
  fix-push:
@@ -322,7 +334,7 @@ nodes:
322
334
  Automated DRS fix stacked on MR !{{inputs.mr}} from the main gitlab-mr-review workflow.
323
335
 
324
336
  Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
325
- Review artifact: {{artifacts.persistedReviewArtifact.path}}
337
+ Review artifact: {{artifacts.reviewArtifact.path}}
326
338
 
327
339
  <!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
328
340
  <!-- drs-stack-kind: fix -->
@@ -354,7 +366,7 @@ nodes:
354
366
  project: '{{inputs.project}}'
355
367
  mr: '{{inputs.mr}}'
356
368
  source: change
357
- reviewArtifact: persistedReviewArtifact
369
+ reviewArtifact: reviewArtifact
358
370
  severity: '{{inputs.fixSeverity}}'
359
371
  stackedPrUrl: '{{artifacts.changeRequest.url}}'
360
372
  marker: drs-fix-status
@@ -7,6 +7,7 @@ inputs:
7
7
  branchPrefix: 'drs-guidance/mr-'
8
8
  allowStackedSource: 'false'
9
9
  draft: 'false'
10
+ useChangeRequestAuthor: 'true'
10
11
  output: changeRequest
11
12
  nodes:
12
13
  change:
@@ -68,6 +69,7 @@ nodes:
68
69
  with:
69
70
  message: 'docs: update agent guidance for MR !{{inputs.mr}}'
70
71
  paths: '{{inputs.paths}}'
72
+ useChangeRequestAuthor: '{{inputs.useChangeRequestAuthor}}'
71
73
  output: commit
72
74
 
73
75
  push: