[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-graph-evolution":3,"mdc-gpn8ub-key":35,"related-repo-trail-of-bits-graph-evolution":2168,"related-org-trail-of-bits-graph-evolution":2265},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":30,"sourceUrl":33,"mdContent":34},"graph-evolution","compare code graphs for security changes","Compares Trailmark code graphs at two source code snapshots (git commits, tags, or directories) to surface security-relevant structural changes. Detects new attack paths, complexity shifts, blast radius growth, taint propagation changes, and privilege boundary modifications that text diffs miss. Use when comparing code between commits or tags, analyzing structural evolution, detecting attack surface growth, reviewing what changed between audit snapshots, or finding security-relevant changes that text diffs miss.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"Git","git",{"name":21,"slug":22,"type":16},"Code Analysis","code-analysis",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-08-01T05:44:50.961296",null,541,[29],"agent-skills",{"repoUrl":24,"stars":23,"forks":27,"topics":31,"description":32},[29],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Ftrailmark\u002Fskills\u002Fgraph-evolution","---\nname: graph-evolution\ndescription: >\n  Compares Trailmark code graphs at two source code snapshots (git commits,\n  tags, or directories) to surface security-relevant structural changes.\n  Detects new attack paths, complexity shifts, blast radius growth, taint\n  propagation changes, and privilege boundary modifications that text diffs\n  miss. Use when comparing code between commits or tags, analyzing structural\n  evolution, detecting attack surface growth, reviewing what changed between\n  audit snapshots, or finding security-relevant changes that text diffs miss.\n---\n\n# Graph Evolution\n\nBuilds Trailmark code graphs at two source snapshots and computes a\nstructural diff. Surfaces security-relevant changes that text-level\ndiffs miss: new attack paths, complexity shifts, blast radius growth,\ntaint propagation changes, and privilege boundary modifications.\n\n## When to Use\n\n- Comparing two git refs to understand what structurally changed\n- Auditing a range of commits for security-relevant evolution\n- Detecting new attack paths created by code changes\n- Finding functions whose blast radius or complexity grew silently\n- Identifying taint propagation changes across refactors\n- Pre-release structural comparison (tag-to-tag or branch-to-branch)\n\n## When NOT to Use\n\n- Line-level code review (use `differential-review` for text-diff analysis)\n- Single-snapshot analysis (use the `trailmark` skill directly)\n- Diagram generation from a single snapshot (use the `diagramming-code` skill)\n- Mutation testing triage (use the `genotoxic` skill)\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"We just need the structural diff, skip pre-analysis\" | Without pre-analysis, you miss taint changes, blast radius growth, and privilege boundary shifts | Run `engine.preanalysis()` on both snapshots |\n| \"Text diff covers what changed\" | Text diffs miss new attack paths, transitive complexity shifts, and subgraph membership changes | Use structural diff to complement text diff |\n| \"Only added nodes matter\" | Removed security functions and shifted privilege boundaries are equally dangerous | Review removals and modifications, not just additions |\n| \"Low-severity structural changes can be ignored\" | INFO-level changes (dead code removal) can mask removed security checks | Classify every change, review removals for replaced functionality |\n| \"One snapshot's graph is enough for comparison\" | Single-snapshot analysis can't detect evolution — you need both before and after | Always build and export both graphs |\n| \"Tool isn't installed, I'll compare manually\" | Manual comparison misses what graph analysis catches | Install trailmark first |\n\n---\n\n## Prerequisites\n\n**trailmark** must be installed. If `uv run trailmark` fails, run:\n\n```bash\nuv pip install trailmark\n```\n\n**DO NOT** fall back to \"manual comparison\" or reading source files as a\nsubstitute for running trailmark. The tool must be installed and used\nprogrammatically. If installation fails, report the error.\n\n---\n\n## Quick Start\n\n```bash\n# Compare two git refs (e.g., tags, branches, commits)\n# 1. Build graphs at each snapshot\n# 2. Run pre-analysis on both\n# 3. Compute structural diff\n# 4. Generate report\n\n# Step-by-step: see Workflow below\n```\n\n---\n\n## Decision Tree\n\n```\n├─ Need to understand what each metric means?\n│  └─ Read: references\u002Fevolution-metrics.md\n│\n├─ Need the report output format?\n│  └─ Read: references\u002Freport-format.md\n│\n├─ Already have two graph JSON exports?\n│  └─ Jump to Phase 3 (run native diff + graph_diff.py)\n│\n└─ Starting from two git refs?\n   └─ Start at Phase 1\n```\n\n---\n\n## Workflow\n\n```\nGraph Evolution Progress:\n- [ ] Phase 1: Create snapshots (git worktrees)\n- [ ] Phase 2: Build graphs + pre-analysis on both snapshots\n- [ ] Phase 3: Compute structural diff\n- [ ] Phase 4: Interpret diff and generate report\n- [ ] Phase 5: Clean up worktrees\n```\n\n### Phase 1: Create Snapshots\n\nUse git worktrees to get clean copies of each ref without disturbing\nthe working tree.\n\n```bash\n# Create temp directories for worktrees\nBEFORE_DIR=$(mktemp -d)\nAFTER_DIR=$(mktemp -d)\n\n# Create worktrees (run from repo root)\ngit worktree add \"$BEFORE_DIR\" {before_ref}\ngit worktree add \"$AFTER_DIR\" {after_ref}\n```\n\nIf comparing two directories instead of git refs, skip this phase and\nuse the directory paths directly in Phase 2.\n\n### Phase 2: Build Graphs and Run Pre-Analysis\n\nBuild Trailmark graphs for both snapshots and run pre-analysis on each.\nPre-analysis computes blast radius, taint propagation, privilege\nboundaries, and entrypoint enumeration.\n\n```python\nfrom trailmark.query.api import QueryEngine\n\ndef build_and_export(target_dir, output_path, language=\"auto\"):\n    \"\"\"Build graph, run pre-analysis, export JSON.\"\"\"\n    engine = QueryEngine.from_directory(target_dir, language=language)\n    engine.preanalysis()\n    json_str = engine.to_json()\n    with open(output_path, \"w\") as f:\n        f.write(json_str)\n    return engine.summary()\n\nimport tempfile, os\nwork_dir = tempfile.mkdtemp(prefix=\"trailmark_evolution_\")\nbefore_json = os.path.join(work_dir, \"before_graph.json\")\nafter_json = os.path.join(work_dir, \"after_graph.json\")\n\nbefore_summary = build_and_export(\n    \"{before_dir}\", before_json\n)\nafter_summary = build_and_export(\n    \"{after_dir}\", after_json\n)\n```\n\nVerify both graphs built successfully by checking the summary output.\nIf either fails, rerun with an explicit language or comma-separated list\ninstead of `auto`.\n\n### Phase 3: Compute Structural Diff\n\nRun **both**:\n\n1. Trailmark's native structural diff for nodes, edges, and entrypoints\n2. The plugin's `graph_diff.py` helper for subgraph membership changes\n\nUsing the same `work_dir` from Phase 2:\n\n```bash\ntrailmark diff --json \"{before_dir}\" \"{after_dir}\" > \"{work_dir}\u002Ftrailmark_diff.json\" || \\\n  uv run trailmark diff --json \"{before_dir}\" \"{after_dir}\" > \"{work_dir}\u002Ftrailmark_diff.json\"\n\nuv run {baseDir}\u002Fscripts\u002Fgraph_diff.py \\\n    --before \"{before_json}\" \\\n    --after \"{after_json}\" > \"{work_dir}\u002Fsubgraph_diff.json\"\n```\n\nIf either diff command fails or writes an empty JSON file, stop and report the\nerror instead of continuing to Phase 4.\n\nThe native Trailmark diff contains:\n\n| Key | Contents |\n|-----|----------|\n| `summary_delta` | Changes in node\u002Fedge\u002Fentrypoint counts |\n| `nodes.added` | New functions, classes, methods |\n| `nodes.removed` | Deleted functions, classes, methods |\n| `nodes.modified` | Functions with changed CC, params, line span |\n| `edges.added` | New call\u002Finheritance\u002Fimport relationships |\n| `edges.removed` | Deleted relationships |\n| `entrypoints` | Added, removed, and modified entrypoints |\n\nThe subgraph diff contains:\n\n| Key | Contents |\n|-----|----------|\n| `subgraphs` | Per-subgraph membership changes (tainted, high_blast_radius, etc.) |\n\n### Phase 4: Interpret Diff and Generate Report\n\nRead **both** diff JSON files and generate a security-focused markdown\nreport.\nSee [references\u002Freport-format.md](references\u002Freport-format.md) for\nthe full template.\n\n**Interpretation priorities (highest to lowest):**\n\n1. **New tainted paths** — nodes entering the `tainted` subgraph,\n   especially if they also appear in added edges targeting sensitive\n   functions\n2. **Privilege boundary changes** — new or removed trust transitions\n   from the native entrypoint\u002Fedge diff plus the subgraph diff\n3. **Attack surface growth** — new entrypoints, especially\n   `untrusted_external`, from `trailmark_diff.json`\n4. **Blast radius increases** — nodes entering `high_blast_radius`\n5. **Complexity spikes** — CC increases > 3 on tainted or\n   entrypoint-reachable nodes\n6. **Structural additions** — new nodes and edges (review needed)\n7. **Structural removals** — verify removed security functions were\n   replaced\n\nCross-reference structural changes with `git diff {before_ref}..{after_ref}`\nto add source-level context to findings.\n\n**Severity classification:**\n\n| Severity | Structural Signal |\n|----------|------------------|\n| CRITICAL | New tainted path to sensitive function, removed auth boundary |\n| HIGH | New entrypoint + high blast radius, large CC increase on tainted node |\n| MEDIUM | New trust-boundary-crossing edges, moderate CC increase |\n| LOW | Added nodes without entrypoint reachability |\n| INFO | Dead code removal, complexity reductions |\n\nFor detailed metric definitions, see\n[references\u002Fevolution-metrics.md](references\u002Fevolution-metrics.md).\n\n### Phase 5: Clean Up\n\nRemove git worktrees after the report is written:\n\n```bash\ngit worktree remove \"{before_dir}\"\ngit worktree remove \"{after_dir}\"\n```\n\n---\n\n## Diff Reference\n\n```\ntrailmark diff --json BEFORE AFTER\nuv run {baseDir}\u002Fscripts\u002Fgraph_diff.py [OPTIONS]\n```\n\nUse `trailmark diff` for:\n- Node\u002Fedge changes\n- Added\u002Fremoved\u002Fmodified entrypoints\n- Human-readable structural diff reports\n\nUse `graph_diff.py` for:\n- Subgraph membership changes derived from `engine.preanalysis()`\n- `tainted`, `high_blast_radius`, `privilege_boundary`, and related sets\n\n| Argument | Default | Description |\n|----------|---------|-------------|\n| `--before` | required | Path to the \"before\" graph JSON |\n| `--after` | required | Path to the \"after\" graph JSON |\n| `--indent` | `2` | JSON output indentation |\n\n`graph_diff.py` input format: Trailmark JSON exports from `engine.to_json()`.\n`graph_diff.py` output: JSON structural diff for nodes, edges, and subgraphs.\n\n---\n\n## Quality Checklist\n\nBefore delivering the report:\n\n- [ ] Both graphs built successfully (check summaries)\n- [ ] Pre-analysis ran on both snapshots\n- [ ] Native Trailmark diff computed and non-empty (`trailmark_diff.json`)\n- [ ] Subgraph diff computed and non-empty (`subgraph_diff.json`)\n- [ ] All subgraph changes interpreted (tainted, blast radius, etc.)\n- [ ] Critical findings include evidence (node IDs, edge diffs)\n- [ ] Severity levels assigned to all findings\n- [ ] Source-level context added via git diff cross-reference\n- [ ] Worktrees cleaned up (or temp dirs removed)\n- [ ] Report written to `GRAPH_EVOLUTION_*.md`\n\n---\n\n## Integration\n\n**trailmark skill:**\nPhase 2 uses the trailmark API for graph building and pre-analysis.\nAll trailmark query patterns work on either snapshot's engine.\n\n**differential-review skill:**\nUse graph-evolution for structural analysis, differential-review for\nline-level code review. The two are complementary — graph-evolution\nfinds attack paths that text diffs miss, while differential-review\nprovides git blame context and micro-adversarial analysis.\n\n**trailmark-review-gate skill:**\nUse trailmark-review-gate after graph-evolution when a branch, pull request,\nfix commit, or release diff needs a PASS\u002FWARN\u002FFAIL\u002FUNKNOWN structural review\npacket. The gate applies deterministic review rules to graph-evolution output;\nit does not replace human review.\n\n**genotoxic skill:**\nIf graph-evolution reveals new high-CC tainted nodes, feed them to\ngenotoxic for mutation testing triage.\n\n**diagramming-code skill:**\nGenerate before\u002Fafter diagrams to visualize structural changes.\nUse `call-graph` or `data-flow` diagrams focused on changed nodes.\n\n---\n\n## Supporting Documentation\n\n- **[references\u002Fevolution-metrics.md](references\u002Fevolution-metrics.md)** —\n  What each structural metric means and why it matters for security\n- **[references\u002Freport-format.md](references\u002Freport-format.md)** —\n  Report template, severity classification, and example findings\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,48,54,61,96,102,157,163,312,316,322,340,379,389,392,398,469,472,478,488,491,497,506,513,518,672,677,683,688,883,896,902,913,935,948,1183,1188,1193,1334,1339,1376,1382,1401,1409,1510,1523,1531,1618,1629,1635,1640,1702,1705,1711,1720,1733,1751,1761,1798,1894,1919,1922,1928,1933,2051,2054,2060,2070,2080,2090,2100,2126,2129,2135,2162],{"type":41,"tag":42,"props":43,"children":44},"element","h1",{"id":4},[45],{"type":46,"value":47},"text","Graph Evolution",{"type":41,"tag":49,"props":50,"children":51},"p",{},[52],{"type":46,"value":53},"Builds Trailmark code graphs at two source snapshots and computes a\nstructural diff. Surfaces security-relevant changes that text-level\ndiffs miss: new attack paths, complexity shifts, blast radius growth,\ntaint propagation changes, and privilege boundary modifications.",{"type":41,"tag":55,"props":56,"children":58},"h2",{"id":57},"when-to-use",[59],{"type":46,"value":60},"When to Use",{"type":41,"tag":62,"props":63,"children":64},"ul",{},[65,71,76,81,86,91],{"type":41,"tag":66,"props":67,"children":68},"li",{},[69],{"type":46,"value":70},"Comparing two git refs to understand what structurally changed",{"type":41,"tag":66,"props":72,"children":73},{},[74],{"type":46,"value":75},"Auditing a range of commits for security-relevant evolution",{"type":41,"tag":66,"props":77,"children":78},{},[79],{"type":46,"value":80},"Detecting new attack paths created by code changes",{"type":41,"tag":66,"props":82,"children":83},{},[84],{"type":46,"value":85},"Finding functions whose blast radius or complexity grew silently",{"type":41,"tag":66,"props":87,"children":88},{},[89],{"type":46,"value":90},"Identifying taint propagation changes across refactors",{"type":41,"tag":66,"props":92,"children":93},{},[94],{"type":46,"value":95},"Pre-release structural comparison (tag-to-tag or branch-to-branch)",{"type":41,"tag":55,"props":97,"children":99},{"id":98},"when-not-to-use",[100],{"type":46,"value":101},"When NOT to Use",{"type":41,"tag":62,"props":103,"children":104},{},[105,119,132,145],{"type":41,"tag":66,"props":106,"children":107},{},[108,110,117],{"type":46,"value":109},"Line-level code review (use ",{"type":41,"tag":111,"props":112,"children":114},"code",{"className":113},[],[115],{"type":46,"value":116},"differential-review",{"type":46,"value":118}," for text-diff analysis)",{"type":41,"tag":66,"props":120,"children":121},{},[122,124,130],{"type":46,"value":123},"Single-snapshot analysis (use the ",{"type":41,"tag":111,"props":125,"children":127},{"className":126},[],[128],{"type":46,"value":129},"trailmark",{"type":46,"value":131}," skill directly)",{"type":41,"tag":66,"props":133,"children":134},{},[135,137,143],{"type":46,"value":136},"Diagram generation from a single snapshot (use the ",{"type":41,"tag":111,"props":138,"children":140},{"className":139},[],[141],{"type":46,"value":142},"diagramming-code",{"type":46,"value":144}," skill)",{"type":41,"tag":66,"props":146,"children":147},{},[148,150,156],{"type":46,"value":149},"Mutation testing triage (use the ",{"type":41,"tag":111,"props":151,"children":153},{"className":152},[],[154],{"type":46,"value":155},"genotoxic",{"type":46,"value":144},{"type":41,"tag":55,"props":158,"children":160},{"id":159},"rationalizations-to-reject",[161],{"type":46,"value":162},"Rationalizations to Reject",{"type":41,"tag":164,"props":165,"children":166},"table",{},[167,191],{"type":41,"tag":168,"props":169,"children":170},"thead",{},[171],{"type":41,"tag":172,"props":173,"children":174},"tr",{},[175,181,186],{"type":41,"tag":176,"props":177,"children":178},"th",{},[179],{"type":46,"value":180},"Rationalization",{"type":41,"tag":176,"props":182,"children":183},{},[184],{"type":46,"value":185},"Why It's Wrong",{"type":41,"tag":176,"props":187,"children":188},{},[189],{"type":46,"value":190},"Required Action",{"type":41,"tag":192,"props":193,"children":194},"tbody",{},[195,222,240,258,276,294],{"type":41,"tag":172,"props":196,"children":197},{},[198,204,209],{"type":41,"tag":199,"props":200,"children":201},"td",{},[202],{"type":46,"value":203},"\"We just need the structural diff, skip pre-analysis\"",{"type":41,"tag":199,"props":205,"children":206},{},[207],{"type":46,"value":208},"Without pre-analysis, you miss taint changes, blast radius growth, and privilege boundary shifts",{"type":41,"tag":199,"props":210,"children":211},{},[212,214,220],{"type":46,"value":213},"Run ",{"type":41,"tag":111,"props":215,"children":217},{"className":216},[],[218],{"type":46,"value":219},"engine.preanalysis()",{"type":46,"value":221}," on both snapshots",{"type":41,"tag":172,"props":223,"children":224},{},[225,230,235],{"type":41,"tag":199,"props":226,"children":227},{},[228],{"type":46,"value":229},"\"Text diff covers what changed\"",{"type":41,"tag":199,"props":231,"children":232},{},[233],{"type":46,"value":234},"Text diffs miss new attack paths, transitive complexity shifts, and subgraph membership changes",{"type":41,"tag":199,"props":236,"children":237},{},[238],{"type":46,"value":239},"Use structural diff to complement text diff",{"type":41,"tag":172,"props":241,"children":242},{},[243,248,253],{"type":41,"tag":199,"props":244,"children":245},{},[246],{"type":46,"value":247},"\"Only added nodes matter\"",{"type":41,"tag":199,"props":249,"children":250},{},[251],{"type":46,"value":252},"Removed security functions and shifted privilege boundaries are equally dangerous",{"type":41,"tag":199,"props":254,"children":255},{},[256],{"type":46,"value":257},"Review removals and modifications, not just additions",{"type":41,"tag":172,"props":259,"children":260},{},[261,266,271],{"type":41,"tag":199,"props":262,"children":263},{},[264],{"type":46,"value":265},"\"Low-severity structural changes can be ignored\"",{"type":41,"tag":199,"props":267,"children":268},{},[269],{"type":46,"value":270},"INFO-level changes (dead code removal) can mask removed security checks",{"type":41,"tag":199,"props":272,"children":273},{},[274],{"type":46,"value":275},"Classify every change, review removals for replaced functionality",{"type":41,"tag":172,"props":277,"children":278},{},[279,284,289],{"type":41,"tag":199,"props":280,"children":281},{},[282],{"type":46,"value":283},"\"One snapshot's graph is enough for comparison\"",{"type":41,"tag":199,"props":285,"children":286},{},[287],{"type":46,"value":288},"Single-snapshot analysis can't detect evolution — you need both before and after",{"type":41,"tag":199,"props":290,"children":291},{},[292],{"type":46,"value":293},"Always build and export both graphs",{"type":41,"tag":172,"props":295,"children":296},{},[297,302,307],{"type":41,"tag":199,"props":298,"children":299},{},[300],{"type":46,"value":301},"\"Tool isn't installed, I'll compare manually\"",{"type":41,"tag":199,"props":303,"children":304},{},[305],{"type":46,"value":306},"Manual comparison misses what graph analysis catches",{"type":41,"tag":199,"props":308,"children":309},{},[310],{"type":46,"value":311},"Install trailmark first",{"type":41,"tag":313,"props":314,"children":315},"hr",{},[],{"type":41,"tag":55,"props":317,"children":319},{"id":318},"prerequisites",[320],{"type":46,"value":321},"Prerequisites",{"type":41,"tag":49,"props":323,"children":324},{},[325,330,332,338],{"type":41,"tag":326,"props":327,"children":328},"strong",{},[329],{"type":46,"value":129},{"type":46,"value":331}," must be installed. If ",{"type":41,"tag":111,"props":333,"children":335},{"className":334},[],[336],{"type":46,"value":337},"uv run trailmark",{"type":46,"value":339}," fails, run:",{"type":41,"tag":341,"props":342,"children":347},"pre",{"className":343,"code":344,"language":345,"meta":346,"style":346},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv pip install trailmark\n","bash","",[348],{"type":41,"tag":111,"props":349,"children":350},{"__ignoreMap":346},[351],{"type":41,"tag":352,"props":353,"children":356},"span",{"class":354,"line":355},"line",1,[357,363,369,374],{"type":41,"tag":352,"props":358,"children":360},{"style":359},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[361],{"type":46,"value":362},"uv",{"type":41,"tag":352,"props":364,"children":366},{"style":365},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[367],{"type":46,"value":368}," pip",{"type":41,"tag":352,"props":370,"children":371},{"style":365},[372],{"type":46,"value":373}," install",{"type":41,"tag":352,"props":375,"children":376},{"style":365},[377],{"type":46,"value":378}," trailmark\n",{"type":41,"tag":49,"props":380,"children":381},{},[382,387],{"type":41,"tag":326,"props":383,"children":384},{},[385],{"type":46,"value":386},"DO NOT",{"type":46,"value":388}," fall back to \"manual comparison\" or reading source files as a\nsubstitute for running trailmark. The tool must be installed and used\nprogrammatically. If installation fails, report the error.",{"type":41,"tag":313,"props":390,"children":391},{},[],{"type":41,"tag":55,"props":393,"children":395},{"id":394},"quick-start",[396],{"type":46,"value":397},"Quick Start",{"type":41,"tag":341,"props":399,"children":401},{"className":343,"code":400,"language":345,"meta":346,"style":346},"# Compare two git refs (e.g., tags, branches, commits)\n# 1. Build graphs at each snapshot\n# 2. Run pre-analysis on both\n# 3. Compute structural diff\n# 4. Generate report\n\n# Step-by-step: see Workflow below\n",[402],{"type":41,"tag":111,"props":403,"children":404},{"__ignoreMap":346},[405,414,423,432,441,450,460],{"type":41,"tag":352,"props":406,"children":407},{"class":354,"line":355},[408],{"type":41,"tag":352,"props":409,"children":411},{"style":410},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[412],{"type":46,"value":413},"# Compare two git refs (e.g., tags, branches, commits)\n",{"type":41,"tag":352,"props":415,"children":417},{"class":354,"line":416},2,[418],{"type":41,"tag":352,"props":419,"children":420},{"style":410},[421],{"type":46,"value":422},"# 1. Build graphs at each snapshot\n",{"type":41,"tag":352,"props":424,"children":426},{"class":354,"line":425},3,[427],{"type":41,"tag":352,"props":428,"children":429},{"style":410},[430],{"type":46,"value":431},"# 2. Run pre-analysis on both\n",{"type":41,"tag":352,"props":433,"children":435},{"class":354,"line":434},4,[436],{"type":41,"tag":352,"props":437,"children":438},{"style":410},[439],{"type":46,"value":440},"# 3. Compute structural diff\n",{"type":41,"tag":352,"props":442,"children":444},{"class":354,"line":443},5,[445],{"type":41,"tag":352,"props":446,"children":447},{"style":410},[448],{"type":46,"value":449},"# 4. Generate report\n",{"type":41,"tag":352,"props":451,"children":453},{"class":354,"line":452},6,[454],{"type":41,"tag":352,"props":455,"children":457},{"emptyLinePlaceholder":456},true,[458],{"type":46,"value":459},"\n",{"type":41,"tag":352,"props":461,"children":463},{"class":354,"line":462},7,[464],{"type":41,"tag":352,"props":465,"children":466},{"style":410},[467],{"type":46,"value":468},"# Step-by-step: see Workflow below\n",{"type":41,"tag":313,"props":470,"children":471},{},[],{"type":41,"tag":55,"props":473,"children":475},{"id":474},"decision-tree",[476],{"type":46,"value":477},"Decision Tree",{"type":41,"tag":341,"props":479,"children":483},{"className":480,"code":482,"language":46},[481],"language-text","├─ Need to understand what each metric means?\n│  └─ Read: references\u002Fevolution-metrics.md\n│\n├─ Need the report output format?\n│  └─ Read: references\u002Freport-format.md\n│\n├─ Already have two graph JSON exports?\n│  └─ Jump to Phase 3 (run native diff + graph_diff.py)\n│\n└─ Starting from two git refs?\n   └─ Start at Phase 1\n",[484],{"type":41,"tag":111,"props":485,"children":486},{"__ignoreMap":346},[487],{"type":46,"value":482},{"type":41,"tag":313,"props":489,"children":490},{},[],{"type":41,"tag":55,"props":492,"children":494},{"id":493},"workflow",[495],{"type":46,"value":496},"Workflow",{"type":41,"tag":341,"props":498,"children":501},{"className":499,"code":500,"language":46},[481],"Graph Evolution Progress:\n- [ ] Phase 1: Create snapshots (git worktrees)\n- [ ] Phase 2: Build graphs + pre-analysis on both snapshots\n- [ ] Phase 3: Compute structural diff\n- [ ] Phase 4: Interpret diff and generate report\n- [ ] Phase 5: Clean up worktrees\n",[502],{"type":41,"tag":111,"props":503,"children":504},{"__ignoreMap":346},[505],{"type":46,"value":500},{"type":41,"tag":507,"props":508,"children":510},"h3",{"id":509},"phase-1-create-snapshots",[511],{"type":46,"value":512},"Phase 1: Create Snapshots",{"type":41,"tag":49,"props":514,"children":515},{},[516],{"type":46,"value":517},"Use git worktrees to get clean copies of each ref without disturbing\nthe working tree.",{"type":41,"tag":341,"props":519,"children":521},{"className":343,"code":520,"language":345,"meta":346,"style":346},"# Create temp directories for worktrees\nBEFORE_DIR=$(mktemp -d)\nAFTER_DIR=$(mktemp -d)\n\n# Create worktrees (run from repo root)\ngit worktree add \"$BEFORE_DIR\" {before_ref}\ngit worktree add \"$AFTER_DIR\" {after_ref}\n",[522],{"type":41,"tag":111,"props":523,"children":524},{"__ignoreMap":346},[525,533,563,587,594,602,639],{"type":41,"tag":352,"props":526,"children":527},{"class":354,"line":355},[528],{"type":41,"tag":352,"props":529,"children":530},{"style":410},[531],{"type":46,"value":532},"# Create temp directories for worktrees\n",{"type":41,"tag":352,"props":534,"children":535},{"class":354,"line":416},[536,542,548,553,558],{"type":41,"tag":352,"props":537,"children":539},{"style":538},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[540],{"type":46,"value":541},"BEFORE_DIR",{"type":41,"tag":352,"props":543,"children":545},{"style":544},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[546],{"type":46,"value":547},"=$(",{"type":41,"tag":352,"props":549,"children":550},{"style":359},[551],{"type":46,"value":552},"mktemp",{"type":41,"tag":352,"props":554,"children":555},{"style":365},[556],{"type":46,"value":557}," -d",{"type":41,"tag":352,"props":559,"children":560},{"style":544},[561],{"type":46,"value":562},")\n",{"type":41,"tag":352,"props":564,"children":565},{"class":354,"line":425},[566,571,575,579,583],{"type":41,"tag":352,"props":567,"children":568},{"style":538},[569],{"type":46,"value":570},"AFTER_DIR",{"type":41,"tag":352,"props":572,"children":573},{"style":544},[574],{"type":46,"value":547},{"type":41,"tag":352,"props":576,"children":577},{"style":359},[578],{"type":46,"value":552},{"type":41,"tag":352,"props":580,"children":581},{"style":365},[582],{"type":46,"value":557},{"type":41,"tag":352,"props":584,"children":585},{"style":544},[586],{"type":46,"value":562},{"type":41,"tag":352,"props":588,"children":589},{"class":354,"line":434},[590],{"type":41,"tag":352,"props":591,"children":592},{"emptyLinePlaceholder":456},[593],{"type":46,"value":459},{"type":41,"tag":352,"props":595,"children":596},{"class":354,"line":443},[597],{"type":41,"tag":352,"props":598,"children":599},{"style":410},[600],{"type":46,"value":601},"# Create worktrees (run from repo root)\n",{"type":41,"tag":352,"props":603,"children":604},{"class":354,"line":452},[605,609,614,619,624,629,634],{"type":41,"tag":352,"props":606,"children":607},{"style":359},[608],{"type":46,"value":19},{"type":41,"tag":352,"props":610,"children":611},{"style":365},[612],{"type":46,"value":613}," worktree",{"type":41,"tag":352,"props":615,"children":616},{"style":365},[617],{"type":46,"value":618}," add",{"type":41,"tag":352,"props":620,"children":621},{"style":544},[622],{"type":46,"value":623}," \"",{"type":41,"tag":352,"props":625,"children":626},{"style":538},[627],{"type":46,"value":628},"$BEFORE_DIR",{"type":41,"tag":352,"props":630,"children":631},{"style":544},[632],{"type":46,"value":633},"\"",{"type":41,"tag":352,"props":635,"children":636},{"style":365},[637],{"type":46,"value":638}," {before_ref}\n",{"type":41,"tag":352,"props":640,"children":641},{"class":354,"line":462},[642,646,650,654,658,663,667],{"type":41,"tag":352,"props":643,"children":644},{"style":359},[645],{"type":46,"value":19},{"type":41,"tag":352,"props":647,"children":648},{"style":365},[649],{"type":46,"value":613},{"type":41,"tag":352,"props":651,"children":652},{"style":365},[653],{"type":46,"value":618},{"type":41,"tag":352,"props":655,"children":656},{"style":544},[657],{"type":46,"value":623},{"type":41,"tag":352,"props":659,"children":660},{"style":538},[661],{"type":46,"value":662},"$AFTER_DIR",{"type":41,"tag":352,"props":664,"children":665},{"style":544},[666],{"type":46,"value":633},{"type":41,"tag":352,"props":668,"children":669},{"style":365},[670],{"type":46,"value":671}," {after_ref}\n",{"type":41,"tag":49,"props":673,"children":674},{},[675],{"type":46,"value":676},"If comparing two directories instead of git refs, skip this phase and\nuse the directory paths directly in Phase 2.",{"type":41,"tag":507,"props":678,"children":680},{"id":679},"phase-2-build-graphs-and-run-pre-analysis",[681],{"type":46,"value":682},"Phase 2: Build Graphs and Run Pre-Analysis",{"type":41,"tag":49,"props":684,"children":685},{},[686],{"type":46,"value":687},"Build Trailmark graphs for both snapshots and run pre-analysis on each.\nPre-analysis computes blast radius, taint propagation, privilege\nboundaries, and entrypoint enumeration.",{"type":41,"tag":341,"props":689,"children":693},{"className":690,"code":691,"language":692,"meta":346,"style":346},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from trailmark.query.api import QueryEngine\n\ndef build_and_export(target_dir, output_path, language=\"auto\"):\n    \"\"\"Build graph, run pre-analysis, export JSON.\"\"\"\n    engine = QueryEngine.from_directory(target_dir, language=language)\n    engine.preanalysis()\n    json_str = engine.to_json()\n    with open(output_path, \"w\") as f:\n        f.write(json_str)\n    return engine.summary()\n\nimport tempfile, os\nwork_dir = tempfile.mkdtemp(prefix=\"trailmark_evolution_\")\nbefore_json = os.path.join(work_dir, \"before_graph.json\")\nafter_json = os.path.join(work_dir, \"after_graph.json\")\n\nbefore_summary = build_and_export(\n    \"{before_dir}\", before_json\n)\nafter_summary = build_and_export(\n    \"{after_dir}\", after_json\n)\n","python",[694],{"type":41,"tag":111,"props":695,"children":696},{"__ignoreMap":346},[697,705,712,720,728,736,744,752,761,770,779,787,796,805,814,823,831,840,849,857,866,875],{"type":41,"tag":352,"props":698,"children":699},{"class":354,"line":355},[700],{"type":41,"tag":352,"props":701,"children":702},{},[703],{"type":46,"value":704},"from trailmark.query.api import QueryEngine\n",{"type":41,"tag":352,"props":706,"children":707},{"class":354,"line":416},[708],{"type":41,"tag":352,"props":709,"children":710},{"emptyLinePlaceholder":456},[711],{"type":46,"value":459},{"type":41,"tag":352,"props":713,"children":714},{"class":354,"line":425},[715],{"type":41,"tag":352,"props":716,"children":717},{},[718],{"type":46,"value":719},"def build_and_export(target_dir, output_path, language=\"auto\"):\n",{"type":41,"tag":352,"props":721,"children":722},{"class":354,"line":434},[723],{"type":41,"tag":352,"props":724,"children":725},{},[726],{"type":46,"value":727},"    \"\"\"Build graph, run pre-analysis, export JSON.\"\"\"\n",{"type":41,"tag":352,"props":729,"children":730},{"class":354,"line":443},[731],{"type":41,"tag":352,"props":732,"children":733},{},[734],{"type":46,"value":735},"    engine = QueryEngine.from_directory(target_dir, language=language)\n",{"type":41,"tag":352,"props":737,"children":738},{"class":354,"line":452},[739],{"type":41,"tag":352,"props":740,"children":741},{},[742],{"type":46,"value":743},"    engine.preanalysis()\n",{"type":41,"tag":352,"props":745,"children":746},{"class":354,"line":462},[747],{"type":41,"tag":352,"props":748,"children":749},{},[750],{"type":46,"value":751},"    json_str = engine.to_json()\n",{"type":41,"tag":352,"props":753,"children":755},{"class":354,"line":754},8,[756],{"type":41,"tag":352,"props":757,"children":758},{},[759],{"type":46,"value":760},"    with open(output_path, \"w\") as f:\n",{"type":41,"tag":352,"props":762,"children":764},{"class":354,"line":763},9,[765],{"type":41,"tag":352,"props":766,"children":767},{},[768],{"type":46,"value":769},"        f.write(json_str)\n",{"type":41,"tag":352,"props":771,"children":773},{"class":354,"line":772},10,[774],{"type":41,"tag":352,"props":775,"children":776},{},[777],{"type":46,"value":778},"    return engine.summary()\n",{"type":41,"tag":352,"props":780,"children":782},{"class":354,"line":781},11,[783],{"type":41,"tag":352,"props":784,"children":785},{"emptyLinePlaceholder":456},[786],{"type":46,"value":459},{"type":41,"tag":352,"props":788,"children":790},{"class":354,"line":789},12,[791],{"type":41,"tag":352,"props":792,"children":793},{},[794],{"type":46,"value":795},"import tempfile, os\n",{"type":41,"tag":352,"props":797,"children":799},{"class":354,"line":798},13,[800],{"type":41,"tag":352,"props":801,"children":802},{},[803],{"type":46,"value":804},"work_dir = tempfile.mkdtemp(prefix=\"trailmark_evolution_\")\n",{"type":41,"tag":352,"props":806,"children":808},{"class":354,"line":807},14,[809],{"type":41,"tag":352,"props":810,"children":811},{},[812],{"type":46,"value":813},"before_json = os.path.join(work_dir, \"before_graph.json\")\n",{"type":41,"tag":352,"props":815,"children":817},{"class":354,"line":816},15,[818],{"type":41,"tag":352,"props":819,"children":820},{},[821],{"type":46,"value":822},"after_json = os.path.join(work_dir, \"after_graph.json\")\n",{"type":41,"tag":352,"props":824,"children":826},{"class":354,"line":825},16,[827],{"type":41,"tag":352,"props":828,"children":829},{"emptyLinePlaceholder":456},[830],{"type":46,"value":459},{"type":41,"tag":352,"props":832,"children":834},{"class":354,"line":833},17,[835],{"type":41,"tag":352,"props":836,"children":837},{},[838],{"type":46,"value":839},"before_summary = build_and_export(\n",{"type":41,"tag":352,"props":841,"children":843},{"class":354,"line":842},18,[844],{"type":41,"tag":352,"props":845,"children":846},{},[847],{"type":46,"value":848},"    \"{before_dir}\", before_json\n",{"type":41,"tag":352,"props":850,"children":852},{"class":354,"line":851},19,[853],{"type":41,"tag":352,"props":854,"children":855},{},[856],{"type":46,"value":562},{"type":41,"tag":352,"props":858,"children":860},{"class":354,"line":859},20,[861],{"type":41,"tag":352,"props":862,"children":863},{},[864],{"type":46,"value":865},"after_summary = build_and_export(\n",{"type":41,"tag":352,"props":867,"children":869},{"class":354,"line":868},21,[870],{"type":41,"tag":352,"props":871,"children":872},{},[873],{"type":46,"value":874},"    \"{after_dir}\", after_json\n",{"type":41,"tag":352,"props":876,"children":878},{"class":354,"line":877},22,[879],{"type":41,"tag":352,"props":880,"children":881},{},[882],{"type":46,"value":562},{"type":41,"tag":49,"props":884,"children":885},{},[886,888,894],{"type":46,"value":887},"Verify both graphs built successfully by checking the summary output.\nIf either fails, rerun with an explicit language or comma-separated list\ninstead of ",{"type":41,"tag":111,"props":889,"children":891},{"className":890},[],[892],{"type":46,"value":893},"auto",{"type":46,"value":895},".",{"type":41,"tag":507,"props":897,"children":899},{"id":898},"phase-3-compute-structural-diff",[900],{"type":46,"value":901},"Phase 3: Compute Structural Diff",{"type":41,"tag":49,"props":903,"children":904},{},[905,906,911],{"type":46,"value":213},{"type":41,"tag":326,"props":907,"children":908},{},[909],{"type":46,"value":910},"both",{"type":46,"value":912},":",{"type":41,"tag":914,"props":915,"children":916},"ol",{},[917,922],{"type":41,"tag":66,"props":918,"children":919},{},[920],{"type":46,"value":921},"Trailmark's native structural diff for nodes, edges, and entrypoints",{"type":41,"tag":66,"props":923,"children":924},{},[925,927,933],{"type":46,"value":926},"The plugin's ",{"type":41,"tag":111,"props":928,"children":930},{"className":929},[],[931],{"type":46,"value":932},"graph_diff.py",{"type":46,"value":934}," helper for subgraph membership changes",{"type":41,"tag":49,"props":936,"children":937},{},[938,940,946],{"type":46,"value":939},"Using the same ",{"type":41,"tag":111,"props":941,"children":943},{"className":942},[],[944],{"type":46,"value":945},"work_dir",{"type":46,"value":947}," from Phase 2:",{"type":41,"tag":341,"props":949,"children":951},{"className":343,"code":950,"language":345,"meta":346,"style":346},"trailmark diff --json \"{before_dir}\" \"{after_dir}\" > \"{work_dir}\u002Ftrailmark_diff.json\" || \\\n  uv run trailmark diff --json \"{before_dir}\" \"{after_dir}\" > \"{work_dir}\u002Ftrailmark_diff.json\"\n\nuv run {baseDir}\u002Fscripts\u002Fgraph_diff.py \\\n    --before \"{before_json}\" \\\n    --after \"{after_json}\" > \"{work_dir}\u002Fsubgraph_diff.json\"\n",[952],{"type":41,"tag":111,"props":953,"children":954},{"__ignoreMap":346},[955,1026,1093,1100,1120,1145],{"type":41,"tag":352,"props":956,"children":957},{"class":354,"line":355},[958,962,967,972,976,981,985,989,994,998,1003,1007,1012,1016,1021],{"type":41,"tag":352,"props":959,"children":960},{"style":359},[961],{"type":46,"value":129},{"type":41,"tag":352,"props":963,"children":964},{"style":365},[965],{"type":46,"value":966}," diff",{"type":41,"tag":352,"props":968,"children":969},{"style":365},[970],{"type":46,"value":971}," --json",{"type":41,"tag":352,"props":973,"children":974},{"style":544},[975],{"type":46,"value":623},{"type":41,"tag":352,"props":977,"children":978},{"style":365},[979],{"type":46,"value":980},"{before_dir}",{"type":41,"tag":352,"props":982,"children":983},{"style":544},[984],{"type":46,"value":633},{"type":41,"tag":352,"props":986,"children":987},{"style":544},[988],{"type":46,"value":623},{"type":41,"tag":352,"props":990,"children":991},{"style":365},[992],{"type":46,"value":993},"{after_dir}",{"type":41,"tag":352,"props":995,"children":996},{"style":544},[997],{"type":46,"value":633},{"type":41,"tag":352,"props":999,"children":1000},{"style":544},[1001],{"type":46,"value":1002}," >",{"type":41,"tag":352,"props":1004,"children":1005},{"style":544},[1006],{"type":46,"value":623},{"type":41,"tag":352,"props":1008,"children":1009},{"style":365},[1010],{"type":46,"value":1011},"{work_dir}\u002Ftrailmark_diff.json",{"type":41,"tag":352,"props":1013,"children":1014},{"style":544},[1015],{"type":46,"value":633},{"type":41,"tag":352,"props":1017,"children":1018},{"style":544},[1019],{"type":46,"value":1020}," ||",{"type":41,"tag":352,"props":1022,"children":1023},{"style":538},[1024],{"type":46,"value":1025}," \\\n",{"type":41,"tag":352,"props":1027,"children":1028},{"class":354,"line":416},[1029,1034,1039,1044,1048,1052,1056,1060,1064,1068,1072,1076,1080,1084,1088],{"type":41,"tag":352,"props":1030,"children":1031},{"style":359},[1032],{"type":46,"value":1033},"  uv",{"type":41,"tag":352,"props":1035,"children":1036},{"style":365},[1037],{"type":46,"value":1038}," run",{"type":41,"tag":352,"props":1040,"children":1041},{"style":365},[1042],{"type":46,"value":1043}," trailmark",{"type":41,"tag":352,"props":1045,"children":1046},{"style":365},[1047],{"type":46,"value":966},{"type":41,"tag":352,"props":1049,"children":1050},{"style":365},[1051],{"type":46,"value":971},{"type":41,"tag":352,"props":1053,"children":1054},{"style":544},[1055],{"type":46,"value":623},{"type":41,"tag":352,"props":1057,"children":1058},{"style":365},[1059],{"type":46,"value":980},{"type":41,"tag":352,"props":1061,"children":1062},{"style":544},[1063],{"type":46,"value":633},{"type":41,"tag":352,"props":1065,"children":1066},{"style":544},[1067],{"type":46,"value":623},{"type":41,"tag":352,"props":1069,"children":1070},{"style":365},[1071],{"type":46,"value":993},{"type":41,"tag":352,"props":1073,"children":1074},{"style":544},[1075],{"type":46,"value":633},{"type":41,"tag":352,"props":1077,"children":1078},{"style":544},[1079],{"type":46,"value":1002},{"type":41,"tag":352,"props":1081,"children":1082},{"style":544},[1083],{"type":46,"value":623},{"type":41,"tag":352,"props":1085,"children":1086},{"style":365},[1087],{"type":46,"value":1011},{"type":41,"tag":352,"props":1089,"children":1090},{"style":544},[1091],{"type":46,"value":1092},"\"\n",{"type":41,"tag":352,"props":1094,"children":1095},{"class":354,"line":425},[1096],{"type":41,"tag":352,"props":1097,"children":1098},{"emptyLinePlaceholder":456},[1099],{"type":46,"value":459},{"type":41,"tag":352,"props":1101,"children":1102},{"class":354,"line":434},[1103,1107,1111,1116],{"type":41,"tag":352,"props":1104,"children":1105},{"style":359},[1106],{"type":46,"value":362},{"type":41,"tag":352,"props":1108,"children":1109},{"style":365},[1110],{"type":46,"value":1038},{"type":41,"tag":352,"props":1112,"children":1113},{"style":365},[1114],{"type":46,"value":1115}," {baseDir}\u002Fscripts\u002Fgraph_diff.py",{"type":41,"tag":352,"props":1117,"children":1118},{"style":538},[1119],{"type":46,"value":1025},{"type":41,"tag":352,"props":1121,"children":1122},{"class":354,"line":443},[1123,1128,1132,1137,1141],{"type":41,"tag":352,"props":1124,"children":1125},{"style":365},[1126],{"type":46,"value":1127},"    --before",{"type":41,"tag":352,"props":1129,"children":1130},{"style":544},[1131],{"type":46,"value":623},{"type":41,"tag":352,"props":1133,"children":1134},{"style":365},[1135],{"type":46,"value":1136},"{before_json}",{"type":41,"tag":352,"props":1138,"children":1139},{"style":544},[1140],{"type":46,"value":633},{"type":41,"tag":352,"props":1142,"children":1143},{"style":538},[1144],{"type":46,"value":1025},{"type":41,"tag":352,"props":1146,"children":1147},{"class":354,"line":452},[1148,1153,1157,1162,1166,1170,1174,1179],{"type":41,"tag":352,"props":1149,"children":1150},{"style":365},[1151],{"type":46,"value":1152},"    --after",{"type":41,"tag":352,"props":1154,"children":1155},{"style":544},[1156],{"type":46,"value":623},{"type":41,"tag":352,"props":1158,"children":1159},{"style":365},[1160],{"type":46,"value":1161},"{after_json}",{"type":41,"tag":352,"props":1163,"children":1164},{"style":544},[1165],{"type":46,"value":633},{"type":41,"tag":352,"props":1167,"children":1168},{"style":544},[1169],{"type":46,"value":1002},{"type":41,"tag":352,"props":1171,"children":1172},{"style":544},[1173],{"type":46,"value":623},{"type":41,"tag":352,"props":1175,"children":1176},{"style":365},[1177],{"type":46,"value":1178},"{work_dir}\u002Fsubgraph_diff.json",{"type":41,"tag":352,"props":1180,"children":1181},{"style":544},[1182],{"type":46,"value":1092},{"type":41,"tag":49,"props":1184,"children":1185},{},[1186],{"type":46,"value":1187},"If either diff command fails or writes an empty JSON file, stop and report the\nerror instead of continuing to Phase 4.",{"type":41,"tag":49,"props":1189,"children":1190},{},[1191],{"type":46,"value":1192},"The native Trailmark diff contains:",{"type":41,"tag":164,"props":1194,"children":1195},{},[1196,1212],{"type":41,"tag":168,"props":1197,"children":1198},{},[1199],{"type":41,"tag":172,"props":1200,"children":1201},{},[1202,1207],{"type":41,"tag":176,"props":1203,"children":1204},{},[1205],{"type":46,"value":1206},"Key",{"type":41,"tag":176,"props":1208,"children":1209},{},[1210],{"type":46,"value":1211},"Contents",{"type":41,"tag":192,"props":1213,"children":1214},{},[1215,1232,1249,1266,1283,1300,1317],{"type":41,"tag":172,"props":1216,"children":1217},{},[1218,1227],{"type":41,"tag":199,"props":1219,"children":1220},{},[1221],{"type":41,"tag":111,"props":1222,"children":1224},{"className":1223},[],[1225],{"type":46,"value":1226},"summary_delta",{"type":41,"tag":199,"props":1228,"children":1229},{},[1230],{"type":46,"value":1231},"Changes in node\u002Fedge\u002Fentrypoint counts",{"type":41,"tag":172,"props":1233,"children":1234},{},[1235,1244],{"type":41,"tag":199,"props":1236,"children":1237},{},[1238],{"type":41,"tag":111,"props":1239,"children":1241},{"className":1240},[],[1242],{"type":46,"value":1243},"nodes.added",{"type":41,"tag":199,"props":1245,"children":1246},{},[1247],{"type":46,"value":1248},"New functions, classes, methods",{"type":41,"tag":172,"props":1250,"children":1251},{},[1252,1261],{"type":41,"tag":199,"props":1253,"children":1254},{},[1255],{"type":41,"tag":111,"props":1256,"children":1258},{"className":1257},[],[1259],{"type":46,"value":1260},"nodes.removed",{"type":41,"tag":199,"props":1262,"children":1263},{},[1264],{"type":46,"value":1265},"Deleted functions, classes, methods",{"type":41,"tag":172,"props":1267,"children":1268},{},[1269,1278],{"type":41,"tag":199,"props":1270,"children":1271},{},[1272],{"type":41,"tag":111,"props":1273,"children":1275},{"className":1274},[],[1276],{"type":46,"value":1277},"nodes.modified",{"type":41,"tag":199,"props":1279,"children":1280},{},[1281],{"type":46,"value":1282},"Functions with changed CC, params, line span",{"type":41,"tag":172,"props":1284,"children":1285},{},[1286,1295],{"type":41,"tag":199,"props":1287,"children":1288},{},[1289],{"type":41,"tag":111,"props":1290,"children":1292},{"className":1291},[],[1293],{"type":46,"value":1294},"edges.added",{"type":41,"tag":199,"props":1296,"children":1297},{},[1298],{"type":46,"value":1299},"New call\u002Finheritance\u002Fimport relationships",{"type":41,"tag":172,"props":1301,"children":1302},{},[1303,1312],{"type":41,"tag":199,"props":1304,"children":1305},{},[1306],{"type":41,"tag":111,"props":1307,"children":1309},{"className":1308},[],[1310],{"type":46,"value":1311},"edges.removed",{"type":41,"tag":199,"props":1313,"children":1314},{},[1315],{"type":46,"value":1316},"Deleted relationships",{"type":41,"tag":172,"props":1318,"children":1319},{},[1320,1329],{"type":41,"tag":199,"props":1321,"children":1322},{},[1323],{"type":41,"tag":111,"props":1324,"children":1326},{"className":1325},[],[1327],{"type":46,"value":1328},"entrypoints",{"type":41,"tag":199,"props":1330,"children":1331},{},[1332],{"type":46,"value":1333},"Added, removed, and modified entrypoints",{"type":41,"tag":49,"props":1335,"children":1336},{},[1337],{"type":46,"value":1338},"The subgraph diff contains:",{"type":41,"tag":164,"props":1340,"children":1341},{},[1342,1356],{"type":41,"tag":168,"props":1343,"children":1344},{},[1345],{"type":41,"tag":172,"props":1346,"children":1347},{},[1348,1352],{"type":41,"tag":176,"props":1349,"children":1350},{},[1351],{"type":46,"value":1206},{"type":41,"tag":176,"props":1353,"children":1354},{},[1355],{"type":46,"value":1211},{"type":41,"tag":192,"props":1357,"children":1358},{},[1359],{"type":41,"tag":172,"props":1360,"children":1361},{},[1362,1371],{"type":41,"tag":199,"props":1363,"children":1364},{},[1365],{"type":41,"tag":111,"props":1366,"children":1368},{"className":1367},[],[1369],{"type":46,"value":1370},"subgraphs",{"type":41,"tag":199,"props":1372,"children":1373},{},[1374],{"type":46,"value":1375},"Per-subgraph membership changes (tainted, high_blast_radius, etc.)",{"type":41,"tag":507,"props":1377,"children":1379},{"id":1378},"phase-4-interpret-diff-and-generate-report",[1380],{"type":46,"value":1381},"Phase 4: Interpret Diff and Generate Report",{"type":41,"tag":49,"props":1383,"children":1384},{},[1385,1387,1391,1393,1399],{"type":46,"value":1386},"Read ",{"type":41,"tag":326,"props":1388,"children":1389},{},[1390],{"type":46,"value":910},{"type":46,"value":1392}," diff JSON files and generate a security-focused markdown\nreport.\nSee ",{"type":41,"tag":1394,"props":1395,"children":1397},"a",{"href":1396},"references\u002Freport-format.md",[1398],{"type":46,"value":1396},{"type":46,"value":1400}," for\nthe full template.",{"type":41,"tag":49,"props":1402,"children":1403},{},[1404],{"type":41,"tag":326,"props":1405,"children":1406},{},[1407],{"type":46,"value":1408},"Interpretation priorities (highest to lowest):",{"type":41,"tag":914,"props":1410,"children":1411},{},[1412,1430,1440,1464,1480,1490,1500],{"type":41,"tag":66,"props":1413,"children":1414},{},[1415,1420,1422,1428],{"type":41,"tag":326,"props":1416,"children":1417},{},[1418],{"type":46,"value":1419},"New tainted paths",{"type":46,"value":1421}," — nodes entering the ",{"type":41,"tag":111,"props":1423,"children":1425},{"className":1424},[],[1426],{"type":46,"value":1427},"tainted",{"type":46,"value":1429}," subgraph,\nespecially if they also appear in added edges targeting sensitive\nfunctions",{"type":41,"tag":66,"props":1431,"children":1432},{},[1433,1438],{"type":41,"tag":326,"props":1434,"children":1435},{},[1436],{"type":46,"value":1437},"Privilege boundary changes",{"type":46,"value":1439}," — new or removed trust transitions\nfrom the native entrypoint\u002Fedge diff plus the subgraph diff",{"type":41,"tag":66,"props":1441,"children":1442},{},[1443,1448,1450,1456,1458],{"type":41,"tag":326,"props":1444,"children":1445},{},[1446],{"type":46,"value":1447},"Attack surface growth",{"type":46,"value":1449}," — new entrypoints, especially\n",{"type":41,"tag":111,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":46,"value":1455},"untrusted_external",{"type":46,"value":1457},", from ",{"type":41,"tag":111,"props":1459,"children":1461},{"className":1460},[],[1462],{"type":46,"value":1463},"trailmark_diff.json",{"type":41,"tag":66,"props":1465,"children":1466},{},[1467,1472,1474],{"type":41,"tag":326,"props":1468,"children":1469},{},[1470],{"type":46,"value":1471},"Blast radius increases",{"type":46,"value":1473}," — nodes entering ",{"type":41,"tag":111,"props":1475,"children":1477},{"className":1476},[],[1478],{"type":46,"value":1479},"high_blast_radius",{"type":41,"tag":66,"props":1481,"children":1482},{},[1483,1488],{"type":41,"tag":326,"props":1484,"children":1485},{},[1486],{"type":46,"value":1487},"Complexity spikes",{"type":46,"value":1489}," — CC increases > 3 on tainted or\nentrypoint-reachable nodes",{"type":41,"tag":66,"props":1491,"children":1492},{},[1493,1498],{"type":41,"tag":326,"props":1494,"children":1495},{},[1496],{"type":46,"value":1497},"Structural additions",{"type":46,"value":1499}," — new nodes and edges (review needed)",{"type":41,"tag":66,"props":1501,"children":1502},{},[1503,1508],{"type":41,"tag":326,"props":1504,"children":1505},{},[1506],{"type":46,"value":1507},"Structural removals",{"type":46,"value":1509}," — verify removed security functions were\nreplaced",{"type":41,"tag":49,"props":1511,"children":1512},{},[1513,1515,1521],{"type":46,"value":1514},"Cross-reference structural changes with ",{"type":41,"tag":111,"props":1516,"children":1518},{"className":1517},[],[1519],{"type":46,"value":1520},"git diff {before_ref}..{after_ref}",{"type":46,"value":1522},"\nto add source-level context to findings.",{"type":41,"tag":49,"props":1524,"children":1525},{},[1526],{"type":41,"tag":326,"props":1527,"children":1528},{},[1529],{"type":46,"value":1530},"Severity classification:",{"type":41,"tag":164,"props":1532,"children":1533},{},[1534,1550],{"type":41,"tag":168,"props":1535,"children":1536},{},[1537],{"type":41,"tag":172,"props":1538,"children":1539},{},[1540,1545],{"type":41,"tag":176,"props":1541,"children":1542},{},[1543],{"type":46,"value":1544},"Severity",{"type":41,"tag":176,"props":1546,"children":1547},{},[1548],{"type":46,"value":1549},"Structural Signal",{"type":41,"tag":192,"props":1551,"children":1552},{},[1553,1566,1579,1592,1605],{"type":41,"tag":172,"props":1554,"children":1555},{},[1556,1561],{"type":41,"tag":199,"props":1557,"children":1558},{},[1559],{"type":46,"value":1560},"CRITICAL",{"type":41,"tag":199,"props":1562,"children":1563},{},[1564],{"type":46,"value":1565},"New tainted path to sensitive function, removed auth boundary",{"type":41,"tag":172,"props":1567,"children":1568},{},[1569,1574],{"type":41,"tag":199,"props":1570,"children":1571},{},[1572],{"type":46,"value":1573},"HIGH",{"type":41,"tag":199,"props":1575,"children":1576},{},[1577],{"type":46,"value":1578},"New entrypoint + high blast radius, large CC increase on tainted node",{"type":41,"tag":172,"props":1580,"children":1581},{},[1582,1587],{"type":41,"tag":199,"props":1583,"children":1584},{},[1585],{"type":46,"value":1586},"MEDIUM",{"type":41,"tag":199,"props":1588,"children":1589},{},[1590],{"type":46,"value":1591},"New trust-boundary-crossing edges, moderate CC increase",{"type":41,"tag":172,"props":1593,"children":1594},{},[1595,1600],{"type":41,"tag":199,"props":1596,"children":1597},{},[1598],{"type":46,"value":1599},"LOW",{"type":41,"tag":199,"props":1601,"children":1602},{},[1603],{"type":46,"value":1604},"Added nodes without entrypoint reachability",{"type":41,"tag":172,"props":1606,"children":1607},{},[1608,1613],{"type":41,"tag":199,"props":1609,"children":1610},{},[1611],{"type":46,"value":1612},"INFO",{"type":41,"tag":199,"props":1614,"children":1615},{},[1616],{"type":46,"value":1617},"Dead code removal, complexity reductions",{"type":41,"tag":49,"props":1619,"children":1620},{},[1621,1623,1628],{"type":46,"value":1622},"For detailed metric definitions, see\n",{"type":41,"tag":1394,"props":1624,"children":1626},{"href":1625},"references\u002Fevolution-metrics.md",[1627],{"type":46,"value":1625},{"type":46,"value":895},{"type":41,"tag":507,"props":1630,"children":1632},{"id":1631},"phase-5-clean-up",[1633],{"type":46,"value":1634},"Phase 5: Clean Up",{"type":41,"tag":49,"props":1636,"children":1637},{},[1638],{"type":46,"value":1639},"Remove git worktrees after the report is written:",{"type":41,"tag":341,"props":1641,"children":1643},{"className":343,"code":1642,"language":345,"meta":346,"style":346},"git worktree remove \"{before_dir}\"\ngit worktree remove \"{after_dir}\"\n",[1644],{"type":41,"tag":111,"props":1645,"children":1646},{"__ignoreMap":346},[1647,1675],{"type":41,"tag":352,"props":1648,"children":1649},{"class":354,"line":355},[1650,1654,1658,1663,1667,1671],{"type":41,"tag":352,"props":1651,"children":1652},{"style":359},[1653],{"type":46,"value":19},{"type":41,"tag":352,"props":1655,"children":1656},{"style":365},[1657],{"type":46,"value":613},{"type":41,"tag":352,"props":1659,"children":1660},{"style":365},[1661],{"type":46,"value":1662}," remove",{"type":41,"tag":352,"props":1664,"children":1665},{"style":544},[1666],{"type":46,"value":623},{"type":41,"tag":352,"props":1668,"children":1669},{"style":365},[1670],{"type":46,"value":980},{"type":41,"tag":352,"props":1672,"children":1673},{"style":544},[1674],{"type":46,"value":1092},{"type":41,"tag":352,"props":1676,"children":1677},{"class":354,"line":416},[1678,1682,1686,1690,1694,1698],{"type":41,"tag":352,"props":1679,"children":1680},{"style":359},[1681],{"type":46,"value":19},{"type":41,"tag":352,"props":1683,"children":1684},{"style":365},[1685],{"type":46,"value":613},{"type":41,"tag":352,"props":1687,"children":1688},{"style":365},[1689],{"type":46,"value":1662},{"type":41,"tag":352,"props":1691,"children":1692},{"style":544},[1693],{"type":46,"value":623},{"type":41,"tag":352,"props":1695,"children":1696},{"style":365},[1697],{"type":46,"value":993},{"type":41,"tag":352,"props":1699,"children":1700},{"style":544},[1701],{"type":46,"value":1092},{"type":41,"tag":313,"props":1703,"children":1704},{},[],{"type":41,"tag":55,"props":1706,"children":1708},{"id":1707},"diff-reference",[1709],{"type":46,"value":1710},"Diff Reference",{"type":41,"tag":341,"props":1712,"children":1715},{"className":1713,"code":1714,"language":46},[481],"trailmark diff --json BEFORE AFTER\nuv run {baseDir}\u002Fscripts\u002Fgraph_diff.py [OPTIONS]\n",[1716],{"type":41,"tag":111,"props":1717,"children":1718},{"__ignoreMap":346},[1719],{"type":46,"value":1714},{"type":41,"tag":49,"props":1721,"children":1722},{},[1723,1725,1731],{"type":46,"value":1724},"Use ",{"type":41,"tag":111,"props":1726,"children":1728},{"className":1727},[],[1729],{"type":46,"value":1730},"trailmark diff",{"type":46,"value":1732}," for:",{"type":41,"tag":62,"props":1734,"children":1735},{},[1736,1741,1746],{"type":41,"tag":66,"props":1737,"children":1738},{},[1739],{"type":46,"value":1740},"Node\u002Fedge changes",{"type":41,"tag":66,"props":1742,"children":1743},{},[1744],{"type":46,"value":1745},"Added\u002Fremoved\u002Fmodified entrypoints",{"type":41,"tag":66,"props":1747,"children":1748},{},[1749],{"type":46,"value":1750},"Human-readable structural diff reports",{"type":41,"tag":49,"props":1752,"children":1753},{},[1754,1755,1760],{"type":46,"value":1724},{"type":41,"tag":111,"props":1756,"children":1758},{"className":1757},[],[1759],{"type":46,"value":932},{"type":46,"value":1732},{"type":41,"tag":62,"props":1762,"children":1763},{},[1764,1774],{"type":41,"tag":66,"props":1765,"children":1766},{},[1767,1769],{"type":46,"value":1768},"Subgraph membership changes derived from ",{"type":41,"tag":111,"props":1770,"children":1772},{"className":1771},[],[1773],{"type":46,"value":219},{"type":41,"tag":66,"props":1775,"children":1776},{},[1777,1782,1784,1789,1790,1796],{"type":41,"tag":111,"props":1778,"children":1780},{"className":1779},[],[1781],{"type":46,"value":1427},{"type":46,"value":1783},", ",{"type":41,"tag":111,"props":1785,"children":1787},{"className":1786},[],[1788],{"type":46,"value":1479},{"type":46,"value":1783},{"type":41,"tag":111,"props":1791,"children":1793},{"className":1792},[],[1794],{"type":46,"value":1795},"privilege_boundary",{"type":46,"value":1797},", and related sets",{"type":41,"tag":164,"props":1799,"children":1800},{},[1801,1822],{"type":41,"tag":168,"props":1802,"children":1803},{},[1804],{"type":41,"tag":172,"props":1805,"children":1806},{},[1807,1812,1817],{"type":41,"tag":176,"props":1808,"children":1809},{},[1810],{"type":46,"value":1811},"Argument",{"type":41,"tag":176,"props":1813,"children":1814},{},[1815],{"type":46,"value":1816},"Default",{"type":41,"tag":176,"props":1818,"children":1819},{},[1820],{"type":46,"value":1821},"Description",{"type":41,"tag":192,"props":1823,"children":1824},{},[1825,1847,1868],{"type":41,"tag":172,"props":1826,"children":1827},{},[1828,1837,1842],{"type":41,"tag":199,"props":1829,"children":1830},{},[1831],{"type":41,"tag":111,"props":1832,"children":1834},{"className":1833},[],[1835],{"type":46,"value":1836},"--before",{"type":41,"tag":199,"props":1838,"children":1839},{},[1840],{"type":46,"value":1841},"required",{"type":41,"tag":199,"props":1843,"children":1844},{},[1845],{"type":46,"value":1846},"Path to the \"before\" graph JSON",{"type":41,"tag":172,"props":1848,"children":1849},{},[1850,1859,1863],{"type":41,"tag":199,"props":1851,"children":1852},{},[1853],{"type":41,"tag":111,"props":1854,"children":1856},{"className":1855},[],[1857],{"type":46,"value":1858},"--after",{"type":41,"tag":199,"props":1860,"children":1861},{},[1862],{"type":46,"value":1841},{"type":41,"tag":199,"props":1864,"children":1865},{},[1866],{"type":46,"value":1867},"Path to the \"after\" graph JSON",{"type":41,"tag":172,"props":1869,"children":1870},{},[1871,1880,1889],{"type":41,"tag":199,"props":1872,"children":1873},{},[1874],{"type":41,"tag":111,"props":1875,"children":1877},{"className":1876},[],[1878],{"type":46,"value":1879},"--indent",{"type":41,"tag":199,"props":1881,"children":1882},{},[1883],{"type":41,"tag":111,"props":1884,"children":1886},{"className":1885},[],[1887],{"type":46,"value":1888},"2",{"type":41,"tag":199,"props":1890,"children":1891},{},[1892],{"type":46,"value":1893},"JSON output indentation",{"type":41,"tag":49,"props":1895,"children":1896},{},[1897,1902,1904,1910,1912,1917],{"type":41,"tag":111,"props":1898,"children":1900},{"className":1899},[],[1901],{"type":46,"value":932},{"type":46,"value":1903}," input format: Trailmark JSON exports from ",{"type":41,"tag":111,"props":1905,"children":1907},{"className":1906},[],[1908],{"type":46,"value":1909},"engine.to_json()",{"type":46,"value":1911},".\n",{"type":41,"tag":111,"props":1913,"children":1915},{"className":1914},[],[1916],{"type":46,"value":932},{"type":46,"value":1918}," output: JSON structural diff for nodes, edges, and subgraphs.",{"type":41,"tag":313,"props":1920,"children":1921},{},[],{"type":41,"tag":55,"props":1923,"children":1925},{"id":1924},"quality-checklist",[1926],{"type":46,"value":1927},"Quality Checklist",{"type":41,"tag":49,"props":1929,"children":1930},{},[1931],{"type":46,"value":1932},"Before delivering the report:",{"type":41,"tag":62,"props":1934,"children":1937},{"className":1935},[1936],"contains-task-list",[1938,1950,1959,1975,1991,2000,2009,2018,2027,2036],{"type":41,"tag":66,"props":1939,"children":1942},{"className":1940},[1941],"task-list-item",[1943,1948],{"type":41,"tag":1944,"props":1945,"children":1947},"input",{"disabled":456,"type":1946},"checkbox",[],{"type":46,"value":1949}," Both graphs built successfully (check summaries)",{"type":41,"tag":66,"props":1951,"children":1953},{"className":1952},[1941],[1954,1957],{"type":41,"tag":1944,"props":1955,"children":1956},{"disabled":456,"type":1946},[],{"type":46,"value":1958}," Pre-analysis ran on both snapshots",{"type":41,"tag":66,"props":1960,"children":1962},{"className":1961},[1941],[1963,1966,1968,1973],{"type":41,"tag":1944,"props":1964,"children":1965},{"disabled":456,"type":1946},[],{"type":46,"value":1967}," Native Trailmark diff computed and non-empty (",{"type":41,"tag":111,"props":1969,"children":1971},{"className":1970},[],[1972],{"type":46,"value":1463},{"type":46,"value":1974},")",{"type":41,"tag":66,"props":1976,"children":1978},{"className":1977},[1941],[1979,1982,1984,1990],{"type":41,"tag":1944,"props":1980,"children":1981},{"disabled":456,"type":1946},[],{"type":46,"value":1983}," Subgraph diff computed and non-empty (",{"type":41,"tag":111,"props":1985,"children":1987},{"className":1986},[],[1988],{"type":46,"value":1989},"subgraph_diff.json",{"type":46,"value":1974},{"type":41,"tag":66,"props":1992,"children":1994},{"className":1993},[1941],[1995,1998],{"type":41,"tag":1944,"props":1996,"children":1997},{"disabled":456,"type":1946},[],{"type":46,"value":1999}," All subgraph changes interpreted (tainted, blast radius, etc.)",{"type":41,"tag":66,"props":2001,"children":2003},{"className":2002},[1941],[2004,2007],{"type":41,"tag":1944,"props":2005,"children":2006},{"disabled":456,"type":1946},[],{"type":46,"value":2008}," Critical findings include evidence (node IDs, edge diffs)",{"type":41,"tag":66,"props":2010,"children":2012},{"className":2011},[1941],[2013,2016],{"type":41,"tag":1944,"props":2014,"children":2015},{"disabled":456,"type":1946},[],{"type":46,"value":2017}," Severity levels assigned to all findings",{"type":41,"tag":66,"props":2019,"children":2021},{"className":2020},[1941],[2022,2025],{"type":41,"tag":1944,"props":2023,"children":2024},{"disabled":456,"type":1946},[],{"type":46,"value":2026}," Source-level context added via git diff cross-reference",{"type":41,"tag":66,"props":2028,"children":2030},{"className":2029},[1941],[2031,2034],{"type":41,"tag":1944,"props":2032,"children":2033},{"disabled":456,"type":1946},[],{"type":46,"value":2035}," Worktrees cleaned up (or temp dirs removed)",{"type":41,"tag":66,"props":2037,"children":2039},{"className":2038},[1941],[2040,2043,2045],{"type":41,"tag":1944,"props":2041,"children":2042},{"disabled":456,"type":1946},[],{"type":46,"value":2044}," Report written to ",{"type":41,"tag":111,"props":2046,"children":2048},{"className":2047},[],[2049],{"type":46,"value":2050},"GRAPH_EVOLUTION_*.md",{"type":41,"tag":313,"props":2052,"children":2053},{},[],{"type":41,"tag":55,"props":2055,"children":2057},{"id":2056},"integration",[2058],{"type":46,"value":2059},"Integration",{"type":41,"tag":49,"props":2061,"children":2062},{},[2063,2068],{"type":41,"tag":326,"props":2064,"children":2065},{},[2066],{"type":46,"value":2067},"trailmark skill:",{"type":46,"value":2069},"\nPhase 2 uses the trailmark API for graph building and pre-analysis.\nAll trailmark query patterns work on either snapshot's engine.",{"type":41,"tag":49,"props":2071,"children":2072},{},[2073,2078],{"type":41,"tag":326,"props":2074,"children":2075},{},[2076],{"type":46,"value":2077},"differential-review skill:",{"type":46,"value":2079},"\nUse graph-evolution for structural analysis, differential-review for\nline-level code review. The two are complementary — graph-evolution\nfinds attack paths that text diffs miss, while differential-review\nprovides git blame context and micro-adversarial analysis.",{"type":41,"tag":49,"props":2081,"children":2082},{},[2083,2088],{"type":41,"tag":326,"props":2084,"children":2085},{},[2086],{"type":46,"value":2087},"trailmark-review-gate skill:",{"type":46,"value":2089},"\nUse trailmark-review-gate after graph-evolution when a branch, pull request,\nfix commit, or release diff needs a PASS\u002FWARN\u002FFAIL\u002FUNKNOWN structural review\npacket. The gate applies deterministic review rules to graph-evolution output;\nit does not replace human review.",{"type":41,"tag":49,"props":2091,"children":2092},{},[2093,2098],{"type":41,"tag":326,"props":2094,"children":2095},{},[2096],{"type":46,"value":2097},"genotoxic skill:",{"type":46,"value":2099},"\nIf graph-evolution reveals new high-CC tainted nodes, feed them to\ngenotoxic for mutation testing triage.",{"type":41,"tag":49,"props":2101,"children":2102},{},[2103,2108,2110,2116,2118,2124],{"type":41,"tag":326,"props":2104,"children":2105},{},[2106],{"type":46,"value":2107},"diagramming-code skill:",{"type":46,"value":2109},"\nGenerate before\u002Fafter diagrams to visualize structural changes.\nUse ",{"type":41,"tag":111,"props":2111,"children":2113},{"className":2112},[],[2114],{"type":46,"value":2115},"call-graph",{"type":46,"value":2117}," or ",{"type":41,"tag":111,"props":2119,"children":2121},{"className":2120},[],[2122],{"type":46,"value":2123},"data-flow",{"type":46,"value":2125}," diagrams focused on changed nodes.",{"type":41,"tag":313,"props":2127,"children":2128},{},[],{"type":41,"tag":55,"props":2130,"children":2132},{"id":2131},"supporting-documentation",[2133],{"type":46,"value":2134},"Supporting Documentation",{"type":41,"tag":62,"props":2136,"children":2137},{},[2138,2150],{"type":41,"tag":66,"props":2139,"children":2140},{},[2141,2148],{"type":41,"tag":326,"props":2142,"children":2143},{},[2144],{"type":41,"tag":1394,"props":2145,"children":2146},{"href":1625},[2147],{"type":46,"value":1625},{"type":46,"value":2149}," —\nWhat each structural metric means and why it matters for security",{"type":41,"tag":66,"props":2151,"children":2152},{},[2153,2160],{"type":41,"tag":326,"props":2154,"children":2155},{},[2156],{"type":41,"tag":1394,"props":2157,"children":2158},{"href":1396},[2159],{"type":46,"value":1396},{"type":46,"value":2161}," —\nReport template, severity classification, and example findings",{"type":41,"tag":2163,"props":2164,"children":2165},"style",{},[2166],{"type":46,"value":2167},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2169,"total":2264},[2170,2187,2197,2215,2230,2243,2254],{"slug":2171,"name":2171,"fn":2172,"description":2173,"org":2174,"tags":2175,"stars":23,"repoUrl":24,"updatedAt":2186},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2176,2179,2182,2183],{"name":2177,"slug":2178,"type":16},"C#","c",{"name":2180,"slug":2181,"type":16},"Debugging","debugging",{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},"Testing","testing","2026-07-17T06:05:14.925095",{"slug":2188,"name":2188,"fn":2189,"description":2190,"org":2191,"tags":2192,"stars":23,"repoUrl":24,"updatedAt":2196},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2193,2194,2195],{"name":2177,"slug":2178,"type":16},{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},"2026-07-17T06:05:12.433192",{"slug":2198,"name":2198,"fn":2199,"description":2200,"org":2201,"tags":2202,"stars":23,"repoUrl":24,"updatedAt":2214},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2203,2206,2209,2210,2213],{"name":2204,"slug":2205,"type":16},"Agents","agents",{"name":2207,"slug":2208,"type":16},"CI\u002FCD","ci-cd",{"name":21,"slug":22,"type":16},{"name":2211,"slug":2212,"type":16},"GitHub Actions","github-actions",{"name":14,"slug":15,"type":16},"2026-07-18T05:47:48.564744",{"slug":2216,"name":2216,"fn":2217,"description":2218,"org":2219,"tags":2220,"stars":23,"repoUrl":24,"updatedAt":2229},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2221,2224,2225,2226],{"name":2222,"slug":2223,"type":16},"Audit","audit",{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"name":2227,"slug":2228,"type":16},"Smart Contracts","smart-contracts","2026-07-18T05:47:43.989063",{"slug":2231,"name":2231,"fn":2232,"description":2233,"org":2234,"tags":2235,"stars":23,"repoUrl":24,"updatedAt":2242},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2236,2239],{"name":2237,"slug":2238,"type":16},"Engineering","engineering",{"name":2240,"slug":2241,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":2244,"name":2244,"fn":2245,"description":2246,"org":2247,"tags":2248,"stars":23,"repoUrl":24,"updatedAt":2253},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2249,2251,2252],{"name":2250,"slug":692,"type":16},"Python",{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},"2026-07-17T06:05:14.575191",{"slug":2255,"name":2255,"fn":2256,"description":2257,"org":2258,"tags":2259,"stars":23,"repoUrl":24,"updatedAt":2263},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2260,2261,2262],{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-08-01T05:44:54.920542",77,{"items":2266,"total":2370},[2267,2274,2280,2288,2295,2300,2306,2312,2325,2336,2348,2359],{"slug":2171,"name":2171,"fn":2172,"description":2173,"org":2268,"tags":2269,"stars":23,"repoUrl":24,"updatedAt":2186},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2270,2271,2272,2273],{"name":2177,"slug":2178,"type":16},{"name":2180,"slug":2181,"type":16},{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},{"slug":2188,"name":2188,"fn":2189,"description":2190,"org":2275,"tags":2276,"stars":23,"repoUrl":24,"updatedAt":2196},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2277,2278,2279],{"name":2177,"slug":2178,"type":16},{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},{"slug":2198,"name":2198,"fn":2199,"description":2200,"org":2281,"tags":2282,"stars":23,"repoUrl":24,"updatedAt":2214},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2283,2284,2285,2286,2287],{"name":2204,"slug":2205,"type":16},{"name":2207,"slug":2208,"type":16},{"name":21,"slug":22,"type":16},{"name":2211,"slug":2212,"type":16},{"name":14,"slug":15,"type":16},{"slug":2216,"name":2216,"fn":2217,"description":2218,"org":2289,"tags":2290,"stars":23,"repoUrl":24,"updatedAt":2229},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2291,2292,2293,2294],{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"name":2227,"slug":2228,"type":16},{"slug":2231,"name":2231,"fn":2232,"description":2233,"org":2296,"tags":2297,"stars":23,"repoUrl":24,"updatedAt":2242},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2298,2299],{"name":2237,"slug":2238,"type":16},{"name":2240,"slug":2241,"type":16},{"slug":2244,"name":2244,"fn":2245,"description":2246,"org":2301,"tags":2302,"stars":23,"repoUrl":24,"updatedAt":2253},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2303,2304,2305],{"name":2250,"slug":692,"type":16},{"name":14,"slug":15,"type":16},{"name":2184,"slug":2185,"type":16},{"slug":2255,"name":2255,"fn":2256,"description":2257,"org":2307,"tags":2308,"stars":23,"repoUrl":24,"updatedAt":2263},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2309,2310,2311],{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"slug":2313,"name":2313,"fn":2314,"description":2315,"org":2316,"tags":2317,"stars":23,"repoUrl":24,"updatedAt":2324},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2318,2321,2322,2323],{"name":2319,"slug":2320,"type":16},"Architecture","architecture",{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":2237,"slug":2238,"type":16},"2026-07-18T05:47:40.122449",{"slug":2326,"name":2326,"fn":2327,"description":2328,"org":2329,"tags":2330,"stars":23,"repoUrl":24,"updatedAt":2335},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2331,2332,2333,2334],{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":2237,"slug":2238,"type":16},{"name":14,"slug":15,"type":16},"2026-07-18T05:47:39.210985",{"slug":2337,"name":2337,"fn":2338,"description":2339,"org":2340,"tags":2341,"stars":23,"repoUrl":24,"updatedAt":2347},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2342,2343,2346],{"name":2222,"slug":2223,"type":16},{"name":2344,"slug":2345,"type":16},"CLI","cli",{"name":14,"slug":15,"type":16},"2026-07-17T06:05:33.198077",{"slug":2349,"name":2349,"fn":2350,"description":2351,"org":2352,"tags":2353,"stars":23,"repoUrl":24,"updatedAt":2358},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2354,2355,2356,2357],{"name":2222,"slug":2223,"type":16},{"name":2177,"slug":2178,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-07-17T06:05:11.333374",{"slug":2360,"name":2360,"fn":2361,"description":2362,"org":2363,"tags":2364,"stars":23,"repoUrl":24,"updatedAt":2369},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2365,2366,2367,2368],{"name":2222,"slug":2223,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"name":2227,"slug":2228,"type":16},"2026-07-18T05:47:42.84568",111]