@mrciphersmith/keryx 0.2.163 → 0.3.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.
Files changed (100) hide show
  1. package/dist/cli.js +87904 -56917
  2. package/dist/core.js +28418 -18708
  3. package/package.json +2 -2
  4. package/src/gdgraph/affected-report.ts +141 -0
  5. package/src/gdgraph/build.ts +170 -23
  6. package/src/gdgraph/service.ts +6 -0
  7. package/src/gdgraph/staleness.ts +253 -45
  8. package/src/gdskills/bundled/agents/codebase-navigator.md +55 -0
  9. package/src/gdskills/bundled/agents/design-advisor.md +64 -0
  10. package/src/gdskills/bundled/agents/docs-maintainer.md +56 -0
  11. package/src/gdskills/bundled/agents/end-to-end-tester.md +56 -0
  12. package/src/gdskills/bundled/agents/error-path-auditor.md +57 -0
  13. package/src/gdskills/bundled/agents/go-build-fixer.md +52 -0
  14. package/src/gdskills/bundled/agents/go-code-auditor.md +49 -0
  15. package/src/gdskills/bundled/agents/performance-auditor.md +63 -0
  16. package/src/gdskills/bundled/agents/python-build-fixer.md +52 -0
  17. package/src/gdskills/bundled/agents/python-code-auditor.md +49 -0
  18. package/src/gdskills/bundled/agents/refactoring-steward.md +61 -0
  19. package/src/gdskills/bundled/agents/security-auditor.md +62 -0
  20. package/src/gdskills/bundled/agents/test-first-driver.md +61 -0
  21. package/src/gdskills/bundled/agents/work-planner.md +62 -0
  22. package/src/gdskills/bundled/install-manifest.json +530 -0
  23. package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +29 -1
  24. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +2 -2
  25. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
  26. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +74 -246
  27. package/src/gdskills/bundled/skills/review/review-orchestrator/output-contract.schema.json +19 -0
  28. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +10 -0
  29. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +5 -0
  30. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/pr-comment-backend.md +50 -0
  31. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/pr-comment-frontend.md +52 -0
  32. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/review-report.md +143 -0
  33. package/src/gdskills/bundled/stacks/go/agent-refs.json +3 -0
  34. package/src/gdskills/bundled/stacks/go/governance/eval.json +1745 -0
  35. package/src/gdskills/bundled/stacks/go/governance/scout.json +31 -0
  36. package/src/gdskills/bundled/stacks/go/pack.json +41 -0
  37. package/src/gdskills/bundled/stacks/go/rules/coding-style.mdc +85 -0
  38. package/src/gdskills/bundled/stacks/go/rules/patterns.mdc +65 -0
  39. package/src/gdskills/bundled/stacks/go/rules/security.mdc +73 -0
  40. package/src/gdskills/bundled/stacks/go/rules/testing.mdc +68 -0
  41. package/src/gdskills/bundled/stacks/go/skills/go-build-fix/SKILL.md +138 -0
  42. package/src/gdskills/bundled/stacks/go/skills/go-build-fix/evals.json +75 -0
  43. package/src/gdskills/bundled/stacks/go/skills/go-code-review/SKILL.md +121 -0
  44. package/src/gdskills/bundled/stacks/go/skills/go-code-review/evals.json +72 -0
  45. package/src/gdskills/bundled/stacks/go/skills/go-implementation/SKILL.md +122 -0
  46. package/src/gdskills/bundled/stacks/go/skills/go-implementation/evals.json +76 -0
  47. package/src/gdskills/bundled/stacks/go/skills/go-testing/SKILL.md +126 -0
  48. package/src/gdskills/bundled/stacks/go/skills/go-testing/evals.json +73 -0
  49. package/src/gdskills/bundled/stacks/python/agent-refs.json +3 -0
  50. package/src/gdskills/bundled/stacks/python/governance/eval.json +1758 -0
  51. package/src/gdskills/bundled/stacks/python/governance/scout.json +34 -0
  52. package/src/gdskills/bundled/stacks/python/pack.json +41 -0
  53. package/src/gdskills/bundled/stacks/python/rules/coding-style.mdc +63 -0
  54. package/src/gdskills/bundled/stacks/python/rules/patterns.mdc +88 -0
  55. package/src/gdskills/bundled/stacks/python/rules/security.mdc +84 -0
  56. package/src/gdskills/bundled/stacks/python/rules/testing.mdc +77 -0
  57. package/src/gdskills/bundled/stacks/python/skills/python-build-fix/SKILL.md +144 -0
  58. package/src/gdskills/bundled/stacks/python/skills/python-build-fix/evals.json +74 -0
  59. package/src/gdskills/bundled/stacks/python/skills/python-code-review/SKILL.md +155 -0
  60. package/src/gdskills/bundled/stacks/python/skills/python-code-review/evals.json +72 -0
  61. package/src/gdskills/bundled/stacks/python/skills/python-implementation/SKILL.md +143 -0
  62. package/src/gdskills/bundled/stacks/python/skills/python-implementation/evals.json +78 -0
  63. package/src/gdskills/bundled/stacks/python/skills/python-testing/SKILL.md +132 -0
  64. package/src/gdskills/bundled/stacks/python/skills/python-testing/evals.json +73 -0
  65. package/src/gdskills/bundled/stacks/react/agent-refs.json +4 -0
  66. package/src/gdskills/bundled/stacks/react/governance/eval.json +2188 -0
  67. package/src/gdskills/bundled/stacks/react/governance/scout.json +40 -0
  68. package/src/gdskills/bundled/stacks/react/pack.json +42 -0
  69. package/src/gdskills/bundled/stacks/react/rules/coding-style.mdc +58 -0
  70. package/src/gdskills/bundled/stacks/react/rules/patterns.mdc +79 -0
  71. package/src/gdskills/bundled/stacks/react/rules/security.mdc +70 -0
  72. package/src/gdskills/bundled/stacks/react/rules/testing.mdc +60 -0
  73. package/src/gdskills/bundled/stacks/react/skills/react-build-fix/SKILL.md +139 -0
  74. package/src/gdskills/bundled/stacks/react/skills/react-build-fix/evals.json +72 -0
  75. package/src/gdskills/bundled/stacks/react/skills/react-code-review/SKILL.md +148 -0
  76. package/src/gdskills/bundled/stacks/react/skills/react-code-review/evals.json +74 -0
  77. package/src/gdskills/bundled/stacks/react/skills/react-implementation/SKILL.md +140 -0
  78. package/src/gdskills/bundled/stacks/react/skills/react-implementation/evals.json +74 -0
  79. package/src/gdskills/bundled/stacks/react/skills/react-testing/SKILL.md +142 -0
  80. package/src/gdskills/bundled/stacks/react/skills/react-testing/evals.json +83 -0
  81. package/src/gdskills/bundled/stacks/react/skills/react-upgrade-migration/SKILL.md +155 -0
  82. package/src/gdskills/bundled/stacks/react/skills/react-upgrade-migration/evals.json +74 -0
  83. package/src/gdskills/bundled/stacks/ts-js-node/agent-refs.json +4 -0
  84. package/src/gdskills/bundled/stacks/ts-js-node/governance/eval.json +2155 -0
  85. package/src/gdskills/bundled/stacks/ts-js-node/governance/scout.json +40 -0
  86. package/src/gdskills/bundled/stacks/ts-js-node/pack.json +41 -0
  87. package/src/gdskills/bundled/stacks/ts-js-node/rules/coding-style.mdc +73 -0
  88. package/src/gdskills/bundled/stacks/ts-js-node/rules/patterns.mdc +61 -0
  89. package/src/gdskills/bundled/stacks/ts-js-node/rules/security.mdc +71 -0
  90. package/src/gdskills/bundled/stacks/ts-js-node/rules/testing.mdc +63 -0
  91. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-build-fix/SKILL.md +137 -0
  92. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-build-fix/evals.json +73 -0
  93. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-code-review/SKILL.md +124 -0
  94. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-code-review/evals.json +74 -0
  95. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-esm-migration/SKILL.md +152 -0
  96. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-esm-migration/evals.json +71 -0
  97. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-implementation/SKILL.md +127 -0
  98. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-implementation/evals.json +72 -0
  99. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-testing/SKILL.md +134 -0
  100. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-testing/evals.json +70 -0
@@ -13,7 +13,7 @@ triggers:
13
13
  - "review --legacy-profiles"
14
14
  metadata:
15
15
  author: "MrCipherSmith"
16
- version: "1.9.0"
16
+ version: "1.10.0"
17
17
  category: "review"
18
18
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
19
19
  license: "MIT"
@@ -1551,92 +1551,67 @@ When writing review report metadata or a PR comment:
1551
1551
  STATUS: DONE | DONE_WITH_CONCERNS
1552
1552
  ```
1553
1553
 
1554
- `DONE` — no blockers or majors found.
1555
- `DONE_WITH_CONCERNS` — one or more blocker or major findings present.
1554
+ `DONE` — no blockers or majors in the changed code.
1555
+ `DONE_WITH_CONCERNS` — one or more blocker or major findings in the changed code.
1556
+
1557
+ The machine `verdict` is unchanged (`APPROVE`, `APPROVE_WITH_SUGGESTIONS`,
1558
+ `REQUEST_CHANGES`). The prose does not print those tokens. It prints the line
1559
+ in `templates/review-report.md`: `Changes requested` or `No blockers, merge-ready`.
1560
+
1561
+ Render the human report from that file. Do not invent a second skeleton here.
1556
1562
 
1557
1563
  ```markdown
1558
- # Review Report
1559
-
1560
- ## Verdict: APPROVE | APPROVE_WITH_SUGGESTIONS | REQUEST_CHANGES
1561
- <!-- APPROVE: zero blockers/majors. APPROVE_WITH_SUGGESTIONS: minors/info only.
1562
- REQUEST_CHANGES: one or more blocker or major. -->
1563
-
1564
- ## Summary
1565
- <2-4 sentences: what the change does, overall code health, key concerns.>
1566
-
1567
- ## Review Scope
1568
- - Branch: `<BRANCH>`
1569
- - Parent ref: `<PARENT>`
1570
- - Merge-base: `<BASE_SHA>`
1571
- - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
1572
- - Reviewers dispatched: <comma-separated list>
1573
- - Changed files: <count>
1574
- - Context mode: `<none | light | full>`
1575
- - Model strategy: `<ask | adaptive>`
1576
- - Current model: `<actual current model id/name, or unknown>`
1577
- - Model assignment: `<per-reviewer tier/model from each dispatch's \`model\` block | unsupported>`
1578
- - Token budget: `<used/limit if known; omissions count>`
1579
-
1580
- ## Stats
1581
- - blocker: N
1582
- - major: N
1583
- - minor: N
1584
- - info: N
1564
+ **Changes requested — 1 Blocker, 2 Major, 4 Minor, 1 question.** Reviewed `<head>` against `<base>` (round N). <what holds, and where the risk is.>
1585
1565
 
1586
- ## Stage counts
1587
- <!-- Required. State what each stage REMOVED, and never state it as a precision
1588
- improvement: no precision baseline exists to improve on. The one measured
1589
- from the review packages on disk was 53/53 = 100% — pinned there by
1590
- construction, because nothing in that corpus could record a finding as
1591
- wrong. Copy these from `scope.md`; do not re-count by hand. -->
1592
- - dropped by pre-filter: <files>, <blocks>, <changed lines> (or `not recorded` if no scope was built)
1593
- - verification mode: `<off | annotate | filter>`
1594
- - verdicts: confirmed N, refuted N, unverifiable N, unverified N
1595
- - refuted by the verifier: N (removed: N — always 0 outside `filter`)
1596
- - retained: N
1597
-
1598
- ## Blockers (must fix before merge)
1599
- <[F-NNN] findings with severity=blocker, sorted by file>
1600
-
1601
- ## Major Issues
1602
- <[F-NNN] findings with severity=major>
1603
-
1604
- ## Minor & Info
1605
- <[F-NNN] findings with severity=minor or info>
1606
-
1607
- ## Checked and cleared
1608
- <Required whenever a reviewer tested a hypothesis and it did not hold. One line
1609
- each: the defect that was looked for, and the evidence that rules it out. Not a
1610
- list of virtues — a list of hypotheses that died, so no later round spends a
1611
- reviewer re-raising them.>
1612
-
1613
- ## Positive Notes
1614
- <Optional. Highlight things done well. Keep brief.>
1566
+ ### Blocker
1567
+ **F-001. <one-sentence claim>.** `path/to/file.ts:line`, in the diff.
1568
+ <proof: traced path, probe, or failing scenario>
1569
+ Fix: <concrete>
1570
+
1571
+ ### Major
1572
+ **F-002. <one-sentence claim>.** `path/to/file.ts:line`, pre-existing — render under Pre-existing instead when location_class says so.
1573
+
1574
+ ### Minor
1575
+ - **F-010. <claim>.** `path:line`, in the diff — <proof and fix, one to three sentences>.
1576
+
1577
+ ### Questions
1578
+ 1. <an info finding that needs an author answer; other info is not published>
1579
+
1580
+ ### Pre-existing (not blocking)
1581
+ - **F-020. <claim>.** `path:line` — <why it is out of this diff>
1582
+
1583
+ ### Verified clean
1584
+ - <what was checked> — <how>
1585
+
1586
+ ### How this review was run
1587
+ - **Run by:** @<gh-login> with `review-orchestrator`
1588
+ - **Scope:** `<base>..<head>`, round N, PR #N
1589
+ - **Orchestrator:** `review-orchestrator`
1590
+ - **<actual model name>:** <reviewers on that model>
1591
+ - **Not run:** <reviewer — reason>
1592
+ - **Verification:** <mode>; confirmed N, refuted N, unverifiable N, unverified N
1615
1593
  ```
1616
1594
 
1617
- ### Why `Checked and cleared` is separate from `Positive Notes`
1595
+ Pick the domain file the same way reviewers are picked: frontend scope, or a
1596
+ fullstack / paired PR, reads `templates/pr-comment-frontend.md`. Backend-only
1597
+ reads `templates/pr-comment-backend.md`. A paired PR always uses the frontend
1598
+ file and must include the wire-contract line.
1618
1599
 
1619
- They read alike and do opposite work. "Both entry points read the score from the
1620
- same report" is a virtue; it tells a later round nothing, because no round was
1621
- going to claim otherwise. "The drift bar cannot contradict the drift badge —
1622
- `schema-drift-table.ts:61` always seeds `ddl` and `distributed` is a primitive
1623
- boolean that is always serialized, so a backend match implies a `ddlTextDiffers`
1624
- match" is a **retired hypothesis**: it names the bug that was hunted and the fact
1625
- that kills it.
1600
+ ## Stage counts
1626
1601
 
1627
- The cost of omitting them is paid in rounds. A plausible-but-wrong finding that
1628
- was investigated and dropped in round 1 is investigated again in round 2 by a
1629
- different reviewer, and the author answers it twice. Writing the negative down
1630
- once ends that loop; it is also the only artifact that distinguishes *checked and
1631
- clean* from *never looked at*, which is the distinction an approving verdict rests
1632
- on.
1602
+ Required in **How this review was run**, copied from `scope.md`, not re-counted
1603
+ by hand. State what each stage removed. Never state it as a precision
1604
+ improvement: no precision baseline exists to improve on. The line carries
1605
+ `verification_mode` (`off | annotate | filter`), confirmed / refuted /
1606
+ unverifiable / unverified, and retained.
1633
1607
 
1634
- Entries come from the reviewers, not from you: a reviewer that dropped a candidate
1635
- returns it with the evidence, and consolidation collects them. A reviewer that
1636
- returns zero findings and zero cleared hypotheses has told you nothing about the
1637
- code, and should be asked once what it examined.
1608
+ `## Checked and cleared` is now **Verified clean**. Same rule: a hypothesis
1609
+ that was tested and died, with the evidence, not a list of virtues. There is
1610
+ no Positive Notes section. A compliment is not a result.
1638
1611
 
1639
- ---
1612
+ Tables: counts, ids, `file:line`, statuses, before/after, pass/fail only. A
1613
+ finding is a paragraph or a list item. A cell longer than about ten words is
1614
+ not a table cell.
1640
1615
 
1641
1616
  ## Skill Learning Handoff
1642
1617
 
@@ -1668,188 +1643,41 @@ the orchestrator's step.
1668
1643
 
1669
1644
  ## PR Review Report Publication
1670
1645
 
1671
- When the review target is a GitHub pull request, ask whether to publish the consolidated review report after the report is generated. A PR target is present when the user provided a PR URL/number, `gh pr view` resolves the current branch, or the caller passes `pr_number` / `pr_url`.
1672
-
1673
- Ask before publishing unless `publish_pr_review_report` was explicitly set by automation settings:
1646
+ When the review target is a GitHub pull request, ask whether to publish after
1647
+ the report exists, unless `publish_pr_review_report` is already set:
1674
1648
 
1675
1649
  ```text
1676
1650
  Publish this review report to the PR?
1677
1651
 
1678
- A) Concise PR comment only
1679
- B) Concise PR comment + detailed AI markdown artifact (recommended for follow-up fixes)
1652
+ A) PR comment only
1653
+ B) PR comment + follow-up file (recommended when a fix round will follow)
1680
1654
  C) Do not publish
1681
1655
 
1682
1656
  > pick a letter (default: C)
1683
1657
  ```
1684
1658
 
1685
- **Automation values:**
1686
- - `publish_pr_review_report: comment` or legacy `true` -> publish the concise PR comment only.
1687
- - `publish_pr_review_report: comment-and-ai-artifact` -> publish the concise PR comment and generate the detailed AI markdown artifact.
1688
- - `publish_pr_review_report: none` or legacy `false` -> do not publish.
1689
-
1690
- **Default:** do not publish without explicit confirmation. If no PR number can be resolved, skip publication and state that no PR target was available.
1691
-
1692
- ### Concise PR Comment
1693
-
1694
- The visible PR comment is for humans. It must be written in English only and stay
1695
- concise, under the brevity rule above: **the summary is at most two sentences and
1696
- carries a link to the artifact holding the detail.**
1697
-
1698
- The finding rows below are a bounded exception, not a licence: they exist because
1699
- a reviewer scanning a PR needs the blockers in front of them. Keep them to the
1700
- `blocker` and `major` rows; everything at `minor` or below goes behind the
1701
- `<details>` fold or, better, into the AI artifact and is linked. The full findings
1702
- set, the round history and the reasoning belong in the flow package — pasting them
1703
- here is the failure this rule names.
1704
-
1705
- ```markdown
1706
- ## AI Review Report
1707
-
1708
- **Verdict:** REQUEST_CHANGES
1709
- **Summary:** At most two sentences: the overall risk and the main merge blocker. Detail: <link to the AI artifact or the flow package>.
1710
-
1711
- | Severity | Area | Finding | Suggested Fix | Owner |
1712
- |---|---|---|---|---|
1713
- | blocker | `src/file.ts:42` | What is broken and why it matters. | Concrete fix direction, not a vague instruction. | author |
1714
-
1715
- <details>
1716
- <summary>Minor / info findings</summary>
1717
-
1718
- | Severity | Area | Finding | Suggested Fix |
1719
- |---|---|---|---|
1720
- | minor | `src/other.ts:10` | ... | ... |
1721
-
1722
- </details>
1723
-
1724
- ### Meta
1725
- | Field | Value |
1726
- |---|---|
1727
- | Orchestrator | `review-orchestrator` |
1728
- | Model | `<actual current model id/name, or unknown; never inherit or unsupported>` |
1729
- | Model strategy | `<ask | adaptive>` |
1730
- | Model assignment | `<per-reviewer tier/model from each dispatch's \`model\` block | unsupported>` |
1731
- | Agents run | `<reviewers actually dispatched, including fallback runtimes when used>` |
1732
- | Available reviewers | `<all reviewers considered by the orchestrator for this repository/runtime, grouped briefly as generic/convention/project/legacy when useful>` |
1733
- | Skipped reviewers | `<reviewers not dispatched with short reasons, e.g. no matching files, optional group not selected, unavailable native agent, PR number missing>` |
1734
- | Selection basis | `<auto-detected scope, explicit flags, user-selected optional groups, and why this reviewer set was chosen>` |
1735
- | Fallback/blocked reviewers | `<reviewers run via fallback or blocked because native agent/skill was unavailable, otherwise none>` |
1736
- | Scope | `<PR #N, base..head, merge-base>` |
1737
- | Commit | `<HEAD sha>` |
1738
- | Context | `<job/context path if provided, otherwise none>` |
1739
- | AI artifact | `<markdown link or file path to the detailed AI report when generated, otherwise none>` |
1740
- | AI artifact description | `<one concise human-readable sentence explaining that the linked markdown file contains detailed findings, fix guidance, patch guidance, regression coverage, validation plan, and follow-up agent context>` |
1741
- | Reviewed at | `<UTC timestamp>` |
1742
- ```
1743
-
1744
- ### Detailed AI Markdown Artifact
1745
-
1746
- When the user chooses option B, generate a separate English-only markdown artifact for AI follow-up work. Prefer a repository-local job/review path such as:
1747
-
1748
- ```text
1749
- jobs/reviews/pr-<number>/review-ai-report.md
1750
- ```
1751
-
1752
- If the review is running inside `job-orchestrator`, write it under the active job docs, for example:
1753
-
1754
- ```text
1755
- .metaproject/jobs/<job-name>/ai/review-ai-report.md
1756
- ```
1757
-
1758
- If the environment provides an external artifact mechanism, attach or upload that markdown file and put the link/path in the concise PR comment `AI artifact` meta row. If no attachment/upload mechanism exists, keep the file path in the comment and in `review_context.review_plan.publication_plan.ai_artifact_path`.
1759
-
1760
- The concise PR comment must also include an `AI artifact description` meta row whenever an AI artifact is generated. The description is for human readers and must explain what was added and what the file contains, for example: `Detailed AI follow-up report with expanded findings, fix guidance, illustrative patch guidance, Gherkin regression coverage, validation plan, and context for follow-up agents.`
1761
-
1762
- The AI artifact must use this structure:
1763
-
1764
- ```markdown
1765
- ---
1766
- review_run_id: <stable id, e.g. pr-5462-2026-06-13T10-22-00Z>
1767
- orchestrator: review-orchestrator
1768
- verdict: <APPROVE | APPROVE_WITH_SUGGESTIONS | REQUEST_CHANGES>
1769
- context_mode: <none | light | full>
1770
- model_strategy: <ask | adaptive>
1771
- current_model: <actual current model id/name, or unknown>
1772
- model_assignment: <per-reviewer tier/model from each dispatch's `model` block | unsupported>
1773
- agents:
1774
- - <reviewer>
1775
- scope:
1776
- pr: <number or null>
1777
- base: <base sha/ref>
1778
- head: <head sha/ref>
1779
- files_changed: <count>
1780
- generated_at: <UTC timestamp>
1781
- ---
1782
-
1783
- # AI Review Report
1784
-
1785
- ## Executive Summary
1786
- <Short machine-readable summary of merge risk and required fix order.>
1787
-
1788
- ## Review Context
1789
- <Bounded description of diff scope, requirements, omitted context, and assumptions.>
1790
-
1791
- ## Findings
1792
-
1793
- ### F-NNN: <title>
1794
-
1795
- - Severity: blocker | major | minor | info
1796
- - Reviewer: <reviewer>
1797
- - File: `path/to/file.ts`
1798
- - Lines: <line or range>
1799
- - Confidence: high | medium | low
1800
- - Status: open
1801
-
1802
- Problem:
1803
- <Detailed explanation of what is wrong.>
1804
-
1805
- Why it matters:
1806
- <Correctness, safety, maintainability, performance, or UX impact.>
1807
-
1808
- Evidence:
1809
- <Specific code references or behavior observed.>
1810
-
1811
- Suggested fix:
1812
- <Detailed fix plan with steps.>
1813
-
1814
- Patch guidance:
1815
- ```diff
1816
- <Optional illustrative diff. Keep it minimal and clearly mark if illustrative.>
1817
- ```
1818
-
1819
- Regression coverage:
1820
- ```gherkin
1821
- Feature: <feature or invariant>
1659
+ Automation values, names unchanged:
1822
1660
 
1823
- Scenario: <behavior that should not regress>
1824
- Given <initial state>
1825
- When <action>
1826
- Then <expected result>
1827
- ```
1661
+ - `comment` or legacy `true` -> the PR comment only.
1662
+ - `comment-and-ai-artifact` -> the PR comment plus the follow-up file.
1663
+ - `none` or legacy `false` -> do not publish.
1828
1664
 
1829
- ## Fix Order
1830
- 1. <Blocker/major fix sequencing with dependencies.>
1665
+ Default is do not publish. No resolvable PR number means skip and say so.
1831
1666
 
1832
- ## Validation Plan
1833
- - <Commands or checks to run.>
1667
+ The comment is the report in `templates/review-report.md`, English, with the
1668
+ domain file chosen above. It does not use a tool heading, a finding table, or
1669
+ a meta table. It does not carry a co-author line, a `Generated with` trailer,
1670
+ or any sentence that names a vendor or a product as the author. Say who ran
1671
+ the orchestrator and which reviewers ran; do not sign the comment as them.
1834
1672
 
1835
- ## Notes For Follow-Up Agents
1836
- <Context needed by an implementer agent; no secrets, raw prompts, or unrelated local paths.>
1837
- ```
1838
-
1839
- Formatting rules for PR comments and AI artifacts:
1840
- - English only, regardless of chat language or reviewer output language.
1841
- - Keep the visible comment concise: max 10 blocker/major rows before `<details>`.
1842
- - Put minor/info findings under `<details>` unless there are no higher severity findings.
1843
- - Every blocker/major row must include a concrete suggested fix.
1844
- - Include enough metadata to reproduce the review, but do not include internal prompts, raw logs, secrets, or unrelated local paths.
1845
- - The PR comment metadata must distinguish `Agents run` from `Available reviewers` and `Skipped reviewers`; never use a single `Agents` row that hides skipped or unavailable reviewers.
1846
- - `Skipped reviewers` must include short reasons from `review_context.routing.reasons`, `review_context.review_plan.skipped`, and dispatch/runtime compatibility checks.
1847
- - If the list is long, keep `Agents run` complete and summarize `Available reviewers` / `Skipped reviewers` by group with counts plus notable names; put full details in the AI artifact when one is generated.
1848
- - When `comment-and-ai-artifact` is selected, the PR comment meta section must include both `AI artifact` and `AI artifact description`; do not rely on the link alone.
1849
- - In the metadata table, `Model` must be the actual model id/name. Put `unsupported`, `adaptive`, or `ask` under `Model strategy` / `Model assignment`, not under `Model`.
1850
- - If posting via CLI, write the body to a temp file and use `gh pr comment <pr-number> --body-file <file>`; never inline a large heredoc into shell history.
1673
+ The follow-up file path and the metadata rules (real model names, Run vs Not
1674
+ run, no `adaptive` in the model slot) live in that same template. Write the
1675
+ body to a temp file and post with `gh pr comment <n> --body-file <file>`.
1851
1676
 
1852
- ---
1677
+ Re-read head and the thread immediately before posting. If head moved, re-check
1678
+ the findings against the new head and name the commits that were not reviewed.
1679
+ Do not post a finding another reviewer already filed on this head; if yours
1680
+ extends theirs, cite theirs.
1853
1681
 
1854
1682
  ## Job Context Awareness
1855
1683
 
@@ -65,6 +65,25 @@
65
65
  "reviewed_at": {
66
66
  "type": "string"
67
67
  },
68
+ "publication": {
69
+ "type": "object",
70
+ "description": "How the prose report was rendered. Does not replace verdict or status.",
71
+ "properties": {
72
+ "template": {
73
+ "type": "string",
74
+ "enum": ["frontend", "backend"]
75
+ },
76
+ "visible_verdict": {
77
+ "type": "string",
78
+ "enum": ["changes-requested", "merge-ready"]
79
+ },
80
+ "questions": {
81
+ "type": "integer",
82
+ "minimum": 0
83
+ }
84
+ },
85
+ "additionalProperties": false
86
+ },
68
87
  "token_policy": {
69
88
  "type": "object",
70
89
  "additionalProperties": true
@@ -121,6 +121,16 @@
121
121
  "type": "boolean",
122
122
  "default": false
123
123
  },
124
+ "location_class": {
125
+ "type": "string",
126
+ "enum": ["in-diff", "pre-existing", "pr-process"],
127
+ "description": "Where the finding sits, for rendering only. in-diff counts toward the merge verdict. pre-existing does not block. pr-process renders under Scope, not as a code finding. Absent means in-diff."
128
+ },
129
+ "publication": {
130
+ "type": "string",
131
+ "enum": ["finding", "question", "omit"],
132
+ "description": "How an info finding is shown. question renders under Questions. omit stays in the keryx:findings block and is not published as a finding. Absent means finding. Never changes severity."
133
+ },
124
134
  "class_scope": {
125
135
  "title": "Every site of this shape, and how the set was derived",
126
136
  "description": "A finding anchored to one file:line is a claim about one site. Repeatedly, a fix repaired that site and left its siblings — one writer of five, one operator instruction of four, six readers of eight — and the next review round found them. Required for blocker and major; optional below, because enumerating the class for every info finding is theatre. Kept identical to src/gdskills/contracts/review-finding.schema.json, which is stricter (additionalProperties: false) and would reject this property if it were declared only here.",
@@ -190,6 +190,11 @@
190
190
  "null"
191
191
  ],
192
192
  "description": "What the fix offered as proof: the test added, the mutation that went red, the command run."
193
+ },
194
+ "prior_findings_status": {
195
+ "type": "string",
196
+ "enum": ["open", "closed", "partial", "regressed", "withdrawn"],
197
+ "description": "What this round concluded about the prior finding, after checking the code. Distinct from claimed_disposition, which is what the fix asserted. Optional; the report still owes one line per prior finding."
193
198
  }
194
199
  },
195
200
  "additionalProperties": true
@@ -0,0 +1,50 @@
1
+ # PR comment — backend
2
+
3
+ Use when the scope is backend and there is no frontend twin in this PR.
4
+ A fullstack or paired change uses `templates/pr-comment-frontend.md` instead,
5
+ and still records the wire contract there.
6
+
7
+ Skeleton: `templates/review-report.md`. Render a Verified-clean bullet only
8
+ if that check was actually run.
9
+
10
+ ## Verified clean — render only what was checked
11
+
12
+ API and DTO
13
+
14
+ - The contract change is backward compatible, or the break is named and the
15
+ consumer PR is linked with a deploy order.
16
+ - Input is validated at the boundary, not trusted from the caller.
17
+ - Error codes match what the client branches on.
18
+ - The frontend consumer was read, not assumed.
19
+
20
+ Data
21
+
22
+ - Migrations reverse, and the reverse was read against the volume they run on.
23
+ - New filters have an index, or the finding says why the scan is bounded.
24
+ - Writes that must be atomic sit in a transaction; the isolation level is the
25
+ one the invariant needs.
26
+
27
+ Security
28
+
29
+ - Every new or changed endpoint checks authz, not only authentication.
30
+ - Queries are scoped to tenant / case / workspace.
31
+ - No string-built query, no secret in a log or a fixture.
32
+
33
+ Concurrency
34
+
35
+ - A retried command is idempotent, or the finding names the double-apply.
36
+ - Locks have a TTL and a heartbeat, or they are not locks.
37
+ - Retry has a bound and backpressure; a queue has a depth limit.
38
+ - Cache invalidation names the writer that was checked.
39
+
40
+ Tests
41
+
42
+ - The level matches the failure mode (unit for a branch, contract for a wire
43
+ shape, integration for a transaction).
44
+ - A wire-format change has a contract test against the bytes, not the builder.
45
+ - A fix cites the test that failed before it and passes after it.
46
+
47
+ ## Scope notes
48
+
49
+ Same as the frontend template: process remarks render under `### Scope` with
50
+ `location_class: pr-process`. They do not block on their own.
@@ -0,0 +1,52 @@
1
+ # PR comment — frontend
2
+
3
+ Use when the scope is frontend, or when the PR is fullstack / paired with a
4
+ backend PR. A paired PR uses this template and must include the wire-contract
5
+ line.
6
+
7
+ Skeleton: `templates/review-report.md`. This file is the Verified-clean
8
+ checklist. Render a bullet only if that check was actually run.
9
+
10
+ ## Verified clean — render only what was checked
11
+
12
+ React / MobX
13
+
14
+ - `observer` on every component that reads an observable.
15
+ - `runInAction` (or an action) after every `await` that writes state.
16
+ - Disposers run on unmount; an async callback checks them before writing.
17
+ - State that outlives the view lives in the store, not in `useState`.
18
+
19
+ Vantage conventions (skip a line the repository has no rule for)
20
+
21
+ - `t()` only in render, no `defaultValue`.
22
+ - Arabic plurals and FSI/PDI isolates where the catalog has them.
23
+ - `notifyError` on failure paths; no empty `catch`.
24
+ - No `as`, no `any`.
25
+ - `Storage` wrapper, not `localStorage`.
26
+ - Tailwind tokens, no inline `style` for theme values.
27
+ - Icon-only buttons have an `aria-label`.
28
+
29
+ `src/core` boundaries
30
+
31
+ - No import from a feature into core.
32
+ - A vendored surface (for example `report-blocks`) has no dependency on the app.
33
+
34
+ Tests
35
+
36
+ - The test level matches the behaviour under change.
37
+ - Network is mocked at the boundary (MSW), not by stubbing the client method.
38
+ - No test that cannot fail.
39
+ - A new component has the three stories the repository asks for.
40
+
41
+ Wire contract — required when a paired backend PR exists
42
+
43
+ - The payload, the error codes, and the null-vs-zero defaults were read in the
44
+ paired PR at a pinned ref, not assumed from the consumer.
45
+ - Deploy order is named. If the producer is still open and must merge first,
46
+ that is a finding against the call site, not a note.
47
+
48
+ ## Scope notes
49
+
50
+ A process remark (one task, size, missing Why / In scope / Out of scope) is
51
+ `location_class: pr-process` and renders under `### Scope`, not as a code
52
+ finding. Merge state is an input to the verdict, not a finding.