Build step 2 of 5 — Phase K (umbrella #215)
Build doc: documentation/plans/phase-k-build-plan.md §4 Step K.2
What to build
Add themes: list[str] and notable_moments: list[str] fields to the per-version manifest schema. snapshot_current() writes them as [] by default. Add set_themes() and add_notable_moment() helpers in registry.py.
Existing context
src/orchestrator/registry.py — current registry: list_versions(), get_version_dir(), get_manifest(). Manifest fields today: version, parent, git_sha, fingerprints, lineage.
bots/<version>/manifest.json — per-version manifest file; owned by snapshot_current().
- Backwards compat: reading an OLD manifest (no
themes field) must NOT crash. Use dict.get("themes", []) in all readers.
Files to modify/create
src/orchestrator/registry.py — extend manifest schema, add set_themes() and add_notable_moment() helpers.
src/orchestrator/snapshot.py — snapshot_current() writes default [] for new fields.
tests/test_registry.py — extended.
tests/test_snapshot.py — extended.
Done when
- Snapshotting
v0 → v1 produces a manifest with the new fields populated as [].
- Reading an OLD manifest (no
themes key) doesn't crash; helpers return [].
uv run mypy src --strict + uv run ruff check clean.
Flags
--reviewers code --isolation worktree
Depends on
K.1.
Produces
Manifest schema extension + helpers + extended tests.
Synced from build doc by /repo-sync
Build step 2 of 5 — Phase K (umbrella #215)
Build doc: documentation/plans/phase-k-build-plan.md §4 Step K.2
What to build
Add
themes: list[str]andnotable_moments: list[str]fields to the per-version manifest schema.snapshot_current()writes them as[]by default. Addset_themes()andadd_notable_moment()helpers inregistry.py.Existing context
src/orchestrator/registry.py— current registry:list_versions(),get_version_dir(),get_manifest(). Manifest fields today: version, parent, git_sha, fingerprints, lineage.bots/<version>/manifest.json— per-version manifest file; owned bysnapshot_current().themesfield) must NOT crash. Usedict.get("themes", [])in all readers.Files to modify/create
src/orchestrator/registry.py— extend manifest schema, addset_themes()andadd_notable_moment()helpers.src/orchestrator/snapshot.py—snapshot_current()writes default[]for new fields.tests/test_registry.py— extended.tests/test_snapshot.py— extended.Done when
v0 → v1produces a manifest with the new fields populated as[].themeskey) doesn't crash; helpers return[].uv run mypy src --strict+uv run ruff checkclean.Flags
--reviewers code --isolation worktreeDepends on
K.1.
Produces
Manifest schema extension + helpers + extended tests.
Synced from build doc by /repo-sync