From 0440be02888216bcb4e82945e27e682410daaa6f Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 5 Jul 2026 17:08:31 -0400 Subject: [PATCH] conductor(plan): mark Phase 1 (scaffold + error types + dataclasses) complete [161d8da] --- .../twitter_threads_extraction_20260705/plan.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conductor/tracks/twitter_threads_extraction_20260705/plan.md b/conductor/tracks/twitter_threads_extraction_20260705/plan.md index 04a956cd..1d0407c9 100644 --- a/conductor/tracks/twitter_threads_extraction_20260705/plan.md +++ b/conductor/tracks/twitter_threads_extraction_20260705/plan.md @@ -8,17 +8,17 @@ Standalone tooling track. The deliverable is a `scripts/twitter_threads/` packag --- -## Phase 1: Scaffold + Error Types + Data Classes +## Phase 1: Scaffold + Error Types + Data Classes [checkpoint: 161d8da] Focus: create the package directory, the shared error type, and the typed dataclasses (`ThreadData`, `PostData`) that the rest of the pipeline passes around. -- [ ] **Task 1.1: Create the `scripts/twitter_threads/` directory + `__init__.py`** +- [x] **Task 1.1: Create the `scripts/twitter_threads/` directory + `__init__.py`** WHERE: `scripts/twitter_threads/__init__.py` WHAT: A docstring documenting the namespace, the per-module responsibilities, and the standalone-usage note (no `src/` imports; copy-pasteable to another repo). HOW: Mirror `scripts/video_analysis/__init__.py`. -- [ ] **Task 1.2: Write `error_types.py` (the shared Result[T, ErrorInfo] shape)** +- [x] **Task 1.2: Write `error_types.py` (the shared Result[T, ErrorInfo] shape)** WHERE: `scripts/twitter_threads/error_types.py` WHAT: Copy the shape of `scripts/video_analysis/error_types.py`: `ErrorInfo` dataclass (frozen, slots) + `make_error` factory. Standalone โ€” no import from `scripts.video_analysis`. @@ -38,7 +38,7 @@ def make_error(kind: str, source: str, detail: str) -> ErrorInfo: ``` VERIFY: `python -c "from scripts.twitter_threads.error_types import ErrorInfo, make_error; print(make_error('X','y','z'))"` prints the dataclass repr. -- [ ] **Task 1.3: Write the typed dataclasses (`ThreadData`, `PostData`)** +- [x] **Task 1.3: Write the typed dataclasses (`ThreadData`, `PostData`)** WHERE: `scripts/twitter_threads/error_types.py` (same file; keeps the standalone file count low) OR a new `scripts/twitter_threads/types.py` (if the user prefers separation). Default: same file. WHAT: @@ -71,14 +71,14 @@ class ThreadData: HOW: Per `conductor/code_styleguides/data_oriented_design.md` ยง8.5 โ€” typed, frozen, slots. No `dict[str, Any]`. VERIFY: `python -c "from scripts.twitter_threads.error_types import PostData; print(PostData.__slots__)"` prints the slots tuple. -- [ ] **Task 1.4: Write tests for the error types + dataclasses** +- [x] **Task 1.4: Write tests for the error types + dataclasses** WHERE: `tests/test_twitter_threads_types.py` WHAT: Construct `ErrorInfo`, `PostData`, `ThreadData` instances. Assert field access, frozen-ness (mutation raises `FrozenInstanceError`), slots-ness (no `__dict__`). HOW: Per the TDD red-first protocol โ€” write the tests first, run them (they fail because the types don't exist yet), then implement Task 1.2 + 1.3 to make them pass. VERIFY: `uv run pytest tests/test_twitter_threads_types.py -v` passes. -- [ ] **Task 1.5: Commit Phase 1** +- [x] **Task 1.5: Commit Phase 1** ```bash git add scripts/twitter_threads/__init__.py scripts/twitter_threads/error_types.py tests/test_twitter_threads_types.py