diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..0f84e75 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @jarrodwatts diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..7f05038 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Report a reproducible problem +labels: bug +--- + +## Summary + +## Steps to Reproduce + +## Expected Behavior + +## Actual Behavior + +## Environment + +- OS: +- Node/Bun version: +- Claude Code version: + +## Logs or Screenshots diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..cffbb04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Security report + url: mailto:security@jarrodwatts.com + about: Please report security vulnerabilities via email. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..d39f39e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,15 @@ +--- +name: Feature request +about: Suggest an idea or enhancement +labels: enhancement +--- + +## Summary + +## Problem to Solve + +## Proposed Solution + +## Alternatives Considered + +## Additional Context diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f990b4a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..6a4a73a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +## Summary + +## Testing + +- [ ] `npm test` +- [ ] `npm run test:coverage` + +## Checklist + +- [ ] Tests updated or not needed +- [ ] Docs updated if behavior changed diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2f5b08f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: npm + - run: npm ci + - run: npm run build + - run: npm test + - run: npm run test:coverage + - name: Create release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/CLAUDE.md b/CLAUDE.md index 3af61d6..7821c78 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,8 +9,8 @@ Claude HUD is a Claude Code plugin that displays a real-time multi-line statusli ## Build Commands ```bash -bun install # Install dependencies -bun run build # Build TypeScript to dist/ +npm ci # Install dependencies +npm run build # Build TypeScript to dist/ # Test with sample stdin data echo '{"model":{"display_name":"Opus"},"context_window":{"current_usage":{"input_tokens":45000},"context_window_size":200000}}' | node dist/index.js diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..84fa520 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,31 @@ +# Code of Conduct + +## Our Pledge + +We pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to a positive environment include: + +- Being respectful and considerate +- Using welcoming and inclusive language +- Accepting constructive feedback +- Focusing on what is best for the community + +Examples of unacceptable behavior include: + +- Harassment or discrimination +- Trolling, insulting, or derogatory comments +- Publishing others' private information without permission + +## Enforcement + +Community leaders are responsible for clarifying standards of acceptable behavior and may take appropriate action in response to unacceptable behavior. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the maintainer at: security@jarrodwatts.com. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 2.1. +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e0f2e72 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing + +Thanks for contributing to Claude HUD. This repo is small and fast-moving, so we optimize for clarity and quick review. + +## How to Contribute + +1) Fork and clone the repo +2) Create a branch +3) Make your changes +4) Run tests and update docs if needed +5) Open a pull request + +## Development + +```bash +npm ci +npm run build +npm test +``` + +## Tests + +See `TESTING.md` for the full testing strategy, fixtures, and snapshot updates. + +## Code Style + +- Keep changes focused and small. +- Prefer tests for behavior changes. +- Avoid introducing dependencies unless necessary. + +## Pull Requests + +- Describe the problem and the fix. +- Include tests or explain why they are not needed. +- Link issues when relevant. diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..cb70e5e --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,5 @@ +# Maintainers + +- Jarrod Watts (https://github.com/jarrodwatts) + +If you are interested in becoming a maintainer, open an issue to start the conversation. diff --git a/README.md b/README.md index 1137725..6f7c6d6 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ git clone https://github.com/jarrodwatts/claude-hud cd claude-hud # Install & build -bun install -bun run build +npm ci +npm run build # Test with sample data echo '{"model":{"display_name":"Opus"},"context_window":{"current_usage":{"input_tokens":45000},"context_window_size":200000}}' | node dist/index.js @@ -127,6 +127,22 @@ npm test See `TESTING.md` for the full testing strategy and contribution expectations. +## Contributing + +See `CONTRIBUTING.md` for guidelines and `CODE_OF_CONDUCT.md` for community standards. + +## Support + +See `SUPPORT.md` for support scope and contact guidance. + +## Maintainers + +See `MAINTAINERS.md`. + +## Plugin Release + +See `RELEASING.md` for the checklist to ship a new Claude Code plugin release. + ## License MIT diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..e9a77de --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,24 @@ +# Releasing + +This project ships as a Claude Code plugin. Releases should include compiled `dist/` output. + +## Release Checklist + +1) Update versions: + - `package.json` + - `.claude-plugin/plugin.json` + - `CHANGELOG.md` +2) Build: + ```bash + npm ci + npm run build + npm test + npm run test:coverage + ``` +3) Verify plugin entrypoint: + - `.claude-plugin/plugin.json` points to `dist/index.js` +4) Commit and tag: + - `git tag vX.Y.Z` +5) Publish: + - Push tag + - Create GitHub release with notes from `CHANGELOG.md` diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c2e11bd --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Security Policy + +## Supported Versions + +Security fixes are applied to the latest release series only. + +## Reporting a Vulnerability + +Please report security issues to: security@jarrodwatts.com + +Include a clear description, reproduction steps, and any relevant logs or screenshots. +We will acknowledge receipt within 5 business days and provide a timeline for a fix if applicable. diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..8f77c53 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,16 @@ +# Support Policy + +This project is maintained on a best-effort basis. + +## What We Support + +- The latest release +- Claude Code versions documented in `README.md` +- Node.js 18+ or Bun + +## How to Get Help + +- Open a GitHub issue for bugs or feature requests +- For security issues, see `SECURITY.md` + +We cannot guarantee response times, but we will triage issues as time allows.