hive-lite 0.1.3 → 0.1.6

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
@@ -144,7 +144,7 @@ node bin/hive.js find "Update server API for Action Inbox hierarchy" --from-spli
144
144
 
145
145
  When `--from-split` and `--phase` point to a recorded split phase, Hive Lite constrains routing to that phase's primary area. Generated split notes include `--area <primaryAreaId>` so copied commands stay narrowly scoped even if the original intent was broad.
146
146
  If the split note or phase cannot be found, Hive Lite does not treat the copied command as an edit permit. If `--area` disagrees with the recorded phase area, the recorded phase area wins and Hive Lite prints a warning.
147
- When Hive Lite is run from a source checkout with `node /path/to/bin/hive.js`, generated split notes render that Node command first and include `hive-lite` as a package-alias fallback when available.
147
+ When Hive Lite is run from a source checkout, generated split notes may render the caller's current CLI invocation and include `hive-lite` as a package-alias fallback when available.
148
148
 
149
149
  ### Check And Validate A Change
150
150
 
@@ -236,7 +236,7 @@ node bin/hive.js map-dump
236
236
 
237
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.
238
238
 
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
+ Inside a git repo, `status` reports `hive_init_required` until required Hive Lite setup files exist. `status` and `next` recommend `$hive-lite-bootstrap`, which is the first-time setup and setup-repair skill that may run init, build the first Project Map, and prepare the setup/map commit before product work starts.
240
240
 
241
241
  Committed by default:
242
242
 
@@ -268,7 +268,7 @@ node bin/hive.js next --json
268
268
  Typical `phaseGuess` values:
269
269
 
270
270
  - `repo_setup_required`: current directory is not inside a git repo
271
- - `hive_init_required`: use `$hive-lite-bootstrap` for first-time setup before product work
271
+ - `hive_init_required`: use `$hive-lite-bootstrap` for first-time setup or setup repair before product work
272
272
  - `preflight`: dirty worktree must be committed, stashed, isolated, or stopped before a new requirement
273
273
  - `finish`: an in-progress or accepted-uncommitted Hive change should be closed with `$hive-lite-finish`
274
274
  - `map`: Project Map needs bootstrap, refresh, or repair via `$hive-lite-map-maintainer`
@@ -45,15 +45,15 @@ It reads:
45
45
  By default, `status --json` and `next --json` filter split notes to reduce exploratory clutter. They show active unfinished split notes that already have accepted phase progress. If no active split exists, they show only the newest unstarted split note. `splitNoteSummary` reports how many split notes were hidden by this default policy. Use `status --all --json` to inspect every runtime split note.
46
46
  `splitNoteSummary.primaryRecentSplitNote` identifies the split note selected as primary from the visible notes. `splitNoteSummary.otherActiveSplitNotes` lists older active-progress split notes so an operator can tell whether additional historical split work exists.
47
47
 
48
- Hive Lite cannot detect the currently running agent CLI. If the caller provides `--agent <codex|claude|gemini|all>` or `--path <skills-dir>`, `next` treats the recommended Hive Lite operator skill as a precondition. When the selected target is missing that skill or has a stale copy, `phaseGuess` becomes `skill_preflight` and `primaryAction.kind` becomes `install_operator_skill`.
48
+ Hive Lite cannot detect the currently running agent CLI. If the caller provides `--agent <codex|claude|gemini|all>` or `--path <skills-dir>`, `next` treats the recommended Hive Lite operator skill as a precondition. When the selected target is missing that skill or has a stale copy, `phaseGuess` becomes `skill_preflight` and `primaryAction.kind` becomes `sync_operator_skill`.
49
49
 
50
50
  ### `phaseGuess`
51
51
 
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. | Use `$hive-lite-bootstrap` for first-time setup before product work. |
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`. |
55
+ | `hive_init_required` | Current git repo does not have required Hive Lite setup files. | Use `$hive-lite-bootstrap` for first-time setup or setup repair before product work. |
56
+ | `skill_preflight` | The selected agent target is missing the operator skill needed for the next Hive Lite step, or has a stale copy. | Run the recommended `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. |
59
59
  | `map` | Project Map is missing, invalid, critical, or needs attention. | Use `$hive-lite-map-maintainer` to bootstrap, refresh, or repair the map. |
@@ -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 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. |
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 setup repair. |
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`. |
@@ -146,7 +146,7 @@ node bin/hive.js find "<phase.findIntent>" --from-split split_xxx --phase phase_
146
146
  `--from-split` + `--phase` constrains routing to the selected phase's primary area when the split note is available.
147
147
  If the split note or phase cannot be found, the result is not an edit permit and `phaseDependencyStatus.canStartNormally` is `false`.
148
148
  If `--area` disagrees with the recorded phase area, Hive Lite routes to the recorded phase area and reports a warning.
149
- Split-note markdown renders the current Hive Lite CLI invocation first, such as `node /path/to/bin/hive.js ...` when run from a source checkout, and includes `hive-lite ...` as a fallback for environments where the package alias is installed.
149
+ Split-note markdown renders the current Hive Lite CLI invocation first when run from a source checkout, and includes `hive-lite ...` as a fallback for environments where the package alias is installed.
150
150
 
151
151
  ## `skills`
152
152
 
@@ -186,8 +186,8 @@ node bin/hive.js skills doctor --path ~/.codex/skills --json
186
186
  | Status | Meaning | What To Do |
187
187
  | --- | --- | --- |
188
188
  | `current` | Installed copy matches bundled copy. | Nothing needed. |
189
- | `missing` | Skill is not installed at the target path. | Run `skills install`. |
190
- | `stale` | Skill exists but differs from the bundled copy. | Run `skills sync` or `skills install --force` if you want to overwrite. |
189
+ | `missing` | Skill is not installed at the target path. | Run `skills sync`. |
190
+ | `stale` | Skill exists but differs from the bundled copy. | Run `skills sync`. |
191
191
 
192
192
  Install missing skills:
193
193
 
@@ -1,30 +1,31 @@
1
1
  ---
2
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.
3
+ description: Use this skill when a git repository is adopting Hive Lite for the first time or has incomplete Hive Lite setup files. It checks 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
4
  ---
5
5
 
6
6
  # Hive Lite Bootstrap
7
7
 
8
8
  ## Purpose
9
9
 
10
- Onboard a git repository to Hive Lite for the first time:
10
+ Onboard a git repository to Hive Lite for the first time, or repair incomplete required Hive Lite setup files before product work starts:
11
11
 
12
12
  ```text
13
- check repo -> run hive-lite init when needed -> build first Project Map -> verify -> commit setup/map after approval
13
+ check repo -> run hive-lite init when needed -> build or repair first Project Map -> verify -> commit setup/map after approval
14
14
  ```
15
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.
16
+ This skill is the only Hive Lite operator skill that may run `hive-lite init`. Use it for first-time project setup or incomplete setup repair, not for ordinary coding work or ordinary map health cleanup.
17
17
 
18
18
  ## Boundaries
19
19
 
20
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.
21
+ - You may run `hive-lite init` only when the target is already a git repo and either the worktree was clean before first init, or the only dirty entries are Hive Lite setup/map artifacts involved in setup repair.
22
22
  - You may directly edit only:
23
23
  - `.hive/map/project.yaml`
24
24
  - `.hive/map/areas.yaml`
25
25
  - `.hive/map/rules.yaml`
26
26
  - `.hive/map/validation.yaml`
27
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 use this skill to fix ordinary map health findings after required setup files exist. Use `$hive-lite-map-maintainer` for stale paths, scope, roles, validation, aliases, or other Project Map quality cleanup.
28
29
  - Do not start a product requirement, run `hive-lite find`, create a Change Record, accept risk, push, merge, deploy, or run app tests.
29
30
  - Commit only after explicit human approval, or when the user's request already explicitly asked you to commit the Hive Lite bootstrap.
30
31
  - If committing, include only Hive Lite setup/map files and the Hive Lite `.gitignore` change. Never include product-code changes.
@@ -37,7 +38,20 @@ Run Hive Lite from the target repo root. Prefer:
37
38
  hive-lite <args>
38
39
  ```
39
40
 
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
+ If `hive-lite` is not available, stop and tell the user:
42
+
43
+ ```text
44
+ I can't find the `hive-lite` command.
45
+
46
+ Please install or update Hive Lite CLI:
47
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
48
+ hive-lite --version
49
+ hive-lite skills sync --agent all
50
+
51
+ Then rerun this skill.
52
+ ```
53
+
54
+ Keep user-facing recovery guidance to the install/update block above unless the user explicitly says they are developing Hive Lite itself.
41
55
 
42
56
  ## Workflow
43
57
 
@@ -54,17 +68,21 @@ Stop if the directory is not a git repo. Tell the user to switch to the repo roo
54
68
 
55
69
  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
70
 
71
+ If `hive.state = hive_init_required` because required setup files are missing, this is a setup repair condition. Continue only when dirty entries are limited to Hive Lite setup/map artifacts.
72
+
73
+ If `git status --short` shows a deleted tracked `.hive/map/*.yaml` file from an existing committed Project Map, stop and ask whether to restore that file from git before rebuilding anything. Do not silently replace a previously committed map file with a default empty file.
74
+
57
75
  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
76
 
59
77
  ### 2. Initialize
60
78
 
61
- If status reports `hive.state = hive_init_required` or `hive.initialized = false`, run:
79
+ If status reports `hive.state = hive_init_required` or `hive.initialized = false`, run this only for first-time setup, partial setup, or user-approved setup repair:
62
80
 
63
81
  ```bash
64
82
  hive-lite init
65
83
  ```
66
84
 
67
- Then continue in the same turn. Do not ask the user to commit yet; first build the initial Project Map.
85
+ Then continue in the same turn. Do not ask the user to commit yet; first build or repair the initial Project Map.
68
86
 
69
87
  ### 3. Build First Map
70
88
 
@@ -133,7 +151,8 @@ Return:
133
151
  Hive Lite bootstrap complete.
134
152
 
135
153
  Setup:
136
- - hive-lite init: <run / already initialized>
154
+ - mode: <first-time / setup repair / already initialized>
155
+ - hive-lite init: <run / already initialized / not run>
137
156
 
138
157
  Project Map:
139
158
  - changed files: <files>
@@ -150,4 +169,3 @@ Commit:
150
169
  Next:
151
170
  - After the setup/map commit exists, start the first requirement with `$hive-lite-start-prompt`.
152
171
  ```
153
-
@@ -27,11 +27,12 @@ Do not assume this skill can invoke `$hive-lite-start-prompt` or `$hive-lite-map
27
27
  - Next phase after split accept: output a `$hive-lite-start-prompt` handoff.
28
28
  - Map repair or refresh needed during finish: output a `$hive-lite-map-maintainer` handoff; do not edit map files here.
29
29
 
30
- If the target handoff skill is unavailable in the active agent CLI, tell the user to install or sync Hive Lite skills for their agent first. Hive Lite cannot detect the running agent by itself; use the user's agent target such as `codex`, `claude`, or `gemini`:
30
+ If a Hive Lite handoff skill is missing or stale, stop and tell the user to update the CLI and sync skills:
31
31
 
32
32
  ```bash
33
- hive-lite skills doctor --agent <codex|claude|gemini>
34
- hive-lite skills install --agent <codex|claude|gemini>
33
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
34
+ hive-lite --version
35
+ hive-lite skills sync --agent all
35
36
  ```
36
37
 
37
38
  ## Boundaries
@@ -51,9 +52,20 @@ Run Hive Lite from the target repo root. Prefer the package command:
51
52
  hive-lite <args>
52
53
  ```
53
54
 
54
- If `hive-lite` is not available, try 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.
55
+ If `hive-lite` is not available, stop and tell the user:
55
56
 
56
- In command examples below, replace `hive-lite` with the resolved command.
57
+ ```text
58
+ I can't find the `hive-lite` command.
59
+
60
+ Please install or update Hive Lite CLI:
61
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
62
+ hive-lite --version
63
+ hive-lite skills sync --agent all
64
+
65
+ Then rerun this skill.
66
+ ```
67
+
68
+ Keep user-facing recovery guidance to the install/update block above unless the user explicitly says they are developing Hive Lite itself.
57
69
 
58
70
  ## Workflow
59
71
 
@@ -61,7 +73,7 @@ In command examples below, replace `hive-lite` with the resolved command.
61
73
 
62
74
  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
75
 
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.
76
+ 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 or setup repair. If the user expected an existing Hive Lite change, they may be in the wrong directory or missing setup files.
65
77
 
66
78
  Find one of:
67
79
 
@@ -23,11 +23,12 @@ Do not assume this skill can invoke `$hive-lite-start-prompt` or `$hive-lite-fin
23
23
  - For coding work after map repair: output a `$hive-lite-start-prompt` handoff.
24
24
  - For finishing a code change: do not continue here; use `$hive-lite-finish`.
25
25
 
26
- If the target handoff skill is unavailable in the active agent CLI, tell the user to install or sync Hive Lite skills for their agent first. Hive Lite cannot detect the running agent by itself; use the user's agent target such as `codex`, `claude`, or `gemini`:
26
+ If a Hive Lite handoff skill is missing or stale, stop and tell the user to update the CLI and sync skills:
27
27
 
28
28
  ```bash
29
- hive-lite skills doctor --agent <codex|claude|gemini>
30
- hive-lite skills install --agent <codex|claude|gemini>
29
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
30
+ hive-lite --version
31
+ hive-lite skills sync --agent all
31
32
  ```
32
33
 
33
34
  ## Authority Boundary
@@ -35,7 +36,7 @@ hive-lite skills install --agent <codex|claude|gemini>
35
36
  Setup precondition:
36
37
 
37
38
  - This skill must not run `hive-lite init`.
38
- - If Hive Lite is not initialized or is partially initialized, stop immediately and recommend `$hive-lite-bootstrap` for first-time setup.
39
+ - If Hive Lite setup is missing or incomplete, stop immediately and recommend `$hive-lite-bootstrap` for first-time setup or setup repair.
39
40
  - Do not create `.hive/map` manually, do not edit `.hive/config.yaml`, and do not edit `.gitignore`.
40
41
 
41
42
  Map-maintenance authority:
@@ -61,9 +62,20 @@ Run Hive Lite from the target repo root. Prefer the package command:
61
62
  hive-lite <args>
62
63
  ```
63
64
 
64
- If `hive-lite` is not available, try an explicit path already given by the user or conversation context, such as `node /path/to/hive-lite/bin/hive.js <args>`. If it is still unclear, ask for the Hive Lite CLI path.
65
+ If `hive-lite` is not available, stop and tell the user:
65
66
 
66
- In examples below, replace `hive-lite` with the resolved command.
67
+ ```text
68
+ I can't find the `hive-lite` command.
69
+
70
+ Please install or update Hive Lite CLI:
71
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
72
+ hive-lite --version
73
+ hive-lite skills sync --agent all
74
+
75
+ Then rerun this skill.
76
+ ```
77
+
78
+ Keep user-facing recovery guidance to the install/update block above unless the user explicitly says they are developing Hive Lite itself.
67
79
 
68
80
  ## Workflow
69
81
 
@@ -80,17 +92,11 @@ If it reports `hive.state = repo_setup_required`, stop immediately. Do not run `
80
92
  If it reports `hive.state = hive_init_required`, or `hive.initialized = false`, stop immediately. Do not run `hive-lite init` yourself. Tell the user:
81
93
 
82
94
  ```text
83
- Hive Lite is not initialized in this repo yet.
95
+ Hive Lite setup is missing or incomplete in this repo.
84
96
 
85
97
  Recommended next step:
86
98
  $hive-lite-bootstrap
87
- 这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
88
-
89
- If the bootstrap skill is not available, run `hive-lite init` from the repo root, then rerun:
90
- $hive-lite-map-maintainer
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.
99
+ 这是已有项目第一次接入 Hive Lite,或 Hive Lite setup 文件缺失。请完成初始化或 setup 修复,建立第一版 Project Map,不要改应用代码。
94
100
  ```
95
101
 
96
102
  For older Hive Lite versions that do not report `hive.initialized`, check for required setup files before continuing:
@@ -128,7 +134,7 @@ Before any mode-specific work, check whether the target repo has the required Hi
128
134
  .hive/map/validation.yaml
129
135
  ```
130
136
 
131
- If any required map file is missing, stop immediately and recommend `$hive-lite-bootstrap`. Do not create missing map files manually.
137
+ If any required map file is missing, stop immediately and recommend `$hive-lite-bootstrap` as a setup repair handoff. Do not create missing map files manually. If the repo already had a committed Project Map, tell the user that restoring the missing file from git is safer than silently rebuilding it from defaults.
132
138
 
133
139
  ### 3. Verify Current Map
134
140
 
@@ -24,18 +24,19 @@ Do not assume this skill can invoke another skill automatically. Handoffs are te
24
24
  - To map maintenance: output a `$hive-lite-map-maintainer` prompt and stop.
25
25
  - To finish work after coding: include `$hive-lite-finish` in the final instructions, but do not run finish actions here.
26
26
 
27
- If the target handoff skill is unavailable in the active agent CLI, tell the user to install or sync Hive Lite skills for their agent first. Hive Lite cannot detect the running agent by itself; use the user's agent target such as `codex`, `claude`, or `gemini`:
27
+ If a Hive Lite handoff skill is missing or stale, stop and tell the user to update the CLI and sync skills:
28
28
 
29
29
  ```bash
30
- hive-lite skills doctor --agent <codex|claude|gemini>
31
- hive-lite skills install --agent <codex|claude|gemini>
30
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
31
+ hive-lite --version
32
+ hive-lite skills sync --agent all
32
33
  ```
33
34
 
34
35
  ## Boundaries
35
36
 
36
37
  - Do not directly edit application source, tests, docs, `.gitignore`, generated artifacts, `.hive/context`, `.hive/changes`, or `.hive/deltas`.
37
38
  - 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 recommend `$hive-lite-bootstrap` before using this skill.
39
+ - Do not run `hive-lite init`. If Hive Lite setup is missing or incomplete, stop and recommend `$hive-lite-bootstrap` before using this skill.
39
40
  - 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
41
  - During preflight, you may help finish or isolate pre-existing work only after explicit user confirmation.
41
42
  - Never discard changes with destructive commands such as `git reset --hard`, `git checkout --`, or forced branch switches.
@@ -49,9 +50,20 @@ Run Hive Lite from the target repo root. Prefer the package command:
49
50
  hive-lite <args>
50
51
  ```
51
52
 
52
- If `hive-lite` is not available, try an explicit path already given by the user or conversation context, such as `node /path/to/hive-lite/bin/hive.js <args>`. Do not spend a long time searching the target repo; ask for the Hive Lite CLI path if it is not obvious.
53
+ If `hive-lite` is not available, stop and tell the user:
53
54
 
54
- In command examples below, replace `hive-lite` with the resolved command.
55
+ ```text
56
+ I can't find the `hive-lite` command.
57
+
58
+ Please install or update Hive Lite CLI:
59
+ npm install -g hive-lite@latest --registry https://registry.npmjs.org
60
+ hive-lite --version
61
+ hive-lite skills sync --agent all
62
+
63
+ Then rerun this skill.
64
+ ```
65
+
66
+ Keep user-facing recovery guidance to the install/update block above unless the user explicitly says they are developing Hive Lite itself.
55
67
 
56
68
  ## Workflow
57
69
 
@@ -78,11 +90,11 @@ If status reports `hive.state = repo_setup_required`, stop immediately. Do not r
78
90
  If status reports `hive.state = hive_init_required`, or `hive.initialized = false`, stop immediately. Do not run `hive-lite init` yourself. Tell the user:
79
91
 
80
92
  ```text
81
- Hive Lite is not initialized in this repo yet.
93
+ Hive Lite setup is missing or incomplete in this repo.
82
94
 
83
95
  Recommended next step:
84
96
  $hive-lite-bootstrap
85
- 这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
97
+ 这是已有项目第一次接入 Hive Lite,或 Hive Lite setup 文件缺失。请完成初始化或 setup 修复,建立第一版 Project Map,不要改应用代码。
86
98
 
87
99
  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.
88
100
  ```
@@ -99,9 +111,9 @@ For older Hive Lite versions that do not report `hive.initialized`, check whethe
99
111
 
100
112
  If any are missing, stop with the same message. Do not run init automatically and do not create missing map files manually.
101
113
 
102
- If the command is unavailable in an older Hive Lite, fall back to `git status --porcelain`.
114
+ If `hive-lite status --json` is unavailable, stop and tell the user to update Hive Lite CLI and sync skills. Do not fall back to git-only status for normal pilot use.
103
115
 
104
- Continue only when `canStartNewRequirement` is true or fallback git status is clean. If not clean, read [preflight.md](references/preflight.md), present options, and stop immediately unless the user had already explicitly chosen an option before this step.
116
+ Continue only when `canStartNewRequirement` is true. If not clean, read [preflight.md](references/preflight.md), present options, and stop immediately unless the user had already explicitly chosen an option before this step.
105
117
 
106
118
  After any preflight action, rerun `hive-lite status --json`; continue only when the target worktree is clean.
107
119
 
@@ -11,11 +11,11 @@ If `hive-lite status --json` reports `hive.state = hive_init_required` or `hive.
11
11
  Say:
12
12
 
13
13
  ```text
14
- Hive Lite is not initialized in this repo yet.
14
+ Hive Lite setup is missing or incomplete in this repo.
15
15
 
16
16
  Recommended next step:
17
17
  $hive-lite-bootstrap
18
- 这是已有项目第一次接入 Hive Lite。请完成初始化,建立第一版 Project Map,不要改应用代码。
18
+ 这是已有项目第一次接入 Hive Lite,或 Hive Lite setup 文件缺失。请完成初始化或 setup 修复,建立第一版 Project Map,不要改应用代码。
19
19
 
20
20
  After bootstrap builds the first map, commit the Hive Lite setup and map files together before starting the product requirement.
21
21
  ```
@@ -107,7 +107,7 @@ hive-lite accept <chg_id> --commit -m "<message>"
107
107
  ## Safety Rules
108
108
 
109
109
  - Do not continue to `find` while status is not clean.
110
- - Do not run `hive-lite init` from this start skill; first-time setup belongs to `$hive-lite-bootstrap`.
110
+ - Do not run `hive-lite init` from this start skill; first-time setup and setup repair belong to `$hive-lite-bootstrap`.
111
111
  - Do not initialize git automatically.
112
112
  - Do not assume "new branch" cleans the worktree; dirty files usually follow branch switches.
113
113
  - Prefer commit, stash, or separate git worktree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hive-lite",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "Local Project Map + Change Control for coding agents.",
5
5
  "keywords": [
6
6
  "codex",
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. Use $hive-lite-bootstrap first, or run hive-lite init from the repo root as the low-level fallback.${missing}`);
106
+ throw new Error(`${commandName} requires Hive Lite initialization. Use $hive-lite-bootstrap first.${missing}`);
107
107
  }
108
108
  }
109
109
 
package/src/lib/health.js CHANGED
@@ -69,7 +69,7 @@ function readYamlHealth(root, name, fallback, findings) {
69
69
  field: '',
70
70
  message: `.hive/map/${name} is missing.`,
71
71
  impact: 'Hive Lite cannot evaluate Project Map health.',
72
- fix: 'Run hive-lite init or restore the missing map file.',
72
+ fix: 'Use $hive-lite-bootstrap for first-time or partial setup. If this repo already had a committed Project Map, restore the missing map file from git instead of rebuilding it silently.',
73
73
  });
74
74
  return { doc: fallback, valid: false };
75
75
  }
package/src/lib/next.js CHANGED
@@ -162,21 +162,21 @@ function applySkillPreflight(root, options, current) {
162
162
  ...current,
163
163
  phaseGuess: 'skill_preflight',
164
164
  primaryAction: action({
165
- kind: 'install_operator_skill',
166
- label: `Install ${preflight.requiredSkill}`,
167
- command: preflight.installCommand,
168
- explanation: 'The recommended next operator step requires this Hive Lite skill in the selected agent target.',
165
+ kind: 'sync_operator_skill',
166
+ label: `Sync ${preflight.requiredSkill}`,
167
+ command: preflight.syncCommand,
168
+ explanation: 'The recommended next operator step requires a current Hive Lite skill in the selected agent target.',
169
169
  }),
170
170
  secondaryActions: [
171
171
  action({
172
172
  ...blockedAction,
173
173
  enabled: false,
174
- disabledReason: `Install ${preflight.requiredSkill} first for the selected agent target.`,
174
+ disabledReason: `Sync ${preflight.requiredSkill} first for the selected agent target.`,
175
175
  }),
176
176
  ...current.secondaryActions,
177
177
  ],
178
- summaryForHuman: `需要先安装 ${preflight.requiredSkill},然后再继续 Hive Lite operator flow。`,
179
- summaryForAgent: `The selected agent target is missing ${preflight.requiredSkill}. Run skills install before using the handoff skill.`,
178
+ summaryForHuman: `需要先同步 ${preflight.requiredSkill},然后再继续 Hive Lite operator flow。`,
179
+ summaryForAgent: `The selected agent target is missing or has a stale ${preflight.requiredSkill}. Run skills sync before using the handoff skill.`,
180
180
  operatorSkillPreflight: preflight,
181
181
  };
182
182
  }
@@ -238,10 +238,10 @@ function evaluateNextAction(cwd, options = {}) {
238
238
  kind: 'run_bootstrap_skill',
239
239
  label: 'Use hive-lite-bootstrap',
240
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.',
241
+ explanation: 'This git repository is missing required Hive Lite setup files. Use the bootstrap skill to initialize or repair setup, build the first Project Map when needed, and prepare the setup/map commit before product work starts.',
242
242
  });
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.';
243
+ summaryForHuman = '当前项目缺少 Hive Lite setup 文件。建议使用 hive-lite-bootstrap 完成首次接入或 setup 修复,并在开始第一个需求前准备 setup/map 提交。';
244
+ summaryForAgent = 'Hive Lite setup is missing or incomplete. Stop ordinary start/finish/map-maintainer workflows and hand off to hive-lite-bootstrap.';
245
245
  } else if (!workspace.canStartNewRequirement) {
246
246
  if (workspace.hive.state === 'in_progress') {
247
247
  phaseGuess = 'finish';
package/src/lib/skills.js CHANGED
@@ -215,11 +215,11 @@ function targetSelection(options = {}, command = 'doctor') {
215
215
  };
216
216
  }
217
217
 
218
- function installCommandForOptions(options = {}) {
219
- if (options.path && options.path !== true) return `hive-lite skills install --path ${options.path}`;
220
- if (options.agent && options.agent !== true) return `hive-lite skills install --agent ${options.agent}`;
221
- if (options.all) return 'hive-lite skills install --agent all';
222
- return 'hive-lite skills install --agent <codex|claude|gemini>';
218
+ function syncCommandForOptions(options = {}) {
219
+ if (options.path && options.path !== true) return `hive-lite skills sync --path ${options.path}`;
220
+ if (options.agent && options.agent !== true) return `hive-lite skills sync --agent ${options.agent}`;
221
+ if (options.all) return 'hive-lite skills sync --agent all';
222
+ return 'hive-lite skills sync --agent all';
223
223
  }
224
224
 
225
225
  function skillPreflight(cwd, skillName, options = {}) {
@@ -246,7 +246,7 @@ function skillPreflight(cwd, skillName, options = {}) {
246
246
  requiredSkill: skillName,
247
247
  targetSelection: targetSelection(options, 'doctor'),
248
248
  ready: targets.length > 0 && targets.every((target) => target.status === 'current'),
249
- installCommand: installCommandForOptions(options),
249
+ syncCommand: syncCommandForOptions(options),
250
250
  targets,
251
251
  };
252
252
  }
package/src/lib/status.js CHANGED
@@ -226,8 +226,8 @@ function actionsFor(state, latestId, diffMatches) {
226
226
  }
227
227
  if (state === 'hive_init_required') {
228
228
  return [
229
- action('run_hive_init', 'Run Hive Lite init', 'hive-lite init', 'Initialize Hive Lite setup files before using Hive Lite skills.'),
230
- action('stop', 'Stop', null, 'Do not run start, finish, or map-maintainer skills until Hive Lite has been initialized.'),
229
+ action('run_bootstrap_skill', 'Use hive-lite-bootstrap', '$hive-lite-bootstrap', 'Use the first-time setup or setup repair skill before ordinary start, finish, or map-maintainer workflows.'),
230
+ action('stop', 'Stop', null, 'Do not run start, finish, or map-maintainer skills until Hive Lite setup is complete.'),
231
231
  ];
232
232
  }
233
233
  if (state === 'clean') {
@@ -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. Use $hive-lite-bootstrap for first-time setup, or run hive-lite init as the low-level fallback.';
317
+ reason = 'Hive Lite setup is missing or incomplete in this git repository. Use $hive-lite-bootstrap for first-time setup or setup repair.';
318
318
  } else if (dirty && latest.change) {
319
319
  if (accepted(latest.change) && !committed(latest.change) && diffMatches) {
320
320
  state = 'accepted_uncommitted';