Skip to content

Commit 01751c9

Browse files
committed
add claude settings
1 parent 4bf2562 commit 01751c9

File tree

11 files changed

+745
-0
lines changed

11 files changed

+745
-0
lines changed

.claude/settings.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(git status:*)",
5+
"Bash(git diff:*)",
6+
"Bash(git log:*)",
7+
"Bash(git branch:*)",
8+
"Bash(git worktree:*)",
9+
"Bash(git show:*)",
10+
"Bash(git stash:*)",
11+
"Bash(git add:*)",
12+
"Bash(git commit:*)",
13+
"Bash(git checkout:*)",
14+
"Bash(git switch:*)",
15+
"Bash(git merge:*)",
16+
"Bash(git rebase:*)",
17+
"Bash(git blame:*)",
18+
"Bash(git remote:*)",
19+
"Bash(git fetch:*)",
20+
"Bash(git tag:*)",
21+
"Bash(ls:*)",
22+
"Bash(cat:*)",
23+
"Bash(head:*)",
24+
"Bash(tail:*)",
25+
"Bash(wc:*)",
26+
"Bash(sort:*)",
27+
"Bash(uniq:*)",
28+
"Bash(cut:*)",
29+
"Bash(tr:*)",
30+
"Bash(diff:*)",
31+
"Bash(file:*)",
32+
"Bash(stat:*)",
33+
"Bash(mkdir:*)",
34+
"Bash(cp:*)",
35+
"Bash(mv:*)",
36+
"Bash(touch:*)",
37+
"Bash(echo:*)",
38+
"Bash(pwd:*)",
39+
"Bash(which:*)",
40+
"Bash(find:*)",
41+
"Bash(grep:*)",
42+
"Bash(rg:*)",
43+
"Bash(fd:*)",
44+
"Bash(tree:*)",
45+
"Bash(du:*)",
46+
"Bash(env:*)",
47+
"Bash(printenv:*)",
48+
"Bash(date:*)",
49+
"Bash(jq:*)",
50+
"Bash(sed:*)",
51+
"Bash(awk:*)",
52+
"Bash(xargs:*)",
53+
"Bash(tee:*)",
54+
"Bash(basename:*)",
55+
"Bash(dirname:*)",
56+
"Bash(gh:*)",
57+
"Bash(node:*)",
58+
"Bash(npm:*)",
59+
"Bash(npx:*)",
60+
"Bash(bun:*)",
61+
"Bash(bunx:*)",
62+
"Bash(afplay:*)",
63+
"Read",
64+
"Edit",
65+
"Write",
66+
"Glob",
67+
"Grep",
68+
"Agent"
69+
],
70+
"deny": [
71+
"Bash(rm -rf /:*)",
72+
"Bash(rm -rf ~:*)",
73+
"Bash(git push --force:*)",
74+
"Bash(git reset --hard:*)",
75+
"Bash(git clean -f:*)",
76+
"Bash(git branch -D:*)"
77+
]
78+
}
79+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
name: code-review
3+
description: Review a PR or set of changes for code quality, correctness, and team standards. Use when user wants a code review, PR review, asks to review changes, or mentions "review this".
4+
---
5+
6+
# Code Review
7+
8+
Perform a thorough code review on a PR or set of changes, producing actionable feedback organized by severity.
9+
10+
## Process
11+
12+
### 1. Gather the changes
13+
14+
Determine what to review:
15+
- If given a PR number/URL: `gh pr diff <number>` and `gh pr view <number>`
16+
- If reviewing local changes: `git diff` or `git diff <branch>`
17+
- If given specific files: read those files
18+
19+
Also read the PR description or task file for context on intent.
20+
21+
### 2. Understand the context
22+
23+
Before reviewing line-by-line:
24+
- What problem is this solving? (read PR description, linked issues, task files)
25+
- What are the acceptance criteria?
26+
- Which files are test files vs production code?
27+
28+
### 3. Review systematically
29+
30+
Check each area in order of importance:
31+
32+
#### Correctness
33+
- Does the code do what the PR/task says it should?
34+
- Are there logic errors, off-by-ones, missing edge cases?
35+
- Are error conditions handled?
36+
- Could this break existing functionality?
37+
38+
#### Security
39+
- Any user input used without validation/sanitization?
40+
- Secrets or credentials exposed?
41+
- SQL injection, XSS, command injection risks?
42+
- Overly permissive access controls?
43+
44+
#### Scope compliance
45+
- Does the change stay within the stated goal?
46+
- Any "while I'm here" changes that should be separate?
47+
- Speculative features or premature abstractions?
48+
49+
#### Redundancy & reuse
50+
- Does new code duplicate existing utilities?
51+
- Could existing helpers be used instead?
52+
- Are there repeated patterns that should be extracted?
53+
54+
#### Type safety & API design
55+
- Are public interfaces well-typed?
56+
- Are function signatures clear about what they accept and return?
57+
- Any `any` types without justification?
58+
59+
#### Test quality
60+
- Do tests verify behavior through public interfaces?
61+
- Are tests coupled to implementation details?
62+
- Are critical paths covered?
63+
- Do tests read like specifications?
64+
65+
#### Style & consistency
66+
- Does the code follow the patterns established in this repo?
67+
- Naming conventions followed?
68+
- File organization consistent with project structure?
69+
70+
### 4. Present findings
71+
72+
Organize feedback into three categories:
73+
74+
**Must fix** — Issues that should block merge:
75+
- Bugs, security issues, correctness problems
76+
- Breaking changes without migration
77+
- Missing tests for critical paths
78+
79+
**Should fix** — Issues worth addressing but not blocking:
80+
- Minor redundancy or missed reuse opportunities
81+
- Style inconsistencies
82+
- Weak typing that could be stronger
83+
84+
**Nit** — Optional improvements:
85+
- Naming suggestions
86+
- Minor readability improvements
87+
- Alternative approaches to consider
88+
89+
For each finding:
90+
- Reference the specific file and line(s)
91+
- Explain *why* it's an issue (not just *what* to change)
92+
- Suggest a concrete fix when possible
93+
94+
### 5. Summary
95+
96+
End with:
97+
- Overall assessment (approve, request changes, or needs discussion)
98+
- What the PR does well (acknowledge good work)
99+
- The most important 1-2 items to address
100+
101+
## Adapting for team use
102+
103+
When used as part of a team code review workflow:
104+
- Check the repo's `CLAUDE.md` for project-specific standards
105+
- Reference team conventions when flagging issues
106+
- Distinguish between objective issues (bugs) and subjective preferences (style)
107+
- Be explicit about which standards come from the project vs general best practices

.claude/skills/grill-me/SKILL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: grill-me
3+
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
4+
---
5+
6+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7+
8+
If a question can be answered by exploring the codebase, explore the codebase instead.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Reference
2+
3+
## Dependency Categories
4+
5+
When assessing a candidate for deepening, classify its dependencies:
6+
7+
### 1. In-process
8+
9+
Pure computation, in-memory state, no I/O. Always deepenable — just merge the modules and test directly.
10+
11+
### 2. Local-substitutable
12+
13+
Dependencies that have local test stand-ins (e.g., PGLite for Postgres, in-memory filesystem). Deepenable if the test substitute exists.
14+
15+
### 3. Remote but owned (Ports & Adapters)
16+
17+
Your own services across a network boundary. Define a port (interface) at the module boundary. Tests use an in-memory adapter. Production uses the real adapter.
18+
19+
### 4. True external (Mock)
20+
21+
Third-party services you don't control. Mock at the boundary. The deepened module takes the external dependency as an injected port.
22+
23+
## Testing Strategy
24+
25+
**Replace, don't layer.**
26+
27+
- Old unit tests on shallow modules are waste once boundary tests exist — delete them
28+
- Write new tests at the deepened module's interface boundary
29+
- Tests assert on observable outcomes through the public interface
30+
- Tests should survive internal refactors
31+
32+
## Issue Template
33+
34+
<issue-template>
35+
36+
## Problem
37+
38+
- Which modules are shallow and tightly coupled
39+
- What integration risk exists in the seams between them
40+
- Why this makes the codebase harder to navigate and maintain
41+
42+
## Proposed Interface
43+
44+
- Interface signature (types, methods, params)
45+
- Usage example showing how callers use it
46+
- What complexity it hides internally
47+
48+
## Dependency Strategy
49+
50+
Which category applies and how dependencies are handled.
51+
52+
## Testing Strategy
53+
54+
- **New boundary tests to write**: behaviors to verify at the interface
55+
- **Old tests to delete**: shallow module tests that become redundant
56+
- **Test environment needs**: local stand-ins or adapters required
57+
58+
## Implementation Recommendations
59+
60+
- What the module should own (responsibilities)
61+
- What it should hide (implementation details)
62+
- What it should expose (the interface contract)
63+
- How callers should migrate to the new interface
64+
65+
</issue-template>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: improve-codebase-architecture
3+
description: Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.
4+
---
5+
6+
# Improve Codebase Architecture
7+
8+
Explore a codebase like an AI would, surface architectural friction, discover opportunities for improving testability, and propose module-deepening refactors as GitHub issue RFCs.
9+
10+
A **deep module** (John Ousterhout, "A Philosophy of Software Design") has a small interface hiding a large implementation. Deep modules are more testable, more AI-navigable, and let you test at the boundary instead of inside.
11+
12+
## Process
13+
14+
### 1. Explore the codebase
15+
16+
Use the Agent tool with subagent_type=Explore to navigate the codebase naturally. Do NOT follow rigid heuristics — explore organically and note where you experience friction:
17+
18+
- Where does understanding one concept require bouncing between many small files?
19+
- Where are modules so shallow that the interface is nearly as complex as the implementation?
20+
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called?
21+
- Where do tightly-coupled modules create integration risk in the seams between them?
22+
- Which parts of the codebase are untested, or hard to test?
23+
24+
The friction you encounter IS the signal.
25+
26+
### 2. Present candidates
27+
28+
Present a numbered list of deepening opportunities. For each candidate, show:
29+
30+
- **Cluster**: Which modules/concepts are involved
31+
- **Why they're coupled**: Shared types, call patterns, co-ownership of a concept
32+
- **Dependency category**: See [REFERENCE.md](REFERENCE.md) for the four categories
33+
- **Test impact**: What existing tests would be replaced by boundary tests
34+
35+
Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
36+
37+
### 3. User picks a candidate
38+
39+
### 4. Frame the problem space
40+
41+
Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
42+
43+
- The constraints any new interface would need to satisfy
44+
- The dependencies it would need to rely on
45+
- A rough illustrative code sketch to make the constraints concrete — this is not a proposal, just a way to ground the constraints
46+
47+
Show this to the user, then immediately proceed to Step 5.
48+
49+
### 5. Design multiple interfaces
50+
51+
Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
52+
53+
Give each agent a different design constraint:
54+
55+
- Agent 1: "Minimize the interface — aim for 1-3 entry points max"
56+
- Agent 2: "Maximize flexibility — support many use cases and extension"
57+
- Agent 3: "Optimize for the most common caller — make the default case trivial"
58+
- Agent 4 (if applicable): "Design around the ports & adapters pattern for cross-boundary dependencies"
59+
60+
Each sub-agent outputs:
61+
62+
1. Interface signature (types, methods, params)
63+
2. Usage example showing how callers use it
64+
3. What complexity it hides internally
65+
4. Dependency strategy (how deps are handled — see [REFERENCE.md](REFERENCE.md))
66+
5. Trade-offs
67+
68+
Present designs sequentially, then compare them in prose. Give your own recommendation.
69+
70+
### 6. User picks an interface (or accepts recommendation)
71+
72+
### 7. Create GitHub issue
73+
74+
Create a refactor RFC as a GitHub issue using `gh issue create`. Use the template in [REFERENCE.md](REFERENCE.md).

0 commit comments

Comments
 (0)