memoforge

From one legal question to a finished .docx memo.

Plugin for Claude Code and Cowork that runs the pipeline of a small legal team: intake, parallel research across ten legal databases, IRAC drafting, four reviewers and up to two revision rounds. Since v2 the pipeline lives in tested code, not in the model's memory. You ask. The plugin works. You read.

v2.0.0 Claude Code + Cowork 10 legal MCP servers EN · DE · FR · ES · RU MIT

From a research-grade question to a court-citable memo.

A four-stage flow runs underneath: intake gathers facts and scope; researchers go out in parallel, one per layer of authority; code freezes the source pack; the writer drafts IRAC; four reviewers stress-test the draft, a mediator consolidates their findings, the writer revises up to two rounds, and a client-readiness polish ships the .docx. Ten steps, two checkpoints that always fire and one that fires only on exceptions.

Intake
triage · plan · approve
Lawyer
Research
statutes · cases · doctrine
Parallel
Draft
IRAC · full citations
Writer
Review & Ship
peer review · polish · export
.docx
Where it stops to ask you

Intake answers and plan approval, every time. Source review only when something needs you: a critical source left unresolved, conflicting authority, an exhausted database quota. Clean research goes straight to drafting. Everything between pauses runs on its own.

Intake2 steps
01
TriageChecks which databases answer, flags missing facts, proposes safe defaults. You answer.
02
PlanningJurisdictions, issues, source types, your style profile. You approve.
Research3 steps
03
Parallel researchStatutes and case law, doctrine when the plan calls for it. Every source text saved and certified.
04
Sufficiency & currencyGaps go back to research; stale or repealed law is flagged.
05
Source packFrozen by code: nothing new gets in. You review only on exceptions.
Draft1 step
06
DraftingIRAC per issue, a risk line per subsection, quotes extracted from the pack.
Review & ship4 steps
07
Peer reviewFour reviewers, fixed binary checklists, in parallel.
08
Mediate & reviseOne instruction list per round; the writer revises, up to 2 rounds.
09
PolishOne client-readiness pass.
10
ExportFormatted .docx, summary, source pack and audit trail.
Walkthrough · 1:03 · recorded on v1.1.1; v2 is the same shape with fewer, better-checked steps

Why naive memo prompts produce unusable memos.

Hallucinated citations. One model writing one draft will invent statutes and misquote cases. The model that wrote the citation has no incentive to verify it, so nothing catches the error before it reaches your inbox.

No contrary authority. The same model that drafted the analysis will not stress-test it. You get a confident one-sided read — and no idea where opposing counsel would attack first.

No currency check. A 2022 judgment that was overruled in 2024 will still show up as authority. A regulation cross-referencing a repealed act will still get cited. Nothing flags it.

Lost bookkeeping. A long run outlives the model's context. When the conversation gets summarised, the step that froze the sources or counted the revisions is the first thing to go, and the memo still comes out looking finished.

The fix

memoforge runs specialists that disagree with each other before the memo ever reaches you.

Researchers pull primary acts and case law. A citation auditor checks that every claim traces to a source. A currency checker verifies the law is still current. A counterargument reviewer reads the draft the way a regulator or opposing counsel would. A mediator consolidates the disagreements into one revision list, and a client-readiness reviewer makes the final call.

And since v2 the pipeline is code, not a prompt. Phases, budgets, source freezing, citation provenance and every write to the run's state belong to a Python package (the mf CLI) with about 3,600 offline tests behind it. The model follows one three-command protocol, next → act → report, and holds nothing that summarisation can erase.

The output isn't generic disclaimers. It's a memo with named contrary authority, a risk line per point, quotations you can check against the source, and recommendations a partner can actually sign off on.

One full memo for lawyers. A three-page brief for the person who decides.

There is no mode to pick any more: every run is Full, and the v1 Brief mode is gone. When the memo is done, /memoforge:brief condenses it for a decision maker who is not a lawyer, and checks that the short version still says what the memo says.

/memoforge:memofor lawyers
Research
statutes + case law; doctrine when the plan calls for it
Reviewers
logic, form, citations, counterarguments
Revisions
up to 2 rounds
Polish
one client-readiness pass
Languages
EN, DE, FR, ES, RU

The research-grade memorandum: IRAC per issue, a risk line per point, a frozen source pack and an honest verdict. Multi-part questions are fine; each part becomes its own analysed issue.

/memoforge:brieffor the decision maker
Length
about 3 pages
Built from
the finished memo only, no new research
Keeps
high risks, amounts and sanctions, what you asked, actions due within 14 days
Checks
fidelity against the memo, readability for a non-lawyer, up to 2 rounds

A bottom line, one block per kept conclusion with its risk and the rule it rests on, what to do, what the answer depends on, and one line for every point left out. Nothing added, no condition dropped, no risk level moved. The memo itself is never touched.

Eleven specialists for the memo, two for the brief. Code keeps the books.

Each agent does one thing and challenges the next one's output. A researcher doesn't review form. A logic reviewer sees the draft and nothing else. Disagreement is the design, not a bug. Every agent that judges substance runs on Opus; only the writer's model is yours to choose.

Intake1 agent
runs once · gates planning
fact-assumption-analyst
Finds the missing facts and legal variables that would change the answer, proposes a safe default for each, and runs a short preliminary pass for sources.
Research1 agent · one dispatch per layer, in parallel
routes across ten legal MCP servers
legal-researcher
Researches one layer of authority per dispatch: statutes, case law, or doctrine when the plan calls for it. Follows the routing order for its layer and jurisdictions and returns findings grouped by issue.
Quality gates2 agents + code
block drafting if any gate fails
research-sufficiency-reviewer
Decides whether the research supports a client-ready memo, and sends the gaps back to a researcher or to you.
currency-checker
Checks every registered source for repeal, amendment, the standing of judgments and the age of guidance. Blocking ones are listed apart.
mf sources save
Not an agent. Code fetches, certifies and registers each source text: raw copy, SHA-256, currency date. Once the pack is frozen, nothing new gets in.
Drafting1 agent
IRAC per issue · cites only the source pack
memo-writer
Writes every version: the first draft, the lint fix, each revision and the final polish. Citation tokens, extracted quotations and a risk line per subsection. Runs on Opus, Fable or Sonnet, your choice.
Peer review4 agents · parallel
fixed binary checklists
logic-reviewer
Conclusion first, the rule explained, the rule applied to the facts, subsections consistent with each other. Sees the draft and nothing else.
form-reviewer
Structure of each subsection, headings, readability for a business reader, house-style discipline. Tags every issue as clarity or style.
citation-auditor
Source drift, a source used against its role in the pack, and claims of law that stand on no source at all.
counterargument-reviewer
Reads the draft the way a regulator or opposing counsel would: contrary authority, overconfident conclusions, hidden assumptions, understated exposure.
Polish2 agents
consolidate · ship
revision-mediator
Turns the reviewers' issues into one instruction list for the writer, one instruction per section. Anything dropped is recorded and explained.
client-readiness-reviewer
Final delivery review: could this go to a client or a senior stakeholder as it stands? Returns what one polish pass must fix.
Decision brief2 agents
/memoforge:brief · after the memo
brief-writer
Writes the three-page brief from the delivered memo for a reader who is not a lawyer. Adds nothing the memo does not say.
brief-fidelity-reviewer
Checks the brief against the memo: no new claim, no dropped condition, no shifted certainty, no open point presented as settled.
Plus the orchestrator: your Claude Code or Cowork session. In v2 it holds no pipeline knowledge. It asks the mf CLI for the next step, does that one step, dispatches the specialists, and reports back; phases, budgets and state live in code. You answer; it dispatches.

Not just a memo — the whole audit trail.

Every memo ships with the source pack it was built on, the reviewers' findings, the run's diagnostics and an honest verdict. The work dir keeps every draft version and every lint report besides. If a partner asks "where did this citation come from?", the answer is one folder away.

memoforge/<slug>/
memo-<slug>.docx The memorandum: Arial 12pt, 1″ margins, numbered sections, IRAC per issue, in English, German, French, Spanish or Russian. Short inline citations linked to the source with a Sources annex, or real Word footnotes if you prefer.
summary.md The run summary: the verdict, any blocking issues and reviewer findings left open, the database calls made.
sources/ The frozen source pack: every statute, case and regulator document the analysis relies on, each with its raw text, a SHA-256 and a currency date.
_run/ The diagnostics: state.json, the events.jsonl journal, the plan, the intake facts, the sufficiency verdict and the reviews.
memo-<slug>.brief.docx After /memoforge:brief: the three-page decision brief, saved beside the memo.

Every quotation in the memo was extracted from the saved source text by exact match, not recalled by a model. A quote that cannot be matched is refused, and the refusal is recorded. The citation auditor checks the rest: a claim of law that traces to nothing in the pack gets flagged and revised before export.

And the verdict is honest: approved_on_v<N>, forced_exit_on_v<N>_with_remaining_issues (revision budget spent with blockers left), manual_review_required_on_v<N>, or fallback_summary_delivered when a dependency failed. A run never ends empty-handed: without python-docx you still get a markdown memo with a banner explaining why. No false confidence.

Make every memo sound like your firm wrote it.

By default the writer follows a built-in house style: concise, no em-dashes, OSCOLA citations. Style Studio turns a folder of your own example memos (or a written style guide) into a saved profile that sets the prose style and the template. Form review defers to your rules; substantive checks (citations, IRAC structure, contrary authority) stay uniform.

01
Extract your style
Point Style Studio at a folder of past memos, or give it your written rules. It saves a plain-markdown profile in the plugin's data directory. Open and tweak it by hand any time.
›/memoforge:style new my-firm --examples ~/memos/2025-q4/
02
Use it
When profiles exist, the plan checkpoint offers them as a choice; use makes one the default. A profile sets the voice, headings and template, never the scope of the research. The writer and the form reviewer read your rules instead of the defaults.
›/memoforge:style use my-firm

Skip Style Studio entirely and memoforge runs identically to its defaults — no extra prompts, no behavioural change. Profiles are opt-in.

Install. Connect the databases. Ask.

memoforge runs in Claude Code and in Cowork. It registers ten legal MCP servers; click Connect on each in the plugin panel (the first call may open a sign-in). Skipping this is supported: research falls back to official portals via WebFetch, and the memo carries a banner asking you to verify each citation by hand.

01
Install the plugin
Claude Code: add the marketplace, then install. Cowork: open Settings → Plugins and drag in memoforge-<version>.zip from the latest release.
›/plugin marketplace add gregmos/memoforge ›/plugin install memoforge
02
Install three Python packages
jsonschema, python-docx and mistune, into the plugin's own data directory where they never touch your project. The plugin answers without them, and a run without them still delivers a markdown memo.
›<plugin>/scripts/mf deps install
03
Ask a question
Run /memoforge:memo with your legal question. Multi-part questions are fine: each part becomes its own analysed issue with its own citations. Say "memo in German" to switch the language. /memoforge:status shows where a task stands; /memoforge:continue resumes one.
›/memoforge:memo "<your legal question>"
The bundled databases

Together they cover the EU, the UK, the US, France, Switzerland and Russia, and Legal Data Hunter reaches 230+ jurisdictions. Seven of the ten are free and need no key.

legal-data-hunterStatutes, case law and regulator guidance across 230+ jurisdictions.
courtlistenerUS case law, and the check that a US citation exists at all.
federal-regulationsUS: the Code of Federal Regulations and the Federal Register.
legalvizEU legislation: CELEX lookup, article-level text, the CJEU judgments on a provision, amendments.
uk-legalUK: legislation.gov.uk with in-force data, Find Case Law down to the paragraph, OSCOLA resolver.
lexUK, by i.AI: explanatory notes and amendment history.
justicelibreFrance: code articles, Cour de cassation, Conseil d'État, Conseil constitutionnel, CNIL, without a PISTE account.
opencaselawSwitzerland: federal law by SR number, a million decisions back to 1875, commentary.
casusRussia: positions of the Constitutional, Supreme and former Supreme Arbitration Courts. Paid account.
fas-searchRussia: 8,000 FAS decisions under the Law on Advertising.
Where it stops to ask you

Two checkpoints every run, a third only on exceptions. In between, a live dashboard page follows the run step by step, and every subagent tile is labelled with how far along it is.

Intake
Up to 10 questions about facts the analyst could not infer. Answer by letter, or type proceed to accept the stated defaults.
1A 2C 3: <facts>
Plan
One card with the research plan (jurisdictions, issues, source types) and your style profile, if you have one. Approve, edit or cancel.
approve
Source review
Only when research hit an exception: a critical source unresolved, conflicting authority, an exhausted quota. Clean research goes straight to drafting.
continue
Example queries that already work
Does our US SaaS need a CCPA notice at collection for B2B-only users?
Is a click-wrap arbitration clause enforceable against UK consumers under the Consumer Rights Act 2015?
Risk analysis for using AI to classify employee emails under the EU AI Act.
Can we process biometric data for minors in the EU under GDPR Art. 9 and Art. 22?

What memoforge won't do — and where your data goes.

memoforge assumes no jurisdiction: the plan step classifies the query and routes research accordingly. Its strong ground is EU data protection (GDPR, AI Act, NIS2, DSA), US privacy and sectoral regulation, UK consumer law and cross-border compliance. The honest caveats are below.

Not a substitute for a lawyer. The memo is a research-grade draft. A qualified lawyer must review it before any client use, especially for regulated advice. The verdict at the end of the run is a signal, not a sign-off.

Five memo languages. English, German, French, Spanish and Russian; English by default whatever language you ask in. The reviewers' findings, CLI errors and run diagnostics stay in English.

Provenance is bounded. A quote is proven to come from the raw file the researcher saved. That the file came from the cited URL is confirmed only where the URL is still live and its hash matches, and each source records which of the two it is.

Currency is best-effort. The currency check runs against the connected databases. For litigation-sensitive citations, verify each judgment is still good law before relying on the memo.

No cancelling mid-step. A cancel is honoured at the checkpoints and at the next step boundary.

Cowork caveats. Chat output is buffered until the turn ends, and your permission rules do not apply there; the plugin's own gate approves only allowlisted hosts and calls to its own CLI.

Privacy & data

Everything memoforge writes lives on your machine: in the output_folder you set, else $MEMOFORGE_OUTPUT_FOLDER, else a memoforge/ folder in your session's folder, else ~/Documents/memoforge/. No shared backend, no server, no telemetry.

MCP calls go to the providers you authenticated, with your credentials; web research is aimed at the official portals on the plugin's allowlist. The plugin never proxies or stores those credentials. The audit trail (state.json, events.jsonl, every draft version, every review) stays in the task folder until you delete it.