@jphutchins/code-review 0.1.0-alpha.45 → 0.1.0-alpha.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -30
- package/dist/index.js +195 -131
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/findings.schema.json +49 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jphutchins/code-review",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.46",
|
|
4
4
|
"description": "Deterministic commenter for agentic PR review — gather, render, inline, post, adapt, extract, cost, validate, print-schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -123,6 +123,55 @@
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
|
+
"convergence": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"description": "Advisory (issue #174): the current round's convergence score, the threshold it is judged against, whether it converged, and the per-round trajectory. The review agent does NOT write this field — the pipeline computes the score deterministically from the findings (floor(severity) + headroom × confidence × likelihood, summed) and stamps it, so this JSON document is the sole source of the convergence data a decoding agent reads. `score` and `threshold` are both carried so the number is interpretable on its own (converged when score <= threshold); prior rounds are carried verbatim, so changing the threshold never rewrites a past round's score.",
|
|
130
|
+
"required": ["score", "threshold", "converged"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"score": {
|
|
133
|
+
"type": "number",
|
|
134
|
+
"description": "This round's convergence score — the sum of every finding's and systemic problem's contribution, rounded to 2 decimals. Lower is closer to convergence."
|
|
135
|
+
},
|
|
136
|
+
"threshold": {
|
|
137
|
+
"type": "number",
|
|
138
|
+
"description": "The convergence tolerance in force for this round: the round is converged when score <= threshold."
|
|
139
|
+
},
|
|
140
|
+
"converged": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"description": "Whether this round converged (score <= threshold). Advisory only — never alters the verdict."
|
|
143
|
+
},
|
|
144
|
+
"rounds": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"description": "The convergence trajectory: one entry per completed full-review round, oldest first, this round's entry last. Each score is a historical snapshot carried verbatim.",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["round"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"round": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 1,
|
|
155
|
+
"description": "The 1-indexed completed-round number this entry represents."
|
|
156
|
+
},
|
|
157
|
+
"score": {
|
|
158
|
+
"type": "number",
|
|
159
|
+
"description": "That round's convergence score, carried verbatim from when the round completed. Absent only for a round migrated from a pre-#174 sticky, which stored no score."
|
|
160
|
+
},
|
|
161
|
+
"codes": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": { "type": "integer", "minimum": 0 },
|
|
164
|
+
"description": "That round's mechanism-frequency map: finding code -> number of findings carrying it. Feeds the same-mechanism and scope-metastasis recurrence signals."
|
|
165
|
+
},
|
|
166
|
+
"sha": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "The reviewed head SHA (short form) for that round, so a same-head CI retry is recognised as the same iteration rather than new recurrence evidence."
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
126
175
|
"findings": {
|
|
127
176
|
"type": "array",
|
|
128
177
|
"description": "Zero or more specific findings.",
|