Maintain TokenMap as a local desktop app for source-tree analysis with synchronized tree and treemap inspection.
- Windows is the primary MVP target; macOS is secondary validation; do not spend the current task on Linux polish.
- Current technical boundaries live in
docs/architecture.md. - Day-to-day execution flow and active-plan handling live in
docs/workflow.md. - See
docs/localization.mdfor localization.
Clever.TokenMap.Corestays free of Avalonia.Clever.TokenMap.Appdoes not read the file system directly; it goes through services and contracts.MainWindowViewModelstays a shell coordinator; long-lived analysis, settings, and treemap scope state live in app-layer services/state objects.- Token counting stays local behind
ITokenCounter. - Line metrics stay local in the infrastructure analysis pipeline for included text files.
- The scanner defines the included tree and the set of analyzed nodes.
- The treemap stays one custom-rendered control, not a control-per-rectangle surface.
- Do not add WebView, browser embedding, JS charting, cloud services, remote tokenizers, or heavy dependencies without explicit need.
- Do not make unrelated refactors.
- Do not change architecture decisions without updating the current-state docs.
- Keep one canonical representation per concept; do not retain legacy aliases, compatibility shims, or historical fallback paths unless the user explicitly requires backward compatibility.
- In PowerShell, do not use
&&; use compatible command separation. - Follow
docs/commit-policy.mdfor commit strategy and git safety.
- Keep docs limited to current state and plans.
- Keep one source of truth: rewrite the canonical instruction in place, prefer fewer precise rules, and do not add duplicate or follow-up guidance beside it.
- Update
docs/AGENTS.mdif the documentation map or policy changes.
- Standard repo verification flow, run sequentially and never overlap
dotnet buildwithdotnet test:dotnet restoredotnet build Clever.TokenMap.slndotnet test Clever.TokenMap.sln --no-build
- If
dotnet buildordotnet testhits a file lock from a running app process, first stop the currently runningClever.TokenMap.Appinstance and then rerun the blocked verification step. - If the change adds headless or UI tests, run them too.
- Choose the smallest workaround that does not break the documented architecture.
- If the blocker creates a lasting repo limitation, reflect it in the relevant current-state doc.
- Do not expand scope unless necessary.