mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-20 23:19:58 +00:00
- Add ARCHITECTURE.md, FAQ.md, LLM.md documentation - Add LICENSE (MIT), CODE_OF_CONDUCT.md, PR template - Add .editorconfig for consistent formatting - Add check.sh script for validation - Fix ESLint errors in hud-config.ts and settings-reader.ts - Various test and component improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Repository Guidelines
Project Structure & Module Organization
tui/houses the TypeScript/React Ink HUD app.tui/src/components/for UI panels (e.g.,ContextMeter.tsx).tui/src/hooks/for shared state hooks (e.g.,useHudState.ts).tui/src/lib/for core logic (event reader, tracking, types).
scripts/contains shell entrypoints used by Claude hooks.hooks/defines event subscriptions (hooks.json).docs/stores changelog, ADRs, and research notes.
Build, Test, and Development Commands
Run commands from tui/ unless noted.
bun installinstalls dependencies.bun run buildcompiles TypeScript totui/dist/.bun run devwatches TypeScript for local development.bun run startruns the built HUD (dist/index.js).bun testruns the Vitest suite;bun test <pattern>targets a file.bun run lintruns ESLint;bun run formatruns Prettier.- Root
scripts/verify-install.shchecks plugin installation.
Coding Style & Naming Conventions
- TypeScript strict mode; avoid
any(useunknownor real types). - React functional components with hooks; wrap panels in
React.memo. - Tests live alongside code and use
*.test.ts/*.test.tsx. - Formatting via Prettier, linting via ESLint flat config (
tui/eslint.config.js).
Testing Guidelines
- Frameworks: Vitest + @testing-library/react + ink-testing-library.
- Prefer focused component/unit tests under
tui/src/. - Run all tests with
bun test; usebun test --coveragefor coverage.
Commit & Pull Request Guidelines
- Commit messages follow
type: summary(examples:docs: ...,refactor: ...). - PRs should include a clear description, tests for new behavior, and any UI screenshots for visual changes in the TUI.
- Before opening a PR: run
bun run lint,bun run typecheck, andbun test.
Security & Configuration Tips
- Runtime FIFOs and logs live under
~/.claude/hud/(sessions, pids, logs). - Hook scripts rely on
jq; ensure it is available in local dev.