Files
zeekerWatchmen/docs/ARCHITECTURE.md
T
2026-05-25 15:09:42 +08:00

82 lines
3.8 KiB
Markdown
Raw 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.
testcase-platform/
├── .zeekerwatchmen/ # Agent 灵魂:Skill/记忆/人格
│ ├── soul/
│ │ ├── principles.yaml
│ │ └── persona.yaml
│ ├── skills/
│ │ └── default/ # 内置默认 Skill
│ │ ├── skill.yaml
│ │ ├── extract_ir_prompt.j2
│ │ ├── ir_schema.json
│ │ └── gen_cases_prompt.j2
│ └── memory/ # 空占位,后续自动生成会话记忆
├── server/ # Python FastAPI 后端
│ ├── api/
│ │ ├── __init__.py
│ │ └── routes/
│ │ ├── __init__.py
│ │ ├── prd.py # PRD 相关接口
│ │ ├── ir.py # IR 相关接口
│ │ └── testcase.py # 用例导出接口
│ ├── core/
│ │ ├── __init__.py
│ │ ├── prompt/
│ │ │ └── templates/ # 系统级提示词模板(可被 skill 覆盖)
│ │ ├── llm_provider/
│ │ │ ├── __init__.py
│ │ │ ├── base.py # 抽象模型客户端
│ │ │ ├── router.py # 模型别名路由器
│ │ │ └── mock_client.py # Mock 实现
│ │ ├── reasoning/
│ │ │ ├── __init__.py
│ │ │ ├── graph.py # LangGraph 流程占位
│ │ │ └── mock.py
│ │ ├── utils/
│ │ │ ├── logger.py # 结构化日志
│ │ │ ├── diff.py # YAML/JSON 对比
│ │ │ └── export_utils.py # 导出格式化
│ │ └── personality/
│ │ ├── __init__.py
│ │ └── loader.py # 从 .zeekerwatchmen 动态加载人格
│ ├── services/ # 业务逻辑层
│ │ ├── __init__.py
│ │ ├── prd_manager/
│ │ │ ├── __init__.py
│ │ │ └── service.py
│ │ ├── ir_engine/
│ │ │ ├── __init__.py
│ │ │ ├── generator.py # 调用 LLM 生成 IR(当前 Mock
│ │ │ ├── validator.py # 基于 ir_schema 验证
│ │ │ └── diff.py
│ │ └── testcase_engine/
│ │ ├── __init__.py
│ │ ├── generator.py # 用例生成
│ │ └── exporter.py # 导出 YAML/CSV/XMind
│ ├── main.py # FastAPI 入口
│ ├── config.py # 配置管理(模型列表、路径等)
│ └── requirements.txt
├── web/ # Next.js 前端
│ ├── src/
│ │ ├── components/
│ │ │ ├── Layout.tsx
│ │ │ ├── UploadZone.tsx
│ │ │ ├── IrWorkspace.tsx # 双栏 IR 编辑器 + 思维导图预览
│ │ │ ├── TestCaseTable.tsx
│ │ │ └── ExportPanel.tsx
│ │ ├── pages/
│ │ │ ├── index.tsx # 主页(上传/选择 skill)
│ │ │ ├── ir-confirm.tsx # IR 确认页
│ │ │ └── cases.tsx # 用例预览导出页
│ │ ├── hooks/ # 自定义 hooks (usePrd, useIr, useTestcases)
│ │ └── lib/
│ │ ├── api.ts # 后端 API 封装
│ │ └── types.ts # 前端类型定义
│ ├── package.json
│ ├── tsconfig.json
│ ├── next.config.js
│ └── tailwind.config.js
├── docs/ # 文档
│ ├── PRD.md
│ └── ARCHITECTURE.md
└── README.md