PULSE AUTOMATED SCORING - INSTALL GUIDE
=========================================

This installs a small background checker that scores your Claude Code
coding sessions automatically, a few minutes after you stop working.
No slash command, no manual step, no login, no key.


HAVE CLAUDE CODE? EASIER OPTION
-------------------
See INSTALL_WITH_CLAUDE_CODE.md in this same folder - paste one prompt
into a Claude Code session and it installs this for you, fixing any
error it hits along the way (a common Windows security prompt, a Mac
quarantine flag, etc.) instead of you troubleshooting it yourself.
Skip the manual steps below if you use that instead.


WINDOWS - INSTALL (manual)
-------------------
1. Unzip this package anywhere (e.g. Desktop).
2. Open PowerShell, then run:

     cd path\to\pulse-auto-watcher

3. Run these two lines first (safe - only affects this PowerShell
   window, avoids a common Windows security prompt on any downloaded
   script):

     Unblock-File -Path .\install_watcher.ps1
     Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force

4. Run the installer:

     .\install_watcher.ps1 -ServerUrl "https://veracctracker-ymkgo.ondigitalocean.app"

   If this still fails with a script-blocked error, your organization
   enforces execution policy via Group Policy - ask IT, or run:

     powershell -ExecutionPolicy Bypass -File .\install_watcher.ps1 -ServerUrl "https://veracctracker-ymkgo.ondigitalocean.app"

5. Expect to see:
     "Installed. 'PulseAutoScan' will run pulse_auto_scan.py every 5
     minutes, against https://..."

CHECK IT WORKED (Windows):
     Get-ScheduledTask -TaskName PulseAutoScan
   Expect: State: Ready

     Get-ScheduledTaskInfo -TaskName PulseAutoScan
   Expect: LastTaskResult: 0 (once it has actually fired at least once)


MAC - INSTALL (manual)
-------------------
1. Unzip this package anywhere.
2. Open Terminal, then run:

     cd path/to/pulse-auto-watcher

3. Run these two lines first (clears the download-quarantine flag and
   makes the script runnable):

     xattr -d com.apple.quarantine install_watcher.sh com.vera.pulseautoscan.plist
     chmod +x install_watcher.sh

4. Run the installer:

     ./install_watcher.sh "https://veracctracker-ymkgo.ondigitalocean.app"

   If macOS still blocks it with a Finder popup: System Settings ->
   Privacy & Security -> scroll to the blocked-item notice -> Allow
   Anyway, then retry.

5. Expect to see:
     "Installed. com.vera.pulseautoscan will run pulse_auto_scan.py
     every 5 minutes, against https://..."

CHECK IT WORKED (Mac):
     launchctl list | grep pulseautoscan
   Expect: one line, exit status 0


WHAT IT DOES
-------------------
Every 5 minutes, it looks at your own Claude Code session files
(already saved on your computer by Claude Code itself) and scores any
session that's substantial enough (15+ user messages, 15+ minutes) and
has gone quiet for a while (60+ minutes of inactivity). These thresholds
are set by your team's admin and can change over time (this install
fetches the current values from the server each run); the numbers above
are today's defaults, not a fixed rule. A report appears here a few
minutes after you stop working on a session:

     Windows: %USERPROFILE%\claude-pulse-analysis\automated\
     Mac:     ~/claude-pulse-analysis/automated/

Nothing pops up or notifies you when a report lands - just check that
folder. Nothing older than about 3 days gets scored, so a fresh install
won't dig through months of old history.


PAUSE (stop temporarily, without uninstalling)
-------------------
Windows:  Disable-ScheduledTask -TaskName PulseAutoScan
Mac:      launchctl unload ~/Library/LaunchAgents/com.vera.pulseautoscan.plist

To resume later:
Windows:  Enable-ScheduledTask -TaskName PulseAutoScan
Mac:      launchctl load ~/Library/LaunchAgents/com.vera.pulseautoscan.plist


UNINSTALL (remove completely)
-------------------
Windows:  Unregister-ScheduledTask -TaskName PulseAutoScan -Confirm:$false
Mac:      launchctl unload ~/Library/LaunchAgents/com.vera.pulseautoscan.plist


QUESTIONS / PROBLEMS
-------------------
Contact sbare@verasolutions.org
