You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require current-head structured revision evidence for stale or non-approving kapi-agent reviews, with tests and documentation for the PR re-review workflow.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ Issue #37 is intentionally split into reviewable child slices: executable CLI se
103
103
104
104
### Review CLI Harness
105
105
106
-
`kapi-review github-pr` emits non-posting JSON for kapi-agent review/check automation and enforces local size, verification, stale-review revision explanation, structured approval-summary, and no-blocking-issues gates. GitHub merge enforcement for formal kapi-agent approval lives in `.github/workflows/kapi-agent-formal-approval-gate.yml`; require `require formal kapi-agent approval` plus `kapi-agent/review` in branch protection/rulesets.
106
+
`kapi-review github-pr` emits non-posting JSON for kapi-agent review/check automation and enforces local size, verification, stale-review revision explanation, structured approval-summary, and no-blocking-issues gates. GitHub merge enforcement for formal kapi-agent approval lives in `.github/workflows/kapi-agent-formal-approval-gate.yml`; require `require formal kapi-agent approval` plus `kapi-agent/review` in branch protection/rulesets. Re-review requests after stale/non-approving kapi-agent reviews must put `@kapi-agent review`, the current head SHA, `What changed`, `Why this closes the prior feedback`, and `Verification` in the same author comment; see `docs/kapi-agent-approval-gate.md`.
Copy file name to clipboardExpand all lines: docs/kapi-agent-approval-gate.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,37 @@ Branch protection or rulesets for `dev` should require both:
42
42
43
43
This makes the PR unmergeable in GitHub until the formal current-head review and bot check are both present. Local CLI/report logic may still explain the state, but it is not the enforcement boundary.
44
44
45
+
## Revision comment rules
46
+
47
+
After any stale or non-approving `kapi-agent` review, the author/supervisor must request re-review with a single same-comment trigger and revision explanation. Do not post `@kapi-agent review` separately from the explanation.
48
+
49
+
Required template:
50
+
51
+
```md
52
+
@kapi-agent review
53
+
54
+
Revision explanation for current head `<HEAD_SHA>`:
1. The comment must include `@kapi-agent review` and the `Revision explanation for current head` line in the same body.
70
+
2. The head SHA in the comment must match the current PR head.
71
+
3.`What changed`, `Why this closes the prior feedback`, and `Verification` are required headings and each must contain at least one bullet.
72
+
4. New pushes require a fresh revision comment for the new head; old explanations become stale.
73
+
5. The author comment must not mimic the bot review format (`## kapi-agent review` or `**Verdict:** APPROVE`). Verdict headers are reserved for formal kapi-agent review bodies.
74
+
6. Verification must report executed evidence. Speculative wording such as `should pass` or `expected to work` does not satisfy the gate.
75
+
45
76
## Incident reference
46
77
47
78
PR #110 was merged after an approval-shaped issue comment but before a formal kapi-agent review. The subsequent formal review requested changes. The corrected rule is: **comment verdicts are never merge approval**.
constapprovingBody="## kapi-agent review\n\n**Verdict:** APPROVE\n\n## Final approval summary\n\n### Review journey\n- Reviewed the semantic scope and prior feedback.\n\n### What changed\n- Harness gates are covered.\n\n### Why this is correct\n- The JSON result follows policy.\n\n### Evidence\n- tests pass\n\n### Remaining risks and approval rationale\n- none\n\n### Blocking issues\n- none\n";
validRevisionExplanation.replace("Why this closes the prior feedback:","Why:"),
77
+
validRevisionExplanation.replace("- Tests passed.","Tests should pass."),
78
+
`@kapi-agent review\n\n## kapi-agent review\n\n**Verdict:** APPROVE\n\nRevision explanation for current head \`${headSha}\`:\n\nWhat changed:\n- x\n\nWhy this closes the prior feedback:\n- y\n\nVerification:\n- tests passed\n`,
0 commit comments