Skip to content

Commit 2f72d59

Browse files
committed
docs: scrub private references from roadmap before public push
Replace all private agent-identity references with generic "downstream tools" / "downstream consumers" language. Remove internal thread IDs and feature codes from public-facing docs.
1 parent 3258c13 commit 2f72d59

1 file changed

Lines changed: 81 additions & 68 deletions

File tree

docs/roadmap.md

Lines changed: 81 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,99 @@
11
# uitag — Roadmap
22

3-
_Last updated: 2026-03-08_
4-
_Status: Sprints 1-3 complete. v0.3.1 shipped (batch, benchmark). v0.4.1 current (rescan, patch, render, CLI UX polish)._
3+
_Last updated: 2026-03-07_
4+
_Status: v0.4.1 current. Roadmap reframed around downstream integration quality (see Reframe Notes below)._
55

66
---
77

88
## Current State
99

1010
| Component | Status | Notes |
1111
|-----------|--------|-------|
12-
| Detection pipeline | Stable | 1920x1080 → 151 detections in ~1s (fast OCR + optimized MLX) |
13-
| README | Up to date | Architecture, quick start, performance, research background |
14-
| CLI | Working | `uitag`, `uitag batch`, `uitag benchmark` |
15-
| MIT license | Done | No AGPL contamination |
16-
| Test suite | 87 tests | Fast/slow split, all passing |
17-
| pyproject.toml | Complete | Metadata, deps, entry points, optional groups |
12+
| Detection pipeline | Stable | 1920x1080 → 151 detections in ~2.5s accurate, ~1.7s fast |
13+
| CLI | v0.4.1 | `uitag`, `uitag batch`, `uitag benchmark`, `uitag patch`, `uitag render` |
14+
| OCR rescan | Shipped | Multi-crop ensemble, interactive prompt, `-rescan` suffix, special-char guard |
1815
| Backend abstraction | Complete | MLX default + CoreML option, `--backend` flag |
19-
| JSON manifest | Stable | Structured output consumed by downstream tools |
20-
| Research docs | Documented | Object-aware tiling, Florence-2 tiling discovery, 14-model benchmark |
21-
| Annotation rendering | Improved | Markers outside bboxes, contrast-aware text colors (2026-03-06) |
16+
| JSON manifest | Stable | Schema frozen through v0.4.x — public API contract for downstream tools |
17+
| Python library API | Exported | `from uitag import run_pipeline` — supports rescan, backend selection |
18+
| 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`) |
20+
| MIT license | Done | No AGPL contamination |
2221

2322
---
2423

25-
## Completed Work
24+
## Reframe Notes (2026-03-07)
2625

27-
### Sprint 1: CI + Documentation (2026-02-27)
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.
37+
38+
---
2839

29-
- [x] **S1.1:** GitHub Actions CI — `.github/workflows/test.yml`, Python 3.10/3.11/3.12, badge in README
30-
- [x] **S1.2:** Example output — hero image + redacted manifest in `docs/examples/`
31-
- [x] **S1.3:** README refresh — perf numbers, CI badge, hero image, backend docs
32-
- [x] **S1.4:** Pre-commit config — ruff check + format, codebase normalized
40+
## Tier 1 — Do Now
3341

34-
### Sprint 2: Distribution (2026-02-27)
42+
_Theme: improve what downstream tools actually consume, build detection quality confidence._
3543

36-
- [x] **S2.1:** PyPI publish — v0.2.2 live on PyPI + TestPyPI, trusted publishers (OIDC), tag-triggered workflow
37-
- [x] **S2.2:** GitHub Release — [v0.2.0](https://github.com/swaylenhayes/uitag/releases) published
38-
- [x] **S2.3:** Issue templates — bug report + feature request (YAML forms)
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.
3947

40-
### Sprint 3: Contributor Experience (2026-02-27)
48+
---
4149

42-
- [x] **S3.1:** CONTRIBUTING.md — setup, architecture overview, PR workflow
43-
- [x] **S3.2:** Integration examples — `examples/use_as_library.py` + `examples/custom_backend.py`
44-
- [x] **S3.3:** Manifest JSON Schema — `uitag/schema.json` (Draft 2020-12) + 5 validation tests
50+
## Tier 2 — Do When Repeated-Call Use Cases Emerge
4551

46-
### Post-Sprint Fixes (2026-02-27)
52+
_Theme: prepare for repeated-call integration._
4753

48-
- [x] Pip install fix — Swift source bundled in package (`uitag/tools/`)
49-
- [x] `run_pipeline` exported from `__init__.py`
50-
- [x] README Quick Start leads with `pip install uitag`
51-
- [x] Apache-2.0 SPDX headers → MIT (5 files)
52-
- [x] Stale perf numbers updated in `docs/research.md`
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.
5357

54-
### v0.3.x Features
58+
---
5559

56-
- [x] **Batch CLI** (`uitag batch <dir>`) — Process folders of screenshots in one command (v0.3.1)
57-
- [x] **Benchmark CLI** (`uitag benchmark`) — Per-stage timing with stats across N runs, bundled reference images (v0.3.1)
58-
- [x] **Per-stage timing instrumentation** — All 6 pipeline stages timed in manifest output (v0.3.1)
59-
- [x] **API reference docs**`docs/api.md` with functions, types, manifest schema
60-
- [x] **Performance docs**`docs/performance.md` with stage breakdown, backend comparison
61-
- [x] **VHS CLI demo GIF** — Animated terminal recording embedded in README Quick Start
62-
- [x] **Bundled benchmark images** — Dark (VS Code) + light (LM Studio) reference screenshots, `uitag benchmark` runs both by default
60+
## Tier 3 — Defer
6361

64-
### Annotation & CLI Improvements (2026-03-06)
62+
_Not blocking anything. Resume when triggered._
6563

66-
- [x] **Marker repositioning** — SoM numbered circles positioned outside bbox (above-left) to avoid occluding UI text
67-
- [x] **Contrast-aware text** — Marker text auto-switches black/white based on background luminance (yellow, orange, cyan get black text)
68-
- [x] **Resolved output paths** — CLI prints absolute paths instead of `./` for output location
69-
- [x] **Diff render prototype** — 9 iterations of instruction overlay rendering, documented in `docs/diff-render-spec.md`
70-
- [x] **PDF companion prototype** — Selectable text PDF alongside instruction images
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 |
7173

7274
---
7375

74-
## Completed — v0.4.0
76+
## Completed Work
77+
78+
### v0.4.1 (2026-03-07)
7579

76-
### Feature A: Multi-Crop Ensemble OCR Rescan
80+
**Release:** `docs/releases/v0.4.1.md`
7781

78-
**Spec:** `docs/specs/multi-scale-ocr-rescan.md` | **Research:** `docs/research/ocr-rescan-experiments.md` | **Release:** `docs/releases/v0.4.0.md`
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
89+
90+
### v0.4.0 (2026-03-06)
91+
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`
7997

8098
- [x] Implement multi-crop ensemble re-OCR pipeline stage (`uitag/rescan.py`)
8199
- [x] Add `--no-lang-correction` flag to Swift binary
@@ -84,37 +102,32 @@ _Status: Sprints 1-3 complete. v0.3.1 shipped (batch, benchmark). v0.4.1 current
84102
- [x] Confidence threshold set to 0.8
85103
- [x] 8-phase experiment validating approach (crop sensitivity, context, light/dark mode)
86104
- [x] Light mode OCR advantage documented in README and research
87-
- [ ] Determine verbose vs. non-verbose output behavior (TBD)
88-
- [ ] Determine batch output format for low-confidence elements (TBD)
89105

90-
### Feature B: Patch JSON Input (Re-Annotation)
106+
#### Feature B: Patch JSON Input (Re-Annotation)
91107

92-
**Spec:** `docs/specs/patch-json-input.md` | **Release:** `docs/releases/v0.4.0.md`
108+
**Spec:** `docs/specs/patch-json-input.md`
93109

94110
- [x] Define and validate patch JSON schema (`uitag/patch.py`)
95111
- [x] Implement `uitag patch` subcommand (`uitag/patch_cli.py`)
96112
- [x] Implement `uitag render` subcommand (manifest-to-image, no detection)
97113
- [x] Output naming: `{stem}-uitag.png` + `{stem}-uitag-manifest.json`
98114
- [x] Partial patches: unpatched elements pass through unchanged
99115

100-
---
101-
102-
## Up Next — P1
103-
104-
- [ ] **Pipeline architecture visual** — Replace ASCII diagram in README with SVG/image
105-
- [ ] **OCR correction baseline** — Minimal deterministic heuristics for common OCR confusions in UI text (see `docs/ocr-correction-strategy.md`)
116+
### v0.3.x Features
106117

107-
---
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
108124

109-
## Up Next — Validation
125+
### Sprints 1-3 (2026-02-27)
110126

111-
- [ ] **Dense UI testing** — Test diff render with many changes in a small area
112-
- [x] **Light mode validation** — Light mode produces measurably better OCR for special characters (v0.4.0 research)
113-
- [x] **Dark mode validation** — Dark mode baseline established; thin characters (`\`) unrecoverable in some positions (v0.4.0 research)
114-
- [ ] **Broader screenshot testing** — IDE, settings UIs, web apps in both light/dark mode
115-
- [ ] **Large callout count** — Test stacking/overlap with 5+ callout boxes
116-
- [ ] **Long values** — Test truncation or wrapping for very long field values
117-
- [x] **Dark mode detection** — CLI hint when dark mode screenshots may benefit from light mode recapture (v0.4.1)
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)
118131

119132
---
120133

@@ -142,7 +155,7 @@ _Status: Sprints 1-3 complete. v0.3.1 shipped (batch, benchmark). v0.4.1 current
142155

143156
| Item | Why parked | Resume trigger |
144157
|------|-----------|----------------|
145-
| CoreML as AUTO default | MLX is faster on idle GPU | Profiling shows otherwise |
158+
| CoreML as AUTO default | MLX is faster on idle GPU (benchmarked) | Profiling on M3/M4 shows otherwise |
146159
| GPU load detection in selector | Not needed for single-user CLI | Multi-process use cases |
147160
| Florence-2 task token exploration | Current task tokens work well | Quality issues surface |
148161
| Parallel quadrant inference | Sequential is already ~650ms | User demand |

0 commit comments

Comments
 (0)