Skip to content

Add agends#5

Merged
kimkulling merged 1 commit intomainfrom
docs/add_afent
Mar 6, 2026
Merged

Add agends#5
kimkulling merged 1 commit intomainfrom
docs/add_afent

Conversation

@kimkulling
Copy link
Owner

@kimkulling kimkulling commented Mar 6, 2026

Summary by CodeRabbit

  • Documentation
    • Added comprehensive development guidelines for contributors, including project setup and build instructions, C++ code style standards, naming conventions, class design best practices, error handling patterns, documentation requirements using industry-standard tools, project structure information, and step-by-step instructions for common development tasks like adding modules and running tests.

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

Walkthrough

Adds a comprehensive AGENTS.md documentation file defining development guidelines for the Segfault project, including setup instructions, build procedures, code style standards, naming conventions, class design practices, error handling requirements, and common development tasks.

Changes

Cohort / File(s) Summary
Developer Guidelines Documentation
AGENTS.md
New documentation covering project overview, prerequisites, build setup (CMake presets, vcpkg), shader compilation, code style (C++17, clang-format), naming conventions, class design best practices, error handling standards, Doxygen documentation, platform macros, and common development tasks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Add agends' contains a likely typo ('agends' instead of 'agents') and is vague, failing to clearly convey that the PR adds documentation guidelines for agentic coding. Revise the title to 'Add AGENTS.md documentation for agentic coding guidelines' or similar to accurately reflect the change and fix the typo.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/add_afent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
AGENTS.md (1)

40-40: Platform-specific executable extension may cause confusion.

The documentation uses .exe extension which is Windows-specific. On Linux/macOS, the executable would be ./hello_world without the extension. Consider using a platform-agnostic notation or documenting both versions.

📝 Suggested improvement
-./hello_world.exe
+./hello_world      # Linux/macOS
+./hello_world.exe  # Windows

Or use a generic form:

-./hello_world.exe
+./hello_world  # Add .exe extension on Windows
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 40, Update the documentation entry that currently shows
"./hello_world.exe" to be platform-agnostic: replace the Windows-specific
"./hello_world.exe" with a neutral form such as "./hello_world" and explicitly
note that Windows users should run "hello_world.exe" (or "hello_world.exe" via
.\hello_world.exe in PowerShell/Command Prompt) while Linux/macOS users run
"./hello_world"; ensure the AGENTS.md line referencing "./hello_world.exe" is
changed and the short platform note is added so readers on all OSes know the
correct command.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 215-230: The fenced code block in AGENTS.md that shows the project
directory tree is missing a language specifier; update the opening fence from
``` to ```text (or ```plaintext) for that block so markdownlint and renderers
treat it as plain text — locate the triple-backtick block containing the project
tree (the one starting with "src/" and the directory lines) and change the fence
token to include "text".
- Around line 215-230: Update the repository structure diagram in AGENTS.md to
include the missing src/contrib/vcpkg/ entry: modify the contrib section (the
block showing "├── contrib/") to list both "cppcore/" and "vcpkg/" with an
explanatory comment like "vcpkg package manager integration" so the diagram
shows "├── contrib/ \n│   ├── cppcore/     # Common utilities library
(containers, memory, etc.) \n│   └── vcpkg/       # vcpkg package manager
integration".
- Line 92: Update AGENTS.md to remove or correct the invalid .clang-format
reference: either delete the sentence referencing
src/contrib/cppcore/.clang-format, replace it with the correct path to an
existing .clang-format file (if one exists), or replace it with a brief
explanation of how formatting is applied in this repo (e.g., no repo-level
.clang-format, use editor/CI rules). Edit the AGENTS.md section that currently
mentions `.clang-format` so it accurately reflects the repository's formatting
setup.
- Line 178: The AGENTS.md line claiming "Avoid exceptions (not currently used in
codebase)" is incorrect because the codebase throws std::runtime_error in
RHIVulkan.cpp; update the doc to remove or correct that parenthetical note. Edit
the sentence to either drop "(not currently used in codebase)" or replace it
with accurate wording that exceptions (e.g., std::runtime_error thrown from
functions in RHIVulkan.cpp) are used sparingly, and ensure the mention
references the exception type std::runtime_error so readers know the actual
pattern.
- Around line 113-122: The Functions convention row in the table incorrectly
reads "PascalCase"; change it to "camelCase" so it matches the examples and
codebase (e.g., getNext(), init(), readManifest(), isEmpty()); update the
"Functions" row label/value to "camelCase" and ensure the example cells remain
unchanged to reflect the correct style.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 40: Update the documentation entry that currently shows
"./hello_world.exe" to be platform-agnostic: replace the Windows-specific
"./hello_world.exe" with a neutral form such as "./hello_world" and explicitly
note that Windows users should run "hello_world.exe" (or "hello_world.exe" via
.\hello_world.exe in PowerShell/Command Prompt) while Linux/macOS users run
"./hello_world"; ensure the AGENTS.md line referencing "./hello_world.exe" is
changed and the short platform note is added so readers on all OSes know the
correct command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5565e1ed-699c-4b59-8103-f1542bc048de

📥 Commits

Reviewing files that changed from the base of the PR and between fbed507 and 5559cd8.

📒 Files selected for processing (1)
  • AGENTS.md


### Formatting (LLVM-based)

The project uses `.clang-format` (from `src/contrib/cppcore/.clang-format`). Key settings:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for all .clang-format files in the repository
echo "=== Searching for all .clang-format files ==="
fd --type f "\.clang-format" --hidden

echo ""
echo "=== Check root directory ==="
ls -la .clang-format 2>/dev/null || echo "No .clang-format in root"

echo ""
echo "=== Check if referenced file exists ==="
ls -la src/contrib/cppcore/.clang-format 2>/dev/null || echo "File not found at src/contrib/cppcore/.clang-format"

echo ""
echo "=== List directory structure around cppcore ==="
ls -la src/contrib/cppcore/ 2>/dev/null | head -20 || echo "Directory not accessible"

Repository: kimkulling/Segfault

Length of output: 412


Remove or correct the non-existent .clang-format reference in AGENTS.md at line 92.

The referenced file src/contrib/cppcore/.clang-format does not exist in the repository. No .clang-format files were found anywhere in the codebase. Either provide the correct path to an existing .clang-format file, explain how formatting rules are actually applied, or remove this section if code formatting guidelines are not currently documented.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 92, Update AGENTS.md to remove or correct the invalid
.clang-format reference: either delete the sentence referencing
src/contrib/cppcore/.clang-format, replace it with the correct path to an
existing .clang-format file (if one exists), or replace it with a brief
explanation of how formatting is applied in this repo (e.g., no repo-level
.clang-format, use editor/CI rules). Edit the AGENTS.md section that currently
mentions `.clang-format` so it accurately reflects the repository's formatting
setup.

Comment on lines +113 to +122
| Element | Convention | Example |
|---------|------------|---------|
| Classes | PascalCase | `ArgumentParser`, `RenderThread` |
| Functions | PascalCase | `getNext()`, `init()` |
| Member Variables | `m` + PascalCase | `mCurrentIndex`, `mArgument` |
| Constants | `k` + PascalCase | `kMaxSize` |
| Enums | PascalCase | `ModuleState`, `LogType` |
| Enum Values | PascalCase | `ModuleState::Init` |
| Typedefs | PascalCase | `StringArray` |
| Files | PascalCase | `ArgumentParser.h`, `app.cpp` |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cd /tmp && find . -name "AGENTS.md" 2>/dev/null | head -5

Repository: kimkulling/Segfault

Length of output: 45


🏁 Script executed:

# First, let's locate the repository structure
git ls-files | head -20

Repository: kimkulling/Segfault

Length of output: 542


🏁 Script executed:

# Check for function declarations and their naming patterns
# Looking for both camelCase and PascalCase function declarations
rg "^\s*(bool|void|int|auto|static|const)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\(" --type cpp | head -30

Repository: kimkulling/Segfault

Length of output: 2264


🏁 Script executed:

# Specifically look for getNext and init functions
rg "(getNext|init)\s*\(" --type cpp -B 2 -A 2

Repository: kimkulling/Segfault

Length of output: 2823


Convention label is incorrect for functions.

The table labels functions as using "PascalCase", but the examples and actual codebase use camelCase. Functions in the codebase consistently follow camelCase: getNext(), init(), readManifest(), isEmpty(), etc. Update the convention label from "PascalCase" to "camelCase" to match both the examples and the actual implementation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 113 - 122, The Functions convention row in the table
incorrectly reads "PascalCase"; change it to "camelCase" so it matches the
examples and codebase (e.g., getNext(), init(), readManifest(), isEmpty());
update the "Functions" row label/value to "camelCase" and ensure the example
cells remain unchanged to reflect the correct style.


- **Return bool** for functions that can fail
- **Use optional/result types** from cppcore for complex error states
- Avoid exceptions (not currently used in codebase)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for exception usage in the codebase

echo "=== Searching for 'throw' statements ==="
rg -n "throw\s+" --type cpp -i 2>/dev/null | head -30

echo ""
echo "=== Searching for 'try' blocks ==="
rg -n "try\s*\{" --type cpp 2>/dev/null | head -30

echo ""
echo "=== Searching for exception-related includes ==="
rg -n "#include\s+<(stdexcept|exception)>" --type cpp 2>/dev/null

echo ""
echo "=== Searching for 'catch' blocks ==="
rg -n "catch\s*\(" --type cpp 2>/dev/null | head -30

echo ""
echo "=== Check if src/runtime/ directory exists ==="
ls -la src/runtime/ 2>/dev/null || echo "src/runtime/ not found, searching entire repo"

echo ""
echo "=== Getting repo structure ==="
find . -type f -name "*.cpp" -o -name "*.h" | head -20

Repository: kimkulling/Segfault

Length of output: 3311


Remove or correct the inaccurate claim about exception usage.

The documentation states exceptions are "not currently used in codebase", but the codebase uses std::runtime_error in src/runtime/renderer/RHIVulkan.cpp (17 instances across multiple functions). Either remove the parenthetical remark or update it to reflect the actual exception usage pattern.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 178, The AGENTS.md line claiming "Avoid exceptions (not
currently used in codebase)" is incorrect because the codebase throws
std::runtime_error in RHIVulkan.cpp; update the doc to remove or correct that
parenthetical note. Edit the sentence to either drop "(not currently used in
codebase)" or replace it with accurate wording that exceptions (e.g.,
std::runtime_error thrown from functions in RHIVulkan.cpp) are used sparingly,
and ensure the mention references the exception type std::runtime_error so
readers know the actual pattern.

Comment on lines +215 to +230
```
src/
├── runtime/ # Core engine library
│ ├── core/ # Core utilities (argparser, tokenizer, etc.)
│ ├── renderer/ # Vulkan rendering
│ └── application/ # Application framework
├── contrib/
│ └── cppcore/ # Common utilities library (containers, memory, etc.)
├── examples/ # Example applications
├── tools/ # Development tools (assetbaker)
└── editor/ # Editor application
assets/
├── shaders/ # GLSL shaders
└── manifests/ # Asset manifests
scripts/ # Build scripts
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language specification to fenced code block.

The fenced code block showing the project structure should specify a language for proper rendering. Use text or plaintext for directory tree structures.

📝 Suggested fix
-```
+```text
 src/
 ├── runtime/           # Core engine library

As per coding guidelines, markdownlint recommends specifying a language for all fenced code blocks.

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 215-215: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 215 - 230, The fenced code block in AGENTS.md that
shows the project directory tree is missing a language specifier; update the
opening fence from ``` to ```text (or ```plaintext) for that block so
markdownlint and renderers treat it as plain text — locate the triple-backtick
block containing the project tree (the one starting with "src/" and the
directory lines) and change the fence token to include "text".

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the documented directory structure exists

# Check main directories
echo "=== Checking main directories ==="
for dir in src/runtime src/contrib src/examples src/tools src/editor assets scripts; do
  if [ -d "$dir" ]; then
    echo "$dir exists"
  else
    echo "$dir missing"
  fi
done

# Check runtime subdirectories
echo -e "\n=== Checking src/runtime subdirectories ==="
for dir in src/runtime/core src/runtime/renderer src/runtime/application; do
  if [ -d "$dir" ]; then
    echo "$dir exists"
  else
    echo "$dir missing"
  fi
done

# Check assets subdirectories
echo -e "\n=== Checking assets subdirectories ==="
for dir in assets/shaders assets/manifests; do
  if [ -d "$dir" ]; then
    echo "$dir exists"
  else
    echo "$dir missing"
  fi
done

# Show actual top-level structure
echo -e "\n=== Actual top-level structure ==="
ls -la | grep "^d"

# Show src directory structure
echo -e "\n=== Actual src/ structure (2 levels deep) ==="
if [ -d "src" ]; then
  find src -maxdepth 2 -type d | head -20
else
  echo "src/ directory not found"
fi

Repository: kimkulling/Segfault

Length of output: 1127


Update AGENTS.md to document the vcpkg/ subdirectory.

The documented project structure is accurate, but incomplete. All documented directories exist and match their descriptions. However, src/contrib/vcpkg/ exists in the repository but is not listed in the structure diagram. Add it under src/contrib/:

├── contrib/
│   ├── cppcore/     # Common utilities library (containers, memory, etc.)
│   └── vcpkg/       # vcpkg package manager integration
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 215-215: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 215 - 230, Update the repository structure diagram in
AGENTS.md to include the missing src/contrib/vcpkg/ entry: modify the contrib
section (the block showing "├── contrib/") to list both "cppcore/" and "vcpkg/"
with an explanatory comment like "vcpkg package manager integration" so the
diagram shows "├── contrib/ \n│   ├── cppcore/     # Common utilities library
(containers, memory, etc.) \n│   └── vcpkg/       # vcpkg package manager
integration".

@kimkulling kimkulling merged commit 85f8101 into main Mar 6, 2026
3 of 5 checks passed
@kimkulling kimkulling deleted the docs/add_afent branch March 6, 2026 15:36
@coderabbitai coderabbitai bot mentioned this pull request Mar 6, 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.

1 participant