Fair Play & Tuning
Anti-Cheat
We are all developers here, and local values can always be manipulated. The goal, though, is to reward the numbers only for valid work, without actively reaching into the code.
Typing & pasting
Every text change in the editor runs through two checks before it even counts as keystrokes.
Paste detection: if a single change brings in noticeably more characters than the number of changes could plausibly explain by typing (more than three times the change count), it is treated as a paste: 0 keystrokes, 0 lines of code.
Spam detection: even if a change is not counted as a paste, a second guard checks three patterns:
| Pattern | Threshold |
|---|---|
| Too many pastes in a row | More than 2 pastes in 4 seconds |
| Holding a key down | More than 20 characters in 1 second |
| Persistently unrealistic pace | More than 11 characters/second averaged over 4 seconds |
If one of the three patterns triggers, the entire FP generation is blocked. Not only keystrokes, but also lines of code and focus time stand still for the duration of the block (see Focus Points). You get a notification whenever a block starts. The first violation blocks for 5 seconds. If a second one happens within the next 2 minutes, the block is extended to 2 minutes.
Line quality
Every written line has to exceed a minimum length, may only count once per file, and quickly loses value within a writing burst. See the Focus Points chapter for detail.
The activity window
The states "Working in terminal...", "Working outside VS Code..." and "Working extended outside..." all require an independent activity proof from the operating system, otherwise they never match. Only "Working in VS Code..." also accepts a raw editor event as a fallback. If the score drops to 0, the tracker simply shows "ready". The very next tick of real activity scores normally again, with no unlock threshold. All of these states are explained in the Activity Tracker chapter.
Pieces
Each of the five Pieces sources has its own suitable brake: rate limits for rare actions, a draining bucket for typing, a decaying chain for notes.