- Rename kb-workflow to kb_workflow for Python package compatibility
- Move bilibili_extractor.py and bilibili_metadata.py to kb_workflow/metadata/
- Create metadata/__init__.py with BilibiliExporter export
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SUMMARY.md with 8 tests (5 unit + 3 integration)
- Update STATE.md: Phase 5 complete, advance to Phase 6
- Mark requirements OUT-01, OUT-02, OUT-03, OUT-04 complete
- Document test patterns and decisions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix test_workflow_skips_completed_steps to mock _ask_rerun_step
- Fix test_fetch_video_metadata_success to use AsyncMock
- Document other pre-existing test issues in deferred-items.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test pipeline includes archive step
- Test archive uses platform directory structure
- Test no date-based subdirectories in archive
- Update default steps assertion to include archive
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test archive copies to correct platform directory
- Test filename format {YYYYMMDD}_{content_id}_analysis.md
- Test skip when step already completed
- Test detect existing archive by content_id
- Test handle missing analysis file with error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ArchiveInput creation in Pipeline.run()
- Import ArchiveInput in pipeline.py
- Add archive_file and skipped to output field recording
- Add ArchiveProcessor to CLI processors list
- Update PipelineConfig steps to include archive
- Added intermediate_path config field with KB_INTERMEDIATE_PATH env var support
- Updated Pipeline to use configurable intermediate directory
- Updated CLI to default to intermediate_path instead of cwd
- Completed requirements: INT-01, INT-02, INT-03
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Import get_settings at top of process_command
- Change default output_dir from cwd to settings.intermediate_path
- Update docstring to document default behavior
- Users can still override with -o flag
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change default output_dir from cwd to settings.intermediate_path
- Reorder settings initialization before output_dir assignment
- Maintain output_dir parameter for testing/custom override
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add intermediate_path field with default ~/work/intermediate/analysis/
- Follow pydantic-settings naming convention for env var override
- Users can customize via KB_INTERMEDIATE_PATH environment variable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update ROADMAP.md to include INT-03 (configurable intermediate path)
- Update 05-01 plan description to reflect INT-03 coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
Root cause: kb_workflow.py contained 312 lines of deprecated legacy
code that was confusing AI agents. The legacy functions have been
completely replaced by the kb_pipeline package.
Changes:
- Removed all legacy functions (is_video_content, check_duplicate, etc.)
- Kept only process_command() and main() entry points
- Updated SKILL.md to remove old command examples
- File reduced from 495 to 143 lines (71% reduction)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Zhihu HTML structure includes noscript fallback images:
<figure><img data-actualsrc=...><noscript><img src=...></noscript></figure>
After fixing lazy-load (replacing src with data-actualsrc), both imgs
have real URLs, causing duplicates. The fix removes noscript tags before
processing img elements.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _normalize_metadata() to flatten nested metadata structure
- Fix generate_frontmatter() to use correct metadata fields
- Change _sanitize_filename() to return standardized "bilibili_{bvid}" format
Fixes: analysis.md frontmatter showing "未命名"/0/"未知" instead of actual values
Fixes: audio filename using video title instead of platform_bvid format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All fixes verified working:
- Video download for videos without official subtitles
- Whisper transcription with correct offset parsing
- Text extraction from Whisper JSON format
- End-to-end analysis with real video content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Handle Whisper transcription format (array of segments with text)
- Extract full text from transcription array before passing to DeepAnalyzer
- Fix offsets parsing to support both dict and list formats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add download_video() to BilibiliAdapter using yt-dlp
- Add bilibili_cookie config to Settings
- Update DownloadProcessor to call video download for bilibili videos
- Add idempotency check to ASRProcessor for existing subtitle files
- Fix indentation error in asr.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>