Skip to content
Agent Memory
Command

/prd-map

Build a codebase map so PRDs are written with repo context, not blind

BOOST
From plugin
kipi-system
12823 skills5 agents23 commands5 MCP
Install
> /plugin marketplace add assafkip/kipi-system

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/prd-map

Context preview

What this command does when you run it.

Build a codebase map so PRDs are written with repo context, not blind

Command definition

prd-map.md
description: Build a codebase map so PRDs are written with repo context, not blind
allowed-tools: Bash
argument-hint: "[--force]"

Scan the current repo and write a structured codebase map to `.prd-os/codebase-map.json` (canonical) plus `.prd-os/codebase-map.md` (human-readable sibling). The map records languages, package manifests, entry points, top-level directory structure, and lint/test config. It is facts-only — no pattern distillation, no opinions.

Why this exists:

  • `/prd-start` produces PRDs. Without a codebase map, the author relies on

memory about what already exists in the repo.

  • Codex review in `/prd-review` can cite the map when checking scope.
  • The map is versioned (`schema_version: 1`) and carries `built_at` +

`git_sha` so `/prd-map status` can report staleness.

Security: dotenv files (`.env`, `.env.*`) have their names recorded but contents are never read. `Reports/`, `node_modules/`, `.venv/`, `__pycache__/`, and similar are skipped entirely.

Run:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/prd_map_runner.py" build ${1:-}

If the map already exists, the runner exits non-zero. Pass `--force` to rebuild:

/prd-map --force

To check whether the current map is stale without rebuilding:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/prd_map_runner.py" status

Default staleness thresholds: 30 days since last build, 50 commits ahead of `git_sha` at build. Override with `--max-age-days` or `--max-commits-ahead`.

Do not auto-run this inside other commands. The map is a deliberate, author-triggered artifact so PRD work stays grounded in a known snapshot rather than an ever-shifting scan.

Read more
Ships withkipi-system

Give your AI the right knowledge, at the moment it needs it. Kipi turns the scattered knowledge around your work into context that follows you across AI sessions: decisions, conversations, projects, people, commitments, lessons, documents, history.

Get the whole plugin

Other commands on kipi-system.