# Docs-First Policy

Use this for any task requiring project documentation from `ai-documents-validation`.

## Canonical Shelf

Shelf name:

`ai_documents_validation_docs`

Expected sources:

- `S:\ai_projects\ai_documents_validation\README.md`
- `S:\ai_projects\ai_documents_validation\_documentation`

Local observed path:

- `E:\ai-documents-validation`

Prefer `project_path` explicitly passed by the user. If absent, use current workspace or the known local path.

## Required Order

1. Check whether shelf `ai_documents_validation_docs` exists.
2. Verify freshness for `README.md` and `_documentation/**/*.md` in the target repo.
3. Treat shelf as stale when it does not exist, docs changed, or freshness cannot be verified.
4. If stale, rebuild from scratch:
   - remove shelf if present;
   - scan `README.md`;
   - scan `_documentation` recursively.
5. Use docs search/read against the refreshed shelf.
6. Fall back to filesystem reads only when Docs MCP is unavailable or incomplete.

## Search Discipline

Prefer targeted reads:

- search for `guida sviluppo nuovo tipo documento`;
- search for API/deployment integration terms when consumer integration is requested;
- read only needed passages.

Do not bulk-read the full documentation tree unless explicitly required.

## Fallback

When MCP docs tools are unavailable, read:

- `AGENTS.md`;
- `README.md`;
- `_documentation/guida_sviluppo_nuovo_tipo_documento.md`;
- `_documentation/guida_deployment_api.md` for API integration;
- other docs only when directly relevant.
