|
| 1 | +# Roadmap |
| 2 | + |
| 3 | +**Package:** `@stainless-code/codemap` |
| 4 | +**Tagline:** *Query your codebase* — structural index for AI agents (SQLite + SQL), not full-text grep. |
| 5 | + |
| 6 | +## Repository |
| 7 | + |
| 8 | +- **GitHub:** [github.com/stainless-code/codemap](https://github.com/stainless-code/codemap) |
| 9 | + |
| 10 | +## Extraction phases |
| 11 | + |
| 12 | +Each phase should end with a **tagged release** and **working CLI + tests**. |
| 13 | + |
| 14 | +### Phase A — Bootstrap (in progress) |
| 15 | + |
| 16 | +- [x] MIT `LICENSE`, `README.md`, `package.json`, `.gitignore` |
| 17 | +- [ ] CI: lint, typecheck, tests on `ubuntu` (macOS optional) |
| 18 | +- [ ] Import implementation (verbatim port first, then generalize): SQLite schema, parsers, CLI, benchmarks |
| 19 | + |
| 20 | +### Phase B — Config |
| 21 | + |
| 22 | +- [ ] Replace single hardcoded project root with **`root`** from config (default `process.cwd()`) |
| 23 | +- [ ] **`codemap.config.ts`** (or JSON + schema): include/exclude globs, database path, `tsconfig` for import resolution |
| 24 | + |
| 25 | +### Phase C — Public API |
| 26 | + |
| 27 | +- [ ] Exports: `buildIndex({ mode })`, `openDatabase()`, `query(sql)` |
| 28 | +- [ ] CLI: `codemap`, `codemap query`, `codemap --full`, `codemap --files` |
| 29 | + |
| 30 | +### Phase D — Language adapters |
| 31 | + |
| 32 | +Stable internal interface so new languages do not fork core: |
| 33 | + |
| 34 | +```text |
| 35 | +LanguageAdapter |
| 36 | + id: string |
| 37 | + extensions: string[] |
| 38 | + parseFile(path, content, ctx): ParsedFileFragment |
| 39 | +``` |
| 40 | + |
| 41 | +- [ ] **Built-in:** TypeScript/JavaScript (oxc), CSS (lightningcss), text/markers |
| 42 | +- [ ] **Optional packages:** e.g. `@stainless-code/codemap-adapter-rust` (Tree-sitter, peers on core) |
| 43 | + |
| 44 | +### Phase E — Consumers |
| 45 | + |
| 46 | +- [ ] Downstream apps use `bunx @stainless-code/codemap` or a workspace dependency |
| 47 | +- [ ] Agent-facing docs: when to **query Codemap** vs **grep / read files** |
| 48 | + |
| 49 | +## Multi-language strategy |
| 50 | + |
| 51 | +| Layer | Role | |
| 52 | +| ----- | ---- | |
| 53 | +| **Core** | Schema, incremental indexing, git invalidation, `dependencies`, CLI, `query` | |
| 54 | +| **Built-in adapters** | Shipped in `@stainless-code/codemap` | |
| 55 | +| **Community adapters** | Separate packages; **peerDependency** on `codemap` semver range | |
| 56 | + |
| 57 | +## Non-goals (v1) |
| 58 | + |
| 59 | +- Full-text search across all file bodies (use ripgrep / IDE) |
| 60 | +- Replacing LSP or language servers |
| 61 | +- Guaranteed Node.js runtime (v1 may stay Bun-only) |
| 62 | + |
| 63 | +## Backlog |
| 64 | + |
| 65 | +- [ ] Optional FTS5 for opt-in full-text |
| 66 | +- [ ] MCP server wrapping `query` |
| 67 | +- [ ] Watch mode for dev |
| 68 | +- [ ] Pluggable route extractors (e.g. Next.js, Remix) alongside TanStack-style routes |
0 commit comments