with one click
kodus-kody-rules
// Use when the user wants to create, update or view Kody Rules via `kodus rules` command.
// Use when the user wants to create, update or view Kody Rules via `kodus rules` command.
| name | kodus-kody-rules |
| description | Use when the user wants to create, update or view Kody Rules via `kodus rules` command. |
Kody Rules are a set of guidelines that Kody follows when generating code. They help ensure that the generated code is consistent, high-quality, and aligned with the user's preferences and project requirements.
Manage Kody Rules through Kodus CLI only. Do not suggest creating rule files manually.
ALWAYS Use kodus rules subcommands for all create, update, and view operations. All these rules are ALWAYS managed by the kodus rules command from the CLI. Do NOT suggest creating files or storing rules in any other way. When the user wants to create, update or view Kody Rules, utilize the kodus rules command with the appropriate subcommands and options as outlined in the instructions files.
When centralized config is enabled for the selected team/repository scope, kodus rules create and kodus rules update may return centralized PR metadata instead of directly created/updated rule records.
prUrl (and prNumber when available).create: add a new rule.update: modify an existing rule.view: list all rules or fetch a specific rule.global when the user does not provide a repository scope. Always confirm if the user intends to use global scope when no repository is specified.kodus config remote list --json
Then select and pass --repo-id <id>.
title: short and specific.rule: clear and actionable guidance.severity: low | medium | high | critical.scope: file | pull request.path: optional glob, default effectively **/*.Read individual instructions files for detailed explanations and examples:
You MUST always load at least one of these instructions files to handle the specific user request related to Kody Rules. Each file contains detailed steps and examples for the corresponding action (create, update, view). Always ensure that you are following the instructions in these files when managing Kody Rules through the kodus rules command.
Should the user request an action that is not covered by these instructions, you should first clarify the user's intent and then determine if it falls under create, update, or view operations. If it does, proceed to load the corresponding instructions file to ensure that you are following the correct workflow for managing Kody Rules through the kodus rules command.
Should the user request a new action related to Kody Rules that differs from the initial action, you should load the appropriate instructions file for that new action to ensure that you are following the correct workflow for managing Kody Rules through the kodus rules command.
A Kody Rule typically consists of the following components:
global for shared rules that apply across all repositories.src/**/*.js would apply the rule to all JavaScript files in the src directory and its subdirectories.**/*.Title: Use Async/Await for Asynchronous Operations
Rule: Ensure that all asynchronous operations in the codebase use async/await syntax for better readability and error handling. Avoid using raw Promises or callback functions for asynchronous code.
Severity: High
Scope: File
Path: **/*.ts
Repository ID: global
Use when the user wants to manage centralized configuration via `kodus config centralized` commands (status, init, sync, disable, and download).
Use when the user wants Kodus to review local changes through a local CLI build or non-production API such as `node dist/index.js`, localhost, or QA, including local `--prompt-only` flows.
Use when the user wants Kodus to review local changes, run `kodus review` or `--prompt-only`, fix Kodus review findings, or check commit, push, or merge readiness.
Use when the user wants Kodus to validate local diff changes against task requirements, acceptance criteria, or business rules via `kodus pr business-validation`, especially for implementation-vs-task or merge readiness checks.
Use when the user wants to fetch, triage, or implement Kodus suggestions for an existing remote pull request via `kodus pr suggestions`, `--pr-url`, or `--pr-number`.