platform-assistant/scripts/AGENTS.md
Sisyphus afac18e843 feat(F002): W26 + W29.x + W30 + W31 平台助手全部改动首次 commit
- W26: NestJS API + Next.js Web + Prisma + SQLite scaffold
- W26: Lead 模型 + Crawler + 询价发布助手 (线索池 + 一键发布)
- W29.x: MCP 集成 (Integration 模型 + connectMcp + publish_rfq 5 工具端到端跑通)
- W30: 3 字段补充 (notes / quotationType / quotationDemand)
- W31 P1: 自动填 enterpriseId / userId (Prisma companyUserId 字段 + get_app_identity tool + lead.service.ts publishArgs)
- W31: detail 详情页 + admin UI 集成管理 (OpenAppListView + AuditLogListView)

关联: ~/Documents/02-平台开发/产品开发/F002-W31-交接文档.md
GIT-AUDIT-REPORT-2026-06-24.md
2026-06-24 11:07:11 +08:00

49 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# scripts/ — 自动化脚本
**生成:** 2026-06-05
**分支:** main
## OVERVIEW
Python/JS 工具和自动化脚本。招标公告抓取 + direv 平台发布 + 图片处理 + 开发工具。
## STRUCTURE
```
scripts/
├── tender-fetcher/ # 招标公告抓取(由 CrawlerService execSync 调用)
│ ├── fetch-v1.2.js # 中电建
│ ├── fetch-xkgroup.py # 新矿集团
│ ├── fetch-cnncecp.py # 中核集团
│ └── lead_evaluation_report.py
├── direv-publish/ # direv 平台全链路发布(10 个 .py)
│ ├── publish.py / batch_publish*.py
│ ├── auto_audit.py / auto_publish.py
│ ├── wait_login*.py / check_direv_login.py
│ └── extract_notes.py
├── search_image.py # Bing 图片搜索(Playwright)
├── process_image.py # 图片处理(去水印/裁剪/白底合成)
├── parse_products.py # Excel/CSV → JSON
├── start-dev.sh # nohup 后台启动 dev server
└── stop-dev.sh # 根据 PID 停止 dev server
```
## WHERE TO LOOK
| 任务 | Location | Notes |
|------|----------|-------|
| 新增采集器 | `tender-fetcher/fetch-xxx.py` | 输出到 `~/Desktop/招标公告/<date>/xxx_downloaded.json` |
| direv 发布 | `direv-publish/auto_publish.py` | 完整流程:读公告→发 direv→飞书通知 |
## CONVENTIONS
- Python 脚本用 `#!/usr/bin/env python3` + `if __name__ == '__main__'`
- 所有 Python/JS 脚本通过后端 `execSync()` 调用,非 import 导入
- 输出结果写到文件,非 stdout
- 图片处理脚本输出到 `public/uploads/library/`
## ANTI-PATTERNS
- 不要用 `print()` 输出结构化数据(结果走文件)
- 不要依赖 `node_modules` 外的系统级 Python 包(用 requirements.txt)