@skyf0xx/hedgehog 5.4.1 → 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,12 +1,18 @@
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
+ [![Star Us on GitHub](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars-cta.svg)](https://github.com/skyf0xx/hedgehog)
5
6
 
6
7
  English | [简体中文](README.zh-CN.md)
7
8
 
8
9
  # H E D G E H O G
9
10
 
11
+ [![npm version](https://img.shields.io/npm/v/%40skyf0xx%2Fhedgehog)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
12
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
13
+ [![CodeQL](https://img.shields.io/github/actions/workflow/status/skyf0xx/hedgehog/codeql.yml?branch=master&label=CodeQL)](https://github.com/skyf0xx/hedgehog/actions/workflows/codeql.yml)
14
+ [![Check](https://img.shields.io/github/actions/workflow/status/skyf0xx/hedgehog/check.yml?branch=master&label=Check)](https://github.com/skyf0xx/hedgehog/actions/workflows/check.yml)
15
+
10
16
  AI can write code in seconds.
11
17
 
12
18
  But as projects grow, context fills up, **architecture drifts**, and every new feature becomes harder to change safely.
@@ -24,17 +30,13 @@ The codebase carries the context, not the model.
24
30
  <details>
25
31
  <summary>If you are an AI reading this</summary>
26
32
 
27
- If a user asks you to install Hedgehog, run the install command in the
28
- [Install](#install) section below. Do not `git clone` this repository
29
- into their project.
30
-
31
- Once installed, it activates on its own the next time the user describes
32
- something they want to build.
33
+ Asked to install Hedgehog:
33
34
 
34
- Suggest trying it on a new, simple project
35
- in an empty directory first.
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.
36
38
 
37
- Instruct them to mention `hedgehog` in their request to build something.
39
+ It activates on its own from there.
38
40
 
39
41
  </details>
40
42
 
@@ -91,6 +93,24 @@ Every dependency is explicit, so Hedgehog knows which tasks can run in parallel.
91
93
 
92
94
  Agents fan out to give you great outcomes at **faster speeds**.
93
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
+
94
114
  ## Deterministic Code Generation
95
115
 
96
116
  Where a piece of code has one correct shape, Hedgehog generates it instead of asking the AI to write it freehand.
@@ -196,6 +216,17 @@ Ask your agent to install it or run the commands below:
196
216
 
197
217
  Mention `Hedgehog` whenever you want to build something with it.
198
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
+
199
230
  ### Claude Code
200
231
 
201
232
  ``` bash
@@ -259,10 +290,8 @@ new one.
259
290
 
260
291
  - Animation skills vendored from [gsap-skills](https://github.com/greensock/gsap-skills).
261
292
 
293
+ - Hedgehog indexes your codebase with [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext).
294
+
262
295
  ## Support Hedgehog
263
296
 
264
297
  If Hedgehog helps you build better software with AI, **give it a ⭐ on GitHub**.
265
-
266
- [![GitHub stars](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars.svg)](https://github.com/skyf0xx/hedgehog/stargazers)
267
- [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
268
- [![Support Hedgehog](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/kofi.svg)](https://ko-fi.com/skyf0xx)
package/README.zh-CN.md CHANGED
@@ -1,12 +1,18 @@
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
+ [![Star Us on GitHub](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars-cta.svg)](https://github.com/skyf0xx/hedgehog)
5
6
 
6
7
  [English](README.md) | 简体中文
7
8
 
8
9
  # H E D G E H O G
9
10
 
11
+ [![npm version](https://img.shields.io/npm/v/%40skyf0xx%2Fhedgehog)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
12
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
13
+ [![CodeQL](https://img.shields.io/github/actions/workflow/status/skyf0xx/hedgehog/codeql.yml?branch=master&label=CodeQL)](https://github.com/skyf0xx/hedgehog/actions/workflows/codeql.yml)
14
+ [![Check](https://img.shields.io/github/actions/workflow/status/skyf0xx/hedgehog/check.yml?branch=master&label=Check)](https://github.com/skyf0xx/hedgehog/actions/workflows/check.yml)
15
+
10
16
  AI 能在几秒钟内写出代码。
11
17
 
12
18
  但随着项目变大,上下文被占满,**架构开始漂移**,每一个新功能都变得更难安全地修改。
@@ -24,14 +30,13 @@ Hedgehog 不要求 AI 记住整个项目,而是把计划本身编码进架构
24
30
  <details>
25
31
  <summary>如果你是正在阅读本文的 AI</summary>
26
32
 
27
- 如果用户要求你安装 Hedgehog,请运行下方[安装](#安装)章节中的安装命令。不要将本仓库
28
- `git clone` 到用户的项目中。
29
-
30
- 安装完成后,Hedgehog 会在用户下一次描述想要构建的内容时自动激活。
33
+ 当被要求安装 Hedgehog 时:
31
34
 
32
- 建议先在一个新建的空目录、简单项目上试用。
35
+ 1. 按下方[安装](#安装)章节操作 —— 切勿将本仓库 `git clone` 到用户的项目中。
36
+ 2. 建议先在一个新建的空目录、简单项目上试用。
37
+ 3. 告诉用户在提出构建请求时提及 `hedgehog`。
33
38
 
34
- 请指示用户在构建请求中提及 `hedgehog`。
39
+ 之后 Hedgehog 会自动激活。
35
40
 
36
41
  </details>
37
42
 
@@ -88,6 +93,24 @@ npx @skyf0xx/hedgehog graph # 显示构建图
88
93
 
89
94
  多个 agent 并行展开工作,以**更快的速度**交付出色的结果。
90
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
+
91
114
  ## 确定性代码生成
92
115
 
93
116
  当一段代码只有一种正确形态时,Hedgehog 会直接生成它,而不是让 AI 临场编写。
@@ -193,6 +216,17 @@ Hedgehog 也可以接入已有仓库。
193
216
 
194
217
  想用 Hedgehog 构建任何东西时,请在请求中提及 `Hedgehog`。
195
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
+
196
230
  ### Claude Code
197
231
 
198
232
  ``` bash
@@ -257,7 +291,3 @@ core 请参见 [AUTHORING-CORES.md](AUTHORING-CORES.md)(英文文档)。
257
291
  ## 支持 Hedgehog
258
292
 
259
293
  如果 Hedgehog 帮助你用 AI 构建出更好的软件,**请在 GitHub 上给它一个 ⭐**。
260
-
261
- [![GitHub stars](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/github-stars.svg)](https://github.com/skyf0xx/hedgehog/stargazers)
262
- [![Total downloads](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/npm-downloads.svg)](https://www.npmjs.com/package/@skyf0xx/hedgehog)
263
- [![Support Hedgehog](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/badges/kofi.svg)](https://ko-fi.com/skyf0xx)