|
| 1 | +# DevMap |
| 2 | + |
| 3 | +This repository uses DevMap to create reusable project context for developers and AI agents. |
| 4 | + |
| 5 | +## Project Context |
| 6 | + |
| 7 | +- Detected framework: astro |
| 8 | +- Agent navigation index: `.devmap/index.json` |
| 9 | +- Feature maps: `.devmap/features/*.json` |
| 10 | +- Full analysis archive: `.devmap/snapshot.json` |
| 11 | +- DevMap config: `~/.devmap/config.json` |
| 12 | + |
| 13 | +## Recommended Workflow |
| 14 | + |
| 15 | +1. Run `devmap analyze` after cloning the repository. |
| 16 | +2. Run `devmap analyze --fresh` after major architecture changes. |
| 17 | +3. Use `devmap ask "<question>"` before manually exploring unrelated files. |
| 18 | +4. Treat DevMap output as an architecture overview, then verify critical behavior in source code. |
| 19 | + |
| 20 | +## Commands |
| 21 | + |
| 22 | +```bash |
| 23 | +devmap analyze |
| 24 | +devmap analyze --json |
| 25 | +devmap ask "how does authentication work?" |
| 26 | +devmap ask "where is authentication handled?" --json |
| 27 | +devmap doctor |
| 28 | +devmap doctor --json |
| 29 | +``` |
| 30 | + |
| 31 | +## Agent Navigation Contract |
| 32 | + |
| 33 | +This repository uses DevMap as the primary navigation source. Use the lightweight |
| 34 | +navigation files before broad repository exploration. |
| 35 | + |
| 36 | +Preferred reading order: |
| 37 | + |
| 38 | +1. Read `.devmap/index.json`. |
| 39 | +2. Pick the relevant feature using its name and keywords. |
| 40 | +3. Open the matching `.devmap/features/*.json` map. |
| 41 | +4. Inspect only the files listed in `sourcePriority` first. |
| 42 | +5. Read `.devmap/snapshot.json` only when the index and feature maps are |
| 43 | + insufficient or full archive/debug context is required. |
| 44 | + |
| 45 | +Do not scan the whole repository first. |
| 46 | + |
| 47 | +Open source files only when: |
| 48 | + |
| 49 | +- the snapshot is missing; |
| 50 | +- the snapshot is stale; |
| 51 | +- the snapshot does not contain enough detail; |
| 52 | +- exact implementation is required; |
| 53 | +- the task is edit, debug, or refactor; |
| 54 | +- the user explicitly asks for code changes. |
| 55 | + |
| 56 | +When source inspection is needed, inspect the smallest relevant set first. |
| 57 | +Prefer feature entry points and flow steps over broad folder exploration. |
| 58 | + |
| 59 | +## Required Agent Workflow |
| 60 | + |
| 61 | +1. Read `DEVMAP.md`. |
| 62 | +2. Read `.devmap/index.json`. |
| 63 | +3. Open the relevant feature map. |
| 64 | +4. Inspect at most the smallest relevant source-file set from `sourcePriority`. |
| 65 | +5. Explain which navigation entry guided the decision when giving advice. |
| 66 | +6. Avoid unrelated files unless the navigation data is incomplete or exact |
| 67 | + code verification is required. |
| 68 | + |
| 69 | +If `.devmap/index.json` or `.devmap/snapshot.json` is missing, run |
| 70 | +`devmap analyze` when DevMap is available and configured. If analyze fails |
| 71 | +because DevMap is not initialized, ask the user to run `devmap init` and then |
| 72 | +`devmap analyze`. |
| 73 | + |
| 74 | +If the snapshot may be stale, run `devmap analyze --fresh` before relying on |
| 75 | +it. |
| 76 | + |
| 77 | +Use `--json` when calling DevMap programmatically so stdout remains one |
| 78 | +parseable JSON document without ANSI or terminal decoration. |
| 79 | + |
| 80 | +Do not edit generated files inside `.devmap/`. |
| 81 | + |
| 82 | +## Repository Safety |
| 83 | + |
| 84 | +- `.devmap/` is local generated state and should stay out of Git. |
| 85 | +- Never commit API keys or provider credentials. |
| 86 | +- DevMap helps locate relevant code; it does not replace source-level verification. |
0 commit comments