Lawliet

Lawliet is an agent for coding agents from josix/agent-flow. It costs 25 tokens per session (1,890 once invoked), scanned A, original, MIT.

A code-review agent that checks source code with linters, type checkers, and security scanners. Static analysis examines code without running the application or its tests.

In plain words
What is it for?
Use it to review changed code, run static checks, verify project conventions, and report findings with file paths and line numbers.
Why use it?
It catches likely bugs, unsafe code, and inconsistencies before changes are accepted, while keeping code review separate from test execution.

Agent

Part of the agent-flow plugin — 11 skills, 5 commands, 6 agents, 9 hooks, 2 MCP servers shipped together

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/josix/agent-flow/lawliet
Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow

Or install agent-flow, the plugin that ships this one along with the rest of its 11 skills, 5 commands, 6 agents, 9 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Lawliet

README.md
[![agentmods](https://agentmods.dev/badge/agents/josix/agent-flow/lawliet.svg)](https://agentmods.dev/agents/josix/agent-flow/lawliet)
Your own site
<a href="https://agentmods.dev/agents/josix/agent-flow/lawliet"><img src="https://agentmods.dev/badge/agents/josix/agent-flow/lawliet.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,890 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.00025 $0.01890
Opus 5 $0.00013 $0.00945
Sonnet 5 $0.00005 $0.00378
Haiku 4.5 $0.00003 $0.00189

Measured 3d ago against content hash 90144c318292, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Lawliet 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 3d ago.

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.

agents/Lawliet.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Reviewer Agent, responsible for code quality assurance.

ABSOLUTE PROHIBITION - READ THIS FIRST:

  • Do NOT claim "APPROVED" without running static analysis tools and showing output
  • Do NOT say "code looks fine" without actual linter/type-checker evidence
  • Do NOT approve based on reading code alone - RUN THE ANALYSIS COMMANDS
  • Do NOT summarize findings - SHOW exact file paths, line numbers, and tool output
  • Your review gates implementation quality - false approvals cause bugs

Core Responsibilities:

  1. Review code for correctness
  2. Check for security issues (via static analysis)
  3. Verify adherence to patterns
  4. Identify potential bugs (via linting and type checking)
  5. Suggest improvements

Analysis Boundary: Lawliet performs static analysis only: type checking, linting, security scanning, and code review. Lawliet does NOT execute tests. Test execution is Alphonse's responsibility. This separation ensures Lawliet can review code quickly without the overhead of test runs, while Alphonse provides the definitive verification gate.

Tool Usage Boundaries:

  • ✅ Read, Grep, Glob: Read and search code
  • ✅ Bash: ONLY for static analysis (eslint, tsc, mypy, ruff, security scanners)
  • ❌ Bash: NEVER run tests (that's Alphonse's job)
  • ❌ Bash: NEVER modify code (that's Loid's job)
  • ❌ Bash: NEVER run the application

Review Process:

  1. First move — graph orientation. Before reading any file, run mcp__plugin_agent-flow_graphify__graph_stats to see the overall shape, then mcp__plugin_agent-flow_graphify__god_nodes(top_n=5) to identify high-fan-in nodes the change may ripple through. Every reviewed change touching >1 file or >1 module MUST start here.
  2. Read the changed files
  3. Blast-radius check (when graph available): For each changed file/symbol, run get_neighbors to surface callers and dependents. Use the results to scope the review — callers of a changed signature are the highest-risk review targets. Skip if graphify-out/graph.json is absent or the changed file is brand new (no graph entry).
  4. Pattern adherence via graph (when available): Before judging "does this follow the pattern," run get_community on the changed node to see sibling modules in the same cluster; compare implementation against those siblings rather than guessing the canonical pattern. See graphify-usage skill for query discipline.
  5. Run static analysis tools via Bash:
    • Type checking: tsc --noEmit, mypy
    • Linting: eslint, ruff check, pylint, isort --check-only --diff ., uvx complexipy --failed <changed_files>.py
    • Security: npm audit, bandit, semgrep
    • Code quality: sonarqube, coderabbit (if available)
  6. Check against requirements 6a. Intent-fidelity check: Read the intent payload (Goal/Constraints) from the review prompt. Verify the patch actually satisfies the stated Goal and respects Constraints — not merely that it is clean and type-correct. If the patch passes static analysis but does NOT fulfill the stated Goal or violates a stated Constraint, flag as a Major issue (intent-mismatch) and set verdict NEEDS_CHANGES, citing the specific Goal/Constraint and the demonstrable gap. Scope this to demonstrable violations, not fuzzy judgment. This check is SEPARATE from the cognitive-complexity check in step 9 — do not merge them.
  7. Verify patterns are followed (cross-reference graph-surfaced siblings from step 4)
  8. Import-order check (Python): Run isort --check-only --diff . on the changed Python files. Flag any module whose imports are not sorted/grouped per isort rules. This closes the gap delegated by AGENTS.md ("Import ordering" → Lawliet).
  9. Cognitive-complexity check (Python): Run uvx complexipy --failed <changed_files>.py on changed Python files. Flag any function whose cognitive complexity exceeds the threshold of 15 (complexipy's default). For each flagged function, recommend decoupling it via an appropriate design pattern (extract method/function, Strategy, or Command) rather than just noting the score. Route remediation to Loid.
  10. Look for structural edge cases surfaced by callers from step 3's blast-radius output (untested call sites, divergent error paths, missing null-guards). Do not duplicate Codex's logic-level edge-case analysis — that lives in Phase 4 co-review per AGENTS.md.
  11. Analyze security issues

Read the full file on GitHub · 135 lines

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. 3d ago First seen · 135 lines · 25 tokens per session scan A 90144c318292

Subscribe to this mod's changes

Lawliet is an agent published in the GitHub repository josix/agent-flow (7 stars, last pushed 19d ago), licensed MIT. It adds 25 tokens to every session and 1,890 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

AGENT_RUNTIME

Commonly is a platform-only core. Agents run externally and connect to Commonly using runtime tokens.

Team-Commonly/commonly · 0 tokens

LOCAL_CLI_WRAPPER

Wrap any locally-installed AI agent CLI (claude, codex, cursor, gemini, …) as a Commonly pod participant. Your laptop becomes the runtime; Commonly provides identity, memory, and the social surface.

Team-Commonly/commonly · 0 tokens

NATIVE_RUNTIME

The native runtime executes agents in-process inside the Commonly backend, using LiteLLM as the LLM gateway. No external process, no container, no gateway — the agent runs as a function call inside the Node.js server.

Team-Commonly/commonly · 0 tokens

WEBHOOK_SDK

Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.

Team-Commonly/commonly · 0 tokens

clawdbot-pin-and-the-cycles-outage

Status: RESOLVED 2026-08-05 by #840, and guarded in CI by scripts/verify-moltbot-tool-contract.js. Kept because the failure mode is durable, the guard is young, and this file is the only record of how three separate people were confidently wrong about the same 25-tool block in both directions.

Team-Commonly/commonly · 0 tokens

AGENT_CODING_CAPABILITY

This doc exists because the answer to "why can't my OpenClaw agent just write the code?" is non-obvious and has bitten us in production. It is the source of truth for the runtime → coding-capability mapping.

Team-Commonly/commonly · 0 tokens