From backend-factory
Compare architecture between two git commits or branches and visualize the differences
npx claudepluginhub randyquaye/backend-come-alive --plugin backend-factoryThis skill is limited to using the following tools:
Compare the backend architecture at two git refs and visualize what changed — like a factory renovation blueprint.
Triggers research for existing libraries, tools, and patterns before coding new features. Searches npm, PyPI, MCP/skills, GitHub; evaluates matches and decides adopt/extend/build.
Audits cross-stack repos (C++/Android/iOS/Web), classifies files as project/third-party/artifacts, detects embedded libraries, assigns module verdicts, generates interactive HTML reports.
Reorganizes X and LinkedIn networks: review-first pruning of low-value follows, priority-based add/follow recommendations, and drafts warm outreach in user's voice.
Share bugs, ideas, or general feedback.
Compare the backend architecture at two git refs and visualize what changed — like a factory renovation blueprint.
curl -s http://localhost:7777/api/status
If the server is not running, tell the user to run /backend-factory:start first.
Parse two git refs from $ARGUMENTS:
REF_OLD and REF_NEWREF_OLD and HEAD as REF_NEWREF_OLD=HEAD~1 and REF_NEW=HEADValidate both refs exist:
git rev-parse --verify "$REF_OLD" && git rev-parse --verify "$REF_NEW"
For each ref, extract the project state and run the analysis script. Use git worktree to avoid destructive checkouts:
# Analyze OLD ref
git worktree add /tmp/factory-diff-old-$$ "$REF_OLD" --detach 2>/dev/null
TMPFILE_OLD=$(mktemp /tmp/factory-diff-old-XXXXXX.json)
node ${CLAUDE_PLUGIN_ROOT}/analysis/analyze.js /tmp/factory-diff-old-$$ > "$TMPFILE_OLD"
git worktree remove /tmp/factory-diff-old-$$ --force 2>/dev/null
# Analyze NEW ref
git worktree add /tmp/factory-diff-new-$$ "$REF_NEW" --detach 2>/dev/null
TMPFILE_NEW=$(mktemp /tmp/factory-diff-new-XXXXXX.json)
node ${CLAUDE_PLUGIN_ROOT}/analysis/analyze.js /tmp/factory-diff-new-$$ > "$TMPFILE_NEW"
git worktree remove /tmp/factory-diff-new-$$ --force 2>/dev/null
Read both JSON files and produce a diff by comparing nodes, edges, and actions.
For every node, match by id across old and new:
diff_status: "added".diff_status: "removed".diff_status: "modified". Include diff_changes array.diff_status: "unchanged".Compare edges (connections between nodes):
Compare actions (route flows, worker flows, etc.):
Construct a combined architecture JSON with ALL nodes from both states, each annotated with diff_status. Enrich ALL nodes with full metadata following the same enrichment rules from /backend-factory:start and /backend-factory:analyze.
Add a diff_summary top-level field with counts and lists.
TMPFILE_DIFF=$(mktemp /tmp/factory-diff-XXXXXX.json)
# Write the diff architecture JSON to the file
curl -s -X POST http://localhost:7777/api/architecture \
-H "Content-Type: application/json" \
-d @"$TMPFILE_DIFF"
rm -f "$TMPFILE_OLD" "$TMPFILE_NEW" "$TMPFILE_DIFF"
Report the diff with a creative "factory renovation report" narration:
End with:
/backend-factory:start, /backend-factory:analyze, /backend-factory:simulate