epd-parser

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/as:epd-parser — EPD PDF Parser

/as:epd-parser — EPD PDF解析器

<!-- architecture-studio:harness-compatibility -->
Harness note: use
/as:<skill>
on Claude Code and
$<skill>
on Codex. Resolve
<skill-root>
as the directory containing this loaded
SKILL.md
and
<plugin-root>
as the plugin root that contains
skills/
, and use equivalent native tools when host tool names differ.
Extract structured environmental impact data from EPD (Environmental Product Declaration) PDF files. Uses PyMuPDF for text extraction and Claude's reasoning to parse varying EPD formats into a standardized 42-column schema.
EPDs follow ISO 14025 / ISO 21930 / EN 15804 and report life cycle environmental impacts of building products. This skill reads those PDFs and structures the data for comparison, specification, and LEED documentation.
<!-- architecture-studio:harness-compatibility -->
Harness说明:在Claude Code中使用
/as:<skill>
,在Codex中使用
$<skill>
。将
<skill-root>
解析为包含已加载的
SKILL.md
的目录,将
<plugin-root>
解析为包含
skills/
的插件根目录;当宿主工具名称不同时,请使用等效的原生工具。
从EPD(环境产品声明)PDF文件中提取结构化的环境影响数据。使用PyMuPDF进行文本提取,并借助Claude的推理能力将不同格式的EPD解析为标准化的42列schema。
EPD遵循ISO 14025 / ISO 21930 / EN 15804标准,用于报告建筑产品的生命周期环境影响。本技能可读取此类PDF并将数据结构化,用于对比、规格制定及LEED文档编制。

Input

输入

The user provides EPD PDFs in one of these ways:
  1. File paths — one or more PDF file paths
  2. Folder path — a directory containing PDFs (will process all
    .pdf
    files)
  3. Just invoked — ask the user for file paths or a folder
用户可通过以下任一方式提供EPD PDF:
  1. 文件路径 — 一个或多个PDF文件路径
  2. 文件夹路径 — 包含PDF的目录(将处理所有
    .pdf
    文件)
  3. 仅调用(无输入) — 向用户询问文件路径或文件夹

Output Schema

输出Schema

Use the canonical 42-column contract in
schema/epd-schema.md
. It is separate from the 33-column FF&E product schema. Never substitute or persist an FF&E-shaped record as EPD data. Leave unavailable values empty and use a plain URL for
EPD Link
.
使用
schema/epd-schema.md
中定义的标准42列约定。该schema与33列的FF&E产品schema相互独立。严禁将FF&E格式的记录替代为EPD数据或持久化存储。不可用的值请留空,
EPD Link
字段使用纯URL格式。

Material Category Vocabulary

材料分类词汇表

Use ONE normalized term: Concrete, Steel, Aluminum, Wood/Timber, Insulation, Gypsum, Glass, Ceramic/Tile, Carpet, Resilient Flooring, Roofing Membrane, Sealant, Paint/Coating, Masonry, Stone, Composite Panel, Acoustic, Cladding, Rebar, Cement, Aggregate, Furniture, Other.
请使用以下标准化术语中的一个:混凝土(Concrete)、钢材(Steel)、铝材(Aluminum)、木材(Wood/Timber)、保温材料(Insulation)、石膏(Gypsum)、玻璃(Glass)、陶瓷/瓷砖(Ceramic/Tile)、地毯(Carpet)、弹性地板(Resilient Flooring)、屋面卷材(Roofing Membrane)、密封胶(Sealant)、涂料/涂层(Paint/Coating)、砌体(Masonry)、石材(Stone)、复合板(Composite Panel)、声学材料(Acoustic)、覆层(Cladding)、钢筋(Rebar)、水泥(Cement)、骨料(Aggregate)、家具(Furniture)、其他(Other)。

EPD-specific data in Notes (col AO)

备注(AO列)中的EPD专属数据

EPDs contain fields that don't have dedicated columns. Append these to Notes:
  • EPD Type:
    Type: Product-specific
    or
    Type: Industry-average
    or
    Type: Sector
  • Verification:
    Verified by: [verifier name]
  • EN version:
    EN 15804+A1
    or
    EN 15804+A2
    (important for comparability)
  • Source File:
    Source: holcim-readymix-epd.pdf
  • LCA Software:
    LCA: GaBi
    or
    LCA: SimaPro
    or
    LCA: openLCA
  • Biogenic carbon note: If the EPD reports biogenic carbon storage separately
Example Notes cell:
Type: Product-specific | Verified by: Underwriters Laboratories | EN 15804+A2 | LCA: GaBi | Source: holcim-readymix-epd.pdf
EPD包含一些没有专属列的字段,请将以下内容追加到备注中:
  • EPD类型:
    Type: Product-specific
    (产品特定)或
    Type: Industry-average
    (行业平均)或
    Type: Sector
    (行业层面)
  • 验证信息:
    Verified by: [验证机构名称]
  • EN版本:
    EN 15804+A1
    或
    EN 15804+A2
    (对可比性至关重要)
  • 源文件:
    Source: holcim-readymix-epd.pdf
  • LCA软件:
    LCA: GaBi
    或
    LCA: SimaPro
    或
    LCA: openLCA
  • 生物碳说明:若EPD单独报告了生物碳储存量
备注单元格示例:
Type: Product-specific | Verified by: Underwriters Laboratories | EN 15804+A2 | LCA: GaBi | Source: holcim-readymix-epd.pdf

LEED Eligibility Logic (col AI)

LEED合格性逻辑(AI列)

  • Yes: Product-specific, third-party verified EPD conforming to ISO 14025
  • Partial: Industry-average or sector EPD (counts for LEED Option 1 but not Option 2)
  • No: Self-declared, unverified, or non-conforming
  • 是:符合ISO 14025标准、经第三方验证的产品特定EPD
  • 部分符合:行业平均或行业层面EPD(适用于LEED选项1,但不适用于选项2)
  • 否:自我声明、未经验证或不符合标准的EPD

Workflow

工作流程

Step 1: Get input

步骤1:获取输入

Parse the user's input to identify PDF file(s) and output preferences.
  • If given a folder, list all
    .pdf
    files and report count
  • If no PDFs found or path is invalid, ask the user
  • Report: "Found N EPD PDF(s) to process."
解析用户输入,识别PDF文件及输出偏好。
  • 若提供了文件夹,列出所有
    .pdf
    文件并报告数量
  • 若未找到PDF或路径无效,询问用户
  • 报告格式:"找到N份待处理的EPD PDF。"

Step 2: Extract text from PDF

步骤2:从PDF提取文本

Use PyMuPDF (fitz) to extract text from each PDF. Run this Python script via Bash:
python
import fitz
import sys
import json

pdf_path = sys.argv[1]
doc = fitz.open(pdf_path)
pages = []
for i, page in enumerate(doc):
    text = page.get_text()
    pages.append({"page": i + 1, "text": text})
doc.close()

print(json.dumps({"filename": pdf_path.split("/")[-1], "total_pages": len(pages), "pages": pages}))
For each PDF, extract all pages and keep the JSON output transiently for parsing; do not create a persistent JSON artifact.
使用PyMuPDF(fitz)从每个PDF中提取文本。通过Bash运行以下Python脚本:
python
import fitz
import sys
import json

pdf_path = sys.argv[1]
doc = fitz.open(pdf_path)
pages = []
for i, page in enumerate(doc):
    text = page.get_text()
    pages.append({"page": i + 1, "text": text})
doc.close()

print(json.dumps({"filename": pdf_path.split("/")[-1], "total_pages": len(pages), "pages": pages}))
对于每个PDF,提取所有页面的内容,并将JSON输出临时保存用于解析;不要创建持久化的JSON文件。

Step 3: Parse EPD data

步骤3:解析EPD数据

Read the extracted text and identify all environmental impact data. This is the core intelligence step.
For small EPDs (<=30 pages): Process all pages at once.
For large EPDs (>30 pages): Process in chunks of 15 pages. Carry forward context between chunks.
Parsing instructions:
  1. Identify the EPD structure — EPDs typically have these sections:
    • General information (pages 1-2): manufacturer, product, declared unit, program operator, validity
    • Product description (pages 2-3): materials, manufacturing process, application
    • LCA information: system boundary, data sources, allocation rules
    • Impact indicator tables: the core data — usually 1-3 pages of tables
    • Resource use and waste tables
    • Additional information: scenarios, biogenic carbon, recycled content
  2. Extract product identity first — manufacturer, product name, declared unit, functional unit. These are always on page 1-2.
  3. Extract EPD metadata — registration number, program operator, PCR, standard, dates, system boundary. Usually on page 1 or in a header/sidebar.
  4. Find and parse impact indicator tables — This is the most critical step:
    • Look for tables with life cycle stage columns (A1, A2, A3 or A1-A3 combined, A4, A5, B1-B7, C1-C4, D)
    • Impact categories are rows: GWP, ODP, AP, EP, POCP, ADP (or ADPE/ADPF)
    • EN 15804+A2 EPDs split GWP into: GWP-total, GWP-fossil, GWP-biogenic, GWP-luluc. Capture all that exist.
    • EN 15804+A1 EPDs report a single GWP row. Put this value in GWP-total (A1-A3).
    • If A1, A2, A3 are reported separately (not combined), sum them for the A1-A3 total.
    • Units are standardized: GWP = kg CO2e, ODP = kg CFC-11e, AP = kg SO2e (or mol H+ eq for +A2), EP = kg PO4e (or mol N eq / kg P eq for +A2), POCP = kg C2H4e (or kg NMVOC eq for +A2).
  5. Extract resource use — PERE, PENRE, fresh water, waste. Usually in a separate table following the impact indicators.
  6. Extract additional data — recycled content %, manufacturing plant, country of origin, LCA software, verifier name.
  7. Determine LEED eligibility — based on EPD type and verification status.
  8. Leave fields blank rather than guessing — if a field isn't in the EPD, leave it empty.
读取提取的文本,识别所有环境影响数据。这是核心的智能处理步骤。
小型EPD(≤30页): 一次性处理所有页面。
大型EPD(>30页): 按15页为分块处理,在分块之间传递上下文。
解析说明:
  1. 识别EPD结构 — EPD通常包含以下部分:
    • 基本信息(第1-2页):制造商、产品、声明单位、项目运营方、有效期
    • 产品描述(第2-3页):材料、制造工艺、应用场景
    • LCA信息:系统边界、数据来源、分配规则
    • 影响指标表:核心数据 — 通常为1-3页的表格
    • 资源使用与废弃物表
    • 附加信息:场景、生物碳、回收成分
  2. 优先提取产品标识信息 — 制造商、产品名称、声明单位、功能单位。这些信息通常在第1-2页。
  3. 提取EPD元数据 — 注册号、项目运营方、PCR、标准、日期、系统边界。通常在第1页或页眉/侧边栏中。
  4. 查找并解析影响指标表 — 这是最关键的步骤:
    • 查找包含生命周期阶段列的表格(A1、A2、A3或A1-A3合并列、A4、A5、B1-B7、C1-C4、D)
    • 影响类别为行:GWP、ODP、AP、EP、POCP、ADP(或ADPE/ADPF)
    • EN 15804+A2 EPD 将GWP拆分为:GWP-total、GWP-fossil、GWP-biogenic、GWP-luluc。请提取所有存在的分项。
    • EN 15804+A1 EPD 仅报告一行GWP数据。请将该值填入GWP-total(A1-A3)字段。
    • 若A1、A2、A3分别报告(未合并),请将三者相加得到A1-A3总量。
    • 单位为标准化单位:GWP = kg CO2e,ODP = kg CFC-11e,AP = kg SO2e(+A2版本为mol H+ eq),EP = kg PO4e(+A2版本为mol N eq / kg P eq),POCP = kg C2H4e(+A2版本为kg NMVOC eq)。
  5. 提取资源使用数据 — PERE、PENRE、淡水、废弃物。通常在影响指标表之后的单独表格中。
  6. 提取附加数据 — 回收成分百分比、制造工厂、原产国、LCA软件、验证机构名称。
  7. 判定LEED合格性 — 基于EPD类型和验证状态。
  8. 字段留空请勿猜测 — 若EPD中没有某个字段的信息,请留空。

Multi-product EPDs

多产品EPD

Some EPDs declare impacts for multiple products, product groups, or concrete mix designs. Create one row per product/variant:
  • If the EPD covers "Product A" and "Product B" with separate impact tables, create two rows
  • If the EPD covers multiple concrete mixes (e.g., 3000 PSI, 4000 PSI, 5000 PSI), create one row per mix
  • The product name should distinguish variants: "ReadyMix Concrete — 4000 PSI"
部分EPD会声明多个产品、产品组或混凝土配合比的环境影响。请为每个产品/变体创建一行记录:
  • 若EPD包含"产品A"和"产品B"且分别有影响表,请创建两行记录
  • 若EPD包含多种混凝土配合比(例如3000 PSI、4000 PSI、5000 PSI),请为每种配合比创建一行记录
  • 产品名称应能区分变体:"ReadyMix Concrete — 4000 PSI"

Step 4: Present results

步骤4:展示结果

Show a summary table for each parsed EPD:
undefined
为每个解析后的EPD展示一个汇总表:
undefined

EPD Parse Results

EPD Parse Results

holcim-readymix-epd.pdf

holcim-readymix-epd.pdf

FieldValue
ProductReadyMix Concrete — 4000 PSI
ManufacturerHolcim
Declared Unit1 m3
GWP (A1-A3)312 kg CO2e
System BoundaryCradle-to-gate
Program OperatorNSF
Valid2024-01-15 to 2029-01-15
LEED EligibleYes
Products extracted: 3 (3000 PSI, 4000 PSI, 5000 PSI)

The preview is the default result. It can pass directly to `/as:epd-compare` or `/as:epd-to-spec` without creating a file.
FieldValue
ProductReadyMix Concrete — 4000 PSI
ManufacturerHolcim
Declared Unit1 m3
GWP (A1-A3)312 kg CO2e
System BoundaryCradle-to-gate
Program OperatorNSF
Valid2024-01-15 to 2029-01-15
LEED EligibleYes
Products extracted: 3 (3000 PSI, 4000 PSI, 5000 PSI)

预览为默认输出结果。无需创建文件,可直接传递给`/as:epd-compare`或`/as:epd-to-spec`使用。

Step 5: Optional persistence

步骤5:可选持久化

Do not create a file by default. Only when the user explicitly asks to save reusable records:
  1. Resolve the nearest ancestor containing
    PROJECT.md
    ; the target is
    <project-root>/epd-library.csv
    .
  2. Build complete records using
    schema/epd-schema.md
    , with
    Parsed At
    as an ISO 8601 timestamp and
    Source
    as
    epd-parser
    .
  3. Preview the records, target path, and whether this initializes or appends.
  4. Use one confirmation gate; do not ask the same confirmation first in prose.
  5. Serialize all approved records as one JSON array, preserving canonical field names. After approval, use
    python3 "<plugin-root>/skills/master-schedule/scripts/csv-library.py" init epd
    if needed, then invoke
    python3 "<plugin-root>/skills/master-schedule/scripts/csv-library.py" append epd --row-json <batch.json>
    exactly once. Never append in a per-record loop. The helper validates the entire file, rejects FF&E or malformed headers, and writes the whole batch atomically.
If no project root exists, keep the result in conversation and offer
/as:project init
; do not invent another CSV destination.
默认情况下不创建文件。仅当用户明确要求保存可复用记录时才执行:
  1. 定位最近的包含
    PROJECT.md
    的上级目录;目标路径为
    <project-root>/epd-library.csv
    。
  2. 使用
    schema/epd-schema.md
    构建完整记录,其中
    Parsed At
    为ISO 8601格式的时间戳,
    Source
    为
    epd-parser
    。
  3. 预览记录、目标路径,以及是初始化还是追加操作。
  4. 仅进行一次确认;请勿先以文字形式重复询问相同的确认问题。
  5. 将所有获批记录序列化为一个JSON数组,保留标准字段名。获得批准后,如需初始化则运行
    python3 "<plugin-root>/skills/master-schedule/scripts/csv-library.py" init epd
    ,然后仅调用一次
    python3 "<plugin-root>/skills/master-schedule/scripts/csv-library.py" append epd --row-json <batch.json>
    。严禁按记录循环追加。该辅助工具会验证整个文件,拒绝FF&E格式或格式错误的表头,并原子性地写入整批数据。
若不存在项目根目录,请将结果保留在对话中,并提供
/as:project init
选项;请勿自行设定其他CSV存储路径。

Edge Cases

边界情况

  • Scanned PDFs (image-only): PyMuPDF will return empty or garbage text. Detect this (very short text relative to page count) and tell the user: "This PDF appears to be scanned/image-based. Text extraction won't work — consider using an OCR tool first."
  • Non-English EPDs: Common for European manufacturers (German, French, Spanish, Swedish). Impact indicator abbreviations (GWP, ODP, AP, EP, POCP) are the same internationally. Extract numeric data regardless; note the language in Notes.
  • EN 15804+A1 vs +A2: Older EPDs use +A1 (single GWP row, different EP/AP units). Newer use +A2 (split GWP, different units for AP/EP/POCP). Always note which version in Notes. Map to schema as closely as possible.
  • Multi-product EPDs: One row per product/variant. See Multi-product EPDs section above.
  • Expired EPDs: Flag in Notes:
    EXPIRED — valid to YYYY-MM-DD
    . Still parse the data.
  • Password-protected PDFs: PyMuPDF will fail to open. Catch the error and tell the user.
  • Very large PDFs (50+ pages): Process in 15-page chunks. Give progress updates.
  • EPDs with impact tables as images: Detect missing numeric data in what should be table sections. Flag: "Impact tables may be embedded as images — manual extraction needed."
  • 扫描版PDF(纯图片):PyMuPDF将返回空文本或乱码。请检测此情况(文本长度相对于页数过短)并告知用户:"该PDF似乎是扫描/图片版。文本提取无法正常工作 — 建议先使用OCR工具处理。"
  • 非英文EPD:常见于欧洲制造商(德语、法语、西班牙语、瑞典语)。影响指标缩写(GWP、ODP、AP、EP、POCP)在国际上是统一的。无论语言如何都请提取数值数据,并在备注中注明语言。
  • EN 15804+A1与+A2版本:旧版EPD使用+A1(单行GWP,EP/AP单位不同)。新版使用+A2(GWP拆分,AP/EP/POCP单位不同)。请务必在备注中注明版本,并尽可能映射到schema中。
  • 多产品EPD:每个产品/变体一行记录。参见上文“多产品EPD”部分。
  • 过期EPD:在备注中标记:
    EXPIRED — valid to YYYY-MM-DD
    。仍需解析数据。
  • 受密码保护的PDF:PyMuPDF将无法打开。请捕获错误并告知用户。
  • 超大型PDF(50页以上):按15页分块处理,并提供进度更新。
  • 影响表为图片的EPD:若在本应是表格的区域检测不到数值数据,请标记:"影响表可能嵌入为图片 — 需要手动提取。"

GWP Baseline Policy

GWP基准政策

This policy is shared by all four EPD skills (
epd-parser
,
epd-research
,
epd-compare
,
epd-to-spec
) and must read identically in each. Industry-average GWP baselines are allowed only when cited with a named source and publication year (e.g., "NRMCA Industry-Wide Member EPD v3.2, 2022" or "AISC Fabricated Hot-Rolled Structural Sections EPD, 2021"). Uncited baseline numbers recalled from memory or training data are banned. If no source-and-year citation is available, ask the user to provide a baseline EPD or find one with
/as:epd-research
— never guess a baseline.
For this skill: report only values extracted from the parsed EPD itself. When contextualizing a parsed GWP against an industry average (e.g., in the parse-results summary), the baseline must carry a source-and-year citation or be omitted.
本政策由四个EPD技能(
epd-parser
、
epd-research
、
epd-compare
、
epd-to-spec
)共同使用,各技能中的表述必须完全一致。仅当行业平均GWP基准带有明确来源和出版年份时才可使用(例如"NRMCA Industry-Wide Member EPD v3.2, 2022"或"AISC Fabricated Hot-Rolled Structural Sections EPD, 2021")。严禁使用从记忆或训练数据中回忆的、无引用来源的基准数值。若无来源和年份的引用信息,请要求用户提供基准EPD,或使用
/as:epd-research
查找 — 绝对不要猜测基准值。
对于本技能:仅报告从所解析的EPD本身提取的数值。当将解析得到的GWP与行业平均水平进行对比说明时(例如在解析结果汇总中),基准必须带有来源和年份引用,否则应省略。

Error Reporting

错误报告

After processing, always report:
Parsed: X products from Y EPD PDF(s)
- filename.pdf: N products extracted
- filename2.pdf: M products extracted
Issues: [list any problems — expired, scanned, missing tables, etc.]
处理完成后,始终按以下格式报告:
Parsed: X products from Y EPD PDF(s)
- filename.pdf: N products extracted
- filename2.pdf: M products extracted
Issues: [list any problems — expired, scanned, missing tables, etc.]