# fragile_paths

URL: /kida/api/analysis/fragile_paths/
Section: analysis
Description: Lint rule — suggest relative paths for same-folder includes.

Flags cross-template references whose target lives in the same folder
as the caller. Those references will break on a folder rename even
though nothing about the caller↔target relationship changed. Rewriting
them as ``./<basename>`` makes the folder move zero-edit.

Only a same-folder match is reported. Parent-folder suggestions
(``../x``) are ambiguous and would produce false positives for
legitimate cross-cutting library references, so they are intentionally
out of scope for this rule.

---

> For a complete page index, fetch /kida/llms.txt.

Open LLM text
(/kida/api/analysis/fragile_paths/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fanalysis%2Ffragile_paths%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fanalysis%2Ffragile_paths%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fanalysis%2Ffragile_paths%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fanalysis%2Ffragile_paths%2Findex.txt)

Module

#
`analysis.fragile_paths`

Lint rule — suggest relative paths for same-folder includes.

Flags cross-template references whose target lives in the same folder
as the caller. Those references will break on a folder rename even
though nothing about the caller↔target relationship changed. Rewriting
them as`./<basename>`makes the folder move zero-edit.

Only a same-folder match is reported. Parent-folder suggestions
(`../x`) are ambiguous and would produce false positives for
legitimate cross-cutting library references, so they are intentionally
out of scope for this rule.

2Classes1Function

## Classes

`FragilePathIssue`

6

▼

A single fragile-path finding.

A single fragile-path finding.

#### Attributes

Name
Type
Description

`lineno`

`int`

—

`col_offset`

`int`

—

`statement`

`str`

—

`target`

`str`

—

`suggestion`

`str`

—

`severity`

`str`

—

`_FragilePathVisitor`

6

▼

Collect cross-template references whose target is a sibling of the caller.

Collect cross-template references whose target is a sibling of the caller.

#### Methods

`visit_Include`

1

▼

`def visit_Include(self, node: Include) -> None`

##### Parameters

Name
Type
Description

`node`
`—`

`visit_Extends`

1

▼

`def visit_Extends(self, node: Extends) -> None`

##### Parameters

Name
Type
Description

`node`
`—`

`visit_Embed`

1

▼

`def visit_Embed(self, node: Embed) -> None`

##### Parameters

Name
Type
Description

`node`
`—`

`visit_Import`

1

▼

`def visit_Import(self, node: Import) -> None`

##### Parameters

Name
Type
Description

`node`
`—`

`visit_FromImport`

1

▼

`def visit_FromImport(self, node: FromImport) -> None`

##### Parameters

Name
Type
Description

`node`
`—`

Internal Methods
1

▼

`__init__`

1

▼

`def __init__(self, caller_name: str) -> None`

##### Parameters

Name
Type
Description

`caller_name`
`—`

## Functions

`check_fragile_paths`

2

`list[FragilePathIssue]`

▼

Return all fragile-path issues in *ast* for a caller named *caller_name*.

`def check_fragile_paths(ast: Template, caller_name: str) -> list[FragilePathIssue]`

##### Parameters

Name
Type
Description

`ast`
`Template`

`caller_name`
`str`

##### Returns

`list[FragilePathIssue]`
