Skip to content

Commit 16058ec

Browse files
committed
docs: slim down public roadmap, clean spec references
Replace detailed roadmap with high-level public version. Remove internal architectural context and stale doc references. Clean two references in multi-scale-ocr-rescan spec.
1 parent 766e2a7 commit 16058ec

2 files changed

Lines changed: 38 additions & 126 deletions

File tree

docs/roadmap.md

Lines changed: 33 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# uitag — Roadmap
22

33
_Last updated: 2026-03-07_
4-
_Status: v0.4.1 current. Roadmap reframed around downstream integration quality (see Reframe Notes below)._
4+
_Status: v0.4.1 current._
55

66
---
77

@@ -13,153 +13,66 @@ _Status: v0.4.1 current. Roadmap reframed around downstream integration quality
1313
| CLI | v0.4.1 | `uitag`, `uitag batch`, `uitag benchmark`, `uitag patch`, `uitag render` |
1414
| OCR rescan | Shipped | Multi-crop ensemble, interactive prompt, `-rescan` suffix, special-char guard |
1515
| Backend abstraction | Complete | MLX default + CoreML option, `--backend` flag |
16-
| JSON manifest | Stable | Schema frozen through v0.4.x — public API contract for downstream tools |
16+
| JSON manifest | Stable | Schema frozen through v0.4.x |
1717
| Python library API | Exported | `from uitag import run_pipeline` — supports rescan, backend selection |
1818
| Annotation rendering | v0.4.1 | Markers outside bboxes, contrast-aware text, dark gold replaces yellow |
19-
| Test suite | 81 passing | 1 pre-existing failure (`test_batch_cli.py`) |
19+
| Test suite | 94 passing | All passing (11 skipped — require model/macOS) |
2020
| MIT license | Done | No AGPL contamination |
2121

2222
---
2323

24-
## Reframe Notes (2026-03-07)
24+
## Up Next
2525

26-
> **Why the roadmap changed:** A downstream integration audit revealed three findings that shifted priorities:
27-
>
28-
> 1. **Label accuracy is the highest-leverage improvement.** Downstream tools that consume the manifest render every `label` field directly into prompts. OCR errors in labels propagate through every downstream step. The OCR correction baseline — previously equal-weighted with README polish — is now the top priority because it directly improves the data that flows through every downstream module.
29-
>
30-
> 2. **The manifest schema is sufficient and frozen.** Downstream consumers use `image_width`, `image_height`, `element_count`, `som_id`, `label`, `bbox`, and `source`. No new fields are needed. This means uitag's roadmap should focus on making existing fields more accurate (especially `label`), not on schema expansion.
31-
>
32-
> 3. **Repeated-call performance matters.** Automated workflows that call uitag after each interaction step accumulate overhead quickly. At 15 steps × ~2.5s = ~37.5s detection overhead. The ~600ms temp file I/O waste per call (mlx_vlm API limitation) becomes 9 seconds of pure waste over a session. This moves I/O optimization from "parked" to "do when repeated-call use cases emerge."
33-
>
34-
> 4. **Rescan has no downstream consumer yet.** No downstream tool currently branches on `confidence`. The rescan feature is currently CLI-only quality-of-life. Further rescan investment is deferred until downstream tools begin using confidence values.
35-
>
36-
> The reframe prioritizes: **detect accurately → test confidently → optimize for repeated calls**. README polish and validation edge cases are deferred.
26+
- [ ] **Broader screenshot testing** — Run pipeline on IDE, settings UIs, web apps in both light/dark mode. Establish a detection quality baseline with documented expected vs. actual element counts.
27+
- [ ] **OCR correction baseline** — Minimal deterministic heuristics for common OCR confusions in UI text (`l``I`, Cyrillic `Т``T`, `w``W`).
3728

3829
---
3930

40-
## Tier 1 — Do Now
31+
## Future
4132

42-
_Theme: improve what downstream tools actually consume, build detection quality confidence._
43-
44-
- [ ] **Broader screenshot testing** — Run pipeline on IDE, settings UIs, web apps in both light/dark mode. Establish a detection quality baseline with documented expected vs. actual element counts. The v0.4.1 spot-check found detection inconsistencies across different captures of the same UI — we need to understand the variance before the next feature cycle.
45-
- [ ] **OCR correction baseline** — Minimal deterministic heuristics for common OCR confusions in UI text (`l``I`, Cyrillic `Т``T`, `w``W`). The v0.4.1 spot-check and rescan testing surfaced exactly these failure modes. This directly improves the `label` field that downstream tools feed into prompts. See `docs/ocr-correction-strategy.md`.
46-
- [ ] **Fix `test_batch_cli.py`**`test_format_summary` and `test_format_summary_no_failures` fail due to missing `total_detections` parameter. Pre-existing, straightforward fix. Broken tests erode suite confidence.
47-
48-
---
49-
50-
## Tier 2 — Do When Repeated-Call Use Cases Emerge
51-
52-
_Theme: prepare for repeated-call integration._
53-
54-
- [ ] **Temp file I/O optimization** — Eliminate ~600ms overhead from mlx_vlm's file-based API (save 4 temp PNGs, load them back). Over 15 repeated verification calls, this wastes ~9 seconds. Evaluate: can mlx_vlm accept PIL images directly? Can we memory-map the temp files? Is there a streaming interface?
55-
- [ ] **`crop_region` parameter** — Add optional `crop_region` tuple to `run_pipeline()` for sub-image detection with automatic coordinate offset. Useful when callers outgrow the caller-side PIL crop workaround. Not building proactively — wait for demand.
56-
- [ ] **Manifest stability doc** — Explicitly document the schema freeze for v0.4.x in `docs/api.md`. Downstream consumers depend on this contract. Any breaking change requires a versioned migration.
33+
- [ ] **Temp file I/O optimization** — Eliminate ~600ms overhead from mlx_vlm's file-based API per quadrant call.
34+
- [ ] **`crop_region` parameter** — Optional sub-image detection with automatic coordinate offset.
35+
- [ ] **Manifest stability doc** — Document the schema freeze for v0.4.x in `docs/api.md`.
5736

5837
---
5938

60-
## Tier 3 — Defer
61-
62-
_Not blocking anything. Resume when triggered._
39+
## Parked
6340

64-
| Item | Why deferred | Resume trigger |
65-
|------|-------------|----------------|
66-
| Pipeline architecture visual | README polish, not functional | User/community request |
67-
| Dense UI testing | Validation edge case | After Tier 1 baseline established |
68-
| Large callout count testing | Validation edge case | After Tier 1 baseline established |
69-
| Long value truncation testing | Validation edge case | After Tier 1 baseline established |
70-
| Further rescan sophistication | No downstream consumer reads confidence yet | Downstream tools begin using confidence values |
71-
| Verbose vs. non-verbose output behavior | Low-priority CLI polish | User request |
72-
| Batch output format for low-confidence elements | Low-priority CLI polish | Batch usage patterns emerge |
41+
| Item | Why parked | Resume trigger |
42+
|------|-----------|----------------|
43+
| CoreML as AUTO default | MLX is faster on idle GPU (benchmarked) | Profiling on M3/M4 shows otherwise |
44+
| GPU load detection in selector | Not needed for single-user CLI | Multi-process use cases |
45+
| Florence-2 task token exploration | Current task tokens work well | Quality issues surface |
46+
| Parallel quadrant inference | Sequential is already ~650ms | User demand |
47+
| Additional model support | Scope creep risk | Community requests |
7348

7449
---
7550

76-
## Completed Work
51+
## Completed
7752

7853
### v0.4.1 (2026-03-07)
7954

80-
**Release:** `docs/releases/v0.4.1.md`
81-
82-
- [x] Rescan special-character guard — prevents high-confidence sanitized text from replacing correct low-confidence readings
83-
- [x] CLI UX overhaul — bold orange low-confidence header, `[id] CONF 0.xx "output"` format, interactive rescan prompt
84-
- [x] `-rescan` output filename suffix — preserves standard outputs alongside rescan outputs
85-
- [x] Dark gold bbox color — replaces yellow `(255,255,0)` with `(200,170,0)` for light-mode visibility
86-
- [x] Dark mode detection hint — fires when avg brightness < 100 and low-confidence detections exist
87-
- [x] README reorder — Why This Exists above Quick Start, Output Format after commands
88-
- [x] `__init__.py` version synced to 0.4.1
55+
- Rescan special-character guard
56+
- CLI UX overhaul — interactive rescan prompt, bold low-confidence callout
57+
- `-rescan` output filename suffix
58+
- Dark gold bbox color for light-mode visibility
59+
- Test suite fixes and lint cleanup
8960

9061
### v0.4.0 (2026-03-06)
9162

92-
**Release:** `docs/releases/v0.4.0.md`
93-
94-
#### Feature A: Multi-Crop Ensemble OCR Rescan
95-
96-
**Spec:** `docs/specs/multi-scale-ocr-rescan.md` | **Research:** `docs/research/ocr-rescan-experiments.md`
97-
98-
- [x] Implement multi-crop ensemble re-OCR pipeline stage (`uitag/rescan.py`)
99-
- [x] Add `--no-lang-correction` flag to Swift binary
100-
- [x] Add `--rescan` and `--rescan <ids>` CLI flags
101-
- [x] Add low-confidence callout to default CLI output
102-
- [x] Confidence threshold set to 0.8
103-
- [x] 8-phase experiment validating approach (crop sensitivity, context, light/dark mode)
104-
- [x] Light mode OCR advantage documented in README and research
105-
106-
#### Feature B: Patch JSON Input (Re-Annotation)
107-
108-
**Spec:** `docs/specs/patch-json-input.md`
63+
- Multi-crop ensemble OCR rescan (`--rescan`)
64+
- Patch JSON input (`uitag patch`)
65+
- Render from manifest (`uitag render`)
10966

110-
- [x] Define and validate patch JSON schema (`uitag/patch.py`)
111-
- [x] Implement `uitag patch` subcommand (`uitag/patch_cli.py`)
112-
- [x] Implement `uitag render` subcommand (manifest-to-image, no detection)
113-
- [x] Output naming: `{stem}-uitag.png` + `{stem}-uitag-manifest.json`
114-
- [x] Partial patches: unpatched elements pass through unchanged
67+
### v0.3.x
11568

116-
### v0.3.x Features
69+
- Batch CLI (`uitag batch`)
70+
- Benchmark CLI (`uitag benchmark`)
71+
- Per-stage timing, annotation improvements
11772

118-
- [x] Batch CLI (`uitag batch <dir>`) — v0.3.1
119-
- [x] Benchmark CLI (`uitag benchmark`) — v0.3.1
120-
- [x] Per-stage timing instrumentation — v0.3.1
121-
- [x] API reference docs, performance docs, VHS demo GIF
122-
- [x] Marker repositioning, contrast-aware text, resolved output paths
123-
- [x] Dark mode validation, light mode validation
73+
### v0.2.x
12474

125-
### Sprints 1-3 (2026-02-27)
126-
127-
- [x] S1: CI + documentation (GitHub Actions, hero image, README, pre-commit)
128-
- [x] S2: Distribution (PyPI, GitHub Release, issue templates)
129-
- [x] S3: Contributor experience (CONTRIBUTING.md, examples, JSON Schema)
130-
- [x] Post-sprint fixes (pip install, `run_pipeline` export, license headers)
131-
132-
---
133-
134-
## Handed Off to Agent Layer
135-
136-
| Item | Why | Handoff doc |
137-
|------|-----|-------------|
138-
| PDF user-guidance generation | Requires contextual judgment, narrative, layout decisions | `docs/specs/pdf-generation-handoff.md` |
139-
| LLM post-correction calls | Requires inference, model selection, cost management | `docs/ocr-correction-strategy.md` |
140-
| Multi-step correction orchestration | Requires decision-making about when to rescan, escalate | `docs/ocr-correction-strategy.md` |
141-
142-
---
143-
144-
## Under Debate
145-
146-
| Item | Question | See |
147-
|------|----------|-----|
148-
| Curated domain dictionaries | UITag core, premium package, or agent layer? | `docs/ocr-correction-strategy.md` |
149-
| Comprehensive regex patterns | Same boundary question | `docs/ocr-correction-strategy.md` |
150-
| Who maintains curated data? | Open-source community, paid service, or agent? | `docs/ocr-correction-strategy.md` |
151-
152-
---
153-
154-
## Parked
155-
156-
| Item | Why parked | Resume trigger |
157-
|------|-----------|----------------|
158-
| CoreML as AUTO default | MLX is faster on idle GPU (benchmarked) | Profiling on M3/M4 shows otherwise |
159-
| GPU load detection in selector | Not needed for single-user CLI | Multi-process use cases |
160-
| Florence-2 task token exploration | Current task tokens work well | Quality issues surface |
161-
| Parallel quadrant inference | Sequential is already ~650ms | User demand |
162-
| Additional model support | Scope creep risk | Community requests |
75+
- CI + documentation, PyPI distribution, contributor experience
16376

16477
---
16578

docs/specs/multi-scale-ocr-rescan.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,9 @@ recompiled with `swiftc -O`.
439439
- **Tesseract with custom dictionaries** — this is a domain-specific
440440
vocabulary approach. Training Tesseract on code patterns, regex syntax,
441441
or app-specific text requires maintaining curated training data. This
442-
overlaps with the Level 2 (domain dictionaries) and Level 3 (regex
443-
validation) topics in `docs/ocr-correction-strategy.md`. It's not an
442+
overlaps with domain dictionaries and regex validation topics. It's not an
444443
OCR engine swap — it's a knowledge-maintenance commitment.
445-
- **LLM post-correction**agent-layer work.
444+
- **LLM post-correction**out of scope for this spec.
446445
- **Curated pattern libraries** — maintenance and boundary question.
447446

448447
### Why Tesseract is in the debate lane, not here
@@ -454,11 +453,11 @@ UI text and code patterns. That custom training data is exactly the
454453
It requires:
455454
- Collecting training data (screenshots with known-correct labels)
456455
- Maintaining the model as new UI patterns emerge
457-
- Deciding who owns that maintenance (open source, premium, agent layer)
456+
- Deciding who owns that maintenance (open source, premium, or external tooling)
458457

459458
That's the same boundary question as domain dictionaries. Mixing it into
460-
the OCR rescan lane would create coherency issues with the inter-agent
461-
discussion.
459+
the OCR rescan lane would create coherency issues with the broader
460+
correction strategy.
462461

463462
---
464463

0 commit comments

Comments
 (0)