Jump to content

ProcessLogger/SPEC

From MindAttic Docs

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.md says which part of this the current milestone delivers.

1. Product definition

In docs/ECOSYSTEM.md ProcessLogger is a product (an app): it uses the platform for settings, logging, scheduling and shipping and owns none of those concerns.

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.
  • S2.1.3 Viewer settings in the Vault — PL-T76 — built Acceptance: Given the cog, when clicked, then MindAttic.Vault.Desktop opens at ProcessLogger's tab; a refresh interval and theme saved there are kept after the viewer restarts.

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.

Found by the comb (MAT-T484)

  • Built under F2.1: Export what you see to CSV — PL-T68 (0e0a345); Viewer refresh, theme and columns — PL-T69 (7a29fc0, 440cd5f). PL-T31 and PL-T43, whose parents were rollout tickets in other repos, are seated under F2.1 and F3.1.
  • Built under E4: Operational log in MindAttic.Log — PL-T67 (0e0a345, 16d7d18), the baseline E4 quiets.
  • Built membranes: PL-T65, the logger's host wiring settings, database, log and watchers (joins E1, E2's settings and E4); PL-T66, the record schema the logger writes and the viewer reads (joins E1 and E2).
  • Debt: PL-T70 (the quickload hook is a drifted copy of the agent standard's), PL-T71 (viewer controls from MindAttic.Components web; the settings modal it named is gone since PL-T76 moved the cog to the Vault), PL-T72 (the query services' server sort is never used). The viewer's %TEMP% log is PL-T9, already planned.

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.log is gone; the viewer logs to MindAttic.Log.

E5. Proven and installed on R: — PL-T46 — MS-69

F5.1 Watcher edge cases proven — 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\ProcessLogger does not exist.

F5.3 Polish and release 1.0 — PL-T51 — MS-69

  • Limitations match the code — PL-T52 — MS-69 (requires PL-T7, PL-T9, PL-T28, PL-T44)

Membranes: PL-T73 (E4: logger and viewer write one lean log), PL-T74 (E5: the R:-only install behaves as the docs say).

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

Platform concerns it uses (docs/ECOSYSTEM.md): settings — MindAttic.Vault (per-machine settings); logging — MindAttic.Log (operational log); scheduled jobs — MindAttic.Scheduler (logon start); shipping — the shared run menu (run.ps1 to R:).

  • MindAttic.Vault (per-machine settings), MindAttic.Log (operational log), MindAttic.Scheduler (logon start).
  • Windows ETW kernel trace, WMI, SetWinEventHook, WebView2.

7. Release sequence

  1. 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
2026-11-30 MAT-T462 single-source pass: 3 renamed, 1 bucket reworded to an outcome (PL-T46 was "Trust and tidy"), 2 requires added, 1 cross-repo task re-seated (PL-T44 from MAT-T261 to PL-T50, related link kept) MAT-T465
2026-12-01 Build-up plan phase: comb 4 of 49 to 49 of 49; built PL-T67 to T69, membranes PL-T65, T66; debt PL-T70 to T72; membranes PL-T73, T74; PL-T31, T43 seated MAT-T484
Part of ProcessLogger.
From ProcessLogger/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.