HackerTrans
TopNewTrendsCommentsPastAskShowJobs

huali

no profile record

Submissions

Show HN: Vho – AST-based analysis for better AI refactoring of large codebases

vue-hook-optimizer.vercel.app
7 points·by huali·قبل 6 أشهر·2 comments

Show HN: Refactor Vue/React Components with Label Propagation and Claude Code

vue-hook-optimizer.vercel.app
1 points·by huali·قبل 6 أشهر·1 comments

Skill for Vue/React refactoring driven by VHO analysis

github.com
1 points·by huali·قبل 7 أشهر·1 comments

comments

huali
·قبل 6 أشهر·discuss
Most AI coding tools fail at large-scale refactoring because they lack a structural understanding of the code's "gravity."

I've been experimenting with applying the Label Propagation Algorithm (LPA) to AST dependency graphs. By treating variables and functions as nodes, we can identify communities (clusters) within a single file.

I integrated this into a tool for Claude Code called VHO. It helps dismantle monolithic React/Vue hooks by grounded mathematical analysis rather than just LLM prediction.

Technical breakdown:

AST Parsing: To build the reference graph. LPA: To find the optimal boundaries for extraction. Agentic Execution: Using Claude Code to perform the actual file I/O and refactoring. Is graph-theory-assisted refactoring the future of AI coding? I'd love to discuss the methodology.

Link: https://github.com/zcf0508/vue-hook-optimizer
huali
·قبل 6 أشهر·discuss
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
huali
·قبل 6 أشهر·discuss
[dead]
huali
·قبل 6 أشهر·discuss
I've built a lightweight Memory MCP service to efficiently store conversation memories. It only implements essential *CRUD* (Create, Read, Update, Delete) methods, minimizing token usage.

Deploy the service on your cloud server or your local computer, then add the streamable MCP and skill to Claude Code.

To activate in a new conversation, simply reference the skill first: `@~/.claude/skills/mem/SKILL.md`.

If you like this project, please give it a star on GitHub!
huali
·قبل 7 أشهر·discuss
I just shipped variable community detection using Label Propagation to identify which variables and methods naturally belong together. Instead of guessing refactoring boundaries, the tool now visualizes tightly-coupled groups that should be extracted as Composables/Hooks.

Works with Vue 3 and React. Install via VS Code extension, playground, or MCP server. Includes refactoring skills to guide the actual extraction process.

Dependency graphs + community analysis = clearer path to clean architecture.