autotrain/CODEMAP.md
xinxin6623 65d2719afb H5 视觉兜底优化 + scrcpy 非阻塞启动 + 自动校准/重连脚本
- wait_for_page_transition: XML 持续返回 other 超过 quick_timeout 后自动启用视觉兜底
- _xml_or_vision_click: 优先视觉 API 找按钮(H5 WebView XML 不可见)
- 自动处理媒体访问权限弹窗
- scrcpy 改为非阻塞 Popen 启动,绑定当前设备 serial 避免多设备冲突
- 新增 auto_calibrate_from_recording.py / reconnect-phone.sh
- postJson 前端异常捕获
2026-07-24 09:46:32 +08:00

3.0 KiB
Raw Blame History

铁路系统发票 · 代码图谱索引 (CODEMAP)

由 codebase-memory-mcp 于 2026-07-17 生成 · 图谱 1088 节点 / 3812 边 · 活文件,每次 /wrap-up 覆盖

一、给能连 MCP 的 agent首选

本项目已索引project 名 Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain。直接查图谱代替 grep省 ~120x token

  • 架构总览:get_architecture(project="Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain", aspects=["all"])
  • 查函数/类:search_graph(project="Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain", name_pattern=".*X.*")
  • 调用链:trace_path(project="Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain", function_name="X", direction="both")
  • 死代码:search_graph(project="Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain", max_degree=0, exclude_entry_points=true)
  • Cypherquery_graph(project="Users-qoragufimo390gmail.com-Documents-_e99d9ee9a1b9e79bae-works-autotrain", query="MATCH ...")

未连 MCPCLI 等价:~/.local/bin/codebase-memory-mcp cli <tool> '<json>'

二、结构画像快照(连不上 MCP 时读这段就够)

  • 规模1088 节点 / 3812 边 / 36 Python+Bash 文件
  • 语言Python 32 · Bash 4
  • 节点构成Function 350 · Section 296 · Variable 225 · File/Module 64 · Method 53 · Class 20 · Folder 13
  • 包/目录scripts/250 节点,主逻辑)· nextgen/149 节点,重构中的新一代)· tests/12 节点)— 旧 scripts 彼此通过 CSV/配置文件耦合IMPORTS 边 55 条,含 nextgen 内聚)
  • 入口9 个 maininvoice_tool.py(主 CLI ~3200 行)/ web_ui.pyHTTP 服务 :8765/ vision_fallback.py(视觉层)/ record_step.py(录制)/ record_android_flow.py(流录制)/ add_invoice_passenger_name.pyPDF 加姓名)/ annotate_roster_invoices.py(名单标状态)/ device_calibrate.py(设备校准)/ nextgen/scripts/autotrain_next.py(新一代入口)
  • 热点函数by fan-indict.get(155) · len(62) · print(53) · list.append(49) · run_adb(24, invoice_tool) · project_path(21) · adb_dump_nodes(17) · device.run(15, nextgen) · adb_visible_texts(15)
  • 边类型DEFINES 1380 · CALLS 1297 · USAGE 445 · WRITES 223 · SEMANTICALLY_RELATED 177 · CONTAINS_FILE 64 · IMPORTS 55 · DEFINES_METHOD 48 · RAISES 34 · SIMILAR_TO 33 · TESTS 29 · FILE_CHANGES_WITH 10
  • 架构层scripts / nextgen = entry layer有入口、只外调builtinsdict/str/list/len/int/print= core layer
  • Leiden 社区10 个 cluster最大 58 成员do_POST/main/do_GET Web UI 层、55 成员android_invoice_step/android_vision_page_run 状态机、44 成员open_next/download_and_continue 开票子流程、39 成员device_runtime 设备层)