CodeCompass is a production-oriented, local-first desktop application for understanding unfamiliar software repositories. It is built with Tauri, React, TypeScript, Rust, and SQLite.
- Read relevant files under
docs/. - Inspect current implementation and tests.
- Restate the current task.
- List files expected to change.
- Identify filesystem, database, privacy, security, and data-loss risks.
- Present a concise implementation plan.
- Implement only the current milestone.
- Do not begin future milestones automatically.
- Do not rewrite unrelated working code.
- Keep filesystem, database, analysis, and operating-system logic out of React components.
- Keep Rust core services separate from thin Tauri command wrappers.
- Use strict TypeScript and avoid
any. - Use typed Rust errors.
- Avoid
unwrapandexpectin recoverable production paths. - Use ordered, versioned database migrations.
- Do not edit released migrations.
- Do not add dependencies without explaining why.
- Do not create fake production data or non-functional buttons.
- Treat paths, filenames, and project contents as untrusted input.
- Restrict native operations to explicitly authorized roots.
- Do not upload private data or add hidden analytics.
- Do not log file contents, source code, secrets, or tokens.
- Use temporary directories and temporary databases in tests.
- Never execute analyzed repository code or automatically run package scripts.
- Repository source code must remain local by default.
Before declaring completion, run all applicable checks:
- frontend formatting
- frontend lint
- TypeScript type-check
- frontend tests
- frontend production build
- cargo fmt --check
- cargo clippy
- cargo test
- cargo check
Report failures and warnings honestly.
Update relevant documentation whenever architecture, database schema, privacy, security, or behavior changes. Never advertise unfinished features as complete.
After each meaningful task, explain:
- What changed.
- End-to-end data flow.
- React responsibilities.
- Rust responsibilities.
- SQLite responsibilities.
- Important files and types.
- Main algorithm.
- One likely bug and debugging steps.
- One small exercise for the repository owner.
- Five interview questions with concise answers.