> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scandrix.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Business Logic Validation

> Connect Jira and Linear to verify that pull requests fulfill issue requirements and acceptance criteria before merge.

Traditional static analysis only looks at syntax and common vulnerabilities. ScanDrix extends review intelligence to **business logic verification** by linking pull requests directly to project management tickets in **Jira** or **Linear**.

## How it works

1. **Ticket Extraction**: ScanDrix parses the PR branch name, commit titles, or PR description for ticket keys (e.g. `PROJ-104` or `ENG-421`).
2. **Context Ingestion**: ScanDrix queries the Jira or Linear API to retrieve the ticket description, acceptance criteria, and technical constraints.
3. **Semantic Verification**: The AI reasoning engine compares the code diff against the requirements to verify:
   * Are all stated acceptance criteria implemented in the changes?
   * Are there unintended side effects or modified endpoints not mentioned in the issue specification?
   * Are corresponding automated tests added for each new business condition?
4. **Summary Feedback**: ScanDrix posts a **Business Requirements Checklist** directly inside the PR summary table.

## Example PR check

When a PR titled `feat: add tiered billing upgrade handler (PAY-842)` is opened, ScanDrix renders:

```markdown theme={null}
### 📋 Business Logic Verification (PAY-842)
- [x] **Requirement 1**: Capture Razorpay order ID and payment signature — *Implemented in `verify/route.ts:24`*
- [x] **Requirement 2**: Update PostgreSQL workspace tier atomically — *Verified via `UpgradeWorkspacePlanAtomic`*
- [ ] **Requirement 3**: Send invoice confirmation email to account owner — ⚠️ *Missing from diff; no mailer service invoked*
```

## Setup instructions

**1. Connect your project tracker**

Go to **Settings → Integrations** in the ScanDrix dashboard and authenticate with Jira Cloud or Linear.

**2. Define ticket matching format**

Configure regex patterns to detect issue identifiers in branch names:

```yaml theme={null}
# .scandrix.yaml
integrations:
  jira:
    project_keys: ["SEC", "PAY", "CORE"]
    require_acceptance_criteria: true
```

**3. Configure blocking policy**

Optionally configure ScanDrix to flag a warning if a PR modifies core business modules without referencing a valid open ticket.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.