99 lines
8.4 KiB
YAML
99 lines
8.4 KiB
YAML
project:
|
|
name: Repixelizer
|
|
status: active
|
|
phase: phase_field_stabilization
|
|
premise: >
|
|
Recover fake pixel art by inferring a real lattice and moving one
|
|
displacement field under one coherent objective instead of piling up
|
|
decorative solver machinery.
|
|
|
|
objective:
|
|
primary: >
|
|
Produce true grid-aligned output that preserves silhouette and internal
|
|
structure better than resize baselines on icons, emblems, logos, and simple
|
|
sprites.
|
|
current: >
|
|
Keep the phase-field pipeline lean and coherent while improving the tracked
|
|
sword-tip contour failure near tapered shapes without reviving optimizer
|
|
sprawl.
|
|
|
|
constraints:
|
|
- Prefer one field, one compact objective, and nearest-source final sampling.
|
|
- Use visible structure and focused fixtures, not just lattice proxy metrics.
|
|
- Keep compare mode, diagnostics, tuning, and GUI observer surfaces working.
|
|
- Avoid reviving trays, portrait layers, or multi-stage solver religions.
|
|
- Treat hosted convenience as the product path; do not prioritize native desktop packaging unless it clearly beats hosted access on revenue, support burden, or strategy.
|
|
|
|
invariants:
|
|
- The map is canonical and slow-changing.
|
|
- Scratch is temporary and disposable.
|
|
- Evidence is durable and distilled; routine activity logs belong in git history, diagnostics, benchmark artifacts, or commit messages.
|
|
- The live pipeline is `source -> lattice inference -> edge analysis -> phase-field reconstruction -> cleanup -> optional palette fit -> diagnostics`.
|
|
- `phase-field` is the only live reconstruction engine.
|
|
- The final image is emitted by nearest-source sampling from `uv0_px + disp_t`, not by bilinear output sampling.
|
|
- If a change cannot be explained cleanly against `docs/lean-optimizer-algorithm-map.md`, it should not land.
|
|
- Failed benchmark or regression fixes should be reverted before the next hypothesis.
|
|
- Persistent state cruft is the same failure class as code cruft.
|
|
|
|
data_flow:
|
|
observe:
|
|
- task request
|
|
- repository state
|
|
- focused fixtures and diagnostics
|
|
- algorithm map and implementation plan
|
|
process:
|
|
- rehydrate from canonical state
|
|
- choose one bounded hypothesis
|
|
- modify only the surface that deserves to exist
|
|
- verify visually and numerically
|
|
- distill belief-changing evidence
|
|
- commit or backtrack
|
|
cut:
|
|
- revert failed code hypotheses immediately
|
|
- reject proxy-only wins when the image got worse
|
|
- trim duplicate or stale persistent notes instead of preserving them as fake continuity
|
|
|
|
active_subgoals:
|
|
- Fix the tracked sword-tip contour widening without sacrificing the current internal linework win.
|
|
- Improve along-stroke versus across-stroke behavior near tapered contours in a way that still fits the one-field optimizer model.
|
|
- Keep inference, compare mode, diagnostics, tuning, and GUI observer events working after solver changes.
|
|
- Preserve `source_structure` as a real objective signal instead of over-trusting lattice-only fidelity.
|
|
- Keep Heimdall-backed hosted auth isolated to the web layer so future provider or session work does not contaminate self-host or solver code.
|
|
|
|
accepted_design:
|
|
- `phase-field` in `src/repixelizer/phase_field.py` is the only live reconstruction engine.
|
|
- The working pipeline is `source image -> lattice inference -> edge analysis -> phase-field reconstruction -> cleanup -> optional palette fit -> diagnostics`.
|
|
- `src/repixelizer/pipeline.py` owns orchestration and candidate rerank selection.
|
|
- `src/repixelizer/analysis.py` provides the normalized edge scout used for loss and cleanup guidance.
|
|
- `src/repixelizer/phase_field.py` owns the one honest optimization variable: `disp_t`.
|
|
- Hosted demo jobs now use a direct autocorr lattice path: one consensus size, capped by the hosted output limit, with candidate rerank disabled.
|
|
- Hosted mode owns the public front door in `src/repixelizer/gui.py`: `/` is a landing page there, while local/self-host runs keep root as a plain redirect to `/app/`.
|
|
- `src/repixelizer/access.py` now owns the hosted access seam: trusted-header ingress still works, `GC_ACCESS_MODE=heimdall` verifies Heimdall Ed25519 access tokens locally, and auth attempts are adopted into local httpOnly cookie sessions.
|
|
- The optimizer starts from fixed lattice centers, uses a wider displacement budget than the earlier tighter leash, optimizes displacement with projected Adam, then rounds to real source pixels for final output.
|
|
- Cleanup is local and secondary; it does not define the core reconstruction model.
|
|
- `source_fidelity` is useful but incomplete; `source_structure` exists because visible structure can improve while lattice-only scoring complains.
|
|
- The tracked badge fixture and sword-tip focus are the current reality check for solver changes.
|
|
- The algorithm map and forward plan must stay separate from scratch and evidence so the notes do not congeal into one giant lying blob.
|
|
- The open-source distribution story is self-hosting; the paid offer is hosted convenience, not a desktop-app paywall.
|
|
|
|
landed_baseline:
|
|
- Lattice inference with fixed or searched target dimensions and optional low-confidence candidate rerank.
|
|
- Hosted demo inference uses a direct autocorr size pick instead of multi-size search, and it no longer silently pins unspecified jobs to `max_output_dimension`.
|
|
- Edge analysis plus one displacement-field optimizer with projected constraints.
|
|
- Compare mode, diagnostics writing, tuning, and GUI observer plumbing all working on the phase-field path.
|
|
- `source_structure` reporting alongside `source_fidelity`.
|
|
- Focus fixture `tests/fixtures/real/ai-badge-tip-focus.json` for the tracked tapered-contour blemish.
|
|
|
|
rejected_paths:
|
|
- name: tray_optimizer_sprawl
|
|
reason: the old tray-based optimizer added machinery without preserving the current lean model
|
|
- name: metric_worship
|
|
reason: lattice-only fidelity can call visibly better outputs worse
|
|
- name: multi_stage_solver_religion
|
|
reason: stacked stages and compensators hide confusion instead of fixing the one-field model
|
|
- name: projected_edge_spectrum_prior
|
|
reason: the projected edge-energy spectral pass floor-hugged to 2px / 626-family aliases on the dense landscape fixture and did not justify its complexity
|
|
|
|
current_status:
|
|
summary: The repo has one live reconstruction engine, `phase-field`, wired through the main pipeline with lattice inference, edge analysis, projected displacement optimization, cleanup, optional palette fitting, diagnostics, compare mode, tuning, and GUI observer events. The searched lattice path now trusts autocorrelation only; it keeps a tiny near-best lag plateau and uses cross-axis consensus before collapsing to one lattice family. The hosted demo path now skips multi-size lattice search and candidate rerank entirely, taking one direct autocorr-consensus size and respecting the hosted output cap instead of silently pinning unspecified jobs to that cap. Hosted web access is now auth-landed without smearing into the solver: `src/repixelizer/access.py` verifies Heimdall Ed25519 access tokens locally, tracks auth attempts, and adopts local cookie sessions, while `src/repixelizer/gui.py` owns provider-start routes, direct backend callback receipt, the hosted landing-page login buttons, route guards, and queue/job ownership checks. Self-host remains permissive by default unless `GC_ACCESS_*` turns the seam on. The spectral prior experiment was removed after it floor-hugged to 2px / 626-family aliases on the dense landscape fixture, and the old change-interval / pixel-walk sizing path was cut after it kept pruning the badge away from the `126` family. The solver now has a wider displacement budget so moderate starting-grid error can be recovered by the field instead of requiring as much candidate-rerank ceremony. `source_structure` now rides alongside `source_fidelity` because lattice-only scoring was lying about visible quality. The tracked weakness is still the widened dark contour near the badge sword tip on tapered shapes.
|
|
next_action: After rehydrate, if the user wants more hosted auth work, keep it inside `src/repixelizer/access.py` and `src/repixelizer/gui.py` with bounded polish such as provider expansion, session UX, or persistence hardening. Otherwise resume one bounded solver hypothesis for along-stroke versus across-stroke behavior in `src/repixelizer/phase_field.py` against the pinned badge case and `tests/fixtures/real/ai-badge-tip-focus.json`, and revert immediately if the visual result or `source_structure` does not clearly improve.
|