camel icon indicating copy to clipboard operation
camel copied to clipboard

[enhance] Make Workflow Save Folder and Filename Semantic

Open hesamsheikh opened this issue 1 month ago โ€ข 6 comments

Description

Fixes #3383 Before (Session-Based)

workforce_workflows/
โ”œโ”€โ”€ session_20251106_113308_493135/
โ”‚   โ”œโ”€โ”€ content_writer_workflow.md
โ”‚   โ””โ”€โ”€ math_expert_workflow.md
โ”œโ”€โ”€ session_20251106_114521_782341/
โ”‚   โ”œโ”€โ”€ content_writer_workflow.md
โ”‚   โ””โ”€โ”€ data_analyst_workflow.md
โ””โ”€โ”€ session_20251106_115832_123456/
    โ””โ”€โ”€ math_expert_workflow.md

After (Role-Based)

workforce_workflows/
โ”œโ”€โ”€ content_writer/
โ”‚   โ”œโ”€โ”€ write_creative_story_workflow.md
โ”‚   โ””โ”€โ”€ write_technical_explanation_workflow.md
โ”œโ”€โ”€ math_expert/
โ”‚   โ”œโ”€โ”€ calculate_compound_interest_workflow.md
โ”‚   โ””โ”€โ”€ calculate_circle_area_workflow.md
โ””โ”€โ”€ data_analyst/
    โ””โ”€โ”€ analyze_sales_data_workflow.md

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • [ ] I have read the CONTRIBUTION guide (required)
  • [ ] I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • [ ] I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • [ ] I have updated the tests accordingly (required for a bug fix or a new feature)
  • [ ] I have updated the documentation if needed:
  • [ ] I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

hesamsheikh avatar Nov 06 '25 11:11 hesamsheikh

[!IMPORTANT]

Review skipped

Auto 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.

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

โœจ Finishing touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch change-workflow-folder-structure

[!TIP]

๐Ÿ“ Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests โ€” including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. ๐Ÿ“ Description โ€” Summarize the main change in 50โ€“60 words, explaining what was done.
  2. ๐Ÿ““ References โ€” List relevant issues, discussions, documentation, or related PRs.
  3. ๐Ÿ“ฆ Dependencies & Requirements โ€” Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. ๐Ÿ“Š Contributor Summary โ€” Include a Markdown table showing contributions: | Contributor | Lines Added | Lines Removed | Files Changed |
  5. โœ”๏ธ Additional Notes โ€” Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

coderabbitai[bot] avatar Nov 06 '25 11:11 coderabbitai[bot]

for workflow_meta data, do we need to define it formally? maybe include time, and version etc, to keep track of the changing history

MuggleJinx avatar Nov 07 '25 06:11 MuggleJinx

Currently the config for the worklow seems a bit messy, maybe we can create centralized configuration? like @DataClass class WorkflowConfig: max_workflows_per_role: int = 100 selection_strategy: str = "agent_based" ...

this is actually a pretty good suggestion, which needs a PR of itself. I will open an issue for it

hesamsheikh avatar Nov 07 '25 10:11 hesamsheikh

this is ready for a next round of review. i added a class for the workflow metadata and config following @MuggleJinx 's suggestion.

hesamsheikh avatar Nov 07 '25 15:11 hesamsheikh

thanks for the approval @MuggleJinx I added a few test cases for this. for the example, I am waiting on the next feature to update it once and for all, which will happen after merging this PR.

hesamsheikh avatar Nov 13 '25 10:11 hesamsheikh

No issues from myside, thanks @hesamsheikh. Just questions:

  • Lastly about _load_management_agent_workflows I didn't follow last time, we are still keeping it right? (it loads all files summaries to Workers's _system_message && memory._chat_history_block.storage.memory_list[0])

All in all, great job thanks for the PR @hesamsheikh.

Thank you for the review Ahmed. Yes we're keeping _load_management_agent_workflows to test if it is helpful or not for the benchmarks.

hesamsheikh avatar Nov 14 '25 13:11 hesamsheikh