@jphutchins/code-review 0.1.0-alpha.44 → 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 -28
- package/dist/index.js +320 -142
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/findings.schema.json +50 -1
- package/templates/comment.eta +13 -2
- package/templates/inline.eta +1 -1
package/README.md
CHANGED
|
@@ -106,43 +106,55 @@ links to:
|
|
|
106
106
|
The embedded document is the agent's **complete** findings document — the same `schema_version`
|
|
107
107
|
0.9.0 contract the review agent is held to and
|
|
108
108
|
[`schema/findings.schema.json`](schema/findings.schema.json) validates, and the same object the
|
|
109
|
-
comment is rendered from.
|
|
110
|
-
|
|
109
|
+
comment is rendered from. The agent's fields are embedded verbatim; the pipeline stamps one field the
|
|
110
|
+
agent never writes — `convergence` (below) — so the whole review, findings and convergence signal
|
|
111
|
+
alike, travels as one JSON document with no side marker to drift from.
|
|
111
112
|
|
|
112
113
|
```json
|
|
113
114
|
{
|
|
114
115
|
"schema_version": "0.9.0",
|
|
115
116
|
"verdict": "comment",
|
|
116
117
|
"summary": "...",
|
|
117
|
-
"findings": []
|
|
118
|
+
"findings": [],
|
|
119
|
+
"convergence": {
|
|
120
|
+
"score": 0.42,
|
|
121
|
+
"threshold": 1,
|
|
122
|
+
"converged": true,
|
|
123
|
+
"rounds": [
|
|
124
|
+
{ "round": 1, "score": 2.4 },
|
|
125
|
+
{ "round": 2, "score": 1.1 },
|
|
126
|
+
{ "round": 3, "score": 0.42 }
|
|
127
|
+
]
|
|
128
|
+
}
|
|
118
129
|
}
|
|
119
130
|
```
|
|
120
131
|
|
|
121
|
-
The deterministic
|
|
122
|
-
the
|
|
123
|
-
`
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
boolean — `converged: true` means the last completed
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
review
|
|
144
|
-
|
|
145
|
-
the
|
|
132
|
+
The **`convergence`** field is the deterministic stop signal AND the per-round trajectory for an
|
|
133
|
+
iterating author-agent, carried in the JSON document itself so a decoder reads one object.
|
|
134
|
+
`convergence.score` sums each finding and systemic problem's
|
|
135
|
+
`floor(severity) + max(0, ceiling − floor) × confidence × likelihood` (ceilings critical 4 · major 2
|
|
136
|
+
· minor 1 · nit 0; floors critical `threshold + 0.01` · major 0.5 · minor 0.1 · nit 0), rounded to 2
|
|
137
|
+
decimals. A **systemic problem is scored with `likelihood` = 1** — a structural observation has no
|
|
138
|
+
single triggering input, so it is never discounted by likelihood. `threshold` defaults to 1, and
|
|
139
|
+
`converged` = score ≤ threshold as a literal boolean — `converged: true` means the last completed
|
|
140
|
+
round is at or below the tolerance, so another iteration is not warranted. `score` and `threshold`
|
|
141
|
+
are both carried so the number is interpretable on its own. `convergence.rounds` is the trajectory,
|
|
142
|
+
oldest first: each entry's `score` is a historical snapshot carried **verbatim**, so changing
|
|
143
|
+
`convergence_threshold` mid-PR never rewrites a past round's number. The commenter computes
|
|
144
|
+
`convergence` from the review's own severities (the agent never writes it) and stamps it, overwriting
|
|
145
|
+
any value the agent echoed; it appears once at least one full-review round has completed and is carried
|
|
146
|
+
forward afterward — a mechanic (CI-fix) pass or an envelope-loss notice carries the last completed
|
|
147
|
+
round's convergence unchanged rather than re-deriving it, and a notice never fabricates a signal for a
|
|
148
|
+
run that produced no review. The convergence survives the "review in progress" banner, which replaces
|
|
149
|
+
only the sticky's prose and carries the blob forward verbatim.
|
|
150
|
+
|
|
151
|
+
Cross-round recurrence (the sticky's "Scope metastasis" warning) is derived from the per-round
|
|
152
|
+
mechanism frequencies carried in `convergence.rounds` (each entry's `codes` map), from which the
|
|
153
|
+
re-review seed re-derives the advisory `scope_metastasis` entry it hands the next-round agent. Each
|
|
154
|
+
inline review comment embeds only its own finding (a `schema_version` + one-finding fragment), and the
|
|
155
|
+
review-object body only links the sticky — so the **sticky is the sole documented decode surface** for
|
|
156
|
+
the whole-document marker; a decoding agent reads it there. The review body is written only after the
|
|
157
|
+
sticky exists (a failed sticky write aborts the run first), so it never carries the blob itself.
|
|
146
158
|
- **`code-review-transcript`** — the full Claude Code session transcripts for the triage and review
|
|
147
159
|
phases. This is advisory/auditability only: it is never read by the comment job and never affects
|
|
148
160
|
what gets posted.
|