Skip to content

Add repo-setup v1 config for Claude Code - #2

Merged
levidurfee merged 2 commits into
developmentfrom
chore/repo-setup-v1
Oct 17, 2026
Merged

levidurfee merged 2 commits into
developmentfrom
chore/repo-setup-v1

Conversation

@levidurfee

Copy link
Copy Markdown
Contributor

What changed

  • CLAUDE.md: the managed repo-setup block (library, Go, make check, SemVer tags, Claude may commit, taskd project rypt) plus a Branching section. The global rules assume GitHub Flow into main; this repo sends feature PRs to development, so the section overrides that.
  • Makefile: a check target that runs vet test, so the default pre-commit check make check works.
  • .claude/settings.json: allows git commit, git push, and gh pr create/view/checks, and enables the gopls-lsp plugin.
  • .claude/claude-security-guidance.md: the threat model the security-guidance reviewers read. It covers trust boundaries (API responses and caller arguments), where secrets come from, and the token, redirect and server-text rules the client already enforces.
  • .claude/repo-setup.json: the repo-setup state file (rules version 1). The initial security scan is recorded as pending.

Separately, repo-setup created the GitHub ruleset "repo-setup: default branch" on main and development. It requires PRs with review threads resolved, the test/lint/vulncheck checks, and Copilot review on push, and it blocks deletion and force pushes. That change is already live and isn't part of this diff.

Why

These files set up Claude Code for this repo: the check command, the commit policy, and the branch flow from CONTRIBUTING.md.

Testing

make check passes locally (go vet with and without the integration tag, the gofmt check, unit tests). No Go code changed.

🤖 Generated with Claude Code

Record this repo's working rules so Claude Code follows them: the
check command, the commit policy, and that feature branches and pull
requests target development rather than main. The new make check
target runs vet and test, so the default pre-commit check works here.

The threat model in .claude/claude-security-guidance.md feeds the
security-guidance reviewers. It names the token, redirect and
server-text rules the client already enforces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 17, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Restrict the auto-approved git push permission to prevent destructive or unintended pushes.

1 open issue
What changed in this PR

Adds repo-setup v1 configuration for Claude Code and a standard Go validation command.

Changes:

  • Adds make check for vet and tests.
  • Documents repository facts and branching guidance.
  • Configures Claude permissions, plugins, security guidance, and setup metadata.

The Claude settings grant unrestricted git push argument approval, including destructive flags; this requires correction before approval.

File Description
Makefile Adds the check target.
CLAUDE.md Documents repository and branching rules.
.claude/​settings.json Configures Claude permissions and the Go plugin.
.claude/​repo-setup.json Records repo-setup metadata.
.claude/​claude-security-guidance.md Documents security boundaries and rules.

Review effort: Lite

Comment thread .claude/settings.json Resolved
The allow rules let Claude push and commit without a prompt, but their
wildcards also approved forms that run commands (--receive-pack,
--exec), rewrite or delete remote refs (--force, --delete, --mirror,
--prune, colon refspecs), or skip hooks (--no-verify). Deny rules take
precedence over allow rules, so those forms are now refused while
ordinary pushes still need no prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 17, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The commit permission must block git commit -n before approval.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Block short -n form of git commit --no-verify

.claude/​settings.json:4

The allow rule still auto-approves the short git commit -n form of --no-verify, because the deny list only matches the long option on line 20. Claude can therefore bypass commit hooks while this configuration grants unattended commits; add deny patterns covering -n wherever it appears (or avoid the blanket commit allow).

1 resolved since last review

Review effort: Lite

@levidurfee
levidurfee merged commit df8ce61 into development Oct 17, 2026
4 checks passed
@levidurfee
levidurfee deleted the chore/repo-setup-v1 branch October 17, 2026 17:26
@levidurfee levidurfee mentioned this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants