# AI Agent Instructions

## Reading Protocol

Follow this protocol to understand the codebase efficiently:

1. **Start with INDEX.md** - Get the project overview and module routing table
2. **Navigate to relevant module** - Go to `modules/{name}/MODULE.md` for the area you're working on
3. **Check memory.md before editing** - Review warnings and TODOs for that module
4. **Use outline.md for large files** - Find symbols without reading entire files
5. **Check imports.md for dependencies** - Understand module relationships before changes
6. **Review files/*.md for complex files** - Deep documentation for high-complexity files

### Documentation Structure

```
.agentlens/
├── INDEX.md              # Start here - project overview
├── AGENT.md              # This file - AI instructions
├── modules/
│   └── {module-slug}/
│       ├── MODULE.md     # Module summary and file list
│       ├── outline.md    # Symbol maps for large files
│       ├── memory.md     # Warnings and TODOs
│       └── imports.md    # Dependencies
└── files/                # Deep docs for complex files
```

## Freshness Check

**Generated:** 2026-04-14T00:44:40Z
**Git HEAD:** `56da554`

### How to verify freshness

1. Compare the Git HEAD above with current: `git rev-parse --short HEAD`
2. If they differ significantly, docs may be outdated
3. Check file modification times vs. the Generated timestamp

## Available Modules

| Module | Files | Type | Description |
| ------ | ----- | ---- | ----------- |
| `` | 68 | root | Module |
| `bindings/csharp` | 10 | implicit | Module |
| `bindings/react-native/examples/rncli` | 11 | js/ts | Module |
| `bindings/react-native/packages/react-native/lib/commonjs` | 1 | js/ts | Module |
| `bindings/react-native/packages/react-native/lib/module` | 1 | js/ts | Module |
| `bindings/react-native/packages/react-native/src` | 1 | js/ts | Source root |
| `bindings/web/examples/nextjs/pages` | 2 | js/ts | Page/view components |
| `bindings/web/examples/nodejs` | 1 | js/ts | Module |
| `bindings/web/examples/nodejs-benchmark` | 2 | js/ts | Module |
| `bindings/web/packages/bundler/src` | 1 | js/ts | Source root |
| `bindings/web/packages/core/src` | 1 | js/ts | Source root |
| `bindings/web/packages/node/src` | 1 | js/ts | Source root |
| `bindings/web/packages/vanilla/src` | 1 | js/ts | Source root |
| `examples/common` | 1 | rust | Utility functions |
| `src` | 2 | rust | Source root |
| `src/ffi` | 9 | rust | Module |
| `src/jsoneval` | 20 | rust | Module |
| `src/parse_schema` | 4 | rust | Module |
| `src/rlogic` | 4 | rust | Module |
| `src/rlogic/evaluator` | 13 | rust | Module |
| `src/topo_sort` | 4 | rust | Module |
| `src/utils` | 1 | rust | Utility functions |
| `src/wasm` | 8 | rust | Module |
| `tests/common` | 1 | rust | Utility functions |

## When Docs Seem Stale

If documentation seems outdated or inconsistent with the code:

1. **Regenerate docs:**
   ```bash
   agentlens
   ```

2. **Regenerate with diff mode** (faster, only changed files):
   ```bash
   agentlens --diff main
   ```

3. **Check freshness status:**
   ```bash
   agentlens --check
   ```

4. **Force full regeneration** (ignore cache):
   ```bash
   agentlens --force
   ```

## Quick Reference

| Metric | Value |
| ------ | ----- |
| Total files | 168 |
| Modules | 24 |
| Warnings | 74 |

---

*Generated by [agentlens](https://github.com/nguyenphutrong/agentlens)*
