agentleFS
hazarsozerhazarsozer/ren-os/skills/code-map/SKILL.md

code-map

Skill2 starsChanged 2 months agoMITView on GitHub

Use when the friend wants a structural map of a codebase (call graphs, symbol index, cross-file references) — beyond what wake-up/recall already surface from the wiki. Triggers on /ren:code-map [build|status]. A thin wrapper over Graphify (pinned 0.9.x), never a second hand-rolled engine; gracefully absent if Graphify isn't installed.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    status: call importlib.import_module("skills.code-map.lib").status(repo_root).

    line 64
  2. Very specific:

    build: call importlib.import_module("skills.code-map.lib").build(repo_root, session).

    line 65
  3. Very specific:

    Graceful absence, no second engine: Not installed → status() says so plainly and build()/consume() raise CodeMapUnavailable with an install …

    line 74

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

code-map

A structural map of a codebase — symbols, call graphs, cross-file references — for sessions that need more than the wiki's own knowledge. This skill is a thin wrapper over Graphify (pinned 0.9.x), not a second code-intelligence engine. Per the reuse doctrine (spec §3.2 v2.1 D-4), the framework's own hand-rolled lib/codemap/ engine was deleted in favor of this wrapper.

When to use this skill

  • Friend invokes /ren:code-map status — report whether Graphify is installed, its version, whether that version is within the pinned range, and whether the derived graph exists and is fresh.
  • Friend invokes /ren:code-map build — (re)generate the derived graph for the active repo.
  • Another capability (not the friend directly) calls importlib.import_module("skills.code-map.lib").consume() to load the graph mid-session.

When NOT to use this skill

  • The friend wants wiki knowledge, not code structure → /ren:recall.
  • Graphify is not installed and the friend hasn't asked to install it → report absence plainly via status(); do not suggest a fallback engine. There isn't one.

Behavior

  1. status: call importlib.import_module("skills.code-map.lib").status(repo_root). Never raises — reports installed=False plainly when Graphify is absent, with a pointer to install it (uv tool install graphifyy — double y, not a typo; see doctrine/companions.md).
  2. build: call importlib.import_module("skills.code-map.lib").build(repo_root, session). Runs Graphify headlessly (graphify <repo_root> --output <state_dir()/derived/codemap>), records a codemap_tokens "build" metric (real byte size, not an estimate), and returns the graph.json path. Raises CodeMapUnavailable (with the install pointer) if the binary is missing, or if Graphify exits nonzero.
  3. consume (internal use by other capabilities, not a direct user command): loads the graph and records BOTH tokens_loaded (the graph itself) and tokens_baseline (the raw source it summarizes) via lib.instrument.estimator — this is the chairman-ruling instrumentation: Graphify's token-savings claim must show up in these two numbers, not just be asserted. Raises CodeMapUnavailable if the graph is absent or stale (a source file changed since the last build) — it never rebuilds silently; the caller decides.

Boundaries (load-bearing)

  • Derived cache, never memory. The graph lives at state_dir()/derived/codemap/graph.json — entirely OUTSIDE the wiki page tree, the write-queue (Task 2.1), integrity checks (Task 2.3), and the backup-critical set (Phase 9). It is regenerable at any time from source; losing it loses nothing durable.
  • The pin (0.9.x) and why. Graphify's API has churned across major versions; GRAPHIFY_PIN = "0.9" is the version prefix this wrapper is built against. status()'s pinned_ok flags drift for doctor (Phase 7) to surface — a version outside the pin is a warning, not a hard failure, but it's not silently ignored either.
  • Code-mode only, never Graphify's LLM media-extraction paths. This wrapper only ever invokes Graphify's deterministic tree-sitter parsing. Graphify's own LLM-backed media-extraction features are never invoked from here, and stay off by default per the §3.6 data-flow statement.
  • Graphify's wiki/Obsidian export feature is FORBIDDEN here. The wiki's SSOT stays queue-governed (Task 2.1) — nothing in this wrapper, ever, writes a wiki page. build() asserts its output path is under state_dir() in code, not just in this doc.
  • Graceful absence, no second engine. Not installed → status() says so plainly and build()/consume() raise CodeMapUnavailable with an install pointer. There is no fallback hand-rolled engine to fall back to; that engine was deliberately deleted.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.