Skip to content
Agentmart
Submit a tool

governed-code-review

Governed code review of delivered PRs against the work order before the QA gate.

Skill by TribalScale

IndexedApache-2.0★ 2
Write a review

Chalk Labs

Need help deploying governed-code-review?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tribalscale-governed-code-review

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Governed code review of delivered PRs against the work order before the QA gate. Use for the verified_merge code_review stage.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/governed-code-review

What's inside

Skill name
governed-code-review
Description
Governed code review of delivered PRs against the work order before the QA gate. Use for the verified_merge code_review stage.
License
Apache-2.0
Instructions
119 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Governed Code Review

`governed-code-review` runs in the `code_review` stage, after the PR's CI checks
finish (`await_pr_checks`) and `review_precheck` has collected the diff, and
before `qa_gate`. You review the diff and return findings. You do not decide
whether the PR passes: `finalize_code_review` computes the verdict from your
findings, posts one `COMMENT` review with inline comments, and sets the
`harness/code-review` status.

You never approve a PR, never request changes, never merge, and never edit code.

## Start Here

At invocation, announce:

> "I'm running the governed code review over the delivered PR diff."

Then:

1. Read `input.prs` (PR URL and head SHA). The PR set you report back **must
   equal** this set exactly.
2. Read `input.files`: each changed file with `filename`, `status`,
   `additions`, `deletions`, `patch` (truncated at 20k characters; see
   `patch_truncated`) and `pr_url`. Lock files and generated code may already
   be excluded; `input.diff_stats` has the totals.
3. Read `input.work_order_body` and `input.work_order_ref`. Judge scope against
   its **In Scope** and **Out of Scope** sections (and a `## Files` list when
   present).
4. Read `input.scope_findings`. These are deterministic findings for files
   outside a declared `## Files` list; they are merged automatically, so do
   not repeat them.
5. If `input.refresh` is `true`, the PR was just updated with its base branch.
   Focus on the merge delta and any conflict resolution; do not re-review code
   that was already reviewed unless the merge changed it.
6. Trace every bullet under **Requirements** and every **Acceptance Test** to
   the code that implements it. Evaluate the code by hand with the example
   values the work order gives, including each boundary it names ("100 or
   more", "exactly 50 units"). A mismatch is a `major` `correctness` finding
   even when CI passes: CI only runs the tests the PR wrote.
7. If the work order contradicts itself, Requirements and Acceptance Tests win
   over Implementation Notes. Code that follows a contradicting note is still a
   `correctness` finding; say which lines of the work order conflict.
8. Apply the checklist below to every changed file and return the envelope.

## Review Checklist

| Category | What to check |
| --- | --- |
| `correctness` | Logic matches the work order's requirements, edge cases, null safety, error handling, off-by-one, concurrency |
| `security` | No secrets, input validation, injection, authn/authz checks, unsafe deserialization, OWASP top 10 |
| `scope` | Changes stay inside In Scope; nothing from Out of Scope; no unrelated refactors |
| `tests` | New behaviour has meaningful tests; assertions check outcomes; no flaky patterns |
| `maintainability` | Naming, dead code, duplication, following the repo's existing patterns |

## Severity

| Severity | Use for |
| --- | --- |
| `blocker` | Broken functionality, data loss, a security hole, or a change that cannot ship |
| `major` | A real defect or risk that must be fixed before merge |
| `minor` | Worth fixing, but not a merge risk |
| `nit` | Style or preference |

A `blocker` in any category, or a `major` in `correctness`, `security` or
`scope`, blocks the PR and sends it back to the dev agent with your findings.

Calibrate `correctness` against the work order, not your preferences:

- Code that gives a wrong result for a case the work order states (a
  requirement, an acceptance test, a named boundary) is at least `major`
  `correctness`, never a `tests` finding. Name the input and the expected and
  actual result.
- Hardening the work order does not ask for ("consider validating negative
  quantities") is `minor` at most. "Consider ..." is never `major`.
Be specific: every finding needs a `message` a developer can act on, and a
`file` and `line` (a line in the new version of the file) when it is about a
particular place.

## Output Contract

```json
{
  "result": {
    "verdict": "pass",
    "summary": "Implements the endpoint as specified; one missing edge-case test.",
    "prs": [{ "pr_url": "https://github.com/org/repo/pull/123", "head_sha": "abc123" }],
    "findings": [
      {
        "severity": "minor",
        "category": "tests",
        "pr_url": "https://github.com/org/repo/pull/123",
        "file": "src/api/orders.py",
        "line": 42,
        "message": "Add a test for an empty cart; the new branch at line 42 is untested."
      }
    ]
  }
}
```

Rules enforced by the `validate_code_review_envelope` semantic validator:

- `result.prs[].pr_url` set **==** the input PR set, exactly.
- Every finding's `pr_url` is one of the input PRs.
- `severity` is one of `blocker`, `major`, `minor`, `nit`; `category` is one of
  `correctness`, `security`, `scope`, `tests`, `maintainability`.
- `verdict` is your opinion (`pass` or `block`). The computed verdict wins; a
  mismatch is recorded as a warning.

An empty `findings` list is a valid, passing review. Do not invent findings to
look thorough, and do not hide real ones to pass.

## Not In Scope

- Approving, requesting changes on, or merging PRs.
- Editing code, pushing commits, or opening PRs.
- Re-running CI or the test suite (CI results are already in `await_pr_checks`).

From TribalScale/ts-harness, Apache-2.0.

More from TribalScale/ts-harness

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Oct 23, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from TribalScale

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get governed-code-review running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying governed-code-review?

CallGet help
Cite this page

governed-code-review skill. Agent Mart. https://agentmart.dev/skills/tribalscale-governed-code-review (last updated 2026-10-24)