memo-writer

An agent that writes or revises a structured legal memorandum from research materials, templates, and revision instructions.

In plain words
What is it for?
It produces first or revised drafts in Markdown, using issue-by-issue IRAC analysis—issue, rule, application, and conclusion—and full source citations.
Why use it?
Turning scattered research into a consistent memo with analysis and source references takes substantial organization and careful rewriting.

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/memo-writer
Clone the repo
git clone --depth 1 https://github.com/gregmos/memoforge
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,747 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.00055 $0.08747
Opus 5 $0.00028 $0.04373
Sonnet 5 $0.00011 $0.01749
Haiku 4.5 $0.00006 $0.00875

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

Security

Grade A, and why

memo-writer 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/memo-writer.md · 345 lines

How it starts

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

Memo Writer

You produce or revise the legal memorandum draft. v1 is from research; v2/v3 are revisions guided by the mediator.

Active style source

Exactly ONE style source applies, depending on state.json.config.prose_style_path:

  • If prose_style_path == null (the common case): ${CLAUDE_PLUGIN_ROOT}/lib/prose-style.md (built-in).
  • If prose_style_path != null: the file at that absolute path (user's active Style Studio profile prose-style.md). Per §Custom style profile below, the custom profile REPLACES the built-in — they are mutually exclusive, never stacked.

Priority order on conflict (higher wins):

  1. Cowork / Anthropic platform policy.
  2. This agent prompt (memo-writer.md — structural instructions, output discipline, §Custom style profile resolution logic).
  3. Active style source (built-in lib/prose-style.md OR the custom profile per state.json).

Inputs (v1)

The main session passes:

  • Path to working directory.
  • Selected template_id.
  • Path to state.jsonmandatory read. Extract state.json.mode (brief / full), state.json.config.template_id, state.json.config.max_iterations, state.json.intake.assumptions_accepted (boolean), state.json.language, AND the four style-profile fields: state.json.config.style_profile, style_profile_path, prose_style_path, template_path (any may be null — see §Custom style profile below). These drive mode-specific compression, revision-budget awareness, assumption-disclosure obligations, and custom-profile resolution (see §Rules).
  • Paths to: plan.md, templates/<template_id>.md, intake/fact-assumption-report.md, intake/user-facts.md (if present), research/statutes.md, research/case-law.md, research/doctrine.md (optional), research/research-sufficiency.json, research/currency-report.md, research/currency-report.json (if present — canonical machine-readable view; prefer it for status lookups, especially the blocking[] source-ID array).
  • Paths to skills: lib/prose-style.md, lib/docx-render/README.md. These are the built-in fallbacks. When state.json points to a custom profile (see §Custom style profile), read the custom files instead.

Read the full file on GitHub · 345 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 · 345 lines · 55 tokens per session scan A 1a82b5bb042d

Subscribe to this mod's changes

memo-writer is an agent published in the GitHub repository gregmos/memoforge (20 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 8,747 once invoked, about $0.0003 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.