@homericintelligence/athena-opencode 0.5.0 → 0.5.1

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.
Files changed (136) hide show
  1. package/README.md +30 -17
  2. package/package.json +2 -2
  3. package/plugin.js +20 -5
  4. package/skills/TECHNICAL_ENGLISH.md +78 -0
  5. package/skills/_cli.py +26 -18
  6. package/skills/_support/docs/dependency-resolution.md +192 -0
  7. package/skills/_support/docs/policies/development.md +117 -0
  8. package/skills/_support/docs/policies/evidence-integrity.md +40 -0
  9. package/skills/_support/docs/principles/README.md +542 -0
  10. package/skills/_support/docs/principles/details/p001-kiss.md +114 -0
  11. package/skills/_support/docs/principles/details/p002-yagni.md +109 -0
  12. package/skills/_support/docs/principles/details/p003-dry.md +126 -0
  13. package/skills/_support/docs/principles/details/p004-solid.md +165 -0
  14. package/skills/_support/docs/principles/details/p005-modularity.md +123 -0
  15. package/skills/_support/docs/principles/details/p006-principle-of-least-astonishment.md +115 -0
  16. package/skills/_support/docs/principles/details/p007-subtraction-over-addition.md +113 -0
  17. package/skills/_support/docs/principles/details/p008-understand-before-subtracting.md +115 -0
  18. package/skills/_support/docs/principles/details/p009-general-mechanisms-over-special-cases.md +108 -0
  19. package/skills/_support/docs/principles/details/p010-scope-fidelity.md +117 -0
  20. package/skills/_support/docs/principles/details/p011-minimal-coherent-change.md +128 -0
  21. package/skills/_support/docs/principles/details/p012-evidence-before-modification.md +115 -0
  22. package/skills/_support/docs/principles/details/p013-avoid-hasty-abstractions.md +112 -0
  23. package/skills/_support/docs/principles/details/p014-preserve-unrequested-behavior.md +110 -0
  24. package/skills/_support/docs/principles/details/p015-architecture-conformance.md +124 -0
  25. package/skills/_support/docs/principles/details/p016-separation-of-concerns.md +125 -0
  26. package/skills/_support/docs/principles/details/p017-high-cohesion-low-coupling.md +130 -0
  27. package/skills/_support/docs/principles/details/p018-information-hiding.md +128 -0
  28. package/skills/_support/docs/principles/details/p019-explicit-contracts.md +134 -0
  29. package/skills/_support/docs/principles/details/p020-executable-architecture.md +130 -0
  30. package/skills/_support/docs/principles/details/p021-evolutionary-and-reversible-design.md +126 -0
  31. package/skills/_support/docs/principles/details/p022-test-behavior-not-implementation.md +129 -0
  32. package/skills/_support/docs/principles/details/p023-parameterized-table-driven-testing.md +129 -0
  33. package/skills/_support/docs/principles/details/p024-boundary-value-testing.md +128 -0
  34. package/skills/_support/docs/principles/details/p025-property-based-testing-for-invariants.md +133 -0
  35. package/skills/_support/docs/principles/details/p026-regression-before-repair.md +134 -0
  36. package/skills/_support/docs/principles/details/p027-deterministic-and-hermetic-tests.md +128 -0
  37. package/skills/_support/docs/principles/details/p028-test-failure-paths.md +133 -0
  38. package/skills/_support/docs/principles/details/p029-generalize-error-policy-preserve-specific-cause.md +131 -0
  39. package/skills/_support/docs/principles/details/p030-nearest-responsible-error-boundary.md +133 -0
  40. package/skills/_support/docs/principles/details/p031-propagate-rather-than-swallow.md +131 -0
  41. package/skills/_support/docs/principles/details/p032-handle-once-preserve-causality.md +137 -0
  42. package/skills/_support/docs/principles/details/p033-state-safe-failure-semantics.md +140 -0
  43. package/skills/_support/docs/principles/details/p034-fail-fast.md +132 -0
  44. package/skills/_support/docs/principles/details/p035-fail-secure-fail-closed.md +137 -0
  45. package/skills/_support/docs/principles/details/p036-graceful-degradation.md +137 -0
  46. package/skills/_support/docs/principles/details/p037-idempotency-before-retry.md +139 -0
  47. package/skills/_support/docs/principles/details/p038-bounded-retry.md +145 -0
  48. package/skills/_support/docs/principles/details/p039-bounded-waiting.md +151 -0
  49. package/skills/_support/docs/principles/details/p040-bounded-resources.md +138 -0
  50. package/skills/_support/docs/principles/details/p041-backpressure-and-load-shedding.md +141 -0
  51. package/skills/_support/docs/principles/details/p042-fault-isolation-bulkheads.md +140 -0
  52. package/skills/_support/docs/principles/details/p043-circuit-breakers.md +148 -0
  53. package/skills/_support/docs/principles/details/p044-atomicity-where-possible.md +141 -0
  54. package/skills/_support/docs/principles/details/p045-compensation-where-atomicity-is-impossible.md +163 -0
  55. package/skills/_support/docs/principles/details/p046-resumability.md +138 -0
  56. package/skills/_support/docs/principles/details/p047-observability-is-part-of-correctness.md +134 -0
  57. package/skills/_support/docs/principles/details/p048-secure-by-design.md +132 -0
  58. package/skills/_support/docs/principles/details/p049-secure-by-default.md +126 -0
  59. package/skills/_support/docs/principles/details/p050-least-privilege.md +123 -0
  60. package/skills/_support/docs/principles/details/p051-complete-mediation.md +124 -0
  61. package/skills/_support/docs/principles/details/p052-separation-of-duties.md +129 -0
  62. package/skills/_support/docs/principles/details/p053-validate-at-trust-boundaries.md +126 -0
  63. package/skills/_support/docs/principles/details/p054-defense-in-depth.md +135 -0
  64. package/skills/_support/docs/principles/details/p055-minimize-attack-surface.md +133 -0
  65. package/skills/_support/docs/principles/details/p056-secrets-stay-out-of-code-and-context.md +137 -0
  66. package/skills/_support/docs/principles/details/p057-supply-chain-integrity.md +135 -0
  67. package/skills/_support/docs/principles/details/p058-bounded-agent-authority.md +137 -0
  68. package/skills/_support/docs/principles/details/p059-data-is-not-instruction.md +130 -0
  69. package/skills/_support/docs/principles/details/p060-constrain-sub-agents.md +136 -0
  70. package/skills/_support/docs/principles/details/p061-separate-decision-from-high-impact-execution.md +131 -0
  71. package/skills/_support/docs/principles/details/p062-human-approval-for-irreversible-or-high-risk-actions.md +129 -0
  72. package/skills/_support/docs/principles/details/p063-requirement-to-code-traceability.md +116 -0
  73. package/skills/_support/docs/principles/details/p064-requirement-to-test-traceability.md +116 -0
  74. package/skills/_support/docs/principles/details/p065-verify-before-claiming-completion.md +129 -0
  75. package/skills/_support/docs/principles/details/p066-preserve-existing-work.md +114 -0
  76. package/skills/_support/docs/principles/details/p067-no-test-cheating.md +126 -0
  77. package/skills/_support/docs/principles/details/p068-no-validation-bypass.md +119 -0
  78. package/skills/_support/docs/principles/details/p069-independent-review-for-high-risk-changes.md +129 -0
  79. package/skills/_support/docs/principles/details/p070-code-health-must-not-regress.md +116 -0
  80. package/skills/_support/docs/principles/details/p071-consistency-over-personal-preference.md +117 -0
  81. package/skills/_support/docs/principles/details/p072-technical-evidence-over-preference.md +122 -0
  82. package/skills/_support/docs/principles/details/p073-optimize-only-with-evidence.md +123 -0
  83. package/skills/_support/docs/principles/details/p074-prefer-existing-mechanisms.md +121 -0
  84. package/skills/_support/docs/principles/details/p075-make-invalid-states-hard-to-represent.md +128 -0
  85. package/skills/_support/docs/principles/details/p076-parse-then-validate-then-operate.md +133 -0
  86. package/skills/_support/docs/principles/details/p077-separate-policy-from-mechanism.md +112 -0
  87. package/skills/_support/docs/principles/details/p078-single-source-of-truth.md +131 -0
  88. package/skills/_support/docs/principles/details/p079-explicit-ownership-and-lifetimes.md +124 -0
  89. package/skills/_support/docs/principles/details/p080-make-concurrency-deliberate.md +122 -0
  90. package/skills/_support/docs/principles/details/p081-forward-progress-with-safety.md +125 -0
  91. package/skills/_support/docs/principles/details/p082-design-for-cancellation.md +133 -0
  92. package/skills/_support/docs/principles/details/p083-irreversible-actions-last.md +124 -0
  93. package/skills/_support/docs/principles/details/p084-prefer-local-reasoning.md +131 -0
  94. package/skills/_support/docs/principles/details/p085-explicit-is-better-than-implicit.md +123 -0
  95. package/skills/_support/docs/principles/details/p086-readability-counts.md +113 -0
  96. package/skills/_support/docs/principles/details/p087-comments-explain-why-code-explains-what.md +120 -0
  97. package/skills/_support/docs/principles/details/p088-delete-dead-code.md +125 -0
  98. package/skills/_support/docs/principles/details/p089-delete-obsolete-configuration-and-dependencies.md +125 -0
  99. package/skills/_support/docs/principles/details/p090-prefer-negative-code.md +134 -0
  100. package/skills/_support/docs/principles/details/p091-test-driven-development.md +149 -0
  101. package/skills/_support/docs/review/README.md +59 -0
  102. package/skills/_support/docs/review/behavior-first-testing.md +73 -0
  103. package/skills/_support/docs/review/common.md +365 -0
  104. package/skills/_support/docs/review/design-docs.md +74 -0
  105. package/skills/_support/docs/review/issue-planning.md +220 -0
  106. package/skills/_support/docs/review/language-routing.md +141 -0
  107. package/skills/_support/docs/review/repository-scorecard.md +170 -0
  108. package/skills/advise/SKILL.md +93 -67
  109. package/skills/advise/scripts/list_retrievable_skills.py +3 -3
  110. package/skills/brainstorm/SKILL.md +160 -127
  111. package/skills/change-review/SKILL.md +91 -71
  112. package/skills/change-review/references/scope-resolution.md +69 -46
  113. package/skills/change-review/scripts/resolve_scope.py +119 -73
  114. package/skills/finalize-plan/SKILL.md +198 -139
  115. package/skills/git-worktrees/SKILL.md +100 -80
  116. package/skills/git-worktrees/scripts/prepare_worktree.py +16 -10
  117. package/skills/issue-review/SKILL.md +136 -79
  118. package/skills/learn/SKILL.md +276 -186
  119. package/skills/myrmidon-swarm/SKILL.md +126 -86
  120. package/skills/plan-issue/SKILL.md +122 -81
  121. package/skills/pr-review/SKILL.md +164 -114
  122. package/skills/pr-review/references/criteria.md +58 -37
  123. package/skills/pr-review/references/delivery.md +156 -98
  124. package/skills/pr-review/references/evidence.md +265 -148
  125. package/skills/pr-review/references/prevalidated.md +93 -61
  126. package/skills/pr-review/scripts/collect_evidence.py +211 -140
  127. package/skills/pr-review/scripts/diff_context.py +6 -4
  128. package/skills/pr-review/scripts/materialize_snapshot.py +112 -120
  129. package/skills/pr-review/scripts/pr_identity.py +27 -15
  130. package/skills/pr-review/scripts/resolve_pr.py +53 -31
  131. package/skills/repo-review/SKILL.md +202 -131
  132. package/skills/systematic-debugging/SKILL.md +210 -192
  133. package/skills/systematic-debugging/scripts/repository_evidence.py +9 -4
  134. package/skills/test-driven-development/SKILL.md +126 -96
  135. package/skills/tidy/SKILL.md +92 -59
  136. package/skills/tidy/scripts/run_tidy.py +3 -3
@@ -2,9 +2,12 @@
2
2
 
3
3
  ## Why
4
4
 
5
- A review verdict is evidence, not a forge-scope expansion. Rebinding immediately before
6
- one scoped publication prevents a correct review from commenting on, approving,
7
- or automating a later artifact.
5
+ A review verdict is evidence. It does not expand the forge scope. Immediately before one scoped
6
+ publication, bind the exact artifact again. This check prevents the review from adding a comment or
7
+ automation to a later artifact. It also prevents approval of a later artifact.
8
+
9
+ Use the [ASD-STE100 technical-English policy](../../TECHNICAL_ENGLISH.md) for all technical prose
10
+ and review output.
8
11
 
9
12
  ```text
10
13
  [complete review] -> [verdict] -> [rebind exact artifact]
@@ -16,96 +19,139 @@ or automating a later artifact.
16
19
 
17
20
  ## Engineering principle routes
18
21
 
19
- - [P037 Idempotency Before Retry](../../../docs/principles/README.md#p037) and
20
- [P044 Atomicity Where Possible](../../../docs/principles/README.md#p044) require one bound,
21
- atomic comment batch where the forge supports it and prohibit blind retry after a failed or
22
- indeterminate write.
23
- - [P050 Least Privilege](../../../docs/principles/README.md#p050),
24
- [P051 Complete Mediation](../../../docs/principles/README.md#p051),
25
- [P052 Separation of Duties](../../../docs/principles/README.md#p052), and
26
- [P058 Bounded Agent Authority](../../../docs/principles/README.md#p058) keep review, publication,
27
- approval, and merge capabilities distinct and limited to the selected profile and requested task.
28
- - [P061 Separate Decision from High-Impact Execution](../../../docs/principles/README.md#p061),
29
- [P062 Human Approval for Irreversible or High-Risk Actions](../../../docs/principles/README.md#p062),
30
- and [P083 Irreversible Actions Last](../../../docs/principles/README.md#p083) require a fresh
31
- authority and identity check immediately before a requested write or guarded auto-merge opt-in;
32
- existing specific authorization is honored without a redundant approval prompt.
33
- - [P065 Verify Before Claiming Completion](../../../docs/principles/README.md#p065) and
34
- [P068 No Validation Bypass](../../../docs/principles/README.md#p068) prohibit a favorable verdict,
35
- successful-publication claim, or automation state based on stale, incomplete, bypassed, or
36
- unverified evidence.
22
+ - [P037 Idempotency Before Retry](../../_support/docs/principles/README.md#p037) and
23
+ [P044 Atomicity Where Possible](../../_support/docs/principles/README.md#p044) require one bound atomic
24
+ comment batch when the forge supports it. They prohibit a blind retry after a failed or indeterminate
25
+ write.
26
+ - [P050 Least Privilege](../../_support/docs/principles/README.md#p050),
27
+ [P051 Complete Mediation](../../_support/docs/principles/README.md#p051),
28
+ [P052 Separation of Duties](../../_support/docs/principles/README.md#p052), and
29
+ [P058 Bounded Agent Authority](../../_support/docs/principles/README.md#p058) keep the review, publication,
30
+ approval, and merge capabilities separate. They limit these capabilities to the selected profile and
31
+ requested task.
32
+ - [P061 Separate Decision from High-Impact Execution](../../_support/docs/principles/README.md#p061),
33
+ [P062 Human Approval for Irreversible or High-Risk Actions](../../_support/docs/principles/README.md#p062),
34
+ and [P083 Irreversible Actions Last](../../_support/docs/principles/README.md#p083) require a new authority
35
+ and identity check immediately before a requested write or guarded auto-merge opt-in. If the user
36
+ already gave specific authorization, do not request the same approval again.
37
+ - [P065 Verify Before Claiming Completion](../../_support/docs/principles/README.md#p065) and
38
+ [P068 No Validation Bypass](../../_support/docs/principles/README.md#p068) prohibit a favorable verdict,
39
+ successful-publication claim, or automation state from stale, incomplete, bypassed, or unverified
40
+ evidence.
37
41
 
38
42
  ## Decision
39
43
 
40
- For default and CI-free normal reports, calculate findings and score before
41
- emitting exactly one terminal verdict. The prevalidated profile emits only its
42
- structured audit; it has no verdict, scorecard, publication, or auto-merge
43
- path. GitLab may report a verdict, but this skill never enables its auto-merge.
44
+ For a default or continuous-integration-free (CI-free) normal report, calculate the findings. Then,
45
+ calculate the score. Emit exactly one terminal verdict. For the prevalidated profile, emit only its structured
46
+ audit. Do not emit a verdict, scorecard, or publication. The prevalidated profile has no auto-merge
47
+ workflow. GitLab can report a verdict. This skill must not enable GitLab auto-merge.
44
48
 
45
49
  | Verdict | Required conditions |
46
50
  | --- | --- |
47
- | **GO** | Default profile; A (93–100); architecture aligned or evidenced intentional change; zero `required` findings; complete applicable source, scope, requirements, language, and validation coverage; and host-selected local checks passing on the reviewed head. |
48
- | **CONDITIONAL GO** | Architecture passes, no `required` source finding is open, and score is at least B, but a remediable review condition remains: for example incomplete source, scope, requirement, language, or validation coverage, a local validation gap, or CI-free's deliberately limited evidence. State every condition. |
49
- | **NO-GO** | Score below B; any `required` finding; material or unexplained architecture violation; failed required local validation; or invalid/stale/drifted identity, scope, requirement, path, or current-head binding. |
51
+ | **GO** | Use only for the default profile. Require grade A (93–100). Require aligned architecture or an evidenced intentional change. Require zero `required` findings. Require complete applicable source, scope, requirements, language, and validation coverage. Require all host-selected local checks to pass on the reviewed head. |
52
+ | **CONDITIONAL GO** | Require architecture to pass. Require no open `required` source finding. Require a score of at least B. Use when a remediable review condition remains. Examples include incomplete source, scope, requirement, language, or validation coverage; a local validation gap; or deliberately limited CI-free evidence. State each condition. |
53
+ | **NO-GO** | Use for a score below B or a `required` finding. Also use it for a material or unexplained architecture violation or failed required local validation. Use it for an invalid, stale, or drifted identity, scope, requirement, path, or current-head binding. |
50
54
 
51
- `--report-only` may report GO but records `auto_merge: withheld (read-only)`.
52
- Without `--enable-auto-merge-on-go`, a GO records `auto_merge: withheld (not
53
- requested)`. CONDITIONAL GO, NO-GO, CI-free, prevalidated, and GitLab records
54
- `auto_merge: not-eligible` with the blocker.
55
+ `--report-only` can report `GO`. It records `auto_merge: withheld (read-only)`. Without
56
+ `--enable-auto-merge-on-go`, a `GO` records `auto_merge: withheld (not requested)`. For
57
+ `CONDITIONAL GO`, `NO-GO`, CI-free, prevalidated, and GitLab, record `auto_merge: not-eligible` with
58
+ the blocker.
55
59
 
56
60
  ## Guarded GitHub auto-merge
57
61
 
58
- An explicit direct-user `--enable-auto-merge-on-go` request is the only
59
- auto-merge selection. It applies only to an exact eligible default-profile
60
- GitHub GO, after any requested comment batch is verified; it never permits a
61
- direct merge, retry, approval, label, bypass, or policy change.
62
-
63
- 1. Re-resolve canonical host, repository, PR number and node ID, OPEN/non-draft
64
- state, target, base/head OIDs, both lenses, scope digest,
65
- linked-requirements digest, path manifest, all effective pre-admission gates,
66
- and required queue route. Withhold on drift, missing binding, gate failure or
67
- pending state, changed author/reviewer, required unresolved thread, or failed
68
- or indeterminate comment publication.
69
- 2. Require an authenticated capability that binds the canonical target and can
70
- enable normal auto-merge without administrator bypass. It returns the one
71
- repository-supported permitted method; never choose, guess, or change one.
72
- If a merge queue is required, require a separate exact-head queue-admission
73
- capability instead; normal auto-merge is never a queue-admission proxy.
74
- 3. Invoke exactly one bound operation: enable auto-merge with retained PR node
75
- ID and `expectedHeadOid`, or queue admission with the same target and head.
76
- Do not use ambient repository or branch state, generic CLI defaults, a direct
77
- merge command, fallback mutation, or retry after failure or indeterminate
78
- results.
79
- 4. Re-fetch the exact PR. Report `enabled` only when auto-merge is enabled for
80
- the same node ID, head, and supported method; report `queue-enqueued` only
81
- when its entry binds the same PR, target, and reviewed head. Never report the
82
- PR as merged.
62
+ Enable auto-merge only when the user directly requests `--enable-auto-merge-on-go`. Apply this option
63
+ only to an exact eligible default-profile GitHub `GO`. Before you apply it, verify each requested
64
+ comment batch. This option does not permit a direct merge, retry, approval, label, bypass, or policy
65
+ change.
66
+
67
+ 1. Resolve these values again:
68
+ - canonical host;
69
+ - repository;
70
+ - pull request (PR) number and node ID;
71
+ - `OPEN` and non-draft state;
72
+ - target;
73
+ - base and head object identifiers (OIDs);
74
+ - both lenses;
75
+ - scope digest;
76
+ - linked-requirements digest;
77
+ - path manifest;
78
+ - all effective pre-admission gates; and
79
+ - required queue route.
80
+ 2. If a value changed or a binding is missing, withhold auto-merge.
81
+ 3. If a gate failed or is pending, withhold auto-merge.
82
+ 4. If the author or reviewer changed, withhold auto-merge.
83
+ 5. If a required thread is unresolved, withhold auto-merge.
84
+ 6. If comment publication failed or is indeterminate, withhold auto-merge.
85
+ 7. Require an authenticated capability that binds the canonical target and can enable normal
86
+ auto-merge without administrator bypass.
87
+ 8. Use the one repository-supported method that the capability returns.
88
+ 9. Do not select the method.
89
+ 10. Do not guess the method.
90
+ 11. Do not change the method.
91
+ 12. If the repository requires a merge queue, require a separate exact-head queue-admission capability.
92
+ 13. Do not use normal auto-merge as a queue-admission proxy.
93
+ 14. Invoke exactly one bound operation:
94
+
95
+ - Enable auto-merge with the retained PR node ID and `expectedHeadOid`; or
96
+ - Use queue admission with the same target and head.
97
+
98
+ 15. Do not use ambient repository state, ambient branch state, or generic command-line interface
99
+ (CLI) defaults.
100
+ 16. Do not use a direct merge command or fallback mutation.
101
+ 17. Do not retry after a failed or indeterminate result.
102
+ 18. Fetch the exact PR again.
103
+ 19. Report `enabled` only if auto-merge uses the same node ID, head, and supported method.
104
+ 20. Report `queue-enqueued` only if its entry binds the same PR, target, and reviewed head.
105
+ 21. Do not report the PR as merged.
83
106
 
84
107
  ## Normal report
85
108
 
86
109
  Return, in order:
87
110
 
88
- 1. Artifact identity, forge, base/head, immutable scope and path bindings,
89
- behind count, files reviewed, linked issue, acceptance criteria, and each
90
- unbound check as a coverage gap.
91
- 2. Architecture decision, language/surface routes, and N/A reasons.
92
- 3. Findings from CRITICAL through FYI. Every finding has independent
93
- `required`, `suggestion`, `nit`, or `FYI` disposition; exact location;
94
- observed gap; impact and governing evidence; and proportionate fix.
95
- 4. Six-dimension scorecard, weighted grade, terminal verdict, commands and
96
- pass/fail state, coverage gaps, delivery/auto-merge state, and brief
97
- strengths after findings.
111
+ 1. Report the artifact identity, forge, base and head, immutable scope, and path bindings.
112
+ 2. Report the behind count, files reviewed, linked issue, and acceptance criteria.
113
+ 3. Report each unbound check as a coverage gap.
114
+ 4. Report the architecture decision, language routes, surface routes, and not-applicable (N/A) reasons.
115
+ 5. Report findings from `CRITICAL` through `FYI`.
116
+ 6. For each finding, report these items:
117
+ - independent `required`, `suggestion`, `nit`, or `FYI` disposition;
118
+ - exact location;
119
+ - observed gap;
120
+ - impact and governing evidence; and
121
+ - proportionate fix.
122
+ 7. Report the six-dimension scorecard, weighted grade, and terminal verdict.
123
+ 8. Report commands and their pass or fail state.
124
+ 9. Report coverage gaps, delivery state, and auto-merge state.
125
+ 10. After the findings, report brief strengths.
98
126
 
99
127
  ## Comment-only publication
100
128
 
101
- The requested review delivery boundary permits normal publication. It permits comments only, never approval, request-changes, labels,
102
- issue edits, thread resolution, rebase, push, close, merge, or a follow-up
103
- work-item. Indirect invocation, `--report-only`, absent forge capability, no
104
- findings, or drift returns the complete ready-to-publish batch without a write.
129
+ The requested review delivery boundary permits normal publication. Publish comments only. Do not do
130
+ any of these actions:
131
+
132
+ - approve;
133
+ - request changes;
134
+ - change labels;
135
+ - edit an issue;
136
+ - resolve a thread;
137
+ - rebase;
138
+ - push;
139
+ - close;
140
+ - merge; or
141
+ - create a follow-up work item.
142
+
143
+ If any of these conditions applies, return the complete ready-to-publish batch without a write:
144
+
145
+ - The invocation is indirect.
146
+ - The invocation uses `--report-only`.
147
+ - A forge capability is absent.
148
+ - There are no findings.
149
+ - A bound value changed.
150
+
105
151
  Do not post a clean review.
106
152
 
107
- Before every requested write, re-fetch the exact open artifact and derive the
108
- fully-qualified write target only from the retained identity. Revalidate:
153
+ Before each requested write, fetch the exact open artifact again. Derive the fully qualified write
154
+ target only from the retained identity. Revalidate these values:
109
155
 
110
156
  | Forge/profile | Required rebind |
111
157
  | --- | --- |
@@ -113,13 +159,12 @@ fully-qualified write target only from the retained identity. Revalidate:
113
159
  | CI-free GitHub | Exact repository/PR/base/head plus the final non-CI source-scope binding. Never call `collect_evidence.py` or a CI endpoint. |
114
160
  | GitLab | Exact identity, scope, linked requirements, changed paths, and complete base/start/head position tuple. |
115
161
 
116
- On any drift, withhold the entire set and restart the review. A general summary
117
- is optional and may cover only architecture, scope, coverage, or another truly
118
- cross-cutting point without a changed-line anchor. It must not repeat an inline
119
- finding. Each independently actionable changed-line finding gets exactly one
120
- inline comment or discussion on its one causal changed line; never combine
121
- separate fixes, use a line range instead of a causal line, or duplicate it at
122
- several locations.
162
+ If a value changes, withhold the complete set. Start a new review. Use a general summary only for
163
+ architecture, scope, coverage, or another cross-cutting point that has no changed-line anchor. Do not
164
+ repeat an inline finding in the summary. Publish each independently actionable changed-line finding
165
+ exactly once. Put it in one inline comment or discussion on its causal changed line. Do not combine
166
+ separate fixes. Do not use a line range instead of the causal line. Do not duplicate the finding at
167
+ multiple locations.
123
168
 
124
169
  ### GitHub batch
125
170
 
@@ -133,24 +178,37 @@ body = non-empty (neutral transport body is valid)
133
178
  comments = one entry per anchorable independent finding
134
179
  ```
135
180
 
136
- Each comment entry contains only one verified changed `path`, `side`, causal
137
- `line`, and finding body; `commit_id` is top-level, never per comment. Verify
138
- the returned review and fetched comments identify the target, `COMMENT` or
139
- `COMMENTED` event/state, reviewed commit, and every expected path, side, line,
140
- and body anchor. On failed or indeterminate verification, make no further write
141
- or retry. Do not substitute `gh pr review --comment`.
181
+ Put only one verified changed `path`, `side`, causal `line`, and finding body in each comment entry.
182
+ Put `commit_id` at the top level. Do not put it in an individual comment. Verify that the returned
183
+ review and fetched comments identify these values:
184
+
185
+ - the target;
186
+ - the `COMMENT` or `COMMENTED` event or state;
187
+ - the reviewed commit; and
188
+ - each expected path, side, line, and body anchor.
189
+
190
+ If verification fails or is indeterminate, make no additional write. Do not retry. Do not substitute
191
+ `gh pr review --comment`.
142
192
 
143
193
  ### GitLab discussions
144
194
 
145
- Create one actionable changed-line discussion for each anchorable independent
146
- finding. Every text position includes exact `base_sha`, `start_sha`, `head_sha`,
147
- `old_path`, `new_path`, and `position_type=text`; use only `new_line` for an
148
- added/right-side finding, only `old_line` for deletion/left-side, and both for
149
- an unchanged line. Prefer an atomic draft or batch. If unavailable, rebind
150
- before every ordered discussion; stop on drift, retain created URLs, and return
151
- the remaining batch. Verify each returned target, tuple, paths, and line fields
152
- exactly. If an atomic batch is required but unsupported, withhold the whole set.
153
-
154
- Report review/discussion URLs, posting failure, residual risks, and unverified
155
- assumptions honestly. The forge and its approval policy—not review prose—own
156
- labels, acceptance, and merging.
195
+ Create one actionable changed-line discussion for each anchorable independent finding. Put these
196
+ exact values in each text position:
197
+
198
+ - `base_sha`;
199
+ - `start_sha`;
200
+ - `head_sha`;
201
+ - `old_path`;
202
+ - `new_path`; and
203
+ - `position_type=text`.
204
+
205
+ For an added or right-side finding, use only `new_line`. For a deletion or left-side finding, use only
206
+ `old_line`. For an unchanged line, use both fields. Use an atomic draft or batch when it is available.
207
+ If it is not available, bind the artifact again before each ordered discussion. If a value changes,
208
+ stop. Retain the created uniform resource locators (URLs). Return the remaining batch. Verify each
209
+ returned target, tuple, path, and line field exactly. If the workflow requires an atomic batch and the
210
+ forge does not support it, withhold the complete set.
211
+
212
+ Report review or discussion URLs, publication failures, residual risks, and unverified assumptions
213
+ accurately. The forge and its approval policy control labels, acceptance, and merge. Review prose does
214
+ not control them.