Skip to content

Commit 576543c

Browse files
committed
Update based on insights
1 parent f1ae455 commit 576543c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## Project Context
6+
7+
This project uses Java (primary), Rust (JNI/native layer), and Maven for builds. Key projects: Red5 server, MoQ relay (draft-14 spec), RTMP codec, media pipeline. When working on MoQ, always reference the relevant draft spec version. When working across Java/Rust JNI boundaries, test both sides.
8+
59
## Project Overview
610

711
Red5 Server is an open-source media server written in Java that supports RTMP, RTMPT, RTMPS, RTMPE, and Server-Sent Events (SSE) protocols for streaming video/audio and real-time messaging. The project uses Maven as its build system with a multi-module structure. Current version is **2.0.23**.
@@ -48,6 +52,10 @@ mvn -Dmaven.test.skip=true clean package -P assemble
4852
mvn -Dmilestone.version=1.0.7-M1 clean package -Pmilestone
4953
```
5054

55+
## Build & Test
56+
57+
Always compile and test from the project root using `mvn clean test` or the appropriate top-level build command — never compile from within a reactor submodule directory where errors may not surface.
58+
5159
## Project Architecture
5260

5361
### Module Structure
@@ -162,6 +170,18 @@ RTMP protocol security enhancements (see `SECURITY_FIXES_SUMMARY.md` for details
162170
- **`ISharedObject`** - Shared object management
163171
- **`ISSEService`** - Server-Sent Events service interface
164172

173+
## Debugging Guidelines
174+
175+
When debugging, do NOT assume data corruption or external causes first. Always investigate the controlled codebase (encoder/decoder symmetry, race conditions, logic bugs) before considering corruption, RTMPE, or external factors. Ask clarifying questions rather than pursuing speculative fixes.
176+
177+
When fixing bugs, always address the root cause — not symptoms. Do not add null guards, skip-byte workarounds, or band-aid fixes without first understanding WHY the invalid state occurs. If unsure, ask the user before applying a speculative fix.
178+
179+
When the user shares log files or diagnostic output, read ALL of it carefully before concluding. Do not stop analysis at the first plausible issue — there may be secondary problems (e.g., capsule issues, datagram forwarding regressions) visible further in the logs.
180+
181+
## Git Conventions
182+
183+
Never amend a commit that has already been pushed to a remote branch. Create a new commit instead.
184+
165185
### Related Documentation
166186

167187
- **`SSE-README.md`** - Server-Sent Events implementation guide

0 commit comments

Comments
 (0)