Skip to content

docs(readme): replace ASCII diagrams with Mermaid.js flowcharts#23

Open
akshayagunna151 wants to merge 4 commits into
Vishisht16:mainfrom
akshayagunna151:main
Open

docs(readme): replace ASCII diagrams with Mermaid.js flowcharts#23
akshayagunna151 wants to merge 4 commits into
Vishisht16:mainfrom
akshayagunna151:main

Conversation

@akshayagunna151
Copy link
Copy Markdown

Changes Made

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added architecture diagram to README illustrating the request flow and handling paths
    • Added 3-stage cascade pipeline diagram to README detailing the classification process stages

Walkthrough

README documentation is updated with two Mermaid flowchart diagrams: one visualizing the end-to-end HumaneProxy request flow with branching for safe versus unsafe content, and another depicting the 3-stage cascading classification pipeline with async webhooks and logging.

Changes

Documentation Architecture Diagrams

Layer / File(s) Summary
Architecture Diagram – Request Flow
README.md
New Mermaid diagram visualizes the request path through HumaneProxy, showing branching between safe content forwarding and detection of self-harm/criminal-intent with operator alert and empathetic response.
3-Stage Cascade Pipeline Diagram
README.md
New Mermaid diagram replaces textual pipeline description, illustrating Stage 1 (heuristics), Stage 2 (semantic embeddings), Stage 3 (reasoning LLM), and async logging/webhook dispatch for blocking or allowing requests.

🎯 2 (Simple) | ⏱️ ~5 minutes

🐰 Two diagrams bloom in markdown light,
HumaneProxy's flow, now crystal bright,
Three stages dance from heuristics to reason,
Safe paths forward through each decision season!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: replacing ASCII diagrams with Mermaid.js flowcharts in the README.
Description check ✅ Passed The description is directly related to the changeset, listing specific changes made: ASCII diagram replacement, 3-stage pipeline visualization, and improved readability.
Linked Issues check ✅ Passed The changes meet the primary objectives from issue #4: ASCII diagrams replaced with Mermaid.js flowcharts showing the 3-stage pipeline with branching logic and async side effects.
Out of Scope Changes check ✅ Passed All changes are scoped to the README documentation update aligned with issue #4; no unrelated code modifications or out-of-scope alterations are present.
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.


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.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

@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: 1

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

136-142: ⚡ Quick win

Align “Clearly safe” wording with threshold-based behavior.

Given the nearby stage1_ceiling / stage2_ceiling config, “Clearly safe” reads absolute. Consider “Below safe threshold” (or similar) to avoid semantic mismatch in docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 136 - 142, Update the README diagram labels to
reflect threshold-based behavior: change the "Clearly safe" label in the arrow
`B -->|Clearly safe| Y([✅ Forward to LLM])` (and the corresponding `C
-->|Clearly safe| Y`) to a wording like "Below safe threshold" (or similar) so
it aligns with the `stage1_ceiling` / `stage2_ceiling` configuration semantics
and avoids implying absolute safety.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 134: The Mermaid node label "A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword
corpus + regex<br/>< 1ms}}" contains an unescaped "<" which can be parsed as
HTML; update the label by replacing "< 1ms" with "&lt; 1ms" so the node text is
treated as literal text and renders consistently across Markdown/Mermaid
renderers.

---

Nitpick comments:
In `@README.md`:
- Around line 136-142: Update the README diagram labels to reflect
threshold-based behavior: change the "Clearly safe" label in the arrow `B
-->|Clearly safe| Y([✅ Forward to LLM])` (and the corresponding `C -->|Clearly
safe| Y`) to a wording like "Below safe threshold" (or similar) so it aligns
with the `stage1_ceiling` / `stage2_ceiling` configuration semantics and avoids
implying absolute safety.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6347c051-1dda-41e7-a5a8-dcb851b37e56

📥 Commits

Reviewing files that changed from the base of the PR and between c2e0825 and 6b489d0.

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

Comment thread README.md
│ LlamaGuard (Groq) or OpenAI Moderation API │
│ Optional: set OPENAI_API_KEY or GROQ_API_KEY │
└──────────────────────────────────────────────────────────┘
A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Escape < in Mermaid label to avoid render breakage.

< 1ms can be parsed as HTML in Mermaid/Markdown renderers. Use &lt; 1ms to keep the node text stable across viewers.

Proposed fix
-    A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}
+    A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>&lt; 1ms}}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}
A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>&lt; 1ms}}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 134, The Mermaid node label "A --> B{{🟦 Stage 1 —
Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}" contains an unescaped "<"
which can be parsed as HTML; update the label by replacing "< 1ms" with "&lt;
1ms" so the node text is treated as literal text and renders consistently across
Markdown/Mermaid renderers.

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.

[Docs] Create Mermaid.js Architecture Diagrams for README

2 participants