SuperAPI AI Directory

new-case

Office & productivity

View repository

Updated 10-15 20:10

About this skill

New Case - Create a new case/organize consultation materials

Organize original case materials or consultation materials into a standardized directory structure. Supports four presets:

  • Litigation cases (litigation): 12-level standard litigation directory, generating a case information dashboard, time records, and deadline management files
  • Potential projects/consultation (consultation): 2-directory lightweight structure (client materials + work files), generating a project information card and to-do items
  • Trademark cases (trademark): IP business, covering trademark registration / opposition / rejection review / invalidation declaration / change / assignment;2 business sub-templates under a single preset: (1) Registration template (7 directories, registration/change/assignment,including a separate trademark registration certificate directory), (2) Opposition/review/invalidation template (8 directories, adversarial cases, including evidence materials + a separate trademark registration certificate directory).Directory order follows project progress: engagement → drawings → application → attorney work → official documents (excluding registration certificate) → trademark registration certificate (separate) → invoices/finance.Work records/communications merged into 1 engagement(consistent with patent DEC-009). Files of the same type under multiple application numbers are grouped together, generating a project information card and renewal reminder to-do items.Trademark registration certificate PDFs are prefixed with a YYMMDD date(date read from mtime/birth time, DEC-2026-06-11)
  • Patent cases (patent): IP business, covering 10 types of sub-business: invention / utility model / design / invalidation / review / search / PCT / change / annual fee;3 business sub-templates under a single preset: (1) Application template (7 directories, invention/utility model/design/PCT), (2) Review/invalidation template (8 directories, review/invalidation, including evidence + submissions by the other party), (3) Search/other template (4 directories, search/layout/change/annual fee).Directory order follows project progress: engagement (including work records) → list/client-provided → client-provided/attorney work → attorney work/application → CNIPA documents → invoices/finance.Attorney work and document progress merged(both are attorney outputs);2 work records have been merged into 1 engagement materials(communication recordings/emails/meeting minutes are essentially records of the attorney-client work process). Each project selects a template according to its business subtype,do not create empty directories. Generate a project information card and annual fee reminder to-do items.

Material numbering usesreference-level grading:A-001(living document),B-001(frequently checked),C-001(archived),D-001(to be activated).

Applicable scenarios

  1. Create a new litigation case file and need to establish a standardized directory structure
  2. Existing litigation case materials need to be organized into a unified format
  3. Organize potential client consultation materials and create consultation files
  4. Upon receiving a new case/new consultation, a framework needs to be set up quickly
  5. Upon receiving new trademark business (registration/opposition/review/invalidation/change), an IP-specific directory structure needs to be established
  6. Upon receiving new patent business (invention/utility model/design/invalidation/review/search/PCT/change/annuity), an IP-specific directory structure needs to be established

Trigger Method

Natural Language Trigger

  • "Organize this case's materials: /path/to/case-folder"
  • "Help me set up the case structure: the case is at /path/to/case"
  • "Create new case"
  • "New case"
  • "Organize consultation materials: /path/to/consultation-folder"
  • "Organize the files for this potential project"
  • "Learn my case directory habits: /path/to/existing-cases"
  • "Use these projects as templates and file cases according to my specifications from now on"

Parameterized Trigger

The following parameters are supported (passed via natural language or in a structured way):

Parameter Required Description Example
--case-id Yes Case/project number [YYYY]京0105民初1234号 or {YYMMDD} {客户简称} 咨询
--client-name No Client name/company name 北京科技有限公司
--case-type No Case type 诉讼/咨询/商标/注册/异议/复审/无效/变更/专利/发明/实用新型/外观/检索/PCT/年费
--case-cause No Cause of action 合同纠纷
--opposite-party No Opposing party 上海某某公司
--input-dir No Case materials directory /path/to/materials

Among these, --case-type 's 诉讼 or 民事/刑事/行政 corresponds to the litigation preset,咨询 corresponds to the consultation preset,商标/注册/异议/复审/无效/变更 corresponds to the trademark preset,专利/发明/实用新型/外观/检索/PCT/年费 corresponds to the patent preset.

Usage Examples:

"创建新案件,案件编号 [2025]京0105民初1234号,委托人北京科技有限公司,案由合同纠纷,对方当事人上海某某公司"
"整理咨询材料 /path/to/folder,客户{客户简称}"

Workflow

Configuration prerequisite: load or learn personal specifications

  1. Before ordinary filing, check config/local-conventions.local.yaml. When the file exists, load it according to the priority order of "this explicit instruction > personal configuration > built-in preset".
  2. When the user explicitly requests to learn, remember, or update personal directory specifications, first read references/local-conventions.md, complete a read-only inventory, rule summarization, change draft, and user confirmation, then write to the personal configuration.
  3. Ordinary one-time filing must not secretly learn or persist habits. The learning process does not modify assets/*.yaml。

Step Zero: Determine the type and load the preset

  1. Read the --case-type parameter:

    • 诉讼/民事/刑事/行政 → load assets/litigation.yaml
    • 咨询 → load assets/consultation.yaml
    • 商标/注册/异议/复审/无效/变更 → load assets/trademark.yaml
    • 专利/发明/实用新型/外观/检索/PCT/年费 → load assets/patent.yaml
  2. Auto-detect(when no type is specified):

    • Read assets/ of all presets under detection configuration
    • Check whether the input directory path matches path_patterns
    • Scan whether file names match material_hints(positive) and negative_hints(exclusion)
    • If litigation materials are detected (summons, complaint, etc.), use litigation with priority even if the path contains "consultation"
    • If it cannot be determined, confirm with the user
  3. Load the corresponding preset: Read the selected YAML configuration file; subsequent steps are executed based on this preset

  4. Default fallback: If not specified and cannot be detected, use the litigation preset by default

Step 1: Analyze input materials

  1. Scan folder, list all files
  2. Identify material type: legal service plan, chat records, evidence materials, engagement materials, identity documents, other
  3. Extract key information: Follow references/extraction-rules.md to extract information such as parties, cause of action, and amounts from different material types

Step 2: Create directory structure

Read the preset-configured directories section and create directories sorted by id.

Litigation case: Create 12 standard directories (00 - 📅 日程管理 to 11 - 📚 参考文件)

Consulting project: Create 2 directories:

├── 01 - 📂 客户材料/    # 客户提供的所有材料(录音、截图、文档、聊天记录等)
└── 02 - 📝 工作文件/    # 律师产出(分析、方案、研究、策略)

Trademark case: Create directories using one of 2 templates based on the business subtype (Do not create empty directories)。

Template 1: Registration template(registration/change/assignment,7 directories):

├── [项目编号] 项目信息.md
├── [项目编号] 待办事项.md
├── 01 - 📑 委托材料/         # 委托书、合同、执照、身份 + 工作记录/沟通(DEC-009)
├── 02 - 🖼️ 商标图样/         # 商标图样(彩色稿/黑白稿/源文件)
├── 03 - ✍️ 申请书/            # 律师起草(注册/变更/转让申请书)
├── 04 - 📊 律师工作/          # 检索/分析/驳回应对 + 进程跟踪
├── 05 - 🏛️ 官方文书/          # 商标局文书(受理/补正/缴费/驳回/复审决定/变更证明;不含注册证)
├── 06 - 📜 商标注册证/         # 商标注册证 PDF(独立一级目录;YYMMDD 日期前缀,日期读文件 mtime/birth time)
└── 07 - 💰 发票财务/           # 律师费、官费

Template 2: Opposition/Review/Invalidation template(opposition/review/invalidation,8 directories):

├── 01 - 📑 委托材料/         # 委托书、合同、执照、身份 + 工作记录/沟通
├── 02 - 🖼️ 商标图样/         # 本方 + 对方图样 + 引证商标图样
├── 03 - ✍️ 申请书/            # 异议/复审/无效/答辩/意见陈述/补充理由
├── 04 - 📊 律师工作/          # 检索/近似分析/策略/理由论证 + 进程跟踪
├── 05 - 📎 证据材料/          # 异议/复审/无效案件证据(核心)
├── 06 - 🏛️ 官方文书/          # 商标局文书(异议受理/裁定/复审决定/无效裁定;不含注册证)
├── 07 - 📜 商标注册证/         # 商标注册证 PDF(独立一级目录;YYMMDD 日期前缀,日期读文件 mtime/birth time)
└── 08 - 💰 发票财务/           # 律师费、官费

Directory naming and numbering rules:

  • Directory numbers uniformly use 01-08 two digits (consistent with litigation projects 00-11 )
  • "Invoice/Finance" is represented by 💰 发票财务 (macOS terminal tools do not support filenames containing /, so a space is used instead)
  • The trademark registration certificate is anindependent first-level directory(DEC-2026-06-11), not a subdirectory of 05/06 Official Documents
  • Add a YYMMDD prefix to the trademark registration certificate PDF filename (read the date from mtime/birth time) to facilitate chronological sorting
  • Files that already have a date prefix are skipped for adding another ("e.g., 231108 第63583905号 EASYCLAD 商标注册证.pdf")

Directory order design principles(by project progress, DEC-008 + DEC-009):

  1. Engagement materials → 2. Trademark drawing → 3. Application → 4. Attorney work → 5. Evidence materials (only for adversarial matters) → 6. Official documents → 7. Invoice/Finance
  2. That is, by "project progress": initiation (engagement + communication) → preparation (drawing) → attorney output (application + work) → adversarial (evidence, only opposition/review/invalidation) → official → wrap-up
  3. Trademark "communication/work records" are merged into 1 Engagement Materials (consistent with patent DEC-009)
  4. Files of the same type with multiple application numbers are grouped together (e.g., applications with multiple application numbers all go into 3)

Patent case: Create directories using one of 3 templates based on the business subtype (Do not create empty directories)。

Directory order design principles(arranged by project progress, DEC-008):

  1. Engagement materials → 2. Work records → 3. Checklist/client-provided → 4. Client-provided/attorney work → 5-6. Attorney work/application → 7. CNIPA documents → 8-9. Invoice/Finance
  2. That is, by "project progress": initiation → communication → preparation → attorney output → official → wrap-up
  3. Attorney work and the document process are merged into 1 directory (both are attorney output)

Template 1: Application template(invention/utility model/design/PCT, total 8 directories):

├── 1 - 📑 委托材料/         # 委托书、合同、协议、营业执照、法律服务方案
├── 2 - 🗒️ 工作记录/         # 微信聊天/录音/转写、邮件、会议纪要
├── 3 - 📋 申请清单/         # 拟申请哪些专利/类别(V1/V2 迭代)
├── 4 - 📥 客户提供/         # 技术交底书、现有技术、图纸
├── 5 - 📊 律师工作/         # 检索报告/新颖性创造性分析/参考材料 + 文件进程节点
├── 6 - ✍️ 申请书/            # 律师起草(请求书/权利要求/实审请求/PCT)
├── 7 - 🏛️ 国知局文件/         # 受理/缴费/审查意见/驳回/授权/证书
└── 8 - 💰 发票/财务/         # 代理费发票、官费

Template 2: Review/Invalidation template(Reexamination/Invalidation, total 9 directories):

├── 1 - 📑 委托材料/         # 复审/无效委托书
├── 2 - 🗒️ 工作记录/         # 含口审沟通
├── 3 - 📥 客户提供/         # 技术资料、现有技术证据
├── 4 - 📊 律师工作/         # 检索/分析/无效策略/口审策略 + 复审/无效时间线
├── 5 - ✍️ 申请书/            # 复审请求书/无效请求书/意见陈述书/口审代理词
├── 6 - 📎 证据材料/          # 对比文件 D1/D2/现有技术证据
├── 7 - 📤 对方提交/          # 对方意见/证据/答辩
├── 8 - 🏛️ 国知局文件/         # 复审受理/口审通知/复审决定/无效决定
└── 9 - 💰 发票/财务/         # 代理费、复审/无效官费

Template 3: Search/Other templates(Search/Layout/Change/Annual fee, total 5 directories):

├── 1 - 📑 委托材料/         # 检索/变更/年费代缴委托协议
├── 2 - 🗒️ 工作记录/         # 检索需求/变更/年费提醒沟通
├── 3 - 📋 任务清单/         # 拟检索/拟变更/代缴年费的专利清单
├── 4 - 📊 律师工作/         # 检索报告/布局策略/变更申请书/年费监控 + 进程跟踪
└── 5 - 💰 发票/财务/         # 检索费/变更官费/年费代缴

Template selection logic(Automatically select template after confirming the business subtype in step zero):

  • Business subtype = Invention/Utility model/Design/PCT → application template
  • Business subtype = Reexamination/Invalidation → invalidation template
  • Business subtype = Search/Layout/Change/Annual fee → search template

workflow special points:

  • Askmain application numberandrelated application numberlist (only required for application type)
  • Reexamination/Invalidation cases:6 证据材料/ keep the user-created subdirectories such as "Comparison Document 1/D1" under it,7 对方提交/ keep independent
  • Search-type projects do not require an application number, only a search target list
  • Change/Annual fee type projects use the "patent number list" as the core tracking object

Step 3: Material classification and organization

Read the preset configured classification rules, match keywords in order, and move materials into the corresponding directories. See the detailed classification decision logic in references/classification-guide.md。

Iron rules of operation:

  • Preserve file timestamps: When copying/moving files, you must use cp -p(preserve mtime/atime) or mv(moving within the same disk naturally preserves them). Lawyers often judge contract signing and project progress time by file mtime; destroying timestamps will cause distortion in historical tracing.
  • Preserve user-created secondary subdirectories: Subdirectories created by clients/lawyers (such as 02 商标图样/DEMO MARK/) are moved into the new location as-is,do notflatten/extract subdirectory contents. If a project has 4+ application numbers causing filename conflicts, then consider subdirectories.

Additional rules for consulting projects:

  • Client-facing deliverables such as legal service plans and legal opinions are placed in 02 - 📝 工作文件/
  • Only management files (project information, to-do items, material lists) are kept in the root directory
  • Transcripts and corresponding audio are placed in the same directory
  • Material numbering uses reference-level grading (A/B/C/D), see details in references/naming-conventions.md

Step 3.5: Automatically add issuance date prefix to official document PDFs

Purpose: The issuance date of official documents from the trademark office (acceptance/correction/payment/rejection/announcement/registration certificate/decision/ruling, etc.) is a key time anchor for case progress, but many scanned copies do not have a date in the filename, causing disorder when sorted by filename. Automatically extract the issuance date from the PDF content and add a YYMMDD prefix to the filename for easy chronological sorting.

Scope of application:

  • Mainly for 04 - 🏛️ 官方文书/ PDFs in the directory
  • Secondarily applicable to 03 - ✍️ 申请书/(such as reexamination requests) and 05 - 📎 证据材料/ official document type PDFs in

Operation process:

  1. Identify files that need dates added: Scan PDF files in the target directory

    • Skip files that already have a YYMMDD prefix (such as 260424 商标注册申请不予受理通知书_{申请号}.pdf)
    • Skip non-PDFs (images/Word)
    • Skip files that are clearly drafted by lawyers rather than official documents
  2. Extract PDF content date:

    • Prefer to use pdftotext -l 1 <file> Extract the first-page text (for text-layer PDFs)
    • If the text layer has no date, scan pages 2-3 (the decision date is often at the end of the document)
    • For scanned PDFs, use mineru-ocr or legal-ocr to run OCR
  3. Match date formats(in priority order):

    • Arabic numerals:2025年07月10日 / 2025-7-10 / 2025/7/10 / 2025.7.10
    • Chinese numerals:二〇二五年七月十日 / 二○二五年七月十日
    • 6-digit pure numbers:20250710(rare)
    • Selectthe latest dateas the issuance date (avoid earlier time points such as "application date")
  4. Determine whether it is the issuance date(to improve accuracy):

    • Prioritize dates near keywords such as "issuance date" / "decision date" / "this decision" / "issue"
    • Ignore earlier non-issuance dates such as "application date" / "acceptance date" / "payment date"
    • Fallback: take the latest reasonable date in the full PDF text (after 2020)
  5. Rename:

    • Use mv to rename (preserve mtime, an iron rule of operation)
    • Format:YYMMDD 原文件名.pdf(e.g., 250710 {申请号}_{商标名}_驳回通知书.pdf)
    • If the original filename already has a date but it is inconsistent,do notoverwrite the user's original date
  6. Write back to the project information card:

    • Update trademark-info.md 's corresponding file path in the "materials list"
    • If this date constitutes a new timeline event, append a row to the "key timeline" table

Known limitations:

  • OCR recognition accuracy for scanned documents depends on PDF quality; on failure, fall back to the PDF mtime
  • A very small number of decisions have no clear date (e.g., foreign-language/early archives); just skip them
  • Near-identical files with the same name require manual determination (this situation is rare)

Practical cases(a certain trademark rejection review project, 2026-06-09):

  • {申请号}_{商标名}_驳回通知书.pdf → extracted the issuance date from the PDF body 2025年07月10日 → renamed 250710 {申请号}_{商标名}_驳回通知书.pdf
  • 商标驳回复审决定书_{申请号}_第{类号}类{商标名}_{文书号}.pdf → extracted the end-of-document 2025年12月29日 → renamed 251229 商标驳回复审决定书_{申请号}_第{类号}类{商标名}_{文书号}.pdf

Step 4: Generate management files

Based on the preset configuration's management_files , generate item by item:

File Litigation Consulting Trademark Patent Template
Case/project information ✅ ✅ ✅ ✅ case-info / consultation-info / trademark-info / patent-info
Timesheet records ✅ ❌ ❌ ❌ timesheet.md
Deadline management YAML ✅ ❌ ❌ ❌ deadline-yaml.md
To-do items ✅ ✅ ✅ ✅ task-list / trademark-task-list / patent-task-list

Litigation casesGenerate a case information dashboard, see templates/case-info.md。

Consulting projectsGenerate a project information card, see templates/consultation-info.md。

Trademark casesGenerate a project information card (including renewal reminder + business subtype + cited trademarks), see templates/trademark-info.md, the to-do template is templates/trademark-task-list.md。

Patent casesGenerate a project information card (including annuity reminder + business subtype + cited comparison documents + opposing party), see templates/patent-info.md, the to-do template is templates/patent-task-list.md。

Optional Step 5: Generate a legal service proposal

If the materials include preliminary communication records or customer requirement descriptions, it is recommended to use the legal-proposal-generator skill to generate a legal service proposal.

  • Litigation cases: output to {01}/ directory
  • Consultation projects: output to 02 - 📝 工作文件/

Reference documents

Detailed rules have been externalized to the references/ directory; read them as needed:

File Content
references/naming-conventions.md Case number, case name, file naming rules
references/classification-guide.md Material classification decision logic, handling of ambiguous scenarios
references/extraction-rules.md Rules for extracting case information from different material types
references/local-conventions.md Learn personal conventions from user descriptions or existing directories, and generate local override configuration

Time requirements

Use the system's current time (obtained via date "+%Y-%m-%d" ), ensuring:

  • Document creation time is the current date
  • Timeline logic is correct (past → present → future)
  • Remaining days are calculated accurately

Custom configuration

Personal override configuration

Personal directory conventions are written to config/local-conventions.local.yaml, format reference config/local-conventions.example.yaml. This file serves only as a local override layer and does not change the public built-in presets. For recognition, update, merge, and failure fallback rules, see references/local-conventions.md。

Preset configuration

Directory structures and material classification rules are defined by YAML files under assets/ . Each preset file contains:

  • meta: preset metadata (ID, name, description, numbering format)
  • directories: directory definitions (number, icon, name, description)
  • management_files: management file generation configuration (enabled/disabled, template path, output path)
  • detection: auto-detection rules (path keywords, file keywords, exclusion keywords)
  • classification: material classification rules (keyword → target directory)
  • root_files(optional): root directory retained file rules

Existing presets:

  • assets/litigation.yaml — Litigation cases (12 directories)
  • assets/consultation.yaml — Potential projects/consultation (2 directories)
  • assets/trademark.yaml — Trademark cases (a single preset with 2 business sub-templates: registration with 7 directories including an independent trademark registration certificate / opposition, review, and invalidation with 8 directories including an independent trademark registration certificate; directory order follows project progress)
  • assets/patent.yaml — Patent cases (a single preset with 3 business sub-templates: application 8 directories / review and invalidation 9 directories / search and others 5 directories; directory order follows project progress)

Adding presets

If support for new case types is needed (such as corporate legal affairs, copyright registration, etc.), create a new YAML file under assets/ . For YAML fields: see the existing files in assets/*.yaml . Two structures are available:

  • Single-template flat mode(refer to litigation / consultation / trademark): all directories are listed directly in the directories array, fixed by business type
  • Multi-template grouped mode(refer to patent): the preset has business_types and multiple templates(each template has its own directories and classification rules); automatically select a template based on the business subtype to generate the corresponding directories,do not create empty directories

Projects with multiple application numbers/case numbers are tracked in the project information card via the "related application number table", and are not nested in the directory structure.

Backward compatibility

The original references/case-config.yaml has been migrated to assets/litigation.yaml, and the old file is no longer retained.

Output verification

After completing the organization, confirm:

  • The directory structure has been created according to the preset configuration
  • All materials have been categorized and moved to the corresponding directories
  • Management files have been generated according to the preset management_files configuration
  • If a personal configuration is loaded, YAML, preset ID, directory ID, and template paths have been verified
  • File naming complies with the specifications
  • The time logic is correct

Prohibitions

  • It is prohibited to record the project's own SuitAgent system information in case files
  • It is prohibited to create additional explanatory documents or READMEs
  • It is prohibited to omit any existing materials
  • It is prohibited to fabricate case information
  • It is prohibited to write personal configuration when the user has not explicitly requested to "learn/remember/update specifications"
  • It is prohibited to write personal habits or local absolute paths into public assets/*.yaml