Skip to main content

Overview

Business Logic Validation checks that a pull request delivers what its task asks for. Kody finds the task the PR references, reads it from your task tracker, and lists every requirement with where it stands in the code. The result is one comment on the PR, kept up to date, the same on GitHub, GitLab, Bitbucket, Azure Repos and Forgejo. On by default in Code review → What to review → Business Logic. Connect a task tracker in Plugins for automatic task lookups, or pass the requirements directly in a review command. What the comment looks like on a PR that delivers part of its task:
Kody · Business Logic #291 · Ticket SLA badge — To fix: 2 missing requirements
After the fix, the same comment reads “All requirements met” and ”✅ 3 of 3 met”, with the earlier checks listed below it.

Prerequisites

  • A task tracker connected in Plugins: Linear, Jira (Atlassian Rovo), Notion, Git Issues, or a custom plugin.
  • Kody only reads from your tracker: the task a PR names by its id, and what it links to (a parent, sub-tasks, attached documents). It never writes to it, and it uses a task only when the tracker returns one with that id.
  • Without a tracker, you can still paste the task text in the command (see below).

Turning it on

Business Logic is on by default. Turn it on or off in Code review → What to review, on the Business Logic row, or in kodus-config.yml:
Click Business Logic on that row to open its settings, or use the row’s ⋯ menu: Edit opens the settings, Try it opens them at the test panel.

How Kody finds the task

Kody looks for task references in the PR title, branch name and description, in that order:
  • Keys like PROJ-123 (Jira, Linear and most trackers)
  • #123 and owner/repo#123 (Git issues; a number that is a pull request is ignored)
  • AB#123 (Azure Boards)
  • Links to Linear, Jira (Cloud, or Server and Data Center on your own domain: any /browse/PROJ-123 link), Notion, GitHub/GitLab issues and Azure work items
A reference only counts once the tracker returns a task with that exact id, so UTF-8 or gpt-5 in a title are never mistaken for tasks. A lower-case key in the title (feat(kod-10)) counts when your tracker has that team or project; a Linear project id (P-KOD-1) never does. Kody also reads what the task links to:
  • A parent (a Linear sub-issue, a Jira sub-task, a ClickUp subtask): the PR is checked against the parent’s requirements this task’s title covers. A sub-issue that says “see the parent” is still checked.
  • Sub-tasks: a requirement one of them delivers shows as CHECK MANUALLY (“Delivered by KOD-20”), never as missing.
  • Documents attached to the task (Linear docs): read as part of the task, criteria included.

How the PR names the task

  • “Closes PROJ-1” (also fixes, resolves, implements, completes) or a key in the title or branch: the PR is checked against the whole task.
  • “Part of PROJ-1”: the PR delivers a slice. What’s missing is listed, but not as something to merge.
  • “Refs PROJ-1”, “see PROJ-1”, “related to PROJ-1” or a bare key in the description: a mention. It is checked only when the PR names no other task, and then as the PR’s own. A bare #123 in the description is never read as the task: write Closes #123 (Refs #123 also counts when the PR names nothing else).
  • Up to three references are read per PR, one section each. Ids and links count before the tracker confirms them, so a PR that names more (a release or a merge) is skipped.

The five states

Every row cites the file and line it is based on, and says what to change. A reviewer’s acceptance shows as ACCEPTED (see below). If the whole diff works on something other than the task, the comment says so and that is left to fix, unless the PR says it is part of the task.

Before a gap is shown

A gap tells the author to redo work, so Kody holds each one to the code:
  • The requirement as the task writes it. An input or edge case the task never names (negative amounts, another code path, a format it doesn’t mention) never makes a row PARTIAL, and neither does what happens after the change (that an existing job sends the message the PR queues, that a route uses the serializer the PR fills in).
  • The code the PR calls, not only the diff. When a rule lives in code the PR calls but didn’t change (a validator, a helper, the mapper that builds a response), Kody reads it in the repository at the PR’s head before anything is shown, and does the same for up to eight MISSING, CHECK MANUALLY and PARTIAL rows, in that order. Visual requirements are not re-read: no file settles them. A row turns MET only on a file and line Kody read, and says it is already in the code, outside the diff. A row turns MISSING only when Kody read the code the PR relies on and cites the line that lacks the rule. Whatever the repository doesn’t settle stays as it was.
  • Work that belongs elsewhere. A requirement a sub-task delivers, or one your team guidance says isn’t checked here, stays CHECK MANUALLY and is never re-judged as missing.

On the pull request

  • Kody checks the PR on its first review. A review that skips it with nothing posted (no task referenced, a tracker that is down) doesn’t count: the next review tries again. Once the PR was checked, it re-checks when someone comments @kody -v business-logic or runs @kody review --force. Re-check after a push can also be set to While something is missing, so a fix updates the comment without anyone asking, or to On every push; each is one more validation per push.
  • Re-check any time with @kody -v business-logic. The same comment is edited; Kody never posts a second one.
  • A PR that meets its task gets a short comment (”✅ 4 of 4 met”), plus anything to check by hand, so the author knows it was checked. Turn off Comment when every requirement is met to stay quiet on those.
  • The comment is the signal on every platform: Kody doesn’t write a check or a status, so it never blocks a merge by itself. Its header says what is left to fix.

Replying to the comment

Reply to the Business Logic comment and mention @kody. Kody reads a comment as a reply when it is posted in that comment’s thread (GitLab, Bitbucket, Azure Repos), quotes it (its title or a requirement’s words), or names the requirement, its state as the comment writes it (MISSING, PARTIAL) or the task id; any other comment goes to the chat.
  • Disagree: “It’s covered in useDrag.ts”. Kody re-checks what you pointed at and either marks it MET or says what it looked at and keeps it.
  • Accept a finding (someone other than the PR’s author: on GitHub, with write access to the repository; on GitLab, Developer or above on the repository; on Bitbucket, Azure Repos and Forgejo, a member of the organization the platform lists): “Keyboard reordering is out of scope, moved to SAA-102”. Kody confirms SAA-102 exists, marks the row ACCEPTED with who accepted it, and it is no longer left to fix. The decision stays on later re-checks, even when Kody words the requirement a little differently, as long as the task’s text is unchanged; once the task is edited, only a requirement worded exactly as before keeps it.
What Kody answers:

When Kody stays quiet

Kody comments only when the author can do something about it: Every skip is recorded with its reason. The top of the Business Logic settings page says whether Kody is working (PRs checked in the last 30 days, last task read) or paused because a tracker isn’t answering, and counts the PRs it couldn’t read by reason: the task doesn’t exist, a typo in the reference, the tracker didn’t answer, no connected tracker reads the reference, or the task is too thin.

Running on demand

Comment on the PR (not on a line of code):
  • @kody -v business-logic: re-check the tasks the PR references
  • @kody -v business-logic PROJ-123 or a task link: check against that task
  • @kody -v business-logic followed by the requirements as text (40 characters or more): check against what you wrote, no tracker needed

Settings

Open Code review → What to review and click Business Logic (or ⋯ → Edit). Every setting can be set globally and overridden per repository or directory.
  • Task source: every connected tracker, or one plugin. Under Every connected tracker, Kody reads Linear, Jira, Notion and Git Issues, and the custom plugins whose name says they are a task tracker (Jira, Linear, Notion, ClickUp); any other custom plugin, such as Azure DevOps, is read only when you pick it. For a custom plugin, pick the tool that reads one task by its id; only read-only tools are offered. Use Try it, pinned on the right of the page (it needs permission to edit these settings): a task alone shows what Kody reads from it, and a pull request runs the whole check without posting, with the settings on screen, saved or not. Post to the pull request posts the result shown, without running it again, once per test; it refuses when the pull request got a commit after the test or when 30 minutes have passed, so run the test again first.
  • Custom task id format (optional): a regular expression for ids Kody doesn’t find on its own: T(\d{4}) reads T1234 as task 1234. Keys like SAA-96, #12, AB#8, CU-… and tracker links are found without it, and so is a lower-case key like sc-123 in a branch name. In a title or description a lower-case key counts only when Linear or Jira has that team or project; for another tracker, set the format. A number the format captures is read as a Git issue only when Git Issues is the task source; with every connected tracker, T1234 is never issue #1234 of the repository. The format is 200 characters at most, and Kody drops one that could take too long to run, like (a+)+.
  • Requirements → Where acceptance criteria live: detected automatically (a criteria field, a checklist, or a list in the description), under a heading in the description, or in a custom field; a task without the field is read from its description. With Under a heading in the description set to Acceptance criteria, this task is checked against its three bullets, and the paragraph above them is context:
  • On the pull request → Comment when every requirement is met (on by default): a PR that meets its task gets a short comment. Off, it gets none; a PR with anything left to check by hand, partial or not in the task still gets its comment, and a comment already on the PR is still updated.
  • On the pull request → Ask for a task when the PR references none: Kody comments asking which task the PR is for, instead of skipping it, and a reference that looks like a typo stays open until fixed. PRs opened by bots, like Dependabot or Renovate, are left alone. A tracker that is down never counts.
  • On the pull request → Re-check after a push: Only on request (default), While something is missing, or On every push. Each check runs on your organization’s model like a review does (Business Rules under Other task models in Code review → Routing can pin a different one), so On every push costs one validation per push.
  • Skipped pull requests: Business Logic skips the PRs code review skips: titles with an ignored keyword (ignoredTitleKeywords, like wip) and drafts when runOnDraft is off. Set those in Code review → General. A @kody -v business-logic comment always runs.
  • Requirements → Team guidance: notes Kody follows when it judges, up to 2,000 characters, for example “Feature flags count as implemented when the flag exists and defaults to off”. It can’t change the verdict format or make Kody invent requirements.

Common setups

The same settings in kodus-config.yml (read when Prefer kodus-config.yml settings is on in Code review → General):

From the CLI

A coding agent can check its work before opening the PR:
It checks your local changes against the task and prints one line per requirement and the status. With --format json (or --agent) it prints the same verdict structured, for an agent to act on. Nothing is posted to a pull request. Give the task with --task-id or --task-url (not both). Pick which changes are checked with file paths, --staged, --commit <sha> or --branch <name> (one of them); without any, it checks your staged and unstaged changes to tracked files.

Cockpit

Cockpit → Delivered as asked (Teams and Enterprise plans) shows the share of PRs that met their task (Met their task), the share with changes not in the task, how often developers agreed with Kody (Findings accepted), the share without a readable task, the split by who wrote the code (people or coding agents, from commit authors and Co-Authored-By trailers), the kinds of requirement most often missed, and a table by team when the organization has more than one. It follows the Cockpit’s repository picker and date range, and can be hidden in Organization → Cockpit visibility like the other tabs.