chore: OSS community hygiene + Claude Code setup#607
Merged
Conversation
Tighten the project's open-source surface as outside contribution picks up: - SECURITY.md rewritten to route vulnerabilities through GitHub Security Advisories (with email fallback) and define disclosure SLAs. The prior "add an issue pls" was actively wrong for a PCIe/DMA firmware tool. - README Discord badge now points at the support server invite via a clean shields.io badge, no longer embedding a personal user ID. - CODEOWNERS added so PRs auto-request review on the security-sensitive paths (src/, .github/, build scripts, docs). - PR template with a "blast radius" section for firmware / VFIO / build changes that need extra care. - ISSUE_TEMPLATE: feature_request.md plus a chooser config.yml that disables blank issues and routes users to Security Advisories, docs, or Discussions where appropriate. - CONTRIBUTING.rst renamed to .md (file body was already markdown; the .rst extension just confused tooling). MANIFEST.in updated accordingly. - AUTHORS.rst removed — it listed only the original author while the repo now has ~10 contributors. GitHub's contributor list is the source of truth.
Adds first-class Claude Code support so the repo's domain knowledge (PCIe spec, Vivado quirks, donor-ID invariants) is available to any contributor using Claude Code without leaking into individual setups. - CLAUDE.md at repo root: covers both "user asking how to install" and "developer modifying the code" paths. Includes the install symptom table, the architectural map, the protected-files list, the code conventions (no placeholder donor IDs, argv-list subprocess, log_*_safe helpers, Jinja2 SV pitfalls), and pointers to the in-repo tooling below. - .claude/skills/vivado-log-analyzer/: extracts only actionable ERROR / CRITICAL WARNING / timing / DRC / resource-exhaustion lines from Vivado logs so failed-build diagnoses fit in context. Auto-invokes on Vivado failures, runnable directly via the bundled scripts/analyze.py. - .claude/skills/new-board-target/: user-only walkthrough for registering a new FPGA board (BOARD_CONFIGS entry, discovery verification, tests, e2e dry-run, common pitfalls). - .claude/agents/hardware-safety-reviewer.md: domain-specific reviewer for src/device_clone/, src/pci_capability/, src/templates/sv/, src/templating/timing_constraints/, and src/vivado_handling/. Complements generic code review with PCIe-spec / donor-propagation / DMA-safety / SV-template checks; explicitly stays out of style commentary. - .claude/settings.json: PreToolUse hook blocks edits to src/_version.py (setuptools-scm autogen) and lib/voltcyclone-fpga/ (git submodule); PostToolUse hook runs `ruff check --fix` on edited Python files. - .mcp.json: shared GitHub MCP server (reads GITHUB_PERSONAL_ACCESS_TOKEN from env). Contributors with Claude Code pick this up automatically. - .gitignore: keep .claude/settings.local.json (personal permissions) and transient .claude/.cache/ out of the tree while tracking the shared config above.
nb_files_neither_included_nor_excluded: 5 nb_files_formatted: 2 nb_files_already_formatted: 9 eventKey: random-ecb30b9b-ea4c-4c2d-afbd-9d23582171d9
Send "question / hardware compatibility / open-ended idea" to the support Discord instead of GitHub Discussions. The Discord channel is already the de-facto community support venue, and this avoids depending on the Discussions feature being enabled on the repo. Also updates the feature_request template to point at Discord for brainstorming, keeping the two locations consistent.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bundles open-source community hygiene improvements (security policy, templates, CODEOWNERS, contribution docs) with a first-class Claude Code setup so contributors have shared project context and tooling.
Changes:
- Hardened OSS/community surface: updated
SECURITY.md, added CODEOWNERS, PR template, and GitHub issue templates; removed staleAUTHORS.rst. - Renamed contribution guide to
CONTRIBUTING.mdand updated packaging manifest accordingly. - Added Claude Code configuration (
CLAUDE.md, skills, safety agent, hooks, MCP server config) and.gitignoreentries for local Claude state.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| SECURITY.md | Updates supported-versions and private vulnerability reporting guidance. |
| README.md | Replaces Discord badge with a shields.io badge linking to the support server. |
| MANIFEST.in | Updates packaged docs to include CONTRIBUTING.md and drop AUTHORS.rst. |
| CONTRIBUTING.md | Adds/renames contributing guide content and badges. |
| CLAUDE.md | Adds repo-wide Claude/AI assistant guidance for users and developers. |
| AUTHORS.rst | Removes outdated contributors file. |
| .mcp.json | Adds shared GitHub MCP server configuration for Claude Code. |
| .gitignore | Ignores Claude user-local settings and cache directories. |
| .github/PULL_REQUEST_TEMPLATE.md | Adds PR template with risk/blast-radius checklist. |
| .github/ISSUE_TEMPLATE/feature_request.md | Adds feature request issue template. |
| .github/ISSUE_TEMPLATE/config.yml | Configures issue chooser and routes security reports privately. |
| .github/CODEOWNERS | Adds code ownership rules for key repo areas. |
| .claude/skills/vivado-log-analyzer/SKILL.md | Documents a Vivado log summarization skill. |
| .claude/skills/vivado-log-analyzer/scripts/analyze.py | Implements Vivado log/report summarizer script. |
| .claude/skills/new-board-target/SKILL.md | Documents workflow for adding new FPGA board targets. |
| .claude/settings.json | Adds Claude Code hooks for protected paths and ruff autofix on edits. |
| .claude/agents/hardware-safety-reviewer.md | Adds a domain-focused hardware safety review agent spec. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Docs and policy. | ||
| /README.md @ramseymcgrath | ||
| /SECURITY.md @ramseymcgrath | ||
| /CONTRIBUTING.rst @ramseymcgrath |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related cleanups bundled in one PR for context: tightening the project's open-source surface as outside contribution picks up, and wiring first-class Claude Code support so the codebase's domain knowledge (PCIe spec, Vivado quirks, donor-ID invariants) is available to any contributor without leaking into individual setups.
Commits are split logically:
chore(github): harden OSS community files for external contributors— security policy, README Discord badge, CODEOWNERS, PR template, issue templates,CONTRIBUTING.rst→.mdrename, staleAUTHORS.rstremoval.chore(claude): wire CLAUDE.md, project skills, safety agent, and hooks—CLAUDE.md, two project-specific skills, a hardware-safety subagent, protection + ruff hooks, GitHub MCP server,.gitignorehousekeeping.chore(github): route issue-chooser open-ended bucket to Discord— sends questions / hardware-compat / brainstorming traffic to the support Discord instead of GitHub Discussions, so the issue chooser doesn't depend on Discussions being enabled.What changes (community files)
SECURITY.mdrewritten. The prior body ("add an issue pls") was actively wrong for a PCIe/DMA firmware tool — vulns now route through GitHub Security Advisories with email fallback, defined SLAs, and an explicit in-scope / out-of-scope section.README.md— Discord badge no longer embeds a personal user ID; it's now a clean shields.io badge linking to the support server invite..github/CODEOWNERS— added, default to@ramseymcgrath, with explicit entries for.github/,src/, build scripts, and docs. Will auto-request review on PRs going forward..github/PULL_REQUEST_TEMPLATE.md— includes a "blast radius" section calling out firmware / VFIO / build changes that warrant extra review..github/ISSUE_TEMPLATE/feature_request.md+config.yml— adds a focused feature-request template and a chooser config that disables blank issues and routes users to Security Advisories, docs, or the support Discord where appropriate.CONTRIBUTING.rst→CONTRIBUTING.md— file body was already markdown; the extension just confused tooling.MANIFEST.inupdated to match.AUTHORS.rstdeleted — it listed only the original author while the repo now has ~10 contributors. GitHub's contributor list is the source of truth.What changes (Claude Code setup)
CLAUDE.mdat repo root, structured for both audiences:src/_version.py,lib/voltcyclone-fpga/), code conventions (no placeholder donor IDs, argv-list subprocess,log_*_safehelpers, Jinja2 SV pitfalls), and pointers to the in-repo tooling below..claude/skills/vivado-log-analyzer/— Python script that extracts only actionableERROR/CRITICAL WARNING/ timing / DRC / resource-exhaustion lines from Vivado logs so failed-build diagnoses fit in context. Auto-invokes on Vivado failures; runnable directly:.claude/skills/new-board-target/— user-only walkthrough for registering a new FPGA board (BOARD_CONFIGSentry, discovery verification, tests, e2e dry-run, common pitfalls)..claude/agents/hardware-safety-reviewer.md— domain-specific reviewer scoped tosrc/device_clone/,src/pci_capability/,src/templates/sv/,src/templating/timing_constraints/,src/vivado_handling/. Complements generic code review with PCIe-spec / donor-propagation / DMA-safety / SV-template checks; explicitly stays out of style commentary..claude/settings.json— two hooks:PreToolUseblocks edits tosrc/_version.py(setuptools-scm autogen) andlib/voltcyclone-fpga/(git submodule) — protects against silent regressions where edits don't persist.PostToolUserunsruff check --fixon edited.pyfiles..mcp.json— shared GitHub MCP server. Contributors using Claude Code pick this up automatically (needs$GITHUB_PERSONAL_ACCESS_TOKENin env)..gitignore— keeps.claude/settings.local.json(personal permissions) and transient.claude/.cache/out of the tree while tracking the shared config above.Required GitHub settings change (not in code)
One repo setting should be flipped for
SECURITY.mdto work as intended — admin-level, not committable:SECURITY.mdlinks to.(Discussions does not need to be enabled — the issue chooser now routes open-ended questions to the support Discord.)
Test plan
.claude/settings.jsonvalidates as JSON;.mcp.jsonvalidates as JSON.src/_version.py, blockslib/voltcyclone-fpga/EnigmaX1/foo.sv, allowssrc/device_clone/board_config.py.vivado-log-analyzer/scripts/analyze.pycompiles cleanly and produces correctly bucketed output on a synthetic Vivado log covering all six failure categories.SECURITY.mdresolves (requires private vulnerability reporting to be enabled — see above).CODEOWNERSauto-requests reviewer on the next PR touchingsrc/.Notes
.cleanthat/is not touched. Thecleanthat[bot]is active on this repo per the contributor list, so the config is live, not dead. (Confirmed: it ran on this PR and reformatted.mcp.jsonand.claude/settings.json— semantically equivalent, rebased in.) If you ever want to remove it, uninstall the GitHub App first, then delete the directory..github/copilot-instructions.mdfile is gitignored, so its contents are not surfaced inCLAUDE.md. If anything in that local file is worth promoting to the sharedCLAUDE.md, that's a follow-up.