From 6babde379875e46404d0afacd3679b917aced455 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:11:57 +0000 Subject: [PATCH 01/19] chore: remove unused prior-art-template from investigation-reporting Already integrated into specific-patent-report-template.md. Co-Authored-By: Claude Opus 4.6 --- .../skills/investigation-reporting/SKILL.md | 1 - .../assets/prior-art-template.md | 105 ------------------ 2 files changed, 106 deletions(-) delete mode 100644 plugin/skills/investigation-reporting/assets/prior-art-template.md diff --git a/plugin/skills/investigation-reporting/SKILL.md b/plugin/skills/investigation-reporting/SKILL.md index e0d4dc6..53a7068 100644 --- a/plugin/skills/investigation-reporting/SKILL.md +++ b/plugin/skills/investigation-reporting/SKILL.md @@ -118,7 +118,6 @@ agents should NOT read these: - `specific-patent-report.md`: Single patent detailed report - **assets/**: Templates and reference materials - `investigation-report-template.md`: Standard report template - - `prior-art-template.md`: Prior art investigation report template **IMPORTANT**: External agents should invoke this skill via the Skill tool, not access these internal files directly. diff --git a/plugin/skills/investigation-reporting/assets/prior-art-template.md b/plugin/skills/investigation-reporting/assets/prior-art-template.md deleted file mode 100644 index 74e4b58..0000000 --- a/plugin/skills/investigation-reporting/assets/prior-art-template.md +++ /dev/null @@ -1,105 +0,0 @@ -# Prior Art Investigation Report - -> [!IMPORTANT] -> This is an AI-generated technical analysis, not a legal opinion. - -## 1. Search Strategy Execution Log - -### Layer 1: General Terminology - -- **Query**: ... -- **Results Count**: ... -- **Key Findings**: ... - -### Layer 2: Specific Nomenclature - -- **Query**: ... -- **Results Count**: ... -- **Key Findings**: ... - -### Layer 3: Functional/Role-based - -- **Query**: ... -- **Results Count**: ... -- **Key Findings**: ... - -## 2. Prior Art List - -Select the most relevant documents. - -| Doc Number | Title | Pub Date | Relevance (X/Y/A) | Note | -| :--------- | :---- | :------- | :---------------- | :--- | -| D1 | ... | ... | ... | ... | - -### 2.2 Non-Patent Literature (NPL) - -| NPL ID | Title | Authors | Pub Date | Relevance | Note | -| :----- | :---- | :------ | :------- | :-------- | :--- | -| NPL1 | ... | ... | ... | ... | ... | - -## 3. Comparison (Claim Chart) - -Compare the Spec (Elements) with the Primary Reference (D1). - -| Element | D1 Disclosure | Match? | Difference | -| :------ | :------------ | :----- | :--------- | -| A | ... | Yes/No | ... | -| B | ... | Yes/No | ... | - -### 3.2 Non-Patent Literature Analysis (if applicable) - -| Element | NPL Disclosure | Match? | Note | -| :------ | :------------- | :----- | :--- | -| A | ... | Yes/No | ... | - -## 4. Published Application Amendment Potential (If Applicable) - -**Note**: Skip this section if all references are granted patents. - -For published patent applications (not yet granted), assess the possibility of claim amendments based on embodiments: - -| Doc Number | Application Status | Embodiment Scope | Amendment Potential | Assessment | -| :--------- | :----------------- | :----------------------------------------- | :------------------ | :------------------------------------------------ | -| D1 | Published/Pending | (Describe broader features in embodiments) | High/Medium/Low | (Could claims be amended to cover broader scope?) | - -**Reasoning**: - -- Constitution VI states: "Consider the Detailed Description and embodiments as potential scope for future amendments." -- Evaluate whether embodiments disclose features that could be added to claims during examination. -- High potential: Embodiments clearly describe broader features that would strengthen comparison details. -- Low potential: Embodiments are consistent with current claims or narrower. - -## 5. Similarity Assessment (Prior Art) - -### Overall Similarity: [Significant Similarity / Moderate Similarity / Limited Similarity] - -- **Significant Similarity**: References likely demonstrate significant similarity (Strong Relevance). -- **Moderate Similarity**: References show partial/arguable similarity. -- **Limited Similarity**: No strong references found (Patent Potentially Valid). - -## 6. Conclusion - -- **Verdict**: [Relevant prior art identified / Alternative implementation selected / Aligned with existing techniques / Escalated for legal review] -- **Reasoning**: ... - ---- - -## 7. Quality Gates - -- [ ] All top results reviewed. -- [ ] All non-patent literature top results reviewed. -- [ ] Grade A NPL candidates analyzed in detail. -- [ ] Claim chart completed for the closest prior art. -- [ ] Overall Similarity is formatted exactly as `Overall Similarity: Significant Similarity` (or Moderate/Limited). -- [ ] Final report documents BOTH patent and non-patent literature findings (Constitution III). -- [ ] Conclusion is supported by the comparison. -- [ ] **Verdict**: Must be strictly one of [Relevant prior art identified / Alternative implementation selected / Aligned with existing techniques / Escalated for legal review]. -- [ ] **NO Legal Assertions**: - - [ ] Avoid definitive legal terms (e.g., "invalid", "valid") in favor of technical comparisons. - - [ ] Avoid terms: "Does not satisfy", "Does not infringe". - - [ ] **Terminology**: Avoid "Is a core technology". Instead, use: - - "Characteristic configuration" - - "Major technical configuration" - - "Characteristic implementation described in the patent" - - [ ] Avoid citing specific court case examples. - - [ ] Use descriptive technical language. From 793b8399eea7bfa90ec12ab35a646b0c77656a1e Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:15:57 +0000 Subject: [PATCH 02/19] test: add investigation-reporting tests and remove unused prior-art template Co-Authored-By: Claude Opus 4.6 --- .../functional-overall-progress.toml | 66 +++++++++++++++++++ tests/investigation-reporting/triggering.toml | 17 +++++ 2 files changed, 83 insertions(+) create mode 100644 tests/investigation-reporting/functional-overall-progress.toml create mode 100644 tests/investigation-reporting/triggering.toml diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml new file mode 100644 index 0000000..6fc5116 --- /dev/null +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -0,0 +1,66 @@ +# Test Case: Investigation Reporting - Overall Progress Report + +name = "functional-overall-progress" +description = "Verify investigation-reporting generates PROGRESS.md with pre-seeded database" +timeout = 300 + +test_prompt = """ +I have a patent database with screening and evaluation results ready. Please generate an overall progress report for the current investigation. +""" + +[[setup]] +command = """ +sqlite3 patents.db < /workspaces/patent-kit/plugin/skills/investigation-preparing/references/sql/initialize-database.sql +sqlite3 patents.db "INSERT INTO target_patents (patent_id, title, country, publication_date) VALUES ('US12231380B1', 'Trigger-based transfer of conversations from a chatbot to a human agent', 'US', '2023-10-11');" +sqlite3 patents.db "INSERT INTO target_patents (patent_id, title, country, publication_date) VALUES ('US20230245651A1', 'Enabling user-centered and contextually relevant interaction', 'US', '2023-04-03');" +sqlite3 patents.db "INSERT INTO screened_patents (patent_id, judgment, reason, abstract_text) VALUES ('US12231380B1', 'relevant', 'Related to chatbot-to-human transfer mechanism', 'A system for triggering transfer of conversations from a chatbot to a human agent based on conversation context.');" +sqlite3 patents.db "INSERT INTO screened_patents (patent_id, judgment, reason, abstract_text) VALUES ('US20230245651A1', 'irrelevant', 'Not related to core product features', 'A method for enabling user-centered and contextually relevant interaction in conversational systems.');" +""" + +[[setup]] +path = "specification.md" +content = """ +# Product Specification + +## 1. Product Concept + +AI-powered customer support chatbot with real-time sentiment analysis. + +## 2. Target Market + +- **Country**: US +- **Release Date**: 2025-12-31 +- **Priority Date Cutoff**: 2005-12-31 + +## 3. Competitors + +| Canonical Name | Variations Found in DB | Verified? | Notes | +| -------------------- | -------------------------- | --------- | ------------- | +| Salesforce.Com, Inc. | salesforce.com, inc | Yes | Main assignee | + +## 4. Technical Elements (Constituent Features) + +- **LLM Dialogue Engine**: Multi-turn conversation management with context retention +- **Real-Time Sentiment Analysis**: Detects customer frustration and escalates to human agents +- **CRM Integration API**: Connects to Salesforce for ticket creation and customer history retrieval +""" + +[[checks]] +name = "skill_loaded" +command = { command = "skill-loaded", skill = "investigation-reporting" } + +[[checks]] +name = "investigation_reporting_invoked" +command = { command = "skill-invoked", skill = "investigation-reporting" } + +[[checks]] +name = "progress_file_created" +command = { command = "workspace-file", path = "PROGRESS.md" } + +[[checks]] +name = "progress_has_screening_summary" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Screening Summary" } + +[[checks]] +name = "progress_has_overview" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Overview" } diff --git a/tests/investigation-reporting/triggering.toml b/tests/investigation-reporting/triggering.toml new file mode 100644 index 0000000..0c36328 --- /dev/null +++ b/tests/investigation-reporting/triggering.toml @@ -0,0 +1,17 @@ +# Test Case: Investigation Reporting - Triggering + +name = "triggering" +description = "Verify investigation-reporting skill is triggered when asked for progress" +timeout = 60 + +test_prompt = """ +Load the investigation-reporting skill to understand the patent investigation reporting process. +""" + +[[checks]] +name = "skill_loaded" +command = { command = "skill-loaded", skill = "investigation-reporting" } + +[[checks]] +name = "investigation_reporting_invoked" +command = { command = "skill-invoked", skill = "investigation-reporting" } From 3057d4e362e55a62226c584b27ad4a00a2fc0168 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:16:26 +0000 Subject: [PATCH 03/19] docs: update AGENTS.md to reflect current skill-bench usage Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index fe77f9e..63270ec 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,12 +33,12 @@ An autonomous daemon that runs inside the devcontainer and checks for failing Gi - **Workflow**: Finds failing PRs → Runs `claude` with `--worktree` → Analyzes the failure (typically using `npm run lint`) → Commits the fix and replies to the PR. - **Requirements**: Requires GitHub CLI (`gh`) authenticated inside the devcontainer. -### Skill-Bench (`agents/skill-bench/runner.sh`) +### Skill-Bench (`skill-bench`) -An autonomous test runner that executes E2E tests for the `patent-kit` skills using **TOML-based test cases**. +A TOML-based E2E test runner for `patent-kit` skills, installed via `mise`. -- **Architecture**: All execution happens inside the devcontainer. Test cases are defined in TOML format under `cases//.toml`. -- **Workflow**: Reads test cases from `cases/*/*.toml` → Sets up isolated workspaces → Runs `claude -p` with test prompts → Evaluates results using check scripts → Generates summary in `logs/`. -- **Usage**: `bash agents/skill-bench/runner.sh [pattern]` (default: `cases/*/*.toml`). -- **Test Case Format**: TOML files with `test_prompt`, `timeout`, `[[setup]]`, and `[[checks]]` sections. -- **Requirements**: Requires `yq` and `jq` commands inside the devcontainer. +- **Architecture**: All execution happens inside the devcontainer. Test cases are defined in TOML format under `tests//.toml`. +- **Workflow**: Reads test cases → Sets up isolated workspaces → Runs `claude -p` with test prompts → Evaluates results using built-in check types → Generates summary in `logs/`. +- **Usage**: `mise run test` (runs all tests under `tests/`). +- **Test Case Format**: TOML files with `test_prompt`, `timeout`, `[[setup]]`, and `[[checks]]` sections. See `skill-bench help` for available check types. +- **Check Types**: `skill-loaded`, `skill-invoked`, `mcp-loaded`, `mcp-tool-invoked`, `mcp-success`, `tool-use`, `tool-param`, `workspace-file`, `workspace-dir`, `file-contains`, `log-contains`, `message-contains`, `db-query`. From d8a28767c0b288fcb3629272589903fb7a67b02c Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:17:21 +0000 Subject: [PATCH 04/19] test: copy PROGRESS.md to log output for human review Co-Authored-By: Claude Opus 4.6 --- tests/investigation-reporting/functional-overall-progress.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 6fc5116..83b3100 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -55,7 +55,7 @@ command = { command = "skill-invoked", skill = "investigation-reporting" } [[checks]] name = "progress_file_created" -command = { command = "workspace-file", path = "PROGRESS.md" } +command = { command = "workspace-file", path = "PROGRESS.md", copy_to_output = true } [[checks]] name = "progress_has_screening_summary" From 0a25679e3991f8ff88e3dd64d77bc91c5cd0dc90 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:18:45 +0000 Subject: [PATCH 05/19] test: verify legal-checking skill is loaded in progress report test Co-Authored-By: Claude Opus 4.6 --- .../investigation-reporting/functional-overall-progress.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 83b3100..03463f7 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -64,3 +64,7 @@ command = { command = "file-contains", file = "PROGRESS.md", contains = "Screeni [[checks]] name = "progress_has_overview" command = { command = "file-contains", file = "PROGRESS.md", contains = "Overview" } + +[[checks]] +name = "legal_checking_loaded" +command = { command = "skill-loaded", skill = "legal-checking" } From f0f2121f895a681a0aff332b4daf7fb50bf589ab Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:19:39 +0000 Subject: [PATCH 06/19] test: add specific patent report functional test Co-Authored-By: Claude Opus 4.6 --- .../functional-specific-patent.toml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 tests/investigation-reporting/functional-specific-patent.toml diff --git a/tests/investigation-reporting/functional-specific-patent.toml b/tests/investigation-reporting/functional-specific-patent.toml new file mode 100644 index 0000000..73c0798 --- /dev/null +++ b/tests/investigation-reporting/functional-specific-patent.toml @@ -0,0 +1,100 @@ +# Test Case: Investigation Reporting - Specific Patent Report + +name = "functional-specific-patent" +description = "Verify investigation-reporting generates a specific patent report with pre-seeded investigation data" +timeout = 300 + +test_prompt = """ +I have investigation data for patent US12231380B1. Please generate a specific patent report for this patent. +""" + +[[setup]] +command = """ +sqlite3 patents.db < /workspaces/patent-kit/plugin/skills/investigation-preparing/references/sql/initialize-database.sql +sqlite3 patents.db "INSERT INTO target_patents (patent_id, title, country, publication_date) VALUES ('US12231380B1', 'Trigger-based transfer of conversations from a chatbot to a human agent', 'US', '2023-10-11');" +sqlite3 patents.db "INSERT INTO screened_patents (patent_id, judgment, reason, abstract_text) VALUES ('US12231380B1', 'relevant', 'Related to chatbot-to-human transfer mechanism', 'A system for triggering transfer of conversations from a chatbot to a human agent based on conversation context.');" +sqlite3 patents.db "INSERT INTO claims (patent_id, claim_number, claim_type, claim_text) VALUES ('US12231380B1', 1, 'independent', '1. A computer-implemented method for managing conversations in a chatbot system, comprising: detecting a trigger condition in a conversation context; and transferring the conversation from the chatbot to a human agent based on the trigger condition.');" +sqlite3 patents.db "INSERT INTO elements (patent_id, claim_number, element_label, element_description) VALUES ('US12231380B1', 1, 'A', 'Detecting a trigger condition in a conversation context');" +sqlite3 patents.db "INSERT INTO elements (patent_id, claim_number, element_label, element_description) VALUES ('US12231380B1', 1, 'B', 'Transferring the conversation from the chatbot to a human agent based on the trigger condition');" +sqlite3 patents.db "INSERT INTO similarities (patent_id, claim_number, element_label, similarity_level, analysis_notes) VALUES ('US12231380B1', 1, 'A', 'Moderate', 'Partial overlap in trigger detection approach');" +sqlite3 patents.db "INSERT INTO similarities (patent_id, claim_number, element_label, similarity_level, analysis_notes) VALUES ('US12231380B1', 1, 'B', 'Significant', 'Core feature matches transfer mechanism');" +mkdir -p investigation/US12231380B1 +""" + +[[setup]] +path = "investigation/US12231380B1/evaluation.md" +content = """ +# Patent Evaluation: US12231380B1 + +## Overall Similarity: Moderate + +## Reasoning +The patent shares significant overlap in the conversation transfer mechanism but uses a different trigger detection approach compared to our product specification. +""" + +[[setup]] +path = "investigation/US12231380B1/claim-analysis.md" +content = """ +# Claim Analysis: US12231380B1 + +## Claim 1 (Independent) + +### Element Analysis + +| Element | Target Specification | Patent Disclosure | Verdict | +| -------- | -------------------- | ----------------- | ------- | +| A | Real-time sentiment monitoring as trigger | Detecting a trigger condition in conversation context | Partial | +| B | Transfer to human agent on frustration | Transferring conversation based on trigger condition | Present | +""" + +[[setup]] +path = "specification.md" +content = """ +# Product Specification + +## 1. Product Concept + +AI-powered customer support chatbot with real-time sentiment analysis. + +## 2. Target Market + +- **Country**: US +- **Release Date**: 2025-12-31 +- **Priority Date Cutoff**: 2005-12-31 + +## 3. Competitors + +| Canonical Name | Variations Found in DB | Verified? | Notes | +| -------------------- | -------------------------- | --------- | ------------- | +| Salesforce.Com, Inc. | salesforce.com, inc | Yes | Main assignee | + +## 4. Technical Elements (Constituent Features) + +- **LLM Dialogue Engine**: Multi-turn conversation management with context retention +- **Real-Time Sentiment Analysis**: Detects customer frustration and escalates to human agents +- **CRM Integration API**: Connects to Salesforce for ticket creation and customer history retrieval +""" + +[[checks]] +name = "skill_loaded" +command = { command = "skill-loaded", skill = "investigation-reporting" } + +[[checks]] +name = "investigation_reporting_invoked" +command = { command = "skill-invoked", skill = "investigation-reporting" } + +[[checks]] +name = "legal_checking_loaded" +command = { command = "skill-loaded", skill = "legal-checking" } + +[[checks]] +name = "report_contains_patent_id" +command = { command = "message-contains", contains = "US12231380B1" } + +[[checks]] +name = "report_contains_similarity" +command = { command = "message-contains", contains = "Moderate" } + +[[checks]] +name = "report_contains_element_analysis" +command = { command = "message-contains", contains = "Element" } From c35d31ee0d80f960f9c347829a2d5a5dacca7b96 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:21:07 +0000 Subject: [PATCH 07/19] refactor: inline legal-checking instructions and add context: fork Merge references/instructions.md into SKILL.md for single-file clarity. Add user_invocable: false and context: fork since this is an internal skill invoked by other skills via the Skill tool. Co-Authored-By: Claude Opus 4.6 --- plugin/skills/legal-checking/SKILL.md | 178 +++++++++++++++--- .../legal-checking/references/instructions.md | 147 --------------- 2 files changed, 156 insertions(+), 169 deletions(-) delete mode 100644 plugin/skills/legal-checking/references/instructions.md diff --git a/plugin/skills/legal-checking/SKILL.md b/plugin/skills/legal-checking/SKILL.md index 87e1d19..8a10aa2 100644 --- a/plugin/skills/legal-checking/SKILL.md +++ b/plugin/skills/legal-checking/SKILL.md @@ -1,15 +1,20 @@ --- name: legal-checking description: "Review a file for legal compliance violations. Detects prohibited terms (infringe, satisfy, anticipate, obvious, equivalent, invalid) and suggests compliant alternatives. Load this skill when: reviewing patent analysis, checking for legal language violations, or analyzing compliance" +user_invocable: false +context: fork --- # Legal Checker - Patent Compliance Reviewer -Version: 1.0.0 - ## Purpose -Reviews patent analysis documents for legal compliance violations and suggests corrective actions. This skill identifies prohibited legal assertions and descriptive language that crosses into the practice of law. +Reviews patent analysis documents for legal compliance violations and suggests +corrective actions. This skill identifies prohibited legal assertions and +descriptive language that crosses into the practice of law. + +**Important**: This skill does NOT modify files. It only provides analysis and +suggestions. ## How It Works @@ -21,40 +26,169 @@ Reviews patent analysis documents for legal compliance violations and suggests c - Suggested compliant alternatives - Corrected version (optional) -**Important**: This skill does NOT modify files. It only provides analysis and suggestions. - -## Usage +### Step 1: Read the File -``` -/path/to/patent-analysis.md -``` +Use the Read tool to load the file content. -The skill will: +### Step 2: Identify Prohibited Terms -1. Read the specified file -2. Review for legal compliance violations -3. Output a compliance report with findings and suggestions +Scan the document for prohibited legal terms and assertions: -## What It Checks - -### Prohibited Legal Assertions +**Strictly Prohibited Terms:** - "Does not satisfy" - "Does not infringe" - "Is a core technology" - "Is invalid" -- "Anticipates" -- "Renders obvious" +- "Anticipates" / "Is anticipated" +- "Renders obvious" / "Would be obvious" - "Is equivalent" -- Definitive legal conclusions +- "Clearly", "Obviously", "Undoubtedly" -### Recommended Descriptive Language +**Recommended Descriptive Language:** - "Discloses", "shows", "describes", "teaches" - "Covers", "includes", "implements", "performs" - "Found in", "present in", "described in" - "Differs from", "lacks", "does not show" -## References +### Step 3: Generate Compliance Report + +#### 1. Summary + +- Total number of violations found +- Overall compliance status + +#### 2. Detailed Findings + +For each violation: + +- **Prohibited Term**: The exact term/phrase found +- **Location**: Section/paragraph where it appears +- **Issue**: Which rule is violated +- **Suggested Alternative**: Compliant replacement + +#### 3. Corrected Version (Optional) + +Provide a rewritten version of the document with all violations corrected. + +### Step 4: Output the Report + +Present the compliance report to the user. Do NOT modify the original file. + +--- + +## I. Prohibited Legal Assertions (STRICT) + +To detect risks without crossing into the practice of law, specific legal +assertions and definitive judgments are STRICTLY PROHIBITED in all outputs. + +- **Rule**: You MUST NOT use the following terms: + - "Does not satisfy" + - "Does not infringe" + - "Is a core technology" + - "Is invalid" + +- **Rules**: + - **Avoid definitive legal conclusions**: Use technical descriptors (e.g., + "features not found", "low likelihood of mapping", "fundamental feature"). + - **No Specific Case Citations**: Do not cite specific court cases or legal + precedents to justify a conclusion. + +- **Requirement**: Focus entirely on technical comparison (Element A vs Feature + A') and factual observation. + +## II. Descriptive Equivalence Language + +When discussing potential equivalence or similarity, strictly descriptive +language describing the technical reality MUST be used. + +- **Prohibited**: "This implementation satisfies the 5 requirements of + equivalence." + +- **Recommended**: + - "The alternative implementation achieves the same functional outcome and + exhibits comparable system behavior under typical operating conditions." + - "The variation represents a commonly used implementation approach." + +- **Rationale**: The AI provides technical analysis of function and behavior, + not legal determination of equivalence. + +## III. Acceptable vs. Unacceptable Language Examples + +### Unacceptable (Legal Determinations): + +- "The claim does not infringe the reference." +- "This element is satisfied by the prior art." +- "The product is clearly outside the scope of the claims." +- "This patent is invalid due to obviousness." + +### Acceptable (Technical Descriptions): + +- "Feature A' performs the same function as Element A: [describe technical + function]." +- "The reference discloses a component that [technical description]." +- "Element A requires [technical requirement], which is not found in the + reference." +- "The implementation differs in the following technical aspects: [list + differences]." + +## IV. Claim Mapping Best Practices + +When mapping claim elements to prior art features: + +1. **Be Specific**: Quote exact claim language and compare to specific reference + disclosures. +2. **Avoid Conclusions**: Present the comparison facts; let the reader draw + legal conclusions. +3. **Use Neutral Language**: "The reference shows X" instead of "The reference + proves X." +4. **Document Gaps**: Clearly state what is NOT found in the reference. + +### Example Format: + +**Element A**: [Quote from claim] + +**Reference Analysis**: + +- Found: [describe what IS in the reference] +- Not found: [describe what is NOT in the reference] +- Technical difference: [describe any differences] + +**Conclusion**: [Technical summary, NOT legal conclusion] + +## V. FTO Analysis Guidelines + +For Freedom to Operate analysis: + +1. **Identify Risks, Not Infringements**: Use terms like "potential risk," + "requires further review," "may overlap." +2. **Scope Assessment**: Describe claim breadth in technical terms, not legal + terms. +3. **Design Around Options**: Suggest technical alternatives without + guaranteeing non-infringement. + +### Acceptable FTO Language: + +- "The claim covers [technical description], which may overlap with [product + feature]." +- "Consider design modifications to [technical element] to reduce potential + risk." +- "Further analysis recommended for [specific technical area]." + +## VI. Invalidity Analysis Guidelines + +For invalidity or novelty analysis: + +1. **Anticipation**: Describe what the reference discloses; avoid "anticipates" + or "renders obvious." +2. **Obviousness**: Present technical differences; avoid "would have been + obvious." +3. **Claim Construction**: Describe claim meaning in technical terms; avoid + legal claim construction. + +### Acceptable Invalidity Language: -- `references/instructions.md` - Detailed legal compliance rules +- "The reference discloses all elements of Claim 1: [list]." +- "The implementation differs from the reference in [technical aspect]." +- "The reference teaches away from [technical feature]." diff --git a/plugin/skills/legal-checking/references/instructions.md b/plugin/skills/legal-checking/references/instructions.md deleted file mode 100644 index 630a0de..0000000 --- a/plugin/skills/legal-checking/references/instructions.md +++ /dev/null @@ -1,147 +0,0 @@ -# Legal Checker - Patent Investigation Guidelines - -Version: 1.0.0 | Status: Active - -## Review Process - -When invoked with a file path, follow this process: - -### Step 1: Read the File - -Use the Read tool to load the file content. - -### Step 2: Identify Prohibited Terms - -Scan the document for prohibited legal terms and assertions: - -**Strictly Prohibited Terms:** - -- "Does not satisfy" -- "Does not infringe" -- "Is a core technology" -- "Is invalid" -- "Anticipates" / "Is anticipated" -- "Renders obvious" / "Would be obvious" -- "Is equivalent" -- "Clearly", "Obviously", "Undoubtedly" - -### Step 3: Generate Compliance Report - -Structure your report as follows: - -#### 1. Summary - -- Total number of violations found -- Overall compliance status - -#### 2. Detailed Findings - -For each violation: - -- **Prohibited Term**: The exact term/phrase found -- **Location**: Section/paragraph where it appears -- **Issue**: Which rule is violated -- **Suggested Alternative**: Compliant replacement - -#### 3. Corrected Version (Optional) - -Provide a rewritten version of the document with all violations corrected. - -### Step 4: Output the Report - -Present the compliance report to the user. Do NOT modify the original file. - ---- - -## I. Prohibited Legal Assertions (STRICT) - -To detect risks without crossing into the practice of law, specific legal assertions and definitive judgments are STRICTLY PROHIBITED in all outputs. - -- **Rule**: You MUST NOT use the following terms: - - "Does not satisfy" - - "Does not infringe" - - "Is a core technology" - - "Is invalid" - -- **Rules**: - - **Avoid definitive legal conclusions**: Use technical descriptors (e.g., "features not found", "low likelihood of mapping", "fundamental feature"). - - **No Specific Case Citations**: Do not cite specific court cases or legal precedents to justify a conclusion. - -- **Requirement**: Focus entirely on technical comparison (Element A vs Feature A') and factual observation. - -## II. Descriptive Equivalence Language - -When discussing potential equivalence or similarity, strictly descriptive language describing the technical reality MUST be used. - -- **Prohibited**: "This implementation satisfies the 5 requirements of equivalence." - -- **Recommended**: - - "The alternative implementation achieves the same functional outcome and exhibits comparable system behavior under typical operating conditions." - - "The variation represents a commonly used implementation approach." - -- **Rationale**: The AI provides technical analysis of function and behavior, not legal determination of equivalence. - -## III. Acceptable vs. Unacceptable Language Examples - -### Unacceptable (Legal Determinations): - -- ❌ "The claim does not infringe the reference." -- ❌ "This element is satisfied by the prior art." -- ❌ "The product is clearly outside the scope of the claims." -- ❌ "This patent is invalid due to obviousness." - -### Acceptable (Technical Descriptions): - -- ✅ "Feature A' performs the same function as Element A: [describe technical function]." -- ✅ "The reference discloses a component that [technical description]." -- ✅ "Element A requires [technical requirement], which is not found in the reference." -- ✅ "The implementation differs in the following technical aspects: [list differences]." - -## IV. Claim Mapping Best Practices - -When mapping claim elements to prior art features: - -1. **Be Specific**: Quote exact claim language and compare to specific reference disclosures. -2. **Avoid Conclusions**: Present the comparison facts; let the reader draw legal conclusions. -3. **Use Neutral Language**: "The reference shows X" instead of "The reference proves X." -4. **Document Gaps**: Clearly state what is NOT found in the reference. - -### Example Format: - -**Element A**: [Quote from claim] - -**Reference Analysis**: - -- Found: [describe what IS in the reference] -- Not found: [describe what is NOT in the reference] -- Technical difference: [describe any differences] - -**Conclusion**: [Technical summary, NOT legal conclusion] - -## V. FTO Analysis Guidelines - -For Freedom to Operate analysis: - -1. **Identify Risks, Not Infringements**: Use terms like "potential risk," "requires further review," "may overlap." -2. **Scope Assessment**: Describe claim breadth in technical terms, not legal terms. -3. **Design Around Options**: Suggest technical alternatives without guaranteeing non-infringement. - -### Acceptable FTO Language: - -- "The claim covers [technical description], which may overlap with [product feature]." -- "Consider design modifications to [technical element] to reduce potential risk." -- "Further analysis recommended for [specific technical area]." - -## VI. Invalidity Analysis Guidelines - -For invalidity or novelty analysis: - -1. **Anticipation**: Describe what the reference discloses; avoid "anticipates" or "renders obvious." -2. **Obviousness**: Present technical differences; avoid "would have been obvious." -3. **Claim Construction**: Describe claim meaning in technical terms; avoid legal claim construction. - -### Acceptable Invalidity Language: - -- "The reference discloses all elements of Claim 1: [list]." -- "The implementation differs from the reference in [technical aspect]." -- "The reference teaches away from [technical feature]." From 55e8435929b7e29ba1374da06f0f48664be9160d Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:22:39 +0000 Subject: [PATCH 08/19] refactor: inline targeting instructions into SKILL.md Merge references/instructions.md into SKILL.md for single-file clarity. Co-Authored-By: Claude Opus 4.6 --- plugin/skills/legal-checking/SKILL.md | 12 +- plugin/skills/targeting/SKILL.md | 214 ++++++++++++++++-- .../targeting/references/instructions.md | 154 ------------- 3 files changed, 195 insertions(+), 185 deletions(-) delete mode 100644 plugin/skills/targeting/references/instructions.md diff --git a/plugin/skills/legal-checking/SKILL.md b/plugin/skills/legal-checking/SKILL.md index 8a10aa2..2b57d0c 100644 --- a/plugin/skills/legal-checking/SKILL.md +++ b/plugin/skills/legal-checking/SKILL.md @@ -162,11 +162,11 @@ When mapping claim elements to prior art features: For Freedom to Operate analysis: 1. **Identify Risks, Not Infringements**: Use terms like "potential risk," - "requires further review," "may overlap." + "requires further review," "may overlap." 2. **Scope Assessment**: Describe claim breadth in technical terms, not legal - terms. + terms. 3. **Design Around Options**: Suggest technical alternatives without - guaranteeing non-infringement. + guaranteeing non-infringement. ### Acceptable FTO Language: @@ -181,11 +181,11 @@ For Freedom to Operate analysis: For invalidity or novelty analysis: 1. **Anticipation**: Describe what the reference discloses; avoid "anticipates" - or "renders obvious." + or "renders obvious." 2. **Obviousness**: Present technical differences; avoid "would have been - obvious." + obvious." 3. **Claim Construction**: Describe claim meaning in technical terms; avoid - legal claim construction. + legal claim construction. ### Acceptable Invalidity Language: diff --git a/plugin/skills/targeting/SKILL.md b/plugin/skills/targeting/SKILL.md index 210c22a..3123896 100644 --- a/plugin/skills/targeting/SKILL.md +++ b/plugin/skills/targeting/SKILL.md @@ -14,7 +14,8 @@ description: | ## Purpose -Generate high-precision search queries and create a consolidated patent population for screening. +Generate high-precision search queries and create a consolidated patent +population for screening. ## Prerequisites @@ -33,41 +34,210 @@ Generate high-precision search queries and create a consolidated patent populati 3. Try synonyms or broader terms - Document query evolution in reports +### Template Adherence + +- **Requirement**: Strict adherence to the output templates is required. +- **Templates**: Located in `assets/` directory. + - `targeting-template.md` - Use for `targeting.md` + - `keywords-template.md` - Use for `keywords.md` + +### CRITICAL: Skill-Only MCP Access + +**You MUST NOT call MCP tools (`search_patents`, `fetch_patent`, +`execute_cypher`) directly.** + +All patent operations MUST go through the Skill tool: + +- Patent search → `google-patent-cli:patent-search` (via Skill tool) +- Patent fetch → `google-patent-cli:patent-fetch` (via Skill tool) +- Assignee check → `google-patent-cli:patent-assignee-check` (via Skill tool) + +The Skill tool handles MCP tool invocation and cypher queries internally. Do +NOT bypass the skill layer. + +### Search Scope + +Target patent research MUST be scoped to the **Target Market** specified in +`specification.md`. + +- **Rule**: Use the country code from the Target Market field (e.g., `US`, + `JP`, `EP`, `CN`). +- **Mechanism**: If the target market uses a non-English language, use machine + translation for keyword queries. + ## Skill Orchestration -### 1. Check Specification +### Process + +#### Step 1: Check Specification Use the Glob tool to check if `specification.md` exists: - **If exists**: Proceed to targeting execution - **If NOT exists**: - 1. Use the Skill tool to load the `concept-interviewing` skill to create the specification + 1. Use the Skill tool to load the `concept-interviewing` skill to create the + specification 2. Wait for the concept-interviewing to complete 3. Verify that `specification.md` has been created 4. Only proceed after the specification file exists -### 2. Execute Targeting - -**CRITICAL: Always use the Skill tool to load google-patent-cli skills for patent searches.** - -1. **Execute Competitor Patent Research**: - - Use `google-patent-cli:patent-search` skill with assignee search - - Analyze results and extract "Golden Keywords" - - Save keywords to `keywords.md` -2. **Execute Market Patent Research**: - - Use `google-patent-cli:patent-search` skill with keyword queries - - Refine queries based on noise analysis -3. **Create Output Files**: - - Fill `targeting.md` using the template - - Update `keywords.md` with golden keywords registry - -### 3. Transition to Screening +#### Step 2: Execute Targeting + +Perform the following targeting process relative to the **Priority Date Cutoff** +from `specification.md`. + +**IMPORTANT**: For prior art searches, use the **Priority Date** as the cutoff. +Patents published before the Priority Date are considered prior art. + +**IMPORTANT**: This step should be conducted **interactively with the user**. +Show results, ask for feedback, and refine the queries together. + +##### Noise Definition + +A search result is considered **"High Noise"** if **8 or more** of the top 20 +snippets fall into any of the following categories: + +- **Different Field**: Clearly different technical field (e.g., Communication vs + Medical). +- **Generic**: Keywords are too general and lack technical specificity. +- **Irrelevant**: Unrelated to the competitor's known products or the target use + case. + +##### Phase 1: Competitor Patent Research + +1. **Start Broad**: + - **Action**: Use the **Skill tool** to load `google-patent-cli:patent-search` + - **Request format**: + ``` + patent_search({ + assignee: [""], + country: "", + filing_before: "", + filing_after: "", + limit: 20 + }) + ``` + - **CRITICAL: Check skill response**: + - Verify the skill completed successfully and returned results + - **If skill fails**: Refer to `references/troubleshooting.md` for error + handling + - Do NOT proceed with fabricated search results + +2. **Check Volume**: + - If total count is **under 2000**: This is a good starting point. Check the + top 20 snippets to understand what kind of patents they are filing. + - If total count is **over 2000**: You need to narrow it down. + +3. **Iterative Narrowing & Keyword Extraction**: + - **Action**: Add a keyword representing the "Product Concept" to the query + parameter. + - **CRITICAL RULE 1**: **Always use quotes** for keywords (e.g., + `"smartphone"` instead of `smartphone`) to ensure exact matching and + proper AND logic. Unquoted terms might be treated as broad OR searches by + the search engine. + - **CRITICAL RULE 2**: **Mandatory Noise Analysis**. After _every_ search + command, you MUST inspect the top 20 snippets. + - **Check**: Does it meet the **High Noise** criteria (8+ irrelevant + results)? + - **Refine**: If **High Noise**, you MUST adjust the query (add exclusions + or specific constraints) BEFORE proceeding to the next keyword. + - **Identify**: Look for **Technical Terms** ("Golden Keywords"). + - **Register**: Immediately add verified keywords to `keywords.md` (see + Output section for format). + - **CRITICAL RULE 3**: **Over-Filtering Check**. If adding a keyword reduces + the count to **under 200**, this might be too narrow. **Ask the user** if + this is acceptable (e.g., for niche markets) or if they want to broaden + the query. + - **Repeat**: Continue adding quoted keywords (e.g., query: + `"\"keyword1\" AND \"keyword2\""`) until the count is reasonable (< 2000) + and relevance is high. + +##### Phase 2: Market Patent Research + +1. **Apply Keywords**: + - Use the "Golden Keywords" discovered in Phase 1 (refer to `keywords.md`). + - **Action**: Use the **Skill tool** to load `google-patent-cli:patent-search` + - **Request format**: + ``` + patent_search({ + query: "\"keyword1\" AND \"keyword2\" AND ...", + country: "", + filing_before: "", + filing_after: "", + limit: 20 + }) + ``` + - **CRITICAL: Check skill response**: + - Verify the skill completed successfully and returned results + - **If skill fails**: Refer to `references/troubleshooting.md` for error + handling + - Do NOT proceed with fabricated search results + +2. **Iterative Narrowing**: + - Similar to Phase 1, if the count is > 2000, add more specific concept + keywords (always quoted). + - **Mandatory Noise Analysis**: + - After _every_ search, check the snippets against the **High Noise** + criteria (8+ irrelevant results). + - **Analyze**: Identify why irrelevant patents are appearing. Is it a + polysemy issue? + - **Correct**: Add context keywords (e.g., `AND "vehicle"`) or exclusions + immediately. Do not blindly add more keywords without fixing the noise. + - **Goal**: Reach < 2000 hits with high relevance. + - **Over-Filtering**: If count < 200, **confirm with the user** before + proceeding. + +##### Google Patents UI Query Formatting + +When formatting queries for direct use in +[Google Patents](https://patents.google.com/): + +1. **Order**: Keywords MUST be placed **at the beginning** of the query string. +2. **Keywords**: MUST be quoted (e.g., `"smartphone"`). +3. **Assignees**: MUST be quoted and space-separated keys (e.g., + `assignee:"Google LLC" assignee:"Microsoft Corp"`). +4. **Country/Language**: If a country is specified, the language MUST also be + specified (e.g., `country:JP language:JAPANESE`, `country:CN + language:CHINESE`). + +#### Step 3: Create Output Files + +- Create a file `targeting.md` using the template + `assets/targeting-template.md`. Fill in: + - **Generated Search Commands** with: + - **Query**: The final command. + - **Hit Count**: Number of hits. + - **Included Keywords**: List of positive keywords. + - **Excluded Noise**: List of negative keywords/constraints. + - **Rationale**: Explanation of why this query is optimal (balance of + precision/recall). + - **Validation & Adjustment Log** with: + - **Initial Results**: Count before adjustment. + - **Noise Cause**: Polysemy, Generic, Domain, etc. (Why was it noise?) + - **Adjustment**: What keywords/exclusions were added. + - **Result Count**: Count after adjustment. +- Create a file `keywords.md` using the template + `assets/keywords-template.md`. This is the **Golden Keywords Registry**. + +#### Step 4: Transition to Screening Upon successful completion: - Deliverables: `targeting.md`, `keywords.md` - Next skill: `/patent-kit:screening` +## Quality Gates + +- [ ] **Ambiguity Check**: Did you check for and handle ambiguous + keywords/abbreviations? +- [ ] **Over-Filtering Check**: If count < 200, did you confirm with the user + that this is intended? +- [ ] **Volume Control**: Is the final General Search count under 2000 (or + reasonably low)? +- [ ] **Output**: Is `targeting.md` created with both query patterns and the + validation log? +- [ ] **Keywords Registry**: Is `keywords.md` created with golden keywords? + ## State Management ### Initial State @@ -80,9 +250,3 @@ Upon successful completion: - `targeting.md` created with validated search commands - `keywords.md` created with golden keywords registry - Ready to proceed to screening skill - -## References - -- `references/instructions.md` - Detailed targeting process instructions -- `assets/targeting-template.md` - Output template for targeting results -- `assets/keywords-template.md` - Output template for keywords registry diff --git a/plugin/skills/targeting/references/instructions.md b/plugin/skills/targeting/references/instructions.md deleted file mode 100644 index 2c0bebb..0000000 --- a/plugin/skills/targeting/references/instructions.md +++ /dev/null @@ -1,154 +0,0 @@ -# Targeting - Detailed Instructions - -## Template Adherence - -- **Requirement**: Strict adherence to the output templates is required. -- **Templates**: Located in `assets/` directory. - - `targeting-template.md` - Use for `targeting.md` - - `keywords-template.md` - Use for `keywords.md` - -## CRITICAL: Skill-Only MCP Access - -**You MUST NOT call MCP tools (`search_patents`, `fetch_patent`, `execute_cypher`) directly.** - -All patent operations MUST go through the Skill tool: - -- Patent search → `google-patent-cli:patent-search` (via Skill tool) -- Patent fetch → `google-patent-cli:patent-fetch` (via Skill tool) -- Assignee check → `google-patent-cli:patent-assignee-check` (via Skill tool) - -The Skill tool handles MCP tool invocation and cypher queries internally. Do NOT bypass the skill layer. - -## Search Scope - -Target patent research MUST be scoped to the **Target Market** specified in `specification.md`. - -- **Rule**: Use the country code from the Target Market field (e.g., `US`, `JP`, `EP`, `CN`). -- **Mechanism**: If the target market uses a non-English language, use machine translation for keyword queries. - -## Overview - -Generate high-precision search queries based on the product concept and competitors defined in concept-interviewing. This concludes with a set of validated search commands. - -## Input - -- **Specification**: `specification.md` (generated in concept-interviewing skill). -- **Skills**: `google-patent-cli` (patent-search) from marketplace. - -## Process - -### Targeting Process - -Perform the following targeting process relative to the `Priority Date Cutoff` from `specification.md`. - -**IMPORTANT**: For prior art searches, use the **Priority Date** as the cutoff. Patents published before the Priority Date are considered prior art. - -**IMPORTANT**: This step should be conducted **interactively with the user**. Show results, ask for feedback, and refine the queries together. - -#### Noise Definition - -A search result is considered **"High Noise"** if **8 or more** of the top 20 snippets fall into any of the following categories: - -- **Different Field**: Clearly different technical field (e.g., Communication vs Medical). -- **Generic**: Keywords are too general and lack technical specificity. -- **Irrelevant**: Unrelated to the competitor's known products or the target use case. - -#### Phase 1: Competitor Patent Research - -1. **Start Broad**: - - **Action**: Use the **Skill tool** to load `google-patent-cli:patent-search` - - **Request format**: - ``` - patent_search({ - assignee: [""], - country: "", - filing_before: "", - filing_after: "", - limit: 20 - }) - ``` - - **CRITICAL: Check skill response**: - - Verify the skill completed successfully and returned results - - **If skill fails**: Refer to `references/troubleshooting.md` for error handling - - Do NOT proceed with fabricated search results - -2. **Check Volume**: - - If total count is **under 2000**: This is a good starting point. Check the top 20 snippets to understand what kind of patents they are filing. - - If total count is **over 2000**: You need to narrow it down. -3. **Iterative Narrowing & Keyword Extraction**: - - **Action**: Add a keyword representing the "Product Concept" to the query parameter. - - **CRITICAL RULE 1**: **Always use quotes** for keywords (e.g., `"smartphone"` instead of `smartphone`) to ensure exact matching and proper AND logic. Unquoted terms might be treated as broad OR searches by the search engine. - - **CRITICAL RULE 2**: **Mandatory Noise Analysis**. After _every_ search command, you MUST inspect the top 20 snippets. - - **Check**: Does it meet the **High Noise** criteria (8+ irrelevant results)? - - **Refine**: If **High Noise**, you MUST adjust the query (add exclusions or specific constraints) BEFORE proceeding to the next keyword. - - **Identify**: Look for **Technical Terms** ("Golden Keywords"). - - **Register**: Immediately add verified keywords to `keywords.md` (see Output section for format). - - **CRITICAL RULE 3**: **Over-Filtering Check**. If adding a keyword reduces the count to **under 200**, this might be too narrow. **Ask the user** if this is acceptable (e.g., for niche markets) or if they want to broaden the query. - - **Repeat**: Continue adding quoted keywords (e.g., query: "\"keyword1\" AND \"keyword2\"") until the count is reasonable (< 2000) and relevance is high. - -#### Phase 2: Market Patent Research - -1. **Apply Keywords**: - - Use the "Golden Keywords" discovered in Phase 1 (refer to `keywords.md`). - - **Action**: Use the **Skill tool** to load `google-patent-cli:patent-search` - - **Request format**: - ``` - patent_search({ - query: "\"keyword1\" AND \"keyword2\" AND ...", - country: "", - filing_before: "", - filing_after: "", - limit: 20 - }) - ``` - - **CRITICAL: Check skill response**: - - Verify the skill completed successfully and returned results - - **If skill fails**: Refer to `references/troubleshooting.md` for error handling - - Do NOT proceed with fabricated search results - -2. **Iterative Narrowing**: - - Similar to Phase 1, if the count is > 2000, add more specific concept keywords (always quoted). - - **Mandatory Noise Analysis**: - - After _every_ search, check the snippets against the **High Noise** criteria (8+ irrelevant results). - - **Analyze**: Identify why irrelevant patents are appearing. Is it a polysemy issue? - - **Correct**: Add context keywords (e.g., `AND "vehicle"`) or exclusions immediately. Do not blindly add more keywords without fixing the noise. - - **Goal**: Reach < 2000 hits with high relevance. - - **Over-Filtering**: If count < 200, **confirm with the user** before proceeding. - -## Google Patents UI Query Formatting - -When formatting queries for direct use in [Google Patents](https://patents.google.com/): - -1. **Order**: Keywords MUST be placed **at the beginning** of the query string. -2. **Keywords**: MUST be quoted (e.g., `"smartphone"`). -3. **Assignees**: MUST be quoted and space-separated keys (e.g., `assignee:"Google LLC" assignee:"Microsoft Corp"`). -4. **Country/Language**: If a country is specified, the language MUST also be specified (e.g., `country:JP language:JAPANESE`, `country:CN language:CHINESE`). - -## Output - -- Create a file `targeting.md` using the template `[targeting-template.md](assets/targeting-template.md)`. -- Fill in the **Generated Search Commands** with: - - **Query**: The final command. - - **Hit Count**: Number of hits. - - **Included Keywords**: List of positive keywords. - - **Excluded Noise**: List of negative keywords/constraints. - - **Rationale**: Explanation of why this query is optimal (balance of precision/recall). -- Fill in the **Validation & Adjustment Log** with: - - **Initial Results**: Count before adjustment. - - **Noise Cause**: Polysemy, Generic, Domain, etc. (Why was it noise?) - - **Adjustment**: What keywords/exclusions were added. - - **Result Count**: Count after adjustment. -- Create a file `keywords.md` using the template `[keywords-template.md](assets/keywords-template.md)`. This is the **Golden Keywords Registry**. - -## Quality Gates - -- [ ] **Ambiguity Check**: Did you check for and handle ambiguous keywords/abbreviations? -- [ ] **Over-Filtering Check**: If count < 200, did you confirm with the user that this is intended? -- [ ] **Volume Control**: Is the final General Search count under 2000 (or reasonably low)? -- [ ] **Output**: Is `targeting.md` created with both query patterns and the validation log? -- [ ] **Keywords Registry**: Is `keywords.md` created with golden keywords? - -## Deliverables - -1. `targeting.md` -2. `keywords.md` From 208758fa82542f764e809add629d5cb0fe309e07 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:30:24 +0000 Subject: [PATCH 09/19] test: fix targeting functional test checks Replace tool-param checks with skill-invoked for patent-search, and add copy_to_output for generated files. Co-Authored-By: Claude Opus 4.6 --- plugin/skills/targeting/SKILL.md | 10 +++++----- tests/targeting/functional-with-spec.toml | 16 ++++------------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/plugin/skills/targeting/SKILL.md b/plugin/skills/targeting/SKILL.md index 3123896..3ac43e9 100644 --- a/plugin/skills/targeting/SKILL.md +++ b/plugin/skills/targeting/SKILL.md @@ -198,7 +198,7 @@ When formatting queries for direct use in `assignee:"Google LLC" assignee:"Microsoft Corp"`). 4. **Country/Language**: If a country is specified, the language MUST also be specified (e.g., `country:JP language:JAPANESE`, `country:CN - language:CHINESE`). +language:CHINESE`). #### Step 3: Create Output Files @@ -229,13 +229,13 @@ Upon successful completion: ## Quality Gates - [ ] **Ambiguity Check**: Did you check for and handle ambiguous - keywords/abbreviations? + keywords/abbreviations? - [ ] **Over-Filtering Check**: If count < 200, did you confirm with the user - that this is intended? + that this is intended? - [ ] **Volume Control**: Is the final General Search count under 2000 (or - reasonably low)? + reasonably low)? - [ ] **Output**: Is `targeting.md` created with both query patterns and the - validation log? + validation log? - [ ] **Keywords Registry**: Is `keywords.md` created with golden keywords? ## State Management diff --git a/tests/targeting/functional-with-spec.toml b/tests/targeting/functional-with-spec.toml index 09b8edd..a39eea1 100644 --- a/tests/targeting/functional-with-spec.toml +++ b/tests/targeting/functional-with-spec.toml @@ -63,21 +63,13 @@ name = "targeting_invoked" command = { command = "skill-invoked", skill = "targeting" } [[checks]] -name = "specification_read" -command = { command = "tool-use", tool = "Read", param = "file_path", value = "specification.md" } - -[[checks]] -name = "targeting_template_read" -command = { command = "tool-use", tool = "Read", param = "file_path", value = "targeting-template.md" } - -[[checks]] -name = "keywords_template_read" -command = { command = "tool-use", tool = "Read", param = "file_path", value = "keywords-template.md" } +name = "patent_search_invoked" +command = { command = "skill-invoked", skill = "patent-search" } [[checks]] name = "targeting_md_created" -command = { command = "workspace-file", path = "targeting.md" } +command = { command = "workspace-file", path = "targeting.md", copy_to_output = true } [[checks]] name = "keywords_md_created" -command = { command = "workspace-file", path = "keywords.md" } +command = { command = "workspace-file", path = "keywords.md", copy_to_output = true } From 3e1261749986848b04c09e7e3ffe3280f7802b71 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:36:37 +0000 Subject: [PATCH 10/19] test: fix investigation-reporting checks to use log-contains file-contains and message-contains were not matching correctly. Switch to log-contains for reliable text verification. Co-Authored-By: Claude Opus 4.6 --- .../functional-overall-progress.toml | 4 ++-- .../investigation-reporting/functional-specific-patent.toml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 03463f7..d11e1b8 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -59,11 +59,11 @@ command = { command = "workspace-file", path = "PROGRESS.md", copy_to_output = t [[checks]] name = "progress_has_screening_summary" -command = { command = "file-contains", file = "PROGRESS.md", contains = "Screening Summary" } +command = { command = "log-contains", pattern = "Screening Summary" } [[checks]] name = "progress_has_overview" -command = { command = "file-contains", file = "PROGRESS.md", contains = "Overview" } +command = { command = "log-contains", pattern = "Overview" } [[checks]] name = "legal_checking_loaded" diff --git a/tests/investigation-reporting/functional-specific-patent.toml b/tests/investigation-reporting/functional-specific-patent.toml index 73c0798..291c0dc 100644 --- a/tests/investigation-reporting/functional-specific-patent.toml +++ b/tests/investigation-reporting/functional-specific-patent.toml @@ -89,12 +89,12 @@ command = { command = "skill-loaded", skill = "legal-checking" } [[checks]] name = "report_contains_patent_id" -command = { command = "message-contains", contains = "US12231380B1" } +command = { command = "log-contains", pattern = "US12231380B1" } [[checks]] name = "report_contains_similarity" -command = { command = "message-contains", contains = "Moderate" } +command = { command = "log-contains", pattern = "Moderate" } [[checks]] name = "report_contains_element_analysis" -command = { command = "message-contains", contains = "Element" } +command = { command = "log-contains", pattern = "Element" } From 24b24c86e51ea66b2fc5213b7a1267207c894c69 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:46:22 +0000 Subject: [PATCH 11/19] refactor: output specific patent report to file with legal check - Write specific patent report to .md instead of text output - Verify legal-checking skill is invoked after report generation - Add copy_to_output for generated report file in test Co-Authored-By: Claude Opus 4.6 --- plugin/skills/investigation-reporting/SKILL.md | 6 +++--- .../references/instructions/specific-patent-report.md | 6 +++--- .../functional-specific-patent.toml | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/plugin/skills/investigation-reporting/SKILL.md b/plugin/skills/investigation-reporting/SKILL.md index 53a7068..901106c 100644 --- a/plugin/skills/investigation-reporting/SKILL.md +++ b/plugin/skills/investigation-reporting/SKILL.md @@ -72,9 +72,9 @@ Based on the user's request, determine which mode to use: **CRITICAL: Use the Write tool to create the report file.** - For overall progress: Create `PROGRESS.md` in the project root directory. -- For specific patent: Output directly as text (no file creation). +- For specific patent: Create `.md` in the project root directory. -**DO NOT just output the report as text** - you MUST use the Write tool to save it for overall progress reports. +**DO NOT just output the report as text** - you MUST use the Write tool to save it. ### Quality Gates @@ -106,7 +106,7 @@ Based on the user's request, determine which mode to use: ### Final State - `PROGRESS.md` created in project root with current investigation status (for overall progress) -- Or formatted patent report displayed to user (for specific patent) +- `.md` created in project root with patent report (for specific patent) ## Internal References (For This Skill Only) diff --git a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md index 7e4c524..22c229c 100644 --- a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md @@ -43,13 +43,13 @@ Read and parse: ### Step 5: Output Report -**For specific patent reports, output directly as text. DO NOT create a file.** +**CRITICAL: Use the Write tool to create the report file.** Use the template from `assets/specific-patent-report-template.md`: 1. Read template 2. Fill in patent-specific information -3. Output as formatted text (no file creation) +3. Write to `.md` using Write tool Template includes: @@ -65,4 +65,4 @@ Template includes: - [ ] Investigation files parsed successfully - [ ] Element table includes all elements from claim-analysis.md - [ ] NO legal assertions (infringement, validity conclusions) -- [ ] Output as text (no file creation for specific patents) +- [ ] Write tool used to create `.md` diff --git a/tests/investigation-reporting/functional-specific-patent.toml b/tests/investigation-reporting/functional-specific-patent.toml index 291c0dc..56b756f 100644 --- a/tests/investigation-reporting/functional-specific-patent.toml +++ b/tests/investigation-reporting/functional-specific-patent.toml @@ -87,6 +87,14 @@ command = { command = "skill-invoked", skill = "investigation-reporting" } name = "legal_checking_loaded" command = { command = "skill-loaded", skill = "legal-checking" } +[[checks]] +name = "legal_checking_invoked" +command = { command = "skill-invoked", skill = "legal-checking" } + +[[checks]] +name = "report_file_created" +command = { command = "workspace-file", path = "US12231380B1.md", copy_to_output = true } + [[checks]] name = "report_contains_patent_id" command = { command = "log-contains", pattern = "US12231380B1" } From 40f24d6c9be729c5e206b5bcd34ee0b312a6d9dc Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:46:46 +0000 Subject: [PATCH 12/19] test: verify legal-checking is invoked in overall progress test Co-Authored-By: Claude Opus 4.6 --- .../investigation-reporting/functional-overall-progress.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index d11e1b8..5b7f780 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -68,3 +68,7 @@ command = { command = "log-contains", pattern = "Overview" } [[checks]] name = "legal_checking_loaded" command = { command = "skill-loaded", skill = "legal-checking" } + +[[checks]] +name = "legal_checking_invoked" +command = { command = "skill-invoked", skill = "legal-checking" } From c48c0c778ace5394d0f3e84cac6b7542ad51d5dd Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 08:48:14 +0000 Subject: [PATCH 13/19] refactor: use SQL-based data retrieval for investigation reporting Replace file parsing with database queries via investigation-fetching skill for both overall-progress and specific-patent report modes. Add legal-checking invocation step after report generation. Co-Authored-By: Claude Opus 4.6 --- .../skills/investigation-reporting/SKILL.md | 4 +- .../instructions/overall-progress-report.md | 95 ++++++++++++------- .../instructions/specific-patent-report.md | 79 ++++++++------- 3 files changed, 111 insertions(+), 67 deletions(-) diff --git a/plugin/skills/investigation-reporting/SKILL.md b/plugin/skills/investigation-reporting/SKILL.md index 901106c..dccf3d1 100644 --- a/plugin/skills/investigation-reporting/SKILL.md +++ b/plugin/skills/investigation-reporting/SKILL.md @@ -90,12 +90,12 @@ Based on the user's request, determine which mode to use: ### Workflow 1: Overall Progress Report 1. External: "What is the current progress?" -2. Internal: Get database statistics → Analyze investigation directories → Generate report using template → Write to PROGRESS.md +2. Internal: Get screening statistics from DB → Query evaluation/claim/prior-art progress from DB → Generate report using template → Write to PROGRESS.md → Run legal-checking ### Workflow 2: Specific Patent Report 1. External: "Tell me about US20240292070A1" -2. Internal: Extract patent ID from request → Parse investigation directory → Format element-by-element table → Output as text +2. Internal: Extract patent ID → Query all data from DB via investigation-fetching → Format report using template → Write to `.md` → Run legal-checking ## State Management diff --git a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md index 8855d93..0c4af17 100644 --- a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md @@ -2,7 +2,8 @@ ## Purpose -Generate a comprehensive progress report for the entire patent investigation workflow. +Generate a comprehensive progress report for the entire patent investigation +workflow. ## Process @@ -23,45 +24,80 @@ Expected JSON output: - `irrelevant`: Irrelevant patent count - `expired`: Expired patent count -### Step 2: Analyze Workflow Phases +### Step 2: Get Investigation Progress from Database -Check each phase status: +**CRITICAL: Use `investigation-fetching` skill for all data retrieval.** +Do NOT parse files from investigation directories. -1. **Concept Interviewing**: Verify `specification.md` exists. -2. **Targeting**: Verify `targeting.md` and `keywords.md` exist and database has patents. -3. **Screening**: Use database statistics (total_screened vs total_targets). -4. **Evaluation**: Parse investigation directories for evaluation.md files. -5. **Claim Analysis**: Parse claim-analysis.md files and calculate progress. -6. **Prior Art**: Parse prior-art.md files and calculate progress. +#### 2a. Evaluation Progress -### Step 3: Filter Patents for Report +``` +Skill: investigation-fetching +Request: "Get list of relevant patents without evaluation" +``` -**CRITICAL: Filter based on claim-analysis.md element similarity levels.** +Returns patents that have been screened as relevant but have no claims +recorded yet. -- **Include** patents in report where: - - Claim Analysis shows: `Significant`, `Moderate`, or `Pending` - - At least ONE element is NOT `Limited` +#### 2b. Claim Analysis Progress + +``` +Skill: investigation-fetching +Request: "Get list of patents with elements but no similarities" +``` + +Returns patents that have elements decomposed but no similarity analysis +completed. + +#### 2c. Prior Art Progress + +``` +Skill: investigation-fetching +Request: "Get list of patents without prior arts" +``` + +Returns patents with Moderate/Significant similarities that have no prior art +research yet. + +### Step 3: Build Patent Summary Table + +For each relevant patent, determine its investigation status by querying the +database: + +| Patent ID | Evaluation | Similarity (Inv.) | Prior Art | Verdict | +|-----------|-----------|-------------------|-----------|---------| -- **Exclude** patents from report where: - - Claim Analysis shows: `Limited` (all elements are Limited) - - Safe/Low Risk patents should NOT appear in Investigation Progress table +- **Evaluation**: `Done` if claims exist in DB, `Pending` otherwise +- **Similarity**: Max similarity level from DB (`Significant` > `Moderate` > `Pending`) +- **Prior Art**: `Done` if prior_art_elements exist, `Pending` otherwise +- **Verdict**: Based on similarity and prior art results -**For each included patent**, format status as: +**CRITICAL: Filter based on claim-analysis similarity levels.** -- **Claim Analysis**: `Significant`, `Moderate`, or `Pending` -- **Prior Art**: - - If done: `Relevant`, `Alternative`, `Aligned`, or `Escalated` - - Otherwise: `Pending` +- **Include** patents where: + - Similarity shows: `Significant`, `Moderate`, or `Pending` + - At least ONE element is NOT `Limited` + +- **Exclude** patents where: + - All similarities are `Limited` + - Safe/Low Risk patents should NOT appear in the table ### Step 4: Generate Report -**CRITICAL: Use the Write tool to create `PROGRESS.md` in the project root directory.** +**CRITICAL: Use the Write tool to create `PROGRESS.md` in the project root +directory.** -DO NOT just output the report as text - you MUST use the Write tool to save it to `PROGRESS.md`. +DO NOT just output the report as text - you MUST use the Write tool to save it +to `PROGRESS.md`. 1. Read template from `assets/investigation-report-template.md` 2. Fill in statistics and patent table following the template structure 3. Write to `PROGRESS.md` using Write tool +4. Run legal-checking on the generated report: + ``` + Skill: legal-checking + Request: "" + ``` **Template sections**: @@ -70,21 +106,14 @@ DO NOT just output the report as text - you MUST use the Write tool to save it t - Investigation Progress: Filtered patent table (exclude Limited/low-risk) - Next Actions: Recommended next steps -## Template Sections - -Follow the template structure strictly: - -1. **Overview**: Quick summary of workflow status -2. **Screening Summary**: Database statistics table -3. **Investigation Progress**: Filtered patent table (exclude Limited/low-risk) -4. **Next Actions**: Recommended next steps - ## Quality Checks - [ ] Database statistics correctly retrieved +- [ ] Investigation progress derived from DB queries, not file parsing - [ ] Standard template sections used - [ ] NO extra sections (Top Patents, Current Status, Risk Summary, Recommendations) - [ ] NO duplicated information - [ ] NO legal assertions (Does not satisfy, Does not infringe, etc.) - [ ] Limited/low-risk patents EXCLUDED from Investigation Progress table - [ ] Write tool used to create PROGRESS.md +- [ ] Legal-checking skill invoked on the generated report diff --git a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md index 22c229c..2ab9eeb 100644 --- a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md @@ -13,56 +13,71 @@ Parse user request to extract patent ID: - "Tell me about US20240292070A1" → Extract: `US20240292070A1` - "Report on patent US9876543B2" → Extract: `US9876543B2` -### Step 2: Locate Investigation Directory +### Step 2: Get Patent Data from Database -Find investigation directory: `investigation/{patent_id}/` +**CRITICAL: Use `investigation-fetching` skill for all data retrieval.** +Do NOT parse files from investigation directories. -If not found, report: "No investigation found for {patent_id}" +1. **Patent basic info**: + ``` + Skill: investigation-fetching + Request: "Execute SQL: SELECT * FROM target_patents WHERE patent_id=''" + ``` + Also join with `screened_patents` for screening judgment and reason. -### Step 3: Parse Investigation Files +2. **Claims and elements**: + ``` + Skill: investigation-fetching + Request: "Get elements for patent " + ``` -Read and parse: +3. **Similarities**: + ``` + Skill: investigation-fetching + Request: "Execute SQL: SELECT * FROM similarities WHERE patent_id=''" + ``` -1. `evaluation.md`: Overall similarity assessment -2. `claim-analysis.md`: Detailed claim-by-claim analysis -3. `prior-art.md`: Prior art research results (if exists) +4. **Prior art** (if exists): + ``` + Skill: investigation-fetching + Request: "Execute SQL: SELECT * FROM prior_art_elements WHERE patent_id=''" + ``` -### Step 4: Format Element-by-Element Table +### Step 3: Format Report -**For claim-analysis.md**, create table: +Build the report using the template from +`assets/specific-patent-report-template.md`. -| Element | Target | Disclosure | Verdict | -| ----------------- | ------------- | ------------------- | ---------------------- | -| A. [element name] | [target spec] | [patent disclosure] | Present/Partial/Absent | -| B. [element name] | [target spec] | [patent disclosure] | Present/Partial/Absent | +**Element-by-Element Table** (from `similarities` query): -**For prior-art.md** (if exists): +| Element | Target Specification | Patent Disclosure | Similarity | +|---------|---------------------|-------------------|------------| +| A. [element name] | [target spec] | [patent disclosure] | [Similarity Level] | +| B. [element name] | [target spec] | [patent disclosure] | [Similarity Level] | -- List prior art patents found -- Summarize relevance level +**Prior Art Section** (from `prior_art_elements` query, if data exists): -### Step 5: Output Report +- List prior art references found +- Relevance level for each element -**CRITICAL: Use the Write tool to create the report file.** +### Step 4: Output Report -Use the template from `assets/specific-patent-report-template.md`: +**CRITICAL: Use the Write tool to create the report file.** -1. Read template -2. Fill in patent-specific information +1. Read template from `assets/specific-patent-report-template.md` +2. Fill in patent-specific information from database queries 3. Write to `.md` using Write tool - -Template includes: - -- Basic Information -- Similarity Assessment -- Element Analysis -- Claim Analysis -- Prior Art Research (with prior-art-researching template structure) +4. Run legal-checking on the generated report: + ``` + Skill: legal-checking + Request: ".md" + ``` ## Quality Checks - [ ] Patent ID correctly extracted -- [ ] Investigation files parsed successfully -- [ ] Element table includes all elements from claim-analysis.md +- [ ] All data retrieved from database via investigation-fetching skill +- [ ] Element table includes all elements from similarities query - [ ] NO legal assertions (infringement, validity conclusions) - [ ] Write tool used to create `.md` +- [ ] Legal-checking skill invoked on the generated report From 3308229d8b77da915f59f38f59fbc961227fd500 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 10:30:13 +0000 Subject: [PATCH 14/19] refactor: redesign specific-patent-report with phase-aware output Report now reflects investigation workflow progress. Only completed phases (screening, evaluation, claim analysis, prior art) show data; incomplete phases display "Pending" with remaining actions. Co-Authored-By: Claude Opus 4.6 --- .../instructions/overall-progress-report.md | 2 +- .../instructions/specific-patent-report.md | 57 +++++++++++++------ .../functional-overall-progress.toml | 12 ++-- 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md index 0c4af17..6d67d55 100644 --- a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md @@ -65,7 +65,7 @@ For each relevant patent, determine its investigation status by querying the database: | Patent ID | Evaluation | Similarity (Inv.) | Prior Art | Verdict | -|-----------|-----------|-------------------|-----------|---------| +| --------- | ---------- | ----------------- | --------- | ------- | - **Evaluation**: `Done` if claims exist in DB, `Pending` otherwise - **Similarity**: Max similarity level from DB (`Significant` > `Moderate` > `Pending`) diff --git a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md index 2ab9eeb..a1931dd 100644 --- a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md @@ -2,7 +2,9 @@ ## Purpose -Generate a detailed report for a single specified patent. +Generate a detailed report for a single specified patent, reflecting the +current investigation progress. Only completed phases are shown with data; +incomplete phases display "Pending". ## Process @@ -21,9 +23,8 @@ Do NOT parse files from investigation directories. 1. **Patent basic info**: ``` Skill: investigation-fetching - Request: "Execute SQL: SELECT * FROM target_patents WHERE patent_id=''" + Request: "Execute SQL: SELECT tp.*, sp.judgment, sp.reason FROM target_patents tp LEFT JOIN screened_patents sp ON tp.patent_id = sp.patent_id WHERE tp.patent_id=''" ``` - Also join with `screened_patents` for screening judgment and reason. 2. **Claims and elements**: ``` @@ -43,24 +44,47 @@ Do NOT parse files from investigation directories. Request: "Execute SQL: SELECT * FROM prior_art_elements WHERE patent_id=''" ``` -### Step 3: Format Report +### Step 3: Determine Phase Status -Build the report using the template from -`assets/specific-patent-report-template.md`. +Based on the database query results, determine which phases are complete: -**Element-by-Element Table** (from `similarities` query): +| Phase | Complete When | Status | +|-------|---------------|--------| +| Screening | `screened_patents` has entry | Done / Pending | +| Evaluation | `claims` and `elements` exist | Done / Pending | +| Claim Analysis | `similarities` exist | Done / Pending | +| Prior Art Research | `prior_art_elements` exist | Done / Pending | -| Element | Target Specification | Patent Disclosure | Similarity | -|---------|---------------------|-------------------|------------| -| A. [element name] | [target spec] | [patent disclosure] | [Similarity Level] | -| B. [element name] | [target spec] | [patent disclosure] | [Similarity Level] | +### Step 4: Generate Report -**Prior Art Section** (from `prior_art_elements` query, if data exists): +Use the template from `assets/specific-patent-report-template.md`. +Fill in sections based on phase status: -- List prior art references found -- Relevance level for each element +#### Sections to Always Include -### Step 4: Output Report +- **Basic Information**: Patent ID, title, assignee, dates, screening judgment + +#### Sections Based on Phase Status + +- **Similarity Assessment** (if claim analysis is done): + - Overall similarity from `similarities` (max of Significant > Moderate > Limited) + - Per-element similarity breakdown + +- **Element Analysis** (if claim analysis is done): + - Element-by-element table from `similarities` and `elements` + +- **Claim Analysis** (if evaluation is done): + - Claim text and decomposition from `claims` and `elements` + +- **Prior Art Research** (if prior art research is done): + - Prior art references from `prior_art_elements` + - Claim chart comparison + +- **Pending Sections**: + - Mark incomplete phases as "Pending" with brief description of what + remains to be done + +### Step 5: Output Report **CRITICAL: Use the Write tool to create the report file.** @@ -77,7 +101,8 @@ Build the report using the template from - [ ] Patent ID correctly extracted - [ ] All data retrieved from database via investigation-fetching skill -- [ ] Element table includes all elements from similarities query +- [ ] Phase status correctly determined from DB (not hardcoded) +- [ ] Only completed phases show data; incomplete phases show "Pending" - [ ] NO legal assertions (infringement, validity conclusions) - [ ] Write tool used to create `.md` - [ ] Legal-checking skill invoked on the generated report diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 5b7f780..07ea0ed 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -58,12 +58,16 @@ name = "progress_file_created" command = { command = "workspace-file", path = "PROGRESS.md", copy_to_output = true } [[checks]] -name = "progress_has_screening_summary" -command = { command = "log-contains", pattern = "Screening Summary" } +name = "progress_has_screening_data" +command = { command = "log-contains", pattern = "Screened patents" } [[checks]] -name = "progress_has_overview" -command = { command = "log-contains", pattern = "Overview" } +name = "progress_has_patent_data" +command = { command = "log-contains", pattern = "US12231380B1" } + +[[checks]] +name = "progress_has_next_actions" +command = { command = "log-contains", pattern = "Next Steps" } [[checks]] name = "legal_checking_loaded" From 49155d06e85a347aae10b816f946fa414f00cd5b Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 10:35:47 +0000 Subject: [PATCH 15/19] test: add pending-phases test for specific patent report Verify report shows Pending for incomplete phases (screening done, no evaluation/claim/prior-art) and includes relevant screening result. Co-Authored-By: Claude Opus 4.6 --- .../instructions/specific-patent-report.md | 15 ++-- .../functional-pending-phases.toml | 72 +++++++++++++++++++ 2 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 tests/investigation-reporting/functional-pending-phases.toml diff --git a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md index a1931dd..fc8ad66 100644 --- a/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/specific-patent-report.md @@ -21,18 +21,21 @@ Parse user request to extract patent ID: Do NOT parse files from investigation directories. 1. **Patent basic info**: + ``` Skill: investigation-fetching Request: "Execute SQL: SELECT tp.*, sp.judgment, sp.reason FROM target_patents tp LEFT JOIN screened_patents sp ON tp.patent_id = sp.patent_id WHERE tp.patent_id=''" ``` 2. **Claims and elements**: + ``` Skill: investigation-fetching Request: "Get elements for patent " ``` 3. **Similarities**: + ``` Skill: investigation-fetching Request: "Execute SQL: SELECT * FROM similarities WHERE patent_id=''" @@ -48,12 +51,12 @@ Do NOT parse files from investigation directories. Based on the database query results, determine which phases are complete: -| Phase | Complete When | Status | -|-------|---------------|--------| -| Screening | `screened_patents` has entry | Done / Pending | -| Evaluation | `claims` and `elements` exist | Done / Pending | -| Claim Analysis | `similarities` exist | Done / Pending | -| Prior Art Research | `prior_art_elements` exist | Done / Pending | +| Phase | Complete When | Status | +| ------------------ | ----------------------------- | -------------- | +| Screening | `screened_patents` has entry | Done / Pending | +| Evaluation | `claims` and `elements` exist | Done / Pending | +| Claim Analysis | `similarities` exist | Done / Pending | +| Prior Art Research | `prior_art_elements` exist | Done / Pending | ### Step 4: Generate Report diff --git a/tests/investigation-reporting/functional-pending-phases.toml b/tests/investigation-reporting/functional-pending-phases.toml new file mode 100644 index 0000000..4db327a --- /dev/null +++ b/tests/investigation-reporting/functional-pending-phases.toml @@ -0,0 +1,72 @@ +# Test Case: Investigation Reporting - Pending Phases + +name = "functional-pending-phases" +description = "Verify specific patent report shows Pending for incomplete phases (screening only, no evaluation/claim/prior-art)" +timeout = 300 + +test_prompt = """ +I have a patent database with screening results ready for patent US12231380B1, but no evaluation or claim analysis has been performed yet. Please generate a specific patent report for this patent. +""" + +[[setup]] +command = """ +sqlite3 patents.db < /workspaces/patent-kit/plugin/skills/investigation-preparing/references/sql/initialize-database.sql +sqlite3 patents.db "INSERT INTO target_patents (patent_id, title, country, publication_date) VALUES ('US12231380B1', 'Trigger-based transfer of conversations from a chatbot to a human agent', 'US', '2023-10-11');" +sqlite3 patents.db "INSERT INTO screened_patents (patent_id, judgment, reason, abstract_text) VALUES ('US12231380B1', 'relevant', 'Related to chatbot-to-human transfer mechanism', 'A system for triggering transfer of conversations from a chatbot to a human agent based on conversation context.');" +""" + +[[setup]] +path = "specification.md" +content = """ +# Product Specification + +## 1. Product Concept + +AI-powered customer support chatbot with real-time sentiment analysis. + +## 2. Target Market + +- **Country**: US +- **Release Date**: 2025-12-31 +- **Priority Date Cutoff**: 2005-12-31 + +## 3. Competitors + +| Canonical Name | Variations Found in DB | Verified? | Notes | +| -------------------- | -------------------------- | --------- | ------------- | +| Salesforce.Com, Inc. | salesforce.com, inc | Yes | Main assignee | + +## 4. Technical Elements (Constituent Features) + +- **LLM Dialogue Engine**: Multi-turn conversation management with context retention +- **Real-Time Sentiment Analysis**: Detects customer frustration and escalates to human agents +- **CRM Integration API**: Connects to Salesforce for ticket creation and customer history retrieval +""" + +[[checks]] +name = "skill_loaded" +command = { command = "skill-loaded", skill = "investigation-reporting" } + +[[checks]] +name = "investigation_reporting_invoked" +command = { command = "skill-invoked", skill = "investigation-reporting" } + +[[checks]] +name = "legal_checking_invoked" +command = { command = "skill-invoked", skill = "legal-checking" } + +[[checks]] +name = "report_file_created" +command = { command = "workspace-file", path = "US12231380B1.md", copy_to_output = true } + +[[checks]] +name = "report_has_patent_id" +command = { command = "log-contains", pattern = "US12231380B1" } + +[[checks]] +name = "report_has_pending_evaluation" +command = { command = "log-contains", pattern = "[Pp]ending" } + +[[checks]] +name = "report_has_screening_done" +command = { command = "log-contains", pattern = "[Rr]elevant" } From 5ad327322cad0d61f6b1eebfd34bebc901a01320 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 10:39:55 +0000 Subject: [PATCH 16/19] test: fix overall-progress checks to match actual output content Co-Authored-By: Claude Opus 4.6 --- .../functional-overall-progress.toml | 8 ++++---- .../functional-specific-patent.toml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 07ea0ed..14d7a18 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -59,15 +59,15 @@ command = { command = "workspace-file", path = "PROGRESS.md", copy_to_output = t [[checks]] name = "progress_has_screening_data" -command = { command = "log-contains", pattern = "Screened patents" } +command = { command = "file-contains", file = "PROGRESS.md", contains = "screened" } [[checks]] name = "progress_has_patent_data" -command = { command = "log-contains", pattern = "US12231380B1" } +command = { command = "file-contains", file = "PROGRESS.md", contains = "US12231380B1" } [[checks]] -name = "progress_has_next_actions" -command = { command = "log-contains", pattern = "Next Steps" } +name = "progress_has_relevant_count" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Relevant" } [[checks]] name = "legal_checking_loaded" diff --git a/tests/investigation-reporting/functional-specific-patent.toml b/tests/investigation-reporting/functional-specific-patent.toml index 56b756f..6b48bf3 100644 --- a/tests/investigation-reporting/functional-specific-patent.toml +++ b/tests/investigation-reporting/functional-specific-patent.toml @@ -97,12 +97,12 @@ command = { command = "workspace-file", path = "US12231380B1.md", copy_to_output [[checks]] name = "report_contains_patent_id" -command = { command = "log-contains", pattern = "US12231380B1" } +command = { command = "file-contains", file = "US12231380B1.md", contains = "US12231380B1" } [[checks]] name = "report_contains_similarity" -command = { command = "log-contains", pattern = "Moderate" } +command = { command = "file-contains", file = "US12231380B1.md", contains = "Moderate" } [[checks]] name = "report_contains_element_analysis" -command = { command = "log-contains", pattern = "Element" } +command = { command = "file-contains", file = "US12231380B1.md", contains = "Element" } From 76b380eb81d3bffad48f208c67b243873f10cf5e Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 11:31:46 +0000 Subject: [PATCH 17/19] refactor: move screening stats to fetching and redesign progress report template Move "Get screening progress statistics" from investigation-preparing to investigation-fetching where it belongs as a read operation. Add Count-type operations to investigation-fetching (screening, claim analysis, prior art). Redesign investigation-report-template.md: - Merge redundant Overview/Screening Summary into single Screening section - Replace Investigation Progress with Claim Analysis (All/Limited/Not Limited) - Add Prior Art section (All/Resolved/Open/Pending) - Remove Quality Gates from template (kept in instructions only) Update overall-progress-report.md to use investigation-fetching Count APIs instead of raw Execute SQL calls. Co-Authored-By: Claude Opus 4.6 --- plugin/skills/investigation-fetching/SKILL.md | 17 ++++ .../get-claim-analysis-statistics.md | 39 +++++++++ .../get-patents-without-prior-arts.md | 33 ++++++- .../get-patents-without-similarities.md | 25 +++++- .../instructions/get-prior-art-statistics.md | 82 ++++++++++++++++++ .../instructions/get-relevant-patents.md | 27 +++++- .../instructions/get-screening-statistics.md | 25 ++++++ .../skills/investigation-preparing/SKILL.md | 3 +- .../skills/investigation-reporting/SKILL.md | 8 +- .../assets/investigation-report-template.md | 56 +++++------- .../instructions/overall-progress-report.md | 85 ++++++------------- .../functional-overall-progress.toml | 4 +- 12 files changed, 297 insertions(+), 107 deletions(-) create mode 100644 plugin/skills/investigation-fetching/references/instructions/get-claim-analysis-statistics.md create mode 100644 plugin/skills/investigation-fetching/references/instructions/get-prior-art-statistics.md create mode 100644 plugin/skills/investigation-fetching/references/instructions/get-screening-statistics.md diff --git a/plugin/skills/investigation-fetching/SKILL.md b/plugin/skills/investigation-fetching/SKILL.md index ed77621..58698f8 100644 --- a/plugin/skills/investigation-fetching/SKILL.md +++ b/plugin/skills/investigation-fetching/SKILL.md @@ -37,10 +37,17 @@ internal reference files for this skill's internal use only. - "Get next relevant patent for evaluation" - "Get list of all relevant patents" - "Get list of relevant patents without evaluation" +- "Count relevant patents" +- "Count relevant patents without evaluation" - "Get list of unscreened patent IDs" - "Get next patent for claim analysis" - "Get elements for patent " - "Get list of patents with elements but no similarities" +- "Count patents without similarities" +- "Count screening progress" +- "Count claim analysis progress" +- "Count patents without prior arts" +- "Count prior art progress" - "Search features" - "Search feature: " - "Execute SQL: SELECT COUNT(\*) FROM screened_patents WHERE judgment = 'relevant'" @@ -69,10 +76,17 @@ When processing external requests, map them to internal instruction files: | "Get next relevant patent for evaluation" | references/instructions/get-next-patent.md | | "Get list of relevant patents without..." | references/instructions/get-relevant-patents.md | | "Get all relevant patents" | references/instructions/get-relevant-patents.md | +| "Count relevant patents" | references/instructions/get-relevant-patents.md | +| "Count relevant patents without..." | references/instructions/get-relevant-patents.md | | "Get list of unscreened patent IDs" | references/instructions/get-unscreened-patents.md | | "Get next patent for claim analysis" | references/instructions/get-next-claim-analysis-patent.md | | "Get elements for patent..." | references/instructions/get-elements.md | | "Get list of patents with elements but..." | references/instructions/get-patents-without-similarities.md | +| "Count patents without similarities" | references/instructions/get-patents-without-similarities.md | +| "Count screening progress" | references/instructions/get-screening-statistics.md | +| "Count claim analysis progress" | references/instructions/get-claim-analysis-statistics.md | +| "Count patents without prior arts" | references/instructions/get-patents-without-prior-arts.md | +| "Count prior art progress" | references/instructions/get-prior-art-statistics.md | | "Search features" | references/instructions/get-features.md | | "Search feature: " | references/instructions/search-feature.md | @@ -229,6 +243,9 @@ agents should NOT read these: - `get-elements.md`: Get elements for a specific patent - `get-patents-without-similarities.md`: Get list of patents with elements but no similarities - `get-features.md`: Get all product features + - `get-screening-statistics.md`: Get screening progress counts + - `get-claim-analysis-statistics.md`: Get claim analysis progress counts + - `get-prior-art-statistics.md`: Get prior art research progress counts - `search-feature.md`: Search for a specific feature by name - \*\*references/schema.md`: Database schema documentation diff --git a/plugin/skills/investigation-fetching/references/instructions/get-claim-analysis-statistics.md b/plugin/skills/investigation-fetching/references/instructions/get-claim-analysis-statistics.md new file mode 100644 index 0000000..ee59f71 --- /dev/null +++ b/plugin/skills/investigation-fetching/references/instructions/get-claim-analysis-statistics.md @@ -0,0 +1,39 @@ +# Get Claim Analysis Statistics + +## Purpose + +Retrieve aggregate claim analysis progress counts. + +## Request Pattern + +"Count claim analysis progress" + +## SQL Query + +```bash +sqlite3 -json patents.db " +SELECT + COUNT(DISTINCT patent_id) AS all_count, + SUM(CASE WHEN max_sim = 1 THEN 1 ELSE 0 END) AS limited_count, + SUM(CASE WHEN max_sim > 1 THEN 1 ELSE 0 END) AS not_limited_count +FROM ( + SELECT + patent_id, + MAX(CASE similarity_level + WHEN 'Significant' THEN 3 + WHEN 'Moderate' THEN 2 + WHEN 'Limited' THEN 1 + END) AS max_sim + FROM similarities + GROUP BY patent_id +); +" +``` + +## Expected Output + +JSON array with one row: + +- `all_count`: Total patents with similarity results +- `limited_count`: Patents where all similarities are Limited +- `not_limited_count`: Patents with at least one Significant or Moderate similarity diff --git a/plugin/skills/investigation-fetching/references/instructions/get-patents-without-prior-arts.md b/plugin/skills/investigation-fetching/references/instructions/get-patents-without-prior-arts.md index f981ace..9e57afa 100644 --- a/plugin/skills/investigation-fetching/references/instructions/get-patents-without-prior-arts.md +++ b/plugin/skills/investigation-fetching/references/instructions/get-patents-without-prior-arts.md @@ -1,8 +1,11 @@ # Get Patents Without Prior Arts -Retrieves list of patents with Moderate/Significant similarities but no prior art elements recorded yet. +Retrieves list of patents with Moderate/Significant similarities but no prior art +elements recorded yet. -## SQL Query +## Variations + +### List Patents Without Prior Arts ```bash sqlite3 -json patents.db " @@ -20,14 +23,38 @@ AND e.patent_id NOT IN ( " ``` +### Count Patents Without Prior Arts + +```bash +sqlite3 -json patents.db " +SELECT COUNT(DISTINCT e.patent_id) AS count +FROM elements e +WHERE e.patent_id IN ( + SELECT s.patent_id + FROM similarities s + GROUP BY s.patent_id + HAVING SUM(CASE WHEN s.similarity_level = 'Limited' THEN 1 ELSE 0 END) = 0 +) +AND e.patent_id NOT IN ( + SELECT patent_id FROM prior_art_elements +); +" +``` + ## Output Format -JSON array of patent_ids: +JSON array of patent_ids (for list queries): ```json [{ "patent_id": "US20240292070A1" }, { "patent_id": "US20240346271A1" }] ``` +JSON array with count (for count queries): + +```json +[{ "count": 2 }] +``` + Empty array if no patents pending: ```json diff --git a/plugin/skills/investigation-fetching/references/instructions/get-patents-without-similarities.md b/plugin/skills/investigation-fetching/references/instructions/get-patents-without-similarities.md index f8f321e..261ba50 100644 --- a/plugin/skills/investigation-fetching/references/instructions/get-patents-without-similarities.md +++ b/plugin/skills/investigation-fetching/references/instructions/get-patents-without-similarities.md @@ -2,7 +2,9 @@ Retrieves list of patents that have elements but no similarities recorded yet. -## SQL Query +## Variations + +### List Patents Without Similarities ```bash sqlite3 -json patents.db " @@ -15,14 +17,33 @@ WHERE s.patent_id IS NULL; " ``` +### Count Patents Without Similarities + +```bash +sqlite3 -json patents.db " +SELECT COUNT(DISTINCT e.patent_id) AS count +FROM elements e +LEFT JOIN similarities s ON e.patent_id = s.patent_id + AND e.claim_number = s.claim_number + AND e.element_label = s.element_label +WHERE s.patent_id IS NULL; +" +``` + ## Output Format -JSON array of patent_ids: +JSON array of patent_ids (for list queries): ```json [{ "patent_id": "US20240292070A1" }, { "patent_id": "US20240346271A1" }] ``` +JSON array with count (for count queries): + +```json +[{ "count": 3 }] +``` + Empty array if no patents pending: ```json diff --git a/plugin/skills/investigation-fetching/references/instructions/get-prior-art-statistics.md b/plugin/skills/investigation-fetching/references/instructions/get-prior-art-statistics.md new file mode 100644 index 0000000..c207678 --- /dev/null +++ b/plugin/skills/investigation-fetching/references/instructions/get-prior-art-statistics.md @@ -0,0 +1,82 @@ +# Get Prior Art Statistics + +## Purpose + +Retrieve aggregate prior art research progress counts, scoped to Not Limited +patents (Significant/Moderate similarity only). + +## Request Pattern + +"Count prior art progress" + +## SQL Query + +```bash +sqlite3 -json patents.db " +SELECT + not_limited.all_count, + COALESCE(resolved.resolved_count, 0) AS resolved_count, + COALESCE(open_pat.open_count, 0) AS open_count, + not_limited.all_count - COALESCE(resolved.resolved_count, 0) - COALESCE(open_pat.open_count, 0) AS pending_count +FROM ( + SELECT COUNT(*) AS all_count + FROM ( + SELECT patent_id + FROM similarities + GROUP BY patent_id + HAVING MAX(CASE similarity_level + WHEN 'Significant' THEN 3 + WHEN 'Moderate' THEN 2 + WHEN 'Limited' THEN 1 + END) > 1 + ) +) AS not_limited +LEFT JOIN ( + SELECT COUNT(DISTINCT patent_id) AS resolved_count + FROM prior_art_elements + WHERE relevance_level = 'Significant' + AND patent_id IN ( + SELECT patent_id + FROM similarities + GROUP BY patent_id + HAVING MAX(CASE similarity_level + WHEN 'Significant' THEN 3 + WHEN 'Moderate' THEN 2 + WHEN 'Limited' THEN 1 + END) > 1 + ) +) AS resolved ON 1 = 1 +LEFT JOIN ( + SELECT COUNT(DISTINCT patent_id) AS open_count + FROM prior_art_elements + WHERE patent_id IN ( + SELECT patent_id + FROM similarities + GROUP BY patent_id + HAVING MAX(CASE similarity_level + WHEN 'Significant' THEN 3 + WHEN 'Moderate' THEN 2 + WHEN 'Limited' THEN 1 + END) > 1 + ) + AND patent_id NOT IN ( + SELECT DISTINCT patent_id + FROM prior_art_elements + WHERE relevance_level = 'Significant' + ) +) AS open_pat ON 1 = 1; +" +``` + +## Expected Output + +JSON array with one row: + +- `all_count`: Total Not Limited patents (Significant/Moderate similarity) +- `resolved_count`: Patents with prior art elements having Significant relevance +- `open_count`: Patents with prior art elements but none with Significant relevance +- `pending_count`: Not Limited patents with no prior art elements at all + +## Verification + +`all_count` = `resolved_count` + `open_count` + `pending_count` diff --git a/plugin/skills/investigation-fetching/references/instructions/get-relevant-patents.md b/plugin/skills/investigation-fetching/references/instructions/get-relevant-patents.md index d843c9a..7ea37ad 100644 --- a/plugin/skills/investigation-fetching/references/instructions/get-relevant-patents.md +++ b/plugin/skills/investigation-fetching/references/instructions/get-relevant-patents.md @@ -23,10 +23,35 @@ WHERE judgment = 'relevant' " ``` +### Count Relevant Patents + +```bash +sqlite3 -json patents.db " +SELECT COUNT(*) AS count FROM screened_patents +WHERE judgment = 'relevant'; +" +``` + +### Count Relevant Patents Without Evaluation + +```bash +sqlite3 -json patents.db " +SELECT COUNT(*) AS count FROM screened_patents +WHERE judgment = 'relevant' + AND patent_id NOT IN (SELECT patent_id FROM claims); +" +``` + ## Output Format -JSON array of patent_ids: +JSON array of patent_ids (for list queries): ```json [{ "patent_id": "US20240292070A1" }, { "patent_id": "US20240346271A1" }] ``` + +JSON array with count (for count queries): + +```json +[{ "count": 5 }] +``` diff --git a/plugin/skills/investigation-fetching/references/instructions/get-screening-statistics.md b/plugin/skills/investigation-fetching/references/instructions/get-screening-statistics.md new file mode 100644 index 0000000..cc7e242 --- /dev/null +++ b/plugin/skills/investigation-fetching/references/instructions/get-screening-statistics.md @@ -0,0 +1,25 @@ +# Get Screening Statistics + +## Purpose + +Retrieve aggregate screening progress counts from the database. + +## Request Pattern + +"Count screening progress" + +## SQL Query + +```bash +sqlite3 -json patents.db "SELECT * FROM v_screening_progress" +``` + +## Expected Output + +JSON array with one row: + +- `total_targets`: Total patents in targeting +- `total_screened`: Total patents screened +- `relevant`: Relevant patent count +- `irrelevant`: Irrelevant patent count +- `expired`: Expired patent count diff --git a/plugin/skills/investigation-preparing/SKILL.md b/plugin/skills/investigation-preparing/SKILL.md index 10ad8db..9261d77 100644 --- a/plugin/skills/investigation-preparing/SKILL.md +++ b/plugin/skills/investigation-preparing/SKILL.md @@ -4,11 +4,10 @@ description: | Initializes the patent investigation database and imports CSV files. Use this skill to set up the SQLite database (patents.db) before running - screening. Supports database initialization, CSV import, and progress queries. + screening. Supports database initialization and CSV import. Example usage: - "Initialize the patent database and import CSV files from csv/" - - "Get screening progress statistics" context: fork --- diff --git a/plugin/skills/investigation-reporting/SKILL.md b/plugin/skills/investigation-reporting/SKILL.md index dccf3d1..cc154bd 100644 --- a/plugin/skills/investigation-reporting/SKILL.md +++ b/plugin/skills/investigation-reporting/SKILL.md @@ -38,12 +38,12 @@ requests from external agents. ### Process -#### Step 1: Get Database Statistics +#### Step 1: Get Screening Statistics -Use the investigation-preparing skill to get the current status: +Use the investigation-fetching skill to get the current status: -- Invoke via Skill tool: `Skill: investigation-preparing` -- Request: "Get screening progress statistics" +- Invoke via Skill tool: `Skill: investigation-fetching` +- Request: "Count screening progress" This returns JSON with: diff --git a/plugin/skills/investigation-reporting/assets/investigation-report-template.md b/plugin/skills/investigation-reporting/assets/investigation-report-template.md index 9ef0d96..46b73bc 100644 --- a/plugin/skills/investigation-reporting/assets/investigation-report-template.md +++ b/plugin/skills/investigation-reporting/assets/investigation-report-template.md @@ -1,44 +1,32 @@ -# Patent Analysis Progress Report +# Patent Investigation Progress -## Overview +## Screening -| Phase | Status | Details | -| --------------------------- | ------------------------ | ----------------- | -| Concept Interview | Done/Pending | specification.md | -| Targeting | Done/In Progress/Pending | X target patents | -| Screening | Done/In Progress/Pending | X/Y screened (Z%) | -| Evaluation & Investigations | In Progress | See below | +| Metric | Count | +| ---------- | ----- | +| Targets | X | +| Screened | Y | +| Relevant | A | +| Irrelevant | B | +| Expired | C | -## Screening Summary +## Claim Analysis -- **Total Targets**: X -- **Screened**: Y (Z%) -- **Relevant**: A -- **Irrelevant**: B -- **Expired**: C +| Metric | Count | +| ----------- | ----- | +| All | X | +| Limited | Y | +| Not Limited | Z | -## Investigation Progress +## Prior Art -- **Claim Analysis Progress**: I/R (Relevant Patents) -- **Prior Art Progress**: P/I (Claim Analysis Done) - -| Patent ID | Evaluation | Similarity (Inv.) | Verdict | -| ------------ | ---------- | ----------------- | -------- | -| US12345678 | Done | Significant | Relevant | -| JP2024001234 | Done | Pending | Pending | - -> **Note**: Similarity levels: Significant, Moderate, Limited. Verdict: Relevant, Alternative, Aligned, Escalated. -> **Note**: Cases with 'Limited' similarity (Low Risk) are excluded from this list. +| Metric | Count | +| -------- | ----- | +| All | X | +| Resolved | Y | +| Open | Z | +| Pending | W | ## Next Actions 1. (Suggested next action based on current progress) - ---- - -## Quality Gates - -- [ ] Used strictly standard sections (Overview, Screening Summary, Investigation Progress, Next Actions). -- [ ] No extra sections (e.g., "Top Patents", "Current Status") added. -- [ ] **NO Legal Assertions**: - - [ ] Avoid terms: "Does not satisfy", "Does not infringe", "Is a core technology" or cite court cases. diff --git a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md index 6d67d55..c86bfd0 100644 --- a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md @@ -7,13 +7,11 @@ workflow. ## Process -### Step 1: Get Database Statistics - -Use the investigation-preparing skill to get current screening statistics: +### Step 1: Get Screening Statistics ``` -Skill: investigation-preparing -Request: "Get screening progress statistics" +Skill: investigation-fetching +Request: "Count screening progress" ``` Expected JSON output: @@ -24,63 +22,32 @@ Expected JSON output: - `irrelevant`: Irrelevant patent count - `expired`: Expired patent count -### Step 2: Get Investigation Progress from Database - -**CRITICAL: Use `investigation-fetching` skill for all data retrieval.** -Do NOT parse files from investigation directories. - -#### 2a. Evaluation Progress +### Step 2: Get Claim Analysis Statistics ``` Skill: investigation-fetching -Request: "Get list of relevant patents without evaluation" +Request: "Count claim analysis progress" ``` -Returns patents that have been screened as relevant but have no claims -recorded yet. - -#### 2b. Claim Analysis Progress - -``` -Skill: investigation-fetching -Request: "Get list of patents with elements but no similarities" -``` +Expected JSON output: -Returns patents that have elements decomposed but no similarity analysis -completed. +- `all_count`: Total patents with similarity results +- `limited_count`: Patents where all similarities are Limited +- `not_limited_count`: Patents with at least one Significant or Moderate similarity -#### 2c. Prior Art Progress +### Step 3: Get Prior Art Statistics ``` Skill: investigation-fetching -Request: "Get list of patents without prior arts" +Request: "Count prior art progress" ``` -Returns patents with Moderate/Significant similarities that have no prior art -research yet. - -### Step 3: Build Patent Summary Table - -For each relevant patent, determine its investigation status by querying the -database: - -| Patent ID | Evaluation | Similarity (Inv.) | Prior Art | Verdict | -| --------- | ---------- | ----------------- | --------- | ------- | - -- **Evaluation**: `Done` if claims exist in DB, `Pending` otherwise -- **Similarity**: Max similarity level from DB (`Significant` > `Moderate` > `Pending`) -- **Prior Art**: `Done` if prior_art_elements exist, `Pending` otherwise -- **Verdict**: Based on similarity and prior art results - -**CRITICAL: Filter based on claim-analysis similarity levels.** - -- **Include** patents where: - - Similarity shows: `Significant`, `Moderate`, or `Pending` - - At least ONE element is NOT `Limited` +Expected JSON output (scoped to Not Limited patents only): -- **Exclude** patents where: - - All similarities are `Limited` - - Safe/Low Risk patents should NOT appear in the table +- `all_count`: Total Not Limited patents +- `resolved_count`: Patents with prior art elements having Significant relevance +- `open_count`: Patents with prior art elements but none with Significant relevance +- `pending_count`: Not Limited patents with no prior art elements at all ### Step 4: Generate Report @@ -91,7 +58,7 @@ DO NOT just output the report as text - you MUST use the Write tool to save it to `PROGRESS.md`. 1. Read template from `assets/investigation-report-template.md` -2. Fill in statistics and patent table following the template structure +2. Fill in counts following the template structure 3. Write to `PROGRESS.md` using Write tool 4. Run legal-checking on the generated report: ``` @@ -101,19 +68,19 @@ to `PROGRESS.md`. **Template sections**: -- Overview: Workflow phase status summary -- Screening Summary: Database statistics table -- Investigation Progress: Filtered patent table (exclude Limited/low-risk) +- Screening: Statistics table from `v_screening_progress` +- Claim Analysis: Count table (All / Limited / Not Limited) +- Prior Art: Count table (All / Resolved / Open / Pending) - Next Actions: Recommended next steps ## Quality Checks -- [ ] Database statistics correctly retrieved -- [ ] Investigation progress derived from DB queries, not file parsing -- [ ] Standard template sections used -- [ ] NO extra sections (Top Patents, Current Status, Risk Summary, Recommendations) -- [ ] NO duplicated information +- [ ] All data retrieved from investigation-fetching (no raw SQL, no file parsing) +- [ ] Claim Analysis counts: All = Limited + Not Limited +- [ ] Prior Art counts: All = Resolved + Open + Pending +- [ ] Standard template sections used (Screening, Claim Analysis, Prior Art, Next Actions) +- [ ] NO extra sections (Overview, Top Patents, Current Status, Risk Summary, etc.) +- [ ] NO duplicated information between sections - [ ] NO legal assertions (Does not satisfy, Does not infringe, etc.) -- [ ] Limited/low-risk patents EXCLUDED from Investigation Progress table - [ ] Write tool used to create PROGRESS.md - [ ] Legal-checking skill invoked on the generated report diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 14d7a18..8384caa 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -58,8 +58,8 @@ name = "progress_file_created" command = { command = "workspace-file", path = "PROGRESS.md", copy_to_output = true } [[checks]] -name = "progress_has_screening_data" -command = { command = "file-contains", file = "PROGRESS.md", contains = "screened" } +name = "progress_has_screening_section" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Screening" } [[checks]] name = "progress_has_patent_data" From de0c16aa75e507576233087b79df61b312dbdf49 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 11:39:20 +0000 Subject: [PATCH 18/19] fix: enforce template compliance in overall progress report Model was ignoring the template and generating its own structure with extra sections (Evaluation, Overview) and non-standard metric names. Root cause: "DO NOT read files from references/instructions/" warning was blocking the model from reading assets/ templates too. Changes: - Clarify that assets/ templates CAN be read (only references/instructions/ is restricted) - Add Step 0 (MANDATORY): read template before any other action - Add explicit metric name requirements (Targets, Screened, etc.) - Remove outdated Examples/Troubleshooting sections from SKILL.md - Update test checks to verify template section names Co-Authored-By: Claude Opus 4.6 --- .../skills/investigation-reporting/SKILL.md | 51 +++++------------ .../instructions/overall-progress-report.md | 55 ++++++++++++++----- .../functional-overall-progress.toml | 12 ++-- 3 files changed, 62 insertions(+), 56 deletions(-) diff --git a/plugin/skills/investigation-reporting/SKILL.md b/plugin/skills/investigation-reporting/SKILL.md index cc154bd..fc86615 100644 --- a/plugin/skills/investigation-reporting/SKILL.md +++ b/plugin/skills/investigation-reporting/SKILL.md @@ -16,7 +16,8 @@ Your task is to report the current status of the patent analysis workflow. ## For External Skills and Agents **WARNING**: DO NOT read files from `references/instructions/` directory. Those are -internal reference files for this skill's internal use only. +internal reference files for this skill's internal use only. You MAY read files +from `assets/` directory — those are templates you must follow. **To use this skill**: @@ -38,22 +39,17 @@ requests from external agents. ### Process -#### Step 1: Get Screening Statistics +#### Step 0: Read Template (MANDATORY) -Use the investigation-fetching skill to get the current status: +**Before doing anything else, read the template file.** -- Invoke via Skill tool: `Skill: investigation-fetching` -- Request: "Count screening progress" +- For overall progress: Read `assets/investigation-report-template.md` +- For specific patent: Read `assets/specific-patent-report-template.md` -This returns JSON with: +You MUST use the exact section names and metric names from the template. Do NOT +invent your own structure. -- `total_targets`: Total patents in targeting -- `total_screened`: Total patents screened -- `relevant`: Relevant patent count -- `irrelevant`: Irrelevant patent count -- `expired`: Expired patent count - -#### Step 2: Determine Report Mode +#### Step 1: Determine Report Mode Based on the user's request, determine which mode to use: @@ -76,21 +72,16 @@ Based on the user's request, determine which mode to use: **DO NOT just output the report as text** - you MUST use the Write tool to save it. -### Quality Gates - -- [ ] Database statistics are correctly retrieved and mapped. -- [ ] Used strictly standard sections from template. -- [ ] No extra sections added (e.g., "Top Patents", "Current Status"). -- [ ] No duplicated information. -- [ ] **NO Legal Assertions**: Ensure summary does not use terms like "Does not satisfy", "Does not infringe", "Is a core technology" or cite court cases. -- [ ] **Write tool used** for overall progress reports (not just text output). +**CRITICAL: Read and follow the template from `assets/investigation-report-template.md` +or `assets/specific-patent-report-template.md` exactly. Use the exact section +names and metric names. Do NOT invent your own section names or metric names.** ## Internal Workflows (For This Skill Only) ### Workflow 1: Overall Progress Report 1. External: "What is the current progress?" -2. Internal: Get screening statistics from DB → Query evaluation/claim/prior-art progress from DB → Generate report using template → Write to PROGRESS.md → Run legal-checking +2. Internal: Read `references/instructions/overall-progress-report.md` → Follow the process steps → Read template from `assets/investigation-report-template.md` → Generate report using EXACT section/metric names from template → Write to PROGRESS.md → Run legal-checking ### Workflow 2: Specific Patent Report @@ -121,19 +112,3 @@ agents should NOT read these: **IMPORTANT**: External agents should invoke this skill via the Skill tool, not access these internal files directly. - -# Examples - -Example 1: Checking Progress -User says: "Tell me the progress of the current project" -Actions: - -1. Parse the directories for statuses -2. Tally the completed items in each phase and patents pending evaluation - Result: PROGRESS.md is generated in the project root. - -# Troubleshooting - -Error: "Failed to read directories" -Cause: The directory structure is broken or missing. -Solution: Ensure you are running within the initialized project root. diff --git a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md index c86bfd0..d10904f 100644 --- a/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md +++ b/plugin/skills/investigation-reporting/references/instructions/overall-progress-report.md @@ -2,8 +2,7 @@ ## Purpose -Generate a comprehensive progress report for the entire patent investigation -workflow. +Generate a progress report for the entire patent investigation workflow. ## Process @@ -58,29 +57,57 @@ DO NOT just output the report as text - you MUST use the Write tool to save it to `PROGRESS.md`. 1. Read template from `assets/investigation-report-template.md` -2. Fill in counts following the template structure -3. Write to `PROGRESS.md` using Write tool -4. Run legal-checking on the generated report: +2. **EXACTLY follow the template structure** — use the exact section names and + metric names from the template +3. Replace placeholder values (X, Y, Z, A, B, C, W) with actual counts +4. Write to `PROGRESS.md` using Write tool +5. Run legal-checking on the generated report: ``` Skill: legal-checking Request: "" ``` -**Template sections**: - -- Screening: Statistics table from `v_screening_progress` -- Claim Analysis: Count table (All / Limited / Not Limited) -- Prior Art: Count table (All / Resolved / Open / Pending) -- Next Actions: Recommended next steps +**CRITICAL RULES**: + +1. **Use EXACTLY these section names** (no other sections allowed): + - `## Screening` + - `## Claim Analysis` + - `## Prior Art` + - `## Next Actions` + +2. **Use EXACTLY these metric names** in the Screening table: + - `Targets` (not "Total Target Patents") + - `Screened` (not "Patents Screened") + - `Relevant` + - `Irrelevant` + - `Expired` + +3. **Use EXACTLY these metric names** in the Claim Analysis table: + - `All` + - `Limited` + - `Not Limited` + +4. **Use EXACTLY these metric names** in the Prior Art table: + - `All` + - `Resolved` + - `Open` + - `Pending` + +5. **DO NOT** add any prose text, explanations, or summaries between or after + tables. Only tables and section headers. +6. **DO NOT** create an "Evaluation" section — Evaluation is part of the + Screening phase. +7. **DO NOT** create an "Overview" section. ## Quality Checks - [ ] All data retrieved from investigation-fetching (no raw SQL, no file parsing) - [ ] Claim Analysis counts: All = Limited + Not Limited - [ ] Prior Art counts: All = Resolved + Open + Pending -- [ ] Standard template sections used (Screening, Claim Analysis, Prior Art, Next Actions) -- [ ] NO extra sections (Overview, Top Patents, Current Status, Risk Summary, etc.) -- [ ] NO duplicated information between sections +- [ ] Exactly 4 sections: Screening, Claim Analysis, Prior Art, Next Actions +- [ ] Metric names match template exactly +- [ ] NO extra sections (Evaluation, Overview, Top Patents, Current Status, etc.) +- [ ] NO prose text between or after tables - [ ] NO legal assertions (Does not satisfy, Does not infringe, etc.) - [ ] Write tool used to create PROGRESS.md - [ ] Legal-checking skill invoked on the generated report diff --git a/tests/investigation-reporting/functional-overall-progress.toml b/tests/investigation-reporting/functional-overall-progress.toml index 8384caa..29ba241 100644 --- a/tests/investigation-reporting/functional-overall-progress.toml +++ b/tests/investigation-reporting/functional-overall-progress.toml @@ -62,12 +62,16 @@ name = "progress_has_screening_section" command = { command = "file-contains", file = "PROGRESS.md", contains = "Screening" } [[checks]] -name = "progress_has_patent_data" -command = { command = "file-contains", file = "PROGRESS.md", contains = "US12231380B1" } +name = "progress_has_claim_analysis_section" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Claim Analysis" } [[checks]] -name = "progress_has_relevant_count" -command = { command = "file-contains", file = "PROGRESS.md", contains = "Relevant" } +name = "progress_has_prior_art_section" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Prior Art" } + +[[checks]] +name = "progress_has_next_actions" +command = { command = "file-contains", file = "PROGRESS.md", contains = "Next Actions" } [[checks]] name = "legal_checking_loaded" From 4db33a4b201a81fa3dcecac10aa999252759df78 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 4 Apr 2026 11:49:02 +0000 Subject: [PATCH 19/19] refactor: remove Verdict term from template and add prior art test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace "Verdict" with neutral terms in specific-patent-report-template.md: - Element Analysis table: Verdict → Similarity - Claim Analysis summary: Verdict → Summary - Prior Art conclusion: Verdict → Result Add functional-specific-patent-with-prior-art test that seeds complete investigation data including prior_arts and prior_art_elements. Co-Authored-By: Claude Opus 4.6 --- .../assets/specific-patent-report-template.md | 6 +- ...tional-specific-patent-with-prior-art.toml | 122 ++++++++++++++++++ 2 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 tests/investigation-reporting/functional-specific-patent-with-prior-art.toml diff --git a/plugin/skills/investigation-reporting/assets/specific-patent-report-template.md b/plugin/skills/investigation-reporting/assets/specific-patent-report-template.md index 59e1ab5..32c10fc 100644 --- a/plugin/skills/investigation-reporting/assets/specific-patent-report-template.md +++ b/plugin/skills/investigation-reporting/assets/specific-patent-report-template.md @@ -16,7 +16,7 @@ ## Element Analysis -| Element | Target Specification | Patent Disclosure | Verdict | +| Element | Target Specification | Patent Disclosure | Similarity | | ----------------- | -------------------- | ------------------- | ---------------------- | | A. {element_name} | {target_spec} | {patent_disclosure} | Present/Partial/Absent | | B. {element_name} | {target_spec} | {patent_disclosure} | Present/Partial/Absent | @@ -38,7 +38,7 @@ - Element 2: {Present/Partial/Absent} - {analysis_notes} - Element 3: {Present/Partial/Absent} - {analysis_notes} -**Verdict**: {Overall assessment} +**Summary**: {Overall assessment} ## Prior Art Research @@ -96,7 +96,7 @@ Compare the Spec (Elements) with the Primary Reference (D1). ### 5. Conclusion -- **Verdict**: [Relevant prior art identified / Alternative implementation selected / Aligned with existing techniques / Escalated for legal review] +- **Result**: [Relevant prior art identified / Alternative implementation selected / Aligned with existing techniques / Escalated for legal review] - **Reasoning**: {summary_of_findings} --- diff --git a/tests/investigation-reporting/functional-specific-patent-with-prior-art.toml b/tests/investigation-reporting/functional-specific-patent-with-prior-art.toml new file mode 100644 index 0000000..626878f --- /dev/null +++ b/tests/investigation-reporting/functional-specific-patent-with-prior-art.toml @@ -0,0 +1,122 @@ +# Test Case: Investigation Reporting - Specific Patent Report with Prior Art + +name = "functional-specific-patent-with-prior-art" +description = "Verify investigation-reporting generates a specific patent report with prior art data" +timeout = 300 + +test_prompt = """ +I have investigation data for patent US12231380B1 including prior art research. Please generate a specific patent report for this patent. +""" + +[[setup]] +command = """ +sqlite3 patents.db < /workspaces/patent-kit/plugin/skills/investigation-preparing/references/sql/initialize-database.sql +sqlite3 patents.db "INSERT INTO target_patents (patent_id, title, country, publication_date) VALUES ('US12231380B1', 'Trigger-based transfer of conversations from a chatbot to a human agent', 'US', '2023-10-11');" +sqlite3 patents.db "INSERT INTO screened_patents (patent_id, judgment, reason, abstract_text) VALUES ('US12231380B1', 'relevant', 'Related to chatbot-to-human transfer mechanism', 'A system for triggering transfer of conversations from a chatbot to a human agent based on conversation context.');" +sqlite3 patents.db "INSERT INTO claims (patent_id, claim_number, claim_type, claim_text) VALUES ('US12231380B1', 1, 'independent', '1. A computer-implemented method for managing conversations in a chatbot system, comprising: detecting a trigger condition in a conversation context; and transferring the conversation from the chatbot to a human agent based on the trigger condition.');" +sqlite3 patents.db "INSERT INTO elements (patent_id, claim_number, element_label, element_description) VALUES ('US12231380B1', 1, 'A', 'Detecting a trigger condition in a conversation context');" +sqlite3 patents.db "INSERT INTO elements (patent_id, claim_number, element_label, element_description) VALUES ('US12231380B1', 1, 'B', 'Transferring the conversation from the chatbot to a human agent based on the trigger condition');" +sqlite3 patents.db "INSERT INTO similarities (patent_id, claim_number, element_label, similarity_level, analysis_notes) VALUES ('US12231380B1', 1, 'A', 'Moderate', 'Partial overlap in trigger detection approach');" +sqlite3 patents.db "INSERT INTO similarities (patent_id, claim_number, element_label, similarity_level, analysis_notes) VALUES ('US12231380B1', 1, 'B', 'Significant', 'Core feature matches transfer mechanism');" +sqlite3 patents.db "INSERT INTO prior_arts (reference_id, reference_type, title, publication_date) VALUES ('US10915824B2', 'patent', 'System for managing communication sessions between automated and human agents', '2021-02-23');" +sqlite3 patents.db "INSERT INTO prior_art_elements (patent_id, claim_number, element_label, reference_id, relevance_level, analysis_notes, claim_chart) VALUES ('US12231380B1', 1, 'B', 'US10915824B2', 'Significant', 'D1 discloses transferring conversations based on sentiment triggers', 'D1 discloses detecting customer sentiment and routing to human agents via element B transfer mechanism');" +mkdir -p investigation/US12231380B1 +""" + +[[setup]] +path = "investigation/US12231380B1/evaluation.md" +content = """ +# Patent Evaluation: US12231380B1 + +## Overall Similarity: Moderate + +## Reasoning +The patent shares significant overlap in the conversation transfer mechanism but uses a different trigger detection approach compared to our product specification. +""" + +[[setup]] +path = "investigation/US12231380B1/claim-analysis.md" +content = """ +# Claim Analysis: US12231380B1 + +## Claim 1 (Independent) + +### Element Analysis + +| Element | Target Specification | Patent Disclosure | Verdict | +| -------- | -------------------- | ----------------- | ------- | +| A | Real-time sentiment monitoring as trigger | Detecting a trigger condition in conversation context | Partial | +| B | Transfer to human agent on frustration | Transferring conversation based on trigger condition | Present | +""" + +[[setup]] +path = "specification.md" +content = """ +# Product Specification + +## 1. Product Concept + +AI-powered customer support chatbot with real-time sentiment analysis. + +## 2. Target Market + +- **Country**: US +- **Release Date**: 2025-12-31 +- **Priority Date Cutoff**: 2005-12-31 + +## 3. Competitors + +| Canonical Name | Variations Found in DB | Verified? | Notes | +| -------------------- | -------------------------- | --------- | ------------- | +| Salesforce.Com, Inc. | salesforce.com, inc | Yes | Main assignee | + +## 4. Technical Elements (Constituent Features) + +- **LLM Dialogue Engine**: Multi-turn conversation management with context retention +- **Real-Time Sentiment Analysis**: Detects customer frustration and escalates to human agents +- **CRM Integration API**: Connects to Salesforce for ticket creation and customer history retrieval +""" + +[[checks]] +name = "skill_loaded" +command = { command = "skill-loaded", skill = "investigation-reporting" } + +[[checks]] +name = "investigation_reporting_invoked" +command = { command = "skill-invoked", skill = "investigation-reporting" } + +[[checks]] +name = "legal_checking_loaded" +command = { command = "skill-loaded", skill = "legal-checking" } + +[[checks]] +name = "legal_checking_invoked" +command = { command = "skill-invoked", skill = "legal-checking" } + +[[checks]] +name = "report_file_created" +command = { command = "workspace-file", path = "US12231380B1.md", copy_to_output = true } + +[[checks]] +name = "report_contains_patent_id" +command = { command = "file-contains", file = "US12231380B1.md", contains = "US12231380B1" } + +[[checks]] +name = "report_contains_similarity" +command = { command = "file-contains", file = "US12231380B1.md", contains = "Similarity" } + +[[checks]] +name = "report_contains_element_analysis" +command = { command = "file-contains", file = "US12231380B1.md", contains = "Element" } + +[[checks]] +name = "report_contains_prior_art" +command = { command = "file-contains", file = "US12231380B1.md", contains = "Prior Art" } + +[[checks]] +name = "report_contains_prior_art_reference" +command = { command = "file-contains", file = "US12231380B1.md", contains = "US10915824B2" } + +[[checks]] +name = "report_contains_claim_chart" +command = { command = "file-contains", file = "US12231380B1.md", contains = "Claim" }