Skip to content

Commit 35461db

Browse files
justin808claude
andcommitted
Improve CLAUDE.md with testing requirements and clarity
Add critical testing requirements and documentation improvements: **Testing Requirements:** - Require local testing before claiming fixes - Distinguish confirmed fixes from hypothetical fixes - Document testing limitations when local testing isn't possible - Provide clear reproduction steps **Documentation Updates:** - Clarify Pro changelog location (CHANGELOG_PRO.md at root) - Add guidance for analyzing CI failures - Update Pro changelog update commands - Improve formatting and organization These improvements help prevent CI iteration loops and ensure more reliable fixes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d433348 commit 35461db

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

CLAUDE.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,32 @@ Top-level documentation (like README.md, CONTRIBUTING.md) should remain at the r
2929

3030
These requirements are non-negotiable. CI will fail if not followed.
3131

32+
**CRITICAL - LOCAL TESTING REQUIREMENTS:**
33+
34+
1. **NEVER claim a test is "fixed" without running it locally first**
35+
- If working in Conductor workspace or similar isolated environment, clearly state: "Cannot test locally in isolated workspace"
36+
- If test requires specific environment (database, Redis, etc.), state: "Requires [X] setup not available in current environment"
37+
38+
2. **Distinguish hypothetical fixes from confirmed fixes:**
39+
- ✅ Use "This fixes..." or "Fixed" ONLY after local verification
40+
- ⚠️ Use "This SHOULD fix..." or "Proposed fix (UNTESTED)" when you haven't verified
41+
- 📋 Use "Analysis suggests..." or "Root cause appears to be..." for investigation without fixes
42+
43+
3. **When analyzing CI failures:**
44+
- Clearly mark all analysis as "UNTESTED - requires local reproduction" unless verified
45+
- Provide exact commands to reproduce and test the fix locally
46+
- State why you cannot test if applicable (workspace restrictions, missing services, etc.)
47+
48+
4. **Prefer local testing over CI iteration:**
49+
- Don't push "hopeful" fixes and wait for CI feedback
50+
- Test locally first whenever technically possible
51+
- Document what you tested and what results you got
52+
53+
5. **Document your testing:**
54+
- Include test commands in commit messages for complex fixes
55+
- Note in PR descriptions which fixes were tested locally vs. which are hypothetical
56+
- Explain any testing limitations encountered
57+
3258
**🚀 AUTOMATIC: Git hooks are installed automatically during setup**
3359

3460
Git hooks will automatically run linting on **all changed files (staged + unstaged + untracked)** before each commit - making it fast while preventing CI failures!
@@ -73,6 +99,21 @@ Pre-commit hooks automatically run:
7399

74100
**CRITICAL: NEVER wait for CI to verify fixes. Always replicate failures locally first.**
75101

102+
**When Analyzing CI Failures:**
103+
104+
1. **First, reproduce the failure locally** using the tools below
105+
2. **If you cannot reproduce locally**, clearly state why:
106+
- "Working in Conductor isolated workspace - cannot run full Rails app"
107+
- "Requires Docker/Redis/PostgreSQL not available in current environment"
108+
- "Integration tests need full webpack build pipeline not set up locally"
109+
3. **Mark all proposed fixes as UNTESTED** until they can be verified:
110+
- ❌ DON'T: "This fixes the integration test failures"
111+
- ✅ DO: "This SHOULD fix the integration test failures (UNTESTED - requires local Rails app with webpack)"
112+
4. **Provide reproduction steps** even if you can't execute them:
113+
- Include exact commands to run
114+
- Document environment requirements
115+
- Explain what success looks like
116+
76117
#### Switch Between CI Configurations
77118

78119
The project tests against two configurations:
@@ -196,11 +237,11 @@ cd react_on_rails_pro && bundle exec rake rbs:validate
196237

197238
**IMPORTANT: This is a monorepo with TWO separate changelogs:**
198239
- **Open Source**: `/CHANGELOG.md` - for react_on_rails gem and npm package
199-
- **Pro**: `/react_on_rails_pro/CHANGELOG.md` - for react_on_rails_pro gem and npm packages
240+
- **Pro**: `/CHANGELOG_PRO.md` - for react_on_rails_pro gem and npm packages
200241

201242
When making changes, update the **appropriate changelog(s)**:
202243
- Open-source features/fixes → Update `/CHANGELOG.md`
203-
- Pro-only features/fixes → Update `/react_on_rails_pro/CHANGELOG.md`
244+
- Pro-only features/fixes → Update `/CHANGELOG_PRO.md`
204245
- Changes affecting both → Update **BOTH** changelogs
205246

206247
### Changelog Guidelines
@@ -211,7 +252,7 @@ When making changes, update the **appropriate changelog(s)**:
211252
- **Use `/update-changelog` command** for guided changelog updates with automatic formatting
212253
- **Version management after releases**:
213254
- Open source: `bundle exec rake update_changelog`
214-
- Pro: `cd react_on_rails_pro && bundle exec rake update_changelog`
255+
- Pro: `bundle exec rake update_changelog CHANGELOG=CHANGELOG_PRO.md`
215256
- **Examples**: Run `grep -A 3 "^#### " CHANGELOG.md | head -30` to see real formatting examples
216257

217258
### Beta Release Changelog Curation

0 commit comments

Comments
 (0)