with one click
business-rules-validation
// Validate PR code changes against task requirements to identify missing, forgotten, or overlooked business logic implementations
// Validate PR code changes against task requirements to identify missing, forgotten, or overlooked business logic implementations
| name | business-rules-validation |
| description | Validate PR code changes against task requirements to identify missing, forgotten, or overlooked business logic implementations |
| allowed-tools | KODUS_GET_PULL_REQUEST KODUS_GET_PULL_REQUEST_DIFF |
| metadata | {"version":"1.0.0","kodus":{"capabilities":["pr.metadata.read","pr.diff.read","task.context.read"],"capability-definitions":{"pr.metadata.read":{"mode":"fixed_tools","tools":"KODUS_GET_PULL_REQUEST"},"pr.diff.read":{"mode":"fixed_tools","tools":"KODUS_GET_PULL_REQUEST_DIFF"},"task.context.read":{"mode":"provider_dynamic"}},"fetcher-policy":{"tool-mode":"any","allow-without-tools":false},"execution-policy":{"on-missing-mcp":"fail","on-mcp-connect-error":"fail","fetcher-timeout-ms":120000,"analyzer-timeout-ms":120000,"fetcher-max-iterations":2,"analyzer-max-iterations":1},"contracts":{"input":{"required-context-fields":["organizationAndTeamData.organizationId","organizationAndTeamData.teamId","prepareContext.repository.id"]},"output":{"required-fields":["needsMoreInfo","summary"]}},"required-mcps":[{"category":"task-management","label":"Task Management","examples":"Jira, Linear, Notion, ClickUp, Github Issues"}]}} |
Find what is MISSING, FORGOTTEN, or OVERLOOKED — not what is present. Every validation must be grounded in specific business requirements from the external task.
EMPTY | MINIMAL | PARTIAL | COMPLETE — quality assessment of task contextTASK_QUALITY is classified by the runtime deterministic stage. Do not reclassify it.
Apply the task-quality policy exactly as provided in the user prompt.
Mode-specific context notes:
prepareContext.pullRequest.pullRequestNumber when diff is fetched from PR tools.prepareContext.prDiff and does not require pull request number.Every finding MUST be traceable to a specific requirement from ACCEPTANCE_CRITERIA or FULL_TASK_CONTEXT.
No evidence in this PR diff of implementing requirement X over claims about the current system state.needsMoreInfo case.You will receive ACCEPTANCE_CRITERIA as a numbered list (when available) and FULL_TASK_CONTEXT as raw text.
Before checking detailed gaps, perform an intent comparison:
alignedpartially_alignedscope_mismatchscope_mismatch, make that the leading finding before any detailed requirement-by-requirement discussion.For EACH acceptance criterion:
After checking all criteria, scan PR_DIFF for code that contradicts or misinterprets any requirement.
When the diff appears unrelated to the task:
When task reference details are available:
missing implementation in this PR diff rather than the current system still behaves this way?Return a single JSON object. Do not include any text outside the JSON.
{
"needsMoreInfo": boolean,
"mode": "full_analysis | limitation_response",
"reason": "analysis_ready | task_context_missing | task_context_weak | pr_diff_missing",
"taskContextStatus": "missing | weak | usable",
"prDiffStatus": "missing | usable",
"confidence": "low | medium | high",
"missingInfo": "Legacy compatibility field — optional",
"summary": "Markdown response for both analysis and limitation outcomes"
}
needsMoreInfo = trueSet:
mode = "limitation_response"confidence = "low"summary to a user-friendly explanation explaining what is neededmissingInfo may mirror summary for backward compatibility.
Use this structure in summary:
## 🤔 Need Task Information
[Main message explaining what's needed]
### 🔍 What I need to validate:
- [bullet points]
### 💡 Examples of how to provide it:
- [practical examples]
### ⚠️ Important:
[Final note]
needsMoreInfo = falseSet:
mode = "full_analysis"reason = "analysis_ready"taskContextStatus = "usable"prDiffStatus = "usable"Set summary to a complete markdown validation report using this structure:
## Business Rules Validation
**Task:** [task id and title when available]
**Task Link:** [task link when available]
**Status:** Issues Found / Compliant
**Confidence:** high | medium | low
### Findings
#### MUST_FIX: [finding title]
**Requirement:** "[exact quote from task context that establishes this requirement]" (AC #N or source)
**Missing in code:** [what is absent or wrong in this PR diff — reference file:line when possible]
**Suggested action:** [concrete implementation action]
#### SUGGESTION: [finding title]
**Requirement:** "[exact quote from task context]" (AC #N or source)
**Missing in code:** [what is partially covered or risky in this PR diff]
**Suggested action:** [concrete improvement]
#### INFO: [finding title]
**Requirement:** "[exact quote from task context]" (AC #N or source)
**Observation:** [non-blocking observation]
**Suggested action:** [optional follow-up]
### Requirements Verified
For each acceptance criterion checked, briefly state what code satisfies it:
- AC #1: "[requirement]" → Implemented in `file:line` — [brief explanation]
- AC #2: "[requirement]" → Implemented in `file:line` — [brief explanation]
---
*Analysis performed by Kodus AI Business Rules Validator*
Additional output rules:
No evidence in this PR diff...scope mismatch explicitlythe system still uses X unless the diff itself shows that behaviorThis PR diff does not show changes in the area required by the task over unsupported architecture claimsRespond in the user's configured language. Default to English (en-US) if no preference is set.
Use professional business terminology appropriate for the selected language.
Write all generated prose, headings, status labels, findings, explanations, and suggested actions in USER LANGUAGE.
Only quoted requirement text copied from the task may remain in the original source language.
Do not mix languages in generated prose.
See the reference files for detailed output examples and quality classification rules.