Comment

Comment by huali

The Secret Sauce:Instead of simple heuristic parsing, I used the Label Propagation Algorithm (LPA). It treats variables and methods as nodes in a dependency graph and detects "communities." These communities are the natural boundaries for a Composable or Hook.

Now Integrated with Claude Code:I’ve implemented this as a Claude Code Skill. This allows the AI to not just "guess" how to refactor, but to follow a mathematically-backed community analysis to extract logic sustainably.

Stack:

- Core: Graph-based dependency analysis.

- Delivery: VS Code Ext, MCP Server, and Claude Code Skill.

- Supports: Vue 3 (Script Setup) and React.

I’m curious—do you trust AI to define your refactoring boundaries, or do you prefer a visualization tool to guide you?

Repo: https://github.com/zcf0508/vue-hook-optimizer

Playground: https://vue-hook-optimizer.vercel.app

parent huali 10 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton