HQE Workbench is a local-first macOS desktop application and CLI designed for running the HQE (High Quality Engineering) Engineer Protocol. It automates codebase health auditing, secret redaction, and provides a "Thinktank" prompt library for AI-assisted engineering tasks, all while prioritizing privacy and security.
- Type: Hybrid Application (Rust CLI + Tauri/React Desktop App)
- Core Logic: Rust (Workspace with multiple crates)
- Frontend: TypeScript, React, Tailwind CSS, Tauri v2
- Key Features:
- Automated repository scanning and health auditing.
- Local-only mode for privacy.
- Encrypted chat system with persistent history.
- "Thinktank" prompt library with 30+ expert prompts.
- LLM integration (OpenAI-compatible providers).
The project is structured as a Rust workspace with a modular architecture:
cli/hqe: The CLI entry point.desktop/workbench: The Tauri/React desktop application.crates/: Shared internal libraries:hqe-core: Core scan engine, pipeline orchestration, and encrypted chat logic.hqe-openai: OpenAI-compatible client and provider management.hqe-git: Git operations wrapper.hqe-artifacts: Report and manifest generation.hqe-mcp: Model Context Protocol implementation (Thinktank prompts).hqe-ingest: File system walking and ingestion.hqe-flow: Workflow execution.
mcp-server/: Configuration and data for the Thinktank prompt library.
- Rust: 1.75+
- Node.js: 20+
- macOS: 12.0+ (Monterey)
- Python: 3.11+ (for protocol validation scripts)
Always run the preflight check before committing changes. This executes build, tests, formatting, and linting for both Rust and TypeScript.
npm run preflightTo build and run the CLI:
# Build release binary
cargo build --release -p hqe
# Run a scan
./target/release/hqe scan /path/to/repo --local-onlyTo develop and build the desktop application:
cd desktop/workbench
# Install dependencies
npm install
# Run in development mode (hot-reloading)
npm run tauri:dev
# Build for production
npm run tauri:build- Commit Messages: Follow Conventional Commits (e.g.,
feat(core): ...,fix(ui): ...). - Branching: Use
feat/for features,fix/for bugs,docs/for documentation.
- Error Handling: Use
thiserrorfor library crates andanyhowfor the CLI/binary. - Async Runtime: Use
tokio. - Documentation: All public functions must have
///doc comments. - Testing: Co-locate unit tests. Run
cargo test --workspace.
- Components: Use Functional Components with Hooks.
- State Management: Use
zustandfor global state. - Styling: Use Tailwind CSS.
- Type Safety: Strictly avoid
any. Use interfaces/types and proper narrowing. - Testing: Use
vitest. Runnpm testwithindesktop/workbench.
- Secrets: Never commit secrets. Use the
keyringcrate/macOS Keychain for storage. - Input/Output: Validate all inputs and sanitize all LLM outputs (DOMPurify).