# Code surface

<Availability permission="Features: Update to change a feature's code surface. Features: Read to find the features that use a file, and Applications: Read for path suggestions." />

A feature's code surface is the set of files, folders and entry points that implement it in one
linked application. Scans record it, and you can add paths to it by hand. A scan starts from it, and
its draft is checked against it. You can also turn it around and find the features that use a given
file or folder.

## To change a feature's code surface

1. Open the feature, open the **Applications** panel, and choose the application.
2. Choose **Add code path**, enter the path of a file or folder in the repository (Productmind
   suggests paths as you type), and press Enter.

The path appears, marked **Manual**. Scans read it like a path they found, and never remove it. To
remove a path you added, point at it and choose its **x**. A path a scan recorded has no **x**: see
[Audit findings](/user-guide/product/audit-findings#i-cant-remove-a-path-a-scan-recorded).

To edit a path, point at it, choose its pencil, change the path and press Enter, or press Escape to
cancel. A path a scan recorded can be edited too: your path replaces it, marked **Manual**, and later
scans don't bring the old one back. Entry points can't be edited.

## To find the features that use a file

1. In the sidebar, choose **Features**, then choose **Filters**, and go to **Code path**.
2. Enter the path of a file or a folder. Productmind suggests the files and folders of an
   application's repository as they are now, on its base branch. When several applications have a
   repository, choose the application above the field first.
3. Choose a suggestion, or press Enter to filter by the path as you entered it.

The list shows the features whose code surface includes that path, with the chip **Code path:**
and the file or folder name, for example **Code path: booking.service.ts**. A feature counts the
paths a scan recorded, the paths you added, and the files its entry points name, but not the
paths of its subfeatures.

The match is broad, so you also find a feature whose code surface records the file in an old or a
wrong folder:

- Letter case doesn't matter.
- A feature matches when it records the same path, a folder that holds it, or, when you chose a
  folder, a path inside that folder.
- For a file, a feature also matches when one of its file names contains the name you entered, in
  any folder and any application. Entering **booking.contr** finds **booking.controller.ts**.

A folder never matches by its name alone, only by its path.

To see only the features that record exactly that path, with the same letter case, select **Exact
match**. A folder that holds the path, or the same file name in another folder, doesn't count, and
the chip ends with **(exact)**. Use it to narrow a common name such as **index.ts**. You can select
it before or after you choose the path.

To remove the filter, choose the **x** on the chip, or the **x** next to the path under **Code
path**.

Without **Applications: Read**, the field makes no suggestions, but it still filters by the path
you enter.

## Permissions

| To | You need |
| --- | --- |
| Change a feature's code surface | **Features: Update** |
| Find the features that use a file | **Features: Read** |
| Get path suggestions in the **Code path** filter | **Features: Read** and **Applications: Read** |

A private feature's teams also decide who can see and change it. See
[Private features](/user-guide/product/private-features).

## Related topics

- [Features](/user-guide/product/features)
- [Audit findings](/user-guide/product/audit-findings)
- [Applications](/user-guide/engineering/applications)
