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…

Что это?Набор навыков для ИИ-агентов — чеклисты SKILL.md, протоколы экзаменатора/противника, входные анкеты и детерминированные Python-скрипты, — которые заставляют ИИ-модель делать работу по американским полезным патентам, за которую патентная фирма обычно берёт сотни долларов в час: аудит до подачи, симуляцию экспертизы USPTO и состязательное тестирование обходных решений.
Это приложение-чатбот или что-то другое?Это не приложение и не обёртка чат-бота. Это три «агентских навыка» — папки с контрактом SKILL.md плюс полезными данными, шаблонами и Python-скриптами, — которые вы кладёте в каталог навыков существующего ИИ-агента для кодинга, чтобы агент мог их запускать.
С какими кодинг-агентами это работает и нужен ли Python?Он ориентирован на Grok (~/.grok/skills/), Claude Code (~/.claude/skills/) и Codex/Cursor или других агентов с поддержкой навыков. Детерминированные скрипты запускает Python 3; для разбора PDF нужен PyMuPDF, для .docx-файлов — python-docx.
Можно ли реально полагаться на это как на юридическую консультацию?Нет — он прямо не создаёт отношений «адвокат–клиент» и не подаёт заявки, не подписывает декларации и не связывается с USPTO. От агентов требуется отвечать «cannotassess», а не гадать в фактах вроде дат раскрытия, а некоторые действия (подпись под страхом наказания за лжесвидетельство, оплата PTO) зарезервированы за зарегистрированным практиком.
Есть ли подвох с лицензией, о котором стоит знать?Это GPL-3.0, и README отмечает, что эта лицензия сама по себе снимает гарантии, вдобавок к собственному прямому дисклеймеру проекта «это не юридическая консультация, используйте на свой риск».
Что на самом деле покрывает чеклист из 316 пунктов до подачи заявки?Он разбит на девять буквенных частей (A-I), охватывающих порог патентоспособности, поиск уровня техники, авторство изобретения, приоритетные сроки, раскрытие/возможность осуществления, разделы описания, формулу изобретения, чертежи и пакет подачи, причём 105 из 316 пунктов помечены как блокирующие.
Как работает навык patent-examine?Он запускает симуляцию делопроизводства USPTO, в которой независимые агенты-экзаменаторы должны каждый признать один и тот же набор пунктов формулы патентоспособным, заново загружая актуальные статуты, правила и текст MPEP при каждом запуске, а не полагаясь на заученное право.
Для чего нужен patent-workaround?Он запускает свежих субагентов-конкурентов, которые пытаются найти состязательные обходные решения против вашей формулы, проверяя на прочность, смог бы соперник отбросить ограничение, которое вы считали существенным.
Почему этот проект настаивает на markdown-файлах вместо программной платформы?Автор считает, что патентная работа — это уже конвейер документов, который юридические фирмы оборачивают в искусственный дефицит и почасовую оплату; если положить ту же логику чеклиста, экзаменатора и противника в редактируемые markdown-файлы, она становится дешевле и точнее по мере улучшения базовой модели, вместо ожидания процесса фирмы.
Creator
gfodor
Size
0.2 MB
Stars
393
Updated
CommitAug 12
Age
2mo
Commits · 90 Days