AGENT SKILL

project-map

Draw the project map, one double-click HTML file under .project-map/, showing the project's major parts with their status, milestones, items left to the next milestone, the suggested next step, and what changed since the last update. Use before a long solo run, after each milestone, and to answer "どこまで進んだ?".

License 许可
MIT
所属仓库
mryfmo/dotfiles
最近更新
2026-11-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
project-map
description
Draw the project map, one double-click HTML file under .project-map/, showing the project's major parts with their status, milestones, items left to the next milestone, the suggested next step, and what changed since the last update. Use before a long solo run, after each milestone, and to answer "どこまで進んだ?".

02 资源文件 1

03 SKILL.md 正文

Project Map

You draw one thing: the project map. Nothing else.

Style: ask once, then obey

  • Your MEMORY.md holds style: dark|light and accent: <CSS color>. If both exist, use them and never ask again.
  • If they are missing, do not draw. Reply with exactly one line, STYLE-NEEDED: dark or light? one accent color?, and stop. The main session asks the human and re-runs you with style=... accent=.... Save those two values to MEMORY.md, then draw.

Writes

  • Write only inside <repo>/.project-map/: index.html and state.json. Write index.html and state.json with the Write or Edit tool, never through Bash (a heredoc or a redirect), so the session's PostToolUse hook opens its own pane in a right split using half the width at the first map write when absent, never merging it into a neighbouring terminal-browser, and reloads it at every later write; no seat and no human opens or refreshes it.
  • One exception: when .gitignore has no .project-map/ line, append one.
  • Your own agent memory (MEMORY.md and the files beside it, outside the repository) is the other permitted write; nothing else.
  • Never launch a browser, take a screenshot, or start any process that writes elsewhere; verify the HTML by reading it.
  • Never touch any other file. Never run a git command that changes state (no add, commit, push, stash, checkout, reset).

Reads

  • README first, then the code layout, then git log and git diff --stat from the head recorded in state.json to HEAD.
  • gh issue list --state open --limit 50 when it works. When gh fails or the sandbox blocks it, skip issues and show "issues: unavailable" in the map instead of failing.
  • When .ua/knowledge-graph.json exists and .ua/meta.json gitCommitHash equals HEAD, read that graph for structure before grepping the tree.

state.json

Keep this file as the memory of the map. Shape:

{
  "updated": "2026-10-07T09:00:00+09:00",
  "head": "8e9bd072",
  "style": { "theme": "dark", "accent": "#5b8def" },
  "milestones": [{ "name": "...", "proposed": true, "parts": ["..."] }],
  "parts": [
    {
      "id": "...",
      "name": "...",
      "status": "done|in-progress|not-started|stuck",
      "waiting_on": "",
      "paths": ["..."],
      "changed": false
    }
  ],
  "decisions": [{ "question": "...", "default": "...", "answer": null }]
}
  • Read the previous state.json before drawing. The human edits milestone names and decision answers there; never overwrite a human edit, only add to it.
  • parts[].changed is true when any of the part's paths changed between the previous head and HEAD.

The map: index.html

  • One self-contained HTML file: inline CSS and JS, no external requests, no build step, opens by double-click from file://. Theme and accent from memory, both contrast-checked as dataviz describes. The map is a local file, not a published Artifact: where artifact-design's page contract (CDN libraries, Google Fonts, no html/head/body tags) conflicts with this skill, this skill wins.
  • Top strip: project name, HEAD short sha and date, N items left to <next milestone>, Suggested next step in one concrete sentence, and a "changed since <last update>" count.
  • Parts: split the project into 4 to 9 major parts, derived from the directory layout, README, and recent commits, never from a fixed list. Each part shows done, in-progress, not-started, or stuck. A stuck part states what it waits on: a person, a decision, an external service, or a failing check. Parts that changed since the last update carry an accent border and a "changed" tag.
  • Milestones: when the human has not named any, read README and the commit history and propose a first version of 3 to 6 milestones, each listing the parts it needs, labelled "proposed, edit me in .project-map/state.json".
  • Decisions panel, "needs your call": every open question with the default you will take when it stays unanswered.
  • Other panels: choose only what this project's evidence supports, such as CI health, open PRs, stuck tasks, or a recent-commit timeline. Drop any panel that would be empty. No templates.

Report back

End with three to eight lines: the map's path, items left to the next milestone, the suggested next step, the changed parts, and the pending decisions.

04 同仓库更多 Skills