Assess a High-Value Patent Portfolio
Overview
Use this skill to turn one reviewed Patsnap patent query into a transparent,
reproducible portfolio-screening package. Retrieve the full agreed candidate
universe, enrich every candidate for scoring, apply the source 30/30/20/20
model, select a documented 10–15%, and preserve all evidence and failures.
The term high-value describes relative selection under this model. It does
not mean monetary value, commercial success, technical quality, validity,
enforceability, freedom to operate, essentiality, or investment merit.
Never fabricate a patent record, citation, family member, inventor identity,
legal event, legal status, drawing, technical summary, score, source link, or
missing API result. An endpoint failure stays error; a missing field stays
missing; neither becomes factual zero.
When to use
Use this skill when the user asks to:
- identify a high-value subset within a patent search result;
- rank a portfolio or technology-specific candidate universe;
- create a traceable patent-prioritization list;
- apply the explicit citation/family/inventor/event model;
- compare screening signals across patents in one scoped run; or
- prepare a portfolio review for an analyst, IP team, R&D leader, or counsel.
Do not use it as the sole method for:
- patent valuation or pricing;
- validity, infringement, enforceability, or FTO opinions;
- standards-essentiality or claim-chart determinations;
- acquisition or investment recommendations; or
- comparisons between independently scoped query results.
Required inputs
Obtain or explicitly mark missing:
- The exact, human-reviewed Patsnap query.
- The legal entities, technologies, products, and exclusions represented by
the query.
- Target jurisdictions or authorities.
- Search and legal-status cutoff dates.
- Date range and publication/application/grant treatment.
- Family definition and representative-publication rule.
- Screening purpose and intended audience.
- Candidate cap, if any, and whether truncation is acceptable.
- Selection ratio between 10% and 15%; default 10%.
- Any reviewed core-inventor override.
- Any user-approved weight change. If changed, do not describe the result as
the default source model.
- Required report language; default English.
Do not silently broaden, narrow, translate, repair, or reformulate the query.
If a generated query is proposed, require human approval before execution and
record both the draft and approved query.
Required deliverables
Always produce:
high_value_patent_portfolio_screening.html — safe static English report;
high_value_patent_screening_data.json — all scored candidates plus selected
records and evidence trace;
final_records.json — selected report-ready records;
- restartable stage checkpoints described below.
Produce only when the user requests Word:
high_value_patent_portfolio_screening.docx — same substantive selection,
scores, rationales, evidence states, limitations, and sign-off controls.
The HTML is the required report. The JSON trace is required evidence, not an
optional developer artifact. Word is optional.
Report contents
The report must include:
- reviewed query and query hash;
- run ID, source mode, generated time, and schema version;
- P002-reported total, retrieved count, deduplicated count, scored count,
selected count, and final percentage;
- candidate cap and truncation state;
- scoring model, version, weights, and overrides;
- family and cutoff conventions;
- top five exact-returned inventor names and counts;
- selected patent table with all required fields;
- one evidence-bounded rationale per selected patent;
- endpoint/connector errors and selected-record data gaps;
- legal-event interpretation boundary;
- model limitations and required human review; and
- reviewer sign-off fields in Word output.
Required selected-patent fields
For each selected patent preserve:
| Field |
Required treatment |
rank |
Deterministic position after total score and all tie-breaks |
score |
0–100 total plus four component scores |
rationale |
Compact source-bounded explanation including missingness |
pn |
Publication number from P002 when available |
patent_id |
Internal identifier retained in JSON evidence, not exposed as a secret |
record_url |
Render only a verified stable global HTTP(S) URL; otherwise plain identifier |
title |
Original P002 title, preserving language when returned |
drawing |
P021 URL or explicit state; expiring URLs are not durable evidence |
current_assignee |
Current assignee/patentee field and source cutoff where available |
legal_status |
Raw P041 simple status plus state and checked-as-of date |
patsnap_title |
P025 English title, if returned |
tech_problem |
P025 English technical-problem summary |
tech_approach |
P025 English technical-approach summary |
benefit |
P025 English benefit/effect summary |
cited_by_simple_family |
P015 value, state, candidate percentile, and scoring method |
simple_family_count |
P014 value, state, candidate percentile, and family rule |
core_inventor |
Boolean plus exact matched names |
legal_event_evidence |
Per-category state, event count, and event records |
gaps |
Missing/error/not-run evidence and remediation |
| provenance |
Endpoint or connector/tool, retrieval time, request evidence, run ID |
Do not describe P041 simple legal status as proof of enforceability. Do not use
title, abstract, drawing, family size, citation count, or AI summary as a proxy
for claim scope.
Default scoring standard
Read references/screening-standard.md before executing or modifying the
model. The default 100 points are:
| Indicator |
Weight |
Evidence |
| Simple-family forward-citation position |
30 |
P015 patent_cited.cited_by_simple_family |
| Simple-family size position |
30 |
P014 patent_family.simple_family length |
| Core-inventor membership |
20 |
Exact inventor names in the P002 candidate universe |
| Verified legal-event activity |
20 |
P034/P027/P028/P029 event arrays |
Scores are candidate-universe relative. They are not calibrated estimates of
currency, probability, commercial importance, validity, or litigation risk.
Numeric evidence
For at least ten candidates, calculate the empirical percentile using available
numeric observations only:
percentile(value) = count(available values <= value) / count(available values)
component_score = percentile(value) * 30
For fewer than ten candidates:
- all available values zero: score zero;
- all non-zero values equal: a non-zero record receives 15;
- mixed available values: use the empirical percentile and label it unstable;
- missing/error/not-run: score zero under the default missing-data policy while
preserving the non-zero evidence state.
Always report available and missing counts. A numeric zero returned by an
endpoint is different from no returned evidence.
Core inventors
- Split inventor records on
|, semicolon, full-width semicolon, and line
breaks.
- Never split on comma or full-width comma. Patsnap commonly returns
LASTNAME, FIRSTNAME|LASTNAME, FIRSTNAME; the comma is inside one name.
- Normalize whitespace only and count a name once per patent.
- Rank exact-returned names by candidate patent count descending, then name
ascending.
- Treat the first five as core inventors.
- Score 20 when a patent contains at least one exact match; otherwise zero.
Do not automatically merge initials, spelling variants, transliterations,
maiden names, reordered names, or homonyms. Record a user override and its
provenance. Do not use final patent scores to define the inventors who
contribute to those scores; that is circular.
Legal-event activity
Qualifying source categories:
- Litigation — P034
patent_litigation_data;
- Reexamination or invalidation — P027
patent_reexam_invalid_data;
- License — P028
patent_license_data;
- Transfer — P029
patent_transfer_data.
Score 20 if at least one verified event record exists in any category. Score
zero if all four checks succeeded and returned empty. If any required check is
missing, failed, or not run, retain the zero-point policy but state that absence
cannot be concluded.
An event is not inherently valuable. Litigation and invalidation may be
adverse; a license may be expired or intra-group; a transfer may be a security
interest or corporate restructuring. Preserve dates, case/proceeding numbers,
parties, country/authority, event type, and source locator when returned.
Selection count
Default:
selected_count = ceil(deduplicated_candidate_count * 0.10)
maximum_count = ceil(deduplicated_candidate_count * 0.15)
Rules:
- zero candidates yields zero selections and a valid no-results report;
- any non-zero candidate universe yields at least one selected record;
- never exceed 15% without a recorded user instruction;
- resolve cutoff ties using deterministic tie-breaks, not by including every
tied record; and
- state both the selected count and percentage.
Tie-break order:
- higher available simple-family forward-citation count;
- higher available simple-family size;
- verified legal-event hit;
- core-inventor hit;
- more verified event categories;
- earlier valid application date;
- publication number ascending;
- stable internal identifier ascending.
Missing values rank below available values, including factual zero.
Complete eight-stage workflow
The source package contains ten Python files and eight stages. Preserve all of
them; do not collapse away checkpoints or evidence.
Stage 0 — Define scope and run controls
- Confirm the reviewed query and contextual scope.
- Select REST or MCP-import source mode.
- Generate one run ID shared by every checkpoint.
- Set a documented maximum record count.
- Confirm selection ratio and overrides.
- Never place a credential in query text, arguments, logs, outputs, or reports.
Stage 1 — Retrieve P002 candidates
Use P002 /search/patent/query-search-patent/v2.
- Send the exact approved
query_text.
- Page with bounded
limit and offset.
- Retain reported total and per-page request evidence.
- Detect repeated page signatures and stop with an error.
- Record truncation when the agreed maximum is reached.
- Normalize identifiers, title, assignee, inventor, dates, and authority.
- Deduplicate by
patent_id, then publication number fallback.
- Preserve duplicate decisions.
- Output
cand_raw.json.
An empty result is a valid state only after a successful call. A request failure
is not a no-results conclusion.
Stage 2 — Enrich every candidate with numeric evidence
For all deduplicated candidates:
- P014
/basic-patent-data/patent-family for simple-family members;
- P015
/basic-patent-data/forward-citation/v3 for
cited_by_simple_family and available detail fields.
Batch within documented endpoint limits. Preserve available, empty,
missing, error, or not_run, along with request evidence and errors. Output
enrich_num.json.
Stage 3 — Enrich every candidate with legal events
For every candidate retrieve:
- P034
/high-value-data/litigation;
- P027
/advanced-patent-data/re-examination-and-invalidation;
- P028
/advanced-patent-data/license-data;
- P029
/advanced-patent-data/transfer-data.
Retain complete returned event arrays, normalized English category, state,
count, request evidence, and error. Output enrich_legal.json.
Stage 4 — Calculate and rank
- Compute top-five exact-name inventors or apply a reviewed override.
- Build numeric vectors from available values only.
- Apply the documented numeric fallbacks.
- Calculate all four components and total.
- Record missing-policy points separately from raw evidence state.
- Apply all deterministic tie-breaks.
- Select the approved 10–15%.
- Output
scored.json with all candidates, not only selections.
Stage 5 — Enrich selected records for display
For selected patents only:
- P021
/basic-patent-data/abstract-image;
- P025
/high-value-data/tech-problem-and-benefit-summary with lang=en;
- P041
/basic-patent-data/simple-legal-status.
P021 links may expire. Store their state and text alternative; download only for
an explicitly requested Word report, allow HTTP(S) only, reject redirects, cap
bytes, require an image content type, and handle expiration safely. Output
enrich_display.json.
Stage 6 — Assemble records and trace
Join scored.json, enrich_display.json, and cand_raw.json by run ID and
patent identifier.
- Reject mismatched run IDs.
- Generate evidence-bounded English rationales.
- Preserve all component scores and states.
- Retain event-level evidence and errors.
- Do not build an undocumented China or global product deep link.
- Render a publication hyperlink only when a verified stable global URL is
supplied.
- Output
final_records.json and
high_value_patent_screening_data.json.
Stage 7 — Generate required HTML
Use scripts/hv_7_html_a.py.
- Escape every dynamic value.
- Permit only absolute HTTP(S) URLs.
- Use
rel="noopener noreferrer" for external links.
- Include no scripts or event handlers.
- Use semantic headings, tables, captions, text states, local table overflow,
responsive breakpoints, reduced-motion support, and Letter landscape print
rules.
- Avoid gradients, glow, decorative badges, emoji, and color-only meaning.
- Include all methodology, gaps, limitations, provenance, and reviewer gates.
Stage 8 — Generate optional Word
Use scripts/hv_8_word.py only when requested.
- Keep selection, scores, rationales, evidence states, and limitations aligned
with HTML/JSON.
- Use US-Letter landscape, Arial, restrained navy/teal/charcoal, real styles,
repeating table headers, page numbers, fixed margins, and text labels.
- Use safe HTTP(S) hyperlinks only.
- Keep image download off by default.
- Include sign-off controls and metadata without personal paths.
REST authentication and call policy
Global base URL:
https://connect.patsnap.com
Authentication:
Authorization: Bearer <private-api-key>
Use PATSNAP_API_KEY or an explicitly configured
PATSNAP_API_KEY_FILE. Do not accept a default working-directory key file.
Require HTTPS, reject redirects, bound connect/read timeouts, retry only
transient HTTP states and network exceptions, honor bounded Retry-After, and
return structured safe errors. Never persist credentials or response bodies in
exceptions.
The source filenames and P-number labels are retained for topology and workflow
fidelity. Verify current global endpoint contracts before a live run.
Verified Patsnap MCP mapping
MCP is optional and available only in an MCP-capable host. The reference Python
pipeline executes REST; it must never claim it directly called MCP.
| Service |
Role |
Verified configuration |
| Advanced Patent Search |
Recommended for candidate query, semantic, classification, assignee, similar-patent, and filtered retrieval |
key advanced_patent_search; Official marketplace page https://open.patsnap.com/marketplace/mcp-servers/patent-search; https://open.patsnap.com/marketplace/mcp-servers/patent-search |
| Patent Briefing |
Recommended for representative bibliography, family, claims, descriptions, translations, images, status, and technical summary |
key patent_briefing; Official marketplace page https://open.patsnap.com/marketplace/mcp-servers/patent-briefing; https://open.patsnap.com/marketplace/mcp-servers/patent-briefing |
| Global Core Patents |
Recommended for detailed citation, family, legal-event, licensing, reexamination/invalidation, litigation, and related core data |
https://open.patsnap.com/marketplace/mcp-servers/core-patents |
For MCP-import evidence, record connector key, tool name, normalized request,
retrieval time, record identifiers, and source response locator. Do not mix REST
and MCP-import provenance within one retrieval record. Normalize imported data
to the same checkpoint states and retain raw evidence outside the report where
the execution environment permits.
Checkpoint contract
Every checkpoint must contain:
schema_version;
stage;
run_id;
generated_at with timezone;
source_mode;
- query hash when applicable;
- upstream checkpoint SHA-256 when applicable;
- candidate or selected count;
- structured records;
- request/connector evidence; and
- structured errors.
Consumers must reject incompatible schema versions, missing required fields,
and mismatched run IDs. Keep the complete chain with the final report.
Failure handling
| Condition |
Required behavior |
| Missing credential |
Stop REST retrieval with safe setup guidance |
| Missing reviewed query |
Stop before network calls |
| P002 failure |
Stop; do not report zero candidates |
| P002 successful empty result |
Generate a zero-selection report and trace |
| Candidate cap reached |
Mark the universe truncated; do not describe it as complete |
| Repeated page |
Stop pagination and record an error |
| P014/P015 failure |
Retain affected candidates, zero points under policy, explicit error state |
| Legal endpoint failure |
Retain affected candidates; do not conclude absence |
| P025/P041 missing |
Keep selected patent and explicit display gap |
| Expired/unsafe drawing URL |
Do not embed; show state and text alternative |
| Checkpoint run mismatch |
Reject assembly |
| Report link not verified |
Render identifier as plain text |
| No Word dependency |
HTML/JSON remain valid; explain optional Word requirement |
Quality gates
Before delivery verify:
- exact source file topology is preserved;
- all source stages, endpoints, metrics, fields, checkpoints, outputs, and
optional Word behavior remain represented;
- P002 totals reconcile with retrieved, deduplicated, scored, and selected
counts;
- selected count is within the approved 10–15% rule;
- available zeros are distinguishable from missing/error/not-run;
- every selected patent traces through all checkpoints;
- inventor commas are not fragmented;
- no automatic cross-language identity merge occurs;
- all four legal-event categories retain event-level evidence;
- event activity is not presented as inherently positive;
- citation and family limitations are visible;
- technical summaries are English and clearly sourced;
- publication links are verified global HTTP(S) or plain text;
- HTML has no unescaped dynamic markup, script, handler, unsafe URL, or
color-only meaning;
- Word contains no personal metadata, local link, floating decorative object,
or China-only content;
- credentials and private paths are absent;
- all JSON and YAML parse;
- all Python files pass AST and CLI checks;
- no
__pycache__ or .pyc is distributed; and
- a human reviewer approves the query, evidence gaps, event meaning, scoring
interpretation, selected narratives, and intended use.
Reference implementation
Read:
references/screening-standard.md for model details, states, schema, and
rationale wording;
scripts/README.md for secure setup, stage execution, MCP boundaries, and
artifact review;
scripts/hv_common.py for global REST, retry, provenance, and checkpoint
helpers;
scripts/hv_1_fetch.py through scripts/hv_8_word.py for the complete source
stage topology; and
scripts/run_all.py for end-to-end orchestration.
1---2copyright: "Copyright © Patsnap. All rights reserved."3name: assess-high-value-patent-portfolio-ip4description: Rank a user-defined Patsnap patent candidate universe with an auditable 30/30/20/20 model based on simple-family forward citations, simple-family size, core-inventor concentration, and verified legal-event activity; select a documented 10–15% screening portfolio and generate traceable English HTML, JSON, and optional Word outputs. Use for evidence-based patent portfolio triage, high-value patent screening, candidate prioritization, or portfolio-review preparation—not monetary valuation, validity, enforceability, or investment conclusions.5metadata:6 source: https://skillmd.com/skills/patsnap/assess-high-value-patent-portfolio-ip7---89# Assess a High-Value Patent Portfolio1011## Overview1213Use this skill to turn one reviewed Patsnap patent query into a transparent,14reproducible portfolio-screening package. Retrieve the full agreed candidate15universe, enrich every candidate for scoring, apply the source 30/30/20/2016model, select a documented 10–15%, and preserve all evidence and failures.1718The term **high-value** describes relative selection under this model. It does19not mean monetary value, commercial success, technical quality, validity,20enforceability, freedom to operate, essentiality, or investment merit.2122Never fabricate a patent record, citation, family member, inventor identity,23legal event, legal status, drawing, technical summary, score, source link, or24missing API result. An endpoint failure stays `error`; a missing field stays25`missing`; neither becomes factual zero.2627## When to use2829Use this skill when the user asks to:3031- identify a high-value subset within a patent search result;32- rank a portfolio or technology-specific candidate universe;33- create a traceable patent-prioritization list;34- apply the explicit citation/family/inventor/event model;35- compare screening signals across patents in one scoped run; or36- prepare a portfolio review for an analyst, IP team, R&D leader, or counsel.3738Do not use it as the sole method for:3940- patent valuation or pricing;41- validity, infringement, enforceability, or FTO opinions;42- standards-essentiality or claim-chart determinations;43- acquisition or investment recommendations; or44- comparisons between independently scoped query results.4546## Required inputs4748Obtain or explicitly mark missing:49501. The exact, human-reviewed Patsnap query.512. The legal entities, technologies, products, and exclusions represented by52 the query.533. Target jurisdictions or authorities.544. Search and legal-status cutoff dates.555. Date range and publication/application/grant treatment.566. Family definition and representative-publication rule.577. Screening purpose and intended audience.588. Candidate cap, if any, and whether truncation is acceptable.599. Selection ratio between 10% and 15%; default 10%.6010. Any reviewed core-inventor override.6111. Any user-approved weight change. If changed, do not describe the result as62 the default source model.6312. Required report language; default English.6465Do not silently broaden, narrow, translate, repair, or reformulate the query.66If a generated query is proposed, require human approval before execution and67record both the draft and approved query.6869## Required deliverables7071Always produce:7273- `high_value_patent_portfolio_screening.html` — safe static English report;74- `high_value_patent_screening_data.json` — all scored candidates plus selected75 records and evidence trace;76- `final_records.json` — selected report-ready records;77- restartable stage checkpoints described below.7879Produce only when the user requests Word:8081- `high_value_patent_portfolio_screening.docx` — same substantive selection,82 scores, rationales, evidence states, limitations, and sign-off controls.8384The HTML is the required report. The JSON trace is required evidence, not an85optional developer artifact. Word is optional.8687## Report contents8889The report must include:9091- reviewed query and query hash;92- run ID, source mode, generated time, and schema version;93- P002-reported total, retrieved count, deduplicated count, scored count,94 selected count, and final percentage;95- candidate cap and truncation state;96- scoring model, version, weights, and overrides;97- family and cutoff conventions;98- top five exact-returned inventor names and counts;99- selected patent table with all required fields;100- one evidence-bounded rationale per selected patent;101- endpoint/connector errors and selected-record data gaps;102- legal-event interpretation boundary;103- model limitations and required human review; and104- reviewer sign-off fields in Word output.105106## Required selected-patent fields107108For each selected patent preserve:109110| Field | Required treatment |111|---|---|112| `rank` | Deterministic position after total score and all tie-breaks |113| `score` | 0–100 total plus four component scores |114| `rationale` | Compact source-bounded explanation including missingness |115| `pn` | Publication number from P002 when available |116| `patent_id` | Internal identifier retained in JSON evidence, not exposed as a secret |117| `record_url` | Render only a verified stable global HTTP(S) URL; otherwise plain identifier |118| `title` | Original P002 title, preserving language when returned |119| `drawing` | P021 URL or explicit state; expiring URLs are not durable evidence |120| `current_assignee` | Current assignee/patentee field and source cutoff where available |121| `legal_status` | Raw P041 simple status plus state and checked-as-of date |122| `patsnap_title` | P025 English title, if returned |123| `tech_problem` | P025 English technical-problem summary |124| `tech_approach` | P025 English technical-approach summary |125| `benefit` | P025 English benefit/effect summary |126| `cited_by_simple_family` | P015 value, state, candidate percentile, and scoring method |127| `simple_family_count` | P014 value, state, candidate percentile, and family rule |128| `core_inventor` | Boolean plus exact matched names |129| `legal_event_evidence` | Per-category state, event count, and event records |130| `gaps` | Missing/error/not-run evidence and remediation |131| provenance | Endpoint or connector/tool, retrieval time, request evidence, run ID |132133Do not describe P041 simple legal status as proof of enforceability. Do not use134title, abstract, drawing, family size, citation count, or AI summary as a proxy135for claim scope.136137## Default scoring standard138139Read `references/screening-standard.md` before executing or modifying the140model. The default 100 points are:141142| Indicator | Weight | Evidence |143|---|---:|---|144| Simple-family forward-citation position | 30 | P015 `patent_cited.cited_by_simple_family` |145| Simple-family size position | 30 | P014 `patent_family.simple_family` length |146| Core-inventor membership | 20 | Exact inventor names in the P002 candidate universe |147| Verified legal-event activity | 20 | P034/P027/P028/P029 event arrays |148149Scores are candidate-universe relative. They are not calibrated estimates of150currency, probability, commercial importance, validity, or litigation risk.151152### Numeric evidence153154For at least ten candidates, calculate the empirical percentile using available155numeric observations only:156157```text158percentile(value) = count(available values <= value) / count(available values)159component_score = percentile(value) * 30160```161162For fewer than ten candidates:163164- all available values zero: score zero;165- all non-zero values equal: a non-zero record receives 15;166- mixed available values: use the empirical percentile and label it unstable;167- missing/error/not-run: score zero under the default missing-data policy while168 preserving the non-zero evidence state.169170Always report available and missing counts. A numeric zero returned by an171endpoint is different from no returned evidence.172173### Core inventors1741751. Split inventor records on `|`, semicolon, full-width semicolon, and line176 breaks.1772. Never split on comma or full-width comma. Patsnap commonly returns178 `LASTNAME, FIRSTNAME|LASTNAME, FIRSTNAME`; the comma is inside one name.1793. Normalize whitespace only and count a name once per patent.1804. Rank exact-returned names by candidate patent count descending, then name181 ascending.1825. Treat the first five as core inventors.1836. Score 20 when a patent contains at least one exact match; otherwise zero.184185Do not automatically merge initials, spelling variants, transliterations,186maiden names, reordered names, or homonyms. Record a user override and its187provenance. Do not use final patent scores to define the inventors who188contribute to those scores; that is circular.189190### Legal-event activity191192Qualifying source categories:193194- Litigation — P034 `patent_litigation_data`;195- Reexamination or invalidation — P027 `patent_reexam_invalid_data`;196- License — P028 `patent_license_data`;197- Transfer — P029 `patent_transfer_data`.198199Score 20 if at least one verified event record exists in any category. Score200zero if all four checks succeeded and returned empty. If any required check is201missing, failed, or not run, retain the zero-point policy but state that absence202cannot be concluded.203204An event is not inherently valuable. Litigation and invalidation may be205adverse; a license may be expired or intra-group; a transfer may be a security206interest or corporate restructuring. Preserve dates, case/proceeding numbers,207parties, country/authority, event type, and source locator when returned.208209## Selection count210211Default:212213```text214selected_count = ceil(deduplicated_candidate_count * 0.10)215maximum_count = ceil(deduplicated_candidate_count * 0.15)216```217218Rules:219220- zero candidates yields zero selections and a valid no-results report;221- any non-zero candidate universe yields at least one selected record;222- never exceed 15% without a recorded user instruction;223- resolve cutoff ties using deterministic tie-breaks, not by including every224 tied record; and225- state both the selected count and percentage.226227Tie-break order:2282291. higher available simple-family forward-citation count;2302. higher available simple-family size;2313. verified legal-event hit;2324. core-inventor hit;2335. more verified event categories;2346. earlier valid application date;2357. publication number ascending;2368. stable internal identifier ascending.237238Missing values rank below available values, including factual zero.239240## Complete eight-stage workflow241242The source package contains ten Python files and eight stages. Preserve all of243them; do not collapse away checkpoints or evidence.244245### Stage 0 — Define scope and run controls246247- Confirm the reviewed query and contextual scope.248- Select REST or MCP-import source mode.249- Generate one run ID shared by every checkpoint.250- Set a documented maximum record count.251- Confirm selection ratio and overrides.252- Never place a credential in query text, arguments, logs, outputs, or reports.253254### Stage 1 — Retrieve P002 candidates255256Use P002 `/search/patent/query-search-patent/v2`.257258- Send the exact approved `query_text`.259- Page with bounded `limit` and `offset`.260- Retain reported total and per-page request evidence.261- Detect repeated page signatures and stop with an error.262- Record truncation when the agreed maximum is reached.263- Normalize identifiers, title, assignee, inventor, dates, and authority.264- Deduplicate by `patent_id`, then publication number fallback.265- Preserve duplicate decisions.266- Output `cand_raw.json`.267268An empty result is a valid state only after a successful call. A request failure269is not a no-results conclusion.270271### Stage 2 — Enrich every candidate with numeric evidence272273For all deduplicated candidates:274275- P014 `/basic-patent-data/patent-family` for simple-family members;276- P015 `/basic-patent-data/forward-citation/v3` for277 `cited_by_simple_family` and available detail fields.278279Batch within documented endpoint limits. Preserve `available`, `empty`,280`missing`, `error`, or `not_run`, along with request evidence and errors. Output281`enrich_num.json`.282283### Stage 3 — Enrich every candidate with legal events284285For every candidate retrieve:286287- P034 `/high-value-data/litigation`;288- P027 `/advanced-patent-data/re-examination-and-invalidation`;289- P028 `/advanced-patent-data/license-data`;290- P029 `/advanced-patent-data/transfer-data`.291292Retain complete returned event arrays, normalized English category, state,293count, request evidence, and error. Output `enrich_legal.json`.294295### Stage 4 — Calculate and rank296297- Compute top-five exact-name inventors or apply a reviewed override.298- Build numeric vectors from available values only.299- Apply the documented numeric fallbacks.300- Calculate all four components and total.301- Record missing-policy points separately from raw evidence state.302- Apply all deterministic tie-breaks.303- Select the approved 10–15%.304- Output `scored.json` with all candidates, not only selections.305306### Stage 5 — Enrich selected records for display307308For selected patents only:309310- P021 `/basic-patent-data/abstract-image`;311- P025 `/high-value-data/tech-problem-and-benefit-summary` with `lang=en`;312- P041 `/basic-patent-data/simple-legal-status`.313314P021 links may expire. Store their state and text alternative; download only for315an explicitly requested Word report, allow HTTP(S) only, reject redirects, cap316bytes, require an image content type, and handle expiration safely. Output317`enrich_display.json`.318319### Stage 6 — Assemble records and trace320321Join `scored.json`, `enrich_display.json`, and `cand_raw.json` by run ID and322patent identifier.323324- Reject mismatched run IDs.325- Generate evidence-bounded English rationales.326- Preserve all component scores and states.327- Retain event-level evidence and errors.328- Do not build an undocumented China or global product deep link.329- Render a publication hyperlink only when a verified stable global URL is330 supplied.331- Output `final_records.json` and332 `high_value_patent_screening_data.json`.333334### Stage 7 — Generate required HTML335336Use `scripts/hv_7_html_a.py`.337338- Escape every dynamic value.339- Permit only absolute HTTP(S) URLs.340- Use `rel="noopener noreferrer"` for external links.341- Include no scripts or event handlers.342- Use semantic headings, tables, captions, text states, local table overflow,343 responsive breakpoints, reduced-motion support, and Letter landscape print344 rules.345- Avoid gradients, glow, decorative badges, emoji, and color-only meaning.346- Include all methodology, gaps, limitations, provenance, and reviewer gates.347348### Stage 8 — Generate optional Word349350Use `scripts/hv_8_word.py` only when requested.351352- Keep selection, scores, rationales, evidence states, and limitations aligned353 with HTML/JSON.354- Use US-Letter landscape, Arial, restrained navy/teal/charcoal, real styles,355 repeating table headers, page numbers, fixed margins, and text labels.356- Use safe HTTP(S) hyperlinks only.357- Keep image download off by default.358- Include sign-off controls and metadata without personal paths.359360## REST authentication and call policy361362Global base URL:363364```text365https://connect.patsnap.com366```367368Authentication:369370```http371Authorization: Bearer <private-api-key>372```373374Use `PATSNAP_API_KEY` or an explicitly configured375`PATSNAP_API_KEY_FILE`. Do not accept a default working-directory key file.376Require HTTPS, reject redirects, bound connect/read timeouts, retry only377transient HTTP states and network exceptions, honor bounded `Retry-After`, and378return structured safe errors. Never persist credentials or response bodies in379exceptions.380381The source filenames and P-number labels are retained for topology and workflow382fidelity. Verify current global endpoint contracts before a live run.383384## Verified Patsnap MCP mapping385386MCP is optional and available only in an MCP-capable host. The reference Python387pipeline executes REST; it must never claim it directly called MCP.388389| Service | Role | Verified configuration |390|---|---|---|391| Advanced Patent Search | Recommended for candidate query, semantic, classification, assignee, similar-patent, and filtered retrieval | key `advanced_patent_search`; Official marketplace page `https://open.patsnap.com/marketplace/mcp-servers/patent-search`; https://open.patsnap.com/marketplace/mcp-servers/patent-search |392| Patent Briefing | Recommended for representative bibliography, family, claims, descriptions, translations, images, status, and technical summary | key `patent_briefing`; Official marketplace page `https://open.patsnap.com/marketplace/mcp-servers/patent-briefing`; https://open.patsnap.com/marketplace/mcp-servers/patent-briefing |393| Global Core Patents | Recommended for detailed citation, family, legal-event, licensing, reexamination/invalidation, litigation, and related core data | https://open.patsnap.com/marketplace/mcp-servers/core-patents |394395For MCP-import evidence, record connector key, tool name, normalized request,396retrieval time, record identifiers, and source response locator. Do not mix REST397and MCP-import provenance within one retrieval record. Normalize imported data398to the same checkpoint states and retain raw evidence outside the report where399the execution environment permits.400401## Checkpoint contract402403Every checkpoint must contain:404405- `schema_version`;406- `stage`;407- `run_id`;408- `generated_at` with timezone;409- `source_mode`;410- query hash when applicable;411- upstream checkpoint SHA-256 when applicable;412- candidate or selected count;413- structured records;414- request/connector evidence; and415- structured errors.416417Consumers must reject incompatible schema versions, missing required fields,418and mismatched run IDs. Keep the complete chain with the final report.419420## Failure handling421422| Condition | Required behavior |423|---|---|424| Missing credential | Stop REST retrieval with safe setup guidance |425| Missing reviewed query | Stop before network calls |426| P002 failure | Stop; do not report zero candidates |427| P002 successful empty result | Generate a zero-selection report and trace |428| Candidate cap reached | Mark the universe truncated; do not describe it as complete |429| Repeated page | Stop pagination and record an error |430| P014/P015 failure | Retain affected candidates, zero points under policy, explicit error state |431| Legal endpoint failure | Retain affected candidates; do not conclude absence |432| P025/P041 missing | Keep selected patent and explicit display gap |433| Expired/unsafe drawing URL | Do not embed; show state and text alternative |434| Checkpoint run mismatch | Reject assembly |435| Report link not verified | Render identifier as plain text |436| No Word dependency | HTML/JSON remain valid; explain optional Word requirement |437438## Quality gates439440Before delivery verify:441442- exact source file topology is preserved;443- all source stages, endpoints, metrics, fields, checkpoints, outputs, and444 optional Word behavior remain represented;445- P002 totals reconcile with retrieved, deduplicated, scored, and selected446 counts;447- selected count is within the approved 10–15% rule;448- available zeros are distinguishable from missing/error/not-run;449- every selected patent traces through all checkpoints;450- inventor commas are not fragmented;451- no automatic cross-language identity merge occurs;452- all four legal-event categories retain event-level evidence;453- event activity is not presented as inherently positive;454- citation and family limitations are visible;455- technical summaries are English and clearly sourced;456- publication links are verified global HTTP(S) or plain text;457- HTML has no unescaped dynamic markup, script, handler, unsafe URL, or458 color-only meaning;459- Word contains no personal metadata, local link, floating decorative object,460 or China-only content;461- credentials and private paths are absent;462- all JSON and YAML parse;463- all Python files pass AST and CLI checks;464- no `__pycache__` or `.pyc` is distributed; and465- a human reviewer approves the query, evidence gaps, event meaning, scoring466 interpretation, selected narratives, and intended use.467468## Reference implementation469470Read:471472- `references/screening-standard.md` for model details, states, schema, and473 rationale wording;474- `scripts/README.md` for secure setup, stage execution, MCP boundaries, and475 artifact review;476- `scripts/hv_common.py` for global REST, retry, provenance, and checkpoint477 helpers;478- `scripts/hv_1_fetch.py` through `scripts/hv_8_word.py` for the complete source479 stage topology; and480- `scripts/run_all.py` for end-to-end orchestration.