# Claim Tree Structure in application_plan.schema.yaml: A Complete Technical Guide

> Uncover the claim tree structure in application_plan.schema.yaml. This guide details independent and dependent claims, layer types, and how they extend parent claims in patent disclosures.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: technical-guide
- Published: 2026-09-08

---

**The `claim_tree` field defines a hierarchical patent claim structure with `independent` top-level claims and `dependent` sub-claims, using specific layer types like `preferred_param` and `embodiment` to categorize how dependent claims extend their parent claims.**

The **handsomestWei/patent-disclosure-skill** repository automates patent documentation generation through structured YAML configuration. Understanding the **claim tree structure in application_plan.schema.yaml** enables precise control over how independent claims and their dependent counterparts are generated and visualized in the final patent application.

## Architecture of the Claim Tree Schema

Located at [`skills/patent-application/references/schemas/application_plan.schema.yaml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-application/references/schemas/application_plan.schema.yaml), the claim tree definition spans lines 17–28 and establishes a bipartite hierarchy for patent claim generation.

### Independent Claims Section

The `independent` array contains top-level claims that define the core invention. Each independent claim requires three specific fields:

- **`id`** – A numeric identifier (e.g., `1`)
- **`kind`** – The claim category, restricted to `method`, `system`, or `product`
- **`essential`** – An array of short phrases capturing the core technical features that must appear in the claim text

These fields determine the root nodes of the generated claim tree JSON, establishing the foundation upon which dependent claims build.

### Dependent Claims Configuration

The `dependents` array defines sub-claims that reference back to independent claims and specify how they extend or qualify the parent claim. Each entry contains:

- **`id`** – Numeric identifier (e.g., `2`)
- **`refers`** – Array of parent claim IDs (e.g., `[1]`)
- **`layer`** – Classification of how the dependent claim is formed
- **`aligns_embodiment`** – Optional embodiment label (e.g., `第一种`)
- **`point`** – Free-form text for the dependent claim content

This structure enables the generation of complex claim dependencies while maintaining clear parent-child relationships.

### Layer Types and Semantic Meanings

The schema defines four distinct `layer` values documented in the comment block beginning at lines 31–38. These values determine what information is written into each dependent claim:

- **`preferred_param`** – Preferred parameters, thresholds, or windows already present in the disclosure (e.g., "第一种实施例的数值例")
- **`branch`** – Branches, loops, or exceptions present in the disclosure flow (e.g., "第二种或分支走查")
- **`system_map`** – System or module mapping relationships following the independent claim (e.g., "结合图 1")
- **`embodiment`** – Pure embodiment details that do not affect the independent claim scope (e.g., "对应「第一种/第二种」")

The optional `named_figures` field provides a list of figure paths explicitly referenced in the disclosure output.

## Working with Claim Trees in Python

The repository provides specific utilities for processing claim tree structures defined in the YAML schema.

### Loading and Accessing the Schema

To extract the claim tree definition from the schema file:

```python
import yaml
import json
from pathlib import Path

plan_path = Path("skills/patent-application/references/schemas/application_plan.schema.yaml")
plan = yaml.safe_load(plan_path.read_text(encoding="utf-8"))

claim_tree = plan["claim_tree"]
print(json.dumps(claim_tree, ensure_ascii=False, indent=2))

```

### Normalizing Claim Tree Structures

The `normalize_claim_tree` function in [`skills/patent-reader/tools/shared/common.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/shared/common.py) standardizes raw claim tree data by adding missing fields and building proper node relationships:

```python
from skills.patent_reader.shared.common import normalize_claim_tree

raw_tree = {
    "independent": [{"id": 1, "kind": "method", "essential": ["step A"]}],
    "dependents": [{
        "id": 2,
        "refers": [1],
        "layer": "preferred_param",
        "aligns_embodiment": "第一种",
        "point": ""
    }]
}
norm_tree = normalize_claim_tree(raw_tree)
print(json.dumps(norm_tree, ensure_ascii=False, indent=2))

```

### Visualizing as Mermaid Diagrams

Convert normalized claim trees to Mermaid syntax using the `claim_tree_to_mermaid` function from [`skills/patent-reader/tools/vault/obsidian.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/vault/obsidian.py):

```python
from skills.patent_reader.tools.vault.obsidian import claim_tree_to_mermaid

mermaid = claim_tree_to_mermaid(norm_tree, pub="CN1234567")
print(mermaid)  # Output suitable for .mmd files

```

## Key Implementation Files

The following files constitute the core claim tree processing pipeline in the **handsomestWei/patent-disclosure-skill** repository:

- **[`skills/patent-application/references/schemas/application_plan.schema.yaml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-application/references/schemas/application_plan.schema.yaml)** – Defines the YAML schema structure including the `claim_tree` field specifications at lines 17–28
- **[`skills/patent-reader/tools/shared/common.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/shared/common.py)** – Implements `normalize_claim_tree` and validation utilities
- **[`skills/patent-reader/tools/vault/obsidian.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/vault/obsidian.py)** – Contains `claim_tree_to_mermaid` for generating visual representations
- **[`skills/patent-reader/tools/analyze/validate_claim_tree.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/analyze/validate_claim_tree.py)** – Provides CLI validation for [`claim_tree.json`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/claim_tree.json) files
- **[`skills/patent-reader/tools/extract/extract_patent_text.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/extract/extract_patent_text.py)** – Handles construction of claim trees from extracted patent data

## Summary

- The **claim tree structure** in [`application_plan.schema.yaml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/application_plan.schema.yaml) bifurcates into `independent` and `dependents` sections to represent patent claim hierarchies
- **Independent claims** require `id`, `kind`, and `essential` fields to define core technical features
- **Dependent claims** use the `refers` array for parent relationships and the `layer` field to categorize extension types
- Four layer types exist: `preferred_param`, `branch`, `system_map`, and `embodiment`
- The repository provides `normalize_claim_tree` for data standardization and `claim_tree_to_mermaid` for visualization
- Schema definitions reside between lines 17–28, with layer semantics documented at lines 31–38

## Frequently Asked Questions

### What fields are required for independent claims in the schema?

Independent claims require three mandatory fields: `id` (numeric identifier), `kind` (claim category: `method`, `system`, or `product`), and `essential` (array of core technical feature phrases). These fields establish the root nodes of the claim hierarchy and determine the mandatory content for generated independent claim text.

### How does the `layer` field determine dependent claim content?

The `layer` field classifies how a dependent claim extends its parent, with four valid values defined in the schema comments (lines 31–38). `preferred_param` specifies numerical preferences, `branch` covers conditional logic paths, `system_map` handles module relationships, and `embodiment` adds implementation-specific details without altering the independent claim scope.

### Where is the claim tree validation logic implemented?

Validation and normalization logic resides in [`skills/patent-reader/tools/shared/common.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/shared/common.py), which exports the `normalize_claim_tree` function. This utility standardizes claim tree structures, validates parent-child relationships, and ensures all required fields are present before downstream processing or visualization.

### Can a dependent claim reference multiple independent claims?

Yes, the `refers` field accepts an array of parent claim IDs (e.g., `[1]` or potentially multiple values), allowing dependent claims to reference one or more independent claims. This array structure supports complex claim dependencies where a single dependent claim might relate to multiple parent claims in the hierarchy.