- Test process --help shows usage
- Test process <url> calls Pipeline.run()
- Test invalid URL returns error
- Test --output-dir flag
- Test --no-skip flag
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pipeline class initializes with processors list
- Validates processor STEP_NAME matches config.steps
- _parse_url method parses URLs using LinkParser
- _get_content_dir creates content directory from parsed URL
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test PipelineInput validates url field (required)
- Test PipelineOutput contains results dict
- Test PipelineConfig has default steps list
- Test PipelineConfig allows custom output_dir
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AnalyzeProcessor wraps DeepAnalyzer for AI-powered content analysis
- Analysis reports saved as Markdown with YAML frontmatter
- All 15 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AnalyzeProcessor wraps existing DeepAnalyzer for pipeline integration
- Loads metadata and content from JSON files
- Generates analysis reports as Markdown with frontmatter
- Records state on success and failure
- Supports both video and article content types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AnalyzeInput extends StepInput with metadata_file, content_file, content_type, output_file
- AnalyzeOutput extends StepOutput with analysis_file, summary, main_topics, key_insights, tags, stats
- Supports both video and article content types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test schema validation for AnalyzeInput (metadata_file, content_file, content_type, output_file)
- Test schema validation for AnalyzeOutput (analysis_file, summary, main_topics, key_insights, tags, stats)
- Test AnalyzeProcessor integration with DeepAnalyzer
- Test state recording on success and failure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD GREEN phase:
- DownloadProcessor downloads article/answer/zhuanlan content
- Video content is skipped (handled by ASR in Phase 3)
- Content files saved with correct naming convention
- DownloadProcessor exported from kb_pipeline.processors
- All 17 tests pass
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD GREEN phase:
- DownloadProcessor inherits from BaseProcessor
- Fetches metadata from Bilibili and Zhihu adapters
- Saves metadata to content_dir as JSON
- Records state on success/failure
- Skips step if already completed (idempotency)
- All metadata tests pass
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD RED phase:
- Test DownloadProcessor fetches Bilibili video metadata correctly
- Test DownloadProcessor fetches Zhihu answer metadata correctly
- Test DownloadProcessor records state on success
- Test DownloadProcessor records state on failure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD RED phase:
- Test DownloadInput validates required fields (content_dir, content_type)
- Test DownloadOutput validates required fields (metadata_file, content_file, title, author)
- Test DownloadOutput handles both video and article content types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- BaseProcessor abstract class with unified interface
- ParseProcessor wrapping LinkParser for URL parsing
- ParseInput/ParseOutput schemas for parse step
- All tests passing (18 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ParseProcessor wraps LinkParser for URL parsing
- Returns ParseOutput with platform, content_type, content_id
- Records state when state_manager is provided
- Handles unknown URLs with success=False
- Export BaseProcessor, ParseProcessor, ASRProcessor from __init__.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ParseInput extends StepInput with url field
- ParseOutput extends StepOutput with platform, content_type, content_id, resolved_url, original_url
- Tests for schema validation and inheritance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test BaseProcessor cannot be instantiated directly
- Test subclass must implement process() method
- Test state_manager attribute is provided
- Test STEP_NAME class attribute requirement
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix test_state_recording_failure to use correct mock pattern
- _try_official_subtitle returning None triggers _Whisper` fallback
- Ensure proper exception propagation for accurate failure recording
- All 22 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create processors module with ASRProcessor class
- Implement _try_official_subtitle for B站字幕下载
- Support process() method with subtitle-first strategy
- Add helper functions for whisper.cpp integration
- All 5 processor tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ASRInput schema with video_path and content_type fields
- Add ASROutput schema with tool/has_subtitle/output_files/segments/text/duration_seconds/speakers
- Create test_processors directory with conftest fixtures
- Add comprehensive schema tests (8 test cases)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create 02-02-SUMMARY.md with execution results
- Update STATE.md with decisions and session info
- Update ROADMAP.md with plan progress
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ZhihuAdapter supports answer and zhuanlan content extraction
- Cookie-based authentication with login page detection
- Markdown output with YAML frontmatter
- 13 new tests, all 35 platform tests passing
- Test coverage: 86%
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implement ZhihuAdapter class inheriting PlatformAdapter
- Support answer URL content extraction
- Support zhuanlan (article) URL content extraction
- Add cookie-based authentication from KBSettings
- Detect login page redirects (expired cookies)
- Return AuthError for missing/expired cookies
- Format content with YAML frontmatter
- Update package exports to include ZhihuAdapter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test answer content extraction
- Test zhuanlan (article) content extraction
- Test cookie-based authentication
- Test login page detection
- Test AuthError handling for missing/expired cookies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test for article content returning Markdown format
- Add test for YAML frontmatter with required fields
- Add test for video content returning empty (ASR handling)
- Add test for unsupported content type error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test for abstract class instantiation prevention
- Add test for incomplete implementation detection
- Add test for complete implementation instantiation
- Add test for async method signatures
- Add shared fixtures for platform tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Created LinkParser for unified URL parsing (B站/知乎)
- Created IdempotencyChecker for file existence checking
- All 23 new tests passing, 95% coverage
- Requirements PLAT-01, PLAT-02, PLAT-03 completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add LinkParser and ParsedLink to __init__.py exports
- Add IdempotencyChecker to __init__.py exports
- Update __all__ list with new public APIs
- All 23 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create IdempotencyChecker class with check_exists method
- Check for metadata JSON and content Markdown files
- Return tuple of (all_exist, existing_files)
- Follow naming convention: {platform}_{content_id}_{type}.{ext}
- Add get_expected_files helper method
- Add 8 unit tests covering all scenarios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create ParsedLink dataclass with platform, content_type, content_id fields
- Implement LinkParser class with regex-based URL parsing
- Support Bilibili video/article URLs (with/without www)
- Support Zhihu answer/zhuanlan URLs
- Support b23.tv short link resolution with requests.head
- Return None for unrecognized URLs (no exceptions)
- Add 15 unit tests covering all supported URL types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>