analyze_pr_behavior
Compare working tree against a base ref's merge-base via a detached worktree; output added/removed/modified node counts, affected workflows and narratives, top 25 risk nodes, and dirty-tree state.
Instructions
Computes a behavioral diff between the working tree and the merge-base of HEAD with a base ref, using a detached git worktree. Returns added, removed and modified node counts (modified = same declaration, changed body hash — a rewrite that keeps its name and callees), the affected workflows with narratives, and the top 25 nodes by risk. Reports whether the working tree was dirty, since that makes the result non-reproducible from commits alone. Requires a git repository with a resolvable base ref: if none exists the call returns an error rather than a fabricated baseline. Base ref defaults to origin/main, then origin/master, main, master, HEAD~1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseRef | No | Git ref to find the merge-base against. Example: 'origin/develop' or a commit SHA. |