docs(02): add phase 2 plans

This commit is contained in:
2026-03-13 18:04:48 +08:00
parent cc6c915f10
commit 8a8959cebe
@@ -0,0 +1,83 @@
---
phase: 2
slug: platform-skills
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-13
---
# Phase 2 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | pytest 8.x |
| **Config file** | pytest.ini |
| **Quick run command** | `pytest tests/test_pipeline/test_link_parser.py tests/test_platforms/ -x -v` |
| **Full suite command** | `pytest tests/ -v --cov=kb_pipeline` |
| **Estimated runtime** | ~15 seconds |
---
## Sampling Rate
- **After every task commit:** Run `pytest tests/test_pipeline/test_link_parser.py tests/test_platforms/ -x`
- **After every plan wave:** Run `pytest tests/ -v --cov=kb_pipeline`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 15 seconds
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 02-01-01 | 01 | 1 | PLAT-01/02/03 | unit | `pytest tests/test_pipeline/test_link_parser.py -x` | ❌ W0 | ⬜ pending |
| 02-01-02 | 01 | 1 | PLAT-01/02/03 | unit | `pytest tests/test_pipeline/test_idempotency.py -x` | ❌ W0 | ⬜ pending |
| 02-02-01 | 02 | 1 | PLAT-01 | unit | `pytest tests/test_platforms/test_bilibili.py::test_video_metadata -x` | ❌ W0 | ⬜ pending |
| 02-02-02 | 02 | 1 | PLAT-02 | unit | `pytest tests/test_platforms/test_bilibili.py::test_article_content -x` | ❌ W0 | ⬜ pending |
| 02-02-03 | 02 | 2 | PLAT-01 | integration | `pytest tests/test_platforms/test_bilibili.py::test_video_content -x` | ❌ W0 | ⬜ pending |
| 02-03-01 | 03 | 2 | PLAT-03 | unit | `pytest tests/test_platforms/test_zhihu.py::test_answer_content -x` | ❌ W0 | ⬜ pending |
| 02-03-02 | 03 | 2 | PLAT-03 | unit | `pytest tests/test_platforms/test_zhihu.py::test_zhuanlan_content -x` | ❌ W0 | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- [ ] `tests/test_pipeline/test_link_parser.py` — LinkParser 单元测试
- [ ] `tests/test_pipeline/test_idempotency.py` — 幂等检查测试
- [ ] `tests/test_platforms/__init__.py` — 测试模块初始化
- [ ] `tests/test_platforms/conftest.py` — 平台测试共享 fixtures
- [ ] `tests/test_platforms/test_bilibili.py` — B站适配器测试
- [ ] `tests/test_platforms/test_zhihu.py` — 知乎适配器测试
- [ ] Mock fixtures: B站/知乎 API 响应数据
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| 短链解析 (b23.tv) | PLAT-01 | 需要真实网络请求 | 提供真实 b23.tv 短链,验证解析到正确 URL |
| Cookie 过期检测 | PLAT-03 | 需要过期 Cookie | 使用过期 Cookie 访问知乎,验证错误提示 |
---
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ] Wave 0 covers all MISSING references
- [ ] No watch-mode flags
- [ ] Feedback latency < 15s
- [ ] `nyquist_compliant: true` set in frontmatter
**Approval:** pending