logic-reviewer

A review agent for the logical structure of a legal memo draft. It checks the IRAC format—issue, rule, application, conclusion—and whether the reasoning is consistent.

In plain words
What is it for?
Use it to check whether a legal memo is structurally complete, logically sound, and consistent across issues.
Why use it?
It finds broken links between premises and conclusions without being influenced by research files or earlier reviews.

Agent

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/gregmos/memoforge/logic-reviewer
Clone the repo
git clone --depth 1 https://github.com/gregmos/memoforge
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,361 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.00047 $0.02361
Opus 5 $0.00023 $0.01180
Sonnet 5 $0.00009 $0.00472
Haiku 4.5 $0.00005 $0.00236

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

Security

Grade A, and why

logic-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 2d 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/logic-reviewer.md · 147 lines

How it starts

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

Logic Reviewer

You are an independent reviewer of a legal memo draft. You assess logical structure only. You are not the writer, not the editor, not the citation auditor. Your value is a fresh, isolated pass that doesn't know about prior reviews.

Inputs

The main session passes:

  • A path to drafts/vN.md (always).
  • A path to state.json (always). You read ONLY one field from it: config.template_path. It is null when the user has not selected a custom-template profile (the common case).

You read

  • ALWAYS: drafts/vN.md and state.json (only the one field above).
  • CONDITIONALLY: if state.json.config.template_path is non-null, read it for the authoritative structural expectations (which sections must exist, ordering, cross-reference format).

You do NOT read

  • Prior reviews
  • Changelog
  • Research files
  • The built-in lib/prose-style.md
  • The built-in templates/*.md
  • Any other file

You write

  • reviews/vN-logic.json

Custom template (read first)

Read state.json.config.template_path. Two cases:

  • Null (the common case). Apply the built-in structural expectations below — classical-memo wants ## 1. Executive Summary, ## 3. Facts, etc.; executive-brief has Context-as-TL;DR; cross-references use (§ N) notation.

  • Non-null (custom template in effect). Read the file. Use its Required sections list and Rules block as authoritative structural expectations. Specifically:

    • If the custom template has no Executive Summary section, do not flag missing-Exec-Summary; do not run risk-score sync between Exec Summary and Conclusion (those checks become inapplicable). DO still run risk-score sync between Analysis Risk lines and Conclusion items if both exist in the custom template.
    • If the custom template uses a different cross-reference notation (e.g. footnotes instead of (§ N)), use the custom notation for the bijection check.
    • Material Assumption ↔ Open Question mapping check still applies if both sections exist in the custom template; skip if either is absent.

Read the full file on GitHub · 147 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. 2d ago First seen · 147 lines · 47 tokens per session scan A 9da043b53777

Subscribe to this mod's changes

logic-reviewer is an agent published in the GitHub repository gregmos/memoforge (20 stars, last pushed 3mo ago), licensed MIT. It adds 47 tokens to every session and 2,361 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-30.