feat: add oncall mode for structured incident response#11143
feat: add oncall mode for structured incident response#11143saneroen wants to merge 3 commits intoRooCodeInc:mainfrom
Conversation
Reviewed merge commit (37914bc). No new issues found. One existing issue remains unaddressed.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| // Create incidents directory when switching to oncall mode | ||
| if (newMode === "oncall") { | ||
| try { | ||
| const workspacePath = getWorkspacePath() | ||
| if (workspacePath) { | ||
| const incidentsDir = path.join(workspacePath, "incidents") | ||
| const pagesDir = path.join(incidentsDir, "pages") | ||
| const escalationsDir = path.join(incidentsDir, "escalations") | ||
|
|
||
| // Create directories if they don't exist | ||
| await fs.mkdir(pagesDir, { recursive: true }) | ||
| await fs.mkdir(escalationsDir, { recursive: true }) | ||
| } | ||
| } catch (error) { | ||
| // Log error but don't fail mode switch if directory creation fails | ||
| this.log( | ||
| `Failed to create incidents directory when switching to oncall mode: ${error instanceof Error ? error.message : String(error)}`, | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
This new oncall mode directory creation logic lacks test coverage. The existing handleModeSwitch tests in ClineProvider.sticky-mode.spec.ts only cover switching to "architect", "debug", and "code" modes. Consider adding tests that verify: (1) directories are created when switching to oncall mode, (2) mode switch succeeds even when directory creation fails, and (3) existing directories are handled gracefully with { recursive: true }.
Fix it with Roo Code or mention @roomote and request a fix.
|
Claiming I've implemented the oncall mode feature and have a PR ready. Requesting assignment. |
Related GitHub Issue
Closes: #11142
Roo Code Task Context (Optional)
Description
This PR adds a new Oncall mode as a custom mode that enables structured incident response workflows using markdown files. The mode supports workflow orchestration, MCP tool integration, and automatic directory setup for incident logging.
Key Changes:
.roomodesas a custom mode with workflow execution instructionsincidents/directory creation when switching to oncall mode inClineProvider.tsk8s-troubleshooting.mdandexample-service-runbook.mdin.roo/rules-oncall/.roo/rules-oncall/(workflows are automatically loaded as context)/k8s-troubleshoot,/oncall-workflow)incidents/to.gitignoreto prevent committing incident logsDesign Choices:
.roomodes(project-specific) rather than built-in, allowing teams to customize it per project.roo/rules-oncall/(uses existing rules infrastructure, auto-loaded as context)Roadmap Alignment:
This contribution aligns with the Enhanced User Experience roadmap goal:
Test Procedure
Manual Testing Steps:
Mode Configuration:
Directory Creation:
incidents/directory is created in workspace rootincidents/pages/andincidents/escalations/subdirectories existincidents/is in.gitignoreWorkflow Execution:
k8s-troubleshooting.mdworkflow from.roo/rules-oncall/Slash Commands:
/k8s-troubleshootin chat/oncall-workflow k8s-troubleshootingCustom Workflows:
.roo/rules-oncall/File Restrictions:
Testing Environment:
Pre-Submission Checklist
Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
Scope: My changes are focused on the linked issue (one major feature/fix per PR).
Self-Review: I have performed a thorough self-review of my code.
Testing: New and/or updated tests have been added to cover my changes (if applicable).
Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
Contribution Guidelines: I have read and agree to the Contributor Guidelines.
Screenshots / Videos
UI Changes:
Documentation Updates
No documentation updates are required.
Yes, documentation updates are required.
Documentation to Update:
.roo/rules-oncall/incidents/directory creationAdditional Notes
incidents/directory is created automatically when switching to oncall mode but ignored by git.roo/rules-oncall/- users can version control their workflows.roo/rules-oncall/are automatically loaded as context when the mode is active.roomodes- teams can customize it per project or copy it to global settingsNote: Ensure issue #11142 is assigned to you before submitting. If not assigned, comment "Claiming" on the issue and DM Hannes Rudolph (
hrudolph) on Discord to get assigned.Get in Touch
Discord: santy2509
Important
Introduces oncall mode for structured incident response with markdown workflows, automatic directory setup, and new commands in
ClineProvider.ts..roomodesfor structured incident response using markdown workflows.incidents/directory creation inClineProvider.tswhen switching to oncall mode./k8s-troubleshootand/oncall-workflowfor executing workflows.k8s-troubleshooting.mdandexample-service-runbook.mdin.roo/rules-oncall/.incidents/to.gitignore.package.jsonversion to3.46.2.This description was created by
for bbd40f9. You can customize this summary. It will automatically update as commits are pushed.