feat: add Nika workflow language rule (.nika.yaml authoring)#332
feat: add Nika workflow language rule (.nika.yaml authoring)#332ThibautMelen wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a Nika workflow language rules document covering file targeting, the ChangesNika workflow rules
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rules/nika-workflow-language.mdc`:
- Line 3: Restrict the frontmatter glob to the PR’s stated target by removing
the **/*.nika.yml pattern, keeping only **/*.nika.yaml so it matches the
contract described in the rule.
- Around line 18-22: The workflow language guidance incorrectly directs secrets
through the env namespace. Update the rule in the interpolation and secrets
guidance to document `${{ secrets.KEY }}` for credentials, distinguish it from
non-sensitive `${{ env.KEY }}` configuration, and retain the prohibition on
inline literal keys.
- Line 12: Update the documented `infer` signature in the workflow language rule
to include the optional `max_tokens` parameter alongside `prompt`, `system?`,
`temperature?`, and `schema?`, matching the supported examples.
🪄 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: 2b799d9e-0d70-41ac-9a48-ba95eeda24b7
📒 Files selected for processing (1)
rules/nika-workflow-language.mdc
| @@ -0,0 +1,24 @@ | |||
| --- | |||
| description: Nika workflow language rules for AI assistance | |||
| globs: ["**/*.nika.yaml", "**/*.nika.yml"] | |||
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Restrict the glob to the PR’s stated target.
The rule currently also applies to **/*.nika.yml, while the objective and line 9 specify .nika.yaml files only. Remove the .nika.yml pattern or update the contract consistently.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@rules/nika-workflow-language.mdc` at line 3, Restrict the frontmatter glob to
the PR’s stated target by removing the **/*.nika.yml pattern, keeping only
**/*.nika.yaml so it matches the contract described in the rule.
…mespace, both extensions named
|
All three findings verified against the shipped binary (v0.99.0) and fixed:
Also filed upstream so the generator emits the same fixes (the rule stays in sync with the binary). |
Adds a rule for the Nika workflow language (
.nika.yamlfiles — AI workflows as reviewable DAGs).The rule teaches Cursor the envelope, the four verbs, the interpolation/binding forms, and the authoring discipline (run
nika checkafter every edit, repair from diagnostics). Scoped by globs to**/*.nika.yamlonly,alwaysApply: false.Provenance note: this is exactly the rule the
nika initcommand generates (engine v0.99.0) — contributed here so Cursor users get it without installing anything first. I'll refresh it if the language surface ever changes (the envelope and verbs are frozen).Disclosure: I'm the author of Nika (AGPL-3.0 Rust engine).
Summary by CodeRabbit