@skyf0xx/hedgehog 5.4.2 → 6.0.3
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 +38 -13
- package/README.zh-CN.md +35 -7
- package/bin/cli.mjs +714 -12
- package/package.json +3 -2
- package/src/agents/bootstrap.md +10 -5
- package/src/agents/planner.md +19 -9
- package/src/agents/tweaker.md +10 -2
- package/src/db/code-intelligence-requires.mjs +296 -0
- package/src/db/code-intelligence.mjs +291 -0
- package/src/db/community.mjs +26 -1
- package/src/db/core.mjs +3 -2
- package/src/db/drift.mjs +15 -0
- package/src/db/friction.mjs +75 -0
- package/src/db/gate.mjs +1 -1
- package/src/db/next.mjs +39 -2
- package/src/db/plan.mjs +65 -8
- package/src/db/rebuild.mjs +7 -0
- package/src/db/schema.mjs +6 -1
- package/src/db/status.mjs +108 -9
- package/src/hosts/claude-md-merge.mjs +69 -0
- package/src/hosts/gemini/gemini-extension.json +1 -1
- package/src/hosts/version.mjs +6 -3
- package/src/registry/cores.json +5 -5
- package/src/registry/fetch.mjs +43 -10
- package/src/registry/index.mjs +10 -8
- package/src/registry/installed.mjs +35 -7
- package/src/registry/manifest.mjs +23 -8
- package/src/skills/hedgehog-code-intelligence-setup/SKILL.md +586 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
[](https://
|
|
3
|
+
[](https://github.com/skyf0xx/hedgehog/blob/master/DOWNLOADS.md)
|
|
4
4
|
[](https://ko-fi.com/skyf0xx)
|
|
5
5
|
[](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
|
-
|
|
34
|
-
[Install](#install) section below. Do not `git clone` this repository
|
|
35
|
-
into their project.
|
|
33
|
+
Asked to install Hedgehog:
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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.
|
|
@@ -188,9 +202,7 @@ Where possible, Hedgehog uses a battle-tested blueprint in [`hedgehog-core-autho
|
|
|
188
202
|
|
|
189
203
|
### Existing codebases
|
|
190
204
|
|
|
191
|
-
Hedgehog also adopts onto
|
|
192
|
-
|
|
193
|
-
It scans the repo's shape and is able to create new changes with the same scoped, verified, committed loop.
|
|
205
|
+
Hedgehog also adopts onto a repo it didn't build. It reads the repo and proposes a layer chain that verifies with the repo's own test/lint/build commands.
|
|
194
206
|
|
|
195
207
|
## Why Hedgehog Works
|
|
196
208
|
|
|
@@ -202,6 +214,17 @@ Ask your agent to install it or run the commands below:
|
|
|
202
214
|
|
|
203
215
|
Mention `Hedgehog` whenever you want to build something with it.
|
|
204
216
|
|
|
217
|
+
<details>
|
|
218
|
+
<summary>Instructions for AI Agents</summary>
|
|
219
|
+
|
|
220
|
+
1. Check Node >=22.5.0 is installed.
|
|
221
|
+
2. Check Python >=3.10 is installed — it runs [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext), the code index every project uses.
|
|
222
|
+
3. Check CodeGraphContext is installed and configured.
|
|
223
|
+
4. If anything is missing, offer to set it up with the `hedgehog-code-intelligence-setup` skill — `init` stops without it.
|
|
224
|
+
5. Run the install commands below.
|
|
225
|
+
|
|
226
|
+
</details>
|
|
227
|
+
|
|
205
228
|
### Claude Code
|
|
206
229
|
|
|
207
230
|
``` bash
|
|
@@ -265,6 +288,8 @@ new one.
|
|
|
265
288
|
|
|
266
289
|
- Animation skills vendored from [gsap-skills](https://github.com/greensock/gsap-skills).
|
|
267
290
|
|
|
291
|
+
- Hedgehog indexes your codebase with [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext).
|
|
292
|
+
|
|
268
293
|
## Support Hedgehog
|
|
269
294
|
|
|
270
295
|
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
|

|
|
2
2
|
|
|
3
|
-
[](https://
|
|
3
|
+
[](https://github.com/skyf0xx/hedgehog/blob/master/DOWNLOADS.md)
|
|
4
4
|
[](https://ko-fi.com/skyf0xx)
|
|
5
5
|
[](https://github.com/skyf0xx/hedgehog)
|
|
6
6
|
|
|
@@ -30,14 +30,13 @@ Hedgehog 不要求 AI 记住整个项目,而是把计划本身编码进架构
|
|
|
30
30
|
<details>
|
|
31
31
|
<summary>如果你是正在阅读本文的 AI</summary>
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
`git clone` 到用户的项目中。
|
|
33
|
+
当被要求安装 Hedgehog 时:
|
|
35
34
|
|
|
36
|
-
|
|
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
|