Auto.WebNav/SPEC
AutoWebNav — Product specification
The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree.
docs/RELEASE.mdsays which part of this the current milestone delivers.
1. Product definition
Place in the ecosystem: An automation driver (docs/ECOSYSTEM.md §2.1): the one browser-mechanics library every MindAttic WebView2 app uses.
AutoWebNav is the one shared .NET 10 browser-automation library for MindAttic's WebView2 apps (Automata, JobHunt, KdpPublish, MindAttic.Browser). It fixes browser mechanics once for all of them: hard timeouts, trusted CDP input, dialog-free uploads, a self-healing element resolver, recording, Live Observation and session recording. The finished product is AutoWebNav 5.0.0 as two packages on the local feed, documented, tagged, with a written upgrade path and one command that shows each consumer's version.
2. Scope boundary
2.1 In the product
- The page surface and its actions, the resolver and recorder, observability, packaging and off-screen lanes.
- Documentation that lets each consumer move to the current major version.
2.2 Never in the product
- Anything that knows about a specific website: it belongs in the consuming app (AWN-LAW-1).
- A UI of its own:
tools/awn-observe.mjsis the only tool. - Recording inside a closed shadow root, or attaching a file inside a cross-origin frame: the browser does not expose what either needs.
- A public nuget.org release: the packages are internal, on
C:\LocalNuGet. - Upgrading the consumers themselves: each consumer's own repo tickets that.
- Extra coverage for already-working helpers, and open-ended bughunt or cleanup sweeps.
3. Users and roles
- Consumer apps (Automata, JobHunt, KdpPublish, MindAttic.Browser) and their developers.
- The owner, who watches running apps through Live Observation and reviews session recordings.
4. Requirements
Status is built (closed ticket, with evidence) or MS-90, the active milestone and the finished product.
E1. Browser surface and actions — AWN2-T17 — built
F1.1 Reliable page control — AWN2-T18 — built
- S1.1.1 Hard timeouts on every call — AWN2-T19 — built As a consumer app, I want every script call and navigation to carry a hard timeout, so that a hung page or a native alert never freezes a run. Acceptance: given a hung page, when a call exceeds its timeout, then it fails cleanly and the run continues. Evidence: 9685ff7; BrowserActions.
- S1.1.2 Trusted input and read-back — AWN2-T20 — built As a consumer app, I want clicks and typing sent as trusted CDP input and read back, so that widgets that ignore synthetic events still respond. Acceptance: given a widget that ignores synthetic events, when I act on it, then the action lands and is read back. Evidence: AWN-T2 (a0d178f), AWN-T3 (aa2cc90).
- S1.1.3 Dialog-free file upload — AWN2-T21 — built As a consumer app, I want to attach files without the Windows picker, so that uploads run unattended. Acceptance: given a file input, when I upload, then no picker opens; across origins, the upload is refused cleanly. Evidence: DomFileInjector; AWN-T2 (a0d178f).
- S1.1.4 Testable without a browser — AWN2-T22 — built As a consumer developer, I want logic written against
IBrowserSurfacewith aFakeBrowserSurface, so that it is covered by NUnit without WebView2. Evidence: AutoWebNav.Tests; AWN-T2, AWN-T3. - S1.1.5 Measured zoom — AWN2-T41 — built As a consumer app, I want to zoom the page and have the call fail when the measured zoom differs, so that layout automation never runs at the wrong scale. Evidence: 9685ff7;
IBrowserSurface.SetZoomAsync.
F1.2 Page helpers — AWN2-T23 — built
- S1.2.1 Declutter and known folders — AWN2-T24 — built As a consumer app, I want to hide page clutter one selector at a time and resolve Windows known folders, so that automation sees a clean page and saves to the right place. Acceptance: given one invalid selector, when declutter runs, then the other rules still hide their elements. Evidence: PageDeclutter (8bee492); KnownFolders (4521d4c).
- S1.2.2 Tick boxes unless processing — AWN2-T42 — built As a consumer app, I want matching native and ARIA checkboxes ticked, refused while the page shows a processing indicator, so that forms are filled only when the page is ready. Evidence: 9685ff7, 4521d4c; BrowserFormHelpers.
E2. Self-healing resolution and recording — AWN2-T25 — built
F2.1 Fingerprint resolver — AWN2-T26 — built
- S2.1.1 Eight-way fingerprints that self-heal — AWN2-T27 — built As a consumer app, I want elements remembered by id, CSS, name, classes, XPath, ARIA, label and text and re-learned on a fallback match, so that automation survives a redesign. Evidence: 9685ff7; FingerprintResolver.
- S2.1.2 Resolve inside shadow roots and frames — AWN2-T40 — built As a consumer app, I want elements found inside open and closed shadow roots and same- and cross-origin frames, so that modern pages resolve like flat ones. Evidence: 9685ff7;
closed.js,resolver.js.
F2.2 Recording — AWN2-T28 — built
- S2.2.1 Record a person into steps — AWN2-T29 — built As a consumer app, I want Spectator Mode to record the person's actions into coalesced steps, saved as a portable
*.autowebnav-recording.json, so that recordings travel between apps. Evidence: RecorderSession, RecordingBuilder; AWN-T23 (4521d4c).
F2.3 List harvesting — AWN2-T38 — built
- S2.3.1 Harvest every row — AWN2-T39 — built As a consumer app, I want one clicked row generalised into a repeating-row selector and every row harvested in one pass, including inside cross-origin frames, so that result lists are read without per-site code. Evidence: 9685ff7;
harvest.js. - Built membrane of E2: AWN2-T44, the document-start toolkit bundle (
ToolkitScripts) and the one JSON wire (WebNavJson) that F2.1, F2.2 and F2.3 share. - Debt: AWN2-T45 (harvest picking out of
recorder.js), AWN2-T46 (one frame transport; requires T45).
E3. Observability — AWN2-T30 — built
F3.1 Live Observation and session records — AWN2-T31 — built
- S3.1.1 Observe a running app — AWN2-T32 — built As the owner, I want each host app to register a localhost-only CDP port that
tools/awn-observe.mjsreads, so that I can watch any app while it runs. Evidence: 4d6ad24 (3.0.0); LiveObservation; AWN-LAW-6. - S3.1.2 Record every session — AWN2-T33 — built As the owner, I want every host session recorded and exported through MindAttic.Export, so that each run leaves a reviewable record. Evidence: 4d6ad24, b1642b5 (4.0.0); SessionRecording.
E4. Packaging and lanes — AWN2-T34 — built
F4.1 Packages and off-screen lanes — AWN2-T35 — built
- S4.1.1 Packed to the local feed — AWN2-T36 — built As a consumer developer, I want both packages packed to
C:\LocalNuGetwith whole-number versions, so that apps reference a stable version. Evidence:tools/pack.ps1; 1.0.0 to 5.0.0 packages on the feed. - S4.1.2 Off-screen lanes stay off-screen — AWN2-T37 — built As a consumer app, I want off-screen lanes to keep new windows off-screen too, so that headless runs never flash a popup. Evidence: 296b774 (AWN-T15, 5.0.0).
- S4.1.3 A session per profile — AWN2-T43 — built As a consumer app, I want one browser session per named profile, each with its own user-data folder, so that logins never cross. Evidence: 9685ff7;
IBrowserSurfaceFactory. - Debt and fixes (build-up comb, MAT-T484): AWN2-T47 (settle-wait beside the form helpers), AWN2-T48 (lanes take an observation hook instead of LiveObservation), AWN2-T49 (the drifted quickload hook copy removed), AWN2-T50 (stale paths and an orphan comment), fixes AWN2-T51 (form helpers survive a null result) and AWN2-T52 (upload has a timeout and cancel, as S1.1.1 claims).
E5. Polish and release 5.0 — AWN2-T4 — MS-90
F5.1 Documentation describes 5.0 — AWN2-T6 — MS-90
- AWN2-T10 Overview to 5.0.0 (task):
docs/overview.mdshows 5.0.0, what changed in 5.0, the consumer list andpack.ps1usage.
F5.2 Release tag — AWN2-T7 — MS-90
- AWN2-T11 Tag v5.0.0 (task):
v5.0.0tagged on the commit the 5.0.0 packages were built from, and pushed.
E6. Consumer alignment — AWN2-T5 — MS-90
Consumers on 4.0.0 can see the gap and know how to move; this is the polish-and-release step.
F6.1 Consumers can upgrade — AWN2-T8 — MS-90
- AWN2-T12 Write UPGRADING.md (task):
docs/UPGRADING.mdper major version (3, 4, 5): what changed in the API and behaviour, and what a consumer must change.
F6.2 Consumers see their version — AWN2-T9 — MS-90
- AWN2-T13 Consumer version script (task):
tools/consumers.ps1lists each workspace project's AutoWebNav version and flags anything behind.
5. Non-functional requirements
- .NET 10;
AutoWebNavtakes no WebView2 dependency (AWN-LAW-3). - Whole-number versions; a breaking change is a new major (AWN-LAW-4).
- Observation ports bind to 127.0.0.1 only; observers read and never drive (AWN-LAW-5, LAW-6).
- The page globals
window.__automata*,__awnObserveand__awnSessionRecordingare a wire protocol (AWN-LAW-2).
6. Interfaces and dependencies
- Platform owners it relies on (
docs/ECOSYSTEM.md): documents (session recordings): MindAttic.Export. - Uses: Microsoft WebView2, MindAttic.Export (session recordings).
- Used by: Automata (5.0.0), JobHunt, KdpPublish and MindAttic.Browser (4.0.0).
7. Release sequence
- MS-90, Auto.WebNav 5.0: stable, documented, consumers know how to move (active): epics AWN2-T4 and AWN2-T5. Reaching it finishes the product.
8. Change log
| Date | Change to scope | Ticket |
|---|---|---|
| 2026-11-30 | Specification written from overview, BIBLE, the code and the ticket history; built work filed as AWN2-T17..T37; docs tasks retargeted to docs/overview.md | MAT-T390 |
| 2026-11-30 | MAT-T462 single-source pass: 4 renamed, 0 buckets, 1 requires added; place in the ecosystem and platform owners named | MAT-T467 |
| 2026-12-01 | Build-up plan phase: comb 26 of 39 to 39 of 39; built F2.3 and stories AWN2-T38 to T43, membrane T44; debt T45 to T50; fixes T51, T52 | MAT-T484 |