بنقرة واحدة
cartography
Repository understanding and hierarchical codemap generation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Repository understanding and hierarchical codemap generation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Mandatory thoth-mem workflow contract for orchestrator/subagent memory ownership, parent session_id/project dispatch, prompt-save prohibitions, project-scoped read tools, session-summary ownership, and durable observation rules. Use whenever work mentions thoth-mem, persistent memory, orchestrator/subagents, session_id, project, saved prompts, session summaries, or project-level memory context.
Execute SDD task lists with real-time progress tracking, sub-agent dispatch, and verification checkpoints.
Review SDD task plans for execution blockers and return [OKAY] or [REJECT].
Generate phased `tasks.md` checklists from specs and design.
Mandatory step-0 requirements discovery for non-trivial work before any implementation or SDD routing decisions.
Execute assigned SDD tasks and return structured implementation results.
| name | cartography |
| description | Repository understanding and hierarchical codemap generation |
You help users understand and map repositories by creating hierarchical codemaps.
First, check if .lite/cartography.json exists in the repo root.
If it exists: Skip to Step 3 (Detect Changes) - no need to re-initialize.
If it doesn't exist: Continue to Step 2 (Initialize).
src/**/*.ts, package.json, etc.**/*.test.ts, **/*.spec.ts, tests/**, __tests__/**docs/**, *.md (except root README.md if needed), LICENSEnode_modules/**, dist/**, build/**, *.min.js.gitignore automaticallypython3 ~/.config/opencode/skills/cartography/scripts/cartographer.py init \
--root ./ \
--include "src/**/*.ts" \
--exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**"
This creates:
.lite/cartography.json - File and folder hashes for change detectioncodemap.md files in all relevant subdirectoriescodemap.md based on explorer findings.python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py changes \
--root ./
Review the output - It shows:
Only update affected codemaps — Spawn one explorer per affected folder to gather updated findings, then dispatch quick to write the updated codemap.md.
Run update to save new state:
python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py update \
--root ./
Once all specific directories are mapped, the Orchestrator must dispatch quick to create or update the root codemap.md. This file serves as the Master Entry Point for any agent or human entering the repository.
package.json, index.ts, plugin.json) and the project's overall purpose.codemap.md, extract its Responsibility summary and include it in a table or list in the root map.OpenCode auto-loads AGENTS.md into agent context on every session. To ensure agents automatically discover and use the codemap, dispatch quick to update (or create) AGENTS.md at the repo root:
AGENTS.md already exists and already contains a ## Repository Map section, skip this step — the reference is already set up.AGENTS.md exists but has no ## Repository Map section, append the section below.AGENTS.md doesn't exist, create it with the section below.## Repository Map
A full codemap is available at `codemap.md` in the project root.
Before working on any task, read `codemap.md` to understand:
- Project architecture and entry points
- Directory responsibilities and design patterns
- Data flow and integration points between modules
For deep work on a specific folder, also read that folder's `codemap.md`.
This is idempotent — repeated cartography runs will detect the existing section and skip. No duplication.
Explorer agents gather the technical findings; quick agents write the codemap.md files. Use precise technical terminology to document the implementation:
Example codemap:
# src/agents/
## Responsibility
Defines agent personalities and manages their configuration lifecycle.
## Design
Each agent is a prompt + permission set. Config system uses:
- Default prompts (orchestrator.ts, explorer.ts, etc.)
- User overrides from ~/.config/opencode/oh-my-opencode-lite.json
- Permission wildcards for skill/MCP access control
## Flow
1. Plugin loads → calls getAgentConfigs()
2. Reads user config preset
3. Merges defaults with overrides
4. Applies permission rules (wildcard expansion)
5. Returns agent configs to OpenCode
## Integration
- Consumed by: Main plugin (src/index.ts)
- Depends on: Config loader, skills registry
Example Root Codemap (Atlas):
# Repository Atlas: oh-my-opencode-lite
## Project Responsibility
A high-performance, low-latency agent orchestration plugin for OpenCode, focusing on specialized sub-agent delegation and native task orchestration.
## System Entry Points
- `src/index.ts`: Plugin initialization and OpenCode integration.
- `package.json`: Dependency manifest and build scripts.
- `oh-my-opencode-lite.json`: User configuration schema.
## Directory Map (Aggregated)
| Directory | Responsibility Summary | Detailed Map |
|-----------|------------------------|--------------|
| `src/agents/` | Defines agent personalities (Orchestrator, Explorer) and manages model routing. | [View Map](src/agents/codemap.md) |
| `src/features/` | Core logic for tmux integration, background task spawning, and session state. | [View Map](src/features/codemap.md) |
| `src/config/` | Implements the configuration loading pipeline and environment variable injection. | [View Map](src/config/codemap.md) |