SuperAPI AI Directory

legal-industry-report

Writing & research

View repository

Updated 10-15 20:10

About this skill

Industry Report

Product Positioning and Routing

Generate a formal industry legal report that can be read by unspecified potential clients. The typical frequency is monthly or quarterly, and the goal is to build a professional brand, support public distribution, and form a business entry point; it is not an internal memo, nor is it legal advice for a specific client.

Dimension legal-industry-report legal-client-brief
Stage of Use Monthly/Quarterly Comprehensive Research Daily/Weekly Incremental Tracking
Core Relationship Facing the market and potential clients Maintaining existing client relationships
Information Scope Industry panorama, structure, and trends Changes occurring around the cutoff date
Visual Tone Formal, institutional, suitable for long-term retention Compact, easy to scan, suitable for social channels
Delivery Status PUBLIC_REVIEW DRAFT
Publishing Action Published separately after lawyer review Published separately after lawyer review

When the user wants to post to WeChat Moments, make daily updates to an official account, or track only the most recent period, switch to legal-client-brief. When the user wants to form a complete industry work on a monthly/quarterly basis, use this skill.

Input and Gap Handling

Input Required Default Purpose
industry Yes None Industry name and scope
region No Nationwide Policies, industry clusters, and enterprise scope
period No Quarterly Monthly or quarterly reporting cycle
focus No Panorama Labor, intellectual property, investment and financing, data, cross-border, etc.
as_of No Execution date Fact and validity cutoff point
preferred_sources No Rule package Competent authorities, associations, databases, or materials specified by the user
  • Missing industry: stop and ask only about this item.
  • If the industry name has multiple statistical scopes: list the candidate scopes and their impact; do not choose the first one on your own.
  • If region or focus is missing: use the default value and state it in "Research Boundaries and Methods."
  • If no industry rule is matched: use general rules and mark needs_custom_pack: true; first supplement industry questions and sources; do not pass it off as precise industry research.
  • If an external database is unavailable: switch to official public channels or write "not collected/pending verification"; do not add speculative values.

Permissions and Security Boundaries

This skill searches public materials online, reads this skill's templates and configuration explicitly provided by the user, and writes Markdown, HTML, PDF, and metadata to a user-specified directory. Before querying, apply minimal necessary redaction to client, case, and internal operational information.

This skill does not automatically send, upload, publish, install dependencies, expand access permissions or read users' global .env. Public reports avoid the appearance of real client names, undisclosed business data and unnecessary personal identity information.

Initial configuration

  1. Copy config/report-profile.example.md as config/report-profile.md, and fill in the brand, number, lead lawyer and visual theme.
  2. To add sub-industries, copy config/industry-rules.local.example.yaml as config/industry-rules.local.yaml。
  3. To exclude domains, copy config/source-blacklist.example.txt as config/source-blacklist.local.txt。

The real configuration is excluded by the root directory .gitignore . Before the formal PDF, report-profile.mdmust be completed; previews may use a de-specified configuration.

Research and generation process

  1. Fix the research boundaries: determine industry / region / period / focus / as_of, and state the scope not covered.

  2. Parse industry rules:

    python3 scripts/resolve_industry_rules.py \
      --industry "<行业>" \
      --mode report \
      --output <研究计划.json>
    

    If local supplements exist, add --overlay config/industry-rules.local.yaml. Read the research questions, required dimensions, indicators, risk perspectives, source roles and timeliness rules in the output.

  3. Build an evidence ledger: for each key conclusion, record "source fact / model synthesis / lawyer judgment / items to be verified", and retain the title, publisher, date, URL, retrieval time and statistical scope.

  4. Comprehensive collection: cover the macroeconomy and scale, industry chain, competitive landscape, regional clusters, policies and regulation, representative enterprises, dispute risks and legal service opportunities. The rule package is a minimum checklist, not a conclusion template.

  5. Handle conflicts: when source scopes are inconsistent, disclose them side by side; do not average them or splice them into a false certain value.

  6. Draft the report: use templates/report-skeleton.md. The formal report focuses on explanation and evidence, and is not written as a stack of news summaries.

  7. Run the gate:

    python3 scripts/validate_report.py --kind report --input <行业报告.md>
    
  8. Build the deliverables:

    python3 scripts/build_report.py \
      --kind report \
      --input <行业报告.md> \
      --profile config/report-profile.md
    
  9. Final review: render all pages of the PDF as images, and check the cover, chapter rhythm, Chinese fonts, tables, page numbers, cropping and blank pages; the lawyer then reviews the facts, validity, legal judgment and public expression.

Source and judgment discipline

  • According to references/industry-rules.yaml , choose "which primary sources should be consulted for which questions", and according to references/source-priority.md , judge the strength of the evidence.
  • Official original texts may independently prove their published content; judgments on industry scale, share, trends and impact require two independent sources in principle.
  • When there is only one source, mark [单一信源]immediately next to the conclusion, and state what can and cannot be proven.
  • For each policy, write the issuing authority, issue date, effective date and status; when validity cannot be confirmed, mark "to be verified".
  • For each key data point, write the statistical period, indicator definition, regional scope and source. Reprinting the same article does not count as an independent source.
  • Listed company disclosures can only prove the disclosing entity and the matters stated in the documents; they must not be automatically extrapolated as industry-wide facts.
  • An enterprise database returning no result does not mean it does not exist; use "no record found in the public sources searched" and list the search scope.

Output contract

By default, generate to the directory where the Markdown is located or output_dir:

  • 行业报告_<industry>_<region>_<period>_<YYYYMMDD>.md: authoritative source draft.
  • Same-name .html: inspectable rendering middleware.
  • Same-name .pdf: A4 formal review version.
  • Same-name .meta.json:PUBLIC_REVIEW Status, generation time, file hash, source URL, and configuration hash.

The report must include: executive summary, research boundaries and methodology, industry structure and market, competitive landscape and representative companies, policy regulation and regions, legal risks and disputes, service opportunities and action recommendations, appendix and sources.

Hard Fail

If any of the following occurs, delivery must not proceed:

  • Residual placeholders,[P?] or standalone ...。
  • The disclaimer is missing or appears later than the executive summary.
  • Key facts have no clickable source, or a single source is not disclosed.
  • Industry rules are not matched but the generic fallback is not disclosed.
  • There are multiple candidates for entity identification but the first item is selected automatically.
  • General industry information is written as specific client legal advice.
  • The PDF is empty, contains non-A4 pages, has obvious cropping/overlap/garbled text, abnormal blank pages, or has not undergone final visual review.

The automated gate only proves structure, sources, and file properties, not that legal judgments are correct; until a lawyer completes semantic review, keep NOT_VERIFIED。

Dependencies

System dependencies

Dependencies Installation method
Python 3.10+ macOS: brew install pythonLinux: sudo apt-get install python3
Chromium python3 -m playwright install chromium
Mermaid CLI (optional) npm install -g @mermaid-js/mermaid-cli; when missing, degrade to a code block

Python packages

Install Markdown, PyYAML, BeautifulSoup, Jinja2, Playwright, and PyMuPDF together:

python3 -m pip install -r scripts/requirements.txt

When dependencies are missing, the script provides installation prompts and will not install automatically.

Read on demand

  • Industry rules and sources:references/industry-rules.yaml、references/source-priority.md
  • Company and privacy discipline:references/data-discipline.md
  • Report structure:templates/report-skeleton.md
  • Visual specifications:references/design-spec.md、references/palette-presets.md
  • Troubleshooting: run in sequence validate_industry_rules.py、industry_rules_selftest.py、validate_report_selftest.py