---
title: documentation-index-document-malformed
description: Reports a configured Index Document that is not an eligible Recognized Document.
---

[← All Rules](/rules/)

## What it does

Reports an Index Document location that exists but is not one Recognized Document for the policy's root or is not the required Markdown `README.md` for a descendant directory.

## Why it matters

Presswork can evaluate an Index Section only in an eligible document owned by the Profile.

## Examples

### Non-passing

```json title="presswork.json"
{
  "version": 1,
  "profile": { "name": "basic", "version": 1 },
  "indexes": {
    "docs": { "document": "INDEX.md", "heading": "Source Of Truth Map" }
  }
}
```

`INDEX.md` exists at the Repository Root but is not configured as a Root Document.

### Passing

```json title="presswork.json"
{
  "version": 1,
  "profile": { "name": "basic", "version": 1 },
  "rootDocuments": ["INDEX.md"],
  "indexes": {
    "docs": { "document": "INDEX.md", "heading": "Source Of Truth Map" }
  }
}
```

## When it applies

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

## References

See [Presswork Configuration](/configuration/#indexes) for eligible Index Documents and [`src/check/evaluate-index.ts`](https://github.com/evilkiwi/presswork/blob/main/src/check/evaluate-index.ts) for document-state evaluation.
