hive-lite 0.1.9 → 0.2.1

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.
@@ -7,7 +7,7 @@ description: Use this skill when a user gives a coding requirement, screenshot,
7
7
 
8
8
  ## Purpose
9
9
 
10
- Turn a natural-language or visual requirement into an edit-ready Hive Lite Context Packet and a concise prompt for a separate coding agent.
10
+ Turn a natural-language or visual requirement, or a saved Start Intent Handoff id/path, into an edit-ready Hive Lite Context Packet and a concise prompt for a separate coding agent.
11
11
 
12
12
  This is a pre-work skill. It may refine `.hive/map/*.yaml` so Hive Lite can route the requirement safely, but it must not implement the requested product/code change.
13
13
 
@@ -19,7 +19,9 @@ This is a pre-work skill. It may refine `.hive/map/*.yaml` so Hive Lite can rout
19
19
 
20
20
  ## Skill Handoffs
21
21
 
22
- Do not assume this skill can invoke another skill automatically. Handoffs are text for the user to run explicitly.
22
+ Do not assume this skill can invoke another skill automatically. Handoffs are text for the user to paste as a new skill invocation message.
23
+
24
+ Skill handoffs are not terminal commands. Do not run raw `hive-lite find/check/validate` commands as a substitute for a `$hive-lite-start-prompt`, `$hive-lite-finish`, or `$hive-lite-map-maintainer` handoff. If the human asks you to run the next skill for them, remind them to paste the provided `$...` block as a new message so the correct skill is loaded.
23
25
 
24
26
  - To map maintenance: output a `$hive-lite-map-maintainer` prompt and stop.
25
27
  - To finish work after coding: include `$hive-lite-finish` in the final instructions, but do not run finish actions here.
@@ -32,16 +34,40 @@ hive-lite --version
32
34
  hive-lite skills sync --agent all
33
35
  ```
34
36
 
37
+ ## Operator Runner Mode
38
+
39
+ If the invocation includes `Step result path`, `Artifacts directory`, and `Step-result schema_version`, you are running under `hive-lite operator run`.
40
+
41
+ - Treat natural-language output as human/debug text only; the runner reads `step-result.json`.
42
+ - Write copyable artifacts under the provided `Artifacts directory`, then write `step-result.json` to the exact `Step result path`.
43
+ - For `prompt_ready`, write the coding prompt artifact and set `recommended_action` to `copy_coding_prompt`.
44
+ - For `split_required`, write a ready-phase handoff prompt artifact and set `recommended_action` to `start_ready_phase`.
45
+ - For map-maintainer handoffs or map repairs that must be committed/stashed before continuing, write `Artifacts directory/map-update-required.md`, use `map_update_required` with `recommended_action: map_update_required`, and set `artifacts.map_update_required_path`.
46
+ - For setup, preflight, validation, or irrecoverable start blockers, use `blocked` with `recommended_action: revise_required`, or `failed` for unexpected tool/runtime failures.
47
+ - After writing the structured result, stop. Do not wait for human input inside the operator-agent session.
48
+
35
49
  ## Boundaries
36
50
 
37
51
  - Do not directly edit application source, tests, docs, `.gitignore`, generated artifacts, `.hive/context`, `.hive/changes`, or `.hive/deltas`.
38
52
  - 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`.
39
53
  - Do not run `hive-lite init`. If Hive Lite setup is missing or incomplete, stop and recommend `$hive-lite-bootstrap` before using this skill.
40
54
  - 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.
55
+ - Do not continue a discovery conversation. If a Start Intent Handoff is invalid, not `ready_for_hive`, or still has `Blocking Questions`, send the user back to `$hive-lite-discovery`.
41
56
  - During preflight, you may help finish or isolate pre-existing work only after explicit user confirmation.
42
57
  - Never discard changes with destructive commands such as `git reset --hard`, `git checkout --`, or forced branch switches.
43
58
  - Do not call an LLM API from Hive Lite. If a map gap exists, use `hive map prompt --from-find` as the repair brief and edit the map directly as the current agent.
44
59
 
60
+ ## Completion Contract
61
+
62
+ End with exactly one clear outcome:
63
+
64
+ - `prompt_ready`: one edit-ready Context Packet exists, one coding-agent prompt is produced, and the human/runner knows to use `$hive-lite-finish` with the context id after coding.
65
+ - `split_required`: no coding prompt is produced; the human gets one copyable `$hive-lite-start-prompt` handoff for the recommended ready phase.
66
+ - `map_update_required` or blocked start: no coding prompt is produced; the human gets exact terminal commands or a skill handoff to unblock the map/setup/preflight issue.
67
+ - `failed`: only for an unexpected tool/runtime failure that prevents a normal blocked result.
68
+
69
+ Do not end with an open-ended suggestion when the next required action can be stated exactly.
70
+
45
71
  ## Find The CLI
46
72
 
47
73
  Run Hive Lite from the target repo root. Prefer the package command:
@@ -65,12 +91,105 @@ Then rerun this skill.
65
91
 
66
92
  Keep user-facing recovery guidance to the install/update block above unless the user explicitly says they are developing Hive Lite itself.
67
93
 
94
+ ## Language Style
95
+
96
+ Use Chinese for human-facing process guidance, warnings, and instructions, especially text that tells the user what to do next or why the flow is stopping.
97
+
98
+ Keep technical identifiers and structured Hive Lite labels in English. Do not translate:
99
+
100
+ - Hive Lite fields and labels such as `Context Packet`, `Direct Writable`, `Reference Files`, `Review-Gated`, `Do Not Touch`, `Validation`, `Evidence`, `Change`, `Commit`, `Map Delta Candidate`, `Worktree`.
101
+ - CLI commands, file paths, context/change ids, validation profile ids, verdict names, risk levels, branch names, commit hashes, package names, and code symbols.
102
+ - Copyable prompt blocks that are meant for another agent, unless the user's original requirement is Chinese.
103
+
104
+ Example style: keep `No push or deploy was run.` as a Chinese reminder such as `没有执行 push 或 deploy。`, but keep nearby structured lines like `Change: chg_xxx`, `Commit: <sha>`, and `Validation: mvn -q -DskipTests compile passed` in English.
105
+
106
+ ## Human Action Output
107
+
108
+ Whenever you stop and need the human to do something before this skill can continue, make the action concrete. Do not only say "commit/stash/rerun" or "choose a phase".
109
+
110
+ Separate terminal commands from skill prompts:
111
+
112
+ - Terminal commands are shell commands. Tell the human to run them in a real terminal from the target repo root, not by typing them into the agent chat. Always include `cd <target repo root>` before the command block when you know the path.
113
+ - If the current agent can safely perform a terminal action, offer it as an explicit second option and wait for confirmation. Phrase it as: `Reply here if you want me to run this terminal command for you.` Do not execute commits, stashes, accepts, or other state-changing commands without explicit confirmation.
114
+ - Skill prompts such as `$hive-lite-start-prompt`, `$hive-lite-finish`, and `$hive-lite-map-maintainer` must be pasted by the human as a new skill invocation message. Do not run raw `hive-lite find/check/validate` as a substitute for those skill handoffs. If the human says "help me run the next skill", remind them to paste the provided `$...` block as a new message so the correct skill is loaded.
115
+
116
+ Use this shape:
117
+
118
+ ~~~text
119
+ Why I stopped:
120
+ - <one or two bullets explaining the safety boundary>
121
+
122
+ Recommended action option 1: run this in your terminal, not in the agent chat:
123
+ ```bash
124
+ cd <target repo root>
125
+ <exact command>
126
+ ```
127
+
128
+ What this does:
129
+ - <plain-language effect, such as "commits only the Project Map refinement">
130
+
131
+ Option 2: if you want this agent to run the terminal command for you, reply with explicit confirmation and the commit/stash message to use.
132
+
133
+ After that, start the next skill by pasting this as a new message:
134
+ ```text
135
+ <exact $hive-lite-start-prompt handoff or rerun prompt>
136
+ ```
137
+ ~~~
138
+
139
+ If there are reasonable alternatives, keep the recommended action first and then list alternatives with exact commands. For map-only repair, prefer a commit when the map refinement is accepted:
140
+
141
+ ```bash
142
+ cd <target repo root>
143
+ git add .hive/map/areas.yaml
144
+ git commit -m "Refine Hive Lite map for <area or requirement>"
145
+ ```
146
+
147
+ If the human does not want to keep the map repair yet, offer a stash alternative:
148
+
149
+ ```bash
150
+ cd <target repo root>
151
+ git stash push -m "WIP Hive Lite map refinement for <area or requirement>" -- .hive/map/areas.yaml .hive/map/project.yaml .hive/map/rules.yaml .hive/map/validation.yaml
152
+ ```
153
+
154
+ Never run commits, stashes, accepts, resets, or destructive cleanup without explicit human confirmation.
155
+
156
+ ## Context Gathering
157
+
158
+ Gather only enough facts to choose the next safe Hive Lite action.
159
+
160
+ Stop searching once these are known:
161
+
162
+ - repo/setup/worktree state from `hive-lite status --json`;
163
+ - valid requirement or Start Intent Handoff-derived `findIntent`;
164
+ - current `find` mode, context id, selected area, warnings, and validation plan;
165
+ - focused map health for the selected area when an edit context is possible.
166
+
167
+ Use `--explain` only when human-readable routing evidence is needed. During map repair, keep the existing two-cycle limit and stop once the next action is clear.
168
+
68
169
  ## Workflow
69
170
 
70
171
  ### 1. Establish Target And Calibrate Input
71
172
 
72
173
  Identify the target repo root, original user requirement, and any screenshot/visual evidence.
73
174
 
175
+ If the user provides `Use Start Intent Handoff: <intent_id_or_path>` or otherwise gives a Start Intent Handoff id/path, load it before normal input calibration:
176
+
177
+ ```bash
178
+ hive-lite intent validate <intent_id_or_path> --json
179
+ hive-lite intent show <intent_id_or_path> --json
180
+ ```
181
+
182
+ Use the JSON output for decisions. Refuse and send the user back to `$hive-lite-discovery` if validation is not valid, `status` is not `ready_for_hive`, or `fields.blockingQuestions` exists and is not `None`.
183
+
184
+ For a valid handoff:
185
+
186
+ - Set `originalRequirement` from the Start Intent Handoff title, `fields.agreedDirection`, and `fields.userConfirmedDecisions`; keep `fields.originalIdea` as provenance only.
187
+ - Set `findIntent` from `show.findIntent` when present. If unavailable, derive it only from `Agreed Direction`.
188
+ - Treat `User-Confirmed Decisions` as coding-prompt requirement context, not routing text for `hive-lite find`.
189
+ - Treat `Pre-Hive Observations / Hints` as non-authoritative hints only. Hive Lite must verify them through Project Map and Context Packet discovery.
190
+ - Do not add Direct Writable files, final file scope, implementation plan, validation plan, or files to modify from the handoff. Those are execution boundaries produced later by `hive-lite find`.
191
+ - Do not ask new discovery questions inside this skill. If product questions are still unresolved, stop with an explicit `$hive-lite-discovery` handoff.
192
+
74
193
  Read [input-calibration.md](references/input-calibration.md). Produce:
75
194
 
76
195
  - `originalRequirement`: the user's request preserved for the final prompt.
@@ -153,16 +272,22 @@ Why:
153
272
 
154
273
  Suggested phases:
155
274
  1. <area id / phase hint>
156
- Continue with:
275
+ Copy exactly this block to start this phase:
276
+ ```text
157
277
  $hive-lite-start-prompt
158
278
  Continue split <split_id> with phase <phase_id>.
159
279
  Use this find intent: "<candidatePhaseSeeds[n].findIntent>"
160
- Evidence: <candidatePhaseSeeds[n].evidenceClasses / validationProfiles>
280
+ ```
281
+ Notes:
282
+ - Expected evidence: <candidatePhaseSeeds[n].evidenceClasses, or "not configured">
283
+ - Expected validation: <candidatePhaseSeeds[n].validationProfiles, or "not configured">
161
284
  2. ...
162
285
 
163
286
  Please choose one phase to start, then rerun this skill with that phase.
164
287
  ```
165
288
 
289
+ Only the fenced `$hive-lite-start-prompt` block is user input. Keep evidence, validation, risk, dependencies, and non-goals outside the copyable block as notes, and do not repeat validation lines.
290
+
166
291
  Do not create durable Feature/Task objects. Do not edit code. Do not merge candidate areas into a wider prompt.
167
292
 
168
293
  If the JSON includes `splitNote`, mention its markdown path. Treat it as a local context artifact, not a task list. When the user explicitly invokes this skill for a chosen phase, rerun find with the phase source:
@@ -173,6 +298,8 @@ hive-lite find "<phase.findIntent>" --from-split <split_id> --phase <phase_id> -
173
298
 
174
299
  Continue only if that phase-specific find returns `edit_context`.
175
300
 
301
+ A chosen split phase can still expose its own map gap. If the phase-specific find returns `discovery_context` or map-gap warnings, repair only the selected phase's area using the normal map repair rules. If map files change during that phase repair, stop before generating the coding prompt and provide an explicit command block to commit or stash the map refinement, then provide the exact same phase-specific `$hive-lite-start-prompt` block to rerun after the worktree is clean.
302
+
176
303
  If the phase-specific JSON includes `phaseDependencyStatus.canStartNormally: false`, do not output a coding prompt. If `splitFound` or `phaseFound` is false, explain that the copied split command is not an edit permit and recommend finding the current split note with `hive-lite status --json` or rerunning the original broad find command. Otherwise explain the missing required phases and recommend the next dependency phase. If the user says "continue split" or "resume the large requirement", use `hive-lite status --json` and its `recentSplitNotes` to find ready phases, then output a phase-specific `$hive-lite-start-prompt` handoff or continue only if the user explicitly asked this active skill to proceed with that phase.
177
304
 
178
305
  Accept the packet only when all are true:
@@ -182,7 +309,7 @@ Accept the packet only when all are true:
182
309
  - `writableScope` contains at least one narrow direct file.
183
310
  - `writePlan.blockingWarnings` is empty when present.
184
311
  - `validationPlan` is not empty.
185
- - `warnings` has no map-gap warning such as `NO_CONFIDENT_AREA`, `MISSING_DIRECT_WRITABLE_SCOPE`, `MISSING_DIRECT_NEW_FILE_SCOPE`, `DIRECT_ONLY_REFERENCE_PEERS`, `BROAD_FALLBACK_ONLY`, `TARGET_ENTITY_MISMATCH`, `MISSING_ENTRYPOINT`, or `MISSING_VALIDATION`.
312
+ - `warnings` has no map-gap warning such as `NO_CONFIDENT_AREA`, `MISSING_DIRECT_WRITABLE_SCOPE`, `MISSING_DIRECT_NEW_FILE_SCOPE`, `DIRECT_ONLY_REFERENCE_PEERS`, `BROAD_FALLBACK_ONLY`, `TARGET_ENTITY_MISMATCH`, `AMBIGUOUS_TARGET_IDENTITY`, `LOW_CONFIDENCE_INTENT_WRITE_PLAN`, `MISSING_ENTRYPOINT`, or `MISSING_VALIDATION`.
186
313
  - `hive-lite map health --area <areaId> --json` reports no critical findings.
187
314
 
188
315
  Review-gated conditional or broad fallback scope is allowed. Include it in the final prompt as a boundary, not as a failure.
@@ -201,6 +328,10 @@ Repair principles:
201
328
 
202
329
  - Prefer focused product/work area ids such as `dashboard.action_inbox`, not one-part ids such as `dashboard`.
203
330
  - Preserve unrelated areas exactly unless a change is needed for the reported map gap.
331
+ - Relevant files, entrypoints, peer examples, and broad fallback scope are not write permission.
332
+ - Add `identity_aliases` when user-facing names such as ChatGPT, image2, model names, or vendor nicknames should resolve to one peer identity.
333
+ - Add `peer_file_templates` only as read-only candidate path hints for repeated peer families; they do not replace `writable_create_patterns`.
334
+ - Create intents need `writable_create_patterns`; required hooks need exact `writable_existing`.
204
335
  - Use `scope.writable_direct` for exact files the coding agent may edit, or very small direct patterns when the intent needs new peer files such as a provider, proxy, adapter, connector, or plugin.
205
336
  - Prefer `scope.writable_existing` for exact update targets and `scope.writable_create_patterns` for narrow create permissions when the map needs operation-specific write capabilities.
206
337
  - Put copy sources and peer examples under `scope.readable_reference` when they should guide implementation but not be edited.
@@ -222,9 +353,9 @@ hive-lite map health --area <area_id> --json
222
353
  hive-lite find "<findIntent>" --json
223
354
  ```
224
355
 
225
- Repeat at most two repair cycles. If the packet still is not edit-ready, stop and return the blocker, current context id, findings, and recommended next command.
356
+ Repeat at most two repair cycles. If the packet still is not edit-ready, stop and return the blocker, current context id, findings, what the attempted repairs changed, and the exact next command or handoff prompt.
226
357
 
227
- If map files were changed during repair, stop before producing a coding prompt unless the worktree has been returned to clean. Ask the user to commit the map refinement, stash it, or use a separate worktree; then rerun this skill.
358
+ If map files were changed during repair, stop before producing a coding prompt unless the worktree has been returned to clean. Give a recommended terminal commit command with `cd <target repo root>`, explain that it records only the Project Map refinement and not application code, then give the exact `$hive-lite-start-prompt` block for the human to paste as a new message to rerun this same original requirement or chosen phase. Also offer a terminal stash command as an alternative if the human does not want to keep the map repair yet. You may offer to run the terminal commit/stash command after explicit confirmation, but you must not run the next `$hive-lite-start-prompt` handoff yourself.
228
359
 
229
360
  If the repair requires broad map refresh beyond the selected area, stop and hand off to `$hive-lite-map-maintainer`:
230
361
 
@@ -248,14 +379,14 @@ If `needs_decomposition` persists after the user selects a smaller phase, ask th
248
379
 
249
380
  ### 7. Return The Start Prompt
250
381
 
251
- When ready, return two clearly separated sections:
382
+ When ready, return a short human summary plus one fenced copy block for the coding agent:
252
383
 
253
- - `Preparation Summary`: for the human only. Include preflight actions, commits made before start, whether `.hive/map/*.yaml` changed, and the Context Packet id.
254
- - `Coding Agent Prompt`: the only text the user should pass to the coding agent.
384
+ - `Preparation Summary`: for the human only. Include preflight actions, commits made before start, whether `.hive/map/*.yaml` changed, and the Context Packet id. This section is not for the coding agent.
385
+ - `Coding Agent Prompt`: place the entire prompt inside one fenced `text` block. The user should copy only that block to the coding agent.
255
386
 
256
- Do not include preparation/provenance notes inside `Coding Agent Prompt`.
387
+ Do not include preparation/provenance notes inside the fenced `Coding Agent Prompt` block. Do not put copyable prompt text outside that block.
257
388
 
258
- ```text
389
+ ~~~text
259
390
  Ready to start.
260
391
 
261
392
  Preparation Summary:
@@ -265,57 +396,50 @@ Preparation Summary:
265
396
  - Context Packet: <relative .hive/context/ctx_xxx.md>
266
397
 
267
398
  Coding Agent Prompt:
268
- Context Packet:
269
- <relative .hive/context/ctx_xxx.md>
270
-
271
- Requirement:
272
- <originalRequirement>
273
-
274
- Use this context packet as your source of truth. Edit only Direct Writable files.
275
-
276
- Direct Writable:
277
- - <file>
278
-
279
- Reference Files:
280
- - <file and reason, only when useful; do not edit unless it is also Direct Writable>
399
+ Copy everything inside this block to the coding agent. Do not copy the Preparation Summary.
281
400
 
282
- Review-Gated:
283
- - <conditional/broad item and reason>
284
-
285
- Do Not Touch:
286
- - <forbidden item>
401
+ ```text
402
+ Task:
403
+ - Requirement: <originalRequirement>
404
+ - Context Packet: <relative .hive/context/ctx_xxx.md>
405
+ - Read the Context Packet before editing; it is the source of truth for scope.
287
406
 
288
- Validation To Expect:
289
- - <command or manual check>
407
+ Authority:
408
+ - Allowed: modify only the Direct Writable files listed in the Context Packet.
409
+ - Reference only: use Reference Files for context, but do not edit them unless they are also Direct Writable.
410
+ - Ask first: if the fix requires a Review-Gated file, stop and explain why it is needed before editing.
411
+ - Forbidden: do not touch Do Not Touch paths, do not expand scope, and do not start another split phase.
290
412
 
291
- Verification Guidance:
292
- - If the change is directly manually verifiable, provide exact manual verification steps.
293
- - If the change is not directly manually verifiable and changes behavior, provide focused automated verification when practical.
413
+ Verification:
414
+ - Expected validation: <command or manual check>
415
+ - If behavior changes, add or update the smallest focused verification that is practical.
294
416
  - Prefer a small existing or new focused test over broad unrelated tests.
295
- - Do not add broad, brittle, or low-value tests only for process.
296
417
  - If focused automated verification is impractical, explain why and provide a concise review rationale.
297
418
  - Do not weaken or delete validation, CI, or existing tests.
298
419
 
299
- Hive Check After Editing:
300
- - <resolved hive command> check --context <ctx_id>
301
-
302
- Read <relative .hive/context/ctx_xxx.md>.
303
- Modify only the Direct Writable files listed there.
304
- If the fix requires a Review-Gated file, stop and explain why it is needed before editing it.
305
- Do not touch Do Not Touch paths.
306
- After editing, summarize changed files and tell the human to run:
307
- <resolved hive command> check --context <ctx_id>
308
-
309
- Then the human can use `$hive-lite-finish` to drive check, validation, manual evidence, and acceptance.
310
-
311
- If the human later reports that business/manual verification failed, revise under this same Context Packet instead of expanding scope or treating it as a new requirement. Use the human's failure observation as the repair target, keep the same Direct Writable / Review-Gated / Do Not Touch boundaries, and again tell the human to rerun:
312
- <resolved hive command> check --context <ctx_id>
420
+ Finish:
421
+ - Summarize changed files and important behavior changes.
422
+ - Tell the human: `Run $hive-lite-finish with context <ctx_id>.`
423
+ - CLI fallback for operators not using skills: `<resolved hive command> check --context <ctx_id>`.
424
+ - Do not tell the human to start another split phase yourself; `$hive-lite-finish` reports the next phase after this change is checked, validated, accepted, and committed.
425
+
426
+ Repair Behavior:
427
+ - If the human later reports that business/manual verification failed, revise under this same Context Packet.
428
+ - Use the human's failure observation as the repair target.
429
+ - Keep the same Direct Writable / Review-Gated / Do Not Touch boundaries.
430
+ - Again tell the human: `Run $hive-lite-finish with context <ctx_id>.`
313
431
  ```
432
+ ~~~
314
433
 
315
- Preparation details such as commits made, stashes created, worktree setup, map files changed, or "no map files changed" are for `Preparation Summary` only. Do not list `hive-lite check --context ...` under validation commands; it is the change-control step after the coding agent edits files.
434
+ Preparation details such as commits made, stashes created, worktree setup, map files changed, or "no map files changed" are for `Preparation Summary` only. Do not list `hive-lite check --context ...` under validation commands; it is the lower-level change-control step that `$hive-lite-finish` runs after the coding agent edits files.
316
435
 
317
436
  ## Failure Output
318
437
 
319
- If no edit-ready prompt can be produced, return the context packet id, current mode, selected area if any, blocking warnings or health critical findings, exact next command, and whether `.hive/map/*.yaml` files were changed.
438
+ If no edit-ready prompt can be produced, return the context packet id, current mode, selected area if any, blocking warnings or health critical findings, whether `.hive/map/*.yaml` files were changed, and an explicit next action block:
439
+
440
+ - If map files changed: show terminal commands with `cd <target repo root>`, `git status --short`, `git add ...`, and `git commit -m ...`, explain that these commands belong in a terminal, then show the exact `$hive-lite-start-prompt` rerun block as a new message the human must paste manually.
441
+ - If a split is needed: show only the copyable `$hive-lite-start-prompt` block for the recommended phase, with evidence/validation outside the block as notes.
442
+ - If map maintenance is needed: show the exact `$hive-lite-map-maintainer` handoff block.
443
+ - If setup or dirty preflight blocks start: show the exact command or explicit choice list from the relevant preflight guidance.
320
444
 
321
445
  Do not pretend the agent can safely start coding when the packet is `discovery_context` or `needs_map`.
@@ -48,15 +48,36 @@ Meaning: dirty files are not tied to a Hive Change Record.
48
48
 
49
49
  Stop and present options:
50
50
 
51
- ```text
51
+ ~~~text
52
52
  The worktree has unmanaged dirty changes, so I cannot safely start a new Hive Lite requirement.
53
53
 
54
- Options:
55
- 1. Commit the current changes.
56
- 2. Stash the current changes.
57
- 3. Create a separate git worktree for the new requirement.
58
- 4. Stop.
54
+ Recommended option: commit the existing work if it is ready.
55
+ ```bash
56
+ cd <target repo root>
57
+ git status --short
58
+ git add <paths-to-keep>
59
+ git commit -m "<message describing the current work>"
60
+ ```
61
+
62
+ Alternative: stash the existing work if it is not ready.
63
+ ```bash
64
+ cd <target repo root>
65
+ git stash push -m "WIP before Hive Lite requirement"
66
+ ```
67
+
68
+ Alternative: create a separate worktree for the new requirement.
69
+ ```bash
70
+ cd <target repo root>
71
+ git worktree add ../<new-worktree-dir> -b <branch-name>
72
+ cd ../<new-worktree-dir>
73
+ ```
74
+
75
+ After the chosen action, rerun:
76
+ ```bash
77
+ cd <target repo root>
78
+ hive-lite status --json
59
79
  ```
80
+ ~~~
60
81
 
61
82
  Only run a command after the user explicitly chooses an option and provides any required commit message, stash message, or branch/worktree name.
62
83
 
@@ -66,20 +87,41 @@ Meaning: an unfinished Hive Change Record exists.
66
87
 
67
88
  Stop and present options:
68
89
 
69
- ```text
90
+ ~~~text
70
91
  There is an in-progress Hive Change Record: <chg_id>.
71
92
 
72
- Options:
73
- 1. Refresh/check the current change if the diff changed.
74
- 2. Run Hive validation.
75
- 3. Accept and commit the current change.
76
- 4. Create a separate git worktree for the new requirement.
77
- 5. Stop.
93
+ Recommended next step: finish or isolate the in-progress change before starting a new requirement.
94
+
95
+ Refresh/check the current change if the diff changed:
96
+ ```bash
97
+ cd <target repo root>
98
+ hive-lite check <chg_id>
78
99
  ```
79
100
 
101
+ Run validation if check says validation is needed:
102
+ ```bash
103
+ cd <target repo root>
104
+ hive-lite validate <chg_id>
105
+ ```
106
+
107
+ Accept and commit when evidence is acceptable:
108
+ ```bash
109
+ cd <target repo root>
110
+ hive-lite accept <chg_id> --commit -m "<message>"
111
+ ```
112
+
113
+ Or create a separate worktree for the new requirement:
114
+ ```bash
115
+ cd <target repo root>
116
+ git worktree add ../<new-worktree-dir> -b <branch-name>
117
+ cd ../<new-worktree-dir>
118
+ ```
119
+ ~~~
120
+
80
121
  Use the status JSON's latest change id. If `currentDiffMatchesLatestChange` is false, recommend refreshing with:
81
122
 
82
123
  ```bash
124
+ cd <target repo root>
83
125
  hive-lite check <chg_id>
84
126
  ```
85
127
 
@@ -89,20 +131,28 @@ Meaning: the latest Hive Change Record was accepted, but no commit was created.
89
131
 
90
132
  Stop and present options:
91
133
 
92
- ```text
134
+ ~~~text
93
135
  The latest Hive change was accepted but not committed: <chg_id>.
94
136
 
95
- Options:
96
- 1. Commit the accepted Hive change.
97
- 2. Create a separate git worktree for the new requirement.
98
- 3. Stop.
137
+ Recommended option: commit the accepted Hive change.
138
+ ```bash
139
+ cd <target repo root>
140
+ hive-lite accept <chg_id> --commit -m "<message>"
99
141
  ```
100
142
 
101
- Prefer:
143
+ Alternative: create a separate worktree for the new requirement.
144
+ ```bash
145
+ cd <target repo root>
146
+ git worktree add ../<new-worktree-dir> -b <branch-name>
147
+ cd ../<new-worktree-dir>
148
+ ```
102
149
 
150
+ After the chosen action, rerun:
103
151
  ```bash
104
- hive-lite accept <chg_id> --commit -m "<message>"
152
+ cd <target repo root>
153
+ hive-lite status --json
105
154
  ```
155
+ ~~~
106
156
 
107
157
  ## Safety Rules
108
158
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hive-lite",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "Local Project Map + Change Control for coding agents.",
5
5
  "keywords": [
6
6
  "codex",
@@ -31,8 +31,8 @@
31
31
  "registry": "https://registry.npmjs.org"
32
32
  },
33
33
  "scripts": {
34
- "test": "node test/smoke.js",
35
- "check": "node --check bin/hive.js && node --check src/cli.js && node --check src/lib/yaml.js && node --check src/lib/map.js && node --check src/lib/context.js && node --check src/lib/change.js && node --check src/lib/risk.js && node --check src/lib/evidence.js && node --check src/lib/roles.js && node --check src/lib/scope.js && node --check src/lib/health.js && node --check src/lib/status.js && node --check src/lib/next.js && node --check src/lib/skills.js && node --check src/lib/git.js && node --check test/smoke.js"
34
+ "test": "node test/intent.js && node test/operator.js && node test/smoke.js",
35
+ "check": "node --check bin/hive.js && node --check src/cli.js && node --check src/lib/yaml.js && node --check src/lib/map.js && node --check src/lib/context.js && node --check src/lib/change.js && node --check src/lib/intent.js && node --check src/lib/operator.js && node --check src/lib/risk.js && node --check src/lib/evidence.js && node --check src/lib/roles.js && node --check src/lib/scope.js && node --check src/lib/health.js && node --check src/lib/status.js && node --check src/lib/next.js && node --check src/lib/skills.js && node --check src/lib/git.js && node --check test/intent.js && node --check test/operator.js && node --check test/smoke.js"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=16"