-
Notifications
You must be signed in to change notification settings - Fork 16
feat: add checkly config example to AI rules template #1113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added CHECKLY_CONFIG to compile-rules.ts and corresponding template placeholder in checkly.rules.template.md to include configuration examples in the AI rules. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a configuration example to the AI rules template by including a checkly.config.ts example in the generated rules documentation. The change enables the AI rules to provide concrete configuration examples when setting up new projects.
- Added CHECKLY_CONFIG entry to the compile-rules.ts configuration mapping
- Added corresponding template placeholder in the checkly.rules.template.md file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/cli/src/rules/checkly.rules.template.md | Added TypeScript code block with placeholder for checkly config example |
packages/cli/scripts/compile-rules.ts | Added CHECKLY_CONFIG mapping to include boilerplate project config example |
CHECKLY_CONFIG: { | ||
templateString: '// INSERT CHECKLY CONFIG EXAMPLE HERE //', | ||
exampleConfigPath: | ||
'../../../examples/boilerplate-project/checkly.config.ts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The relative path '../../../examples/boilerplate-project/checkly.config.ts' creates a fragile dependency that reaches outside the package scope. Consider moving the example config into the cli package or using a more robust path resolution method.
'../../../examples/boilerplate-project/checkly.config.ts', | |
'resources/example-configs/checkly.config.ts', |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know. I'm waiting for feedback first. Of course, we could follow the suggestion but then we have another example checkly.config
file in the code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanjudis preferably we would have this code example also generated by the import
feature, as are the code examples. Not sure if possible. @sorccu is this possible or should we have an exemption here?
@tnolet Jep, and that's right. I've looked at what's currently done and am lacking knowledge/access to understand what's possible. :) Happy to follow whatever flow. |
Added CHECKLY_CONFIG to compile-rules.ts and corresponding template placeholder in checkly.rules.template.md to include configuration examples in the AI rules.
🤖 Generated with Claude Code
Affected Components
Notes for the Reviewer
To improve the AI rules when setting up a new project, I wanted to add a
checkly.config.ts
example to the generatedcheckly.rules
file. Now, this solution isn't very pretty because:cli
package scope intoexamples
to read acheckly.config
.checkly.config
example file will make it into our AI rules.So, I don't think this solution is ideal, but I couldn't think of anything better. Looking forward to opinions and feedback, and happy to try something else.