Skip to content

MbappeWU/Program-Management-System

Repository files navigation

Program Management System / ProjectAI

用于座舱项目管理风险汇报

This repository now contains two complementary pieces that support risk and issue tracking for intelligent cockpit projects:

  1. Express/Sequelize backend (server.js, /models, /routes) – the original REST API skeleton for persisting projects, modules, risks, users, and meetings.
  2. ProjectAI 自动项目管控工具 (run.py, /src/project_ai) – a Python-based MVP that demonstrates automated data ingestion, rule-based risk spotting, report generation, and notification drafting using sample Feishu exports.

Both components can evolve independently depending on your delivery plan. The sections below explain how to use the new ProjectAI tooling and recap the existing backend.

ProjectAI 快速开始

ProjectAI ships with local fixtures under data/ and requires only the Python standard library for local mode.

python3 run.py run --config config/sample_config.json

For Feishu API mode install the optional dependency first:

pip install -r requirements.txt

Then run with a configuration similar to config/api_config.example.json after exporting your app credentials.

The command runs the full pipeline:

  • Loads tasks/events from sample Feishu document, sheet, and chat exports.
  • Applies rule-based risk identification (逾期、进度滞后、阻塞等规则)。
  • Renders a daily report using src/project_ai/templates/daily_report_template.txt and writes it to output/daily_report.txt.
  • Prints high-risk reminders ready to be sent via Feishu.

配置

config/sample_config.json 演示了本地文件模式的配置项:

  • feishu.local_files:指向示例文档、表格和群聊数据。
  • report.output_path / report.template_path:日报输出路径和模板。
  • notifications:提醒开关、接收人和高风险阈值(基于 severity * probability 评分)。

启用 API 模式时:

  1. 导出凭据(不要写入代码仓库):
    export FEISHU_APP_ID="cli_xxx"
    export FEISHU_APP_SECRET="xxx"
    export FEISHU_TENANT_KEY="t-xxx"
  2. 复制 config/api_config.example.json,将 ${...} 占位符替换为上述环境变量并配置文档、Bitable 与群聊信息。
  3. 在运行前确认 pip install -r requirements.txt 已执行。

详细步骤与所需权限列表参见 docs/feishu_api_integration.md

Express Backend 回顾

The existing Node.js backend remains unchanged and can be launched for local development:

npm install
npm run dev

It exposes REST endpoints for managing projects, modules, risks, users, and meetings over SQLite (database.sqlite). See the original README content in git history for endpoint details.

后续扩展建议

  • 将 ProjectAI 的输出写回本仓库的数据库或前端服务,实现闭环管控。
  • 扩展 RiskService 规则,引入历史趋势、机器学习模型或与工单系统联动。
  • 根据团队的日报格式调整模板,或改写为 HTML/Markdown 便于推送。
  • 集成真实 Feishu API,并结合计划任务(cron/Airflow)自动生成与发送日报。

Both stacks provide a foundation for building a full cockpit program management solution with automation and data insights.

About

用于座舱项目管理风险汇报

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors