Skip to content

Conversation

@sarthakNITT
Copy link
Contributor

@sarthakNITT sarthakNITT commented Jan 20, 2026

Description

  • Improved validation logic to detect when a file in .continue/rules fails to parse.
  • Replaced the generic "Failed to convert prompt file" error with a more specific "Failed to parse rule definition" message for rule files.
  • Included the actual YAML parser error details in the message to help users debug syntax issues (e.g., missing commas, flow sequence errors).

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

issue #9548


Continue Tasks: ▶️ 1 queued — View all


Summary by cubic

Improved error messages for invalid rule files in rules directories. Users now see clear YAML parsing details to quickly fix syntax issues.

  • Bug Fixes
    • Detect rule files by path and tailor the error message.
    • Replace the generic prompt error with “Failed to parse/process rule definition …”.
    • Include YAML parser details (e.g., flow sequence errors) in the message.

Written for commit 9694b24. Summary will update on new commits.

@sarthakNITT sarthakNITT requested a review from a team as a code owner January 20, 2026 20:52
@sarthakNITT sarthakNITT requested review from RomneyDa and removed request for a team January 20, 2026 20:52
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 20, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

} catch (e) {
// If the file is in a rules directory, we can provide a more helpful error message
// because we know it's likely a rule definition
const isRuleFile =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an isRuleFile util you could use here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched for isRuleFile but couldn't find it. I did find isColocatedRulesFile in core/config/loadLocalAssistants.ts. Is this the intended utility? Or should I create rules util file?
Please clarify me on it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarthakNITT I was just completely wrong on this, thanks for checking

@sarthakNITT
Copy link
Contributor Author

@RomneyDa Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants