Skip to content

Adding Tones in the Behaviours#330

Merged
jabrena merged 3 commits intomainfrom
feature/tone-v2
Sep 17, 2025
Merged

Adding Tones in the Behaviours#330
jabrena merged 3 commits intomainfrom
feature/tone-v2

Conversation

@jabrena
Copy link
Copy Markdown
Owner

@jabrena jabrena commented Sep 16, 2025

Rationale for this change

Improve the communication style in the conversation that you have with the software engineer

What changes are included in this PR?

  • behaviour-consultative-interaction.md
  • behaviour-progressive-learning.md

Are these changes tested?

  • behaviour-consultative-interaction.md (Tone Collaborative Problem-Solver Tone)
  • behaviour-progressive-learning.md (Tone Educational Mentor Tone)

Are there any user-facing changes?

No

Summary by CodeRabbit

  • New Features

    • Added a visible "Tone" section for consultative and progressive-learning interaction styles.
    • Added a new "Memory Leak Profiling" course with five modules (Foundations, Profiling, Analysis, Refactoring, Validation).
  • Documentation

    • Many new course and tag pages, expanded module content, learning objectives, exercises, and templates.
    • Added author attribution to several blog posts.
  • Style

    • Improved navigation dropdown layout to prevent wrapping and size to content.
  • Notes

    • No functional/API changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds Tone elements and rendering for behaviour prompts; introduces a new Memory Leak Profiling course (site content, course modules, many tag pages, and site navigation), updates site templates/CSS for nav dropdown and nav link, and renames controller references from WithoutCocoController → NoCocoController in example docs. All changes are documentation/content or template edits; no runtime code/APIs changed.

Changes

Cohort / File(s) Summary of Changes
Behaviour docs
.cursor/rules/behaviour-consultative-interaction.md, .cursor/rules/behaviour-progressive-learning.md
Added a new "Tone" subsection under Role describing consultative and progressive-learning tones (editorial only).
Prompt resources (XML)
system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml, system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml
Inserted <tone> element after <role> containing the tone text for each behaviour prompt.
XSL rendering
system-prompts-generator/src/main/resources/cursor-rules.xsl
Updated /prompt template to apply tone and added match="tone" template emitting a "## Tone" header and normalized content.
Site templates / nav / CSS
site-generator/templates/nav.ftl, site-generator/templates/maincss.ftl, docs/css/main.css
Added "Memory Leak Profiling" nav link and adjusted dropdown styling (min-width:200px; width:max-content; white-space:nowrap) to prevent wrapping.
New course content (site-generator)
site-generator/content/courses/profile-memory-leak/*.md, site-generator/content/courses/profile-memory-leak/*.html
Added full course and module pages (index + modules 1–5) for "Mastering Java Memory Leak Detection" with metadata, exercises, prompts, scripts, and assessments.
Docs site pages / tag indexes
docs/courses/profile-memory-leak/*, docs/tags/*, docs/*.html (many files)
Added corresponding generated HTML course pages, tag pages (profiling, memory-leak, async-profiler, before-after, etc.), updated tag cloud and inserted course nav links across many docs and blog pages; updated blog post author metadata in several posts.
Examples / profiler docs
examples/spring-boot-memory-leak-demo/**/ (README-DEV.md, profiler docs .md files)
Renamed references of WithoutCocoControllerNoCocoController across README and profiling docs; updated code snippets and report labels to match new class name.
Feed / metadata
docs/feed.xml, site-generator/content/blog/2025/*.md
Updated feed timestamp and added author front-matter to several blog posts.
Minor editorial / FAQ adjustments
site-generator/content/courses/java-generics/faq.md, various tag/faq snippets
Removed top-level FAQ heading in some short excerpts and clarified duration text (Quick Start / Comprehensive lines).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Author
  participant XML as behaviour-*.xml
  participant XSL as cursor-rules.xsl
  participant MD as Rendered Markdown

  Author->>XML: add <tone> element (after <role>)
  Author->>XSL: update root template and add match="tone"
  XML-->>XSL: prompt payload { role, tone, goal, ... }
  XSL->>MD: emit sections: Role -> ## Tone -> Goal
  note right of MD: "## Tone" appears in generated docs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A rabbit tapped keys with nimble paw,
Inserted tone where roles once saw,
A course sprouted—leaks to find,
Renamed controllers, navs aligned.
Hoppity-hop—docs polished, small and spry 🐇✨

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Adding Tones in the Behaviours" is concise and directly reflects the main change in the PR — introducing Tone sections/elements into behaviour markdown and XML resources (and supporting XSLT rendering). It clearly communicates the primary intent and is specific enough for a reviewer scanning history to understand the change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b88f18 and 5a57dd3.

📒 Files selected for processing (81)
  • AGENTS.md (1 hunks)
  • docs/about.html (1 hunks)
  • docs/archive.html (1 hunks)
  • docs/blog/2025/prompt-quality-framework.html (2 hunks)
  • docs/blog/2025/release-0.10.0.html (2 hunks)
  • docs/blog/2025/release-0.8.0.html (2 hunks)
  • docs/blog/2025/release-0.9.0.html (2 hunks)
  • docs/courses/java-generics/faq.html (1 hunks)
  • docs/courses/java-generics/index.html (1 hunks)
  • docs/courses/java-generics/module-1-foundations.html (1 hunks)
  • docs/courses/java-generics/module-2-wildcards.html (1 hunks)
  • docs/courses/java-generics/module-3-advanced.html (1 hunks)
  • docs/courses/java-generics/module-4-realworld.html (1 hunks)
  • docs/courses/java-generics/module-5-assessment.html (1 hunks)
  • docs/courses/profile-memory-leak/index.html (1 hunks)
  • docs/courses/profile-memory-leak/module-1-foundations.html (1 hunks)
  • docs/courses/profile-memory-leak/module-2-profiling.html (1 hunks)
  • docs/courses/profile-memory-leak/module-3-analysis.html (1 hunks)
  • docs/courses/profile-memory-leak/module-4-refactoring.html (1 hunks)
  • docs/courses/profile-memory-leak/module-5-validation.html (1 hunks)
  • docs/css/main.css (1 hunks)
  • docs/feed.xml (1 hunks)
  • docs/index.html (5 hunks)
  • docs/tags.html (5 hunks)
  • docs/tags/advanced-patterns.html (1 hunks)
  • docs/tags/analysis.html (1 hunks)
  • docs/tags/api-design.html (1 hunks)
  • docs/tags/assessment.html (1 hunks)
  • docs/tags/async-profiler.html (1 hunks)
  • docs/tags/before-after.html (1 hunks)
  • docs/tags/blog.html (5 hunks)
  • docs/tags/comparison.html (1 hunks)
  • docs/tags/crtp.html (1 hunks)
  • docs/tags/detection.html (1 hunks)
  • docs/tags/documentation.html (1 hunks)
  • docs/tags/evidence.html (1 hunks)
  • docs/tags/faq.html (2 hunks)
  • docs/tags/flamegraph.html (1 hunks)
  • docs/tags/foundations.html (2 hunks)
  • docs/tags/generics.html (2 hunks)
  • docs/tags/help.html (2 hunks)
  • docs/tags/implementation.html (1 hunks)
  • docs/tags/java.html (3 hunks)
  • docs/tags/jmeter.html (1 hunks)
  • docs/tags/memory-leak.html (1 hunks)
  • docs/tags/pecs.html (1 hunks)
  • docs/tags/performance.html (2 hunks)
  • docs/tags/profiling.html (1 hunks)
  • docs/tags/real-world.html (1 hunks)
  • docs/tags/records.html (1 hunks)
  • docs/tags/refactoring.html (1 hunks)
  • docs/tags/sealed-types.html (1 hunks)
  • docs/tags/self-bounded.html (1 hunks)
  • docs/tags/serialization.html (1 hunks)
  • docs/tags/setup.html (1 hunks)
  • docs/tags/support.html (2 hunks)
  • docs/tags/system-prompts.html (1 hunks)
  • docs/tags/type-erasure.html (1 hunks)
  • docs/tags/type-safety.html (1 hunks)
  • docs/tags/validation.html (2 hunks)
  • docs/tags/variance.html (1 hunks)
  • docs/tags/wildcards.html (1 hunks)
  • examples/spring-boot-memory-leak-demo/README-DEV.md (2 hunks)
  • examples/spring-boot-memory-leak-demo/profiler/docs/profiling-comparison-analysis-20250720.md (4 hunks)
  • examples/spring-boot-memory-leak-demo/profiler/docs/profiling-final-results-20250720.md (4 hunks)
  • examples/spring-boot-memory-leak-demo/profiler/docs/profiling-problem-analysis-20250720.md (3 hunks)
  • examples/spring-boot-memory-leak-demo/profiler/docs/profiling-solutions-20250720.md (5 hunks)
  • examples/spring-boot-memory-leak-demo/profiler/docs/profiling-summary-20250720.md (3 hunks)
  • site-generator/content/blog/2025/prompt-quality-framework.md (1 hunks)
  • site-generator/content/blog/2025/release-0.10.0.md (1 hunks)
  • site-generator/content/blog/2025/release-0.8.0.md (1 hunks)
  • site-generator/content/blog/2025/release-0.9.0.md (1 hunks)
  • site-generator/content/courses/java-generics/faq.md (0 hunks)
  • site-generator/content/courses/profile-memory-leak/index.md (1 hunks)
  • site-generator/content/courses/profile-memory-leak/module-1-foundations.md (1 hunks)
  • site-generator/content/courses/profile-memory-leak/module-2-profiling.md (1 hunks)
  • site-generator/content/courses/profile-memory-leak/module-3-analysis.md (1 hunks)
  • site-generator/content/courses/profile-memory-leak/module-4-refactoring.md (1 hunks)
  • site-generator/content/courses/profile-memory-leak/module-5-validation.md (1 hunks)
  • site-generator/templates/maincss.ftl (1 hunks)
  • site-generator/templates/nav.ftl (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

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: 0

🧹 Nitpick comments (2)
system-prompts-generator/src/main/resources/cursor-rules.xsl (1)

133-141: Preserve Tone paragraph structure (avoid normalize-space collapse)

Using normalize-space(.) will squash newlines/lists if Tone evolves beyond a single paragraph. Reuse your existing goal trimming to preserve paragraphs and code fences.

Apply:

     <!-- Tone template -->
     <xsl:template match="tone">
         <xsl:text>
 
 ## Tone
 
 </xsl:text>
-        <xsl:value-of select="normalize-space(.)"/>
+        <xsl:call-template name="trim-goal-content">
+            <xsl:with-param name="content" select="."/>
+        </xsl:call-template>
     </xsl:template>
system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml (1)

12-12: Style: multiline Tone for readability (future-proof with XSL change)

Consider multiline formatting (pairs well with the XSLTone trimming change).

-    <tone>Treats the user as a knowledgeable partner in solving problems rather than prescribing one-size-fits-all solutions. Presents multiple approaches with clear trade-offs, asking for user input to understand context and constraints. Uses consultative language like "I found several options" and "Which approach fits your situation better?" Acknowledges that the user knows their business domain and team dynamics best, while providing technical expertise to inform decisions.</tone>
+    <tone>
+        Treats the user as a knowledgeable partner in solving problems rather than prescribing one-size-fits-all solutions.
+        Presents multiple approaches with clear trade-offs, asking for user input to understand context and constraints.
+        Uses consultative language like "I found several options" and "Which approach fits your situation better?"
+        Acknowledges that the user knows their business domain and team dynamics best, while providing technical expertise to inform decisions.
+    </tone>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76513fa and 5b88f18.

📒 Files selected for processing (5)
  • .cursor/rules/behaviour-consultative-interaction.md (1 hunks)
  • .cursor/rules/behaviour-progressive-learning.md (1 hunks)
  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml (1 hunks)
  • system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml (1 hunks)
  • system-prompts-generator/src/main/resources/cursor-rules.xsl (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.cursor/rules/**

📄 CodeRabbit inference engine (AGENTS.md)

Do not edit files in .cursor/rules/ directly; they are generated outputs

Files:

  • .cursor/rules/behaviour-progressive-learning.md
  • .cursor/rules/behaviour-consultative-interaction.md
**/src/{main,test}/{java,resources}/**/*

📄 CodeRabbit inference engine (.cursor/rules/110-java-maven-best-practices.md)

Follow Maven’s standard directory layout: src/main/java, src/main/resources, src/test/java, src/test/resources

Files:

  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml
  • system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml
  • system-prompts-generator/src/main/resources/cursor-rules.xsl
system-prompts-generator/src/main/resources/**/*.xml

📄 CodeRabbit inference engine (AGENTS.md)

Edit XML source files under system-prompts-generator/src/main/resources/ to change or add cursor rules

Files:

  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml
  • system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml
🧠 Learnings (5)
📚 Learning: 2025-09-14T14:44:18.662Z
Learnt from: CR
PR: jabrena/cursor-rules-java#0
File: .cursor/rules/behaviour-progressive-learning.md:0-0
Timestamp: 2025-09-14T14:44:18.662Z
Learning: Build content suitable for a Senior software engineer with extensive Java experience (use relevant Java examples when appropriate)

Applied to files:

  • .cursor/rules/behaviour-progressive-learning.md
  • system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml
📚 Learning: 2025-09-14T14:44:18.662Z
Learnt from: CR
PR: jabrena/cursor-rules-java#0
File: .cursor/rules/behaviour-progressive-learning.md:0-0
Timestamp: 2025-09-14T14:44:18.662Z
Learning: Focus on being educational rather than prescriptive: extract concepts, structure learning, provide practice, and validate based on user engagement

Applied to files:

  • .cursor/rules/behaviour-progressive-learning.md
📚 Learning: 2025-09-16T17:49:31.992Z
Learnt from: CR
PR: jabrena/cursor-rules-java#0
File: AGENTS.md:0-0
Timestamp: 2025-09-16T17:49:31.992Z
Learning: Applies to system-prompts-generator/src/main/resources/**/*.xml : Edit XML source files under system-prompts-generator/src/main/resources/ to change or add cursor rules

Applied to files:

  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml
  • system-prompts-generator/src/main/resources/cursor-rules.xsl
📚 Learning: 2025-09-14T14:43:58.012Z
Learnt from: CR
PR: jabrena/cursor-rules-java#0
File: .cursor/rules/behaviour-consultative-interaction.md:0-0
Timestamp: 2025-09-14T14:43:58.012Z
Learning: Adopt a consultative style over a prescriptive one: analyze, propose options, ask for a choice, then implement

Applied to files:

  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml
  • .cursor/rules/behaviour-consultative-interaction.md
📚 Learning: 2025-09-08T10:20:01.342Z
Learnt from: CR
PR: jabrena/cursor-rules-java#0
File: .cursor/rules/125-java-concurrency.md:0-0
Timestamp: 2025-09-08T10:20:01.342Z
Learning: Analyze before acting: use the consultative interaction technique (analyze issues, categorize by impact, propose options with trade-offs, ask user to choose, then implement)

Applied to files:

  • system-prompts-generator/src/main/resources/behaviour-consultative-interaction.xml
  • .cursor/rules/behaviour-consultative-interaction.md
🔇 Additional comments (4)
system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml (1)

12-15: Good addition: content is clear and consistent with Role

No XML escaping issues. Note: current XSL normalizes whitespace for Tone; if you later add lists/paragraphs here, they’ll collapse. See my XSLT suggestion to preserve paragraph structure.

.cursor/rules/behaviour-consultative-interaction.md (1)

11-14: LGTM: Consultative Tone reads well and matches doctrine

Looks consistent with the consultative technique. Reminder: .cursor/rules/** is generated; avoid manual edits—regenerate via the XSLT pipeline.

Use the script in my other comment to verify Role → Tone → Goal ordering in this file as well (swap filename).

system-prompts-generator/src/main/resources/cursor-rules.xsl (1)

27-28: Correct insertion point for Tone

Processing Tone immediately after Role is the right place; it will appear before Goal in outputs.

Run a quick regen and diff the two affected Markdown files to ensure placement and spacing look right.

.cursor/rules/behaviour-progressive-learning.md (1)

11-14: Verify generation: XSL handles — confirm source XML and generated MD

XSL check passed: system-prompts-generator/src/main/resources/cursor-rules.xsl contains <xsl:apply-templates select="tone"/> (reported line 28) and <xsl:template match="tone"> (reported line 134). Verification run did not confirm a element in system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml nor could it verify that .cursor/rules/behaviour-progressive-learning.md places "## Tone" after "## Role" and before "## Goal".

  • Ensure system-prompts-generator/src/main/resources/behaviour-progressive-learning.xml includes a element.
  • Ensure the pipeline actually regenerates .cursor/rules/behaviour-progressive-learning.md and that "## Tone" appears between "## Role" and "## Goal".

If both checks are true, approve the Tone section as-is; otherwise update the source/XSL pipeline and regenerate.

@jabrena jabrena merged commit ea98bbf into main Sep 17, 2025
10 of 11 checks passed
@jabrena jabrena deleted the feature/tone-v2 branch September 17, 2025 16:17
@coderabbitai coderabbitai Bot mentioned this pull request Oct 5, 2025
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