{
  "track_id": "prior_session_sepia_20260610",
  "name": "Prior-Session Sepia Tint",
  "initialized": "2026-06-10",
  "owner": "tier2-tech-lead",
  "priority": "C",
  "status": "planning",
  "type": "feature",
  "scope": {
    "new_files": [
      "tests/test_prior_session_amount.py",
      "tests/test_prior_session_tint.py",
      "tests/test_prior_session_toml.py",
      "tests/test_prior_session_render.py",
      "tests/test_prior_session_persistence.py"
    ],
    "modified_files": [
      "src/theme_2.py",
      "src/theme_models.py",
      "src/gui_2.py",
      "themes/10x_dark.toml",
      "themes/binks.toml",
      "themes/gruvbox_dark.toml",
      "themes/monokai.toml",
      "themes/moss.toml",
      "themes/nord_dark.toml",
      "themes/solarized_dark.toml",
      "themes/solarized_light.toml"
    ]
  },
  "blocked_by": [],
  "blocks": [],
  "estimated_phases": 4,
  "spec": "spec.md",
  "plan": "plan.md (to be authored by writing-plans skill)",
  "design_doc": "../../docs/superpowers/specs/2026-06-10-prior-session-sepia-design.md",
  "parent_track": null,
  "sibling_tracks": [
    "multi_themes_20260604",
    "prior_session_test_harden_20260605"
  ],
  "architectural_invariant": "All math in the sepia transform pipeline is float (no integer truncation). The transform is composed in the view layer (one-line wraps at 6 prior-session call sites in src/gui_2.py) rather than auto-applied by theme.get_color() — the view composes, per the data-oriented principle in product-guidelines.md.",
  "math_constraint": "FLOAT-ONLY. apply_prior_tint, the per-palette _prior_session_amount dict, the slider (imgui.slider_float), and the TOML key (prior_session_amount: float) all use float throughout. No int(0.5 * 255) or any other integer truncation in the transform pipeline. The only int 0-255 values are the TOML inputs and imgui.ImVec4 component representation (which is already float). apply_color_grades_to_editor_palette is NOT in this track (see spec §1.1.1).",
  "threading_constraint": "No new threads. The new helpers run on the render thread (the only thread that calls theme_2 helpers from the GUI). Persistence uses the existing app._flush_to_config() / save_config() flow.",
  "user_requirement": "Default per-theme prior_session_amount = 0.3 (subtle). Slider in the Theme Settings panel (mirrors the existing Tone Mapping section). Per-palette state with per-palette TOML defaults. Falls back to scope (iii) (whole window tint) if scope (ii) doesn't look 'obviously old' in manual review.",
  "verification_criteria": [
    "All 3 new theme slots (prior_session_bg, prior_session_tint, prior_session_amount) present in ThemePalette, fallback dict, and all 8 themes/*.toml",
    "_prior_session_amount per-palette dict implemented with get/set/reset; persists to config.toml; restores on next launch",
    "apply_prior_tint: identity at 0.0, pure tint at 1.0, monotonic, alpha-preserved, all-float, all values in [0,1]",
    "6 prior-session render sites in src/gui_2.py use prior_session_bg (not bubble_vendor); content is sepia-tinted via apply_prior_tint",
    "Theme Settings panel has working 'Prior Session Sepia (Per-Palette)' section with slider 0.0-1.0 and Reset button",
    "All new tests pass (test_prior_session_amount, test_prior_session_tint, test_prior_session_toml, test_prior_session_render, test_prior_session_persistence)",
    "HONEST DISCLOSURE in final report: code-block tonemap-awareness is NOT fixed (upstream imgui_bundle 1.92.5 API does not expose per-instance Palette struct; only 4-value enum). Track ships without the code-block fix.",
    "No regressions in 273+ existing live_gui tests (batch-verified, not isolation)",
    "Manual smoke: prior-session look is 'obviously old' at default 0.3; slider scales smoothly (no integer stepping artifacts); value persists across restart; switching themes snaps to new default",
    "No diagnostic stderr writes in production code (per AGENTS.md 'No Diagnostic Noise in Production' rule)",
    "No git restore / git checkout -- / git reset without explicit user permission (HARD BAN per AGENTS.md)"
  ],
  "links": {
    "design_doc": "../../docs/superpowers/specs/2026-06-10-prior-session-sepia-design.md",
    "sibling_track": "../multi_themes_20260604/",
    "predecessor_track": "../prior_session_test_harden_20260605/",
    "related_docs": [
      "docs/guide_themes.md",
      "docs/guide_testing.md",
      "docs/guide_architecture.md",
      "docs/guide_app_controller.md"
    ]
  }
}
