From eb1c0a7c964f57d5898de7551baef81692ec8877 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 6 Apr 2026 21:10:35 +0000 Subject: [PATCH] fix: improve skill instructions for evaluating, claim-analyzing, and screening - evaluating: read claims one at a time to prevent dependent claim content from leaking into independent claim analysis; decompose all claims including dependent ones; do not reference specification.md during decomposition; cut elements by number of means in the claim - claim-analyzing: search features by element_description instead of element_label to fix label mismatch; batch unmatched elements for user confirmation instead of per-element questions; remove duplicate positive/negative lines - screening: add "No Shortcut Judgment" rule to prevent skipping fetch or judging by title alone - search-feature: use LIKE query on both feature_name and description instead of exact match on feature_name Co-Authored-By: Claude Opus 4.6 --- plugin/skills/claim-analyzing/SKILL.md | 9 ++++----- plugin/skills/evaluating/SKILL.md | 13 ++++++++++--- .../references/instructions/search-feature.md | 12 +++++++++--- plugin/skills/screening/SKILL.md | 7 +++++++ 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/plugin/skills/claim-analyzing/SKILL.md b/plugin/skills/claim-analyzing/SKILL.md index 9bffaf5..a3e615d 100644 --- a/plugin/skills/claim-analyzing/SKILL.md +++ b/plugin/skills/claim-analyzing/SKILL.md @@ -62,15 +62,14 @@ Perform detailed claim analysis by comparing product specification against paten - Invoke `Skill: investigation-fetching` with request "Get elements for patent " **2b. Check Feature Coverage for Each Element**: - - For each patent element, invoke `Skill: investigation-fetching` with request "Search feature: " - - **If feature NOT found**: Do NOT record as 'absent' automatically + - For each patent element, invoke `Skill: investigation-fetching` with request "Search feature: " + - **If feature NOT found**: Do NOT record as 'absent' automatically — collect it + - After checking ALL elements, if any unmatched elements remain, present them to the user in a single batch using `AskUserQuestion` (max 4 questions per call, group by unique functionality — do NOT ask about duplicate capabilities across patents) - Check test environment: `echo $SKILL_BENCH_TEST_CASE` - - **If SKILL_BENCH_TEST_CASE is set** (testing mode): Use `Skill: skill-bench-harness:question-responder` with "Does the product have this feature: ?" + - **If SKILL_BENCH_TEST_CASE is set** (testing mode): Use `Skill: skill-bench-harness:question-responder` for each unmatched element - **If SKILL_BENCH_TEST_CASE is NOT set** (normal mode): Use `AskUserQuestion` tool - If positive: Invoke `Skill: investigation-recording` to record feature with `presence='present'` - If negative: Invoke `Skill: investigation-recording` to record feature with `presence='absent'` - - If positive: Invoke `Skill: investigation-recording` to record feature with `presence='present'` - - If negative: Invoke `Skill: investigation-recording` to record feature with `presence='absent'` **2c. Comparison Analysis**: - Compare product features against patent elements diff --git a/plugin/skills/evaluating/SKILL.md b/plugin/skills/evaluating/SKILL.md index c368c0f..ffe9aee 100644 --- a/plugin/skills/evaluating/SKILL.md +++ b/plugin/skills/evaluating/SKILL.md @@ -83,9 +83,16 @@ Analyze screened patents by decomposing claims into elements and storing analysi ``` 4. **Analyze and Record Elements** (for each patent — LLM interpretation task): - - Read claims from the DB: `sqlite3 patents.db "SELECT claim_number, claim_text FROM claims WHERE patent_id = ''"` - - For EACH claim, decompose into constituent elements (A, B, C...) - - Invoke `Skill: investigation-recording` with request "Record elements for patent : " + - For EACH claim (independent AND dependent), execute the following: + 1. Read ONLY that claim: `sqlite3 patents.db "SELECT claim_number, claim_text FROM claims WHERE patent_id = '' AND claim_number = "` + 2. Decompose into constituent elements based on the means/steps described in the claim text + 3. Invoke `Skill: investigation-recording` with request "Record elements for patent : " + + **CRITICAL Rules for Element Decomposition**: + - Read claims ONE AT A TIME — do NOT read all claims with `SELECT ... WHERE patent_id = ...` + - Do NOT reference `specification.md` during decomposition — decompose based on claim text alone + - Cut elements by the number of means/steps in the claim — do NOT force a specific number of elements + - Decompose ALL claims including dependent claims — do not skip dependent claims 5. **Verify Results**: Confirm all claims and elements are recorded in the database diff --git a/plugin/skills/investigation-fetching/references/instructions/search-feature.md b/plugin/skills/investigation-fetching/references/instructions/search-feature.md index ecd4a9e..d97a028 100644 --- a/plugin/skills/investigation-fetching/references/instructions/search-feature.md +++ b/plugin/skills/investigation-fetching/references/instructions/search-feature.md @@ -1,6 +1,6 @@ # Search Feature -Searches for a specific feature by name in the database. +Searches for a matching feature by keyword against both feature name and description. ## SQL Query @@ -12,13 +12,19 @@ SELECT category, presence FROM features -WHERE feature_name = ''; +WHERE feature_name LIKE '%%' OR description LIKE '%%'; " ``` +## Parameters + +| Parameter | Type | Description | +| ----------- | ---- | ---------------------------------------------------- | +| search_term | TEXT | Keyword to match against feature_name or description | + ## Output Format -Single feature record if found: +Matching feature records: ```json [ diff --git a/plugin/skills/screening/SKILL.md b/plugin/skills/screening/SKILL.md index 7d94781..4ce82d6 100644 --- a/plugin/skills/screening/SKILL.md +++ b/plugin/skills/screening/SKILL.md @@ -32,6 +32,13 @@ Filter collected patents by legal status and relevance to prepare for evaluation - If a reference is "borderline", mark it as 'relevant' rather than 'irrelevant' - Missing a risk is worse than reviewing an extra document +**No Shortcut Judgment**: + +- You MUST fetch each patent and read the `abstract_text` before making a judgment +- Do NOT judge relevance based on title alone — titles can be misleading or too generic +- Do NOT skip fetching patents to speed up processing +- Every patent must go through the full fetch → read abstract → judge → record flow + **Skill-Only Database Access**: - Use `investigation-recording` skill for elements recording (LLM interpretation task)