|
| 1 | +# CodeSensei Privacy & Local Storage |
| 2 | + |
| 3 | +CodeSensei is designed to be local-first. |
| 4 | + |
| 5 | +This document explains what the plugin stores on disk, what it does not do, and how retention works. |
| 6 | + |
| 7 | +## What CodeSensei stores locally |
| 8 | + |
| 9 | +By default, CodeSensei writes data under: |
| 10 | + |
| 11 | +```text |
| 12 | +~/.code-sensei/ |
| 13 | +``` |
| 14 | + |
| 15 | +### `profile.json` |
| 16 | +Your persistent learning profile, including: |
| 17 | +- belt |
| 18 | +- XP |
| 19 | +- streak data |
| 20 | +- quiz counters |
| 21 | +- quiz history |
| 22 | +- concepts seen |
| 23 | +- concepts mastered |
| 24 | +- preferences |
| 25 | +- achievement metadata |
| 26 | + |
| 27 | +### `profile.json.backup` |
| 28 | +A backup of the previous profile created before import overwrites it. |
| 29 | + |
| 30 | +### `session-commands.jsonl` |
| 31 | +A recent local history of shell commands used for contextual teaching. |
| 32 | + |
| 33 | +Stored fields: |
| 34 | +- timestamp |
| 35 | +- redacted/truncated command string |
| 36 | +- concept classification |
| 37 | + |
| 38 | +Important: |
| 39 | +- CodeSensei redacts common secret patterns before logging |
| 40 | +- Commands are truncated before storage |
| 41 | +- This file is capped to the most recent 1000 lines |
| 42 | + |
| 43 | +### `session-changes.jsonl` |
| 44 | +A recent local history of file-change events. |
| 45 | + |
| 46 | +Stored fields: |
| 47 | +- timestamp |
| 48 | +- tool name |
| 49 | +- file path |
| 50 | +- extension |
| 51 | +- detected tech label |
| 52 | +- tracked concept identifier |
| 53 | + |
| 54 | +This file is capped to the most recent 1000 lines. |
| 55 | + |
| 56 | +### `sessions.log` |
| 57 | +A compact session start/stop log used for streaks and session summaries. |
| 58 | + |
| 59 | +This file is capped to the most recent 500 lines. |
| 60 | + |
| 61 | +### `pending-lessons/` |
| 62 | +Structured teaching moments queued during the active session. |
| 63 | + |
| 64 | +This queue is cleared at session end after archival. |
| 65 | + |
| 66 | +### `lessons-archive/` |
| 67 | +Archived teaching moments from past sessions. |
| 68 | + |
| 69 | +Retention: |
| 70 | +- keeps the last 30 daily archive files |
| 71 | + |
| 72 | +### `error.log` |
| 73 | +Local plugin script errors for troubleshooting. |
| 74 | + |
| 75 | +## What CodeSensei does not do |
| 76 | + |
| 77 | +The shell scripts in this repository do not: |
| 78 | +- upload your code |
| 79 | +- send telemetry |
| 80 | +- send your profile to Dojo Coding |
| 81 | +- call external tracking APIs |
| 82 | + |
| 83 | +## Redaction behavior |
| 84 | + |
| 85 | +CodeSensei attempts to redact common sensitive patterns before writing commands to local logs, including values that look like: |
| 86 | +- `*_TOKEN` |
| 87 | +- `*_SECRET` |
| 88 | +- `*_PASSWORD` |
| 89 | +- `*_API_KEY` |
| 90 | +- `Authorization: Bearer ...` |
| 91 | +- credential-bearing URLs like `https://user:pass@example.com` |
| 92 | + |
| 93 | +This redaction is heuristic, not a cryptographic guarantee. |
| 94 | + |
| 95 | +If you run especially sensitive commands and want zero retention, you should clear `~/.code-sensei/` afterwards. |
| 96 | + |
| 97 | +## How to inspect your local footprint |
| 98 | + |
| 99 | +Run: |
| 100 | + |
| 101 | +```bash |
| 102 | +/code-sensei:doctor |
| 103 | +``` |
| 104 | + |
| 105 | +That command reports: |
| 106 | +- setup health |
| 107 | +- profile status |
| 108 | +- storage paths |
| 109 | +- pending lesson count |
| 110 | +- next-step suggestions |
| 111 | + |
| 112 | +## How to reset everything |
| 113 | + |
| 114 | +Delete the local directory: |
| 115 | + |
| 116 | +```bash |
| 117 | +rm -rf ~/.code-sensei |
| 118 | +``` |
| 119 | + |
| 120 | +That removes your local profile, logs, backups, pending lessons, and archives. |
0 commit comments