hive-lite 0.1.2 → 0.1.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 +4 -3
- package/docs/cli-semantics.md +3 -2
- package/docs/skills/hive-lite-bootstrap/SKILL.md +153 -0
- package/docs/skills/hive-lite-bootstrap/agents/openai.yaml +7 -0
- package/docs/skills/hive-lite-finish/SKILL.md +15 -1
- package/docs/skills/hive-lite-map-maintainer/SKILL.md +8 -5
- package/docs/skills/hive-lite-map-maintainer/references/lifecycle.md +3 -3
- package/docs/skills/hive-lite-start-prompt/SKILL.md +5 -6
- package/docs/skills/hive-lite-start-prompt/references/preflight.md +5 -6
- package/package.json +1 -1
- package/src/cli.js +1 -1
- package/src/lib/next.js +14 -6
- package/src/lib/skills.js +1 -0
- package/src/lib/status.js +1 -1
package/README.md
CHANGED
|
@@ -78,8 +78,9 @@ When you pass `next --agent <codex|claude|gemini>` or `next --path <skills-dir>`
|
|
|
78
78
|
|
|
79
79
|
### Install Agent Skills
|
|
80
80
|
|
|
81
|
-
Hive Lite ships
|
|
81
|
+
Hive Lite ships four operator skills:
|
|
82
82
|
|
|
83
|
+
- `hive-lite-bootstrap`
|
|
83
84
|
- `hive-lite-start-prompt`
|
|
84
85
|
- `hive-lite-finish`
|
|
85
86
|
- `hive-lite-map-maintainer`
|
|
@@ -235,7 +236,7 @@ node bin/hive.js map-dump
|
|
|
235
236
|
|
|
236
237
|
Hive Lite requires a git repository. If the current directory is not inside a git worktree, `status` and `next` will report `repo_setup_required`, and workflow commands such as `init`, `find`, `check`, `validate`, and `accept` stop. Hive Lite does not initialize git automatically; switch to the correct repo root or manually initialize git and create an initial commit first.
|
|
237
238
|
|
|
238
|
-
Inside a git repo, `status`
|
|
239
|
+
Inside a git repo, `status` reports `hive_init_required` until the repo has been initialized with `hive-lite init`. `next` recommends `$hive-lite-bootstrap`, which is the first-time setup skill that may run init, build the first Project Map, and prepare the setup/map commit before product work starts.
|
|
239
240
|
|
|
240
241
|
Committed by default:
|
|
241
242
|
|
|
@@ -267,7 +268,7 @@ node bin/hive.js next --json
|
|
|
267
268
|
Typical `phaseGuess` values:
|
|
268
269
|
|
|
269
270
|
- `repo_setup_required`: current directory is not inside a git repo
|
|
270
|
-
- `hive_init_required`:
|
|
271
|
+
- `hive_init_required`: use `$hive-lite-bootstrap` for first-time setup before product work
|
|
271
272
|
- `preflight`: dirty worktree must be committed, stashed, isolated, or stopped before a new requirement
|
|
272
273
|
- `finish`: an in-progress or accepted-uncommitted Hive change should be closed with `$hive-lite-finish`
|
|
273
274
|
- `map`: Project Map needs bootstrap, refresh, or repair via `$hive-lite-map-maintainer`
|
package/docs/cli-semantics.md
CHANGED
|
@@ -52,7 +52,7 @@ Hive Lite cannot detect the currently running agent CLI. If the caller provides
|
|
|
52
52
|
| Value | Meaning | What To Do |
|
|
53
53
|
| --- | --- | --- |
|
|
54
54
|
| `repo_setup_required` | Current directory is not inside a git repo. | Stop. Switch to the correct repo root, or manually initialize git and create an initial commit before using Hive Lite. |
|
|
55
|
-
| `hive_init_required` | Current git repo does not have required Hive Lite setup files. |
|
|
55
|
+
| `hive_init_required` | Current git repo does not have required Hive Lite setup files. | Use `$hive-lite-bootstrap` for first-time setup before product work. |
|
|
56
56
|
| `skill_preflight` | The selected agent target is missing the operator skill needed for the next Hive Lite step. | Run the recommended `skills install` or `skills sync`, then rerun `next`. |
|
|
57
57
|
| `preflight` | Worktree has unmanaged dirty changes. | Stop before starting new work. Commit, stash, use a separate worktree, or stop. |
|
|
58
58
|
| `finish` | A Hive change is in progress, or was accepted without commit. | Use `$hive-lite-finish` to check, validate, record evidence, accept, or commit. |
|
|
@@ -103,7 +103,7 @@ node bin/hive.js status --json
|
|
|
103
103
|
| Value | Meaning | What To Do |
|
|
104
104
|
| --- | --- | --- |
|
|
105
105
|
| `repo_setup_required` | Not inside a git worktree. | Stop. Do not auto-run `git init`. |
|
|
106
|
-
| `hive_init_required` | Inside a git worktree, but required Hive Lite setup files are missing. | Stop
|
|
106
|
+
| `hive_init_required` | Inside a git worktree, but required Hive Lite setup files are missing. | Stop ordinary start/finish/map-maintainer skills. Use `$hive-lite-bootstrap` for first-time setup, or run `hive-lite init` manually as the low-level fallback. |
|
|
107
107
|
| `clean` | Worktree is clean. | It is safe to start `find`. |
|
|
108
108
|
| `unmanaged_dirty` | Dirty files are not tied to a Hive Change Record. | Stop and ask the human to commit, stash, use a worktree, or stop. |
|
|
109
109
|
| `in_progress` | Dirty files belong to an unfinished Hive Change Record. | Continue finish flow: `check`, `validate`, manual evidence, or `accept`. |
|
|
@@ -158,6 +158,7 @@ Hive Lite does not detect which agent CLI is installed or currently running. `sk
|
|
|
158
158
|
|
|
159
159
|
Bundled skills:
|
|
160
160
|
|
|
161
|
+
- `hive-lite-bootstrap`
|
|
161
162
|
- `hive-lite-start-prompt`
|
|
162
163
|
- `hive-lite-finish`
|
|
163
164
|
- `hive-lite-map-maintainer`
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hive-lite-bootstrap
|
|
3
|
+
description: Use this skill when a git repository is adopting Hive Lite for the first time. It checks first-time setup state, may run `hive-lite init`, builds the first Project Map without changing product code, verifies readiness, and prepares a user-approved commit for Hive Lite setup and map files before any product requirement starts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hive Lite Bootstrap
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Onboard a git repository to Hive Lite for the first time:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
check repo -> run hive-lite init when needed -> build first Project Map -> verify -> commit setup/map after approval
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This skill is the only Hive Lite operator skill that may run `hive-lite init`. Use it for first-time project setup, not for ordinary coding work.
|
|
17
|
+
|
|
18
|
+
## Boundaries
|
|
19
|
+
|
|
20
|
+
- Do not edit application source, tests, product docs, package files, secrets, CI, or generated artifacts.
|
|
21
|
+
- You may run `hive-lite init` only when the target is already a git repo and the worktree was clean before init.
|
|
22
|
+
- You may directly edit only:
|
|
23
|
+
- `.hive/map/project.yaml`
|
|
24
|
+
- `.hive/map/areas.yaml`
|
|
25
|
+
- `.hive/map/rules.yaml`
|
|
26
|
+
- `.hive/map/validation.yaml`
|
|
27
|
+
- Preserve setup artifacts created by `hive-lite init`, including `.hive/config.yaml` and Hive Lite `.gitignore` runtime/evidence rules. Do not manually curate or remove them.
|
|
28
|
+
- Do not start a product requirement, run `hive-lite find`, create a Change Record, accept risk, push, merge, deploy, or run app tests.
|
|
29
|
+
- Commit only after explicit human approval, or when the user's request already explicitly asked you to commit the Hive Lite bootstrap.
|
|
30
|
+
- If committing, include only Hive Lite setup/map files and the Hive Lite `.gitignore` change. Never include product-code changes.
|
|
31
|
+
|
|
32
|
+
## Find The CLI
|
|
33
|
+
|
|
34
|
+
Run Hive Lite from the target repo root. Prefer:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
hive-lite <args>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If unavailable, use an explicit path already given by the user or conversation context, such as `node /path/to/hive-lite/bin/hive.js <args>`. Ask for the CLI path if it is not obvious.
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
### 1. Preflight
|
|
45
|
+
|
|
46
|
+
Run:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
hive-lite status --json
|
|
50
|
+
git status --short
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Stop if the directory is not a git repo. Tell the user to switch to the repo root, or initialize git and create an initial commit before using Hive Lite.
|
|
54
|
+
|
|
55
|
+
Stop if `git status --short` shows pre-existing non-Hive changes. Ask the user to commit, stash, or use another worktree first. Do not run `hive-lite init` into a dirty product worktree.
|
|
56
|
+
|
|
57
|
+
If Hive Lite is already initialized, do not rerun init. Continue only if the user asked to build or repair the first Project Map; otherwise explain that setup already exists and recommend `$hive-lite-map-maintainer` or `$hive-lite-start-prompt`.
|
|
58
|
+
|
|
59
|
+
### 2. Initialize
|
|
60
|
+
|
|
61
|
+
If status reports `hive.state = hive_init_required` or `hive.initialized = false`, run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
hive-lite init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then continue in the same turn. Do not ask the user to commit yet; first build the initial Project Map.
|
|
68
|
+
|
|
69
|
+
### 3. Build First Map
|
|
70
|
+
|
|
71
|
+
Run:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
hive-lite map verify --json
|
|
75
|
+
hive-lite map prompt --focus "highest value product and workflow areas" --max-areas 8
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Inspect the repo with deterministic commands such as:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
rg --files
|
|
82
|
+
rg "<routing term>"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Edit only `.hive/map/*.yaml`. Build 3-8 high-value, narrow areas that make near-term product requests routable. Do not try to map the whole project.
|
|
86
|
+
|
|
87
|
+
### 4. Verify
|
|
88
|
+
|
|
89
|
+
Run:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
hive-lite map verify --json
|
|
93
|
+
hive-lite map health --json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If areas were created, spot-check important areas with:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
hive-lite map health --area <area_id> --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Success means:
|
|
103
|
+
|
|
104
|
+
- map verify is ok
|
|
105
|
+
- the first useful areas have no critical health findings
|
|
106
|
+
- the map is not empty
|
|
107
|
+
- no product files were changed
|
|
108
|
+
|
|
109
|
+
### 5. Commit Boundary
|
|
110
|
+
|
|
111
|
+
Before any product requirement starts, the Hive Lite setup and initial Project Map should have a git commit boundary.
|
|
112
|
+
|
|
113
|
+
If the user already explicitly asked to commit, and `git status --short` contains only Hive Lite setup/map files plus the Hive Lite `.gitignore` update, run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git add .hive/config.yaml .hive/map/project.yaml .hive/map/areas.yaml .hive/map/rules.yaml .hive/map/validation.yaml .gitignore
|
|
117
|
+
git commit -m "Initialize Hive Lite Project Map"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
If the user did not explicitly approve committing, stop and ask for approval. Provide the exact command above and say that the user can reply with:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
可以提交。commit message 用:Initialize Hive Lite Project Map
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Do not start `$hive-lite-start-prompt` until the setup/map files are committed or otherwise isolated.
|
|
127
|
+
|
|
128
|
+
## Return Summary
|
|
129
|
+
|
|
130
|
+
Return:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
Hive Lite bootstrap complete.
|
|
134
|
+
|
|
135
|
+
Setup:
|
|
136
|
+
- hive-lite init: <run / already initialized>
|
|
137
|
+
|
|
138
|
+
Project Map:
|
|
139
|
+
- changed files: <files>
|
|
140
|
+
- areas created or updated: <area ids>
|
|
141
|
+
|
|
142
|
+
Verification:
|
|
143
|
+
- hive-lite map verify --json: <ok/fail>
|
|
144
|
+
- hive-lite map health --json: <status and finding counts>
|
|
145
|
+
|
|
146
|
+
Commit:
|
|
147
|
+
- <committed / waiting for approval>
|
|
148
|
+
- command or commit sha if applicable
|
|
149
|
+
|
|
150
|
+
Next:
|
|
151
|
+
- After the setup/map commit exists, start the first requirement with `$hive-lite-start-prompt`.
|
|
152
|
+
```
|
|
153
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Hive Lite Bootstrap"
|
|
3
|
+
short_description: "Initialize Hive Lite for a repo"
|
|
4
|
+
default_prompt: "Use $hive-lite-bootstrap when this repository is adopting Hive Lite for the first time. Initialize Hive Lite, build the first Project Map, and prepare the setup/map commit before product work starts."
|
|
5
|
+
|
|
6
|
+
policy:
|
|
7
|
+
allow_implicit_invocation: true
|
|
@@ -61,7 +61,7 @@ In command examples below, replace `hive-lite` with the resolved command.
|
|
|
61
61
|
|
|
62
62
|
Run `hive-lite status --json` first. If it reports `hive.state = repo_setup_required`, stop immediately. Do not run check/validate/accept and do not initialize git automatically. Tell the user to switch to the correct git repo root, or manually initialize git and create an initial commit before using Hive Lite.
|
|
63
63
|
|
|
64
|
-
If it reports `hive.state = hive_init_required`, or `hive.initialized = false`, stop immediately. Do not run `hive-lite init` yourself, and do not run check/validate/accept.
|
|
64
|
+
If it reports `hive.state = hive_init_required`, or `hive.initialized = false`, stop immediately. Do not run `hive-lite init` yourself, and do not run check/validate/accept. Recommend `$hive-lite-bootstrap` for first-time setup. If the user expected an existing Hive Lite change, they may be in the wrong directory.
|
|
65
65
|
|
|
66
66
|
Find one of:
|
|
67
67
|
|
|
@@ -275,6 +275,20 @@ Accepted and committed.
|
|
|
275
275
|
- Split next phase: <handoff prompt or none>
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
+
If `Map Delta Candidate` is not `none`, do not apply it from this skill. Explain that the accepted change suggests a possible Project Map improvement and output this handoff:
|
|
279
|
+
|
|
280
|
+
```text
|
|
281
|
+
$hive-lite-map-maintainer
|
|
282
|
+
请 review 这个 Map Delta Candidate:
|
|
283
|
+
<delta_id>
|
|
284
|
+
|
|
285
|
+
只判断是否 apply 或 reject 这个 map delta。
|
|
286
|
+
不要改应用代码。
|
|
287
|
+
不要开始新需求。
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Tell the user that map delta review can happen before or after the next requirement, but reviewing it before similar future requests may improve routing.
|
|
291
|
+
|
|
278
292
|
If no commit was created because the user explicitly asked not to commit, warn that a new Hive Lite requirement should not start until the worktree is clean.
|
|
279
293
|
|
|
280
294
|
## Response Style
|
|
@@ -35,7 +35,7 @@ hive-lite skills install --agent <codex|claude|gemini>
|
|
|
35
35
|
Setup precondition:
|
|
36
36
|
|
|
37
37
|
- This skill must not run `hive-lite init`.
|
|
38
|
-
- If Hive Lite is not initialized or is partially initialized, stop immediately and
|
|
38
|
+
- If Hive Lite is not initialized or is partially initialized, stop immediately and recommend `$hive-lite-bootstrap` for first-time setup.
|
|
39
39
|
- Do not create `.hive/map` manually, do not edit `.hive/config.yaml`, and do not edit `.gitignore`.
|
|
40
40
|
|
|
41
41
|
Map-maintenance authority:
|
|
@@ -82,12 +82,15 @@ If it reports `hive.state = hive_init_required`, or `hive.initialized = false`,
|
|
|
82
82
|
```text
|
|
83
83
|
Hive Lite is not initialized in this repo yet.
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
hive-lite
|
|
85
|
+
Recommended next step:
|
|
86
|
+
$hive-lite-bootstrap
|
|
87
|
+
这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
If the bootstrap skill is not available, run `hive-lite init` from the repo root, then rerun:
|
|
89
90
|
$hive-lite-map-maintainer
|
|
90
91
|
这是已有项目第一次接入 Hive Lite。请建立第一版 Project Map,不要改应用代码。
|
|
92
|
+
|
|
93
|
+
Do not commit immediately after init. Build the first Project Map first, then commit Hive Lite setup and map files together before starting the first product requirement.
|
|
91
94
|
```
|
|
92
95
|
|
|
93
96
|
For older Hive Lite versions that do not report `hive.initialized`, check for required setup files before continuing:
|
|
@@ -125,7 +128,7 @@ Before any mode-specific work, check whether the target repo has the required Hi
|
|
|
125
128
|
.hive/map/validation.yaml
|
|
126
129
|
```
|
|
127
130
|
|
|
128
|
-
If any required map file is missing, stop immediately and
|
|
131
|
+
If any required map file is missing, stop immediately and recommend `$hive-lite-bootstrap`. Do not create missing map files manually.
|
|
129
132
|
|
|
130
133
|
### 3. Verify Current Map
|
|
131
134
|
|
|
@@ -8,8 +8,8 @@ Use when an existing project is adopting Hive Lite for the first time.
|
|
|
8
8
|
|
|
9
9
|
Precondition:
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- If Hive Lite setup files are missing, stop and
|
|
11
|
+
- Hive Lite setup already exists, normally because `$hive-lite-bootstrap` ran first.
|
|
12
|
+
- If Hive Lite setup files are missing, stop and recommend `$hive-lite-bootstrap`; do not run `hive-lite init` from this skill.
|
|
13
13
|
|
|
14
14
|
Goal:
|
|
15
15
|
|
|
@@ -101,7 +101,7 @@ Only apply a delta when the user explicitly asks or confirms. Reject stale or lo
|
|
|
101
101
|
|
|
102
102
|
## recovery
|
|
103
103
|
|
|
104
|
-
Use when initialized map files are invalid YAML or structurally broken. If required Hive Lite setup or map files are missing, stop and
|
|
104
|
+
Use when initialized map files are invalid YAML or structurally broken. If required Hive Lite setup or map files are missing, stop and recommend `$hive-lite-bootstrap`.
|
|
105
105
|
|
|
106
106
|
Goal:
|
|
107
107
|
|
|
@@ -35,7 +35,7 @@ hive-lite skills install --agent <codex|claude|gemini>
|
|
|
35
35
|
|
|
36
36
|
- Do not directly edit application source, tests, docs, `.gitignore`, generated artifacts, `.hive/context`, `.hive/changes`, or `.hive/deltas`.
|
|
37
37
|
- Only edit these Project Map files when map repair is needed: `.hive/map/project.yaml`, `.hive/map/areas.yaml`, `.hive/map/rules.yaml`, `.hive/map/validation.yaml`.
|
|
38
|
-
- Do not run `hive-lite init`. If Hive Lite is not initialized or is partially initialized, stop and
|
|
38
|
+
- Do not run `hive-lite init`. If Hive Lite is not initialized or is partially initialized, stop and recommend `$hive-lite-bootstrap` before using this skill.
|
|
39
39
|
- Do not run `hive check`, `hive validate`, `hive accept`, commits, formatters, or app tests for the new requirement. Those belong after the coding agent changes code.
|
|
40
40
|
- During preflight, you may help finish or isolate pre-existing work only after explicit user confirmation.
|
|
41
41
|
- Never discard changes with destructive commands such as `git reset --hard`, `git checkout --`, or forced branch switches.
|
|
@@ -80,12 +80,11 @@ If status reports `hive.state = hive_init_required`, or `hive.initialized = fals
|
|
|
80
80
|
```text
|
|
81
81
|
Hive Lite is not initialized in this repo yet.
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
hive-lite
|
|
83
|
+
Recommended next step:
|
|
84
|
+
$hive-lite-bootstrap
|
|
85
|
+
这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
|
|
85
86
|
|
|
86
|
-
After the setup files
|
|
87
|
-
$hive-lite-map-maintainer
|
|
88
|
-
这是已有项目第一次接入 Hive Lite。请建立第一版 Project Map,不要改应用代码。
|
|
87
|
+
Do not start the product requirement yet. After bootstrap builds the first map, commit the Hive Lite setup and map files together, then rerun this start skill with the original requirement.
|
|
89
88
|
```
|
|
90
89
|
|
|
91
90
|
For older Hive Lite versions that do not report `hive.initialized`, check whether these files exist before continuing:
|
|
@@ -13,12 +13,11 @@ Say:
|
|
|
13
13
|
```text
|
|
14
14
|
Hive Lite is not initialized in this repo yet.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
hive-lite
|
|
16
|
+
Recommended next step:
|
|
17
|
+
$hive-lite-bootstrap
|
|
18
|
+
这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
|
|
18
19
|
|
|
19
|
-
After the setup files
|
|
20
|
-
$hive-lite-map-maintainer
|
|
21
|
-
这是已有项目第一次接入 Hive Lite。请建立第一版 Project Map,不要改应用代码。
|
|
20
|
+
After bootstrap builds the first map, commit the Hive Lite setup and map files together before starting the product requirement.
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
Do not continue to find/map repair/start prompt until Hive Lite setup exists.
|
|
@@ -108,7 +107,7 @@ hive-lite accept <chg_id> --commit -m "<message>"
|
|
|
108
107
|
## Safety Rules
|
|
109
108
|
|
|
110
109
|
- Do not continue to `find` while status is not clean.
|
|
111
|
-
- Do not run `hive-lite init` from
|
|
110
|
+
- Do not run `hive-lite init` from this start skill; first-time setup belongs to `$hive-lite-bootstrap`.
|
|
112
111
|
- Do not initialize git automatically.
|
|
113
112
|
- Do not assume "new branch" cleans the worktree; dirty files usually follow branch switches.
|
|
114
113
|
- Prefer commit, stash, or separate git worktree.
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -103,7 +103,7 @@ function requireHiveInitialized(cwd, commandName) {
|
|
|
103
103
|
const missing = status.hive.missingSetupFiles && status.hive.missingSetupFiles.length > 0
|
|
104
104
|
? ` Missing: ${status.hive.missingSetupFiles.join(', ')}.`
|
|
105
105
|
: '';
|
|
106
|
-
throw new Error(`${commandName} requires Hive Lite initialization.
|
|
106
|
+
throw new Error(`${commandName} requires Hive Lite initialization. Use $hive-lite-bootstrap first, or run hive-lite init from the repo root as the low-level fallback.${missing}`);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
package/src/lib/next.js
CHANGED
|
@@ -94,6 +94,13 @@ function startPrompt() {
|
|
|
94
94
|
].join('\n');
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function bootstrapPrompt() {
|
|
98
|
+
return [
|
|
99
|
+
'$hive-lite-bootstrap',
|
|
100
|
+
'这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。完成后在开始第一个需求前准备 Hive Lite setup/map 提交。',
|
|
101
|
+
].join('\n');
|
|
102
|
+
}
|
|
103
|
+
|
|
97
104
|
function finishPrompt(changeId) {
|
|
98
105
|
return [
|
|
99
106
|
'$hive-lite-finish',
|
|
@@ -137,6 +144,7 @@ function chooseSplit(status) {
|
|
|
137
144
|
|
|
138
145
|
function requiredSkillForAction(actionItem) {
|
|
139
146
|
if (!actionItem) return null;
|
|
147
|
+
if (actionItem.kind === 'run_bootstrap_skill') return 'hive-lite-bootstrap';
|
|
140
148
|
if (actionItem.kind === 'run_start_skill' || actionItem.kind === 'continue_split') return 'hive-lite-start-prompt';
|
|
141
149
|
if (actionItem.kind === 'run_finish_skill' || actionItem.kind === 'commit_accepted_change') return 'hive-lite-finish';
|
|
142
150
|
if (actionItem.kind === 'run_map_maintainer') return 'hive-lite-map-maintainer';
|
|
@@ -227,13 +235,13 @@ function evaluateNextAction(cwd, options = {}) {
|
|
|
227
235
|
} else if (workspace.hive.state === 'hive_init_required') {
|
|
228
236
|
phaseGuess = 'hive_init_required';
|
|
229
237
|
primaryAction = action({
|
|
230
|
-
kind: '
|
|
231
|
-
label: '
|
|
232
|
-
|
|
233
|
-
explanation: 'This git repository has not been initialized for Hive Lite.
|
|
238
|
+
kind: 'run_bootstrap_skill',
|
|
239
|
+
label: 'Use hive-lite-bootstrap',
|
|
240
|
+
prompt: bootstrapPrompt(),
|
|
241
|
+
explanation: 'This git repository has not been initialized for Hive Lite. Use the bootstrap skill to initialize, build the first Project Map, and prepare the setup/map commit before product work starts.',
|
|
234
242
|
});
|
|
235
|
-
summaryForHuman = '当前项目还没有初始化 Hive Lite
|
|
236
|
-
summaryForAgent = 'Hive Lite is not initialized. Stop
|
|
243
|
+
summaryForHuman = '当前项目还没有初始化 Hive Lite。建议使用 hive-lite-bootstrap 完成首次接入:初始化、建立第一版 Project Map,并在开始第一个需求前准备 setup/map 提交。';
|
|
244
|
+
summaryForAgent = 'Hive Lite is not initialized. Stop ordinary start/finish/map-maintainer workflows and hand off to hive-lite-bootstrap.';
|
|
237
245
|
} else if (!workspace.canStartNewRequirement) {
|
|
238
246
|
if (workspace.hive.state === 'in_progress') {
|
|
239
247
|
phaseGuess = 'finish';
|
package/src/lib/skills.js
CHANGED
package/src/lib/status.js
CHANGED
|
@@ -314,7 +314,7 @@ function evaluateWorkspaceStatus(cwd, options = {}) {
|
|
|
314
314
|
|
|
315
315
|
if (!initialized) {
|
|
316
316
|
state = 'hive_init_required';
|
|
317
|
-
reason = 'Hive Lite is not initialized in this git repository.
|
|
317
|
+
reason = 'Hive Lite is not initialized in this git repository. Use $hive-lite-bootstrap for first-time setup, or run hive-lite init as the low-level fallback.';
|
|
318
318
|
} else if (dirty && latest.change) {
|
|
319
319
|
if (accepted(latest.change) && !committed(latest.change) && diffMatches) {
|
|
320
320
|
state = 'accepted_uncommitted';
|