SuperAPI AI Directory

industry-research-report

Writing & research

View repository

Updated 10-15 20:10

About this skill

industry-research-report · Industry Legal Research Report

Positioning

An intelligence working paper for the client acquisition side.The consumer is the lawyer themself—used before meeting clients, before giving lectures, and before exploring new industries; not sent directly to clients, and only includes a disclaimer and statistical methodology at delivery.

This skill is part of the XX Lawyer Legal AI course system (see 知识整理/课程体系/XX 律师法律AI课程主题体系.md), inthe client acquisition side of the client relationship main axis. The middle segment (intake checklist / service proposal / employee handbook / attorney letter) is covered parametrically by existing suites (litigation-analysis / legal-proposal-generator / contract-copilot); this skill only fills the missing segment of "industry background intelligence."

⚠️ What it does not do(boundary of this skill)

  • Does not provide legal opinions under a specific client's name (that is the job of opc-legal-counsel / litigation-analysis)
  • Does not conduct due diligence on a single enterprise (use opc-legal-counsel)
  • Does not publish externally (for internal use at the draft layer; before external publication it must be manually reviewed and switched to the external format of weekly-legal-briefing or legal-proposal-generator)
  • Does not do layout beyond PDF (no docx, no interactive HTML pages, no PPT)

Trigger scenarios

  • "Make a legal research report on the XX industry"
  • "I'm meeting an XX client next Tuesday; help me first get a full picture of the XX industry"
  • "We want to expand into the low-altitude economy; prepare some background materials"
  • "What parts manufacturing enterprises are there in XX region? Pick a few and profile them"

Personalized configuration (fill this in first, then run the report)

All "law firm style" information such as report letterhead, color scheme, lead attorney, and cover style is centralized in config/report-profile.md, and the user only needs to fill it in once. Each time a report is generated, it is read by scripts/render.py ; the generator is not aware of hard-coded law firm information.

First-run wizard (first use · one-time)

The questioning mechanisms of different harnesses are inconsistent (terminal read / AskUserQuestion / WeChat IM / Notion embed, etc.), and this skill does not bind itself to any specific tool;the Agent chooses an appropriate questioning method according to its own harness. Below is the recommended question list, to be asked in order all at once:

Question list (7 items, in order):

  1. Full law firm name(required)

    • Example question: "Please provide the full law firm name; it will be used as the letterhead at the top of the report cover / on the left side of the footer"
    • Example answer: "XX Law Firm"
  2. Report series name(required)

    • Example question: "Which series should the report be placed under? Such as 'XX Law Firm Practice Manual' or 'XX Legal Observer', etc."
    • Example answer: "XX Law Firm Practice Manual"
  3. Primary color preference(required · choose 1 of 5)

    • Example question: "Please choose one of the following 5 common lawyer color palettes as the primary tone of the report; for a detailed comparison, see references/palette-presets.md」
      • bluebook Bluebook(Deep Blue #1B3C59 + Gold #D4AF37) — Legal classic bluebook, solemn and authoritative, suitable for formal external releases
      • service-plan Law Firm Dark Brown(Dark Brown #5A4E48 + Brown Accent #927F76) — Traditional law firm document style, suitable for service plans and advisory materials
      • burgundy Wine Red(Wine Red #722F37 + Antique Bronze Gold #B08D5C) — High-end and elegant, suitable for boutique firms / foreign-related arbitration
      • forest Forest Green(Deep Green #1F4E3D + Wheat Gold #A8853A) — Environmental law / ESG / compliance special projects
      • tech Tech Blue(Tech Blue #1A3A6E + Cyan #00A6B6) — Internet / Data compliance / AI / IP
    • Example answer: "bluebook"
  4. Design Intensity(Required · Choose 1 of 3)

    • Example question: "Report design intensity? Default lite text version"
      • lite(Default): Text version manual, 0-1 lightweight component per page, restrained graphical style
      • balanced: Balanced text and graphics, 1 main component or 2 small components per page
      • visual: Strong visual, at least 1 visual main structure per page (infographic level)
    • Example answer: "lite"
  5. Cover Variant(Required · Choose 1 of 4)

    • Example question: "Cover style? Default C-geo (geometric top)"
      • C-geo Geometric top: dark blue band + large disc decoration
      • D-diagonal Diagonal slash: modern feel
      • E-flip Mirror symmetry: strong design sense
      • F-grid Top grid: high information density
    • Example answer: "C-geo"
  6. Lead Lawyer(Required)

    • Example question: "Cover 'editor-in-chief' attribution + which lawyer to use in the header?"
    • Example answer: "Lawyer XX"
  7. Contact Information(Required · At least one of WeChat + phone)

    • Example question: "Contact info at bottom right of footer? Provide at least one"
    • Example answer: "WeChat {WeChat ID placeholder} / Phone {Phone placeholder}"

(Not enabled in v0.4.1) Law firm introduction chapter motto — v0.4.0 once added the motto field (law firm brand slogan displayed on the cover), v0.4.1, based on user feedback that "introductions vary greatly among law firms, so do not display it for now," hastemporarily disabled(In the cover template changed to {% if false %}), the field and slot are retained in report-profile.md, and if needed later, change it to {% if motto %} one line is enough.

After receiving the answers, the Agent fills this information by config/report-profile.example.md field into config/report-profile.md(gitignore), and all subsequent reports read from here.

⚠️ The Agent does not need to ask verbatim according to the question list above; it may simplify or merge based on the actual harness situation (e.g., "fill in the law firm's full name and series name together," "choose one palette"). The goal isto obtain the 7 core pieces of information in one pass, without a second confirmation。

Copy config/report-profile.example.md as config/report-profile.md and fill in the real information.config/report-profile.md has been added to .gitignore, not committed to the repository.

Configurable fields:

Group Field Default Description
Header law_firm XX Law Firm Law firm name at the top of the cover + left side of the footer
Header series_name XX Law Firm Practice Manual Cover top "series name"
Header series_subtitle AGENT EDITION / Legal Practice Edition Cover top subtitle
Header report_code YWX-IR-{YYYY}-{NN} Report number (printed at bottom right of cover + right footer)
Lead Attorney lead_lawyer Attorney XX Report cover "editor-in-chief" attribution
Lead Attorney lead_lawyer_title Attorney / Patent Agent Title
Lead Attorney lead_lawyer_avatar Path Avatar next to cover attribution (optional)
Contact Information contact_wechat {WeChat ID placeholder} "Contact information" at bottom right of footer
Contact Information contact_phone {phone placeholder} Same as above
Contact Information contact_email — Same as above
Color Scheme cover_style C-geo Cover variant C-geo / D-diagonal / E-flip / F-grid choose one of four
Color Scheme color_palette bluebook Color scheme group:bluebook Blue Book (dark blue primary color) / service-plan Service Proposal (law firm dark brown)
Color Scheme accent_color #D4AF37 Primary accent color (gold for blue group, copper for brown group)
Report Design design_intensity lite Three levels of design intensity:lite Text version (default for this skill) / balanced Balanced text and visuals / visual Strong visual
Report Design include_toc true Whether to generate a table of contents
Report Design include_methodology true Whether to generate a "Data Methods" section (source description)
Footer footer_brand Industry Legal Research Report "Report name" on the right side of the footer

report-profile.md After modification, no need to restart the skill; it will take effect automatically on the next generation.

IO Contract

Input Parameters

Parameter Required Default Description
industry Yes — Target industry term, e.g., "embodied intelligence", "low-altitude economy", "reducer manufacturing"
region No Nationwide Regional focus, e.g., "XX region", "Yangtze River Delta"
focus No Full profile Business direction filter:劳动 / 知识产权 / 投融资 / 诉讼执行, multiple selections allowed
depth No full quick(enterprise directory + risk tags) / full(including industry chain and policies)
output_dir No archive/ Report output directory

Outputs

  • <output_dir>/行业调研报告_{industry}_{region}_{YYYYMMDD}.md(intermediate draft, editable)
  • <output_dir>/行业调研报告_{industry}_{region}_{YYYYMMDD}.pdf(final draft, A4 fine layout)
  • <output_dir>/行业调研报告_{industry}_{region}_{YYYYMMDD}.meta.json(metadata, including industry/region/focus/search details summary/generation time)

Report Skeleton (Mandatory Six-Section Structure)

  1. Statistical Scope and Disclaimer — Data sources, time window, Qichacha coverage, this report does not constitute legal advice
  2. Industry Overview — Industry chain structure (upstream / midstream / downstream), risk map
  3. Policy and Regional Focus — Municipal/district-level policy documents, industrial park directory, local enterprise directory (when region is provided)
  4. Target Enterprise Profile List — Qichacha enterprise directory + representative legal risk tags filtered by focus
  5. Risk and Needs Summary — Industry-wide common risks + investment and financing pain points (to know yourself and your enemy before a visit)
  6. Appendix — Retrieval details (source URL, retrieval time, traceable)

See the full template at templates/report-skeleton.md. All six sections must be complete, each section must have at least one substantive paragraph, and placeholders like "see XX for details" must not be used.

Data Source Dependencies

Qichacha MCP (E-path ⓪ iron rule)

All enterprise-related calls must first go through get_company_by_query for entity recognition; downstream business tools must not be called directly on abbreviations/stock short names/brand names.

Scenario Tool
Keyword → Candidate entity list qcc-company.get_company_by_query
Entity → Business registration profile qcc-company.get_company_registration_info
Entity → First-tier shareholders + registered capital verification qcc-company.get_shareholder_info
Entity → Risk scan (scan first, then drill down) qcc-risk.get_company_risk_scan
Entity → Administrative penalties / court judgments / dishonesty records qcc-risk.* corresponding atomic tools
Entity → Business dynamics (bidding / qualifications) qcc-operation.*
Entity → Industry classification the "National Standard Industry" field in the business registration information

Web Search

Sections 2-3 of the report skeleton (industry chain / policy / industrial parks) are supplemented by web search.Source priority is hardcoded in references/source-priority.md, from high to low:

  1. Industry analysis and risk disclosures in IPO prospectuses of listed companies / public transfer memoranda of NEEQ-listed companies / legal opinions
  2. Official media industry reports (Xinhua News Agency / People's Daily / Economic Daily / Caixin / Yicai)
  3. White papers / annual reports published by industry associations
  4. Special feature reports by mainstream financial media
  5. General web pages (last resort, must be annotated at the citation)

Any key conclusion must be cross-verified by at least two independent sources; when no second source can be found, add a [single source] tag in the original text.

Industry-specific sources (important · built-in × user-injectable)

Different industries have specific high-quality sources(for example, low-altitude economy requires the Civil Aviation Administration/MIIT, embodied intelligence requires the Ministry of Science and Technology/prospectuses, semiconductors require SEMI/IC Insights); general web search cannot capture these niche sources. This skill prioritizes them through the "industry × source mapping" mechanism:

  • Built-in default list:references/industry_sources.yaml, with 18 industries frequently served by lawyerspreconfigured, divided into two categories:
    • Hard tech (7): semiconductors / low-altitude economy / embodied intelligence / new energy vehicles / biomedicine / data elements / AI large models
    • Civil and commercial services (11): real estate / construction engineering / catering and food / elderly care / education and training / culture and tourism / cross-border e-commerce / livestream e-commerce / logistics / agriculture / fintech / IP services (12 civil and commercial in total, plus 7 hard tech, 19 in total)
    • General fallback (1): all unmatched industries use the general P1 primary texts (prospectuses + ministry documents)
  • User local override:config/industry_sources.local.yaml(gitignore), users can add niche industries (such as "reducers" or "Suzhou Nano Institute ecosystem") or override built-in entries
  • SOP intervention timing: Before AI runs the first round of retrieval, if the industry does not match the built-in list / matches but the list is incomplete,it must first ask the user:

    "Does the XX industry have any preferred sources (government official websites / industry associations / official accounts / leading enterprises)? If so, please list the domains or names; otherwise I will run with the built-in list."

  • Match rules: the industry keyword is case-insensitive, and a match occurs when it appears in any keyword of the industry field of the list; multiple matches are merged and deduplicated
  • Fallback: user did not provide / refused to provide → use the built-in general fallback + P1 first-hand texts (prospectus + ministry documents)

See references/industry_sources.yaml and config/industry_sources.local.example.yaml。

SOP (main process thread)

  1. Parse parameters — confirm industry / region / focus / depth, fill empty values with defaults
  2. Read personalized configuration — load config/report-profile.md, confirm law firm header / cover variant / footer branding
  3. Load industry-specific sources — merge references/industry_sources.yaml(built-in) + config/industry_sources.local.yaml(user local)
  4. Ask about industry-specific sources (if needed) — when the industry does not match the built-in list / matches but the list is incomplete, ask the user first; if the user provides them, record them in this session, and if nothing is provided, use the general fallback
  5. First round of retrieval (industry overview) — web search for industry + "industry chain / industry research / industry risk", filter by source priority; prioritize the industry-specific sources loaded in step 3
  6. Second round of retrieval (regional focus) — when region is provided, narrow to that region's "policies + parks + directories"
  7. Enterprise retrieval (Qichacha) — first do a keyword search using the industry terms to lock down the candidate entity list (when there may be multiple candidates, the complete list must be displayed, and no automatic selection may be made)
  8. Profile enrichment — for each representative enterprise filtered out, check business registration information + risk scan one by one, and write the filtered representative tags into paragraph 4
  9. Aggregate and generate markdown — fill in according to the six-section format of templates/report-skeleton.md, and annotate key conclusions with source tiers
  10. Render HTML —— scripts/render.py + selected cover variant + jinja2 template, producing A4 HTML
  11. Render PDF —— scripts/pdf.py (Playwright + Chrome headless) to produce a finely typeset A4 PDF
  12. Save to disk + write metadata — archive the three items md / pdf / meta.json

Quality discipline (written into the rules section of SKILL.md)

  • Source tiering: each key conclusion is annotated with its source tier (first-hand text / authoritative database / media / general web page)
  • Cross-validation: key industry data must have at least two independent sources, otherwise mark [single source]
  • Timeliness determination: policy documents must be annotated with publication / effective dates at the point of citation; expired policies are proactively flagged
  • No speculation: risk items not included in Qichacha are written as "no public information found", and are not fabricated
  • Do not copy real project information: report examples must always use XX 行业 / XX 地区 / XX 客户, and real client names / application numbers / internal case numbers are strictly prohibited
  • Complete appendix: Every source must be clickable and traceable; none may be missing

Rendering pipeline (the technical path for producing PDF)

The manuscript base is md, butthe final deliverable is a finely typeset A4 PDF. Rendering in three stages:

report-skeleton.md (填充后的 md)
  → scripts/render.py            # md → A4 HTML(jinja2 模板 + CSS 变量配色)
  → references/report-template.html + references/covers/cover-{C/D/E/F}.html
  → scripts/pdf.py               # HTML → PDF(Playwright + Chrome headless)
                                  # 封面/后部全幅 + 正文页眉页脚 + 分部分渲染 pymupdf 合并

Design style (bluebook format)

  • Primary color:#1B3C59 Deep blue (classic bluebook color scheme)
  • Accent color:#D4AF37 Gold (title underline, emphasis left border, decorative line)
  • Page background color:#FFFFFF Pure white
  • Secondary background:#F4F1EA Cream (occasionally used for cards, blockquotes)
  • Text color:#1A1A1A Primary text,#666666 light text,#2C3E50 body text
  • Font:Noto Serif SC / Source Han Serif SC / Songti SC / SimSun / 宋体 Serif Chinese
  • Structure:
    • Cover: deep blue full screen + large serif title + gold horizontal divider + author block
    • Table of contents page:目录 · 报告编号 Top label + two-column table of contents (chapter + start page)
    • Chapter page: top "CHAPTER XX · number" small label + large serif chapter title + gold horizontal divider
    • h3 subsection: gold left border + 11px left padding
    • Table: gold header row + alternating row background
    • Header: left "series name + chapter name", right "report number"
    • Footer: left "law firm name · series name", right "report name · page number/total pages"
  • Design intensity:lite Text version (0-1 lightweight component per page, prioritize tables/blockquotes/two-column cards)

See the complete design specification in references/design-spec.md, color changes go through report-profile.md, without changing the template.

Cover variants (choose 1 of 4)

Variant Style Applicable scenario
C-geo Geometric top Top geometric circular decoration + law firm name band Default, serious and formal
D-diagonal Diagonal Diagonal slash + large title darkened More modern, data-oriented
E-flip Mirrored Left-right mirror symmetry Strong design sense, light
F-grid Grid Top grid + multi-color blocks High information density, report type

The four cover HTMLs are in references/covers/, injected by scripts/render.py according to report-profile.md 's cover_style selection; the specific colors of the cover are determined by the current palette (inject --primary / --accent)。

Dependencies (confirm before running):

  • Python 3.10+:playwright + pymupdf + jinja2 + markdown + beautifulsoup4 + pyyaml
  • System Chrome (macOS:/Applications/Google Chrome.app)
  • (optional, when there are mermaid diagrams)@mermaid-js/mermaid-cli global command mmdc

Configuration (aside from personalization)

  • config/source-blacklist.txt —— untrusted source blacklist, one domain per line, discarded if a search result matches (empty by default)

Acceptance criteria (three-way comparison method)

Fixed demo scenario:industry=零部件制造, region=XX 区域, focus=投融资

  • With skill: run this skill, produce a report + appendix search details + first paragraph of disclaimer + profile entry of a leading listed component company
  • Without skill: bare LLM with the same prompt, compare outputs
  • Compare the differences: Skeleton six-section completeness, source annotation completeness, Qichacha company profile entry count (≥5 companies), PDF rendering fidelity (cover variant applied + accurate color scheme + complete headers and footers)

Red lines:

  • Appendix retrieval details must be clickable and searchable
  • Disclaimer must be on page 1 of the PDF (must not be moved to the end)
  • One-click PDF output, no manual typesetting
  • Cover variant must be applied according to report-profile.md's cover_style application, must not be ignored on one's own

What v1 does not do (minimum viable boundary)

  • No scheduled tasks (that is weekly-legal-briefing's job)
  • No client version / internal version dual-version toggle (v2 iteration)
  • No connection to Huayu Yuandian (industry research is not legal provision retrieval, revisit the "industry-related regulatory updates" module in v2)
  • No PDF layout refinement (v1 with 4 cover variants + one body template is enough)

v2 iteration directions

  • Template parameterization: switching industries only changes parameters, not templates (template and logic separation)
  • Orchestration with legal-proposal-generator: this report serves as the "industry background" upstream chapter of the service proposal
  • Output "client version / internal version" dual-version toggle

Troubleshooting

Symptom Diagnosis
playwright 未安装 pip install playwright && python -m playwright install chromium
[warn] mmdc 未安装 mermaid diagram degrades to a code block, does not affect the main PDF flow; if an SVG diagram is needed:npm i -g @mermaid-js/mermaid-cli
Chrome not found Install Google Chrome on macOS; on Linux:apt install google-chrome-stable
Qichacha candidate list has multiple matches The candidate list must befully shown to the user,must not automatically select the first-ranked candidate(E4 iron rule)
No second independent source can be found for the source Add [单一信源] at the citation location, must not be hidden
Cover variant not applied Confirm config/report-profile.md 's cover_style field, valid values:C-geo / D-diagonal / E-flip / F-grid
Color palette not applied Confirm color_palette field, valid values:bluebook / service-plan / burgundy / forest / tech
Report is still dark blue Check color_palette field to see whether a value other than bluebook is filled in; the HTML file should contain the corresponding primary color hex (e.g. #722F37)
On first launch, don't know what to fill in Refer to the 7-question checklist in the "First Launch Wizard" section of SKILL.md; the Agent uses the harness's built-in questioning mechanism (e.g. AskUserQuestion) to ask item by item

Referenced resources

  • Templates:templates/report-skeleton.md
  • Design:references/report-template.html / references/design-spec.md / references/palette-presets.md(5 color palette comparison) / references/covers/cover-{C,D,E,F}.html
  • Scripts:scripts/render.py / scripts/pdf.py
  • Configuration:config/report-profile.example.md / config/report-profile.md(gitignore) / config/source-blacklist.txt / config/industry_sources.local.example.yaml
  • Data discipline:references/data-discipline.md(Qichacha E-path iron rule + web search source priority) / references/source-priority.md
  • Source mapping:references/industry_sources.yaml(20 built-in industries + user local overrides)
  • Archive:archive/(historical reports + metadata JSONL)