567 lines
37 KiB
Markdown
567 lines
37 KiB
Markdown
# Project
|
||
|
||
This document is the source of truth for project intent, scope, runtime facts, and operational expectations.
|
||
|
||
For implementation structure, see [ARCHITECTURE.md](ARCHITECTURE.md). For engineering standards, see [CONVENTIONS.md](CONVENTIONS.md).
|
||
For the current app status, see [CURRENT_STATUS.md](CURRENT_STATUS.md).
|
||
For the next scan-result and artifact-inventory product phase, see
|
||
[scanner-results-inventory-roadmap.md](scanner-results-inventory-roadmap.md).
|
||
For the 2026-07-09 scanner merge evidence, see [MERGE_READINESS.md](MERGE_READINESS.md).
|
||
For Gitea push/authentication setup, see [GITEA_AUTH.md](GITEA_AUTH.md).
|
||
For the completed evaluation/offline phases and executed live acceptance, see
|
||
[ARTIFACT_EVALUATION_OFFLINE_VALIDATION_2026-07-10.md](ARTIFACT_EVALUATION_OFFLINE_VALIDATION_2026-07-10.md)
|
||
and [NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md](NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md),
|
||
plus the current-build [NATIVE_SCANNER_LIVE_SMOKE_2026-07-11.md](NATIVE_SCANNER_LIVE_SMOKE_2026-07-11.md).
|
||
For the score-free Build-Fit V1 data and safety contract, see
|
||
[BUILD_FIT_CONTRACT_V1.md](BUILD_FIT_CONTRACT_V1.md).
|
||
For the current English-default UI, local-result removal, timing, and reviewed
|
||
OCR-corpus checkpoint, see
|
||
[LOCALIZATION_LOCAL_DELETION_TIMING_CHECKPOINT_2026-07-11.md](LOCALIZATION_LOCAL_DELETION_TIMING_CHECKPOINT_2026-07-11.md).
|
||
|
||
## Project Identity
|
||
|
||
| Field | Value |
|
||
| --- | --- |
|
||
| Project name | Genshin Artifact Assistant |
|
||
| Status | Artifact-first native scanner with historical live-accepted dev 5/20/50/100, packaged bounded/UI paths, and a complete packaged 2,211-Artifact inventory soak; scanner-first Galaxy UI, explicit review/promotion gates, deterministic roll-efficiency, an English-default/Deutsch-selectable app UI, local-only artifact removal, durable timing evidence, and an offline-tested source-bound Build-Fit evidence-ranking layer. The current-build elevated-dev 50-artifact smoke now passes its functional/safety gate; the 3/s performance target remains separate and unproven. |
|
||
| Platform | Windows desktop |
|
||
| Target users | Genshin Impact players who want artifact decisions without complex optimizer setup |
|
||
| Runtime | Electron app with React UI and TypeScript |
|
||
|
||
## Vision
|
||
|
||
Genshin Artifact Assistant should make artifact management feel like a no-brainer. The user opens Genshin, runs a scan, and receives simple decisions: what is good, who can use it, what can probably be marked as trash, and which builds are currently available.
|
||
|
||
The app is not intended to replace deep min-max tools. It prioritizes time savings, confidence, and understandable recommendations over perfect theorycrafting.
|
||
|
||
## Goals
|
||
|
||
- Make artifact scanning stable enough that a normal user can trust it without babysitting every click.
|
||
- Build one local canonical Genshin data package for artifact sets, pieces, slots, stats, and characters.
|
||
- Parse artifact name, slot, main stat, substats, set, equipped state, and confidence deterministically against that package.
|
||
- Save weak or failed reads automatically as review samples and turn corrections into reusable local fixes.
|
||
- Present finished scan results as a compact artifact list instead of a debug-heavy live stats surface.
|
||
- Make scan readiness, the primary scan action, progress, and safe next steps understandable without opening technical views.
|
||
- Make the primary scan cover the recognized owned Artifact inventory by
|
||
default, while allowing an explicit limit by Artifact count or grid rows.
|
||
- Keep extraction confidence separate from artifact value so uncertain OCR becomes review, not a misleading low score.
|
||
- Provide a browsable local artifact inventory with detail views before promoting broader recommendations.
|
||
- Die sichtbare Sternreihe einer nativen Artefaktkarte direkt erfassen: Nur
|
||
explizit bestätigte 5★-Artefakte erhalten eine Roll-Efficiency-Bewertung;
|
||
bestätigte 1–4★-Artefakte bleiben als manuell prüfbare Ergebnisse erhalten.
|
||
- Keep the app offline-first and usable without optimizer imports, Enka, HoYoLAB,
|
||
or any external scanner as a core dependency.
|
||
- Re-introduce recommendations only after the scanner base is trustworthy.
|
||
|
||
## Non-Goals
|
||
|
||
- No memory reads, process hooks, game modification, packet inspection, or anti-cheat bypassing.
|
||
- Keine automatische Bergung, Quick-Select-Auswahl, Löschung, Fütterung,
|
||
Verbesserung, Sperr-/Entsperraktionen oder Ressourcenverbrauch — auch nicht
|
||
für erkannte 1–4★-Artefakte.
|
||
- No advanced formula editor or full power-user optimizer in the MVP.
|
||
- No cloud sync by default.
|
||
|
||
## Functional Requirements
|
||
|
||
| ID | Requirement | Priority | Status |
|
||
| --- | --- | --- | --- |
|
||
| FR-001 | List capture sources and automatically prefer the detected Genshin window when available. | Must | Implemented |
|
||
| FR-002 | Read one currently opened artifact reliably from the local screen and show its parsed result. | Must | Implemented |
|
||
| FR-003 | Generate and maintain a local canonical Genshin data package for sets, pieces, slots, stats, characters, aliases, and UI profiles. | Must | Implemented baseline |
|
||
| FR-004 | Parse artifact fields only through deterministic matching, validation, and derivation against the canonical package. | Must | Implemented baseline |
|
||
| FR-005 | Run a stable automatic inventory scan: detect grid, click tile, verify detail change, parse, store, continue, scroll, resume. | Must | Implemented for visible-inventory baseline |
|
||
| FR-006 | Save low-confidence, failed, conflicting, or stale scans automatically as review samples with reason codes. | Must | Implemented baseline |
|
||
| FR-007 | Apply local learned fixes from review corrections before every new parse. | Must | Implemented baseline |
|
||
| FR-008 | Keep the scan UI operator-friendly: readiness and primary action first, preview plus result rail during scanning, debug in collapsed or secondary surfaces. | Must | Implemented scanner-first baseline |
|
||
| FR-009 | Provide account-level artifact triage after scanner trust is acceptable. | Should | Pending |
|
||
| FR-010 | Provide 1-3 simple build suggestions per character from owned artifacts after scanner trust is acceptable. | Should | Pending |
|
||
| FR-011 | Farming overlay for reward scans. | Later | Prototype shell |
|
||
| FR-012 | Show active scan results as a minimal right-side rail with artifact number, name or compact fallback, value score, and status pill. | Should | Implemented baseline |
|
||
| FR-013 | Provide a scanned artifact inventory view with compact score pills, filters, sorting, and click-through detail. | Should | Implemented baseline |
|
||
| FR-014 | Provide artifact detail evaluation with screenshot/crops, parsed fields, OCR confidence, value reasons, and optional upgrade projection. | Should | Implemented; packaged visual acceptance passed, under-level projection remains corpus-backed |
|
||
| FR-015 | Provide clear loading, success, review, blocked, and error feedback through progress, spinners, skeletons, and mutation toasts without hiding durable state. | Should | Implemented UI baseline |
|
||
| FR-016 | Die sichtbare Sternreihe je nativer Artefaktkarte erfassen; nur explizit bestätigte 5★-Artefakte bewerten, bestätigte 1–4★-Artefakte ohne Wertung mit Bild und Details in einer separaten schreibgeschützten `Nicht 5★`-Ansicht zeigen. | Must | Implementiert; aktueller 50er-Smoke bestanden |
|
||
| FR-017 | Provide an English-default application interface and let the user switch the renderer to German in Settings without changing the scanner contract. | Should | Implemented; built-renderer acceptance passed, elevated packaged-executable runtime remains separate |
|
||
| FR-018 | Let the user remove an incorrectly scanned artifact from local app data only, including its local crop when safe, without any Genshin mutation. | Should | Implemented, unit tested, and confirmation paths exercised; no data-removing test was run |
|
||
|
||
## Non-Functional Requirements
|
||
|
||
| Category | Requirement | Measurement |
|
||
| --- | --- | --- |
|
||
| Safety | Never perform irreversible in-game actions. | Code review and manual test |
|
||
| Evaluation safety | Explizit visuelle 1–4★-Evidenz wird ausgeschlossen; fehlende, widersprüchliche oder unsichere Stern-Evidenz geht in `Review`. | Result-/Replay-Tests und Detailprüfung |
|
||
| Performance | Single artifact read should feel interactive and batch scan should not stall on false progress. | Capture latency monitored manually; auto-scan stops on blocked verification |
|
||
| Performance | A 100-artifact visible-inventory run should finish cleanly with low review/miss rates and report timing evidence. | `npm run scan:goal:validated` or `npm run scan:goal:validated:wait` quality-gated report |
|
||
| Privacy | Captures and parsed data stay local by default. | No remote upload in scanner path |
|
||
| Reliability | Uncertain OCR must be visible to the user. | Confidence and details view |
|
||
| Score integrity | Extraction confidence and artifact value are separate concepts. | Review state can block or qualify a value score |
|
||
| Learning loop | Scanner mistakes should become reusable local review samples. | `review-samples.jsonl` |
|
||
| Maintainability | Scanner heuristics must be isolated and documented. | Parser tests, scan-loop tests, data generator, review sample pipeline |
|
||
| Usability | The default path should expose one primary next action and keep advanced controls secondary. | Scanner-first navigation and desktop visual acceptance |
|
||
| Accessibility | Focus, status, loading, and motion must remain understandable without relying on animation or color alone. | Keyboard review, ARIA status semantics, and `prefers-reduced-motion` |
|
||
|
||
## Tech Stack
|
||
|
||
| Area | Choice | Notes |
|
||
| --- | --- | --- |
|
||
| Desktop shell | Electron 43 | Windows local app and overlay windows |
|
||
| Frontend | React + TypeScript + Vite | UI and client state |
|
||
| Styling | CSS design tokens with dark Galaxy glass surfaces | Cinematic depth with restrained violet, cyan, gold, and semantic state accents |
|
||
| OCR | Tesseract.js prototype plus deterministic normalization/derivation | OCR alone is not trusted as the decision source |
|
||
| Capture | Electron desktopCapturer plus Windows GDI Smart Capture | GDI path is used for Genshin Smart Capture reliability |
|
||
| Input automation | C# sidecar with elevated dev runner when needed | Live-validated for read-only inventory selection clicks; see `docs/AUTOMATION_LIVE_SCAN.md` |
|
||
| Tests | Vitest 4 + TypeScript checks | OCR eval, helper/cleanup safety, Build-Fit contract/combination/profile/ranking/context gates, localization/deletion/timing tests, packaged acceptance runners, and saved-run replay |
|
||
| Packaging | electron-builder | Configured in `package.json` |
|
||
|
||
## Runtime
|
||
|
||
| Environment | Entry Point | Notes |
|
||
| --- | --- | --- |
|
||
| Local dev | `npm run dev` | Starts Vite and Electron |
|
||
| Local dev with automation | `npm run dev:admin` | Required when `GenshinImpact.exe` is elevated; Windows blocks lower-integrity cursor/click input |
|
||
| Production build | `npm run build` | Builds React and Electron main process |
|
||
| Complete non-live gate | `npm run acceptance:offline` | Runs tests, OCR/assessment gates, saved-run validation, fresh package build/verification, audits, and diff checks |
|
||
| Unpacked package | `npm run package:offline-check` | Builds helper/app and verifies ASAR/resources without launching Genshin |
|
||
| Saved-run replay | `npm run scan:native:replay` | Re-evaluates the newest existing native scan without capture or input |
|
||
| Saved-run evidence set | `npm run scan:native:validate:saved` | Validates requested accepted targets (bounded 20/50/100 or full 2,211), files, review provenance, replay, and projection boundaries without capture or input |
|
||
| Preview | `npm run preview` | Browser preview only; capture bridge is unavailable |
|
||
|
||
## Current State Review
|
||
|
||
### What already works
|
||
|
||
- The app can enumerate capture sources and often identify the Genshin window automatically.
|
||
- Single-artifact capture is no longer blind full-screen OCR; it produces detail crops, OCR blocks, parsed fields, confidence, and notes.
|
||
- A local canonical data package already exists in `src/data/genshinGameData.json`, generated from `genshin-db`.
|
||
- The parser already uses known sets, pieces, slots, stat aliases, set aliases, character aliases, and derived slot/set mapping.
|
||
- Review samples, learned replacements, parser notes, and stored artifacts already persist locally.
|
||
- The scan surface has a current-session result rail that starts empty; older
|
||
persisted Artifacts remain available in the dedicated inventory view.
|
||
- The auto-scan loop is no longer a naive click spammer: it has preflight, verification, miss handling, page fingerprinting, and stop conditions.
|
||
- The scanner now has a validated visible-inventory path: 32 safe artifact
|
||
targets per page, lookup-derived fields, fast OCR crop profile, and a
|
||
quality-gated live soak runner.
|
||
- Elevated live automation is validated in the current dev environment:
|
||
`/automation/probe-click?index=1` changed the selected artifact and
|
||
`/scanner/start?limit=2` completed with 2/2 verified reads and 0 misses.
|
||
- A 2026-07-08 visible-inventory 50-artifact run completed cleanly with
|
||
50/50 parsed and stored, 0 review, 0 duplicates, and 0 misses. It is stable
|
||
but still too slow for the 2-3 artifacts/second target.
|
||
- Later 2026-07-08 direct-GDI hot-path runs completed 20/20 parsed with
|
||
0 misses and 0 review. The best clean 20-artifact iteration reached
|
||
7285 ms, or roughly 2.75 artifacts/second; the final stable
|
||
`2026-07-08-direct-gdi-reviewfix` run completed in 7973 ms. The
|
||
3 artifacts/second target remains unproven.
|
||
- The same direct-GDI path completed a 100-artifact run with 100/100 parsed,
|
||
0 review, 0 misses, and 42064 ms elapsed across 4 pages.
|
||
- Review samples can now be exported with `npm run eval:review-candidates` into
|
||
a Git-ignored human-labeling worklist. This is the next quality phase before
|
||
adding more OCR corpus cases or trusting review queue data as labels.
|
||
- Native IK-style Artifact capture is wired through the C# helper. It writes
|
||
card crops and run artifacts for downstream OCR/parse processing instead of
|
||
making React do per-artifact work in the hot capture loop.
|
||
- The native result processor tails flushed capture jobs while the helper is
|
||
still scanning, evaluates them with four bounded workers, publishes ordered
|
||
live deltas, and writes incremental `scan-results.json` plus
|
||
`processing-report.json`. Parser confidence and IK set/piece/slot conflicts
|
||
remain reviewable, and store persistence stays opt-in.
|
||
- The Inventory view now has an Artifact-only pipeline surface for scope,
|
||
native capture, OCR queue, review gate, promotion, and evidence. Native rows
|
||
expose crop previews, IK/GOOD metadata, dry-run promotion state, and a
|
||
`Naechster Schritt` card.
|
||
- The active UI intentionally hides weapon, material, and character-detail IK
|
||
catalog coverage until those values are actually scanned.
|
||
- Clean Artifact results now receive deterministic `roll-efficiency-v1`
|
||
evaluations. Inventory/detail show score reasons and legal roll breakdown;
|
||
build fit remains explicitly deferred.
|
||
- Under-leveled, unambiguously identified 5-star Artifacts with four known
|
||
substats receive a detail-only Worst/Middle/Best projection. 4-star,
|
||
rarity-ambiguous, incomplete, or review data receives none.
|
||
- Existing 20/50/100 native results passed five-repeat offline determinism
|
||
replay; the approved 100-result run evaluated 100/100 with zero unknown.
|
||
- An Electron 43 unpacked app passed 27/27 static package checks and live launch
|
||
from `%TEMP%`. ASAR renderer, preload, IPC, packaged C# helper, IK resources,
|
||
elevation telemetry, Inventory UI, and a packaged 5-result dry run passed.
|
||
- The renderer now uses a scanner-first information architecture: Scanner,
|
||
Artifacts, Review, and the clearly labeled Builds preview form the workspace;
|
||
Overlay and Diagnostics remain secondary tools.
|
||
- The Scanner surface leads with Genshin/app readiness, one primary start/stop
|
||
action, a three-step empty state, explicit scan phases, and one modal for
|
||
scan scope, capture source, and manual tools. Inventory loading uses
|
||
skeletons/spinners, and confirmed
|
||
promotion, review, import, and export mutations report through accessible
|
||
toasts.
|
||
- Shared Galaxy tokens, focus-visible treatment, micro-motion, and a
|
||
`prefers-reduced-motion` fallback now define the visual/feedback baseline.
|
||
- The renderer now defaults to English on a fresh, missing, or invalid locale
|
||
setting. Users can choose German from Settings; the preference is local to the
|
||
app and updates the document language. This changes application copy only:
|
||
Smart Capture remains validated for the English Genshin UI.
|
||
- Artifact detail now exposes a small, confirmed local-delete action. Native
|
||
scan results are tombstoned rather than rewritten, their crop is removed only
|
||
when it is contained in the selected run directory, and an exact linked Store
|
||
record is removable only through an explicit local confirmation. No delete
|
||
path calls the input helper or changes Genshin.
|
||
- Native runs now retain an atomic `run-timing.json` record from request start
|
||
through durable result reconciliation. It measures capture and processing
|
||
separately and derives end-to-end duration from one wall-clock interval
|
||
instead of adding overlapping phases.
|
||
- The 136 historical full-inventory Review samples were audited against their
|
||
crops. The confirmed corpus now distinguishes 128 explicit non-five-star
|
||
entries, six exact duplicated-decimal repairs, one slot-safe artifact-name
|
||
correction, and one incomplete entry that intentionally remains `Review`.
|
||
|
||
### What is still structurally weak
|
||
|
||
- The scan experience is still partly orchestrated from `src/App.tsx`, which makes behavior changes harder than they should be.
|
||
- Broader scan soak testing has reached clean 20-, 45-, and 100-artifact runs
|
||
with 0 misses on the current engine. The current 2026-07-09 100-artifact run
|
||
completed `100/100` verified and parsed with `0` review and `0` misses.
|
||
- OCR quality is still inconsistent enough that some fields are recovered by fallback and derivation more often than they should be.
|
||
- Learned fixes currently focus on text replacements; they do not yet update crop offsets, UI profile variants, or scanner targeting rules in a structured way.
|
||
- The scan page now has a minimalist recent-results rail, and the Inventory view
|
||
can inspect native Artifact results, crop previews, IK match state, promotion
|
||
dry-runs, pipeline risk/status, roll-efficiency reasons, and upgrade
|
||
projection. Single-result review/edit/approve is implemented and batch
|
||
review is intentionally unavailable.
|
||
- The native IK-style path has fresh later-session 5/20/50/100 scale evidence,
|
||
deterministic replay, focus-loss and stop evidence, plus a packaged 5-result
|
||
runtime smoke. Non-16:9 and other UI-language profiles remain open.
|
||
- Store promotion from native `scan-results.json` now supports one selected,
|
||
confirmed result at a time with main-process revalidation and a durable log.
|
||
Batch promotion intentionally remains unavailable.
|
||
- Native Review results can be corrected and approved or rejected one at a
|
||
time. Approval revalidates IK identity, canonical main values, and legal
|
||
substat rolls, then feeds the existing review-to-eval candidate pipeline.
|
||
- Recommendations and build logic exist, but build-aware fit must be designed
|
||
separately from the now-implemented context-free roll-efficiency score.
|
||
- The Builds navigation item now reads only the newest complete native run and
|
||
can surface up to three source-bound, read-only profile suggestions. It must
|
||
not imply character ownership, team, weapon, rotation, DPS, or optimizer
|
||
certainty; the built-renderer acceptance now passes, while an elevated
|
||
packaged-executable runtime remains a separate packaging check.
|
||
- The historical 136-item Review queue is not a source of labels by itself.
|
||
Its audit added only visually confirmed parser/corpus cases; the one
|
||
incomplete crop remains fail-closed in `Review`.
|
||
- Repeatability and 3 artifacts/second are still open; speed work should not
|
||
outrank result clarity, inventory UX, or corpus growth while the current path
|
||
is stable.
|
||
|
||
### Current product conclusion
|
||
|
||
The app has crossed from OCR-demo/prototype into an Artifact-first scanner app.
|
||
The broadest proven live path is still the visible-inventory scan flow: the
|
||
operator opens Artifact inventory with a visible detail card, the app verifies
|
||
the state, scans read-only, persists parsed artifacts, and keeps uncertain data
|
||
reviewable. The newer native IK-style path is the intended high-speed direction:
|
||
the helper captures Artifact card crops quickly, while OCR, parsing, review,
|
||
promotion, and value evaluation run downstream.
|
||
|
||
The next product phase is not broad category expansion. Weapons, materials, and
|
||
character details stay out of active scope. Packaged/live acceptance passed on
|
||
2026-07-10 for the bounded 5/20/50/100 scanner and packaged 5er. A later real
|
||
Settings-UI run also accepted the revised Artifact-limit path at 5/5 through
|
||
preflight, capture, processing, parsing, and the session result rail with no
|
||
review, processing error, or persistence. The packaged Settings UI then
|
||
accepted a one-row limit as an eight-Artifact target at 8/8 with the same safe
|
||
outcome. The complete Settings-UI full-owned-inventory soak then accepted the
|
||
OCR-owned target 2,211 with exact 2,211 captures/results across 70 pages. After
|
||
one evidence-driven parser correction, the current packaged reprocess completed
|
||
2,211/2,211 with 136 Review (6.15%), zero errors/writes, and zero saved-run
|
||
validation issues. The current Build-Fit checkpoint now has four sourced
|
||
profiles, profile-expiry gates, a deterministic non-Roll-Efficiency evidence
|
||
ranker, explicit session-only Furina context, and a read-only Builds surface.
|
||
The renderer now defaults to English with a German Settings option, and local
|
||
artifact removal is deliberately confined to app-local result/store records and
|
||
contained crops. The current scanner also writes durable shared-clock timing
|
||
evidence and has a visually reviewed corpus correction for the audited
|
||
136-entry Review set. These current-build changes are offline/unit validated,
|
||
and the built-renderer Builds/UI acceptance passed, including the local-delete
|
||
confirmation probes. That is not an elevated packaged-executable claim. The
|
||
current elevated development 50-artifact native smoke now passes with complete
|
||
timing evidence and zero writes; its `28,022 ms` end-to-end result does not
|
||
prove the separate 3/s target. The remaining Review corpus continues to grow
|
||
only from visually confirmed labels. The review exporter now prioritizes
|
||
retrievable retained crops and serializes only safe capture/run references; its
|
||
confirmation preparer refuses OCR-only candidates so parser guesses cannot be
|
||
promoted without visual evidence.
|
||
|
||
## Product Direction
|
||
|
||
- Artifact scanning is the first-class feature.
|
||
- Character optimization returns only after scan quality is trustworthy.
|
||
- Team building stays out of the critical path until artifact ingestion is stable.
|
||
- External scanners are not runtime dependencies. The app owns its scan
|
||
choreography, OCR, and quality gates.
|
||
- Self-learning stays deterministic and local first: review samples, aliases, crop offsets, and UI profile tuning before any ML retraining discussion.
|
||
- The scan workspace should be an operator surface: the left area shows preview
|
||
when idle and owns capture-versus-target progress during a run; the right
|
||
rail contains current-session results plus independent evaluation progress.
|
||
Stop, status, and review access remain visible. Detailed debug evidence
|
||
belongs in diagnostics, summaries, or artifact detail.
|
||
- Primary navigation should follow the user journey: scan, inspect artifacts,
|
||
review uncertainty, then enter future build guidance. Overlay and diagnostics
|
||
remain tools instead of competing with that journey.
|
||
- Feedback should match the action: progress for long-running scans, skeletons
|
||
for content loading, inline state for durable blockers, and toasts for the
|
||
outcome of explicit mutations.
|
||
- Artifact value scoring must not hide OCR uncertainty. `Review` is a distinct
|
||
outcome, not just a weak artifact score.
|
||
- Explizit bestätigte visuelle 1–4★-Artefakte sind keine
|
||
Bergungs-/Lösch-Empfehlung: Sie erscheinen nur in der schreibgeschützten
|
||
`Nicht 5★`-Ansicht mit Bild und Details zur manuellen Prüfung. Eine
|
||
fehlende oder widersprüchliche Sternreihe bleibt `Review`.
|
||
|
||
## Execution Plan
|
||
|
||
### Phase 0 - Stabilize the operator surface
|
||
|
||
Outcome:
|
||
- Scan page reduced to source, main preview, result panel, primary scan actions, and compact status.
|
||
- Diagnostics, logs, crops, confidence breakdown, review queue, and learning internals moved behind modal or drawer entry points.
|
||
- Scan completion popup summarizes scanned, stored, duplicates, review samples, blocked reason, and elapsed time.
|
||
|
||
Status:
|
||
- Implemented as the scanner-first Galaxy baseline. Readiness and the primary
|
||
scan action lead the page, the left surface owns capture progress, and the
|
||
larger right surface owns ordered live results plus compact independent
|
||
evaluation progress. The current-session result rail starts empty, advanced
|
||
controls open in a modal without shifting the workspace, and Diagnose remains
|
||
a separate scrollable tool. The
|
||
Artifact-limit path and consolidated progress/result layout passed a real
|
||
five-result Settings-UI run, the one-row path at 8/8, and the full-owned path
|
||
at 2,211/2,211 with current-package Review below the 15% gate.
|
||
|
||
### Phase 1 - Canonical game data package
|
||
|
||
Outcome:
|
||
- `scripts/generate-genshin-data.cjs` emits one stricter package contract for:
|
||
- artifact sets
|
||
- artifact pieces
|
||
- slot-by-piece mapping
|
||
- stats and allowed mains by slot
|
||
- characters
|
||
- aliases
|
||
- UI profiles
|
||
- source version metadata
|
||
- Parser regression tests run against saved review samples and known bad cases.
|
||
- Parser stops "free guessing" outside the canonical package.
|
||
|
||
Status:
|
||
- Implemented as a generated lookup package in `src/data/genshinGameData.json`
|
||
with validation and parser integration. Continue regenerating and expanding
|
||
aliases deliberately when Genshin data or OCR samples require it.
|
||
|
||
### Phase 2 - Deterministic parser hardening
|
||
|
||
Outcome:
|
||
- Name, slot, set, main stat, and equipped fields are parsed through layered validation:
|
||
1. direct OCR cleanup
|
||
2. alias normalization
|
||
3. exact package match
|
||
4. constrained fuzzy match
|
||
5. safe derivation from piece/slot/value references
|
||
- Main stat/value inference is tightened with slot constraints and reference tables.
|
||
- Bad parses automatically generate structured review reasons.
|
||
- Equipped-character parsing is canonical-data constrained: noisy known names can
|
||
match through aliases/fuzzy lookup, but unknown footer fragments stay
|
||
`Not detected` instead of being stored as invented character names.
|
||
|
||
Status:
|
||
- Implemented for the merge baseline. Parser tests cover canonical set/slot/stat
|
||
matching, equipped-character footer noise, known aliases, and unsafe one-letter
|
||
fragments. Continue growing the confirmed review corpus before tightening
|
||
thresholds further.
|
||
|
||
### Phase 3 - Scanner core rebuild
|
||
|
||
Outcome:
|
||
- Auto-scan becomes a dedicated engine with explicit states:
|
||
- preflight
|
||
- grid detection
|
||
- click target
|
||
- wait stable
|
||
- detail verify
|
||
- parse
|
||
- store or review
|
||
- next tile
|
||
- row scroll
|
||
- resume or stop
|
||
- Progress counts only when a new verified artifact or duplicate signature is confirmed.
|
||
- Repeated pages, unchanged detail cards, blocked cursor movement, and scroll failures stop the scan with diagnosis instead of producing fake progress.
|
||
- Fast artifact-read captures include the equipped footer when an equipped
|
||
marker is visible; preflight and polling captures still skip expensive OCR.
|
||
|
||
Status:
|
||
- Implemented and merged for the visible-inventory path. Live validation on
|
||
2026-07-09 covered `20/20` verified/parsed with `0` review and `0` misses,
|
||
equipped-character persistence, unlocked lock state, positive locked state,
|
||
and locked persistence. Explicit entry-mode experiments remain separate from
|
||
the normal merge-ready path.
|
||
|
||
### Phase 4 - Input automation replacement
|
||
|
||
Outcome:
|
||
- Replace the production automation path with a persistent Windows sidecar dedicated to:
|
||
- focus
|
||
- move
|
||
- click
|
||
- scroll
|
||
- capture
|
||
- probe
|
||
- Session probe decides which input mode works before auto-scan is unlocked.
|
||
- Auto-scan never starts on a session that cannot prove one successful detail-card change.
|
||
|
||
Status:
|
||
- Read-only C# helper path and elevated dev startup are validated for the
|
||
visible-inventory scanner baseline. Direct inventory, Paimon-menu, and
|
||
auto-entry modes remain Dev-Control experiments and should be tested with low
|
||
limits before being promoted.
|
||
|
||
### Phase 5 - Learning loop that actually compounds
|
||
|
||
Outcome:
|
||
- Weak scans save themselves as review samples automatically.
|
||
- User corrections update local:
|
||
- text replacements
|
||
- alias maps
|
||
- crop offsets
|
||
- UI profile adjustments
|
||
- constrained set/piece/slot fixes
|
||
- "Apply learned fixes" runs before every parse.
|
||
- Review samples become both parser regression fixtures and learning inputs.
|
||
|
||
Status:
|
||
- Prepared in code for text replacements, field aliases, constrained fixes,
|
||
crop adjustment proposals, and UI-profile adjustment proposals. Crop/profile
|
||
changes still require live review before being auto-applied. The current
|
||
review-corpus checkpoint adds only visually confirmed cases: exact duplicate
|
||
decimal punctuation is repaired, and a partial artifact name is canonicalized
|
||
only when independent, high-confidence slot evidence leaves one safe match.
|
||
Ambiguous or incomplete crops remain `Review`.
|
||
|
||
### Phase 6 - Minimal scan result rail and artifact inventory
|
||
|
||
Outcome:
|
||
- The scan page shows a large screenshot/preview and a compact right-side rail
|
||
of finished artifact evaluations.
|
||
- Each row shows scan number, artifact name or compact fallback, value score,
|
||
and a colored status pill.
|
||
- Debug stats, confidence breakdowns, and OCR internals move out of the main
|
||
scan surface.
|
||
- A new artifact inventory menu provides compact browsing, filters, sorting,
|
||
and click-through details.
|
||
|
||
Status:
|
||
- Started with a scan result rail in the scan surface and an `Inventory` view.
|
||
The rail shows native `scan-results.json` entries from the current app scan
|
||
session after post-processing and does not preload older stored/native rows
|
||
at startup. The inventory browser can filter,
|
||
sort, inspect native/store/snapshot rows, and preview native card crops from
|
||
the selected run directory. It also exposes the current IK inventorylist
|
||
version, active Artifact-only scope, and pipeline status for capture,
|
||
post-processing, review, promotion, and evidence. Native Artifact rows carry
|
||
IK/GOOD match status from the post-capture processor and a dry-run promotion
|
||
decision that shows whether a native result is speicherbar, already stored,
|
||
review-only, or blocked without writing to the store. Detail review,
|
||
deterministic roll-efficiency reasons, evaluated/open filters, score sorting,
|
||
and under-level projection are implemented. The browser prioritizes the
|
||
collection, filters, selected detail, and explicit next actions; technical
|
||
pipeline evidence remains available in collapsible detail. See
|
||
[scanner-results-inventory-roadmap.md](scanner-results-inventory-roadmap.md)
|
||
for the implementation phases and acceptance criteria. The separate,
|
||
read-only `Nicht 5★` filter retains explicitly recognized 1–4★ native
|
||
results with their crop and details, excludes them from roll evaluation, and
|
||
exposes no in-game action. A confirmed local-delete action can remove a
|
||
wrong native result from the visible local inventory through an append-only
|
||
tombstone and safely contained crop cleanup; it can remove a Store-only row
|
||
or exact linked Store record only locally and never changes Genshin.
|
||
|
||
### Phase 7 - Artifact detail evaluation and upgrade projection
|
||
|
||
Outcome:
|
||
- Artifact detail explains parsed fields, OCR confidence, scoring reasons, and
|
||
review needs.
|
||
- Upgrade projection is available only for unambiguously identified 5-star data
|
||
with four known legal substats and is labeled as probabilistic, with
|
||
worst/middle/best projected value scores.
|
||
- Low-confidence OCR disables or qualifies value conclusions instead of showing
|
||
false certainty.
|
||
|
||
Status:
|
||
- Implemented as `roll-efficiency-v1` plus detail-only
|
||
`roll-efficiency-projection-v1`. Static/build/replay, fresh dev 5/20/50/100,
|
||
packaged runtime, and final Inventory visual acceptance pass. The new live
|
||
100 contained only +20 Artifacts, so under-level projections remain covered
|
||
by the confirmed saved-run corpus rather than a new live sample.
|
||
|
||
### Phase 8 - Recommendations come back on top of a trusted scanner
|
||
|
||
Outcome:
|
||
- Account snapshot and build suggestions are only promoted once scan quality is high enough to trust owned artifacts.
|
||
- Recommendations explain uncertainty and surface conflicts instead of pretending perfect certainty.
|
||
|
||
Status:
|
||
- `build-fit-contract-v1` continues to keep per-Artifact and five-piece
|
||
assessments score-free. On top of it, the offline-tested
|
||
`build-fit-evidence-ranking-v1` selects at most three non-overlapping safe
|
||
combinations from the newest complete native run. The sourced corpus now
|
||
covers Furina Solo-Hydro C0-C1, Neuvillette Charged Attack, Raiden off-field
|
||
Hyperbloom, and Nahida off-field Deepwood. Profiles expire explicitly;
|
||
Roll-Efficiency and OCR confidence are not ranking inputs. Furina's required
|
||
whole-build ER target accepts only explicit, session-only user context and
|
||
otherwise stays deferred. The Builds surface explains Set/Main-Stat/Substat
|
||
coverage, sources, warnings, and uncertainty without writing data or sending
|
||
game input. A built-renderer acceptance now covers fresh English locale,
|
||
German switching/restoration, Builds loading/context/focus, reduced motion,
|
||
overflow, and native plus Store local-delete confirmation probes. It is not evidence of an
|
||
elevated packaged-executable launch; that runtime boundary remains separate.
|
||
See
|
||
[BUILD_FIT_CONTRACT_V1.md](BUILD_FIT_CONTRACT_V1.md).
|
||
|
||
## Immediate Next Validation Order
|
||
|
||
1. The final current-build offline gate passed after the localization, deletion,
|
||
timing, corpus, and acceptance-runner changes: `npm run acceptance:offline`
|
||
completed TypeScript, 72 test files / 444 tests, OCR evaluation, saved-run
|
||
validation, package verification (27/27), both dependency audits, and the
|
||
diff check.
|
||
2. Preserve the passing built-renderer acceptance as renderer evidence, but
|
||
separately verify an elevated packaged-executable launch/UAC bridge before a
|
||
binary release claim. It is not a substitute for scanner smoke evidence.
|
||
3. The current elevated development 50-artifact smoke passed with full
|
||
reconciliation, zero Review/errors/writes, and
|
||
`requestToResultsReconciledMs=28,022`. This is a functional/safety gate;
|
||
it does not claim 3 Artifacts/s.
|
||
4. Completed on 2026-07-11: generated workspace output was cleaned and the
|
||
coherent checkpoint was committed and pushed as `8b9f948`. A
|
||
package-runtime/UAC test is required only for that separate claim.
|
||
5. The visual-evidence review exporter/preparer passed focused checks plus
|
||
`npm run lint`, `npm test` (72 files / 446 tests), and `npm run build`.
|
||
Its read-only export of the current 177-record local queue found three
|
||
retrievable crops, all already-confirmed `native-review-approved` cases;
|
||
no new corpus label was promoted.
|
||
6. Continue review-corpus growth only from new visually confirmed crops. Keep
|
||
explicit 1–4★ evidence excluded, ambiguous evidence in `Review`, and reject
|
||
aliases that cannot be justified by independent field evidence.
|
||
7. Refresh source-bound profiles before expiry and add Golden plus
|
||
Review/low-confidence adversarial fixtures for each additional profile.
|
||
8. Keep the bounded wheel reset as the production baseline. Benchmark a `B`
|
||
plus Artifact-tab reopen only as a separate guarded experiment before any
|
||
reset strategy change.
|
||
9. Keep Build-Fit profile suggestions read-only and Artifact-only until an
|
||
explicit product decision adds owned-character, weapon, team, and rotation
|
||
inputs with their own sources.
|
||
|
||
## Open Questions
|
||
|
||
| Question | Status |
|
||
| --- | --- |
|
||
| Is the current C# helper sufficient for production packaging, or does a later Rust/C++ sidecar still materially reduce latency or packaging risk? | Open |
|
||
| When should UI-profile learning be allowed to change crop geometry automatically versus requiring review approval? | Open |
|
||
| What scan-quality threshold is high enough before profile suggestions can be called live-accepted? | Scanner gate passed for accepted 16:9 English Artifact scope; Build-Fit unit/repository gate and built-renderer acceptance passed, while elevated packaged-executable runtime and current scanner smoke remain separate |
|
||
| What exact first-pass value formula should drive the `0-100` artifact score before build-aware recommendations exist? | Resolved for V1: legal roll-tier efficiency only; build fit remains separate |
|
||
| Which upgrade projection model is honest enough for early UX: deterministic roll buckets, probability-weighted outcomes, or a deliberately simple best/middle/worst estimate? | Resolved for V1: legal Worst/Middle/Best roll-efficiency bounds with explicit uncertainty |
|
||
| Which Genshin UI languages should be supported after English once the scanner contract is stable? | Open |
|