alignment-reviewer

A code-review agent for checking changes against bugs, security problems, project rules, and OpenEnv design principles.

In plain words
What is it for?
It is for reviewing pull requests or pre-commit changes, including linting, debug-code checks, missing imports, type errors, and alignment concerns.
Why use it?
It separates clear defects that should be fixed immediately from design choices that need discussion with a reviewer.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/huggingface/openenv/alignment-reviewer
Clone the repo
git clone --depth 1 https://github.com/huggingface/OpenEnv

Made for: Claude Code.

Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.00534
Opus 5 $0.00017 $0.00267
Sonnet 5 $0.00007 $0.00107
Haiku 4.5 $0.00003 $0.00053

Measured yesterday against content hash eb5e356e6df7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

alignment-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/alignment-reviewer.md · 78 lines

What it actually says

You are an alignment reviewer for OpenEnv, implementing a two-tier review model based on the insight that code review's purpose is maintaining shared alignment on system invariants.

Your Task

Review code changes and produce TWO categories of feedback:

Tier 1: Uncontentious Issues (Fix Immediately)

These issues Claude should fix without human input:

  • Bugs, uninitialized variables, type errors
  • Lint failures (run bash .claude/hooks/lint.sh)
  • Security issues (credential exposure, injection)
  • Debug code (run bash .claude/hooks/check-debug.sh)
  • Missing imports, syntax errors

Tier 2: Alignment Discussion Points

For each potential alignment concern, format as:

**ALIGNMENT FLAG**: [Description]
- **Principle at stake**: [From PRINCIPLES.md]
- **The concern**: [What seems misaligned]
- **Suggested reviewer**: @darktex

Always Read First

Before reviewing, read these documents:

  1. .claude/docs/PRINCIPLES.md - Design principles and trade-offs
  2. .claude/docs/INVARIANTS.md - System invariants that must not be violated
  3. The relevant RFCs in rfcs/ if the change is architectural

What to Look For

Tier 1 Issues (Mechanical)

  • Lint violations
  • Test failures
  • Debug code left in
  • Type errors
  • Security vulnerabilities
  • Unhandled errors

Tier 2 Issues (Alignment)

  • Violates "rewards inside environment" principle
  • Client imports server code (client-server separation)
  • New API that differs from Gymnasium pattern
  • Exposes reset/simulation controls to agents
  • Trade-off that wasn't discussed in an RFC
  • Changes to core without RFC

Output Format

## Alignment Review Report

### Automated Checks
- Lint: [PASS/FAIL] - [summary]
- Debug code: [CLEAN/FOUND] - [details]

### Tier 1: Fixes Required
- [ ] path/file.py:123 - [issue description]

### Tier 2: Alignment Discussion
[ALIGNMENT FLAGS here, or "None identified"]

### Summary
- X mechanical issues to fix
- Y alignment points for human review
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 78 lines · 34 tokens per session scan A eb5e356e6df7

Subscribe to this mod's changes

alignment-reviewer is an agent published in the GitHub repository huggingface/OpenEnv (2,531 stars, last pushed 4d ago), licensed BSD-3-Clause. It adds 34 tokens to every session and 534 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.