AGENT SKILL

diagram-change

Draw the before/after of a diff at module level (touched modules, new dependency edges, removed edges) from the repo's import-graph adapter run at both refs. Use when reviewing or explaining a branch or PR, or to see what a change does to the structure.

License 许可
MIT
最近更新
2026-11-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
diagram-change
metadata
{ "layer": "L3" }
description
Draw the before/after of a diff at module level (touched modules, new dependency edges, removed edges) from the repo's import-graph adapter run at both refs. Use when reviewing or explaining a branch or PR, or to see what a change does to the structure.

03 SKILL.md 正文

Diagram change

Show what a diff does to the structure: which modules it touches and which dependencies it adds or removes. Both sides come from the import-graph tool, so the picture is generated, not drawn.

1. Range

  • Default: the current branch against its base. Base is git merge-base HEAD <default branch>, with the default branch from ven-profile get repo.default_branch. Head is HEAD. Include uncommitted work only when asked; the head sha then carries -dirty.
  • An empty range: say so and stop. Never diagram something nearby instead.
  • Touched files: git diff --name-only <base>...HEAD. Group them into modules the way diagram-deps does.

2. Generate both sides

  1. Head: ven-profile adapter graph.imports in the working tree.
  2. Base: the same command at the base sha, as "At another ref" in the badge protocol of diagram-deps describes.
  3. Collapse both outputs to module edges and compare: new = head minus base, removed = base minus head, kept = in both.
  4. Keep the touched modules plus every module at the far end of a new or removed edge. Kept edges between those modules stay as plain context. Drop the rest.
  5. If graph.boundaries is available, run it at head. A new edge that breaks a boundary is the headline.

3. Draw

flowchart LR
  api:::touched ==>|new| search:::added
  api -.->|removed| legacy:::removed
  api --> core
  classDef touched stroke:#1565c0,stroke-width:2px
  classDef added stroke:#2e7d32,stroke-width:2px
  classDef removed stroke:#c62828,stroke-dasharray:4 3
  • New edges are thick (==>) and labelled new. Removed edges are dashed (-.->) and labelled removed. Kept edges are plain.
  • Touched modules are blue. Modules that appear are green, modules that disappear are red and dashed.
  • Caption: GENERATED ven-profile adapter graph.imports @ <base sha>..<head sha>.

4. Report

Render it per Rendering in the badge protocol of diagram-deps. Then give three short lists:

  • New edges, each with one import line from the diff that adds it (path:line at head).
  • Removed edges, each with one import line the diff deletes (<base sha>:path:line).
  • Touched modules with their added and removed line counts (git diff --stat <base>...HEAD).

Without the adapter

Read the import lines the diff adds and removes (git diff <base>...HEAD). Each new or removed module edge cites one of those lines, so the result is HYBRID, checked with citation-check per the no-adapter rule of the badge protocol. Kept edges are left out, since the diff can't show them.

04 同仓库更多 Skills

Ventorius
Ventorius/ven-stack

yeet

Take every local change green through the repo's own checks, slice it into conventional commits, push, and with --pr open a pull request on the code host. Use only when the user explicitly asks to yeet, or to commit and push everything; never on your own initiative.

★ 0
Ventorius
Ventorius/ven-stack

write-docs

Write or update documentation from the code: gather facts, pick the shape for the reader, write it plain, and prove every command and path in it. Use when asked to document a repo, module or feature, or to bring stale docs up to date.

★ 0
Ventorius
Ventorius/ven-stack

why

Find why code is shaped the way it is (design rationale, trade-offs, regressions, odd thresholds) from history, tickets, docs and chat, citing every claim and stating its confidence. Use for 'why does X work this way', 'why did we pick Y', or before changing code whose purpose is unclear.

★ 0
Ventorius
Ventorius/ven-stack

verify

Prove a change works with the check that matches its type, do the read-back, and log the pass against the exact tree. Use when a change is ready to call done, before review, commit or stopping, and whenever ven-decisions end refuses an unverified tree.

★ 0
Ventorius
Ventorius/ven-stack

unslop

Cut AI writing tells (filler, model vocabulary, metaphor nouns, hedging, formatting tics) from text while keeping every fact. Use when editing or checking any prose before it ships: docs, PR bodies, reports, skill text.

★ 0
Ventorius
Ventorius/ven-stack

type-discipline

Apply when designing types or data shapes, reviewing a signature, or handling outside data, in any language. Make wrong states fail early: in the compiler for typed languages, in validated runtime contracts for untyped ones.

★ 0