---
title: documentation-index-member-wrong-depth
description: Reports an index entry for a descendant owned by a child directory's index.
---

[← All Rules](/rules/)

## What it does

Reports an entry that skips the direct-child boundary and targets a document owned by a descendant Documentation Directory.

## Why it matters

Each index owns only direct documents and direct child directory indexes. Descendant inventories remain in their nearest owning `README.md`.

## Examples

### Non-passing

```md title="AGENTS.md"
# Source Of Truth Map

- [API leaf](docs/api/leaf.md) — Load for leaf details.
```

### Passing

```md title="AGENTS.md"
# Source Of Truth Map

- [API](docs/api/README.md) — Load for API documentation.
```

```md title="docs/api/README.md"
# Source Of Truth Map

- [Leaf](leaf.md) — Load for leaf details.
```

## When it applies

This Rule belongs to the configurable `documentation-indexes` group and runs for enabled Index Policies across the index tree.

## References

See [Concepts](/concepts/) for Index Section ownership and [`src/check/evaluate-index.ts`](https://github.com/evilkiwi/presswork/blob/main/src/check/evaluate-index.ts) for owned-target classification.
