codemap AGENTS.md

codemap AGENTS.md is an instructions file for Codex, OpenCode from abdul-hamid-achik/codemap. It costs 10,971 tokens per session, scanned A, original, MIT.

A project guide for coding agents and developers working on codemap, a local tool that maps how code components connect and helps search code by meaning.

In plain words
What is it for?
Use it to orient agents in the repository, find the right documentation, follow project commands, and understand how codemap is organized.
Why use it?
It keeps project structure, documentation rules, design notes, and development commands in one agreed place, so contributors know how to work consistently.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/abdul-hamid-achik/codemap/agents-md
Clone the repo
git clone --depth 1 https://github.com/abdul-hamid-achik/codemap

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codemap AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/abdul-hamid-achik/codemap/agents-md.svg)](https://agentmods.dev/instructions/abdul-hamid-achik/codemap/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/abdul-hamid-achik/codemap/agents-md"><img src="https://agentmods.dev/badge/instructions/abdul-hamid-achik/codemap/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,971 This file is loaded in full into every session.
When invoked 10,971 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.10971 $0.10971
Opus 5 $0.05486 $0.05486
Sonnet 5 $0.02194 $0.02194
Haiku 4.5 $0.01097 $0.01097

Measured 4d ago against content hash aee391d73bdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codemap AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 515 lines

How it starts

The opening of the file, as written. The whole thing — 515 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Instructions for AI agents (and humans) working on the codemap codebase. This is the canonical source-of-truth doc; CLAUDE.md defers to it. README.md is the public-facing intro; product usage lives in docs/, including docs/configuration.md and the public agent guide at docs/agents.md. The design rationale (architecture, why-it-is-what-it-is) lives in the Obsidian vault at ~/notes/projects/codemap/design-rationale.md. Live work is tracked in the vault's BACKLOG.md (~/notes/projects/codemap/BACKLOG.md) — not in the repo.

Project Overview

codemap is local-first code intelligence: it combines a structural code graph (LSP + stdlib parsers; tree-sitter remains planned and is not shipped) with semantic retrieval (local veclite plus an optional one-hop vecgrep fallback, or vecgrep as the explicit owner) and exposes both as a unified query layer for agents and people. It answers questions a grep or a single LSP call cannot — "who calls this and what tests cover it", "what's the blast radius of changing this type across all my projects", "find auth-like code, then show me what calls it."

Two surfaces over one structural store (semantic retrieval may be delegated to vecgrep):

  • CLI — human commands and --json machine output for agents (Cobra).
  • MCP servercodemap serve (stdio), codemap_* tools for agents.

Product docs for humans start at docs/quick-start.md; agent workflows at docs/agents.md and docs/mcp.md. The former Studio TUI is not shipped — use CLI + MCP instead (see docs/studio.md).

Key features:

  • Structural graph — nodes (files, functions, types, methods, tests) + calls/defines edges in pure-Go SQLite (Go, Ruby, and Lua call edges are name-based by default, Go exact via go/types with --precise; base TS/JS gets name-based JSX component-usage call edges, import edges, and Next.js framework-wiring references via tsscan, while plain TS/JS/Python function-call edges come only from --precise via callHierarchy; Vue SFC script blocks currently produce symbols + defines + import edges but no call graph; Go callback/handler uses and TS/JS framework wiring are persisted as references; Go imports are package-scoped evidence, TS/JS/Vue/Ruby/Lua imports resolve file→file; implements/overrides remain reserved for planned backends).
  • Local semantic search — under the local/fallback backend with embeddings enabled, node source text is embedded through the configured Ollama-compatible endpoint (http://localhost:11434 and nomic-embed-text, 768-dim, by default) into veclite; vector + BM25 hybrid (RRF) search. A remote endpoint is explicit opt-in and receives the source text sent for embedding.
  • Hybrid queriescodemap_context (one-call source + wiring + impact), codemap_impact (blast radius + test coverage), codemap_review (diff → impact + tests), and confidence-aware file dependency analysis.
  • Cross-project — the graph spans all registered projects.
  • Incremental — hash-based reindex; embedding-profile guard forces rebuild on provider/model/dimensions/distance change.
  • Offline structural queries — the stored graph remains queryable without LSP servers running; one-off precise callers/callees may launch the appropriate server, and semantic retrieval depends on whichever local or delegated backend is configured.

Read the full file on GitHub · 515 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 515 lines · 10,971 tokens per session scan A aee391d73bdd

Subscribe to this mod's changes

codemap AGENTS.md is an instructions file published in the GitHub repository abdul-hamid-achik/codemap (2 stars, last pushed 6d ago), licensed MIT. It adds 10,971 tokens to every session, about $0.0549 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens