legal-skills README

The project's README from github.com/gfodor/legal-skills. As one markdown file: README.md.

legal-skills

Replace billable hours with markdown files and an AI that actually follows them.

This repository is a public, executable playbook for U.S. utility-patent work. Not a chatbot wrapper. Not a "talk to a lawyer" landing page. A set of agent skills — SKILL.md files, checklists, examiner/adversary protocols, intake questionnaires, and deterministic Python — that make a language model do the work a patent boutique currently invoices at several hundred dollars an hour.

The goal is not to "assist" counsel. The goal is to displace legal fees. If an inventor, founder, or in-house engineer can run a 316-item pre-filing audit, a simulated USPTO prosecution loop, and an adversarial design-around attack without opening a matter, that is a win. If a firm that used to charge $18,000 to draft and file a utility application is now competing with a checkout of this repo and a model that costs less than lunch, that is also a win.

Lawyers who are good at judgment, strategy, and courtroom work will still have work. Lawyers whose product is walking a known statute, filling known forms, and billing the walk — this repo is aimed at that product.


Read this before you use anything in this repository.

This project is not a law firm. It does not create an attorney–client relationship. Nothing here is legal advice, a legal opinion, a patentability opinion, an infringement opinion, a freedom-to-operate opinion, or a representation that any application will be allowed, valid, enforceable, or commercially useful.

The GPL-3.0 license already disclaims warranty. This paragraph is the same idea in English: use at your own risk.

That disclaimer is required because the work is real enough to hurt you if you treat it as magic. It is not a retreat from the pitch. The pitch is that most of what you were paying for was process, and process belongs in files.


Why markdown, not a firm

Patent work is already a document pipeline:

  1. Facts that are not in the draft (disclosure dates, inventorship, entity status).
  2. A specification and claims that either enable the invention or do not.
  3. A search that either found the dead-ringer or did not.
  4. An examiner who will reject under 35 U.S.C. 101 / 102 / 103 / 112 until the claims are allowable or you give up.
  5. A competitor who will keep the value proposition and drop the limitation you accidentally treated as essential.

Firms wrap that pipeline in scarcity, letterhead, and a rate card. This repo unwraps it.

What you used to buy What this repo is
A $400/hr associate reading the draft once 11 specialized agents, each with the whole application and a part-file of checklist items they are forbidden to skip
A partner "doing the claims" from muscle memory A 64-item claims part, a mechanical parser that builds the dependency graph, and a red-team examiner who has to write a real Office Action
A design-around "gut check" in a conference room Fresh competitor subagents plus an outer-agent umbrella classification that will not let you claim a result you did not disclose
An invoice git clone

The files are the product. If a better model ships next quarter, the same files get cheaper and sharper. If the PTO changes a form, you edit a markdown file instead of waiting for a CLE.


What's here

Three skills. They are designed to be run in order. Each one is a complete agent skill: a SKILL.md the orchestrator reads as its contract, plus the payloads, templates, and scripts that keep the model honest.

legal-skills/
├── patent-audit/         Pre-filing audit. 316 checklist items. Deterministic pre-pass.
├── patent-examine/       Recurrent simulated USPTO examination until two independent examiners clear the same version.
├── patent-workaround/    Adversarial design-around testing. Strengthen only what is supported and patentable.
├── LICENSE               GNU GPL v3
└── README.md             This file

Suggested pipeline

     inventor facts + draft
              │
              ▼
      ┌───────────────┐
      │ patent-audit  │  Is this even fileable? Stop on statutory bars.
      └───────┬───────┘
              │ ranked defects + parsed.json
              ▼
      ┌───────────────┐
      │patent-examine │  Mock prosecution. Amend only after a simulated OA.
      └───────┬───────┘
              │ version-locked "allowable" candidate
              ▼
      ┌──────────────────┐
      │patent-workaround │  Can a competitor keep the value and miss the claims?
      └────────┬─────────┘
               │
               └── iterate examine ↔ workaround until two examiners
                   and two adversaries clear the same packet

patent-examine and patent-workaround will use patent-audit's parser and mechanical checks if that sibling skill is installed. A prior audit is not a substitute for examination. A prior examination is not a substitute for workaround testing.


Install

These are agent skills: a directory with a SKILL.md the model is instructed to follow. Copy the three skill folders into the skills directory of whatever agent you run.

Agent Typical location
Grok ~/.grok/skills/
Claude Code ~/.claude/skills/ or project .claude/skills/
Codex / Cursor / other skill hosts that product's skills directory

On Windows, from this repo:

Copy-Item -Recurse .\patent-audit, .\patent-examine, .\patent-workaround $HOME\.grok\skills\

Then tell the agent, in plain language:

Python 3 is required for the scripts. The audit parser accepts .txt, .md, .pdf, and .docx. PDF needs PyMuPDF; .docx needs python-docx. Missing optional dependencies fail loudly instead of silently producing a half-parse. The state lockers (cycle_state.py, coverage_state.py) use only the standard library.

Do not point a model at the draft and skip the skill. The value is the protocol, not "an LLM that has heard of patents."


patent-audit — pre-filing audit

When: before you file a utility application, a provisional, or a claim set you are about to spend money on.

What it returns: a ranked defect list with honest coverage accounting — every item is pass, fail, cannot_assess, not_applicable, or not_reached. Silence is never a pass.

What it is not: a rewrite of the application. Audit agents are forbidden to edit the draft. Remediation is a later pass.

The 316-item checklist

The checklist is a primary-source pre-filing audit of a U.S. utility draft — 35 U.S.C., 37 CFR, the MPEP, and current USPTO practice — not a vibe. Every item has an id, part, severity, owner agent, input types, automation class, and a blocking flag. Routing is precomputed in reference/checklist_index.json. The full item text lives in reference/parts/ — those files are the agent payloads. Each item body cites a statute, rule, MPEP section, or current official page.

Part File Items Fatal What it actually checks
A A_threshold.md 37 18 Is this patentable at all? §101 class + judicial exceptions, utility, novelty, statutory bars, nonobviousness. The "don't file" gate.
B B_search.md 22 1 Was the search real? Classes and keywords, NPL, foreign docs, citation chaining, reading references as disclosures, IDS queue.
C C_inventorship.md 21 9 Who conceived a claimed limitation? Employment agreements, shop rights, joint-owners agreements, assignments, utility vs design vs plant.
D D_priority_deadlines.md 46 16 PPA enablement, one-year conversion, foreign rights, NPR conflicts, continuation/divisional/CIP labeling, double patenting, term.
E E_disclosure.md 27 8 Enablement, written description, best-mode without naming a favorite, software listings/flowcharts, patent profanity, no-new-matter completeness.
F F_spec_sections.md 29 3 PTO section order, Background that does not confess the invention, numeral hygiene, structure-then-operation, ramifications, 150-word abstract.
G G_claims.md 64 17 Breadth vs prior art, antecedent basis, means-plus-function support, single-means ban, method-actor unity, CRM claims, claim count/fees.
H H_drawings.md 22 3 Every claimed feature shown, no new-matter holes, OPAP formalities, line types, color/photo petitions. Multimodal — sheets must be attached as images.
I I_filing_packet.md 48 17 Declaration/ADS consistency, entity status, IDS, NPR, EFS-Web vs paper, PME, fee arithmetic, form versions.

316 items. 105 are blocking — a fail on one of those stops the audit. 28 are mechanical (code). 169 are assisted (model + structured evidence). 119 are judgment.

26 items can only be answered from intake facts. No amount of document review reaches them (disclosure/bar dates, inventorship knowledge, duty of candor, some foreign and fee facts). If you skip intake, those come back cannot_assess. That is the correct answer. Guessing a first-public-disclosure date is how people lose the U.S. right and then pay a lawyer to confirm they lost it.

Core rules the orchestrator is not allowed to break

  1. The draft fits in one context. Every agent gets the whole application. Enablement, antecedent basis, and numeral consistency are whole-document properties. Chunking the spec across agents is a bug.
  2. Models do not do arithmetic or exhaustive cross-references. Dates, claim counts, fee tiers, dependency graphs, and numeral reconciliation run in Python.
  3. cannot_assess is a valid verdict. Duty of candor cannot be established from any document. An agent that guesses has failed the skill.

Phases

Phase What happens
0 — Intake prepass.py with no --intake writes the questionnaire and stops. Fill it. Parts A, C, and D are unanswerable without it.
1 — Deterministic pre-pass Parse → mechanical checks → deadline table. Exit 2 if the parse looks like the wrong document.
2 — Gates (fail-fast) gate_threshold → gate_inventorship → gate_priority. A blocking fail stops the run. Do not spend tokens polishing prose on a barred application.
3 — Document fan-out Eight specialist agents plus three red-team agents, launched together.
4 — Adversarial verification Every blocking fail is re-tried by three fresh verifiers who see the draft and the claim but not the finding's reasoning. Survivors need 2 of 3.
5 — Synthesis synthesize.py ranks defects and reports not_reached. If that count is not zero, an agent skipped work.

Phase 3 agents

Agent Owns Lens
doc_enablement Part E items (plus claim-support items in G) Skilled artisan trying to build it. Every place you'd have to invent something is a gap.
doc_narrowing Narrowing-language items across E/F Opposing counsel hunting admissions, essentiality language, and claim-construction traps.
doc_spec_sections Part F Walk the spec in PTO order.
doc_claims_law §112 form, definiteness, antecedents, 112(f) Adjudicate the mechanical pass's candidates lists. Do not re-derive them.
doc_claims_arch Claim-set architecture Is claim 1 the broadest? Does each dependent add real scope? Are the classes covered?
doc_drawings Part H + I05, I33 Attach the sheets as images. Text-only, this agent silently passes.
doc_filing Part I ADS, declaration, fees, IDS, NPR.
doc_search Part B Was the search adequate, were the references read as disclosures rather than as claim sets?

Split E/F/G by the owner field in checklist_index.json, not by file. Workload is uneven on purpose: gate_priority 48, doc_filing 46, doc_claims_law 39, gate_threshold 35, then down to doc_narrowing at 14.

Red team (same batch, not checklist-shaped):

Scripts

python patent-audit/scripts/prepass.py --draft DRAFT --drawings DRAWINGS `
    --intake intake.yaml --workdir audit_run
Script Job
prepass.py One command for all of Phase 1. No --intake → write the questionnaire and stop. Exit 1 = missing intake. Exit 2 = parse refused.
parse_application.py Draft → parsed.json: sections, claim dependency graph, element decomposition, antecedent-basis candidates, numeral tables, figure inventory.
mechanical_checks.py Deterministic checks → findings_mechanical.json. A mechanical pass never suppresses a later agent fail on the same item.
deadlines.py Intake → deadlines.json with weekend/holiday rollover. Agents interpret dates; they do not compute them.
synthesize.py All findings → ranked report + coverage. Non-zero exit if a fatal item failed.

prepass.py refuses to continue when no claims parsed, fewer than four sections were recognized, or the detailed description yielded no reference numerals. That is how you keep eleven agents from confidently auditing a document that isn't there.

Finding schema

Every audit agent returns only a JSON array to findings/<agent>.json:

[{
  "item_id": "G14",
  "verdict": "fail",
  "severity": "Serious",
  "location": "claim 3",
  "evidence": "the said locking member",
  "explanation": "No earlier claim introduces a locking member.",
  "suggested_fix": "Introduce 'a locking member' in claim 1, or recite it in claim 3.",
  "confidence": "high"
}]

evidence must be a verbatim quote from the draft. A finding with no quote is not a finding.

Assets

Typical wall-clock for a 20–60 page, ~20-claim case is the slowest Phase-3 agent, about 5–10 minutes. Claim sets of 100+ should fan doc_claims_law per claim; keep doc_claims_arch on the whole set.


patent-examine — recurrent simulated examination

When: you want the draft stress-tested the way an examiner will actually attack it, then revised until two independent simulated examiners clear the same bytes.

What it returns: a version-locked prosecution record, a final ground-truth application, and a prominent statement that this was a simulation.

What it is not: a USPTO allowance, a validity guarantee, or a one-pass checklist. That last job is patent-audit.

The state model (non-negotiable)

Three artifacts, kept separate:

  1. Ground truth — the authoritative editable application. Frozen during an examiner dialogue.
  2. Proposed candidate — a complete clean application containing the exact amendments on offer. Arguments alone may leave it byte-identical to ground truth. An examiner may clear only a complete candidate, never a promise to draft later.
  3. Prosecution record — Office Actions, responses, interview summaries, reference copies, search logs, issue ledger, versions, hashes.

After a clearance, apply the candidate verbatim to ground truth and verify the content hash. Any unapproved substantive deviation voids the clearance.

python patent-examine/scripts/cycle_state.py init --run-dir examination_run `
  --candidate application=application.docx --candidate drawings=drawings.pdf

python patent-examine/scripts/cycle_state.py snapshot --run-dir examination_run `
  --candidate application=proposal/application.docx `
  --candidate drawings=proposal/drawings.pdf

python patent-examine/scripts/cycle_state.py record --run-dir examination_run `
  --examiner examiner-01 --decision conditional-allowable `
  --document examination_run/examiner-01/notice-of-allowability.md

python patent-examine/scripts/cycle_state.py promote --run-dir examination_run `
  --candidate application=application.docx --candidate drawings=drawings.pdf

python patent-examine/scripts/cycle_state.py status --run-dir examination_run

Phases

Phase What happens
0 — Packet Intake. Completeness gate. Refresh official sources. Documented prior-art search. Missing material is missing, not a favorable fact.
1 — Fresh examiner Spawn one subagent with a unique context ID and no prior examiner's reasoning. First merits response is a simulated non-final Office Action or ALLOWABLE.
2 — Dialogue Same examiner until CONDITIONAL_ALLOWABLE, ALLOWABLE, or a genuine terminal impasse. Outer agent independently validates every 102/103 mapping.
3 — Promote Apply the cleared candidate. Re-render the whole application. Re-run mechanical checks. promote must hash-match.
4 — Repeat A different fresh examiner. Zero qualifying clearances if the application changes. Success = two distinct examiners independently clear the same promoted hash.

Prior-art substance gate

The outer agent does not accept the examiner's chart on faith. For every 102/103 ground it rea

legal-skills (gfodor/legal-skills)

Searching Database…

What is this?A set of AI agent skills - SKILL.md checklists, examiner/adversary protocols, intake questionnaires and deterministic Python scripts - that make an AI model do U.S. utility-patent work a patent firm would normally bill hundreds of dollars an hour for: pre-filing audit, simulated USPTO examination, and adversarial design-around testing.
Is this a chatbot app or something else?It is not an app or chatbot wrapper. It is three 'agent skills' - folders containing a SKILL.md contract plus payloads, templates and Python scripts - that you drop into an existing AI coding agent's skills directory so that agent can run them.
Which coding agents does it work with, and do I need Python?It targets Grok (~/.grok/skills/), Claude Code (~/.claude/skills/), and Codex/Cursor or other skill-hosting agents. Python 3 runs the deterministic scripts, with PyMuPDF needed for PDF parsing and python-docx for .docx files.
Can I actually rely on this as legal advice?No - it explicitly creates no attorney-client relationship and does not file applications, sign declarations, or contact the USPTO. Agents are required to answer 'cannotassess' rather than guess on facts like disclosure dates, and some acts (signing under penalty of perjury, paying the PTO) are reserved for a registered practitioner.
Any license catch I should know about?It's GPL-3.0, and the README notes that license already disclaims warranty on top of the project's own explicit 'this is not legal advice, use at your own risk' disclaimer.
What does the 316-item pre-filing checklist actually cover?It is split into nine lettered parts (A-I) spanning patentability threshold, prior-art search, inventorship, priority deadlines, disclosure/enablement, spec sections, claims, drawings, and the filing packet, with 105 of the 316 items marked as blocking.
How does the patent-examine skill work?It runs a simulated USPTO prosecution loop in which independent examiner agents must each find the same claim set allowable, re-fetching current statutes, rules, and MPEP text on every run rather than relying on memorized law.
What is patent-workaround for?It launches fresh competitor subagents to attempt adversarial design-arounds against your claims, pressure-testing whether a rival could drop the limitation you treated as essential.
Why does this project insist on markdown files instead of a software platform?The author argues patent work is already a document pipeline that law firms wrap in scarcity and hourly billing; putting the same checklist, examiner, and adversary logic in editable markdown files means it gets cheaper and sharper as the underlying model improves, instead of waiting on a firm's process.
Creator
gfodor
Size
0.2 MB
Stars
398
Updated
CommitAug 12
Age
2mo
Commits · 90 Days