ai-doc-index
v1.1.0
Published
Scaffold AI-friendly documentation index for Flutter/Dart projects (AGENTS.md + docs/ai/)
Maintainers
Readme
ai-doc-index
Scaffold AI-friendly documentation for Flutter/Dart projects in seconds.
What is this?
ai-doc-index scaffolds a structured documentation system designed for AI agents (Cursor, Antigravity, GitHub Copilot) to read your Flutter/Dart codebase efficiently without wasting tokens.
The pattern
AGENTS.md ← Entry point: context + docs map
docs/ai/
context-routing.md ← "Which task → which file to read" routing table
architecture.index.md ← Feature matrix: route → BLoC → Repository
tech.md ← DI/BLoC conventions, commands, packages
architecture.md ← Full architecture deep-dive
features.md ← Feature-level documentation
database.md ← Schema, migrations, RLS, RPC
shared.md ← Shared widgets, theme, utils
docs/wip/
_index.md ← WIP features trackerCore idea: context-routing.md tells the AI which files to skip based on task type → fewer tokens, faster responses.
Usage
npx ai-doc-index initThe CLI will ask for your project name, stack, and backend, then scaffold all files into the current directory.
Files that already exist are not overwritten — safe to re-run.
Quick start
# 1. Go to your Flutter project root
cd my_flutter_project
# 2. Scaffold the docs
npx ai-doc-index init
# 3. Fill in your actual content
# - AGENTS.md → project context
# - docs/ai/architecture.index.md → your feature matrix
# - docs/ai/tech.md → your packages & commands
# - docs/ai/database.md → your schemaWhy this works
- AI agents read docs linearly — a routing table prevents them from loading all files
- A flat feature matrix (
architecture.index.md) lets AI grep one row instead of reading code - Separation into small files means AI loads only what's needed per task
Template customization
After scaffolding, replace <!-- TODO: ... --> placeholders with your actual project details:
| File | What to fill |
|---|---|
| AGENTS.md | Project description, stack |
| architecture.index.md | Feature matrix (route → BLoC → Repo) |
| tech.md | Actual packages, commands, DI setup |
| database.md | Table schema, migrations list |
| shared.md | Your shared widgets and utilities |
License
MIT © ngocbaomobile
