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---2name: assess-high-value-patent-portfolio-ip3description: 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.4---56# Assess a High-Value Patent Portfolio78## Overview910Use this skill to turn one reviewed Patsnap patent query into a transparent,11reproducible portfolio-screening package. Retrieve the full agreed candidate12universe, enrich every candidate for scoring, apply the source 30/30/20/2013model, select a documented 10–15%, and preserve all evidence and failures.1415The term **high-value** describes relative selection under this model. It does16not mean monetary value, commercial success, technical quality, validity,17enforceability, freedom to operate, essentiality, or investment merit.1819Never fabricate a patent record, citation, family member, inventor identity,20legal event, legal status, drawing, technical summary, score, source link, or21missing API result. An endpoint failure stays `error`; a missing field stays22`missing`; neither becomes factual zero.2324## When to use2526Use this skill when the user asks to:2728- identify a high-value subset within a patent search result;29- rank a portfolio or technology-specific candidate universe;30- create a traceable patent-prioritization list;31- apply the explicit citation/family/inventor/event model;32- compare screening signals across patents in one scoped run; or33- prepare a portfolio review for an analyst, IP team, R&D leader, or counsel.3435Do not use it as the sole method for:3637- patent valuation or pricing;38- validity, infringement, enforceability, or FTO opinions;39- standards-essentiality or claim-chart determinations;40- acquisition or investment recommendations; or41- comparisons between independently scoped query results.4243## Required inputs4445Obtain or explicitly mark missing:46471. The exact, human-reviewed Patsnap query.482. The legal entities, technologies, products, and exclusions represented by49 the query.503. Target jurisdictions or authorities.514. Search and legal-status cutoff dates.525. Date range and publication/application/grant treatment.536. Family definition and representative-publication rule.547. Screening purpose and intended audience.558. Candidate cap, if any, and whether truncation is acceptable.569. Selection ratio between 10% and 15%; default 10%.5710. Any reviewed core-inventor override.5811. Any user-approved weight change. If changed, do not describe the result as59 the default source model.6012. Required report language; default English.6162Do not silently broaden, narrow, translate, repair, or reformulate the query.63If a generated query is proposed, require human approval before execution and64record both the draft and approved query.6566## Required deliverables6768Always produce:6970- `high_value_patent_portfolio_screening.html` — safe static English report;71- `high_value_patent_screening_data.json` — all scored candidates plus selected72 records and evidence trace;73- `final_records.json` — selected report-ready records;74- restartable stage checkpoints described below.7576Produce only when the user requests Word:7778- `high_value_patent_portfolio_screening.docx` — same substantive selection,79 scores, rationales, evidence states, limitations, and sign-off controls.8081The HTML is the required report. The JSON trace is required evidence, not an82optional developer artifact. Word is optional.8384## Report contents8586The report must include:8788- reviewed query and query hash;89- run ID, source mode, generated time, and schema version;90- P002-reported total, retrieved count, deduplicated count, scored count,91 selected count, and final percentage;92- candidate cap and truncation state;93- scoring model, version, weights, and overrides;94- family and cutoff conventions;95- top five exact-returned inventor names and counts;96- selected patent table with all required fields;97- one evidence-bounded rationale per selected patent;98- endpoint/connector errors and selected-record data gaps;99- legal-event interpretation boundary;100- model limitations and required human review; and101- reviewer sign-off fields in Word output.102103## Required selected-patent fields104105For each selected patent preserve:106107| Field | Required treatment |108|---|---|109| `rank` | Deterministic position after total score and all tie-breaks |110| `score` | 0–100 total plus four component scores |111| `rationale` | Compact source-bounded explanation including missingness |112| `pn` | Publication number from P002 when available |113| `patent_id` | Internal identifier retained in JSON evidence, not exposed as a secret |114| `record_url` | Render only a verified stable global HTTP(S) URL; otherwise plain identifier |115| `title` | Original P002 title, preserving language when returned |116| `drawing` | P021 URL or explicit state; expiring URLs are not durable evidence |117| `current_assignee` | Current assignee/patentee field and source cutoff where available |118| `legal_status` | Raw P041 simple status plus state and checked-as-of date |119| `patsnap_title` | P025 English title, if returned |120| `tech_problem` | P025 English technical-problem summary |121| `tech_approach` | P025 English technical-approach summary |122| `benefit` | P025 English benefit/effect summary |123| `cited_by_simple_family` | P015 value, state, candidate percentile, and scoring method |124| `simple_family_count` | P014 value, state, candidate percentile, and family rule |125| `core_inventor` | Boolean plus exact matched names |126| `legal_event_evidence` | Per-category state, event count, and event records |127| `gaps` | Missing/error/not-run evidence and remediation |128| provenance | Endpoint or connector/tool, retrieval time, request evidence, run ID |129130Do not describe P041 simple legal status as proof of enforceability. Do not use131title, abstract, drawing, family size, citation count, or AI summary as a proxy132for claim scope.133134## Default scoring standard135136Read `references/screening-standard.md` before executing or modifying the137model. The default 100 points are:138139| Indicator | Weight | Evidence |140|---|---:|---|141| Simple-family forward-citation position | 30 | P015 `patent_cited.cited_by_simple_family` |142| Simple-family size position | 30 | P014 `patent_family.simple_family` length |143| Core-inventor membership | 20 | Exact inventor names in the P002 candidate universe |144| Verified legal-event activity | 20 | P034/P027/P028/P029 event arrays |145146Scores are candidate-universe relative. They are not calibrated estimates of147currency, probability, commercial importance, validity, or litigation risk.148149### Numeric evidence150151For at least ten candidates, calculate the empirical percentile using available152numeric observations only:153154```text155percentile(value) = count(available values <= value) / count(available values)156component_score = percentile(value) * 30157```158159For fewer than ten candidates:160161- all available values zero: score zero;162- all non-zero values equal: a non-zero record receives 15;163- mixed available values: use the empirical percentile and label it unstable;164- missing/error/not-run: score zero under the default missing-data policy while165 preserving the non-zero evidence state.166167Always report available and missing counts. A numeric zero returned by an168endpoint is different from no returned evidence.169170### Core inventors1711721. Split inventor records on `|`, semicolon, full-width semicolon, and line173 breaks.1742. Never split on comma or full-width comma. Patsnap commonly returns175 `LASTNAME, FIRSTNAME|LASTNAME, FIRSTNAME`; the comma is inside one name.1763. Normalize whitespace only and count a name once per patent.1774. Rank exact-returned names by candidate patent count descending, then name178 ascending.1795. Treat the first five as core inventors.1806. Score 20 when a patent contains at least one exact match; otherwise zero.181182Do not automatically merge initials, spelling variants, transliterations,183maiden names, reordered names, or homonyms. Record a user override and its184provenance. Do not use final patent scores to define the inventors who185contribute to those scores; that is circular.186187### Legal-event activity188189Qualifying source categories:190191- Litigation — P034 `patent_litigation_data`;192- Reexamination or invalidation — P027 `patent_reexam_invalid_data`;193- License — P028 `patent_license_data`;194- Transfer — P029 `patent_transfer_data`.195196Score 20 if at least one verified event record exists in any category. Score197zero if all four checks succeeded and returned empty. If any required check is198missing, failed, or not run, retain the zero-point policy but state that absence199cannot be concluded.200201An event is not inherently valuable. Litigation and invalidation may be202adverse; a license may be expired or intra-group; a transfer may be a security203interest or corporate restructuring. Preserve dates, case/proceeding numbers,204parties, country/authority, event type, and source locator when returned.205206## Selection count207208Default:209210```text211selected_count = ceil(deduplicated_candidate_count * 0.10)212maximum_count = ceil(deduplicated_candidate_count * 0.15)213```214215Rules:216217- zero candidates yields zero selections and a valid no-results report;218- any non-zero candidate universe yields at least one selected record;219- never exceed 15% without a recorded user instruction;220- resolve cutoff ties using deterministic tie-breaks, not by including every221 tied record; and222- state both the selected count and percentage.223224Tie-break order:2252261. higher available simple-family forward-citation count;2272. higher available simple-family size;2283. verified legal-event hit;2294. core-inventor hit;2305. more verified event categories;2316. earlier valid application date;2327. publication number ascending;2338. stable internal identifier ascending.234235Missing values rank below available values, including factual zero.236237## Complete eight-stage workflow238239The source package contains ten Python files and eight stages. Preserve all of240them; do not collapse away checkpoints or evidence.241242### Stage 0 — Define scope and run controls243244- Confirm the reviewed query and contextual scope.245- Select REST or MCP-import source mode.246- Generate one run ID shared by every checkpoint.247- Set a documented maximum record count.248- Confirm selection ratio and overrides.249- Never place a credential in query text, arguments, logs, outputs, or reports.250251### Stage 1 — Retrieve P002 candidates252253Use P002 `/search/patent/query-search-patent/v2`.254255- Send the exact approved `query_text`.256- Page with bounded `limit` and `offset`.257- Retain reported total and per-page request evidence.258- Detect repeated page signatures and stop with an error.259- Record truncation when the agreed maximum is reached.260- Normalize identifiers, title, assignee, inventor, dates, and authority.261- Deduplicate by `patent_id`, then publication number fallback.262- Preserve duplicate decisions.263- Output `cand_raw.json`.264265An empty result is a valid state only after a successful call. A request failure266is not a no-results conclusion.267268### Stage 2 — Enrich every candidate with numeric evidence269270For all deduplicated candidates:271272- P014 `/basic-patent-data/patent-family` for simple-family members;273- P015 `/basic-patent-data/forward-citation/v3` for274 `cited_by_simple_family` and available detail fields.275276Batch within documented endpoint limits. Preserve `available`, `empty`,277`missing`, `error`, or `not_run`, along with request evidence and errors. Output278`enrich_num.json`.279280### Stage 3 — Enrich every candidate with legal events281282For every candidate retrieve:283284- P034 `/high-value-data/litigation`;285- P027 `/advanced-patent-data/re-examination-and-invalidation`;286- P028 `/advanced-patent-data/license-data`;287- P029 `/advanced-patent-data/transfer-data`.288289Retain complete returned event arrays, normalized English category, state,290count, request evidence, and error. Output `enrich_legal.json`.291292### Stage 4 — Calculate and rank293294- Compute top-five exact-name inventors or apply a reviewed override.295- Build numeric vectors from available values only.296- Apply the documented numeric fallbacks.297- Calculate all four components and total.298- Record missing-policy points separately from raw evidence state.299- Apply all deterministic tie-breaks.300- Select the approved 10–15%.301- Output `scored.json` with all candidates, not only selections.302303### Stage 5 — Enrich selected records for display304305For selected patents only:306307- P021 `/basic-patent-data/abstract-image`;308- P025 `/high-value-data/tech-problem-and-benefit-summary` with `lang=en`;309- P041 `/basic-patent-data/simple-legal-status`.310311P021 links may expire. Store their state and text alternative; download only for312an explicitly requested Word report, allow HTTP(S) only, reject redirects, cap313bytes, require an image content type, and handle expiration safely. Output314`enrich_display.json`.315316### Stage 6 — Assemble records and trace317318Join `scored.json`, `enrich_display.json`, and `cand_raw.json` by run ID and319patent identifier.320321- Reject mismatched run IDs.322- Generate evidence-bounded English rationales.323- Preserve all component scores and states.324- Retain event-level evidence and errors.325- Do not build an undocumented China or global product deep link.326- Render a publication hyperlink only when a verified stable global URL is327 supplied.328- Output `final_records.json` and329 `high_value_patent_screening_data.json`.330331### Stage 7 — Generate required HTML332333Use `scripts/hv_7_html_a.py`.334335- Escape every dynamic value.336- Permit only absolute HTTP(S) URLs.337- Use `rel="noopener noreferrer"` for external links.338- Include no scripts or event handlers.339- Use semantic headings, tables, captions, text states, local table overflow,340 responsive breakpoints, reduced-motion support, and Letter landscape print341 rules.342- Avoid gradients, glow, decorative badges, emoji, and color-only meaning.343- Include all methodology, gaps, limitations, provenance, and reviewer gates.344345### Stage 8 — Generate optional Word346347Use `scripts/hv_8_word.py` only when requested.348349- Keep selection, scores, rationales, evidence states, and limitations aligned350 with HTML/JSON.351- Use US-Letter landscape, Arial, restrained navy/teal/charcoal, real styles,352 repeating table headers, page numbers, fixed margins, and text labels.353- Use safe HTTP(S) hyperlinks only.354- Keep image download off by default.355- Include sign-off controls and metadata without personal paths.356357## REST authentication and call policy358359Global base URL:360361```text362https://connect.patsnap.com363```364365Authentication:366367```http368Authorization: Bearer <private-api-key>369```370371Use `PATSNAP_API_KEY` or an explicitly configured372`PATSNAP_API_KEY_FILE`. Do not accept a default working-directory key file.373Require HTTPS, reject redirects, bound connect/read timeouts, retry only374transient HTTP states and network exceptions, honor bounded `Retry-After`, and375return structured safe errors. Never persist credentials or response bodies in376exceptions.377378The source filenames and P-number labels are retained for topology and workflow379fidelity. Verify current global endpoint contracts before a live run.380381## Verified Patsnap MCP mapping382383MCP is optional and available only in an MCP-capable host. The reference Python384pipeline executes REST; it must never claim it directly called MCP.385386| Service | Role | Verified configuration |387|---|---|---|388| 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 |389| 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 |390| 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 |391392For MCP-import evidence, record connector key, tool name, normalized request,393retrieval time, record identifiers, and source response locator. Do not mix REST394and MCP-import provenance within one retrieval record. Normalize imported data395to the same checkpoint states and retain raw evidence outside the report where396the execution environment permits.397398## Checkpoint contract399400Every checkpoint must contain:401402- `schema_version`;403- `stage`;404- `run_id`;405- `generated_at` with timezone;406- `source_mode`;407- query hash when applicable;408- upstream checkpoint SHA-256 when applicable;409- candidate or selected count;410- structured records;411- request/connector evidence; and412- structured errors.413414Consumers must reject incompatible schema versions, missing required fields,415and mismatched run IDs. Keep the complete chain with the final report.416417## Failure handling418419| Condition | Required behavior |420|---|---|421| Missing credential | Stop REST retrieval with safe setup guidance |422| Missing reviewed query | Stop before network calls |423| P002 failure | Stop; do not report zero candidates |424| P002 successful empty result | Generate a zero-selection report and trace |425| Candidate cap reached | Mark the universe truncated; do not describe it as complete |426| Repeated page | Stop pagination and record an error |427| P014/P015 failure | Retain affected candidates, zero points under policy, explicit error state |428| Legal endpoint failure | Retain affected candidates; do not conclude absence |429| P025/P041 missing | Keep selected patent and explicit display gap |430| Expired/unsafe drawing URL | Do not embed; show state and text alternative |431| Checkpoint run mismatch | Reject assembly |432| Report link not verified | Render identifier as plain text |433| No Word dependency | HTML/JSON remain valid; explain optional Word requirement |434435## Quality gates436437Before delivery verify:438439- exact source file topology is preserved;440- all source stages, endpoints, metrics, fields, checkpoints, outputs, and441 optional Word behavior remain represented;442- P002 totals reconcile with retrieved, deduplicated, scored, and selected443 counts;444- selected count is within the approved 10–15% rule;445- available zeros are distinguishable from missing/error/not-run;446- every selected patent traces through all checkpoints;447- inventor commas are not fragmented;448- no automatic cross-language identity merge occurs;449- all four legal-event categories retain event-level evidence;450- event activity is not presented as inherently positive;451- citation and family limitations are visible;452- technical summaries are English and clearly sourced;453- publication links are verified global HTTP(S) or plain text;454- HTML has no unescaped dynamic markup, script, handler, unsafe URL, or455 color-only meaning;456- Word contains no personal metadata, local link, floating decorative object,457 or China-only content;458- credentials and private paths are absent;459- all JSON and YAML parse;460- all Python files pass AST and CLI checks;461- no `__pycache__` or `.pyc` is distributed; and462- a human reviewer approves the query, evidence gaps, event meaning, scoring463 interpretation, selected narratives, and intended use.464465## Reference implementation466467Read:468469- `references/screening-standard.md` for model details, states, schema, and470 rationale wording;471- `scripts/README.md` for secure setup, stage execution, MCP boundaries, and472 artifact review;473- `scripts/hv_common.py` for global REST, retry, provenance, and checkpoint474 helpers;475- `scripts/hv_1_fetch.py` through `scripts/hv_8_word.py` for the complete source476 stage topology; and477- `scripts/run_all.py` for end-to-end orchestration.