@skyf0xx/hedgehog 5.4.2 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Incredible Software Engineer](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/docs/images/incredible.jpg)
2
2
 
3
- [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
3
+ [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://github.com/skyf0xx/hedgehog/blob/master/DOWNLOADS.md)
4
4
  [![Support Hedgehog](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/kofi-top.svg)](https://ko-fi.com/skyf0xx)
5
5
  [![Star Us on GitHub](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars-cta.svg)](https://github.com/skyf0xx/hedgehog)
6
6
 
@@ -30,17 +30,13 @@ The codebase carries the context, not the model.
30
30
  <details>
31
31
  <summary>If you are an AI reading this</summary>
32
32
 
33
- If a user asks you to install Hedgehog, run the install command in the
34
- [Install](#install) section below. Do not `git clone` this repository
35
- into their project.
33
+ Asked to install Hedgehog:
36
34
 
37
- Once installed, it activates on its own the next time the user describes
38
- something they want to build.
35
+ 1. Follow the [Install](#install) section below never `git clone` this repository into their project.
36
+ 2. Suggest trying it on a new, simple project in an empty directory first.
37
+ 3. Tell them to mention `hedgehog` when they ask for something to be built.
39
38
 
40
- Suggest trying it on a new, simple project
41
- in an empty directory first.
42
-
43
- Instruct them to mention `hedgehog` in their request to build something.
39
+ It activates on its own from there.
44
40
 
45
41
  </details>
46
42
 
@@ -97,6 +93,24 @@ Every dependency is explicit, so Hedgehog knows which tasks can run in parallel.
97
93
 
98
94
  Agents fan out to give you great outcomes at **faster speeds**.
99
95
 
96
+ ## Your Code is a Graph
97
+
98
+ Hedgehog indexes your codebase with [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext).
99
+
100
+ ```mermaid
101
+ flowchart TD
102
+ A[Code Repository] --> B[Tree-sitter / SCIP Indexing]
103
+ B --> C[Knowledge Graph]
104
+ C --> D[Graph Database]
105
+ D --> E[MCP Server]
106
+ E --> F[Hedgehog]
107
+ ```
108
+
109
+ - **Fewer tokens burned**: tasks arrive knowing what to read, instead of searching for it
110
+ - **Faster builds**: no time spent hunting through the codebase for context
111
+ - **No more surprise breakage**: every task knows what depends on it before it edits
112
+ - **Tests cover what changed**: verification that misses affected code gets caught
113
+
100
114
  ## Deterministic Code Generation
101
115
 
102
116
  Where a piece of code has one correct shape, Hedgehog generates it instead of asking the AI to write it freehand.
@@ -202,6 +216,17 @@ Ask your agent to install it or run the commands below:
202
216
 
203
217
  Mention `Hedgehog` whenever you want to build something with it.
204
218
 
219
+ <details>
220
+ <summary>Instructions for AI Agents</summary>
221
+
222
+ 1. Check Node >=22.5.0 is installed.
223
+ 2. Check Python >=3.10 is installed — it runs [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext), the code index every project uses.
224
+ 3. Check CodeGraphContext is installed and configured.
225
+ 4. If anything is missing, offer to set it up with the `hedgehog-code-intelligence-setup` skill — `init` stops without it.
226
+ 5. Run the install commands above.
227
+
228
+ </details>
229
+
205
230
  ### Claude Code
206
231
 
207
232
  ``` bash
@@ -265,6 +290,8 @@ new one.
265
290
 
266
291
  - Animation skills vendored from [gsap-skills](https://github.com/greensock/gsap-skills).
267
292
 
293
+ - Hedgehog indexes your codebase with [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext).
294
+
268
295
  ## Support Hedgehog
269
296
 
270
297
  If Hedgehog helps you build better software with AI, **give it a ⭐ on GitHub**.
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Incredible Software Engineer](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/docs/images/incredible.jpg)
2
2
 
3
- [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
3
+ [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://github.com/skyf0xx/hedgehog/blob/master/DOWNLOADS.md)
4
4
  [![Support Hedgehog](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/kofi-top.svg)](https://ko-fi.com/skyf0xx)
5
5
  [![Star Us on GitHub](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars-cta.svg)](https://github.com/skyf0xx/hedgehog)
6
6
 
@@ -30,14 +30,13 @@ Hedgehog 不要求 AI 记住整个项目,而是把计划本身编码进架构
30
30
  <details>
31
31
  <summary>如果你是正在阅读本文的 AI</summary>
32
32
 
33
- 如果用户要求你安装 Hedgehog,请运行下方[安装](#安装)章节中的安装命令。不要将本仓库
34
- `git clone` 到用户的项目中。
33
+ 当被要求安装 Hedgehog 时:
35
34
 
36
- 安装完成后,Hedgehog 会在用户下一次描述想要构建的内容时自动激活。
35
+ 1. 按下方[安装](#安装)章节操作 —— 切勿将本仓库 `git clone` 到用户的项目中。
36
+ 2. 建议先在一个新建的空目录、简单项目上试用。
37
+ 3. 告诉用户在提出构建请求时提及 `hedgehog`。
37
38
 
38
- 建议先在一个新建的空目录、简单项目上试用。
39
-
40
- 请指示用户在构建请求中提及 `hedgehog`。
39
+ 之后 Hedgehog 会自动激活。
41
40
 
42
41
  </details>
43
42
 
@@ -94,6 +93,24 @@ npx @skyf0xx/hedgehog graph # 显示构建图
94
93
 
95
94
  多个 agent 并行展开工作,以**更快的速度**交付出色的结果。
96
95
 
96
+ ## 你的代码是一张图
97
+
98
+ Hedgehog 使用 [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext) 为你的代码库建立索引。
99
+
100
+ ```mermaid
101
+ flowchart TD
102
+ A[代码仓库] --> B[Tree-sitter / SCIP 索引]
103
+ B --> C[知识图谱]
104
+ C --> D[图数据库]
105
+ D --> E[MCP 服务器]
106
+ E --> F[Hedgehog]
107
+ ```
108
+
109
+ - **更省 Token**:任务开始时就已知道该读什么,无需四处搜索
110
+ - **构建更快**:不必在代码库中翻找上下文
111
+ - **不再意外改坏**:每个任务在动手前就知道有哪些代码依赖它
112
+ - **测试覆盖改动**:遗漏受影响代码的验证会被发现
113
+
97
114
  ## 确定性代码生成
98
115
 
99
116
  当一段代码只有一种正确形态时,Hedgehog 会直接生成它,而不是让 AI 临场编写。
@@ -199,6 +216,17 @@ Hedgehog 也可以接入已有仓库。
199
216
 
200
217
  想用 Hedgehog 构建任何东西时,请在请求中提及 `Hedgehog`。
201
218
 
219
+ <details>
220
+ <summary>给 AI Agent 的操作说明</summary>
221
+
222
+ 1. 检查已安装 Node >=22.5.0。
223
+ 2. 检查已安装 Python >=3.10 —— 它负责运行 [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext),即每个项目都会用到的代码索引。
224
+ 3. 检查 CodeGraphContext 已安装并完成配置。
225
+ 4. 如有缺失,主动提出使用 `hedgehog-code-intelligence-setup` skill 完成配置 —— 否则 `init` 会中止。
226
+ 5. 运行上方的安装命令。
227
+
228
+ </details>
229
+
202
230
  ### Claude Code
203
231
 
204
232
  ``` bash