Files
nexus/wiki/entities/CodeWeaver.md

39 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "CodeWeaver"
type: entity
tags: [github, ai-tool, documentation, code-analysis]
---
## 基本信息
- **类型**GitHub 开源工具
- **仓库**https://github.com/tesserato/CodeWeaver
- **用途**:将任意代码库转换为可导航 Markdown 文档
## 核心功能
将整个项目(无论代码规模多大)编织成树形 Markdown 文件:
- 每个文件的内容被包装在代码块中
- 树形目录结构一目了然
- 极大简化代码库共享、文档化和 AI/ML 工具集成
## 解决的问题
- 大型代码库上下文窗口压力CodeWeaver 将代码压缩为结构化 Markdown降低 AI 处理的 token 消耗
- 代码共享困难:直接分享一个 Markdown 文件即可完整表达项目结构
- AI 上下文注入:结构化 Markdown 比原始代码更易于 AI 理解和分析
## 技术原理
通过 AST抽象语法树分析项目结构保留
- 目录层级关系
- 文件命名和位置
- 代码块(带语言标注)
- 注释和文档字符串
## 与 Vibe Coding 的关系
[[vibe-coding经验收集]] 中提及CodeWeaver 是降低 AI 编程上下文复杂度的工具之一,配合:
- 文件头注释规范
- 设计文档优先
- 双 AI review
## Aliases
- codeweaver
- tesserato/CodeWeaver