Increment 0: add XCTest target, testing process & 10x value plan

- Add TopManagerTests unit-test target (hosted, @testable import)
- 14 baseline tests for formatters and model math (all green)
- scripts/test.sh build+test loop driver
- docs/TESTING.md (5-gate process), docs/VALUE_PLAN.md (10x rubric)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hariel1985
2026-07-02 19:51:47 +02:00
szülő 5ec09d9279
commit d59bf2b7b0
7 fájl változott, egészen pontosan 500 új sor hozzáadva és 0 régi sor törölve

38
docs/VALUE_PLAN.md Normal file
Fájl megtekintése

@@ -0,0 +1,38 @@
# TopManager — 10× Value Plan
## Thesis
TopManager today is a polished, **read-only Activity Monitor clone**: it *shows* numbers.
Its value ceiling is "I can see what's using my Mac and kill a process."
To make it ~10× more valuable we move it from **viewer → system-intelligence & control
center**: it watches the system for you, remembers its history, explains problems, exposes
data Activity Monitor hides, and lets you act — including always-on from the menu bar.
All existing features are preserved (several are improved).
## Value rubric (capability scoring)
| Dimension | Before | After (target) |
|---|---|---|
| Per-process depth | CPU, mem, threads, state | + disk I/O rate, energy impact, args, open files, full path, tree |
| Time memory | 60 in-RAM points, lost on quit | persistent history, minutes → 24h, survives restart |
| Proactivity | none | threshold alerts + native notifications + health score + diagnosis |
| Energy / battery | **absent** | battery health (cycles/condition/capacity) + per-process energy |
| Always-on surface | bare "12%" | rich menu-bar HUD: CPU/RAM/net + top consumers + quick-kill |
| Customization | none (all hardcoded) | Settings: refresh rate, menu metric, thresholds, launch-at-login |
## Increments
0. **Test harness** — XCTest target, `@testable import`, 5-gate process. ✅
1. **Persistent history** — `MetricsStore` ring buffer on disk; 1m/5m/1h/24h charts.
2. **Deep per-process data** — disk I/O, energy impact, args, open files, path; surface the
(currently unused) `ProcessDetailView` as a real inspector; new sortable columns.
3. **Battery + energy** — IOKit `PowerMonitor`; Energy/Battery UI; menu-bar battery.
4. **Alerts + health** — `AlertEngine`, `UserNotifications`, in-app inbox, 0–100 health score,
"why is my Mac slow?" diagnosis.
5. **Settings + rich menu bar** — configurable refresh/metric/thresholds, launch-at-login
(`SMAppService`), menu-bar HUD with top consumers + quick actions.
6. **Verification** — full test run, runtime smoke, ground-truth cross-checks, sign, commit.
## Non-negotiables
- Never break a shipped feature (regression Gate 5).
- No new entitlements / no root / no privileged helper — must run & sign as-is.
- Every increment passes all five gates in `docs/TESTING.md` before moving on.