ProcessLogger/SPEC
ProcessLogger — 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
ProcessLogger catches whatever stole focus. An elevated logger records every Windows process start and exit, even sub-second ones (ETW kernel trace and WMI, reconciled into one row), with memory peaks, and every foreground change, into one local SQLite file; a WebView2 viewer searches it. The finished product runs for weeks without bloating its operational log, has its reconciler's edge cases tested, and lives only on R:.
2. Scope boundary
2.1 In the product
- Process capture (ETW + WMI reconciled), memory sampling, focus logging.
- A viewer that filters and sorts the record and honours a custom database path.
- Settings in the Vault; installed on R: by the run menu; a lean operational log in MindAttic.Log.
2.2 Never in the product
- Monitoring features: alerts, remote viewing, sending anything off the machine (BIBLE §3).
- Cross-platform support: Windows only, elevated logger.
- New capture sources beyond ETW, WMI and the foreground hook.
- Audit-generated test coverage beyond the watcher (path heuristics, text filter, query sorts, memory sampler: PL-T3..T6, T8).
- Generic sweeps: full test runs, cleanups, exhaustive bughunts.
3. Users and roles
- The owner asks "what just stole focus?" and searches the viewer.
4. Requirements
E1. Capture everything — PL-T55 — built
F1.1 Process and focus capture — PL-T56 — built
- S1.1.1 Sub-second processes recorded — PL-T57 — built As the owner, I want processes that live a fraction of a second recorded, so that a flash on screen has a name. Acceptance: Given ETW and WMI report one process within 250 ms, when it is persisted, then there is one row with source Both. Evidence: 133c6e6;
ProcessWatcherServiceTests. - S1.1.2 Who started it and how heavy — PL-T58 — built Acceptance: Each row has parent, path, command line, duration and memory peaks. Evidence:
MemorySamplerService. - S1.1.3 Focus changes logged — PL-T59 — built Acceptance: Given a foreground change, when it happens, then the process and title are recorded. Evidence:
FocusWatcherService.
E2. Search it — PL-T60 — built
F2.1 Viewer — PL-T61 — built
- S2.1.1 Filter the record — PL-T62 — built Acceptance: Given a name with or without
.exe, when filtered, then both spellings match. Evidence: 133c6e6. - S2.1.2 Settings in the Vault, custom database — PL-T31 — built Evidence: e8cfff5.
E3. Installed on R: — PL-T63 — built
F3.1 Run menu — PL-T64 — built
- S3.1.1 Shared run menu — PL-T43 — built Evidence: abeaf18.
E4. Lean operational log — PL-T45 — MS-69
F4.1 Quiet log levels — PL-T47 — MS-69
- Stop the 1.7 GB a day — PL-T28 — MS-69 As the owner, I want the operational log to hold only lifecycle, warnings and errors, so that it can run for weeks. Acceptance: Given a captured process start and stop, when it is logged, then no Information row lands in MindAttic.Log (EF Core at Warning, per-process lines at Debug).
F4.2 Viewer logs to MindAttic.Log — PL-T48 — MS-69
- Viewer stops writing %TEMP% — PL-T9 — MS-69 Acceptance:
processlogger-debug.logis gone; the viewer logs to MindAttic.Log.
E5. Trust and tidy — PL-T46 — MS-69
F5.1 Reconciler tests — PL-T49 — MS-69
- Watcher edge cases tested — PL-T7 — MS-69 Acceptance: NUnit covers the source filter, never-seen stops, path fill from a second source, duration, memory fields on stop, events after Dispose, and no duplicate rows for one PID.
F5.2 R:-only deploy — PL-T50 — MS-69
- Remove the C: deploy — PL-T44 — MS-69 Acceptance:
C:\Apps\ProcessLoggerdoes not exist.
F5.3 Overview current — PL-T51 — MS-69
- Limitations match the code — PL-T52 — MS-69
5. Non-functional requirements
- Windows only; the logger runs elevated; capture never crashes on a protected or vanished process (PL-LAW-3).
- Database writes are serialized (PL-LAW-4); everything stays in one local SQLite file.
- The operational log grows by lifecycle events only.
6. Interfaces and dependencies
- MindAttic.Vault (per-machine settings), MindAttic.Log (operational log), MindAttic.Scheduler (logon start).
- Windows ETW kernel trace, WMI, SetWinEventHook, WebView2.
7. Release sequence
- MS-69 — Lean logger: quiet operational log, trusted reconciler, R:-only deploy (active,
docs/RELEASE.md): E4, E5. E5 is the polish and release step. The finished product.
8. Change log
| Date | Change to scope | Ticket |
|---|---|---|
| 2026-11-30 | Specification written from BIBLE, RELEASE, the code and the ticket history; MS-69 confirmed as the finished product | MAT-T394 |