> For the complete documentation index, see [llms.txt](https://mozarkdocs.gitbook.io/appx_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mozarkdocs.gitbook.io/appx_documentation/agent-workspace-documentation/cleaner-agent/cleaner-agent-scan-modes.md).

# Cleaner Agent scan modes

## Cleaner Agent scan modes

Cleaner Agent supports two scan modes.

Choose the mode that matches how strict you want duplicate detection to be.

<figure><img src="/files/2xbwPkI3i7PHT2uakfL5" alt="" width="375"><figcaption></figcaption></figure>

### Semantic scans

<figure><img src="/files/M8tOiaa4XBs8PuczrdHf" alt=""><figcaption></figcaption></figure>

Use **Semantic** when you want to find near-duplicates, not just identical wording.

This mode compares intent and similarity across test cases. It works best when different teams describe the same flow in slightly different ways.

Semantic mode also lets you set a similarity threshold.

Lower thresholds return broader matches. Higher thresholds return fewer, stricter matches.

If you set the threshold very high, near-duplicates may no longer appear in results.

### Exact scans

Use **Exact** when you want to find cases that match word for word.

This mode is stricter and usually faster.

It works well when you want to clean up direct copies or repeated imports.

### Scan scope

<figure><img src="/files/lHYMTjNUVXIbFB2ZjgOK" alt=""><figcaption></figcaption></figure>

You can scan either:

* a specific journey or folder
* the full repository with `scan all`

A journey scan only compares test cases in that scope.

A full scan compares the entire project.

### Read cleanup recommendations

Each duplicate group includes a recommendation for every test case.

#### Keep

**Keep** marks the best version to retain.

This is usually the most complete or most useful test case in the group.

#### Delete

**Delete** marks a test case as redundant.

Use this when the case adds no unique value once the primary version is kept.

#### Review

**Review** means the test case is similar, but still contains something worth preserving.

In most cases, you should merge that useful detail into the primary version before deleting the original.

### When to merge instead of delete

Choose **Merge** when multiple test cases cover the same flow but each one adds useful detail.

This is common when one version has stronger preconditions and another has better step coverage.

### Common pitfalls

* Do not delete a case marked **Review** until you confirm its unique detail is preserved.
* Do not expect **Exact** mode to find similar wording or shared intent.
* Do not assume a no-result scan means the repository is clean. The scope or threshold may be too narrow.

### Next step

Return to [Cleaner Agent](/appx_documentation/agent-workspace-documentation/cleaner-agent/overview.md) for the end-to-end workflow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mozarkdocs.gitbook.io/appx_documentation/agent-workspace-documentation/cleaner-agent/cleaner-agent-scan-modes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
