feat: add sample workflows and usage documentation#742
Conversation
- Add getting-started-sample.json (beginner, 7 nodes) - Add code-review-sample.json (intermediate, 15 nodes) - Update README with usage examples section and quick start guide - Add i18n translation keys for new samples - Addresses issue breaking-brake#448: users can now find usage examples Co-Authored-By: chengxiang1997 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR introduces two sample workflows (Getting Started and Code Review) as bundled JSON definitions with corresponding documentation and internationalization support. The README is updated to guide users on accessing and using these samples via the UI. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 143-146: Update the node counts in the README table and the
meta.nodeCount fields in the sample JSONs to match the actual workflows: change
the Getting Started entry to 8 nodes and the Code Review entry to 11 nodes, and
set meta.nodeCount in getting-started-sample.json to 8 and in
code-review-sample.json to 11; ensure you update the README table row for
"Getting Started" and "Code Review" and the meta.nodeCount property in the
corresponding JSON files (getting-started-sample.json and
code-review-sample.json).
In `@resources/samples/code-review-sample.json`:
- Around line 2-9: The meta.nodeCount value in the JSON metadata is incorrect
(set to 15) and must be updated to match the actual workflow node count (11);
locate the "meta" object and the nodeCount property (meta.nodeCount) in the file
and change its value from 15 to 11 so the metadata accurately reflects the
workflow definition.
In `@resources/samples/getting-started-sample.json`:
- Around line 2-9: The meta.nodeCount value is incorrect (currently 7) and must
reflect the actual workflow node count; update the meta.nodeCount field in
getting-started-sample.json to 8 so it matches the actual number of nodes
defined in the workflow (ensure the change is applied to the "meta.nodeCount"
property).
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 55bfece5-1395-49fd-b8e2-2bf2b130e6df
📒 Files selected for processing (5)
README.mdresources/samples/code-review-sample.jsonresources/samples/getting-started-sample.jsonsrc/webview/src/i18n/translation-keys.tssrc/webview/src/i18n/translations/en.ts
| |------|------------|-------------| | ||
| | **Getting Started** | Beginner | A simple workflow demonstrating basic prompt nodes and branching logic (7 nodes) | | ||
| | **Code Review** | Intermediate | An automated code review workflow for GitHub PRs with submission options (15 nodes) | | ||
| | **GitHub Issue Planning** | Advanced | A complete workflow: fetch issue, analyze code, verify fixes, and retrospective (29 nodes) | |
There was a problem hiding this comment.
Node counts in the table don't match the actual sample JSON files.
The table lists:
- Getting Started: 7 nodes (actual: 8 nodes)
- Code Review: 15 nodes (actual: 11 nodes)
Please update the node counts to match the actual workflow definitions in:
resources/samples/getting-started-sample.json(8 nodes)resources/samples/code-review-sample.json(11 nodes)
This also affects the meta.nodeCount field in both JSON files, which should be corrected as well.
📊 Verification of actual node counts
getting-started-sample.json has 8 nodes:
- start-1
- prompt-greeting
- prompt-task
- prompt-summary
- ask-confirm
- prompt-process
- prompt-restart
- end-1
code-review-sample.json has 11 nodes:
- start-1
- prompt-pr-url
- prompt-fetch-pr
- prompt-changes
- prompt-tests
- prompt-summary
- ask-submit
- prompt-submit-review
- prompt-edit-review
- prompt-cancelled
- end-1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 143 - 146, Update the node counts in the README table
and the meta.nodeCount fields in the sample JSONs to match the actual workflows:
change the Getting Started entry to 8 nodes and the Code Review entry to 11
nodes, and set meta.nodeCount in getting-started-sample.json to 8 and in
code-review-sample.json to 11; ensure you update the README table row for
"Getting Started" and "Code Review" and the meta.nodeCount property in the
corresponding JSON files (getting-started-sample.json and
code-review-sample.json).
| "meta": { | ||
| "id": "code-review-sample", | ||
| "nameKey": "sample.codeReview.name", | ||
| "descriptionKey": "sample.codeReview.description", | ||
| "difficulty": "intermediate", | ||
| "tags": ["code-review", "automation"], | ||
| "nodeCount": 15 | ||
| }, |
There was a problem hiding this comment.
Incorrect nodeCount in metadata.
The meta.nodeCount field is set to 15, but the actual number of nodes in the workflow is 11. This creates an inconsistency between the metadata and the actual workflow definition.
🔧 Proposed fix
"meta": {
"id": "code-review-sample",
"nameKey": "sample.codeReview.name",
"descriptionKey": "sample.codeReview.description",
"difficulty": "intermediate",
"tags": ["code-review", "automation"],
- "nodeCount": 15
+ "nodeCount": 11
},📝 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.
| "meta": { | |
| "id": "code-review-sample", | |
| "nameKey": "sample.codeReview.name", | |
| "descriptionKey": "sample.codeReview.description", | |
| "difficulty": "intermediate", | |
| "tags": ["code-review", "automation"], | |
| "nodeCount": 15 | |
| }, | |
| "meta": { | |
| "id": "code-review-sample", | |
| "nameKey": "sample.codeReview.name", | |
| "descriptionKey": "sample.codeReview.description", | |
| "difficulty": "intermediate", | |
| "tags": ["code-review", "automation"], | |
| "nodeCount": 11 | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@resources/samples/code-review-sample.json` around lines 2 - 9, The
meta.nodeCount value in the JSON metadata is incorrect (set to 15) and must be
updated to match the actual workflow node count (11); locate the "meta" object
and the nodeCount property (meta.nodeCount) in the file and change its value
from 15 to 11 so the metadata accurately reflects the workflow definition.
| "meta": { | ||
| "id": "getting-started-sample", | ||
| "nameKey": "sample.gettingStarted.name", | ||
| "descriptionKey": "sample.gettingStarted.description", | ||
| "difficulty": "beginner", | ||
| "tags": ["getting-started", "basic"], | ||
| "nodeCount": 7 | ||
| }, |
There was a problem hiding this comment.
Incorrect nodeCount in metadata.
The meta.nodeCount field is set to 7, but the actual number of nodes in the workflow is 8. This creates an inconsistency between the metadata and the actual workflow definition.
🔧 Proposed fix
"meta": {
"id": "getting-started-sample",
"nameKey": "sample.gettingStarted.name",
"descriptionKey": "sample.gettingStarted.description",
"difficulty": "beginner",
"tags": ["getting-started", "basic"],
- "nodeCount": 7
+ "nodeCount": 8
},📝 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.
| "meta": { | |
| "id": "getting-started-sample", | |
| "nameKey": "sample.gettingStarted.name", | |
| "descriptionKey": "sample.gettingStarted.description", | |
| "difficulty": "beginner", | |
| "tags": ["getting-started", "basic"], | |
| "nodeCount": 7 | |
| }, | |
| "meta": { | |
| "id": "getting-started-sample", | |
| "nameKey": "sample.gettingStarted.name", | |
| "descriptionKey": "sample.gettingStarted.description", | |
| "difficulty": "beginner", | |
| "tags": ["getting-started", "basic"], | |
| "nodeCount": 8 | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@resources/samples/getting-started-sample.json` around lines 2 - 9, The
meta.nodeCount value is incorrect (currently 7) and must reflect the actual
workflow node count; update the meta.nodeCount field in
getting-started-sample.json to 8 so it matches the actual number of nodes
defined in the workflow (ensure the change is applied to the "meta.nodeCount"
property).
|
Thanks for adding these samples! I'd like to push a small follow-up commit to this branch to add the missing translations for the new One thing I'd like to explore as a follow-up (not blocking this PR):
The Getting Started sample looks great as-is; keeping it simple is the right call for a beginner example. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Summary
Changes
resources/samples/getting-started-sample.json- new sampleresources/samples/code-review-sample.json- new sampleREADME.md- updated Usage Examples sectionsrc/webview/src/i18n/translation-keys.ts- added type definitionssrc/webview/src/i18n/translations/en.ts- added translationsTest plan
Closes #448
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation