SuperAPIAI Directory

bid-writer-pro

Office & productivity

View repository

Updated 11-25 16:23

About this skill

Bid Document Intelligent Generation Expert v2.2 - General Industry Edition

Automated generation tool for technical bid documents. Send the tender document → automatically convert to Markdown → generate a Word bid document that conforms to industry-standard formats.

Feature Overview

Core Capabilities

  1. Tender Document Parsing - Supports PDF/DOCX/DOC/TXT/XLSX formats
  2. Document-to-Markdown Conversion - Automatically converts PDF/Word to Markdown format for easy AI reading and processing
  3. Automatic Industry Detection - Automatically identifies the industry to which the tender document belongs and generates bidding documents that conform to industry characteristics
  4. Scoring Criteria Extraction - Automatically identifies scoring items, scores, and weights
  5. Key Requirements Identification - Extracts qualification, technical, and commercial requirements
  6. Bid Document Name Extraction - Automatically extracts the project name from the tender document and content
  7. Bid Document Outline Generation - Generates a 4-level heading outline based on the scoring criteria
  8. Bid Document Content Generation - Concurrently writes content by chapter
  9. Word Count Check - Formula-based word count check to ensure compliance
  10. AI Trace Removal Processing - Removes AI-generated traces to make the content more natural
  11. Placeholder Generation - Marks locations where images/tables/qualifications need to be inserted
  12. Word Document Generation - Outputs .docx files that conform to industry-standard formats

Supported Industries

  • IT/Informatization: Information technology, software development, system integration, data centers, etc.
  • Construction Engineering: Building construction, general engineering contracting, decoration and renovation, municipal engineering, etc.
  • Healthcare: Medical equipment, medical services, health management, pharmaceuticals, etc.
  • Education Services: Education informatization, teaching equipment, training services, campus construction, etc.
  • Manufacturing: Equipment manufacturing, industrial automation, intelligent manufacturing, supply chains, etc.
  • Logistics and Transportation: Logistics services, transportation services, warehousing services, supply chain management, etc.
  • Consulting Services: Management consulting, technical consulting, audit services, legal services, etc.
  • General Industry: A general template applicable to industries not specified

Advantages of Markdown Conversion

  • Structure Preservation: Automatically identifies heading levels (first-level, second-level headings, etc.)
  • Table Conversion: Converts Word/PDF tables into Markdown table format
  • Easy for AI Reading: Markdown format is more suitable for AI understanding and processing
  • Debug-Friendly: Converted files are saved in debug/bid_document.mdfor easy viewing

Output Features

  • File Naming: Automatically extract the project name from the tender document, in the format {项目名称}技术标.docx
  • Placeholder specifications: Mark non-text content with placeholders in a unified format
  • Format standards: Comply with the standard formats of the government/enterprise bid document industry
  • Industry adaptation: Automatically generate professional content based on the detected industry

Environment setup

Dependencies

pip install python-docx pdfplumber openpyxl PyPDF2 jieba pandas pywin32

Font requirements

  • SimSun - Default font for body text
  • SimHei - Font for headings
  • FangSong_GB2312 - Font for body text in government bid documents

Copy the font files to the system font directory:

  • Windows: C:\Windows\Fonts\
  • Mac: ~/Library/Fonts/

Quick start

Basic usage

# 1. 发送招标文件(PDF/DOCX)给AI
# 2. AI自动解析并生成大纲
# 3. 确认大纲后AI并发编写各章节
# 4. 字数检查 + AI去痕处理
# 5. 生成占位符标记
# 6. 转换生成Word文档

Command-line usage (CLI)

# 完整流程
python scripts/bid_writer_pipeline.py "招标文件.pdf" --output-dir ./output

# 带企业资质信息
python scripts/bid_writer_pipeline.py "招标文件.docx" \
  --company-profile "企业资质.json" \
  --output-dir ./标书输出

# 指定格式标准
python scripts/bid_writer_pipeline.py "招标文件.pdf" \
  --format-standard government \
  --output-dir ./output

Using in an AI IDE

# 直接导入使用
import sys
sys.path.insert(0, '/path/to/bid-writer-pro/scripts')

from bid_writer_pipeline import BidWriterPipeline

pipeline = BidWriterPipeline(
    bid_file="招标文件.pdf",
    output_dir="./output",
    format_standard="government"
)
result = pipeline.run()

Environment check and installation

# 检查环境是否满足要求
python scripts/check_environment.py

# 安装依赖库
python install.py
# 或直接使用pip
pip install -r requirements.txt

Execution flow

通读模板知识 → 发送招标文件 → 转换Markdown → 解析评分标准 → 提取标书名称 → 生成大纲 → 
确认大纲 → 并发编写章节 → 字数检查 → AI去痕 → 
占位符生成 → 转换Word → 格式规范化 → 输出标书.docx

⚠️ Important: You must determine the industry type before starting to write the bid document

Before starting to write the bid document, you must first determine the industry type to which the tender document belongs. This is a key step for generating a high-quality bid document!

🔍 Industry determination process (must be executed)

第1步:读取招标文件内容
    ↓
第2步:AI分析招标文件,判断所属行业
    ↓
第3步:检查templates文件夹中是否存在该行业的指南文件
    ↓
┌─ 如果存在:industry_{行业名称}.md
│   └─ 按照行业指南执行,生成符合行业特点的标书
│
└─ 如果不存在:
    └─ AI进行互联网检索,收集该行业的:
       - 行业特点和规范
       - 投标文件结构要求
       - 关键内容要点
       - 评分标准关注点
       ↓
    └─ 自动生成 industry_{行业名称}.md 文件
       ↓
    └─ 保存到 templates 文件夹
       ↓
    └─ 告知用户:已创建新的行业指南,SKILL已完善

📋 List of supported industries (guides available)

Industry code Industry name Guide file
it_information IT/Informatization 00_Bid Document Preparation Guide.md
construction Construction engineering industry_Construction Engineering.md
medical Healthcare industry_Healthcare.md
education Education services industry_Education Services.md
manufacturing Manufacturing industry_Manufacturing.md
logistics Logistics and transportation industry_Logistics and Transportation.md
consulting Consulting services industry_Consulting Services.md
general General industry 00_Bid Document Preparation Guide.md

🎯 Industry determination keywords

IT/Informatization: informatization, software, system integration, data center, cloud computing, big data, artificial intelligence, digitalization Construction engineering: construction, building, engineering, renovation, municipal, roads, bridges, tunnels Healthcare: medical, health, hospital, equipment, pharmaceuticals, diagnosis, treatment, rehabilitation Education services: education, school, teaching, training, campus, courses, laboratory, library Manufacturing: manufacturing, equipment, automation, smart manufacturing, industrial, production line, supply chain, quality Logistics and transportation: logistics, transportation, warehousing, distribution, supply chain, express delivery, freight, cold chain Consulting services: consulting, management, auditing, legal, evaluation, planning, research, planning

💡 Industry determination examples

Example 1: The tender document contains "smart transportation", "system integration", "software development" → Determined as: IT/Informatization → Guide to use: 00_标书制作指南.md

Example 2: The tender document contains "hospital", "medical equipment", "diagnosis" → Determined as: Healthcare → Guide to use: industry_医疗健康.md

Example 3: The tender document contains "Construction Engineering", "Construction", "Renovation" → Determined as: Construction Engineering → Guide to use: industry_Construction Engineering.md

⚠️ Important: You must read through the template knowledge before starting to write the bid document

After determining the industry type, you must read through the relevant industry guides in the templates folder, including:

  1. 00_标书制作指南.md - General guide for bid document preparation
  2. industry_{行业名称}.md - Bidding guide for the specific industry (if available)
  3. bid_doc_*.md - Bid document knowledge documents converted from DOC/DOCX
  4. bid_knowledge_*.md - Bidding and tendering knowledge documents converted from PDF

Purpose of reading through:

  • Understand the characteristics and requirements of bid documents in that industry
  • Master industry-specific writing points and standards
  • Understand common industry scoring criteria and focus areas
  • Learn from excellent industry bid document templates

Detailed process description

0. Industry determination and guide check (must be performed first!)

  • Must be performed first
  • Read the content of the tender document and determine the industry
  • Check whether a guide file for that industry exists in the templates folder
  • If it exists: follow the industry guide
  • If it does not exist: the AI performs an internet search and creates a new industry guide
  • Read through the relevant industry guides to lay the foundation for subsequently generating a high-quality bid document

1. Tender document parsing and Markdown conversion

  • Supported formats: PDF, DOCX, DOC, TXT, XLSX
  • Automatically converted to Markdown formatfor easy reading and processing by AI
  • Preserve heading hierarchy and table formats
  • Automatically detect scanned PDFs and prompt
  • Markdown files are saved in debug/bid_document.md

2. Scoring criteria extraction

  • Identify the scoring method section
  • Extract major scoring categories (technical, commercial, price)
  • Extract scoring rules and score weights

3. Bid document name extraction

  • Extract the project name from the file name
  • Extract the project name from the content
  • Format:{项目名称}技术标.docx

4. Outline generation

  • Generate a 4-level heading outline based on the scoring criteria
  • Each scoring item corresponds to one chapter
  • Word count is allocated in proportion to the score

5. Content generation

  • Write chapters concurrently
  • Write strictly according to the scoring criteria
  • Each subsection ≥ 3 independent paragraphs
  • Each chapter is accompanied by a table

6. Word count check

  • Formula: Target word count = Score value × (Total pages ÷ Total score) × 780
  • Acceptable range: Target × 0.75 ~ 1.25
  • If it does not meet the standard, it is sent back for rewriting

7. AI trace removal processing

  • Remove traces of AI generation
  • Make the content more natural and more like human writing
  • Preserve the integrity of core information

8. Placeholder generation

  • Mark the position where an image needs to be inserted
  • Mark the position where a table needs to be inserted
  • Mark the position where qualification materials need to be inserted

9. Word Document Generation

  • Markdown to Word
  • Apply industry-standard formatting
  • Generate cover and table of contents

Task Decision Tree

Before starting execution, first choose a path based on user needs:

用户需求是什么?
│
├─ 【完整生成标书】有招标文件,想生成完整标书
│  └─ 运行完整流程:scripts/bid_writer_pipeline.py "招标文件.pdf" --output-dir ./output
│     └─ 自动执行14个步骤:通读模板 → 解析文件 → 提取评分 → 生成大纲 → 生成内容 → 字数检查 → AI去痕 → 生成Word
│
├─ 【仅解析招标文件】只想提取招标文件中的信息
│  └─ 运行 scripts/parse_bid_file.py "招标文件.pdf"
│     └─ 输出:文本内容、评分标准、关键要求
│
├─ 【转换文档格式】想把PDF/DOCX转换为Markdown
│  ├─ 转换单个文件:运行 scripts/convert_to_md.py "文件.pdf" --output "输出.md"
│  ├─ 批量转换PDF:运行 scripts/convert_pdf_to_md.py --source "PDF文件夹" --output "输出文件夹"
│  └─ 批量转换DOC/DOCX:运行 scripts/convert_doc_to_md.py --source "DOC文件夹" --output "输出文件夹"
│
├─ 【仅提取评分标准】只想分析招标文件的评分标准
│  └─ 运行 scripts/extract_scoring.py "招标文件内容.txt"
│     └─ 输出:scoring_criteria.json(评分大类、分值、权重)
│
├─ 【仅提取关键要求】只想提取资质、技术、商务要求
│  └─ 运行 scripts/extract_requirements.py "招标文件内容.txt"
│     └─ 输出:key_requirements.json(资质要求、技术要求、商务要求)
│
├─ 【仅生成大纲】已有评分标准,想生成标书大纲
│  └─ 运行 scripts/generate_outline.py --scoring "scoring_criteria.json"
│     └─ 输出:outline.json(4级标题大纲、字数分配)
│
├─ 【仅生成内容】已有大纲,想生成标书内容
│  └─ 运行 scripts/generate_content.py --outline "outline.json" --scoring "scoring_criteria.json"
│     └─ 输出:各章节Markdown文件
│
├─ 【检查字数】已有内容,想检查字数是否达标
│  └─ 运行 scripts/check_word_count.py --chapters "chapters文件夹" --scoring "scoring_criteria.json"
│     └─ 输出:字数检查报告(目标字数、实际字数、是否达标)
│
├─ 【AI去痕处理】已有内容,想去除AI生成痕迹
│  └─ 运行 scripts/humanizer.py --input "内容.md" --output "处理后.md"
│     └─ 输出:去痕后的自然语言内容
│
├─ 【生成占位符】已有内容,想标记图片/表格/资质位置
│  └─ 运行 scripts/generate_placeholder.py --chapters "chapters文件夹" --requirements "key_requirements.json"
│     └─ 输出:带占位符标记的内容
│
├─ 【Markdown转Word】已有Markdown内容,想生成Word文档
│  └─ 运行 scripts/convert_to_docx.py --input "内容.md" --output "标书.docx" --standard government
│     └─ 输出:符合行业标准格式的Word文档
│
├─ 【格式规范化】已有Word文档,想统一格式
│  └─ 运行 scripts/format_docx.py --input "标书.docx" --standard government
│     └─ 输出:格式规范化的Word文档
│
├─ 【生成封面】想为标书生成封面页
│  └─ 运行 scripts/generate_cover.py --name "项目名称" --requirements "key_requirements.json"
│     └─ 输出:封面页Markdown
│
├─ 【生成目录】想为标书生成目录页
│  └─ 运行 scripts/generate_toc.py --chapters "chapters文件夹"
│     └─ 输出:目录页Markdown
│
├─ 【检查环境】想检查运行环境是否满足要求
│  └─ 运行 scripts/check_environment.py
│     └─ 输出:环境检查报告(Python版本、依赖库、脚本文件、模板知识)
│
├─ 【构建模板知识库】想从标书范本中提取知识
│  ├─ 从DOC/DOCX提取:运行 scripts/extract_templates.py --source "范本文件夹" --output "templates文件夹"
│  └─ 从PDF提取:运行 scripts/convert_pdf_to_md.py --source "PDF文件夹" --output "templates文件夹"
│
├─ 【查看中间结果】想查看已生成的中间文件
│  ├─ 查看评分标准:打开 output/scoring_criteria.json
│  ├─ 查看关键要求:打开 output/key_requirements.json
│  ├─ 查看大纲:打开 output/outline.json
│  ├─ 查看章节内容:打开 output/chapters/*.md
│  └─ 查看调试信息:打开 output/debug/ 文件夹
│
└─ 【需求不清楚或包含多步】不确定需要什么
   └─ 运行完整流程:scripts/bid_writer_pipeline.py "招标文件.pdf" --output-dir ./output
      └─ 自动执行所有步骤,生成完整标书

Decision Tree Usage Instructions

Scenario 1: Full bid document generation (most common)

# 用户有招标文件,想生成完整标书
python scripts/bid_writer_pipeline.py "XX市智慧交通项目招标文件.pdf" --output-dir ./output

Automatic execution: Read through the template → Parse files → Extract scoring → Extract requirements → Extract names → Generate outline → Generate content → Word count check → AI trace removal → Placeholders → Cover → Table of contents → Generate Word → Format normalization

Scenario 2: Step-by-step execution (intermediate adjustments needed)

# 步骤1:解析招标文件
python scripts/parse_bid_file.py "招标文件.pdf" --output "bid_content.txt"

# 步骤2:提取评分标准
python scripts/extract_scoring.py --input "bid_content.txt" --output "scoring_criteria.json"

# 步骤3:提取关键要求
python scripts/extract_requirements.py --input "bid_content.txt" --output "key_requirements.json"

# 步骤4:生成大纲(可人工审核调整)
python scripts/generate_outline.py --scoring "scoring_criteria.json" --requirements "key_requirements.json" --output "outline.json"

# 步骤5:生成内容
python scripts/generate_content.py --outline "outline.json" --scoring "scoring_criteria.json" --output-dir "./chapters"

# 步骤6:字数检查
python scripts/check_word_count.py --chapters "./chapters" --scoring "scoring_criteria.json"

# 步骤7:AI去痕
python scripts/humanizer.py --input-dir "./chapters" --output-dir "./chapters_humanized"

# 步骤8:生成Word
python scripts/convert_to_docx.py --input-dir "./chapters_humanized" --output "标书.docx" --standard government

Scenario 3: Document format conversion only

# 将PDF转换为Markdown
python scripts/convert_to_md.py "招标文件.pdf" --output "招标文件.md"

# 批量转换PDF文件夹
python scripts/convert_pdf_to_md.py --source "./pdf_files" --output "./markdown_files"

# 批量转换DOC/DOCX文件夹
python scripts/convert_doc_to_md.py --source "./doc_files" --output "./markdown_files"

Scenario 4: Format normalization

# 已有Word文档,统一格式
python scripts/format_docx.py --input "标书.docx" --standard government --output "标书_规范化.docx"

Scenario 5: Check environment

# 检查运行环境是否满足要求
python scripts/check_environment.py

Notes

  1. First-time use: First run scripts/check_environment.py to check the environment
  2. Install dependencies: Run python install.py --auto or pip install -r requirements.txt
  3. Template knowledge: Before generating a bid document for the first time, ensure that the templates folder contains knowledge documents
  4. Format standards: Optional government(government standard),enterprise(enterprise standard),highway(highway standard)
  5. Intermediate files: All intermediate files are saved in the output/debug/ folder for easy debugging and review

Placeholder Specifications

Placeholder Types

1. Image placeholders

[图片占位符]
类型:技术架构图
描述:XX系统总体架构图
建议尺寸:宽15cm × 高10cm

2. Table placeholders

[表格占位符]
类型:项目业绩表
描述:近3年类似项目清单
建议列数:6列
建议内容:项目名称、合同金额、完成时间、项目规模、客户名称、验收情况

3. Qualification placeholders

[资质占位符]
类型:企业资质证书
描述:信息系统集成及服务一级资质证书
要求:有效期内的彩色扫描件

Common Placeholder Examples

Type Placeholder content Usage scenario
Image [Image placeholder] Type: Technical architecture diagram Technical solution chapter
Image [Image placeholder] Type: Network topology diagram Network design chapter
Image [Image placeholder] Type: Business process diagram Business process chapter
Table [Table placeholder] Type: Functional module list Functional design chapter
Table [Table placeholder] Type: Project schedule Project implementation chapter
Table [Table placeholder] Type: Personnel allocation table Project team chapter
Table [Table placeholder] Type: Project performance table Project experience chapter
Qualification [Qualification placeholder] Type: Business license Appendix chapter
Qualification [Qualification placeholder] Type: Level 1 Information System Integration Qualification Appendix chapter
Qualification [Qualification placeholder] Type: ISO9001 certification certificate Appendix chapter
Qualification [Qualification placeholder] Type: Project Manager PMP Certificate Attachment Section

Format Standards

Government Bid Standard (Default)

Element Format Requirements
Body Font FangSong_GB2312
Body Font Size Size 4 (14pt)
Line Spacing 28 pt
Page Margins Top and bottom 2.54cm, left and right 3.17cm
First Line Indent 2 characters
Level 1 Heading SimHei, Size 3 (16pt), Bold
Level 2 Heading SimHei, Size Small 3 (15pt), Bold
Level 3 Heading SimHei, Size 4 (14pt), Bold
Level 4 Heading FangSong_GB2312, Size 4 (14pt), Bold

Corporate Bid Standard

Element Format Requirements
Body Font SimSun
Body Font Size Size Small 4 (12pt)
Line Spacing 1.5x line spacing
Page Margins Top and bottom 2.54cm, left and right 2.54cm
First Line Indent 2 characters
Level 1 Heading SimHei, Size Small 2 (18pt), Bold
Level 2 Heading SimHei, Size 3 (16pt), Bold
Level 3 Heading SimHei, Size Small 3 (15pt), Bold

Highway/Waterway Engineering Standard

Element Format Requirements
Body Font SimSun
Body Font Size Size 3 (16pt)
Line Spacing 28 pt
Page Margins Top and bottom 2.5cm, left and right 2.5cm
First Line Indent 2 characters

Content Rules

Basic Requirements

  • Strictly follow the scoring criteria - Do not speak in generalities; elaborate in detail for each scoring item
  • Each subsection ≥ 3 independent paragraphs - Ensure the content is substantial
  • Each chapter includes a table - Use Markdown table format
  • Prohibit "our side/we" - Replace with "will/project team"
  • Prohibit amount/budget descriptions - Unless explicitly required by the tender document

Word Count Control

  • Formula: Target word count = Scoring value × (Total pages ÷ Total score) × 780
  • Acceptable range: Target × 0.75 ~ 1.25
  • Words per page: 28 lines × 28 characters = 780 characters

Chapter Structure

# 第一章 项目概述
## 1.1 项目背景
### 1.1.1 建设背景
### 1.1.2 现状分析
## 1.2 项目目标
## 1.3 项目范围

# 第二章 技术方案
## 2.1 总体架构
### 2.1.1 架构设计原则
### 2.1.2 系统架构设计
## 2.2 功能设计
### 2.2.1 功能模块划分
### 2.2.2 功能详细说明
## 2.3 数据设计
## 2.4 安全设计

# 第三章 项目实施
## 3.1 实施计划
## 3.2 人员配置
## 3.3 质量保证
## 3.4 风险控制

# 第四章 项目业绩
## 4.1 类似项目经验
## 4.2 客户评价

# 第五章 售后服务
## 5.1 服务体系
## 5.2 响应时间
## 5.3 培训计划

# 附件
## 附件1 企业资质
## 附件2 人员证书
## 附件3 项目业绩证明

Core Scripts

Script Function Input Output
bid_writer_pipeline.py Main Process Script Tender Document Bid Document.docx
parse_bid_file.py Tender Document Parsing PDF/DOCX/DOC/TXT/XLSX Text content
convert_to_md.py Document to Markdown PDF/DOCX/DOC/TXT Markdown file
extract_scoring.py Scoring criteria extraction Tender document text scoring_criteria.json
extract_requirements.py Key requirements extraction Tender document text key_requirements.json
extract_bid_name.py Bid document name extraction Tender document Bid document name.docx
generate_outline.py Outline generation Scoring criteria outline.json
generate_content.py Content generation Outline + scoring criteria Markdown content
check_word_count.py Word count check Markdown content Check results
humanizer.py AI trace removal processing Markdown content Processed content
convert_to_docx.py Markdown to Word Markdown file Word document
convert_pdf_to_md.py PDF to Markdown PDF folder Markdown file
convert_doc_to_md.py DOC/DOCX to Markdown DOC/DOCX folder Markdown file
format_docx.py Word format normalization Word document Formatted Word document
generate_placeholder.py Placeholder generation Content analysis Placeholder markers
generate_cover.py Cover page generation Project information Cover page
generate_toc.py Table of contents generation Document structure Table of contents page
check_environment.py Environment check tool None Check report
extract_templates.py Template extraction tool DOC/DOCX folder Markdown file

File structure

bid-writer-pro/
├── SKILL.md                    # 说明文档
├── _meta.json                  # 元数据配置
├── requirements.txt            # 依赖库列表
├── install.py                  # 安装脚本
├── scripts/                    # 脚本目录
│   ├── __init__.py             # 包初始化
│   ├── bid_writer_pipeline.py  # 主流程脚本
│   ├── parse_bid_file.py       # 招标文件解析
│   ├── convert_to_md.py        # 文档转Markdown
│   ├── convert_pdf_to_md.py    # PDF转Markdown工具
│   ├── convert_doc_to_md.py    # DOC/DOCX转Markdown工具
│   ├── extract_scoring.py      # 评分标准提取
│   ├── extract_requirements.py # 关键要求提取
│   ├── extract_bid_name.py     # 标书名称提取
│   ├── generate_outline.py     # 大纲生成
│   ├── generate_content.py     # 内容生成
│   ├── check_word_count.py     # 字数检查
│   ├── humanizer.py            # AI去痕处理
│   ├── convert_to_docx.py      # Markdown转Word
│   ├── format_docx.py          # Word格式规范化
│   ├── generate_placeholder.py # 占位符生成
│   ├── generate_cover.py       # 封面生成
│   ├── generate_toc.py         # 目录生成
│   ├── check_environment.py    # 环境检查工具
│   └── extract_templates.py    # 模板提取工具
└── templates/                  # ⭐ 模板知识文件夹(必读)
    ├── 00_标书制作指南.md       # 标书制作完整指南
    ├── bid_doc_*.md            # 标书知识文档(15个)
    └── bid_knowledge_*.md      # 招投标知识文档(5个)

Output file structure

招标文件所在目录/
├── 招标文件.pdf                        # 原始招标文件
└── XX市智慧交通建设项目技术标.docx    # ⭐ 最终标书文件(与招标文件同目录)

output/                                 # 中间文件目录
└── {时间戳}_{招标文件名}/              # ⭐ 带时间戳的独立文件夹(避免混乱)
    │                                   # 示例:20260522_143025_XX项目招标/
    └── debug/                          # 所有中间文件保存在debug文件夹
        ├── template_knowledge.md       # 模板知识(通读内容)
        ├── bid_document.md             # 招标文件Markdown版本
        ├── raw_bid_content.txt         # 原始解析内容
        ├── industry_detection.json     # ⭐ 行业检测结果
        ├── scoring_criteria.json       # 评分标准
        ├── key_requirements.json       # 关键要求
        ├── outline.json                # 标书大纲
        ├── word_count_check.json       # 字数检查结果
        └── chapters/                   # 章节Markdown文件
            ├── 00_封面.md              # 封面
            ├── 00_目录.md              # 目录
            ├── 01_项目概述.md
            ├── 02_技术方案.md
            ├── 03_项目实施.md
            ├── 04_项目业绩.md
            └── 05_售后服务.md

Timestamp folder description

  • Format:{YYYYMMDD}_{HHMMSS}_{招标文件名}
  • Example:20260522_143025_XX市智慧交通项目招标
  • Purpose: A separate folder is generated for each run to avoid file confusion caused by multiple runs
  • Location: Automatically created under the user-specified --output-dir directory

Usage examples

Example 1: Basic usage

# 用户发送招标文件
python scripts/bid_writer_pipeline.py "XX市智慧交通项目招标文件.pdf"

# AI处理流程:
# 1. 解析招标文件... ✅
# 2. 提取评分标准... ✅ (技术60分,商务20分,报价20分)
# 3. 提取标书名称... ✅ (XX市智慧交通建设项目技术标.docx)
# 4. 生成大纲... ✅ (5章18节)
# 5. 确认大纲... ✅
# 6. 生成内容... ✅ (约25000字)
# 7. 字数检查... ✅
# 8. AI去痕... ✅
# 9. 生成占位符... ✅ (12个图片,8个表格,6个资质)
# 10. 生成Word... ✅

# 输出文件:XX市智慧交通建设项目技术标.docx

Example 2: With enterprise qualifications

python scripts/bid_writer_pipeline.py "招标文件.docx" \
  --company-profile "company_profile.json" \
  --format-standard government \
  --output-dir ./标书输出

Example 3: Specify format standards

# 使用政府标书标准
python scripts/bid_writer_pipeline.py "招标文件.pdf" --format-standard government

# 使用企业标书标准
python scripts/bid_writer_pipeline.py "招标文件.pdf" --format-standard enterprise

# 使用高速公路标准
python scripts/bid_writer_pipeline.py "招标文件.pdf" --format-standard highway

Placeholder handling guide

Post-generation processing steps

  1. View the placeholder list

    • Open the generated Word document
    • Search for [图片占位符]、[表格占位符]、[资质占位符]
  2. Prepare materials

    • Prepare the corresponding images, tables, and qualification documents according to the placeholder descriptions
    • Ensure images are clear, tables are complete, and qualifications are within the validity period
  3. Replace placeholders

    • Delete the placeholder text
    • Insert the corresponding images/tables/qualification scans
    • Adjust size and position
  4. Final check

    • Check whether all placeholders have been replaced
    • Check whether the formatting is consistent
    • Check whether the content is complete

Notes

File formats

  • Input: Supports PDF, DOCX, TXT, and XLSX formats
  • Output: Word document (.docx format)
  • Scanned PDF: OCR recognition is required first

Content quality

  • Manual review: It is recommended to manually review the generated content
  • Data accuracy: Technical parameters and project data need to be verified
  • Format consistency: Check whether heading levels, fonts, and font sizes are consistent

Placeholder handling

  • Replace promptly: Replace placeholders as soon as possible after generation
  • Material preparation: Prepare images, tables, and qualification documents in advance
  • Format adjustment: Adjust the format after replacement to keep it consistent

Version history

Version Date Update content
v2.2 2026-05-22 Fixed the output directory structure: clarified the timestamp folder description, and fixed the cover and table of contents save paths
v2.1 2026-05-22 Added the automatic industry guide creation feature: if the industry guide does not exist, AI automatically retrieves and creates it, gradually improving SKILL
v2.0 2026-05-22 Refactored into a general industry version: supports 8 industries, automatic industry detection, and industry-specific content generation
v1.9 2026-05-21 Optimized the content generation logic (more detailed and richer), saved intermediate files to the debug folder, and placed the final bid document in the same directory as the tender document
v1.8 2026-05-21 Fixed the PDF conversion encoding issue, and added the fix_encoding function to automatically detect and fix garbled text
v1.7 2026-05-21 Added a detailed task decision tree, including 18 scenarios and step-by-step execution guidelines
v1.6 2026-05-21 Fixed the encoding settings issues in all scripts to avoid I/O errors
v1.5 2026-05-21 Deleted README.md (to avoid interfering with Trea import), and streamlined the file structure
v1.4 2026-05-21 Cleaned up useless files (deleted the references folder,pycache), organized md documents, and updated the document structure
v1.3 2026-05-21 Added DOC/DOCX to Markdown conversion, expanded the templates knowledge base (including 45 knowledge documents on DOC/DOCX conversion), and fixed encoding issues
v1.2 2026-05-21 Added PDF to Markdown conversion, expanded the templates knowledge base (including bidding knowledge documents), and updated the template knowledge reading logic
v1.1 2026-05-21 Added Markdown conversion, .doc support, encoding compatibility improvements, and an environment check tool
v1.0 2026-05-21 Initial version, integrating the bid document generation feature

Technical support

FAQ

Q: What should I do if a scanned PDF cannot be parsed? A: Use an OCR tool (such as ABBYY FineReader or Adobe Acrobat) to perform text recognition first, and then submit it again.

Q: What should I do if the generated bid document does not meet the word count requirement? A: The system automatically checks the word count. If it does not meet the requirement, it will indicate the content sections that need to be supplemented.

Q: How do I modify the format standard? A: You can use the --format-standard parameter to select a different format standard, or modify the scripts/format_docx.py in FORMAT_STANDARDS configuration to customize the format.

Q: How do I replace placeholders in batches? A: Use Word's find and replace feature (Ctrl+H), and search for the placeholder type to locate them in batches.


Related documents

  • templates/00_标书制作指南.md - Complete guide to bid document preparation
  • templates/bid_doc_*.md - Bid document knowledge documents
  • templates/bid_knowledge_*.md - Bidding knowledge documents
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools