A second set of eyes that never gets tired.
Second Sight watches the fields a professional fills in, compares every value against the active client's case record, and taps them on the shoulder the moment a value does not match. It is a warning system, not an authority: it never claims to know the right answer, only that something is worth checking.
Built for HackerRivals Toronto, 29 Aug 2026.
A date of birth is typed one year off. Second Sight floats a warning over the form, shows the value on file next to what was entered, and puts the right value one click (or ⌃⌥⌘C) away.
Immigration consultants, paralegals and compliance staff spend hours transcribing the same handful of facts across dozens of forms. The work is repetitive, the facts are nearly identical, and a single wrong digit in a date of birth can cost someone a visa.
Nobody catches their own typos on the four-hundredth form of the day. Second Sight does — because it is holding the case file in its head the whole time, and you are not.
Who it is for. Anyone whose job is transcribing high-stakes facts: immigration consultants, legal assistants, government caseworkers, compliance teams, finance operations, claims teams and healthcare administrators.
- Reads the source of truth. Drop in a passport; Amazon Textract AnalyzeID extracts name, date of birth, document number, issue and expiry dates at ~97% confidence. That becomes the case context.
- Watches what gets typed. A macOS event tap sees text entered into any application, and the Accessibility API tells us which field it went into.
- Watches what gets clicked. Dropdowns and radio buttons emit no keystrokes at all, so on every click we capture a small box around the cursor and read it with Textract.
- Compares, then usually says nothing. Values are normalized and compared deterministically. Only a genuine mismatch surfaces a warning.
- Reads facts out of prose, not just fields. A paralegal drafting a statutory declaration writes the same facts into a sentence with no labels and no dropdowns anywhere. Nova and a deterministic extractor pull them out and check every one.
- Warns without interrupting. A floating panel appears over whatever app you are in. It never takes keyboard focus, so you keep typing.
- Hands you the right value.
⌃⌥⌘Cputs the value from the source document on your clipboard. Catching a typo and then leaving you to retype the value by hand just invites a second one. - Protects fields you configure. Add a visible field label, its expected
value, and the kind of value it holds. Money fields understand currency and
grouping formats, so
$5,000,CAD 5,000.00, and5000match—but$50,000becomes a critical, explained “likely extra zero” finding.
All people, documents, case numbers and forms shown are fictional demo data.
A warning system nobody trusts is worse than none. Most of the engineering here is about not firing.
Every reading of a date must fail before we speak. 03/04/1997 is March 4th
in Toronto and April 3rd in Delhi. We expand it into both, and only warn if
neither matches the record.
25/07/2008 07/25/2008 July 25, 2008 25 juillet 2008 20080725
↓
2008-07-25 → silent
Names vary legitimately. Paudel, Ashwin / José García / John A Smith /
Mr John Smith all match. Paudal does not — and we say why: one character
differs.
Amazon Bedrock gets a veto. Before a warning is shown, Nova is asked whether
the difference is real. It correctly rules Katmandu against Kathmandu a
benign transliteration and suppresses the alert. It can only soften or reword a
finding — it can never invent one.
And we explain the error's shape, which is what makes a warning believable:
| Entered | On file | What we say |
|---|---|---|
25/07/2009 |
25 July 2008 |
Same day and month, year differs by one — the most common fatigue slip |
AE748021 |
AE748201 |
Two adjacent characters swapped |
N2L 3GS |
N2L 3G5 |
S/5, and a Canadian postal code never has a letter in that position |
Netherlands |
Nepal |
One row apart in an alphabetized country list, sharing two letters |
That last one is the interesting case. Nobody mistypes a dropdown — they land
one row off. Nepal → Netherlands and Canada → Cameroon are neighbours in
every country picker, as are Austria/Australia, Niger/Nigeria,
Slovakia/Slovenia. We measure that adjacency and use it as evidence.
| Service | What it does here | Why it has to be AWS |
|---|---|---|
Textract AnalyzeID |
Reads passports and ID cards into structured fields | Purpose-built for identity documents; one call replaces a whole extraction pipeline |
Textract DetectDocumentText |
Reads the screen region under the cursor | This is how dropdowns get verified at all |
Textract AnalyzeDocument (FORMS) |
Whole-screen sweep, returning label/value pairs | Pairs each value with its label — exactly the shape the verifier wants |
| Bedrock — Amazon Nova | Adjudicates findings, extracts facts from notes, resolves which control was clicked | Judgement calls no regex can make. Nova is AWS-owned, so hackathon credits apply |
| S3 + KMS | Encrypted custody of source documents | Sensitive documents need envelope encryption, not a local folder |
| DynamoDB | Case context, partitioned by case id | Client isolation enforced by the key schema, not by application filtering |
Measured on the demo machine: Textract AnalyzeID ~2.1s, DetectDocumentText ~3.1s, Bedrock adjudication ~0.7–0.9s, local comparison ~0.1ms.
In Finder, double-click Start Second Sight.command. From a shell, run:
./run-demo.shThat one action keeps a visible diagnostics terminal open, waits until the
local console is genuinely ready, then opens the console, all three demo
documents, and the presenter run sheet. It is safe to run twice: if Second
Sight is already healthy, the launcher brings the demo pages forward instead
of failing on the occupied port. On a new machine it creates .venv and
installs the required components before starting.
The launcher enables document mode automatically. The form pages still feed the real comparison engine directly as a stage-safe fallback, so the headline demo works even if macOS changes an Input Monitoring permission at the worst possible moment.
python3 -m venv .venv && ./.venv/bin/pip install -r requirements.txt
./.venv/bin/python -m secondsight --doctor # check permissions + AWS
./.venv/bin/python -m secondsight # start| http://127.0.0.1:8765 | operator console — case, live feed, AWS status |
/form |
IMM 1344 sponsorship — document 1 |
/form2 |
IMM 0008 permanent residence — document 2, the same facts again |
/form3 |
a statutory declaration in a document editor — no fields at all |
/payment |
configurable money protection in a fictional payment approval |
/pitch |
presenter run sheet and the case for the product |
The three documents exist because the thing being demonstrated is a workflow. One case gets re-keyed into form after form, and that repetition — not ignorance, not carelessness — is where transcription errors come from. Open them in separate windows.
Presentation-ready 16:9 screenshots live in demo-screenshots/:
the safety console with two explained findings, the live form flow, and the
prose-document verification view.
For the exact stage order, values, speaker cues, and fallback paths, use the
LIVE_DEMO_CHECKLIST.md run sheet.
⌃⌥⌘C |
Copy the value on file. Works in any application. The value from the source document goes on your clipboard, and you paste it instead of retyping it. |
⌘-click |
Look away. No frame is drawn, no region is captured, nothing is read. |
./.venv/bin/python -m secondsight.ctl status # permissions, AWS, counters
./.venv/bin/python -m secondsight.ctl overlay on # show the capture frame
./.venv/bin/python -m secondsight.ctl case priya # switch client
./.venv/bin/python -m secondsight.ctl copy # value on file -> clipboard
./.venv/bin/python -m secondsight.ctl sweep # check every field on screenThree are needed. --doctor tells you which are missing.
| Permission | Needed for | Without it |
|---|---|---|
| Accessibility | Reading the focused field's label | Only distinctively-shaped values (dates, IDs) classify |
| Input Monitoring | The keyboard tap | No keystroke detection at all |
| Screen Recording | Click-region capture and sweeps | No dropdown detection |
--doctor check permissions and AWS, then exit
--selftest fire one real discrepancy on startup, so you can see the
warning card and the click frame actually work
--headless no HUD or tap; console and API only
--offline disable every network call
--no-ai skip Bedrock adjudication
--no-textract on-device OCR only
--redact redact identifiers before sending to a model
--click-overlay start with the click-region frame visible (off by default)
--document-mode read facts out of prose typed in any app, not just fields
--case KEY seed case to load at startup (default: ashwin)
--alert-theme T warning card look: plain (default) or princess (stage demo)
--extended-hours N active hours before sensitivity increases (default 4)
Software that watches your screen has to be able to show you what it watched. When the click frame is on, every click briefly draws the exact rectangle that was captured — nothing wider, nothing hidden — with a label saying what happened to it: read, matched, flagged.
The frame is drawn with NSWindowSharingNone, which excludes it from screen
capture. So it can appear the instant the mouse goes down and still not end up
inside the screenshot we are taking of that same region. It also sets
ignoresMouseEvents, so it is scenery: clicks pass straight through into the
application underneath.
It is off by default — a diagnostic and demonstration device, not something
that should flash at a working professional all day. Turn it on with
--click-overlay, the console button, or secondsight.ctl overlay on.
The product is built for documents that must not leak, so the capture layer is constrained by design:
- The event tap is listen-only — it cannot alter what you type.
- Keystrokes live in one in-memory buffer, overwritten per field and cleared on flush. Never written to disk, never logged, never sent anywhere.
- A buffer becomes a structured fact only if its field label or value shape says it is a case fact. Everything else is discarded.
- Password managers, Keychain and
AXSecureTextFieldare dropped outright. - Click capture is a bounded box (520×260pt), not the screen. The full screen is only ever read when the user explicitly asks for a sweep.
⌘-click reads nothing. One key, and it looks away — no capture, no frame, no record. A tool that watches your screen needs an escape hatch that is faster to reach than a menu.- Prose is only read in
--document-mode, which is off by default. Watching sentences instead of field values is a real widening of scope, so it is a decision rather than a default. --offlineis a hard switch: nothing leaves the machine.- The clipboard is only ever written, and only when you ask. Nothing is ever pasted for you: the tap is listen-only by contract and cannot alter your form.
Raw input → Detection → Structured fact → Case context → Verification
↑ ↑
in memory discarded unless it is a case fact
only
./.venv/bin/python -m pytest tests/ -q # 227 tests, no network requiredThe suite covers date normalization across 12 renderings, locale ambiguity,
identifier checksums, postal-code shape, name variation, dropdown adjacency,
confidence scoring, case isolation, deduplication, rate limiting, batch
semantics, the fatigue signal, prose extraction, the correction shortcut, the
⌘-click escape hatch, the generated passport's ICAO check digits, and a
dedicated false-positive block where every case must stay silent. The
cross-industry suite also covers currency normalization, configurable amount
tolerances, rule isolation, serialization, and 10× extra-zero detection.
Two of those deserve naming, because they are assertions about a live performance rather than about code: a correctly-drafted declaration must produce zero warnings, and the demo passport must agree with the case file it is supposed to be the source of.
- macOS only today. The capture layer is isolated behind a small interface, but Windows and Linux are not implemented.
- Field-label reading depends on an application exposing Accessibility information. Most native and web forms do; some Electron apps do not.
- Screen-region OCR is only as good as the render — small or low-contrast text degrades it.
- This is not legal, immigration or professional advice. Second Sight flags values for a human to check. It has no opinion on which value is correct.
The full run sheet — setup, the eleven beats, the line to say at each one, and what to do when something breaks — is served by the app itself at http://127.0.0.1:8765/pitch, so it is on the machine you are presenting from rather than in a file you left on another laptop.
The short version:
Before you walk up. --doctor green on all four. --selftest to watch a
real card fire. Four windows: console, /form, /form2, /form3. Leave the
click frame off.
- Read the passport. Textract AnalyzeID, seven fields, ~2 seconds, 94–98%. The case file now lives in the machine's head, not just in yours.
- Type the date of birth correctly —
25/07/2008, then07/25/2008. Silence both times. It is not comparing strings. - Get it wrong —
25/07/2009. Critical, ~92%, "year differs by one". One digit, and the sponsor is seventeen. A sponsor must be eighteen. - Fix it without typing it —
⌃⌥⌘C, then paste. Retyping is how the mistake got there in the first place. - Turn the frame on (
ctl overlay on) and click the country dropdown. A dropdown produces no keystrokes. That box is exactly what it looked at. - Pick
Netherlands. One row from Nepal, sharing two letters. Nobody mistypes a dropdown. They land one row off. - Form 2, the same facts again, in
YYYY-MM-DD. Silence. This is form four of eleven. That is where the mistakes happen. - Form 3 — prose, no fields at all. Break one word. Seventeen facts in one paragraph. It flagged one.
- The veto.
KatmanduforKathmandu— Nova overrules our own warning. It can only soften a finding. It can never invent one. - Switch to Priya Sharma and retype
25/07/2008. Now it fires. Same value, different client. It is checking against this person's passport. - Close on the counters.
The line to land: it flagged four real mistakes and stayed quiet thirty-one times. That ratio is the product.





