Inspiration

Research on developer focus is brutal: it takes an average of 23 minutes to fully recover deep focus after an interruption, and developers hit 12–15 major context switches a day. Even after you switch back to your code, part of your attention stays stuck on the last task — "attention residue." The cost shows up directly in the work: interrupted sessions take twice as long and contain twice as many bugs, and 92–93% of resumed coding sessions require re-opening or re-searching multiple files just to remember what was happening.

We looked at how existing tools handle this — Linear, Jira, GitHub Issues, Notion, and newer context-recovery CLIs like Rekall and devctx. All of them are either team-process tools that don't watch your actual local workspace, or they lean on an AI call to reconstruct what you were doing. None of them answer the four questions a developer actually asks when they sit back down: What was I working on? What changed? What's still unfinished? What should I do next?

That gap is wherewasi: a tool that reads the state already sitting in your local repo — git history, uncommitted changes, TODOs, failing tests — and turns it into one clear, deterministic answer, with zero API calls required.

What it does

Run wherewasi inside any Git repository and it builds a "Welcome Back" dashboard from the signals already in your workspace:

  • Current branch, recent commits, and everything uncommitted (staged, modified, deleted, untracked)
  • Prioritized TODO/FIXME comments, ranked High/Medium/Standard by how close they are to your active work
  • Failing tests and lint errors, when available
  • What changed since your last check-in (it remembers, per project, in a local SQLite history)
  • One single recommended next step — not a list, one ranked answer — with a plain-English reason and the runner-up candidates shown for context

It ships as a real CLI with focused commands beyond the full dashboard: --summary, --todo, --next-step, --export-to-markdown (a shareable status report), history and projects (past check-ins across every repo you've used it in), and open (jumps straight to the recommended file and line in your editor).

Everything above runs fully offline and deterministic — no AI, no network call, no API key. There's an optional --ai / --ai-code flag that lets you plug in your own Anthropic key for a richer natural-language explanation of the pick, but it's off by default and never changes what gets picked, only how the reasoning is phrased.

On Windows, it ships as a single self-installing .exe — no Python required on the machine that runs it. Run it once and it quietly installs itself to %LOCALAPPDATA% and adds itself to your PATH.

How we built it

  • Python 3.11+, Typer for the CLI surface, GitPython for repository introspection, Rich for the terminal dashboard, and a local, per-project SQLite database (WAL mode) for session history.
  • A weighted scoring engine (scoring.py) instead of a flat if/else: every candidate — a diagnostic failure, a dirty file, a TODO — is scored on recency, urgency keywords, FIXME-vs-TODO, clustering, git blame staleness, "hot" files with heavy recent commit activity, linked ticket references (#123, PROJ-456), and files that have broken checks repeatedly before. A hard tier system (diagnostics ≫ dirty files ≫ TODOs) is enforced through fixed score-gap constants so no combination of bonus signals can ever let a lower tier outrank a higher one.
  • A local phrase-variation engine (vocabulary.py) that writes the "why this, why now" explanation from scratch each run using real numbers pulled from the scoring context (minutes since edit, lines changed, days stale) — so the same signals rarely produce the same sentence twice, without a single AI call.
  • A personalization layer (learning.py) that quietly tracks, per project, whether past suggestions actually got acted on, and turns that into a bonus multiplier (0.5x–1.5x) applied only to the bonus score — never strong enough to break the tier guarantee.
  • Packaging: a single-file PyInstaller build with a self_install.py module that makes the .exe install and PATH-register itself on first run, no admin rights or separate installer script needed.

Challenges we ran into

Most of the real challenges only showed up once we stopped reading the code and started actually running it against real and synthetic repos:

  • A Windows path-separator bug quietly broke High-priority TODO matching because task scanning stored OS-native paths while git reports forward slashes.
  • git diff --numstat octal-quotes non-ASCII filenames, which silently desynced the "changed lines" signal for any file with a unicode name — fixed by re-parsing with -z.
  • Rich's Table.add_row() treats plain strings as console markup, so any TODO, commit message, or filename containing [ or ] (e.g. data[i]) was getting silently mangled on screen.
  • The single most serious bug we found: an ordinary "I edited this an hour ago" recency bucket returned a bonus with no display tag, but the code appended that None to the suggestion's reason list anyway — meaning a completely everyday, non-edge-case session had a real chance of crashing the tool outright.
  • Stress-testing 10–30 concurrent runs surfaced a genuine race condition in the local database's "create project if it doesn't exist" check.
  • Shallow clones, merge conflicts, bare repositories, a corrupted local history database, and a locked-down home directory each crashed the tool in a different way before we hardened around them one by one.
  • Distribution ended up being a bigger challenge than expected: "let someone install this" turned out to mean a machine with zero Python installed, which no pip-based install can ever satisfy. We pivoted to a self-installing PyInstaller .exe instead.

Accomplishments that we're proud of

  • 155+ passing tests, up from 3 at the start of the project, including dedicated regression suites for every edge case above.
  • A next-step recommendation engine that is fully deterministic and explainable — no AI dependency for the tool's core value, by design.
  • Verified end-to-end (not just unit-tested) against real edge cases: no-Python machines, no-git machines, corrupted databases, shallow clones, bare repos, and 15+ concurrent runs.
  • A natural-language explanation layer that varies its phrasing without ever calling an external API.
  • A one-file, self-installing Windows distribution — genuinely no Python required on the end user's machine.

What we learned

That real hardening comes from dogfooding, not re-reading your own code — several of the worst bugs (the None-in-reason-list crash especially) were completely invisible on review and only surfaced by actually running the tool against everyday scenarios. We also learned a lot of git internals most tools never have to touch directly: how shallow clones "graft" a boundary commit with no parent object, how GitPython reports unmerged paths on both sides of a merge conflict, and how SQLite's WAL mode behaves under real concurrent writers. On the product side, we learned the value of committing to "deterministic and local by default" rather than defaulting to an AI call — it made the tool faster, free to run, and easier to trust.

What's next for wherewasi

  • IDE integration — capturing open tabs and cursor position, not just git state
  • Passive, background context capture instead of an on-demand command
  • A visual timeline/board view across check-ins
  • Searchable memory across past sessions and projects
  • Team handoff mode — a shareable "here's where this stands" for a teammate picking up your branch

These were deliberately scoped out of the MVP and v1.0.0 to keep the core context-recovery loop sharp and dependency-free; they're the natural next layer once the deterministic core is proven out.

Built With

Share this project:

Updates

Submission history