A full disk is not a datacenter drama — it is a Monday. PDFs downloaded twice, photos copied from backups, videos duplicated across project folders. I wanted to see what was a twin, decide calmly, and send copies to Trash without a generic tool that scares me or asks for blind trust.

Twice is the modest answer I built for my Mac: Electron, React, scanning in a worker, and UI shaped in Figma. This article covers the SDD + Figma MCP + engineering flow — and where AI showed up on purpose.

Configure → Scan → Review flow (local recording).

Twice configure screen on macOS: folders, file types, and Find twins action.

Folder setup, exclusions, and categories (PDF, photos, videos, screenshots).

1. The everyday pain

The problem is ordinary: space vanishes while blame sits in faceless duplicates. Existing tools are either opaque or push bulk actions without review. My bar was simple — scan folders I choose, compare content (PDF, image, video), show twin groups, then move selected copies to Trash.

That already sets product constraints: macOS permissions, honest progress, pause/cancel, review screens before deleting anything. None of this asks for “more AI”; it asks for clear engineering.

2. Spec before Electron

Before scaffolding Electron, I wrote verifiable behavior: Configure → Scan → Review → Confirm; file types; persistence under Application Support; rules for preserved originals vs disposable copies. SDD here is not corporate paperwork — it is a contract with myself and with the coding agent.

Each implementation task tied back: named IPC (scan:start, progress, completion), UI state with Zustand, a separate worker so the UI stays responsive. When AI suggested shortcuts outside scope, the question was: “Is this in the spec or feature creep?”

3. Figma MCP in practice

I wanted visual consistency — frosted glass, brand indigo, dark mode — without reinventing components every screen. I used Figma MCP to pull frame context and map tokens (surfaces, Inter type, loading halos) into app CSS. The repo’s design-info.md bridges design and code.

That cuts “vibe UI”: colors and spacing refer to reviewed design decisions, not model guesses. The cost is discipline — update Figma or tokens when the spec changes, not just ask the agent for another layout.

Twice review screen listing duplicate screenshot groups.

Review before Trash: groups, filters, and preview — nothing automatic.

4. App architecture

Stack: Electron 34, electron-vite, React 19, TypeScript, main process scan orchestrator, worker for hashing/comparison, typed preload, macOS builds via electron-builder. Electron was not hype — desktop-native Trash, folder permissions, and heavy scanning with a React UI I already ship well.

Twice does not prove I am “a desktop engineer first”; it shows I can pick the right tool, decompose the system (IPC, state, scan, review), and ship something I use daily.

Twice modal confirming moving copies to Trash with reclaimable space.

Explicit confirmation: originals kept, copies restorable from Trash.

5. Intentional AI (not vibe coding)

I used agents to speed boilerplate, refine components, and explore variants — always with spec, reviewed diffs, and manual testing on real folders. Good AI here is a bounded copilot: it does not decide deletions alone, invent security permissions, or replace understanding of workers and IPC.

The result is not perfect or an “AI startup”. It is an honest utility aligned to my problem, built with the same rigor I bring to larger products — except here I am the team, the reviewer, and the user who notices when the disk breathes again.