fix(05): revise plan to include KB_INTERMEDIATE_PATH config support
- Add INT-03 requirement to 05-01-PLAN.md requirements field - Add Task 1 for KB_INTERMEDIATE_PATH config in KBSettings - Update Task 2 and Task 3 to use configurable path instead of hardcoded - Update 05-CONTEXT.md to reflect new decision (config support vs hardcoded) Addresses checker issue: requirement_coverage for INT-03 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
**Gathered:** 2026-03-16
|
||||
**Status:** Ready for planning
|
||||
**Updated:** 2026-03-16 (revision: 添加 INT-03 配置支持)
|
||||
|
||||
<domain>
|
||||
## Phase Boundary
|
||||
|
||||
统一中间目录结构,添加自动归档步骤,优化最终目录布局。包括:
|
||||
- 中间文件统一存放到 `~/work/intermediate/analysis/{platform}_{content_id}/`
|
||||
- 中间文件统一存放到 `~/work/intermediate/analysis/{platform}_{content_id}/`(支持配置)
|
||||
- 分析完成后自动归档到最终目录
|
||||
- 最终目录按平台分组,文件名带时间戳前缀
|
||||
|
||||
@@ -19,9 +20,9 @@
|
||||
## Implementation Decisions
|
||||
|
||||
### 中间目录结构
|
||||
- **统一路径**: 硬编码 `~/work/intermediate/analysis/`
|
||||
- **统一路径**: 使用 `KB_INTERMEDIATE_PATH` 配置项,默认值为 `~/work/intermediate/analysis/`
|
||||
- **内容目录命名**: `{platform}_{content_id}/` 格式
|
||||
- **无需配置项**: 不添加 KB_INTERMEDIATE_PATH,使用固定路径
|
||||
- **配置支持**: 添加 KB_INTERMEDIATE_PATH 环境变量支持(**更新**: 覆盖之前的"无需配置项"决策)
|
||||
|
||||
### 归档触发时机
|
||||
- **自动归档**: 分析完成后自动执行 ArchiveProcessor
|
||||
@@ -70,19 +71,20 @@
|
||||
- 状态管理: state.mark_step_completed/failed
|
||||
- 用户确认: rich.prompt.Confirm.ask() 或 input() fallback
|
||||
- 目录创建: Path.mkdir(parents=True, exist_ok=True)
|
||||
- 配置项: pydantic-settings BaseSettings + Field + 环境变量
|
||||
|
||||
### Integration Points
|
||||
- Pipeline.steps 配置: 添加 "archive" 到步骤列表
|
||||
- ArchiveProcessor 输入: content_id, platform, content_dir, output_file
|
||||
- ArchiveProcessor 输出: archive_file 路径
|
||||
- KBSettings: 使用 archive_path 配置项
|
||||
- KBSettings: 使用 archive_path 配置项,新增 intermediate_path 配置项
|
||||
|
||||
</code_context>
|
||||
|
||||
<specifics>
|
||||
## Specific Ideas
|
||||
|
||||
- 中间目录: `~/work/intermediate/analysis/bilibili_BV1xxx/`
|
||||
- 中间目录: `~/work/intermediate/analysis/bilibili_BV1xxx/`(可通过 KB_INTERMEDIATE_PATH 自定义)
|
||||
- 最终目录: `~/work/zq/30.资源/AI分析/bilibili/20260316_BV1xxx_analysis.md`
|
||||
- 重复检测: 在归档目录下 glob `*_{content_id}_analysis.md`
|
||||
- 归档只复制 md 文件,不复制 json 和其他中间文件
|
||||
@@ -100,3 +102,4 @@ None — discussion stayed within phase scope
|
||||
|
||||
*Phase: 05-archive-directory*
|
||||
*Context gathered: 2026-03-16*
|
||||
*Updated: 2026-03-16 (revision: INT-03 配置支持)*
|
||||
|
||||
Reference in New Issue
Block a user