Skip to content

Enhance scaffold prompt with new instructions (#12373)#12374

Open
yasmoradi wants to merge 2 commits into
developfrom
12373
Open

Enhance scaffold prompt with new instructions (#12373)#12374
yasmoradi wants to merge 2 commits into
developfrom
12373

Conversation

@yasmoradi
Copy link
Copy Markdown
Member

@yasmoradi yasmoradi commented May 25, 2026

Closes #12373

Summary by CodeRabbit

  • Documentation
    • Updated scaffolding prompt with enhanced metadata, extended CRUD guidance, and mandatory pattern research steps for component integration.
    • Expanded add/edit UI support to include both modal and page variants with complete navigation integration and feature registration.
    • Refined event handler wrapping instructions for improved scope clarity.

Review Change Stack

Updated scaffold prompt to include AppFeatures registration and modified instructions for Add/Edit page.

Signed-off-by: Yas Moradi <ysmoradi@outlook.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 24216c8a-5ca4-449d-999c-c163d392ec45

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR updates the scaffolding prompt used by the AI agent to generate CRUD implementations. Changes extend agent metadata, add mandatory repository pattern research before scaffold generation, broaden add/edit UI guidance to cover both modal and page variants with integration steps, and refine exception-wrapping instruction scope to clarify it applies specifically to all event handlers.

Changes

Scaffolding Prompt Enhancements

Layer / File(s) Summary
Agent mode and CRUD pattern discovery
src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md
Agent mode metadata and CRUD scaffold description are added, with a mandatory first-time research step that checks for BitDataGrid usage and queries the repository for authoritative Categories page/modal patterns via DeepWiki_ask_question.
Scaffold requirements and implementation guidance
src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md
Scaffold requirements expand to include both modal and page variants for add/edit UI, plus integration details for PageUrls.cs, NavBar.razor, MainLayout.razor.items.cs, and AppFeatures.cs. Event handler exception-wrapping guidance is clarified to apply to all event handlers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A prompt grows wise with each new line,
Modal and page now both align,
BitDataGrid patterns help us see,
The scaffold path to CRUD decree!
DeepWiki whispers secrets true,
Your AI guide knows what to do.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Enhance scaffold prompt with new instructions (#12373)' clearly and concisely describes the main change: enhancing a scaffold prompt with new instructions.
Linked Issues check ✅ Passed The linked issue #12373 references improvements needed for the scaffold prompt, and the PR directly addresses this by enhancing the scaffold prompt with new instructions including agent mode, CRUD research steps, UI guidance, and event handler wrapping adjustments.
Out of Scope Changes check ✅ Passed All changes are confined to the scaffold prompt markdown file and directly relate to the stated objective of enhancing the prompt with new instructions; no unrelated modifications 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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 12373

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.

🧹 Nitpick comments (1)
src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md (1)

38-38: ⚡ Quick win

Consider adding a detailed guidance section for AppFeatures registration.

While AppFeatures registration is now listed as a requirement, there's no corresponding detailed section (like the ones for Entity, DTO, Mapper, API Controller, etc.) explaining the location, file structure, or specific requirements for this registration.

📝 Suggested addition after the Pages section
 Always use `WrapHandled` for all event handlers. Exceptions are caught and handled by `ExceptionHandler`:
 ```razor
 <BitButton OnClick="WrapHandled(SaveData)" />
 <BitTextField OnEnter="WrapHandled(async (args) => await Submit())" />

+### AppFeatures Registration
+- Location: src/Client/Boilerplate.Client.Core/
+- File: AppFeatures.cs
+- Requirements:

    • Register the new feature and its pages in the feature management system
    • Ensure proper navigation integration
    • Add feature-specific permissions if required

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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

In @src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md
at line 38, Add a new detailed "AppFeatures Registration" section in
scaffold.prompt.md immediately after the Pages section describing what to change
in AppFeatures.cs (the feature registration file): specify that developers must
register the new feature and its pages in the feature-management class
AppFeatures.cs, show where to add navigation entries and hook up
feature-specific permissions, and include small examples/snippets for
registering the feature, wiring navigation, and declaring permissions so the
checklist mirrors other sections (Entity/DTO/Mapper/API Controller).


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

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

Nitpick comments:
In
@src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md:

  • Line 38: Add a new detailed "AppFeatures Registration" section in
    scaffold.prompt.md immediately after the Pages section describing what to change
    in AppFeatures.cs (the feature registration file): specify that developers must
    register the new feature and its pages in the feature-management class
    AppFeatures.cs, show where to add navigation entries and hook up
    feature-specific permissions, and include small examples/snippets for
    registering the feature, wiring navigation, and declaring permissions so the
    checklist mirrors other sections (Entity/DTO/Mapper/API Controller).

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Repository UI

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `e79e1d08-8d6e-4b6b-a57d-5d4ddac0483b`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between dd28af586e3a6baa4c05602c03eb8c10322705be and 563080b68bf7bfaed9f203ac16a29d6ca1a9af77.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.md`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@yasmoradi yasmoradi requested a review from msynk May 25, 2026 21:28
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.

bit Boilerplate scaffold prompt needs improvements

2 participants