| name | map |
| description | Generate a repo dossier as one fixed-template black-and-white HTML page in the anu atlas (~/.anu/atlas/<repo>): summary, component tree, dependency graph, choices made, divergences, open questions. Fans out reader agents via the Workflow tool; archives each run for diffing. Invoked by /map. Use when the user runs /map or asks to map, explain, or explore this repo as a dossier. |
/map: repo dossier
Produce a dossier of the current repository and render it as one HTML page in
the anu atlas. One fixed template for every repo, always the same visual
grammar: summary, component tree, choices made, points of divergence, open
questions. The page is the artifact; keep the chat output minimal.
Steps
-
Resolve repo facts (one bash call):
ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
NAME=$(basename "$ROOT")
BRANCH=$(git -C "$ROOT" branch --show-current 2>/dev/null || echo "")
HEAD=$(git -C "$ROOT" log -1 --format='%h %s' 2>/dev/null || echo "")
STAMP=$(date '+%Y-%m-%d %H:%M')
TS=$(date +%Y%m%d-%H%M%S)
-
Run the workflow. Call the Workflow tool with:
scriptPath: ~/.local/share/anu/plugins/map/skills/map/workflow.js (expand ~ to the real home dir)
args: {"root": ROOT, "name": NAME, "branch": BRANCH, "head": HEAD, "generatedAt": STAMP}
Wait for it to complete. It returns the dossier as a JSON object.
-
Persist and render (bash + Write):
OUT="$HOME/.anu/atlas/$NAME"
mkdir -p "$OUT/history"
[ -f "$OUT/map.json" ] && mv "$OUT/map.json" "$OUT/history/$TS.json"
Write the returned dossier JSON to $OUT/map.json, then:
python3 ~/.local/share/anu/plugins/map/skills/map/render.py "$OUT/map.json" "$OUT/index.html"
open "$OUT/index.html"
-
Report: one short paragraph with the page path, the component count, and
the two or three most interesting divergences or open questions. Do not
restate the dossier; the page is where it lives.
Rules
- Never edit
template.html or render.py per run. The template is fixed by
design; all per-repo variation lives in map.json.
- If the directory is not a git repo, map it anyway. The workflow returns an
empty history section and the page renders without the divergence timeline.
- Old runs accumulate in
$OUT/history/. Never delete them; they are the
raw material for diffing dossiers across time.