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…

这是什么?一套 AI 智能体技能——SKILL.md 检查清单、审查员/对手协议、信息收集问卷和确定性 Python 脚本——让 AI 模型完成专利事务所通常按每小时数百美元收费的美国实用专利工作:申请前审计、模拟 USPTO 审查,以及对抗性规避设计测试。
这是聊天机器人应用,还是别的东西?它不是应用,也不是聊天机器人套壳。它是三个“智能体技能”——包含 SKILL.md 契约以及载荷、模板和 Python 脚本的文件夹——你把它们放进现有 AI 编程智能体的技能目录,让那个智能体运行它们。
它兼容哪些编程智能体?我需要 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),涵盖可专利性门槛、现有技术检索、发明人认定、优先权期限、公开/充分公开、说明书章节、权利要求、附图和申请文件包,316 项中有 105 项被标记为阻断项。
patent-examine 技能是怎么工作的?它运行一个模拟的 USPTO 审查循环:多个独立的审查员智能体必须各自认定同一套权利要求可以授权,并且每次运行都重新获取现行的成文法、规则和 MPEP 文本,而不是依赖记忆中的法律。
patent-workaround 是做什么用的?它启动全新的竞争对手子智能体,对你的权利要求尝试对抗性规避设计,压力测试竞争对手能否绕开你视为必要的技术限定。
这个项目为什么坚持用 markdown 文件而不是软件平台?作者认为专利工作本来就是一条文档流水线,只是被律师事务所在稀缺性和按小时计费上包裹起来;把同样的检查清单、审查员和对手逻辑放进可编辑的 markdown 文件,意味着随着底层模型改进它会更便宜也更精准,而不必等待律所的流程。
Creator
gfodor
Size
0.2 MB
Stars
396
Updated
CommitAug 12
Age
2mo
Commits · 90 Days