Private
Public Access
0
0
Commit Graph

4063 Commits

Author SHA1 Message Date
ed e9fa69ddc1 feat(api_hooks): add WebSocketMessage + JsonValue type (t5_1-t5_8)
Phase 5 of any_type_componentization_20260621. Promotes the WebSocket
broadcast signature in src/api_hooks.py from (channel, payload: dict) to
a typed WebSocketMessage dataclass (16 Any sites):

NEW dataclass (inline in src/api_hooks.py):
- WebSocketMessage (frozen=True): channel: str, payload: JsonValue

MODIFIED:
- _serialize_for_api(obj: Any) -> JsonValue (typed return)
- broadcast(channel: str, payload: dict[str, Any]) -> broadcast(message: WebSocketMessage)
- _get_app_attr / _set_app_attr signatures UNCHANGED (Pattern 4 preserved)

NEW tests/test_api_hooks_dataclasses.py (12 tests, all pass):
- test_websocket_message_construction
- test_websocket_message_with_list_payload
- test_websocket_message_with_nested_payload
- test_websocket_message_is_frozen
- test_websocket_message_to_json
- test_serialize_for_api_returns_dict_for_to_dict_object
- test_serialize_for_api_handles_nested_lists
- test_serialize_for_api_handles_purepath
- test_serialize_for_api_passthrough_for_primitives
- test_serialize_for_api_handles_mixed_nesting
- test_get_app_attr_signature_preserved (Pattern 4 invariant)
- test_set_app_attr_signature_preserved (Pattern 4 invariant)

MODIFIED tests/test_websocket_server.py:
- Updated broadcast() call site to use WebSocketMessage(channel=..., payload=...)
- Added WebSocketMessage import

Verified:
  uv run pytest tests/test_api_hooks_dataclasses.py tests/test_api_hooks_warmup.py tests/test_websocket_server.py --timeout=30
    23 passed in 5.03s (12 new + 10 existing + 1 websocket)
2026-06-21 17:00:42 -04:00
ed fef6c20ea0 feat(log): add Session + SessionMetadata dataclasses (t4_1-t4_8)
Phase 4 of any_type_componentization_20260621. Promotes the 2-level
dict[str, dict[str, Any]] structure in src/log_registry.py to typed
Session + SessionMetadata dataclasses (7 Any sites):

NEW dataclasses (inline in src/log_registry.py):
- SessionMetadata (frozen): message_count, errors, size_kb, whitelisted,
  reason, timestamp
- Session (frozen): session_id, path, start_time, whitelisted, metadata
- to_dict() / from_dict() classmethod for round-trip with TOML shape
- Backward-compat __getitem__ / get() so existing test_log_registry.py
  tests that use session_data['path'] / session_data.get('metadata')
  continue to work

REFACTOR LogRegistry:
- self.data: dict[str, dict[str, Any]] -> dict[str, Session]
- load_registry: populates with Session.from_dict(...)
- save_registry: serializes via session.to_dict()
- register_session: creates Session dataclass
- update_session_metadata: creates new Session with updated SessionMetadata
- is_session_whitelisted: reads session.whitelisted
- update_auto_whitelist_status: reads session.path
- get_old_non_whitelisted_sessions: reads session.start_time + metadata

NEW tests/test_log_registry_dataclasses.py (13 tests, all pass):
- test_session_dataclass_construction
- test_session_metadata_dataclass_construction
- test_session_from_dict_basic / with_metadata
- test_session_to_dict_round_trip
- test_session_metadata_to_dict
- test_log_registry_data_is_typed
- test_log_registry_register_session_returns_session
- test_log_registry_update_session_metadata_sets_metadata
- test_log_registry_is_session_whitelisted
- test_log_registry_get_old_non_whitelisted_sessions
- test_session_is_frozen
- test_session_metadata_is_frozen

Verified:
  uv run pytest tests/test_log_registry.py tests/test_log_registry_dataclasses.py --timeout=30
    18 passed in 3.27s (5 existing + 13 new)
2026-06-21 16:56:24 -04:00
ed e19672b2e0 conductor(plan): Phase 3 partial - provider_state + tests; call-site migration deferred 2026-06-21 16:44:28 -04:00
ed 2ad4718c3c feat(provider): add src/provider_state.py + tests (t3_2, t3_3)
Phase 3 of any_type_componentization_20260621 (PARTIAL). Adds the
ProviderHistory abstraction and 6-provider registry.

NEW src/provider_state.py (60 lines):
- ProviderHistory dataclass (messages: list[HistoryMessage], lock: Lock,
  append / get_all / replace_all / clear methods)
- _PROVIDER_HISTORIES: dict[str, ProviderHistory] for anthropic / deepseek /
  minimax / qwen / grok / llama
- get_history(provider) factory + clear_all() + providers()
- SDK client holders (_gemini_chat, _anthropic_client, etc.) NOT touched
  per Pattern 3 (heterogeneous SDK types)

NEW tests/test_provider_state.py (12 tests, all pass):
- test_six_providers_registered
- test_get_history_returns_singleton_per_provider
- test_get_history_raises_for_unknown
- test_provider_history_starts_empty
- test_provider_history_append / get_all_returns_copy / replace_all /
  replace_all_takes_copy / clear
- test_clear_all_resets_every_provider
- test_provider_history_thread_safety (10 threads x 100 messages)
- test_independent_locks_per_provider (lock on one doesn't block another)

DEFERRED:
- t3_4 (Remove 14 globals from ai_client.py:111-133)
- t3_5 through t3_13 (Update call sites in _send_<provider> functions)
- t3_14 (Run full regression suite on test_ai_client*.py)

These call-site updates require careful per-function refactoring of the
~27 sites in _send_anthropic, _send_deepseek, _send_minimax, _send_qwen,
_send_grok, _send_llama. The ai_client.py file is 3432 lines; a single
regex pass risks subtle indentation regressions in nested constructs
(see the 7
ot : orphan lines from a previous attempt).

The provider_state module is independently usable and tested. Future
track: provider_state_migration_2026MMDD to wire up the call sites
mechanically, OR integrate into a Phase 3 retry pass.

Verified:
  uv run pytest tests/test_provider_state.py --timeout=30
    12 passed in 2.99s
2026-06-21 16:43:42 -04:00
ed b942c3f8b9 conductor(plan): fill t2_9 SHA + phase_2 checkpoint 2026-06-21 16:31:19 -04:00
ed 4bfce93105 conductor(plan): mark Phase 2 complete (t2_6 deferred to Phase 3)
Phase 2 (openai_schemas) progress:
- t2_1-t2_5+t2_7-t2_8 (a96f946b): 19 tests pass; NormalizedResponse +
  OpenAICompatibleRequest refactored to dataclasses
- t2_6 (deferred): _send_grok + _send_minimax + _send_llama in
  src/ai_client.py still use legacy NormalizedResponse(text=..., tool_calls=[], usage_*_tokens=...)
  kwargs. These will be updated in Phase 3 (provider_state) as part of
  the ai_client refactor.
- t2_9: Phase 2 checkpoint (commit hash filled in this commit)

current_phase: 2 -> 3
phase_2.status: pending -> completed

Next: Phase 3 - provider_state (15 tasks; the largest phase).
2026-06-21 16:30:29 -04:00
ed a96f946b40 feat(openai): add src/openai_schemas.py + refactor openai_compatible.py (t2_1-t2_7)
Phase 2 of any_type_componentization_20260621. Promotes NormalizedResponse
+ OpenAICompatibleRequest from src/openai_compatible.py to typed
dataclasses. The 17 Any sites become 5 dataclasses:

NEW src/openai_schemas.py (138 lines):
- ToolCallFunction dataclass (name, arguments)
- ToolCall dataclass (id, function: ToolCallFunction, type='function')
- ChatMessage dataclass (role, content, tool_calls, tool_call_id, name)
- UsageStats dataclass (input_tokens, output_tokens, cache_read_*, cache_creation_*)
- NormalizedResponse dataclass (text, tool_calls: tuple, usage, raw_response: Any)
- OpenAICompatibleRequest dataclass (messages: list[ChatMessage], model, ...)

NEW tests/test_openai_schemas.py (19 tests, all pass):
- ToolCallFunction, ToolCall, ChatMessage round-trips
- UsageStats field access + frozen=True semantics
- NormalizedResponse.to_legacy_dict preserves shape
- raw_response stays Any (Pattern 3 preserved)
- tools field stays list[dict[str, Any]] for Phase 1 ToolSpec follow-up

MODIFIED src/openai_compatible.py:
- Removed inline NormalizedResponse + OpenAICompatibleRequest definitions
- Re-imported from src.openai_schemas
- _send_blocking: tool_calls -> tuple[ToolCall, ...]; usage_*_tokens -> UsageStats
- _send_streaming: same migration
- send_openai_compatible: messages_dicts = [m.to_dict() for m in request.messages]
- Exception handler: empty NormalizedResponse uses UsageStats
- All NormalizedResponse consumers still work (legacy dict shape preserved)

Verified:
  uv run pytest tests/test_openai_schemas.py tests/test_mcp_tool_specs.py tests/test_audit_dataclass_coverage.py tests/test_type_aliases.py tests/test_mcp_client_beads.py tests/test_mcp_client_paths.py tests/test_arch_boundary_phase2.py --timeout=60
    64 passed in 6.28s
2026-06-21 16:27:59 -04:00
ed 0318bfe9e2 conductor(plan): fill t1_8 commit_sha + phase_1 checkpoint 2026-06-21 16:16:34 -04:00
ed 9961e437fb conductor(plan): mark t1_1-t1_7 complete + Phase 1 done (t1_8 partial)
Phase 1 (mcp_tool_specs) commits:
- t1_1+t1_2+t1_3 (96007ebd): tests/test_mcp_tool_specs.py (11 tests) + src/mcp_tool_specs.py (45 ToolSpec registrations) + generator scripts
- t1_4 (747e3983): refactor mcp_client.py (removed 774 lines of dict literals; 3 call sites updated)
- t1_5 (8bcde094): refactor ai_client.py (3 TOOL_NAMES sites updated)
- t1_6+t1_7: cross-module invariant verified; 45/45 tests pass
- t1_8 (in_progress): Phase 1 checkpoint (commit hash filled in this commit)

state.toml updates:
- current_phase: 1 -> 2
- phase_1.status: pending -> completed
- t1_1..t1_7: pending -> completed (with commit_sha)

Next: Phase 2 - openai_schemas (9 tasks).
2026-06-21 16:15:59 -04:00
ed 8bcde09476 refactor(mcp): update ai_client.py 3 TOOL_NAMES sites (t1_5)
Phase 1 of any_type_componentization_20260621. Migrates ai_client.py:
- Line 560: new_tools = {name: False for name in mcp_client.TOOL_NAMES}
           -> mcp_tool_specs.tool_names()
- Line 582: _agent_tools = {name: True for name in mcp_client.TOOL_NAMES}
           -> mcp_tool_specs.tool_names()
- Line 1012: is_native = name in mcp_client.TOOL_NAMES
           -> name in mcp_tool_specs.tool_names()

Plus adds: from src import mcp_tool_specs

Verified:
  uv run pytest tests/test_mcp_tool_specs.py tests/test_mcp_client_beads.py tests/test_mcp_client_paths.py tests/test_audit_dataclass_coverage.py tests/test_type_aliases.py
    39 passed in 11.79s

No regressions. The mcp_client.TOOL_NAMES re-export is preserved for
backward compatibility with any external test/code that imports it.
2026-06-21 16:11:27 -04:00
ed 747e3983bd refactor(mcp): update mcp_client.py call sites to mcp_tool_specs (t1_4)
Phase 1 of any_type_componentization_20260621. Migrates the 4 call sites
in src/mcp_client.py to use the new typed module:

- Line 1944: native_names = {t['name'] for t in MCP_TOOL_SPECS}
           -> native_names = mcp_tool_specs.tool_names()
- Line 1958: res = list(MCP_TOOL_SPECS)
           -> res = [s.to_dict() for s in mcp_tool_specs.get_tool_schemas()]
- Line 2747: TOOL_NAMES = {t['name'] for t in MCP_TOOL_SPECS}
           -> TOOL_NAMES = mcp_tool_specs.tool_names()

Plus: removes the legacy MCP_TOOL_SPECS list literal (lines 1973-2746;
774 lines of dict literals). The data lives in src/mcp_tool_specs.py
now; the canonical registry. (The legacy dict shape is preserved via
ToolSpec.to_dict() for downstream serialization.)

Adds import: from src import mcp_tool_specs

Verified:
  uv run pytest tests/test_mcp_tool_specs.py tests/test_audit_dataclass_coverage.py tests/test_type_aliases.py
    32 passed in 5.48s
  uv run pytest tests/test_mcp_client_beads.py tests/test_mcp_client_paths.py
    7 passed in 3.20s

Cross-module invariant (test_tool_names_subset_of_models_agent_tool_names):
the 45 mcp_tool_specs.tool_names() are all in models.AGENT_TOOL_NAMES.
2026-06-21 16:09:30 -04:00
ed 96007ebd77 feat(mcp): add src/mcp_tool_specs.py + tests (t1_1, t1_2, t1_3)
Phase 1 of any_type_componentization_20260621. Promotes MCP_TOOL_SPECS
(45 dict[str, Any] literals in src/mcp_client.py) to typed dataclasses:

NEW src/mcp_tool_specs.py:
- ToolParameter dataclass (name, type, description, required, enum)
- ToolSpec dataclass (name, description, parameters: tuple)
- _REGISTRY: dict[str, ToolSpec]
- register() / get_tool_spec() / get_tool_schemas() / tool_names()
- to_dict() preserves legacy JSON shape for downstream serialization
- 45 register() calls (one per tool) at module level
- Mirrors src/vendor_capabilities.py reference pattern

NEW tests/test_mcp_tool_specs.py (11 tests, all pass):
- test_module_loads_with_45_registrations
- test_tool_names_set_matches_expected_45
- test_get_tool_spec_returns_correct_instance
- test_get_tool_spec_raises_for_unknown_name
- test_get_tool_schemas_returns_all_specs
- test_tool_spec_is_frozen
- test_tool_parameter_is_frozen
- test_to_dict_round_trip_preserves_shape
- test_tool_parameter_to_dict_includes_enum
- test_tool_names_subset_of_models_agent_tool_names (cross-module invariant)
- test_register_idempotent_replaces_existing (hot-reload support)

NEW scripts/tier2/artifacts/any_type_componentization_20260621/:
- generate_mcp_tool_specs.py: idempotent generator from MCP_TOOL_SPECS
- generate_tool_specs.py: helper that emits registration lines
- inspect_mcp_specs.py: shape inspection
- _generated_registrations.txt: the 45 registration lines

Verified: 11/11 tests pass. The legacy MCP_TOOL_SPECS dict in mcp_client.py
still exists; this commit only ADDS the new module. Migration of call sites
in mcp_client.py + ai_client.py follows in t1_4 + t1_5.

Verified with:
  uv run pytest tests/test_mcp_tool_specs.py --timeout=30
    11 passed in 3.01s
2026-06-21 16:06:29 -04:00
ed bf1f11ed6c conductor(plan): fill t0_5 commit_sha + phase_0 checkpoint 2026-06-21 16:00:05 -04:00
ed 6e6ba90e39 conductor(plan): mark t0_1-t0_4 complete + Phase 0 done (t0_5 partial)
Phase 0 (Shared scaffolding) commits:
- t0_1 (647ad3d4): tests/test_audit_dataclass_coverage.py (RED)
- t0_2 (cfdf8988): scripts/audit_dataclass_coverage.py + baseline.json (GREEN; baseline = 207)
- t0_3 (4e658dd2): src/type_aliases.py JsonPrimitive + JsonValue
- t0_4 (a28d8723): styleguide 12 'When to Promote TypeAlias to dataclass'
- t0_5 (in_progress): Phase 0 checkpoint (commit hash filled in this commit)

state.toml updates:
- current_phase: 0 -> 1
- phase_0.status: pending -> completed
- t0_1..t0_4: pending -> completed (with commit_sha)
- t0_5: pending -> in_progress

Next: Phase 1 - mcp_tool_specs (8 tasks).
2026-06-21 15:59:36 -04:00
ed a28d8723a8 docs(styleguide): add 12 'When to Promote TypeAlias to dataclass' (t0_4)
Phase 0 of any_type_componentization_20260621. Adds the canonical
decision rule that future contributors can apply without re-deriving:

- TypeAlias conditions: open shape, self-describing, transient
- dataclass(frozen=True) conditions: known fields, multi-site access,
  stable serialization, shared across modules
- The src/vendor_capabilities.py reference pattern (5 properties)
- Decision tree
- The 5 worked examples (89 sites promoted per the audit)
- Cross-references to audit scripts + input artifact + track

This is the canonical artifact for the 'when to dataclass' question;
subsequent phases refer to it via 'see styleguide 12' rather than
re-deriving the rule.
2026-06-21 15:58:42 -04:00
ed 4e658dd25c feat(types): add JsonPrimitive + JsonValue TypeAliases (t0_3)
Phase 0 of any_type_componentization_20260621. Extends src/type_aliases.py
with two recursive-friendly TypeAliases for JSON wire format (used by
Phase 5 api_hooks WebSocketMessage):

- JsonPrimitive: str | int | float | bool | None
- JsonValue: JsonPrimitive | list['JsonValue'] | dict[str, 'JsonValue']

The forward-ref 'JsonValue' strings work because from __future__ import
annotations is at the top of the module (PEP 563 + PEP 613 TypeAlias).

Tests added (4 new, 14 total):
- test_json_primitive_alias_resolves_to_union: hints exposes JsonPrimitive
- test_json_value_alias_resolves_to_recursive_union: hints exposes JsonValue
- test_json_value_accepts_primitive_dict: dict[str, JsonValue] runtime use
- test_json_value_accepts_nested_structures: nested dict+list round-trip

Verification:
  uv run pytest tests/test_type_aliases.py --timeout=30
    14 passed in 2.97s
2026-06-21 15:57:40 -04:00
ed cfdf8988fb feat(audit): add scripts/audit_dataclass_coverage.py + baseline (t0_2)
GREEN phase for Phase 0. Mirrors scripts/audit_weak_types.py design with
3 additions specific to the any-type componentization track:

1. PROMOTED_SITE_MODULES allowlist: the 3 new src/ modules
   (mcp_tool_specs.py, openai_schemas.py, provider_state.py) are exempt
   from Any-counting (their new dataclasses intentionally have raw_response: Any
   and SDK holder fields that stay as Any per Pattern 3).
2. INLINE_PROMOTED_SITE_MODULES: log_registry.py + api_hooks.py get their
   dataclasses added inline in Phase 4 + 5 (not new modules); same exemption.
3. Combined counter: counts both Any AND weak-struct patterns
   (dict_str_any, list_of_dict, optional_dict, etc.).

Modes:
- default: informational (exits 0; prints human report)
- --json: machine-readable with by_file, by_category, total_weak
- --strict: CI gate (exits 1 when current > baseline)
- --baseline: path to baseline file (default: scripts/audit_dataclass_coverage.baseline.json)

Baseline: scripts/audit_dataclass_coverage.baseline.json = 207 weak sites
(captured pre-Phase-1; expected to drop to ~118 after 89 sites promoted).

Verification:
  uv run python scripts/audit_dataclass_coverage.py --strict
    STRICT OK: 207 weak sites <= baseline 207
  uv run pytest tests/test_audit_dataclass_coverage.py --timeout=30
    7 passed in 5.15s
2026-06-21 15:56:41 -04:00
ed 647ad3d49d test(audit): add tests/test_audit_dataclass_coverage.py (t0_1)
RED phase for Phase 0. Mirrors tests/test_audit_weak_types.py structure:
- test_audit_script_exists: AUDIT_SCRIPT.is_file() sanity
- test_audit_help_runs: --help exits 0
- test_audit_json_mode_emits_valid_json: --json emits valid JSON with expected fields
- test_audit_default_mode_emits_human_report: default mode prints a report
- test_audit_strict_mode_against_existing_baseline_passes: --strict exits 0 when current <= baseline
- test_audit_strict_mode_fails_when_baseline_is_zero: --strict exits 1 when current > baseline=0
- test_audit_baseline_field_shape: --json output has expected baseline-shape fields

7 tests total. Run with: uv run pytest tests/test_audit_dataclass_coverage.py --timeout=30

NOTE: 6 of 7 tests fail at this commit (audit script not yet implemented).
This is the RED phase; GREEN comes in the next commit.
2026-06-21 15:56:19 -04:00
ed 3669ce590c conductor(plan): author plan.md for any_type_componentization_20260621
The spec.md was approved 2026-06-21 without a plan.md (the metadata.json
noted 'plan.md (to be authored by writing-plans skill after spec
approval)'). This plan mirrors the state.toml's per-task ledger and
specifies the TDD protocol, tier-3 delegation conventions, hard bans,
failcount contract, and per-phase verification commands.

Plan structure: 7 phases, 61 tasks, ~50 atomic commits per the spec.
Reads all 13 conductor/code_styleguides/*.md per the agent mandate.
2026-06-21 15:53:28 -04:00
ed f1c23c7da5 conductor(plan): any_type_componentization_20260621 - 7 phases, 23 tasks, ~150 TDD steps
Implements the 5 fat-struct candidates from docs/reports/ANY_TYPE_AUDIT_20260621.md:

- Phase 0: JsonValue TypeAlias + audit_dataclass_coverage.py + styleguide section 12
- Phase 1: src/mcp_tool_specs.py (P1, 8 sites)
- Phase 2: src/openai_schemas.py (P1, 17 sites)
- Phase 3: src/provider_state.py (P2, 41 sites)
- Phase 4: src/log_registry.py Session (P2, 7 sites)
- Phase 5: src/api_hooks.py WebSocketMessage (P3, 16 sites)
- Phase 6: verify + docs + archive

Blocked by data_structure_strengthening_20260606 (pending merge).
Sequencing: NOT blocked by code_path_audit_20260607 (orthogonal tracks).

Tier 2 autonomous sandbox will execute via:
  /tier-2-auto-execute any_type_componentization_20260621

Spec: conductor/tracks/any_type_componentization_20260621/spec.md (approved 2026-06-21)
Plan: this commit
State: conductor/tracks/any_type_componentization_20260621/state.toml
Metadata: conductor/tracks/any_type_componentization_20260621/metadata.json
2026-06-21 15:46:25 -04:00
ed 46a2245658 conductor(plan): mark Phase 0+1+2 init tasks complete in umbrella plan.md 2026-06-21 15:45:39 -04:00
ed ebadfda9d6 docs(reports): TRACK_COMPLETION for video_analysis_campaign_20260621 (Phase 0+1+2 init only) 2026-06-21 15:44:06 -04:00
ed 365fa554d9 conductor(plan): mark Phase 0+1 complete + Phase 2 init complete in umbrella state.toml 2026-06-21 15:42:39 -04:00
ed c1a15c45c5 conductor(tracks): scaffold plan.md + metadata.json + state.toml for 12 child + 1 synthesis tracks 2026-06-21 15:41:38 -04:00
ed 548c4fef63 feat(video_analysis): synthesize_report.py orchestrator with TDD (5 tests) 2026-06-21 15:39:22 -04:00
ed ed0d198afe feat(video_analysis): ocr_frames.py with TDD (4 tests, winsdk + tesseract backends) 2026-06-21 15:35:41 -04:00
ed 9ccdedeeb3 feat(video_analysis): extract_keyframes.py with TDD (4 tests) 2026-06-21 15:34:18 -04:00
ed 45a5e81406 feat(video_analysis): download_video.py with TDD (5 tests) 2026-06-21 15:32:46 -04:00
ed 94f4a4eee9 feat(video_analysis): extract_transcript.py with TDD (8 tests) 2026-06-21 15:31:42 -04:00
ed 12fcc55cfc chore(scripts): scaffold scripts/video_analysis/ + placeholder test 2026-06-21 15:26:56 -04:00
ed 1c05305a98 chore(deps): add yt-dlp, cv2, imagehash, pillow, youtube-transcript-api, winsdk, pytesseract for video_analysis campaign 2026-06-21 15:26:02 -04:00
ed a22e0f5473 Merge branch 'tier2/data_structure_strengthening_20260606' 2026-06-21 15:15:22 -04:00
ed 3529161b0f conductor(track): add TIER2_STARTER.md for video_analysis_campaign dispatch
3 prompt templates for Tier 2 autonomous agents:
1. Umbrella Tier 2 (Phase 0+1+2 init): installs tooling, builds 5 scripts, scaffolds 12 children
2. Per-child Tier 2 (one child's 5-phase pipeline): Acquire, Keyframes, OCR, Synthesis, Verification
3. Synthesis Tier 2 (after all 12 children): cross-cutting per_video_summary.md + report.md

Includes: file-read order, key risks, hard constraints, verification criteria, per-track Tier 2 dispatch commands, and a quick-reference table.
2026-06-21 15:13:24 -04:00
ed 6533b7120c conductor(plan): enhance video_analysis_campaign plan with bite-sized Phase 0+1
Phase 0 (4 tasks): yt-dlp install, cv2/imagehash/PIL install, OCR backend decision, scripts/ namespace scaffold
Phase 1 (5 tasks = 5 scripts): extract_transcript.py (8 tests), download_video.py (5 tests), extract_keyframes.py (4 tests), ocr_frames.py (4 tests), synthesize_report.py (5 tests)
Phase 2-4: brief pointers (per-child plans deferred to Tier 2 during execution)

Total: 26 unit tests across 5 test files. All scripts follow Result[T] convention + 1-space indent + type hints per project styleguides.
2026-06-21 15:08:20 -04:00
ed de01131349 conductor(tracks): Register video_analysis_campaign_20260621 as active research track (row 26)
- Added row 26 in Active Tracks table: priority A (research), independent, multi-pass handoff
- Added detailed section under 'Active Research Tracks (2026-06+)' so the anchor link resolves
- Documents: 12 videos in 5 clusters, per-child deliverables, reusable tooling, Phase 0 blockers, Pass 2/3 handoff contract
2026-06-21 15:05:58 -04:00
ed 1b40fa5345 conductor(video_analysis): Initialize 12 child + 1 synthesis spec scaffolds
Each child spec is lightweight (~100 lines): references the umbrella, gives video details, specifies the 7 deliverables (transcript.json, frames/, ocr.md, report.md 1000-10000 LOC, summary.md), and the 5-phase pipeline.

Children in execution order:
1. cs229_building_llms (Stanford CS229, Cluster E)
2. probability_logic (Cluster A)
3. entropy_epiplexity (Cluster A)
4. score_dynamics_giorgini (Cluster A)
5. platonic_intelligence_kumar (Cluster B)
6. free_lunches_levin (Cluster B)
7. generic_systems_fields (Cluster C)
8. brain_counterintuitive (Cluster C)
9. neural_dynamics_miller (Cluster C)
10. multiscale_hoffman (Cluster C)
11. cs336_architectures (Stanford CS336, Cluster E)
12. creikey_dl_cv (Cluster D)

Plus 1 synthesis track (video_analysis_synthesis_20260621) blocked_by all 12 children.
2026-06-21 15:03:10 -04:00
ed b184250b78 conductor(video_analysis_campaign): Initialize umbrella track + 12 child + 1 synthesis scaffold
Pass 1 of 3 user research campaign (12 videos, 5 clusters).
- Umbrella: spec.md (full design), plan.md, metadata.json, state.toml, README.md
- Multi-pass framing (Pass 2 de-obfuscation, Pass 3 projection)
- Lossless preservation directive (1000-10000 LOC per video report target)
- Tooling prerequisites: yt-dlp, cv2, imagehash install in repo venv
- 5 reusable scripts to live in scripts/video_analysis/ (TDD)
- 12 children + 1 synthesis = 14 folders total
2026-06-21 15:02:44 -04:00
ed aca84b881b docs(reports): ANY_TYPE_AUDIT_20260621 - Any-type usage & componentization opportunities 2026-06-21 14:28:16 -04:00
ed c4c45d4a54 conductor(plan): rewrite chronology_20260619 plan for v2 (11 phases, 4 pause points)
Replaces the v1 plan (10 phases, single-stage cross-check) with an 11-phase
plan that executes the v2 spec's git-history classifier + 3-stage cross-check
+ 30% quality gate. Plan Phase 2 = Spec Phase 2 part 1; renumbering shifts
from Plan Phase 4 onwards (per the spec-vs-plan mapping in the summary table).

11 phases, 28 tasks, 4 hard pause points (Plan Phase 6 quality gate, Plan
Phase 7 Tier 1 review, Plan Phase 10 user sign-off, plus the Plan Phase 6
ABORT fallback to manual review). TDD red+green cycles for Phases 2-4 (8
new tests for _classify_status + 4 for extract_summary + 3 for format_markdown
+ 5 for the quality gate).

Test runner: scripts/run_tests_batched.py (per Tier 2 sandbox rule #1).
Throw-away scripts: scripts/tier2/artifacts/chronology_20260619/ (rule #4).
Default branch: master (rule #2). Line endings: preserve existing (rule #3).
2026-06-21 14:12:03 -04:00
ed 5c9249659f conductor(spec): rewrite chronology_20260619 spec for v2 (git-history classifier + 30% quality gate)
The first run shipped chronology.md with a status classifier that read stale
metadata.json.status, marking 167/216 rows with wrong status. This v2 spec
replaces FR1 (5-value status enum + per-row evidence + confidence), FR5
(git-history classifier with the 5-step algorithm from the handover), FR6
(3-stage cross-check), and adds FR7 (classifier quality gate at 30% low
confidence threshold with abort-to-manual-review fallback).

Substantive changes from v1:
- 7 FRs (was 6); FR7 is new
- 14 VCs (was 12); VC10-VC14 are new
- 10 Risks (was 9)
- 5-value status enum: Active / In Progress / Completed / Abandoned / Special
  (was 6-value: Shipped/Superseded/etc.)
- Per-row evidence line format documented with worked example
- 'Needs Review' section as a 5th section in chronology.md
- Quality gate hard-codes the user's 'A only if classifier is good, else B'
  fallback design from chat 2026-06-21

Out of scope: 24 v1 commits + conductor/chronology.md.broken-v1 remain as the
foundation; this is a continuation, not a re-do. state.toml still shows
current_phase=10 from v1's false completion; the Tier 2 implementing agent
will reset it in Phase 1.4 of the plan.
2026-06-21 14:08:40 -04:00
ed 6210410cda conductor(plan): mark all phases/tasks complete in data_structure_strengthening_20260606 2026-06-21 13:07:58 -04:00
ed bb4d85e4b4 conductor(tracks): mark data_structure_strengthening_20260606 as shipped 2026-06-21 13:05:52 -04:00
ed d3205c7253 conductor(archive): ship data_structure_strengthening_20260606 to archive 2026-06-21 13:03:34 -04:00
ed dff1dbb812 docs(reports): TRACK_COMPLETION_data_structure_strengthening_20260606 2026-06-21 13:03:07 -04:00
ed 60196a8723 docs(smoke): Phase 2 smoke test for data structure strengthening track 2026-06-21 13:02:00 -04:00
ed c9c5abfbae docs(product-guidelines): add Data Structure Conventions section 2026-06-21 13:01:19 -04:00
ed 7a52fca588 docs(styleguide): add canonical reference for type aliases convention 2026-06-21 12:59:41 -04:00
ed f8990dae11 docs(type_registry): initial auto-generated registry (Phase 2) 2026-06-21 12:57:49 -04:00
ed f7c16954d4 feat(generate_type_registry): AST-based registry generator with --check and --diff modes 2026-06-21 12:57:32 -04:00
ed 281cf0f01e test(generate_type_registry): add red tests for the registry generator 2026-06-21 12:49:15 -04:00