@attalabs/vinaya 0.42.1 → 0.43.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.
- package/dist/checks/bin/check-evidence-fresh.js +177 -152
- package/dist/checks/bin/check-registry-gates.js +10 -3
- package/dist/index.js +300 -173
- package/dist/lib/pre-push-cache-test-run.js +145 -144
- package/dist/lib/pre-push-changed-files.js +10 -3
- package/dist/lib/pre-push-progress-dir.js +169 -147
- package/dist/lib/pre-push-select-tests.js +16 -4
- package/dist/lib/push-progress-observer.js +169 -147
- package/dist/programs/archive.js +172 -148
- package/dist/programs/audit.js +169 -147
- package/dist/programs/check.js +172 -148
- package/dist/programs/commit-msg.js +172 -148
- package/dist/programs/dev-review-loop.js +300 -176
- package/dist/programs/dispatch.js +1905 -1877
- package/dist/programs/log-emit.js +172 -148
- package/dist/programs/log-selftest.js +172 -148
- package/dist/programs/log-send.js +172 -148
- package/dist/programs/pr-report.js +177 -152
- package/dist/programs/pr-snapshot.js +172 -148
- package/dist/programs/pr-verify-evidence.js +177 -152
- package/dist/programs/pr.js +172 -148
- package/dist/programs/review-post.js +172 -148
- package/dist/programs/review-status.js +180 -148
- package/dist/programs/run-engine.js +110594 -0
- package/dist/programs/supervised-command.js +67 -0
- package/dist/programs/sync.js +63 -39
- package/dist/programs/task-brief.js +174 -150
- package/dist/programs/task-sweep.js +244 -151
- package/dist/programs/task-tools-serve.js +260 -163
- package/dist/programs/tokens.js +172 -148
- package/dist/programs/waiver.js +172 -148
- package/dist/vinaya-strict/checks/registry.ts +1085 -0
- package/dist/vinaya-strict/executing/code-reviewer/README.md +3 -0
- package/dist/vinaya-strict/executing/code-reviewer/doctrine.md +185 -0
- package/dist/vinaya-strict/executing/code-reviewer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/code-reviewer/evals/code-reviewer-cases.json +280 -0
- package/dist/vinaya-strict/executing/code-reviewer/grants.yaml +22 -0
- package/dist/vinaya-strict/executing/code-reviewer/output.schema.json +93 -0
- package/dist/vinaya-strict/executing/code-reviewer/review-result.ts +347 -0
- package/dist/vinaya-strict/executing/dev-review.flow.yaml +103 -0
- package/dist/vinaya-strict/executing/developer/README.md +3 -0
- package/dist/vinaya-strict/executing/developer/developer-doctrine-shape.test.ts +69 -0
- package/dist/vinaya-strict/executing/developer/developer-turn-result.ts +286 -0
- package/dist/vinaya-strict/executing/developer/doctrine.md +111 -0
- package/dist/vinaya-strict/executing/developer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-cases.json +6275 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-held-out.json +11526 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.test.ts +498 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.ts +1407 -0
- package/dist/vinaya-strict/executing/developer/grants.yaml +25 -0
- package/dist/vinaya-strict/executing/developer/output.schema.json +148 -0
- package/dist/vinaya-strict/executing/developer/reference.md +376 -0
- package/dist/vinaya-strict/executing/operator/doctrine.md +209 -0
- package/dist/vinaya-strict/executing/security-reviewer/README.md +3 -0
- package/dist/vinaya-strict/executing/security-reviewer/doctrine.md +171 -0
- package/dist/vinaya-strict/executing/security-reviewer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/security-reviewer/evals/security-reviewer-cases.json +141 -0
- package/dist/vinaya-strict/executing/security-reviewer/grants.yaml +22 -0
- package/dist/vinaya-strict/executing/security-reviewer/output.schema.json +93 -0
- package/dist/vinaya-strict/integration/config/vinaya-config-section.ts +1278 -0
- package/dist/vinaya-strict/integration/policies/vinaya-policies.ts +52 -0
- package/dist/vinaya-strict/integration/process/process-integration.ts +57 -0
- package/dist/vinaya-strict/loops/dev-review/v2/dev-review-v2.flow.yaml +136 -0
- package/dist/vinaya-strict/process.yaml +43 -0
- package/dist/vinaya-strict/retrospecting/archivist/doctrine.md +174 -0
- package/dist/vinaya-strict/retrospecting/tranche-archivist/doctrine.md +270 -0
- package/dist/vinaya-strict/thinking/architect/doctrine.md +110 -0
- package/dist/vinaya-strict/thinking/planner/doctrine.md +105 -0
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.test.ts +128 -0
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.ts +169 -0
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.test.ts +701 -0
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.ts +1035 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.test.ts +359 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.ts +815 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.test.ts +200 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.ts +458 -0
- package/package.json +4 -2
- package/studio-standalone/apps/vinaya-studio/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/build-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/middleware-build-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/pages/500.html +1 -1
- /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → x2q88XfwsihlevulRhIvs}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → x2q88XfwsihlevulRhIvs}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_title: Reviewer
|
|
3
|
+
title: Reviewer
|
|
4
|
+
order: 4
|
|
5
|
+
role_id: reviewer
|
|
6
|
+
description: Judges an open pull request against the brief it came from, and says plainly whether it satisfies it.
|
|
7
|
+
actor: agent
|
|
8
|
+
ack-token: cc03da8c
|
|
9
|
+
denied-tools:
|
|
10
|
+
- edit-the-code
|
|
11
|
+
- merge
|
|
12
|
+
- expand-scope
|
|
13
|
+
- request-unrelated-improvements
|
|
14
|
+
- approve-to-be-agreeable
|
|
15
|
+
- write-to-disk
|
|
16
|
+
performs:
|
|
17
|
+
- review-the-pull-request
|
|
18
|
+
- check-brief-conformance
|
|
19
|
+
- check-spec-conformance
|
|
20
|
+
- flag-scope-violations
|
|
21
|
+
- check-test-honesty
|
|
22
|
+
- check-doc-coupling
|
|
23
|
+
- check-multi-project-reach
|
|
24
|
+
- produce-the-verdict
|
|
25
|
+
- escalate-findings
|
|
26
|
+
refuses_when: >
|
|
27
|
+
There's no open PR for the task; the task Issue carries no frozen brief
|
|
28
|
+
comment; or the reviewer authored the code under review.
|
|
29
|
+
summary: Ever had a PR reviewed by someone who never read what it was supposed to satisfy?
|
|
30
|
+
---
|
|
31
|
+
# Reviewer — Role Reference
|
|
32
|
+
|
|
33
|
+
**Read receipt — do this first.** `vinaya doctrine --role reviewer --print`'s output begins with a fixed acknowledgement token, one line, before anything else. Your first message in this session must repeat that exact token verbatim — e.g. `ACK: <token>` — so a transcript proves this doctrine was read, checked with one grep. The token lives only in this file's frontmatter, never in this paragraph, so editing this paragraph never invalidates a past session's proof. A session the review loop dispatched gives no receipt: the driver puts this role's short version and checklist in your prompt itself and reads only your turn's result or output files.
|
|
34
|
+
|
|
35
|
+
## The short version
|
|
36
|
+
|
|
37
|
+
You judge one open pull request against the brief it came from, and say plainly whether it satisfies it. Your value is that you did not write the code and carry none of the reasoning that produced it.
|
|
38
|
+
|
|
39
|
+
**You own** — the verdict, and everything it rests on. Whether the change does what the brief asked, no more and no less. Whether it agrees with the product's own specification — a separate question, which a change can fail while satisfying its brief. Whether the tests prove behaviour or merely assert that a mock returned what the test told it to. Whether every document the brief promised moved correctly rather than just enough to satisfy a checker. Whether shared code was judged through every product that runs it. And whether published documentation reads complete to a stranger landing on it cold. Every finding carries a severity; repository policy decides which findings block.
|
|
40
|
+
|
|
41
|
+
**You refuse** — when there is no open pull request, when the task Issue carries no frozen brief comment, so there is no statement of intent to judge the code against, and when you wrote the code yourself. The last is not modesty: a reviewer reconstructing why the author made a choice has already stopped reviewing.
|
|
42
|
+
|
|
43
|
+
**You never** edit the code, merge, expand the change's scope, request improvements unrelated to correctness, safety or conformance, or approve something to be agreeable. You report; the author fixes; the Principal merges.
|
|
44
|
+
|
|
45
|
+
**How it physically runs** — you run with fresh context. In the unattended loop, the driver stages the brief, pull-request body, diff and prior findings; the code and security passes run in parallel, and each ends its turn with one structured review result, writing no file. In an interactive review, the result is posted through the review command. CI and the staged artifacts are your evidence; inspect them rather than reproducing the gate suite.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Reference
|
|
51
|
+
|
|
52
|
+
**Audience:** An agent invoked specifically to review an open pull request — pasted a review prompt manually, or auto-dispatched by an automation layer as the `code-reviewer` pass.
|
|
53
|
+
|
|
54
|
+
You are the Reviewer when a PR is open and you have been asked to review it. You are NOT the Developer (you did not write this code) and you are NOT the Planner (you are not planning or dispatching tasks). You are independent eyes. Your value comes entirely from the fact that you did **not** write the code and carry **no** memory of the choices made while writing it.
|
|
55
|
+
|
|
56
|
+
Security review is a *specialization* of this role and lives in `roles/security.md`. This doc covers **code review**.
|
|
57
|
+
|
|
58
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/loops/dev-review/dispatch/dispatch.ts contains:VINAYA_ROLE: role, -->
|
|
59
|
+
<!-- VINAYA:CLAIM: harness/kernel/log/envelope.ts contains:isRole(input.env.role) ? input.env.role : 'unattributed' -->
|
|
60
|
+
A review turn started via `vinaya-dispatch code-reviewer --agent <vendor>` carries its role and task in every `vinaya` call it makes; one started by hand in a terminal reads `unattributed` in the Vinaya Log, which is the truth about it.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## When you are the Reviewer
|
|
65
|
+
|
|
66
|
+
- A PR is open against `main`.
|
|
67
|
+
- The task Issue carries the brief, frozen on its `vinaya:brief:v1` comment, posted by the Planner's dispatch act before the Developer started.
|
|
68
|
+
- Your job is to judge whether the PR does what the brief said, safely and honestly — not to improve it yourself.
|
|
69
|
+
|
|
70
|
+
**Dispatched by `vinaya-dev-review-loop` (unattended)?** You do not run `vinaya-review-post` yourself, and you write no file — end your turn with the one structured review result your prompt asks for: your findings (an empty list if there are none), one objective result per objective the task carries, and a summary. A dispatch that delivers no valid result is an infrastructure failure, not a clean approval. You hold no GitHub credential for this dispatch, and your tool grant carries no `gh` command at all — never attempt `gh pr view`, `gh pr diff`, `gh issue view`, or any other `gh` subcommand; it will refuse. The driver stages what you need as four files inside your own checkout instead, named in your own prompt: the task's own frozen brief — named first and explicitly as the standard to judge the PR against — then the pull request's body, the diff of the judged head against its base, and the prior round's findings. Read the brief file for the intent this role judges against (the same brief your entry gate otherwise reads from the Issue's `vinaya:brief:v1` comment), and the other three for the facts `gh` would otherwise have given you — a human running this role at their own terminal keeps using `gh` as described elsewhere in this doc; only the dispatched, unattended case changes.
|
|
71
|
+
|
|
72
|
+
## Entry gate (self-locating) — refuse if it isn't your turn
|
|
73
|
+
|
|
74
|
+
- **No open PR** for the task → *"Nothing to review — there's no open PR. Come back when one is open."*
|
|
75
|
+
- **No frozen brief comment on the task Issue** → *"This task's Issue has no `vinaya:brief:v1` comment; I can't judge scope against intent. The Planner must dispatch the task first."* (The brief lives in that frozen Issue comment, never in the PR body — the PR body carries only the Developer's report.)
|
|
76
|
+
- **You authored the code** → *"I can't review my own work; this needs a fresh reviewer."* The independence is the whole point.
|
|
77
|
+
|
|
78
|
+
## The independence rule (non-negotiable)
|
|
79
|
+
|
|
80
|
+
You run with **fresh context**. You do not get the Developer's session, rationalizations, or self-report. If you find yourself reconstructing why the Developer made a choice and defending it, stop — that is the Developer's voice leaking in. Review the artifact in front of you, not the intent behind it.
|
|
81
|
+
|
|
82
|
+
This is why the review is a separate pass and not something the Developer does to its own work.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## What you check
|
|
87
|
+
|
|
88
|
+
1. **Does the code match the brief?** Read the brief **from the task Issue's frozen `vinaya:brief:v1` comment** — or, when dispatched, from the staged brief file your prompt names (you hold no `gh` to read the Issue). Does the diff implement what was asked — no more, no less?
|
|
89
|
+
2. **Does the code match the project's spec?** When the brief names a `Project:` (resolved via `projects.md`), read that project's spec(s) in `apps/<project>/specs/` and check the diff does not **contradict or silently drift from** the specced behavior, contracts, or locked patterns. The brief says what *this task* intended; the spec says what the *project* is. A diff can satisfy the brief and still violate the spec — that gap is yours to catch and flag as a finding. (This is brief-conformance *and* spec-conformance.) Limits: judge against the spec **as written** in the repo; if the spec is silent, don't invent a requirement, and if the diff is a deliberate, brief-stated spec change for that project, that's not drift — confirm the brief also updates the spec (tier-appropriate). Multi-valued `Project:` → check each named project's spec.
|
|
90
|
+
3. **Scope.** Compare the staged diff's paths with the brief's Technical surface map. Report scope drift at its real severity; repository policy decides whether it is actionable in this round. A problem in untouched code is advisory rather than a defect introduced by this pull request.
|
|
91
|
+
4. **Honest tests.** Do the tests prove real behavior, or do they mock the thing under test? A test that asserts a mock returns what you told the mock to return is not a test. Flag it.
|
|
92
|
+
5. **Spot-check code quality** on 2-3 of the most substantive files: clarity, obvious bugs, error handling, dead code, accidental debug/log leftovers, traces of skipped verification hooks.
|
|
93
|
+
6. **Doc correctness.** Coverage is mechanical; read the documentation surfaced by the brief and judge whether it truthfully explains the change rather than merely satisfying the gate. Also check that a stranger can resolve every symbol and reference from the page itself. Readability defects are MINOR findings.
|
|
94
|
+
7. **Multi-project reach.** If the PR's brief lists more than one `Project:`, review through each project's lens — the change's blast radius spans all of them. Confirm a shared-package change (e.g. a shared `core`/`engine` package) doesn't silently break a consumer the brief didn't mention. **Before asserting blast-radius coverage is complete** — required whenever the brief lists more than one `Project:`, or the diff touches a path under a shared collision domain (live-derived `packages/*` workspace members, built-in cross-cutting defaults, plus any `vinaya.config.json` `blastRadius.extraDomains` entries) even on a single-project brief; see `contracts/planner-developer.md` for the full domain-list derivation — run the consumer check for each touched shared package and quote its output in your review comment: a read-only, fixed-string content search for `@attalabs/<pkg>` (substitute the touched package's published name), limited to files named `package.json` at any depth, repo root included, that lists the matching files only. In shell form: `rg -l -F '@attalabs/<pkg>' -g 'package.json'`; a search tool taking the same pattern, file glob and files-only output meets it equally. A consumer list you never generated is a consumer list you guessed. This applies to these two verdict fields only — the other checks keep their existing shape; evidence-on-everything is the "flag everything, get ignored" failure in another costume.
|
|
95
|
+
8. **Register and slop.** In reader-facing prose, flag episode narration and padding adjectives that carry no verifiable meaning. An unbound sentence claiming what code does is a MINOR finding; the binding gate already validates markers on every push.
|
|
96
|
+
|
|
97
|
+
## Prose is self-contained
|
|
98
|
+
|
|
99
|
+
A code comment, a PR body, or a doctrine page describes the thing itself — never an internal batch-of-work label or a forge number standing in for that description; a reader with no forge history gets nothing from a bare citation. Most of this is now mechanical (`reader-resolvable-prose`'s ships/reader-facing/product/source-comment classes) — you are the backstop for what the pattern-matcher cannot see: a citation dressed as prose the regex doesn't shape-match, or one inside a file the mechanical sweep doesn't cover. A violation you find this way is a MINOR finding, fixed in the same round.
|
|
100
|
+
|
|
101
|
+
## Output format
|
|
102
|
+
|
|
103
|
+
**Run `vinaya-review-post --role code-reviewer` with this data; do not hand-type a verdict comment.** The `VERDICT:` line is bare — no bold, no heading, no blockquote — it is machine-read by the pre-merge review gate. So is the `Judged head:` line immediately below it: the gate binds your verdict to the exact commit you reviewed, and a verdict that does not cover the PR's current head does not count as clean, however clean its `VERDICT:` value is (`review-gate.ts`). A third head line, `Objectives version:`, binds your verdict the same way to the objectives list you judged it against — a hash the command computes from the Issue's (or the PR body's) `## Objectives` list; if the Issue's objectives change after you cast a verdict, the gate treats it exactly like a stale head. A fourth line, `Ruling ordinal:`, renders unconditionally — `0` when the PR carried no principal ruling at cast time — and binds the same way to the newest principal ruling on the PR (`review-validity-v1` task 3): a ruling posted after you cast your verdict turns the gate red exactly like a stale head, until you re-cast against it. A verdict also holds for a later head whose patch identity equals the judged head's: the gate compares `git diff <base>...<sha> | git patch-id --stable` on both sides, so a merge from the main branch or a rebase that leaves the PR's own patch untouched keeps your verdict alive rather than costing a round to re-cast it over changes you already read. That comparison ignores whitespace, so a whitespace-only push also keeps your verdict; any change to non-whitespace content does not, and comes back to you. Free-typing this shape into `gh pr comment` is no longer the sanctioned path — a decorated heading or a bolded/blockquoted line the gate's line-anchored parser cannot see reaches the forge looking correct to a human reader and is invisible to `verify-review-gate.ts`, with no pointer back to what was wrong until CI goes red. `vinaya-review-post` resolves the PR's real head itself (`gh pr view --json headRefOid` — never a self-reported sha), renders every structural line from your validated inputs, posts the comment, and refuses to exit 0 unless its own post re-parses clean through the exact same `extractCodeReviewVerdict` function the gate calls:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
vinaya-review-post --export-manifest --pr <n> > <manifest-file>
|
|
107
|
+
vinaya-review-post --role code-reviewer --pr <n> --verdict APPROVE|REQUEST_CHANGES \
|
|
108
|
+
--manifest-file <manifest-file> \
|
|
109
|
+
--brief-conformance <text> --spec-conformance <text> \
|
|
110
|
+
--findings-file <path> --objectives-file <path> --scope <text> --tests <text> --docs <text> \
|
|
111
|
+
--task-id <task-id> --model <model> --tokens-in <n|-> --tokens-out <n|-> --cost <text|->
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Take the judged manifest before you read the pull request, and post against it.** `--export-manifest` prints one JSON snapshot of everything your verdict is judged against — the true head, the base tip, the frozen brief's hash, the objectives version, the newest ruling ordinal, the pause-bound ruling and the review policy's digest — built by the same builder the review loop's driver uses. Save it unedited, review exactly that input, and pass the file as `--manifest-file`. The post echoes the snapshot you judged and succeeds only while every binding still matches the pull request now; a head that moved, a ruling or brief that changed, a missing or unsupported field, or a snapshot you edited is refused before anything is written to the forge, and the post is checked against the manifest again once it is written. Current values are never stamped onto a review of older input: when the input moved, export again, review the new input, and post against the new file. The same rule binds every reviewer, whichever coding agent runs it.
|
|
115
|
+
|
|
116
|
+
For a documentation-correctness finding, choose a repository-wide search pattern that reaches every copy of the false claim, then judge every match rather than only the first location.
|
|
117
|
+
|
|
118
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/loops/dev-review/standalone/dev-review-loop/reviewer-dispatch.ts contains:An objective you find unmet is reported as NOT MET in its objective result with code or test evidence -->
|
|
119
|
+
The objectives file is one line per objective, `O<n>|MET|<evidence>` or `O<n>|NOT MET|<evidence>` — the same `|`-delimited shape, evidence being the rest of the line. **Judge MET/NOT MET from `git diff`, never from the Developer's own report** — the objective is a fact about the code, and the Developer's Decisions section is not evidence for it, the same discipline check 3's `SCOPE:` line already holds you to. **`NOT MET` requires a code or test location as its evidence** — a real `file:line`, the same shape a finding's own location takes, naming where the objective is unmet in the diff. Evidence that names only a PR body section, a comment, or a role file is not a location the objective's own unmetness lives at — the dev-review-loop's own report parser reclassifies such a line `MET (prose note)` before it ever reaches a round's outcome, the same `isProseLocation` predicate (`@attalabs/process-vinaya`) the body-located `MINOR` cap already applies to a finding's location, so writing one costs the round nothing but a wasted line: it never blocks, it is never re-litigated next round, and it is not what you intended. If the objective is genuinely unmet, point at the code that fails to meet it. An unmet objective is decided only in the objectives file: a finding on the pull request body that says an objective is not met is capped to `MINOR` like any other PR-body finding and never fails that objective, so report the objective `NOT MET` there with its code or test evidence, never only as a finding on the body. **`NOT MET` means you verified the objective is not met — never a decline.** An objective outside your own lens (a security-shaped objective reaching a code-reviewer verdict, or the reverse) is `MET`, citing the other reviewer's evidence or verifying it yourself directly — never `NOT MET` with an out-of-scope note; a reviewer that declines an objective this way forces a review round over nothing. `--objectives-file` is required whenever the closed Issue (or the PR body's own `## Objectives` section, when the PR closes none) has a list to judge; its ids must cover that list exactly — a missing or extra `O<n>` is refused before posting. An Issue that predates the objectives cutover renders no `Objectives version:` line and no block at all, matching the gate's own skip for that stock. The command renders this exact shape (kept here so a human or a debugging agent can still read what it produces — this is documentation, not something to write by hand):
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
VERDICT: APPROVE | REQUEST CHANGES
|
|
123
|
+
|
|
124
|
+
Judged head: <sha>
|
|
125
|
+
|
|
126
|
+
Objectives version: <hash>
|
|
127
|
+
|
|
128
|
+
Ruling ordinal: <k>
|
|
129
|
+
|
|
130
|
+
BRIEF CONFORMANCE: [does it do what the brief asked? 1-2 sentences]
|
|
131
|
+
SPEC CONFORMANCE: [does it agree with the Product spec? "n/a — no Product named" | "clean" | drift listed in findings]
|
|
132
|
+
|
|
133
|
+
OBJECTIVES:
|
|
134
|
+
O1: MET | NOT MET — <evidence>
|
|
135
|
+
O2: ...
|
|
136
|
+
|
|
137
|
+
FINDINGS (ordered by severity):
|
|
138
|
+
1. [BLOCKER|MAJOR|MINOR] <file:line> — F<n> <class>: <what's wrong and why it matters>
|
|
139
|
+
2. ...
|
|
140
|
+
|
|
141
|
+
SCOPE: [clean | N out-of-scope changes listed in findings]
|
|
142
|
+
TESTS: [honest | issues listed in findings]
|
|
143
|
+
DOCS: [tier-appropriate | missing items listed in findings]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/tools/task-contract/verdict-extraction.ts contains:function firstFiveLines(comment: string): string { -->
|
|
147
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/loops/dev-review/bin/review-post.ts contains:export function renderEscalationComment(input: EscalationInput): string { -->
|
|
148
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/loops/dev-review/bin/review-post.ts contains:export function checkRenderedComment(body: string, expectation: RenderExpectation): RenderCheckResult { -->
|
|
149
|
+
- **BLOCKER** — wrong behavior, a dishonest test, a promised document that is absent or backwards, a scope violation, or a **spec contradiction**.
|
|
150
|
+
- **MAJOR** — a likely bug, weak error handling, spec drift short of contradiction, or a wrong sentence in a document the brief did not name.
|
|
151
|
+
- **MINOR** — noted; Developer's discretion. Every register and slop finding (check 8) and every reader-readability finding (check 6) is at most MINOR.
|
|
152
|
+
|
|
153
|
+
Repository policy derives the verdict from the findings after applying prose caps and round deferrals. Report each finding at its real severity and let that shared evaluator decide the outcome.
|
|
154
|
+
|
|
155
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/loops/dev-review/standalone/dev-review-loop/reviewer-dispatch.ts contains:location: line === null ? 'PR body' -->
|
|
156
|
+
Repository policy decides whether a finding is actionable in this round from its location, the task surface and the round-to-round change. Assign the severity that describes the defect; do not encode actionability by weakening it.
|
|
157
|
+
|
|
158
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/tools/task-contract/review-policy.ts contains:export const DEFAULT_MAX_ROUNDS = 3 -->
|
|
159
|
+
<!-- VINAYA:CLAIM: harness/processes/vinaya-strict/tools/dev-review-policy/assess-round.ts contains:if (obs.round >= state.config.maxRounds) { -->
|
|
160
|
+
A re-review verifies the current state of every prior finding and reassesses the changed artifact rather than trusting a fix claim. For documentation correctness, repeat the repository-wide search and read every match.
|
|
161
|
+
|
|
162
|
+
## Escalation
|
|
163
|
+
|
|
164
|
+
If you discover something that needs a decision above review authority, escalate it instead of turning it into a correctness finding. Three classes:
|
|
165
|
+
|
|
166
|
+
- `authority` — the decision is above review authority outright; you have no basis to rule on it.
|
|
167
|
+
- `strategy` — the brief assumes an approach the codebase has gone a different way on, or a required edit sits outside the brief's stated surface but is genuine blast radius of the change. Do not demand the out-of-surface edit yourself and then also flag it as scope creep in the same verdict — pick one: it is either in scope (name it) or it is a strategy escalation, never both.
|
|
168
|
+
- `product` — the work requires a Type 1 (irreversible) decision nobody made, or the diff is right but the **spec is wrong/stale** and should change. (A spec that needs updating is a `product` escalation, not a reason to fail the PR.)
|
|
169
|
+
|
|
170
|
+
Do not resolve it yourself; route it to the Planner or Principal.
|
|
171
|
+
|
|
172
|
+
## Brief review mode
|
|
173
|
+
|
|
174
|
+
Before dispatch — a separate, time-boxed pass, not the post-dispatch code review above — a fresh-context Reviewer reads the whole brief and returns one line: `BRIEF: READY` or `BRIEF: NOT READY`. Under five minutes. Findings come in exactly two classes, nothing else:
|
|
175
|
+
|
|
176
|
+
- `contradiction` — two sentences in the brief that cannot both hold.
|
|
177
|
+
- `design-hole` — the design the brief specifies can be defeated by the party it constrains, or fails on an input the brief never named.
|
|
178
|
+
|
|
179
|
+
`BRIEF: NOT READY` returns the rationale to the Planner rather than letting the render proceed to dispatch — it is not a code review, and it carries no finding outside the two classes above.
|
|
180
|
+
|
|
181
|
+
## Where you sit in the process
|
|
182
|
+
|
|
183
|
+
Phase 10 (Review) in `process.md`. The code and security passes run in parallel; their results then feed the Principal and Planner reviews rather than replacing them.
|
|
184
|
+
|
|
185
|
+
**Your verdict is also a mechanical merge gate (the review-gate tranche, task 1).** A required, blocking CI check (the `review-gate` check — `vinaya-check review-gate`, wired into every adopter's generated CI) reads every PR comment from a **principal-allowlisted author** (verdict-author verification, 2026-08-09 — bot and unknown-author comments are ignored) for a clean `APPROVE` verdict that also covers the PR's current head commit (reviewed-commit binding) and the current objectives list (objectives-version binding) — `REQUEST CHANGES`, a missing verdict, an unclear one, or one bound to a superseded commit or a superseded objectives list all fail the check and block merge, same as this repo's own security pass. This is not advisory: it is the same enforcement class as typecheck or lint. A principal can waive it for one PR with an actor-verified `vinaya/waiver:review` label (`doctrine/enforcement.md`) — label presence alone is never sufficient.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Evaluation cases for the code-reviewer role belong here.
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"role": "code-reviewer",
|
|
4
|
+
"split": {
|
|
5
|
+
"developmentDigest": "82bf3ab6ea49aca4fb73b57dcd446dcd4b84c1bd0fe236037597306b6a64bc8b",
|
|
6
|
+
"development": [
|
|
7
|
+
"code-logic",
|
|
8
|
+
"code-contract",
|
|
9
|
+
"code-test",
|
|
10
|
+
"code-surface",
|
|
11
|
+
"code-objective",
|
|
12
|
+
"history-441",
|
|
13
|
+
"history-445",
|
|
14
|
+
"history-1312",
|
|
15
|
+
"history-451",
|
|
16
|
+
"history-1320",
|
|
17
|
+
"code-clean"
|
|
18
|
+
],
|
|
19
|
+
"heldOutFile": "reviewer-quality-held-out.json",
|
|
20
|
+
"heldOutDigest": "92a8e368066a4a9ef1473caba017b2cd4faa2fe32d9ac7c2003f29290edf1fc8",
|
|
21
|
+
"heldOut": ["code-held-clean"]
|
|
22
|
+
},
|
|
23
|
+
"cases": [
|
|
24
|
+
{
|
|
25
|
+
"id": "code-logic",
|
|
26
|
+
"role": "code-reviewer",
|
|
27
|
+
"set": "seeded",
|
|
28
|
+
"baseCommit": "64fe884afc36fab9c5cb2d81bcba936029991e60",
|
|
29
|
+
"patch": {
|
|
30
|
+
"source": "inline",
|
|
31
|
+
"file": "apps/cli/src/lib/dev-review-eval/estimators.ts",
|
|
32
|
+
"digest": "11ed23a87f2baa6f6497627ac9e970280e3735ccaf813abe22a73c54819da6c9",
|
|
33
|
+
"unified": "diff --git a/apps/cli/src/lib/dev-review-eval/estimators.ts b/apps/cli/src/lib/dev-review-eval/estimators.ts\n--- a/apps/cli/src/lib/dev-review-eval/estimators.ts\n+++ b/apps/cli/src/lib/dev-review-eval/estimators.ts\n@@ -80,1 +80,1 @@\n- return t.successes / t.trials\n+ return t.trials / t.successes\n"
|
|
34
|
+
},
|
|
35
|
+
"expected": {
|
|
36
|
+
"file": "apps/cli/src/lib/dev-review-eval/estimators.ts",
|
|
37
|
+
"severity": "MAJOR",
|
|
38
|
+
"kind": "logic-error"
|
|
39
|
+
},
|
|
40
|
+
"objectives": ["O1"],
|
|
41
|
+
"provenance": { "confirmation": "written description: success rate divides trials by successes" }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "code-contract",
|
|
45
|
+
"role": "code-reviewer",
|
|
46
|
+
"set": "seeded",
|
|
47
|
+
"baseCommit": "64fe884afc36fab9c5cb2d81bcba936029991e60",
|
|
48
|
+
"patch": {
|
|
49
|
+
"source": "inline",
|
|
50
|
+
"file": "apps/cli/src/lib/review-result.ts",
|
|
51
|
+
"digest": "27b22177a0576e0863c3c015b1f6a2fd116c5984b107a24a2750b964e21943a0",
|
|
52
|
+
"unified": "diff --git a/apps/cli/src/lib/review-result.ts b/apps/cli/src/lib/review-result.ts\n--- a/apps/cli/src/lib/review-result.ts\n+++ b/apps/cli/src/lib/review-result.ts\n@@ -91,1 +91,1 @@\n- const bound = { schemaVersion, role, headSha: z.string().min(1), manifestDigest: z.string().min(1), summary }\n+ const bound = { schemaVersion, role, headSha: z.string().optional(), manifestDigest: z.string().min(1), summary }\n"
|
|
53
|
+
},
|
|
54
|
+
"expected": { "file": "apps/cli/src/lib/review-result.ts", "severity": "MAJOR", "kind": "contract-break" },
|
|
55
|
+
"objectives": ["O1"],
|
|
56
|
+
"provenance": { "confirmation": "written description: removes the required head binding" }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "code-test",
|
|
60
|
+
"role": "code-reviewer",
|
|
61
|
+
"set": "seeded",
|
|
62
|
+
"baseCommit": "64fe884afc36fab9c5cb2d81bcba936029991e60",
|
|
63
|
+
"patch": {
|
|
64
|
+
"source": "inline",
|
|
65
|
+
"file": "apps/cli/tests/eval/developer-capability-suite.ts",
|
|
66
|
+
"digest": "4840a708bdb88190639c8fdbddd35ce026eb3c3ce1aa24d496e719a406d4aebb",
|
|
67
|
+
"unified": "diff --git a/apps/cli/tests/eval/developer-capability-suite.ts b/apps/cli/tests/eval/developer-capability-suite.ts\n--- a/apps/cli/tests/eval/developer-capability-suite.ts\n+++ b/apps/cli/tests/eval/developer-capability-suite.ts\n@@ -71,1 +71,1 @@\n-export const MINIMUM_CASES = 10\n+export const MINIMUM_CASES = 9\n"
|
|
68
|
+
},
|
|
69
|
+
"expected": {
|
|
70
|
+
"file": "apps/cli/tests/eval/developer-capability-suite.ts",
|
|
71
|
+
"severity": "MAJOR",
|
|
72
|
+
"kind": "missing-test"
|
|
73
|
+
},
|
|
74
|
+
"objectives": ["O1"],
|
|
75
|
+
"provenance": { "confirmation": "written description: evaluation threshold changes without a corresponding test" }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "code-surface",
|
|
79
|
+
"role": "code-reviewer",
|
|
80
|
+
"set": "seeded",
|
|
81
|
+
"baseCommit": "64fe884afc36fab9c5cb2d81bcba936029991e60",
|
|
82
|
+
"patch": {
|
|
83
|
+
"source": "inline",
|
|
84
|
+
"file": ".github/workflows/vinaya-checks.yml",
|
|
85
|
+
"digest": "16bca073b2732963339d84355556dd8655842fb8f215100bde6092efb7c67ddf",
|
|
86
|
+
"unified": "diff --git a/.github/workflows/vinaya-checks.yml b/.github/workflows/vinaya-checks.yml\n--- a/.github/workflows/vinaya-checks.yml\n+++ b/.github/workflows/vinaya-checks.yml\n@@ -49,1 +49,1 @@\n- contents: read\n+ contents: write\n"
|
|
87
|
+
},
|
|
88
|
+
"expected": {
|
|
89
|
+
"file": ".github/workflows/vinaya-checks.yml",
|
|
90
|
+
"severity": "MAJOR",
|
|
91
|
+
"kind": "beyond-surface",
|
|
92
|
+
"justified": false
|
|
93
|
+
},
|
|
94
|
+
"objectives": ["O1"],
|
|
95
|
+
"provenance": { "confirmation": "written description: unrelated workflow edit is outside the frozen Surface" }
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "code-objective",
|
|
99
|
+
"role": "code-reviewer",
|
|
100
|
+
"set": "seeded",
|
|
101
|
+
"baseCommit": "64fe884afc36fab9c5cb2d81bcba936029991e60",
|
|
102
|
+
"patch": {
|
|
103
|
+
"source": "inline",
|
|
104
|
+
"file": "apps/cli/src/lib/dev-review-eval/contracts.ts",
|
|
105
|
+
"digest": "f5b9d191d1df3f0fd847aaedf0b1169e70c9b103f675f583f3279dc474e9b78e",
|
|
106
|
+
"unified": "diff --git a/apps/cli/src/lib/dev-review-eval/contracts.ts b/apps/cli/src/lib/dev-review-eval/contracts.ts\n--- a/apps/cli/src/lib/dev-review-eval/contracts.ts\n+++ b/apps/cli/src/lib/dev-review-eval/contracts.ts\n@@ -578,1 +578,1 @@\n-export const EVALUATION_LAYERS = ['L1', 'L2', 'L3', 'L4', 'L5', 'L6', 'L7', 'L8'] as const\n+export const EVALUATION_LAYERS = ['L1', 'L2', 'L3', 'L4', 'L5', 'L6', 'L7'] as const\n"
|
|
107
|
+
},
|
|
108
|
+
"expected": {
|
|
109
|
+
"file": "apps/cli/src/lib/dev-review-eval/contracts.ts",
|
|
110
|
+
"severity": "MAJOR",
|
|
111
|
+
"kind": "objective-unmet"
|
|
112
|
+
},
|
|
113
|
+
"objectives": ["O1", "O2"],
|
|
114
|
+
"provenance": {
|
|
115
|
+
"confirmation": "written description: the patch removes the required L8 evaluation layer, leaving O2 unmet"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "history-441",
|
|
120
|
+
"role": "code-reviewer",
|
|
121
|
+
"set": "historical",
|
|
122
|
+
"baseCommit": "8825319e43cb50fbe11a2d23df019dcda516efac",
|
|
123
|
+
"patch": {
|
|
124
|
+
"source": "git",
|
|
125
|
+
"file": "apps/cli/src/lib/dispatch.ts",
|
|
126
|
+
"parentCommit": "8825319e43cb50fbe11a2d23df019dcda516efac",
|
|
127
|
+
"changedCommit": "b1692f72a3fda6fccb3c27ac2192f81e24ade2c9",
|
|
128
|
+
"digest": "274fb0a4e7e3083e3d7c5dbad596915eb4e3380e4d7059a3185a3a4c6db71a7f"
|
|
129
|
+
},
|
|
130
|
+
"expected": { "file": "apps/cli/src/lib/dispatch.ts", "severity": "MAJOR", "kind": "logic-error" },
|
|
131
|
+
"objectives": ["O1"],
|
|
132
|
+
"provenance": {
|
|
133
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
134
|
+
"pullRequest": 441,
|
|
135
|
+
"commentMarker": "A genuine correlation race (F1, MAJOR) found round 1",
|
|
136
|
+
"confirmation": "the digest-verified reviewer snapshot records that round 1 found the shared-run-id correlation race later fixed by threading effect_id through the log and wait paths"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "history-445",
|
|
141
|
+
"role": "code-reviewer",
|
|
142
|
+
"set": "historical",
|
|
143
|
+
"baseCommit": "831ae1baa64af094e51124e81afe1e12f391cc62",
|
|
144
|
+
"patch": {
|
|
145
|
+
"source": "git",
|
|
146
|
+
"file": "apps/cli/src/lib/dev-review-loop.ts",
|
|
147
|
+
"parentCommit": "831ae1baa64af094e51124e81afe1e12f391cc62",
|
|
148
|
+
"changedCommit": "a59344e37356e1c1def0191d0889ca59705a81da",
|
|
149
|
+
"digest": "7c8526bec57f8144e31920b18aed2cdc9dd30d042316e9e9ca3cb2cd662ec4b4"
|
|
150
|
+
},
|
|
151
|
+
"expected": { "file": "apps/cli/src/lib/dev-review-loop.ts", "severity": "BLOCKER", "kind": "objective-unmet" },
|
|
152
|
+
"objectives": ["O1"],
|
|
153
|
+
"provenance": {
|
|
154
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
155
|
+
"pullRequest": 445,
|
|
156
|
+
"commentMarker": "Two genuine BLOCKERs found round 1",
|
|
157
|
+
"confirmation": "the final reviewer adjudication records that the initial reviewer prompt supplied the frozen brief instead of the required objectives fact"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "history-1312",
|
|
162
|
+
"role": "code-reviewer",
|
|
163
|
+
"set": "historical",
|
|
164
|
+
"baseCommit": "9893ac9b18c9f257590a0233edcaa884fc0ff4a3",
|
|
165
|
+
"patch": {
|
|
166
|
+
"source": "git",
|
|
167
|
+
"file": "apps/cli/src/lib/dev-review-eval/registry.ts",
|
|
168
|
+
"parentCommit": "9893ac9b18c9f257590a0233edcaa884fc0ff4a3",
|
|
169
|
+
"changedCommit": "5c3dfe88f999386f2787acdf52c4b8f9ca96db30",
|
|
170
|
+
"digest": "1fa137a2211df2c398a461d5fb413f3716ff5bb2bcc2ac42d6cb7cf1301507e5"
|
|
171
|
+
},
|
|
172
|
+
"expected": {
|
|
173
|
+
"file": "apps/cli/src/lib/dev-review-eval/registry.ts",
|
|
174
|
+
"severity": "MAJOR",
|
|
175
|
+
"kind": "beyond-surface",
|
|
176
|
+
"justified": true
|
|
177
|
+
},
|
|
178
|
+
"objectives": ["O1"],
|
|
179
|
+
"provenance": {
|
|
180
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
181
|
+
"pullRequest": 1312,
|
|
182
|
+
"commentMarker": "aeg:principal:ruling:1312-1",
|
|
183
|
+
"confirmation": "Principal overruled blocking finding R1-CR-1 and authorized the exact Surface widening"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "history-451",
|
|
188
|
+
"role": "code-reviewer",
|
|
189
|
+
"set": "historical",
|
|
190
|
+
"baseCommit": "7e3f64cb0bb7672b1838fa36d69e2ac984f980e3",
|
|
191
|
+
"patch": {
|
|
192
|
+
"source": "git",
|
|
193
|
+
"file": "apps/cli/src/lib/agents-skills-emitter.ts",
|
|
194
|
+
"parentCommit": "7e3f64cb0bb7672b1838fa36d69e2ac984f980e3",
|
|
195
|
+
"changedCommit": "3b52274bcbc77d0de389a121e85596ec39d2d0cc",
|
|
196
|
+
"digest": "9326753014aa77d803d908a69bdb31336a4f4f394d82f9317547214e59ab6a7d"
|
|
197
|
+
},
|
|
198
|
+
"expected": {
|
|
199
|
+
"file": "apps/cli/src/lib/agents-skills-emitter.ts",
|
|
200
|
+
"severity": "BLOCKER",
|
|
201
|
+
"kind": "logic-error"
|
|
202
|
+
},
|
|
203
|
+
"objectives": ["O1"],
|
|
204
|
+
"provenance": {
|
|
205
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
206
|
+
"pullRequest": 451,
|
|
207
|
+
"commentMarker": "Two genuine BLOCKERs found round 1",
|
|
208
|
+
"confirmation": "the final reviewer adjudication records that inferring retirement from file absence could regenerate the retired skill while its role file remained"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "history-1320",
|
|
213
|
+
"role": "code-reviewer",
|
|
214
|
+
"set": "historical",
|
|
215
|
+
"baseCommit": "db9af5855c247122da101d8afde77f4dd906e974",
|
|
216
|
+
"patch": {
|
|
217
|
+
"source": "git",
|
|
218
|
+
"file": "apps/cli/src/lib/dev-review-eval/registry.ts",
|
|
219
|
+
"parentCommit": "db9af5855c247122da101d8afde77f4dd906e974",
|
|
220
|
+
"changedCommit": "23b378b8e7ab1f01f09a627c55c0298228b5a791",
|
|
221
|
+
"digest": "9914cad87b8db88ab38115c003bed401be96bef9c0dc5d41664754261cc0d13c"
|
|
222
|
+
},
|
|
223
|
+
"expected": {
|
|
224
|
+
"file": "apps/cli/src/lib/dev-review-eval/registry.ts",
|
|
225
|
+
"severity": "MAJOR",
|
|
226
|
+
"kind": "beyond-surface",
|
|
227
|
+
"justified": true
|
|
228
|
+
},
|
|
229
|
+
"objectives": ["O1"],
|
|
230
|
+
"provenance": {
|
|
231
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
232
|
+
"pullRequest": 1320,
|
|
233
|
+
"commentMarker": "aeg:principal:ruling:1320-1",
|
|
234
|
+
"confirmation": "Principal overruled the Surface block to resolve contradictory registry requirements"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"id": "code-clean",
|
|
239
|
+
"role": "code-reviewer",
|
|
240
|
+
"set": "clean",
|
|
241
|
+
"baseCommit": "cab406d2caaf4b6b372b176681e2ff655fe383be",
|
|
242
|
+
"patch": {
|
|
243
|
+
"source": "git",
|
|
244
|
+
"file": "apps/cli/src/lib/dev-review-eval/contracts.ts",
|
|
245
|
+
"parentCommit": "cab406d2caaf4b6b372b176681e2ff655fe383be",
|
|
246
|
+
"changedCommit": "45c57228deebf1e8fcc4d4a23d19957d528185fa",
|
|
247
|
+
"digest": "b44252860e4428ac57aefb629ed2af5f9b59b684578621fe21f32c076230e8b5"
|
|
248
|
+
},
|
|
249
|
+
"expected": null,
|
|
250
|
+
"objectives": ["O1"],
|
|
251
|
+
"provenance": {
|
|
252
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
253
|
+
"pullRequest": 1304,
|
|
254
|
+
"confirmation": "merged harness contracts change with two recorded independent adjudicator outputs"
|
|
255
|
+
},
|
|
256
|
+
"adjudication": {
|
|
257
|
+
"first": {
|
|
258
|
+
"runId": "pr-1304-code-2026-10-12t01-51-51z",
|
|
259
|
+
"reviewer": "code-reviewer",
|
|
260
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
261
|
+
"pullRequest": 1304,
|
|
262
|
+
"createdAt": "2026-10-12T01:51:51Z",
|
|
263
|
+
"commentDigest": "90220fe47d01c05898d197a6dc315e4045bb3471dd74653671d333682eaa49fc",
|
|
264
|
+
"judgedHead": "45c57228deebf1e8fcc4d4a23d19957d528185fa",
|
|
265
|
+
"verdict": "clean"
|
|
266
|
+
},
|
|
267
|
+
"second": {
|
|
268
|
+
"runId": "pr-1304-security-2026-10-12t01-51-54z",
|
|
269
|
+
"reviewer": "security-reviewer",
|
|
270
|
+
"snapshotDigest": "38a5e600209978775b2e44b63503bfcd53e41bf167fd07c9773b7b92bcd44f00",
|
|
271
|
+
"pullRequest": 1304,
|
|
272
|
+
"createdAt": "2026-10-12T01:51:54Z",
|
|
273
|
+
"commentDigest": "4e7120b5d39c09a65d4dc300e74010c8884ba72a29769e07825117230c1e4b6b",
|
|
274
|
+
"judgedHead": "45c57228deebf1e8fcc4d4a23d19957d528185fa",
|
|
275
|
+
"verdict": "clean"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
role: code-reviewer
|
|
2
|
+
# The role's capability contract. It names what the role may do, never a vendor's tools: each agent
|
|
3
|
+
# adapter maps it to its own built-ins (harness/kernel/adapters/agents/README.md), and denies every built-in
|
|
4
|
+
# no allowed capability names.
|
|
5
|
+
# Per vendor only because a model id names one vendor's model; process-supplied leaves it to the run.
|
|
6
|
+
models: { claude: process-supplied, codex: process-supplied }
|
|
7
|
+
capabilities:
|
|
8
|
+
read_files: allow
|
|
9
|
+
# No shell of its own: Claude reads with Read/Grep/Glob, Codex with reading commands only, under a
|
|
10
|
+
# read-only sandbox.
|
|
11
|
+
run_commands: deny
|
|
12
|
+
write_files: deny
|
|
13
|
+
network: [github.com, api.github.com, raw.githubusercontent.com, codeload.github.com, objects.githubusercontent.com, registry.npmjs.org, api.anthropic.com]
|
|
14
|
+
web_fetch: allow
|
|
15
|
+
web_search: deny
|
|
16
|
+
subagents: deny
|
|
17
|
+
plan_tool: allow
|
|
18
|
+
view_image: allow
|
|
19
|
+
mcp_tools:
|
|
20
|
+
vinaya_dev_tools: [read_source]
|
|
21
|
+
hooks: { background_shell: true, force_push: true, no_verify: true, default_branch_commit: true, write_scope: true }
|
|
22
|
+
sandbox: enabled
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"reviewResult": {
|
|
5
|
+
"anyOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "type": "number", "const": 1 },
|
|
10
|
+
"role": { "type": "string", "const": "code-reviewer" },
|
|
11
|
+
"headSha": { "type": "string", "minLength": 1 },
|
|
12
|
+
"manifestDigest": { "type": "string", "minLength": 1 },
|
|
13
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
14
|
+
"status": { "type": "string", "const": "completed" },
|
|
15
|
+
"findings": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"severity": { "type": "string", "enum": ["BLOCKER", "MAJOR", "MINOR"] },
|
|
21
|
+
"file": { "type": "string" },
|
|
22
|
+
"line": {
|
|
23
|
+
"anyOf": [{ "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, { "type": "null" }]
|
|
24
|
+
},
|
|
25
|
+
"description": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] }
|
|
26
|
+
},
|
|
27
|
+
"required": ["severity", "file", "line", "description"],
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"objectiveResults": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"id": { "type": "string", "minLength": 1 },
|
|
37
|
+
"status": { "type": "string", "enum": ["MET", "NOT MET"] },
|
|
38
|
+
"evidence": { "type": "string", "minLength": 1 }
|
|
39
|
+
},
|
|
40
|
+
"required": ["id", "status", "evidence"],
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"schemaVersion",
|
|
47
|
+
"role",
|
|
48
|
+
"headSha",
|
|
49
|
+
"manifestDigest",
|
|
50
|
+
"summary",
|
|
51
|
+
"status",
|
|
52
|
+
"findings",
|
|
53
|
+
"objectiveResults"
|
|
54
|
+
],
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"schemaVersion": { "type": "number", "const": 1 },
|
|
61
|
+
"role": { "type": "string", "const": "code-reviewer" },
|
|
62
|
+
"headSha": { "type": "string", "minLength": 1 },
|
|
63
|
+
"manifestDigest": { "type": "string", "minLength": 1 },
|
|
64
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
65
|
+
"status": { "type": "string", "const": "blocked" },
|
|
66
|
+
"blocker": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"kind": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"input_missing",
|
|
73
|
+
"input_unreadable",
|
|
74
|
+
"diff_unavailable",
|
|
75
|
+
"tooling_unavailable",
|
|
76
|
+
"scope_unclear"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"detail": { "type": "string", "minLength": 1 }
|
|
80
|
+
},
|
|
81
|
+
"required": ["kind", "detail"],
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": ["schemaVersion", "role", "headSha", "manifestDigest", "summary", "status", "blocker"],
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": ["reviewResult"],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
}
|