# llama_index - Doramagic AI Context Pack

> 定位：给用户宿主 AI 装载的开工前上下文。它不代表已经安装、运行或验证目标项目。

## 项目

- canonical_name: `run-llama/llama_index`
- capability: LlamaIndex is the leading document agent and OCR platform
- expected_user_outcome: LlamaIndex is the leading document agent and OCR platform

## 基础边界

- 不要声称已经安装、运行、调用 API、读写本地文件或完成真实任务。
- 项目事实必须来自 repo evidence、Claim Graph 或明确来源。
- 遇到未验证能力时，必须标记为待验证，而不是补全为事实。
- publish_status: `publishable`
- blocking_gaps: none

---

## Doramagic Context Augmentation

下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。

## Human Manual 骨架

使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。

宿主 AI 硬性规则：
- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。
- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。
- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。

- **LlamaIndex 简介**：importance `high`
  - source_paths: README.md, llama-index-core/llama_index/core/__init__.py, llama-index-core/README.md
- **快速入门指南**：importance `high`
  - source_paths: docs/examples/vector_stores/SimpleIndexDemo.ipynb, docs/src/content/docs/framework/getting_started/installation.mdx, docs/src/content/docs/framework/getting_started/starter_example.mdx
- **系统架构**：importance `high`
  - source_paths: llama-index-core/llama_index/core/indices/base.py, llama-index-core/llama_index/core/query_engine/retriever_query_engine.py, llama-index-core/llama_index/core/storage/storage_context.py
- **核心组件详解**：importance `high`
  - source_paths: llama-index-core/llama_index/core/schema.py, llama-index-core/llama_index/core/indices/vector_store/base.py, llama-index-core/llama_index/core/indices/property_graph/base.py, llama-index-core/llama_index/core/indices/knowledge_graph/base.py, llama-index-core/llama_index/core/response_synthesizers/base.py
- **数据摄取流程**：importance `high`
  - source_paths: llama-index-core/llama_index/core/ingestion/pipeline.py, llama-index-core/llama_index/core/readers/base.py, llama-index-core/llama_index/core/readers/file/base.py, llama-index-core/llama_index/core/ingestion/transformations.py
- **节点解析器**：importance `medium`
  - source_paths: llama-index-core/llama_index/core/node_parser/text/sentence.py, llama-index-core/llama_index/core/node_parser/text/semantic_splitter.py, llama-index-core/llama_index/core/node_parser/relational/markdown_element.py, llama-index-core/llama_index/core/node_parser/interface.py
- **存储层架构**：importance `high`
  - source_paths: llama-index-core/llama_index/core/storage/storage_context.py, llama-index-core/llama_index/core/vector_stores/types.py, llama-index-core/llama_index/core/storage/docstore/types.py, llama-index-core/llama_index/core/storage/chat_store/base.py
- **智能体系统**：importance `high`
  - source_paths: llama-index-core/llama_index/core/agent/react/formatter.py, llama-index-core/llama_index/core/agent/workflow/base_agent.py, llama-index-core/llama_index/core/agent/workflow/multi_agent_workflow.py, llama-index-core/llama_index/core/tools/function_tool.py

## Repo Inspection Evidence / 源码检查证据

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `b4a235dec21e5a08bc0f08f617318f417da4e6a8`
- inspected_files: `pyproject.toml`, `README.md`, `uv.lock`, `docs/DOCS_README.md`, `docs/scripts/prepare_for_build.py`, `docs/examples/index.md`, `docs/api_reference/pyproject.toml`, `docs/api_reference/mkdocs.yml`, `docs/src/content/docs/framework/index.md`, `docs/src/content/docs/framework/CONTRIBUTING.md`, `docs/src/content/docs/framework/_meta.yml`, `docs/src/content/docs/framework/CHANGELOG.md`, `docs/src/content/docs/framework/llama_cloud/index.md`, `docs/src/content/docs/framework/llama_cloud/llama_parse.md`, `docs/src/content/docs/framework/llama_cloud/_meta.yml`, `docs/src/content/docs/framework/use_cases/chatbots.md`, `docs/src/content/docs/framework/use_cases/index.md`, `docs/src/content/docs/framework/use_cases/prompting.md`, `docs/src/content/docs/framework/use_cases/tables_charts.md`, `docs/src/content/docs/framework/use_cases/querying_csvs.md`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 能力证据存在缺口

- Trigger: Sandbox install result is missing.
- Host AI rule: 优先补证或在页面明确标记为未验证。
- Why it matters: 缺口未补前，Doramagic 不能把该能力当作可靠推荐卖点。
- Evidence: evidence.evidence_gaps | github_repo:560704231 | https://github.com/run-llama/llama_index | Sandbox install result is missing.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 能力判断依赖假设

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: 将假设转成下游验证清单。
- Why it matters: 假设不成立时，用户拿不到承诺的能力。
- Evidence: capability.assumptions | github_repo:560704231 | https://github.com/run-llama/llama_index | README/documentation is current enough for a first validation pass.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 维护活跃度未知

- Trigger: 未记录 last_activity_observed。
- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。
- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- Evidence: evidence.maintainer_signals | github_repo:560704231 | https://github.com/run-llama/llama_index | last_activity_observed missing
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 下游验证发现风险项

- Trigger: no_demo
- Host AI rule: 进入安全/权限治理复核队列。
- Why it matters: 下游已经要求复核，不能在页面中弱化。
- Evidence: downstream_validation.risk_items | github_repo:560704231 | https://github.com/run-llama/llama_index | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 存在评分风险

- Trigger: no_demo
- Host AI rule: 把风险写入边界卡，并确认是否需要人工复核。
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | github_repo:560704231 | https://github.com/run-llama/llama_index | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: issue/PR 响应质量未知

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | github_repo:560704231 | https://github.com/run-llama/llama_index | issue_or_pr_quality=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 发布节奏不明确

- Trigger: release_recency=unknown。
- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。
- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。
- Evidence: evidence.maintainer_signals | github_repo:560704231 | https://github.com/run-llama/llama_index | release_recency=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
