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
Copy file name to clipboardExpand all lines: .coderabbit.yaml
+17-27Lines changed: 17 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -41,43 +41,33 @@ reviews:
41
41
path_instructions:
42
42
- path: "**/*"
43
43
instructions: |
44
-
Review every PR against its source of truth, not only against the diff.
44
+
Ты строгий ревьюер SPEC DRIVEN DEVELOPMENT.
45
45
46
-
Requirement sources, in priority order:
47
-
1. Linked GitHub issues in the PR body (`Fixes #123`, `Closes #123`, full issue URLs).
48
-
2. Explicit issue/TZ references in the PR title, PR description, branch name (`issue-123`), and PR discussion.
49
-
3. Changed-code markers such as `QUOTE(ТЗ): ...`, `REF: issue-...`, and nearby tests.
50
-
4. If final decisions only exist in issue comments and are not available in review context, ask the author to copy the final TZ/acceptance criteria into the issue body or PR description.
46
+
Перед выводами изучи README.md, другие *.md файлы, linked issues,
47
+
PR description, PR comments/discussion и релевантную кодовую базу.
51
48
52
-
Always include a "Соответствие ТЗ" section when the PR has an issue/TZ reference:
53
-
- list the concrete issue/TZ requirements that the diff implements;
54
-
- flag any requirement from the issue, PR body, or PR discussion that is missing or contradicted by the code;
55
-
- flag scope creep when the diff changes behavior not requested by the issue/TZ;
56
-
- verify that tests cover the observable behavior promised by the issue/TZ.
49
+
Сверь изменения с исходным ТЗ/спекой и обсуждением. Флагай любой уход
50
+
от спеки, недокументированное изменение поведения, отсутствие тестов
51
+
для заявленного поведения и security-риск. Если спека не видна,
52
+
попроси автора добавить ее в issue или PR description.
57
53
58
-
Security review priorities:
59
-
- command injection, shell argument escaping, unsafe `docker`, `git`, `ssh`, `gh`, `sudo`, or process spawning;
60
-
- path traversal, unsafe filesystem access, and accidental writes outside `.docker-git` or the project workspace;
61
-
- SSRF/open redirects/network access introduced by user-controlled input;
62
-
- leaked secrets, tokens, private keys, and sensitive data in logs;
Проверь решение с точки зрения формальной верификации: какие инварианты,
55
+
предусловия и постусловия можно доказать математически, а где доказуемость
56
+
слабая. Оцени решение с точки зрения теории игр: устойчивы ли стимулы,
57
+
нет ли выгодного обхода правил, и какое решение было бы сильнее.
65
58
66
59
pre_merge_checks:
67
60
issue_assessment:
68
61
mode: "warning"
69
62
custom_checks:
70
63
- name: "Requirements alignment"
71
-
mode: "warning"
64
+
mode: "error"
72
65
instructions: |
73
-
Fail if any of these are true:
74
-
- The PR has no discoverable source requirement: no linked issue, no issue/TZ reference in the PR title/body/branch/discussion, and no changed-code `QUOTE(ТЗ)` or `REF` marker.
75
-
- The changed code contradicts a linked issue title/body, PR description, PR discussion decision, or changed-code `QUOTE(ТЗ)`/`REF` marker.
76
-
- A concrete acceptance criterion from the linked issue or PR description is not implemented and not explicitly marked out of scope in the PR description.
77
-
- Observable behavior promised by the issue/TZ is changed without matching tests or a clear explanation in the PR description.
78
-
79
-
Pass when the source requirement is traceable and every explicit requirement is implemented, tested, or explicitly documented as out of scope.
80
-
Return Inconclusive only when the relevant issue/TZ discussion is referenced but not available in the review context; ask the author to copy the final TZ into the issue body or PR description.
66
+
Fail if the diff contradicts the visible spec/TZ, linked issue, PR
67
+
discussion, README/docs, or changes behavior without documenting it.
68
+
Fail if promised behavior has no relevant tests. Return Inconclusive
69
+
when the spec is missing and ask the author to add it. Also flag weak
70
+
formal invariants or game-theory incentives when they undermine the spec.
"instructions": "This is a public MIT open-source TypeScript/Bun monorepo. Review every PR as SPEC DRIVEN DEVELOPMENT: compare the diff with README.md, repository Markdown docs, linked issues, PR description, PR comments and the relevant codebase. Flag spec drift, undocumented behavior changes, missing tests for promised behavior, high-confidence security risks, weak formal invariants, and game-theory incentive problems.",
16
+
"rules": [
17
+
{
18
+
"id": "spec-source-required",
19
+
"rule": "Every behavioral change must be traceable to a visible source of truth: linked issue, PR description, PR discussion, README/docs, or changed-code reference. If the spec is missing, ask the author to add it before approval.",
20
+
"severity": "high"
21
+
},
22
+
{
23
+
"id": "spec-alignment",
24
+
"rule": "Flag any change that contradicts the visible issue/TZ/spec, PR discussion, README/docs, or changes behavior without documentation.",
25
+
"severity": "high"
26
+
},
27
+
{
28
+
"id": "security-review",
29
+
"rule": "Look for injection, path traversal, secret leaks, unsafe Docker/GitHub Actions settings, supply-chain risk, and cross-container isolation regressions.",
30
+
"severity": "high"
31
+
},
32
+
{
33
+
"id": "formal-verification",
34
+
"rule": "Assess which invariants, preconditions, and postconditions are mathematically defensible. Flag weak or unstated invariants when they affect correctness.",
35
+
"severity": "medium"
36
+
},
37
+
{
38
+
"id": "game-theory",
39
+
"rule": "Assess whether the implementation creates incentives to bypass intended rules or safety controls. Suggest a stronger mechanism when incentives are misaligned.",
0 commit comments