---
title: "Tie every finding to a rule ID and · Agent Wranglers"
url: https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/findings-with-rule-ids
id: TDD-3
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 887
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Tie every finding to a rule ID and evidence

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Scope and conduct](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: TDD-3
- Level: Recommended
- Chapter: [Scope and conduct](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct.md)
- Rule: Give every finding in a due diligence report the rule ID it breaks, a severity, the evidence and a fix estimate.
- Check: A script reads the report's findings and fails when one lacks a rule ID, a severity, evidence or a fix estimate.
- How: Anyone can check a finding with a rule ID. The buyer can price it and the seller can fix it without a debate about what was meant. The evidence is a file and line, a request and its answer, or a screenshot. Use the four levels from [Rate every finding on a fixed severity scale](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/severity-scale.md). This is [Name the principle and the fix in every finding](https://agentwranglers.se/playbook/engineering/version-control-and-review/name-principle-code-fix.md), applied to a deal.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
import { readFileSync } from 'node:fs';

const FIELDS = ['ruleId', 'severity', 'evidence', 'fixDays'];
const findings = JSON.parse(readFileSync('report/findings.json', 'utf8'));
const incomplete = findings.filter(finding => FIELDS.some(field => !finding[field]));
if (incomplete.length) { console.error(incomplete.map(finding => finding.title).join('\n')); process.exit(1); }
```

### Python example

```python
import json, sys

FIELDS = ["ruleId", "severity", "evidence", "fixDays"]
findings = json.load(open("report/findings.json"))
incomplete = [f["title"] for f in findings if any(not f.get(field) for field in FIELDS)]
if incomplete:
    sys.exit("\n".join(incomplete))
```

## Related rules

- TDD-1 [Never sign a review of code you have changed](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/independent-reviewer.md) in Technical due diligence
- TDD-16 [Rate every finding on a fixed severity scale](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/severity-scale.md) in Technical due diligence
- ENG-61 [Name the principle and the fix in every finding](https://agentwranglers.se/playbook/engineering/version-control-and-review/name-principle-code-fix.md) in Engineering

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/findings-with-rule-ids">Agent Wranglers technical due diligence playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Work from read-only access and delete copies afterwards](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/read-only-and-delete.md)
- Next: [Rate every finding on a fixed severity scale](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct/severity-scale.md)
- [Scope and conduct](https://agentwranglers.se/playbook/due-diligence/scope-and-conduct.md)
