Commit Graph
3 Commits
Author SHA1 Message Date
chengmaandClaude Opus 4.8 b1e38ffd7a feat(T-003): 建立日志与运行产物目录策略
- src/paths.py: 集中管理 logs/、artifacts/ 路径与产物命名
  (artifacts/<task_id>/<时间戳>_<step>.png|.xml),_safe 安全化防路径穿越,
  运行时自动创建且被 .gitignore 忽略。
- src/logging_config.py: 统一日志格式(含 task_id/step),控制台 + logs/app.log,
  缺上下文时由 filter 补默认值,setup 幂等;约定不记录敏感信息。
- src/main.py: 启动时初始化运行目录与日志。
- 运行方式统一为 python -m src.main(绝对导入下的唯一干净入口),
  同步替换 00/03/05/current-state 文档命令与 dev.bat。
- 文档:04 §七 补 paths.py 与产物命名规则;tasks/progress/current-state 更新。

验证:compileall OK;unittest Ran 17 tests OK;python -m src.main exit=0,logs/app.log 写入正常。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:32:28 +08:00
chengmaandClaude Opus 4.8 c41f37a27d feat(T-002): 建立核心数据模型与状态枚举
- src/core/status.py: TaskStatus 六态枚举,英文成员 + display_name/from_display
  中英映射(单一事实源),对齐 04-architecture.md §3.4。
- src/core/models.py: OrderTask dataclass,字段集合/类型对齐 §3.3;支付模式不挂模型。
- tests/test_models.py: 枚举完整性/双向映射/未知值报错/默认值/实例独立性。
- 文档同步:04 §3.4 约定补 from_display;tasks/progress/current-state 更新。

验证:compileall OK;unittest Ran 10 tests, OK。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:17:52 +08:00
chengmaandClaude Opus 4.8 2863bf2750 feat(T-001): 初始化 Python 项目骨架
- 建立 src/(main.py 最小可运行入口)、tests/(unittest 冒烟测试)、requirements.txt。
- 骨架阶段测试用标准库 unittest,零第三方依赖;pytest 留待后续按需引入。
- 文档占位符验证命令替换为真实命令(pytest -> unittest discover)。
- 同步 tasks.md(T-001 DONE)、progress.md、current-state.md。

验证:compileall OK;unittest 2 passed;python src/main.py exit=0。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:02:15 +08:00