@h1v35/hivex 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -163
- package/docs/CONTEXT.md +20 -36
- package/docs/README.md +6 -12
- package/docs/adr/0003-independent-bun-installation.md +5 -19
- package/docs/adr/0010-practical-knowledge-assistance.md +28 -81
- package/docs/adr/0011-shared-knowledge-and-selective-history.md +16 -43
- package/docs/guidelines/engineering.md +74 -0
- package/docs/procedures/self-hosted-runner.md +7 -0
- package/package.json +32 -11
- package/skills/hivex/SKILL.md +28 -92
- package/skills/hivex/references/markdown.md +12 -42
- package/src/cli/diagnostic.ts +21 -11
- package/src/cli.ts +46 -36
- package/src/documents.ts +502 -320
- package/src/errors.ts +8 -6
- package/src/implementation.ts +185 -87
- package/src/ingestion-units.ts +107 -64
- package/src/knowledge-maintenance.ts +35 -22
- package/src/knowledge-model.ts +386 -268
- package/src/knowledge-serialization.ts +239 -0
- package/src/knowledge-snapshot.ts +100 -77
- package/src/knowledge-store.ts +634 -453
- package/src/knowledge.ts +1001 -758
- package/src/markdown.ts +107 -45
- package/src/model/connection.ts +134 -76
- package/src/model/failure.ts +46 -23
- package/src/model/invoke.ts +346 -166
- package/src/model/profile.ts +201 -103
- package/src/model/rpc-error.ts +21 -0
- package/src/model/server.ts +151 -82
- package/src/model/thread.ts +24 -14
- package/src/model/transcript.ts +87 -46
- package/src/ordering.ts +9 -0
- package/src/retrieval/lexical.ts +64 -41
- package/src/review.ts +83 -55
- package/src/runtime.d.ts +4 -0
- package/src/snapshot-command.ts +82 -43
- package/src/source-relocation.ts +222 -0
- package/docs/engineering.md +0 -174
package/README.md
CHANGED
|
@@ -1,39 +1,27 @@
|
|
|
1
1
|
# Hivex
|
|
2
2
|
|
|
3
|
-
Project decisions, dependencies and exceptions for the agent responsible for implementation and
|
|
4
|
-
review. Markdown remains authority; Hivex supplies context so agents can act autonomously without
|
|
5
|
-
reopening settled decisions.
|
|
3
|
+
Project decisions, dependencies and exceptions for the agent responsible for implementation and review. Markdown remains authority; Hivex supplies context so agents can act autonomously without reopening settled decisions.
|
|
6
4
|
|
|
7
|
-
Hivex is a TypeScript/Bun CLI. The current knowledge profile is Luna/max through native Codex and the
|
|
8
|
-
user's ChatGPT subscription, without silent fallback. The implementing agent may use another model.
|
|
9
|
-
Model invocation is localized for future configuration; multiple providers are not yet validated.
|
|
5
|
+
Hivex is a TypeScript/Bun CLI. The current knowledge profile is Luna/max through native Codex and the user's ChatGPT subscription, without silent fallback. The implementing agent may use another model. Model invocation is localized for future configuration; multiple providers are not yet validated.
|
|
10
6
|
|
|
11
7
|
## Current delivery
|
|
12
8
|
|
|
13
|
-
This release-in-development supplies initial updates and task consultation (#47), plus automatic
|
|
14
|
-
incremental maintenance and interpretation repair (#48), and task/diff review assistance (#19).
|
|
15
|
-
Publication (#21) prepares early use; introduction in Compi is a separate step. It is not complete Compi adoption or legacy retirement.
|
|
9
|
+
This release-in-development supplies initial updates and task consultation (#47), plus automatic incremental maintenance and interpretation repair (#48), and task/diff review assistance (#19). Release preparation remains separate from this CLI contract.
|
|
16
10
|
|
|
17
|
-
No installed command approves an implementation. The principal reviewer verifies findings, tests and
|
|
18
|
-
the actual source evidence. See the [approved product decision](docs/adr/0010-practical-knowledge-assistance.md).
|
|
11
|
+
No installed command approves an implementation. The principal reviewer verifies findings, tests and the actual source evidence. See the [approved product decision](docs/adr/0010-practical-knowledge-assistance.md).
|
|
19
12
|
|
|
20
13
|
## Install the CLI and skill
|
|
21
14
|
|
|
22
15
|
Requires Bun 1.4.2. Once the release is available from npm:
|
|
23
16
|
|
|
24
17
|
```sh
|
|
25
|
-
bun add --dev --exact @h1v35/hivex
|
|
18
|
+
bun add --dev --exact @h1v35/hivex
|
|
26
19
|
bun hivex --help
|
|
27
20
|
```
|
|
28
21
|
|
|
29
|
-
Copy `node_modules/@h1v35/hivex/skills/hivex` into the skill directory used by your agent. For an
|
|
30
|
-
agent that discovers project skills in `.agents/skills`, use `.agents/skills/hivex`. Keep the CLI and
|
|
31
|
-
skill at the same release; upgrade the copied skill when upgrading the package. The skill and its
|
|
32
|
-
Markdown guide are portable and do not require Compi's private tools or other installed skills.
|
|
22
|
+
Copy `node_modules/@h1v35/hivex/skills/hivex` into the skill directory used by your agent. For an agent that discovers project skills in `.agents/skills`, use `.agents/skills/hivex`. Keep the CLI and skill at the same release; upgrade the copied skill when upgrading the package. The skill and its Markdown guide are portable and do not require private tools or other installed skills.
|
|
33
23
|
|
|
34
|
-
The current knowledge profile needs an authenticated Codex CLI session with the selected Luna/max
|
|
35
|
-
model available. Native invocation checks that profile and stops rather than silently falling back.
|
|
36
|
-
Document discovery and version checks work without a model. See the CLI help for bounded model work.
|
|
24
|
+
The current knowledge profile needs an authenticated Codex CLI session with the selected Luna/max model available. Native invocation checks that profile and stops rather than silently falling back. Document discovery and version checks work without a model. See the CLI help for bounded model work.
|
|
37
25
|
|
|
38
26
|
## Run
|
|
39
27
|
|
|
@@ -46,11 +34,9 @@ bun hivex sources --root /path/to/project
|
|
|
46
34
|
bun hivex update --root /path/to/project --max-calls 0
|
|
47
35
|
```
|
|
48
36
|
|
|
49
|
-
The scoped package name is `@h1v35/hivex`, with command `hivex` and MIT license. Publication and registry
|
|
50
|
-
installation are tracked separately; do not fetch the unrelated unscoped npm package.
|
|
37
|
+
The scoped package name is `@h1v35/hivex`, with command `hivex` and MIT license. Publication and registry installation are tracked separately; do not fetch the unrelated unscoped npm package.
|
|
51
38
|
|
|
52
|
-
Documents need no Git repository or commit. They can live at monorepo, package or module level and
|
|
53
|
-
use their project's own Markdown format. An optional `hivex.json` selects relative globs:
|
|
39
|
+
Documents need no Git repository or commit. They can live at monorepo, package or module level and use their project's own Markdown format. An optional `hivex.json` selects relative globs:
|
|
54
40
|
|
|
55
41
|
```json
|
|
56
42
|
{
|
|
@@ -60,16 +46,7 @@ use their project's own Markdown format. An optional `hivex.json` selects relati
|
|
|
60
46
|
}
|
|
61
47
|
```
|
|
62
48
|
|
|
63
|
-
Without configuration, Hivex selects Markdown files under the project. It skips dependencies,
|
|
64
|
-
its own cache, Git metadata and private dot directories; explicitly named documentation directories
|
|
65
|
-
can be selected. `history` declares additional Markdown that remains readable evidence while staying
|
|
66
|
-
out of ordinary update and consultation ingestion. Use `--source <document>` with `ask` or `review`
|
|
67
|
-
to select it, or let a known relationship bring back the bounded ranges it requires. Historical
|
|
68
|
-
metadata and evidence carry `historical: true`; an extracted decision from that source remains
|
|
69
|
-
`historical`, even when the transport suggests another status. An `exclude` glob wins over `history`.
|
|
70
|
-
Symlinks are not followed and protected directories and scope escapes remain rejected. The previous
|
|
71
|
-
experimental `collections` configuration is rejected with a migration message rather than silently
|
|
72
|
-
reinterpreted.
|
|
49
|
+
Without configuration, Hivex selects Markdown files under the project. It skips dependencies, its own cache, Git metadata and private dot directories; explicitly named documentation directories can be selected. `history` declares additional Markdown that remains readable evidence while staying out of ordinary update and consultation ingestion. Use `--source <document>` with `ask` or `review` to select it, or let a known relationship bring back the bounded ranges it requires. Historical metadata and evidence carry `historical: true`; an extracted decision from that source remains `historical`, even when the transport suggests another status. An `exclude` glob wins over `history`. Symlinks are not followed and protected directories and scope escapes remain rejected. The previous experimental `collections` configuration is rejected with a migration message rather than silently reinterpreted.
|
|
73
50
|
|
|
74
51
|
## Recover context
|
|
75
52
|
|
|
@@ -83,42 +60,17 @@ bun hivex ask "What did the old cache policy require?" --source docs/archive/old
|
|
|
83
60
|
bun hivex ask "How should private cached data behave when access is revoked?" --root /path/to/project
|
|
84
61
|
```
|
|
85
62
|
|
|
86
|
-
`sources` returns document metadata without their full text and a snapshot-bound continuation when
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
to assess with `read` or `--source`; merely linking to an archive does not ingest it automatically.
|
|
98
|
-
|
|
99
|
-
Search and neighbor traversal are deterministic and make no model calls. Neighbor traversal includes
|
|
100
|
-
indirect connections within `--limit` and lists decisions it could not expand. Stale knowledge is not
|
|
101
|
-
presented as current evidence. `status` reports available knowledge and documents requiring attention.
|
|
102
|
-
|
|
103
|
-
`ask` first detects added, changed and removed Markdown. It updates at most one bounded batch,
|
|
104
|
-
prioritizing matching fragments, relevant documents and their known dependencies, then asks Luna/max over
|
|
105
|
-
the available decisions and original Markdown. Its default budget is three calls for the complete
|
|
106
|
-
update/check/answer operation. If the budget ends before the answer, repeat the same task with an
|
|
107
|
-
authorized higher total: the work, progress and consumption are retained. An unchanged task reuses
|
|
108
|
-
its answer. Use explicit `update` to advance remaining corpus batches; pending coverage stays visible.
|
|
109
|
-
|
|
110
|
-
Changed sources bring their known incoming and outgoing neighbors into comparison, including
|
|
111
|
-
relationships supported by a third document. Deleted sources are removed from pending ingestion;
|
|
112
|
-
`unavailableDocuments` identifies dependencies that can no longer be verified. Source-local check
|
|
113
|
-
findings remain scoped, so unrelated consultations can use their valid knowledge.
|
|
114
|
-
It explains applicability and uncertainty. The evidence text in the result is read from the cited
|
|
115
|
-
source ranges, not copied from a model-generated quotation. Large sources are supplied as relevant units within the context limit; `omittedUnits` reports
|
|
116
|
-
unread portions so a partial answer is not mistaken for complete coverage. Identical retained consultations are
|
|
117
|
-
reused. A partial result remains useful within its declared limits.
|
|
118
|
-
|
|
119
|
-
Hivex does not compact, move or rewrite Markdown. Authors preserve the original historical text,
|
|
120
|
-
dates, links and anchors; Hivex exposes the selected source version and line ranges while keeping
|
|
121
|
-
historical applicability and conditions visible.
|
|
63
|
+
`sources` returns document metadata without their full text and a snapshot-bound continuation when more records remain. Resume with `--cursor`. `read` returns original text, its version and line ranges; use `--from`, `--to` and `--max-bytes` for a bounded passage. Continuation and omitted content remain explicit. A working version is not evidence of approval.
|
|
64
|
+
|
|
65
|
+
Search covers both extracted decisions and original Markdown, so terminology omitted from a summary remains discoverable. When needed, select a known document with `--source` in a consultation rather than reopening a settled question with the owner. Historical sources are not searched into an ordinary consultation merely because they are available; a focused source or a known dependency is required. If a necessary historical source is excluded or unavailable, the result names the missing evidence. An unconsulted historical or unavailable local Markdown link is reported for the responsible agent to assess with `read` or `--source`; merely linking to an archive does not ingest it automatically.
|
|
66
|
+
|
|
67
|
+
Search and neighbor traversal are deterministic and make no model calls. Neighbor traversal includes indirect connections within `--limit` and lists decisions it could not expand. Stale knowledge is not presented as current evidence. `status` reports available knowledge and documents requiring attention.
|
|
68
|
+
|
|
69
|
+
`ask` first detects added, changed and removed Markdown. It updates at most one bounded batch, prioritizing matching fragments, relevant documents and their known dependencies, then asks Luna/max over the available decisions and original Markdown. Its default budget is three calls for the complete update/check/answer operation. If the budget ends before the answer, repeat the same task with an authorized higher total: the work, progress and consumption are retained. An unchanged task reuses its answer. Use explicit `update` to advance remaining corpus batches; pending coverage stays visible.
|
|
70
|
+
|
|
71
|
+
Changed sources bring their known incoming and outgoing neighbors into comparison, including relationships supported by a third document. Deleted sources are removed from pending ingestion; `unavailableDocuments` identifies dependencies that can no longer be verified. Source-local check findings remain scoped, so unrelated consultations can use their valid knowledge. It explains applicability and uncertainty. The evidence text in the result is read from the cited source ranges, not copied from a model-generated quotation. Large sources are supplied as relevant units within the context limit; `omittedUnits` reports unread portions so a partial answer is not mistaken for complete coverage. Identical retained consultations are reused. A partial result remains useful within its declared limits.
|
|
72
|
+
|
|
73
|
+
Hivex does not compact, move or rewrite Markdown. Authors preserve the original historical text, dates, links and anchors; Hivex exposes the selected source version and line ranges while keeping historical applicability and conditions visible.
|
|
122
74
|
|
|
123
75
|
## Update and repair knowledge
|
|
124
76
|
|
|
@@ -126,26 +78,11 @@ historical applicability and conditions visible.
|
|
|
126
78
|
bun hivex update --root /path/to/project --max-calls 2
|
|
127
79
|
```
|
|
128
80
|
|
|
129
|
-
An update splits large Markdown into line-preserving units of at most 8 KiB, preferring Markdown
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
narrow the selected paths if that limit is reached. A line too large to fit is explicitly reported as unread, never silently cut.
|
|
135
|
-
|
|
136
|
-
Sources declared by `history` are not part of an ordinary update. A focused `ask` or `review` adds
|
|
137
|
-
only its selected bounded units to the same resumable work; a known dependency can add the ranges
|
|
138
|
-
needed to verify it. The work budget, graph knowledge and cache survive resumption.
|
|
139
|
-
Changing an unrelated historical document does not start a fresh consultation budget. Current
|
|
140
|
-
documents take priority when the loaded-corpus limit is reached; narrow the configured scope to
|
|
141
|
-
access sources outside the reported coverage.
|
|
142
|
-
|
|
143
|
-
Each extraction and check is checkpointed. Resuming continues the same work and never repeats its
|
|
144
|
-
completed rounds. Successful structured model results are cached in the same store by the complete
|
|
145
|
-
request, schema and model profile; an identical request can be reused without a call, even when
|
|
146
|
-
reconstructing earlier knowledge. Changed context invalidates that cache entry. Context discovery considers authored links, lexical
|
|
147
|
-
matches and recent decisions; `relationshipCoverage` states that this is bounded, not exhaustive. Cache hits are
|
|
148
|
-
reported separately from calls and tokens; this is an optimization, not documentary authority.
|
|
81
|
+
An update splits large Markdown into line-preserving units of at most 8 KiB, preferring Markdown boundaries. Each round selects at most four units and 16 KiB of target text, with up to 8 KiB of relevant existing evidence, then performs one additional check. Original document IDs and line numbers survive splitting. Earlier rounds remain queryable while `pendingUnits` and `pendingDocuments` show unfinished coverage. Sources up to 32 MiB can be split, within a 64 MiB loaded-corpus limit; narrow the selected paths if that limit is reached. A line too large to fit is explicitly reported as unread, never silently cut.
|
|
82
|
+
|
|
83
|
+
Sources declared by `history` are not part of an ordinary update. A focused `ask` or `review` adds only its selected bounded units to the same resumable work; a known dependency can add the ranges needed to verify it. The work budget, graph knowledge and cache survive resumption. Changing an unrelated historical document does not start a fresh consultation budget. Current documents take priority when the loaded-corpus limit is reached; narrow the configured scope to access sources outside the reported coverage.
|
|
84
|
+
|
|
85
|
+
Each extraction and check is checkpointed. Resuming continues the same work and never repeats its completed rounds. Successful structured model results are cached in the same store by the complete request, schema and model profile; an identical request can be reused without a call, even when reconstructing earlier knowledge. Changed context invalidates that cache entry. Context discovery considers authored links, lexical matches and recent decisions; `relationshipCoverage` states that this is bounded, not exhaustive. Cache hits are reported separately from calls and tokens; this is an optimization, not documentary authority.
|
|
149
86
|
|
|
150
87
|
To correct derived knowledge against unchanged Markdown, use:
|
|
151
88
|
|
|
@@ -153,41 +90,17 @@ To correct derived knowledge against unchanged Markdown, use:
|
|
|
153
90
|
bun hivex update --root /path/to/project --repair docs/cache.md --reason "The source specifies seven days, not indefinite retention."
|
|
154
91
|
```
|
|
155
92
|
|
|
156
|
-
Repair replaces the affected unit's interpretations and revisits its relationships without editing
|
|
157
|
-
|
|
158
|
-
the
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
A failed or unfinished invocation is not retried automatically by increasing the budget. Inspect its
|
|
168
|
-
reported outcome and usage first. `--retry-failed` can explicitly resume a safely ended failure within
|
|
169
|
-
the same work budget; uncertain invocations remain blocked. A completed adverse check is not an
|
|
170
|
-
invocation failure and is never retried by this flag. Uncertain or pending knowledge does not become a blanket pass.
|
|
171
|
-
The project-local `.hivex/knowledge.sqlite` stores working knowledge and execution accounting;
|
|
172
|
-
no source Markdown is rewritten. Preserve it when work evidence is needed. Storage is bounded at
|
|
173
|
-
64 MiB; do not delete an active store to hide unfinished calls or reset a work budget.
|
|
174
|
-
|
|
175
|
-
`recover` inspects abandoned work without invoking the model or killing processes. Live owners or
|
|
176
|
-
native processes remain protected. If local processes ended but remote delivery is uncertain,
|
|
177
|
-
`recover --acknowledge-uncertain` records an explicit acknowledgement; original reports and unknown
|
|
178
|
-
usage remain visible. Recovery itself never retries: a subsequent `--retry-failed` uses the retained
|
|
179
|
-
work budget. Do not treat acknowledgement as proof that the earlier remote turn completed.
|
|
180
|
-
|
|
181
|
-
`prune` releases space occupied by old completed work and cached results, retaining the graph and all
|
|
182
|
-
unfinished work, attempts and budgets. It keeps the newest eight completed works and 64 cached
|
|
183
|
-
results by default; `--keep-completed` and `--keep-caches` change those counts. Pruned answers can
|
|
184
|
-
require a new model call when requested again. Export evidence before pruning if historical reports
|
|
185
|
-
are needed; pruning is explicit, never an automatic budget reset.
|
|
186
|
-
|
|
187
|
-
Native operations accept `--codex` and `--deadline-ms`; the default deadline is 30 minutes. Consultation
|
|
188
|
-
context defaults to 65,536 bytes and can be bounded with `--max-context-bytes`. Limits are reported,
|
|
189
|
-
not met by silently cutting a rule or pretending omitted evidence was reviewed. Input-byte and call
|
|
190
|
-
budgets limit work; reported token usage is actual consumption, including known failed attempts.
|
|
93
|
+
Repair replaces the affected unit's interpretations and revisits its relationships without editing Markdown. Its reason guides comparison with the source; it does not create new authority. Repeating the same completed repair reuses its work. A genuine unresolved documentary conflict still needs a decision by the responsible person.
|
|
94
|
+
|
|
95
|
+
The default explicit-update work budget is two invocation attempts and 131,072 input bytes. `--max-calls` and `--max-input-bytes` set totals for the complete work, including extraction, check and resumption. A zero-call update reports pending documents without invoking the model. An exhausted work item retains its progress; repeating the command does not reset its counter. An authorized larger total can complete the remaining stage without repeating completed extraction.
|
|
96
|
+
|
|
97
|
+
A failed or unfinished invocation is not retried automatically by increasing the budget. Inspect its reported outcome and usage first. `--retry-failed` can explicitly resume a safely ended failure within the same work budget; uncertain invocations remain blocked. A completed adverse check is not an invocation failure and is never retried by this flag. Uncertain or pending knowledge does not become a blanket pass. The project-local `.hivex/knowledge.sqlite` stores working knowledge and execution accounting; no source Markdown is rewritten. Preserve it when work evidence is needed. Storage is bounded at 64 MiB; do not delete an active store to hide unfinished calls or reset a work budget.
|
|
98
|
+
|
|
99
|
+
`recover` inspects abandoned work without invoking the model or killing processes. Live owners or native processes remain protected. If local processes ended but remote delivery is uncertain, `recover --acknowledge-uncertain` records an explicit acknowledgement; original reports and unknown usage remain visible. Recovery itself never retries: a subsequent `--retry-failed` uses the retained work budget. Do not treat acknowledgement as proof that the earlier remote turn completed.
|
|
100
|
+
|
|
101
|
+
`prune` releases space occupied by old completed work and cached results, retaining the graph and all unfinished work, attempts and budgets. It keeps the newest eight completed works and 64 cached results by default; `--keep-completed` and `--keep-caches` change those counts. Pruned answers can require a new model call when requested again. Export evidence before pruning if historical reports are needed; pruning is explicit, never an automatic budget reset.
|
|
102
|
+
|
|
103
|
+
Native operations accept `--codex` and `--deadline-ms`; the default deadline is 30 minutes. Consultation context defaults to 65,536 bytes and can be bounded with `--max-context-bytes`. Limits are reported, not met by silently cutting a rule or pretending omitted evidence was reviewed. Input-byte and call budgets limit work; reported token usage is actual consumption, including known failed attempts.
|
|
191
104
|
|
|
192
105
|
## Share knowledge through Git
|
|
193
106
|
|
|
@@ -196,21 +109,19 @@ bun hivex snapshot export --root /path/to/project
|
|
|
196
109
|
bun hivex snapshot import --root /path/to/project
|
|
197
110
|
```
|
|
198
111
|
|
|
199
|
-
`snapshot export` writes `.hivex/graph.json` atomically as stable, readable JSON. Commit that file
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
112
|
+
`snapshot export` writes `.hivex/graph.json` atomically as stable, readable JSON. Commit that file alongside the Markdown it describes to share decisions, relationships, source versions, evidence, available provenance and coverage. It exports the graph, not work records, process identities, budgets or cached model answers. Snapshot operations make zero model calls.
|
|
113
|
+
|
|
114
|
+
A fresh clone can use `search`, `neighbors` and `status` directly from the shared snapshot without creating a local database. Its first update reuses matching ingestion units and starts local work accounting. If a local graph already exists, it takes precedence: use `snapshot import` to adopt a new shared version. Import refuses while local work is unfinished and never resets attempts or budgets. Complete or recover that work through its normal lifecycle first.
|
|
115
|
+
|
|
116
|
+
When Markdown moves, explicitly relocate its knowledge before the next update:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
bun hivex snapshot relocate docs/old-guide.md docs/guidelines/guide.md --root /path/to/project
|
|
120
|
+
```
|
|
203
121
|
|
|
204
|
-
|
|
205
|
-
creating a local database. Its first update reuses matching ingestion units and starts local work
|
|
206
|
-
accounting. If a local graph already exists, it takes precedence: use `snapshot import` to adopt a
|
|
207
|
-
new shared version. Import refuses while local work is unfinished and never resets attempts or
|
|
208
|
-
budgets. Complete or recover that work through its normal lifecycle first.
|
|
122
|
+
The old source must no longer be selected, and the destination must be selected current Markdown. Relocation preserves IDs, relationships, source versions and uncertainty, leaving existing work, cached answers and budgets intact. It makes zero model calls and refuses unfinished local work. An identical move to a destination without prior knowledge reuses ingestion coverage when all retained source evidence has matching, known versions. If content changed, source versions are mixed or missing, or the destination already had knowledge, its coverage becomes pending so the usual update/check can validate the result. Mismatched evidence remains stale until then. Keep the relocation report with the change and export the final graph; do not use relocation to hide unrelated missing evidence.
|
|
209
123
|
|
|
210
|
-
The snapshot response identifies current, stale and unavailable source versions, pending units and
|
|
211
|
-
warnings. A changed or absent source is not silently current; matching sources remain reusable.
|
|
212
|
-
Partial and uncertain knowledge can be shared with those states retained. Freshness is not proof
|
|
213
|
-
that a model interpretation is correct: the cited Markdown remains authority.
|
|
124
|
+
The snapshot response identifies current, stale and unavailable source versions, pending units and warnings. A changed or absent source is not silently current; matching sources remain reusable. Partial and uncertain knowledge can be shared with those states retained. Freshness is not proof that a model interpretation is correct: the cited Markdown remains authority.
|
|
214
125
|
|
|
215
126
|
Keep only the shared graph under version control, for example:
|
|
216
127
|
|
|
@@ -219,19 +130,13 @@ Keep only the shared graph under version control, for example:
|
|
|
219
130
|
!/.hivex/graph.json
|
|
220
131
|
```
|
|
221
132
|
|
|
222
|
-
Read-only queries do not rewrite the snapshot. Export intentionally when reusable knowledge changes,
|
|
223
|
-
not on every consultation. Invalid snapshots or symbolic-link paths fail without replacing local
|
|
224
|
-
knowledge. Existing local stores continue to work without a shared file.
|
|
133
|
+
Read-only queries do not rewrite the snapshot. Export intentionally when reusable knowledge changes, not on every consultation. Invalid snapshots or symbolic-link paths fail without replacing local knowledge. Existing local stores continue to work without a shared file.
|
|
225
134
|
|
|
226
135
|
## Agent skill and Markdown practice
|
|
227
136
|
|
|
228
|
-
The [portable Hivex skill](skills/hivex/SKILL.md) teaches consultation before implementation, support to
|
|
229
|
-
the principal reviewer, documentation maintenance, uncertainty and budget handling. It uses the
|
|
230
|
-
installed CLI's actual interface and does not require Compi's private tools or other skills.
|
|
137
|
+
The [portable Hivex skill](skills/hivex/SKILL.md) teaches consultation before implementation, support to the principal reviewer, documentation maintenance, uncertainty and budget handling. It uses the installed CLI's actual interface and does not require private tools or other skills.
|
|
231
138
|
|
|
232
|
-
The [optional Markdown convention](skills/hivex/references/markdown.md) describes authority maps,
|
|
233
|
-
glossaries, ADRs, guidelines, process and procedures. Recommend it when useful; existing layouts,
|
|
234
|
-
metadata conventions and writing styles remain valid. Create only the documents a project needs.
|
|
139
|
+
The [optional Markdown convention](skills/hivex/references/markdown.md) describes authority maps, glossaries, ADRs, guidelines, process and procedures. Recommend it when useful; existing layouts, metadata conventions and writing styles remain valid. Create only the documents a project needs.
|
|
235
140
|
|
|
236
141
|
## Development
|
|
237
142
|
|
|
@@ -242,30 +147,17 @@ bun run format:check
|
|
|
242
147
|
bun run test
|
|
243
148
|
```
|
|
244
149
|
|
|
245
|
-
Tests use the public CLI and a simulated native transport. Real Luna evaluations are bounded and
|
|
246
|
-
reported separately; simulated token usage is not a consumption measurement. Development is
|
|
247
|
-
issue-first, with coherent PRs, independent Standards/Spec review and CI on the final commit.
|
|
248
|
-
See the [engineering workflow](docs/engineering.md).
|
|
150
|
+
Tests use the public CLI and a simulated native transport. Real Luna evaluations are bounded and reported separately; simulated token usage is not a consumption measurement. Development is issue-first, with coherent PRs, independent Standards/Spec review and CI on the final commit. See the [engineering workflow](docs/guidelines/engineering.md).
|
|
249
151
|
|
|
250
|
-
Earlier candidate/fidelity/comparison/admission protocols and their tests are retired from the active
|
|
251
|
-
CLI. Their code remains in Git history and historical evidence keeps its original results. They do
|
|
252
|
-
not impose a requirement to reproduce an Opus graph or exhaustively replay an old gold suite.
|
|
152
|
+
Earlier candidate/fidelity/comparison/admission protocols and their tests are retired from the active CLI. Their code remains in Git history and historical evidence keeps its original results. They do not impose a requirement to reproduce an Opus graph or exhaustively replay an old gold suite.
|
|
253
153
|
|
|
254
154
|
## Support an implementation review
|
|
255
155
|
|
|
256
|
-
From the Git project root, supply the task and the base revision. Hivex captures the working change,
|
|
257
|
-
including untracked files, and provides findings tied to code and Markdown versions:
|
|
156
|
+
From the Git project root, supply the task and the base revision. Hivex captures the working change, including untracked files, and provides findings tied to code and Markdown versions:
|
|
258
157
|
|
|
259
158
|
```sh
|
|
260
159
|
hivex review "Change cache behavior" --base main --max-calls 3 > /tmp/hivex-review.json
|
|
261
160
|
hivex review --check /tmp/hivex-review.json
|
|
262
161
|
```
|
|
263
162
|
|
|
264
|
-
Use the same task and base to resume or reuse retained work. Update, knowledge check and review share
|
|
265
|
-
one budget, including expansion of a partial report. Context is bounded; large changes must be narrowed or split into coherent reviews. Larger existing
|
|
266
|
-
text files contribute diff excerpts with original line numbers and explicit omissions; their full-file
|
|
267
|
-
versions still detect later changes.
|
|
268
|
-
The principal reviewer verifies conflicts and exceptions and resolves supported contradictions before
|
|
269
|
-
closing the change. A `ready` result means assistance is available, never that the implementation is
|
|
270
|
-
approved. A saved report can be checked without a model; changed code or documents make it stale.
|
|
271
|
-
Keep reports outside the project or in an ignored path so they do not become part of the change.
|
|
163
|
+
Use the same task and base to resume or reuse retained work. Update, knowledge check and review share one budget, including expansion of a partial report. Context is bounded; large changes must be narrowed or split into coherent reviews. Larger existing text files contribute diff excerpts with original line numbers and explicit omissions; their full-file versions still detect later changes. The principal reviewer verifies conflicts and exceptions and resolves supported contradictions before closing the change. A `ready` result means assistance is available, never that the implementation is approved. A saved report can be checked without a model; changed code or documents make it stale. Keep reports outside the project or in an ignored path so they do not become part of the change.
|
package/docs/CONTEXT.md
CHANGED
|
@@ -1,65 +1,49 @@
|
|
|
1
1
|
# Hivex domain language
|
|
2
2
|
|
|
3
|
-
Hivex supplies project knowledge to the agents responsible for implementation and review. Markdown
|
|
4
|
-
records that knowledge; the graph helps locate and interpret it without becoming authority itself.
|
|
3
|
+
Hivex supplies project knowledge to the agents responsible for implementation and review. Markdown records that knowledge; the graph helps locate and interpret it without becoming authority itself.
|
|
5
4
|
|
|
6
5
|
## Language
|
|
7
6
|
|
|
8
7
|
**Document**: A selected Markdown file, wherever its project, package or module keeps it.
|
|
9
8
|
|
|
10
|
-
**Archived document**: Historical Markdown preserved as evidence of replaced decisions and their
|
|
11
|
-
reasons. It remains available for focused retrieval without being presumed current authority.
|
|
9
|
+
**Archived document**: Historical Markdown preserved as evidence of replaced decisions and their reasons. It remains available for focused retrieval without being presumed current authority.
|
|
12
10
|
|
|
13
|
-
**Ingestion unit**: A bounded fragment of a document with its original line range. It permits
|
|
14
|
-
processing and resumption in rounds without becoming a separate documentary authority.
|
|
11
|
+
**Ingestion unit**: A bounded fragment of a document with its original line range. It permits processing and resumption in rounds without becoming a separate documentary authority.
|
|
15
12
|
|
|
16
|
-
**Document version**: The exact contents of a document at a point in the work. A working copy is a
|
|
17
|
-
version even when it has not been committed; its existence does not establish approval.
|
|
13
|
+
**Document version**: The exact contents of a document at a point in the work. A working copy is a version even when it has not been committed; its existence does not establish approval.
|
|
18
14
|
|
|
19
15
|
**Snapshot**: The selected document versions considered together for a particular work item.
|
|
20
16
|
|
|
21
|
-
**Decision**: A meaningful project choice or constraint together with its scope, conditions,
|
|
22
|
-
exceptions and reasons. Proposals and historical decisions retain their declared state.
|
|
17
|
+
**Decision**: A meaningful project choice or constraint together with its scope, conditions, exceptions and reasons. Proposals and historical decisions retain their declared state.
|
|
23
18
|
|
|
24
|
-
**Relationship**: An evidenced connection between decisions, such as a dependency, exception or
|
|
25
|
-
replacement. It may cross documents that have no authored link; its interpretation can be uncertain.
|
|
19
|
+
**Relationship**: An evidenced connection between decisions, such as a dependency, exception or replacement. It may cross documents that have no authored link; its interpretation can be uncertain.
|
|
26
20
|
|
|
27
|
-
**Evidence**: An identifiable passage of a particular document or implementation version that a
|
|
28
|
-
reader can inspect. A model's paraphrase is not the passage itself.
|
|
21
|
+
**Evidence**: An identifiable passage of a particular document or implementation version that a reader can inspect. A model's paraphrase is not the passage itself.
|
|
29
22
|
|
|
30
|
-
**Knowledge graph**: Derived decisions and relationships, with supporting definitions and lessons, that help an agent recover project context.
|
|
31
|
-
It may be incomplete or uncertain without making every usable part unavailable.
|
|
23
|
+
**Knowledge graph**: Derived decisions and relationships, with supporting definitions and lessons, that help an agent recover project context. It may be incomplete or uncertain without making every usable part unavailable.
|
|
32
24
|
|
|
33
|
-
**Knowledge snapshot**: A portable representation of reusable graph knowledge, its source versions,
|
|
34
|
-
evidence, provenance and coverage. It is distinct from a document snapshot and from execution state.
|
|
25
|
+
**Knowledge snapshot**: A portable representation of reusable graph knowledge, its source versions, evidence, provenance and coverage. It is distinct from a document snapshot and from execution state.
|
|
35
26
|
|
|
36
|
-
**Applicability**: Whether a decision governs the case being considered after its conditions,
|
|
37
|
-
exceptions and replacements have been taken into account.
|
|
27
|
+
**Applicability**: Whether a decision governs the case being considered after its conditions, exceptions and replacements have been taken into account.
|
|
38
28
|
|
|
39
|
-
**Freshness**: Whether derived knowledge still corresponds to the selected document versions.
|
|
40
|
-
Freshness does not establish applicability or correctness by itself.
|
|
29
|
+
**Freshness**: Whether derived knowledge still corresponds to the selected document versions. Freshness does not establish applicability or correctness by itself.
|
|
41
30
|
|
|
42
|
-
**Knowledge update**: Processing a selected set of document versions into decisions and relationships,
|
|
43
|
-
followed by one bounded check of that set and its affected relationships.
|
|
31
|
+
**Knowledge update**: Processing a selected set of document versions into decisions and relationships, followed by one bounded check of that set and its affected relationships.
|
|
44
32
|
|
|
45
|
-
**Knowledge check**: Examination of an update against its sources to identify omissions or incorrect
|
|
46
|
-
interpretations. It reports issues and uncertainty, not a certificate of global completeness.
|
|
33
|
+
**Knowledge check**: Examination of an update against its sources to identify omissions or incorrect interpretations. It reports issues and uncertainty, not a certificate of global completeness.
|
|
47
34
|
|
|
48
|
-
**Interpretation repair**: Replacing a wrong derived interpretation by comparing it with unchanged
|
|
49
|
-
|
|
35
|
+
**Interpretation repair**: Replacing a wrong derived interpretation by comparing it with unchanged Markdown. It preserves source authority and does not resolve a genuine policy conflict by itself.
|
|
36
|
+
|
|
37
|
+
**Source relocation**: Moving existing knowledge to a document's new location, retaining its decisions and relationships while distinguishing reusable evidence from content that needs a new check.
|
|
50
38
|
|
|
51
39
|
**Context**: The decisions, related evidence and remaining uncertainties relevant to a particular task.
|
|
52
40
|
|
|
53
|
-
**Implementation version**: The captured change against a particular base together with the exact
|
|
54
|
-
contents of the affected files. Later code changes are outside that review.
|
|
41
|
+
**Implementation version**: The captured change against a particular base together with the exact contents of the affected files. Later code changes are outside that review.
|
|
55
42
|
|
|
56
|
-
**Finding**: A possible conflict between an implementation and project knowledge. The principal
|
|
57
|
-
reviewer verifies it and retains responsibility for the implementation review.
|
|
43
|
+
**Finding**: A possible conflict between an implementation and project knowledge. The principal reviewer verifies it and retains responsibility for the implementation review.
|
|
58
44
|
|
|
59
45
|
**Work**: One requested update, consultation or review, including its phases and any resumed work.
|
|
60
46
|
|
|
61
|
-
**Work budget**: The limits shared by every phase and attempt of one work item. Resuming does not
|
|
62
|
-
reset its consumption, and unknown consumption remains visible.
|
|
47
|
+
**Work budget**: The limits shared by every phase and attempt of one work item. Resuming does not reset its consumption, and unknown consumption remains visible.
|
|
63
48
|
|
|
64
|
-
**Recovery**: Incorporating useful historical decisions, reasons and lessons into their appropriate
|
|
65
|
-
Markdown authorities while identifying obsolete, duplicate or purely operational material.
|
|
49
|
+
**Recovery**: Incorporating useful historical decisions, reasons and lessons into their appropriate Markdown authorities while identifying obsolete, duplicate or purely operational material.
|
package/docs/README.md
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
# Documentation map
|
|
2
2
|
|
|
3
3
|
- [Domain language](CONTEXT.md): documents, decisions, relationships, evidence and bounded work.
|
|
4
|
-
- [Engineering
|
|
5
|
-
- [
|
|
6
|
-
|
|
7
|
-
- [Shared knowledge and selective history](adr/0011-shared-knowledge-and-selective-history.md): accepted
|
|
8
|
-
|
|
9
|
-
implementation is pending.
|
|
10
|
-
- [Recommended Markdown convention](../skills/hivex/references/markdown.md): optional organization
|
|
11
|
-
and writing practices for any adopting project.
|
|
4
|
+
- [Engineering guidelines](guidelines/engineering.md): development, verification and knowledge maintenance.
|
|
5
|
+
- [Runner procedure](procedures/self-hosted-runner.md): install and move the repository's CI runner.
|
|
6
|
+
- [Practical knowledge assistance](adr/0010-practical-knowledge-assistance.md): the current approved contract, staged delivery, autonomy, semantic relationships, uncertainty and cost.
|
|
7
|
+
- [Shared knowledge and selective history](adr/0011-shared-knowledge-and-selective-history.md): accepted extension for compact ADRs, bounded historical retrieval and a Git-versioned knowledge snapshot.
|
|
8
|
+
- [Recommended Markdown convention](../skills/hivex/references/markdown.md): optional organization and writing practices for any adopting project.
|
|
12
9
|
- [CLI guide](../README.md) and [agent skill](../skills/hivex/SKILL.md): the interface actually available.
|
|
13
10
|
|
|
14
|
-
Earlier decisions remain in `adr/` as history. ADRs 0004–0009 describe the replaced experimental
|
|
15
|
-
cohort/admission workflow; ADR 0010 supersedes its mandatory ceremony. Historical evidence is scoped
|
|
16
|
-
to its original revision and is not a current acceptance result. An adopting project retains its own
|
|
17
|
-
Markdown at monorepo, package or module level; Hivex does not own that source tree.
|
|
11
|
+
Earlier decisions remain in `adr/` as history. ADRs 0004–0009 describe the replaced experimental cohort/admission workflow; ADR 0010 supersedes its mandatory ceremony. Historical evidence is scoped to its original revision and is not a current acceptance result. An adopting project retains its own Markdown at monorepo, package or module level; Hivex does not own that source tree.
|
|
@@ -8,30 +8,16 @@ date: 2026-09-07
|
|
|
8
8
|
|
|
9
9
|
## Context
|
|
10
10
|
|
|
11
|
-
The owner selected Bun 1.4.2 as Hivex's runtime and package manager. The first independent version
|
|
12
|
-
added a custom installer, registry verifier and generated bootstrap to reproduce Compi's dependency
|
|
13
|
-
policy. The owner explicitly rejected that extra machinery: installation should work as in a project
|
|
14
|
-
that started with Bun. This amendment replaces the initial decision; its original implementation and
|
|
15
|
-
evidence remain in Git history and the bounded historical evidence directory.
|
|
11
|
+
The owner selected Bun 1.4.2 as Hivex's runtime and package manager. The first independent version added a custom installer, registry verifier and generated bootstrap to reproduce a prior dependency policy. The owner explicitly rejected that extra machinery: installation should work as in a project that started with Bun. This amendment replaces the initial decision; its original implementation and evidence remain in Git history, while the current tree keeps only reusable decisions.
|
|
16
12
|
|
|
17
13
|
## Decision
|
|
18
14
|
|
|
19
|
-
Use `bun install` for development and commit `bun.lock`. Use `bun ci` for frozen installation in CI
|
|
20
|
-
and fresh checkouts. Pin Bun 1.4.2 in the package manifest and CI. Keep Bun's isolated dependency
|
|
21
|
-
layout, seven-day minimum release age and explicit `trustedDependencies` allowlist, currently empty.
|
|
22
|
-
Review required lifecycle-script additions with the dependency change.
|
|
15
|
+
Use `bun install` for development and commit `bun.lock`. Use `bun ci` for frozen installation in CI and fresh checkouts. Pin Bun 1.4.2 in the package manifest and CI. Keep Bun's isolated dependency layout, seven-day minimum release age and explicit `trustedDependencies` allowlist, currently empty. Review required lifecycle-script additions with the dependency change.
|
|
23
16
|
|
|
24
|
-
Do not maintain a parallel installer, publishing-trust verifier, registry metadata cache or generated
|
|
25
|
-
bootstrap. Bun owns installation behavior; its native controls are not a claim of parity with every
|
|
26
|
-
former pnpm policy. Remove code, dependencies and tests that served only the retired installer.
|
|
17
|
+
Do not maintain a parallel installer, publishing-trust verifier, registry metadata cache or generated bootstrap. Bun owns installation behavior; its native controls are not a claim of parity with every former pnpm policy. Remove code, dependencies and tests that served only the retired installer.
|
|
27
18
|
|
|
28
19
|
## Consequences
|
|
29
20
|
|
|
30
|
-
Hivex installs and runs independently of
|
|
31
|
-
configuration. The native TypeScript 7 compiler uses the unscoped `typescript-native` alias so Bun
|
|
32
|
-
installs its native optional package. The separate TypeScript 6 package provides the compatibility
|
|
33
|
-
API needed by typed ESLint.
|
|
21
|
+
Hivex installs and runs independently of caller package managers. It owns its compiler, formatter and lint configuration. The native TypeScript 7 compiler uses the unscoped `typescript-native` alias so Bun installs its native optional package. The separate TypeScript 6 package provides the compatibility API needed by typed ESLint.
|
|
34
22
|
|
|
35
|
-
Typechecking, lint, formatting and relevant product tests validate dependency changes. They do not
|
|
36
|
-
require a second installation framework. Compi's Bun conversion and Expo/native compatibility remain
|
|
37
|
-
separate work under [#1162](https://github.com/H1V35/compi/issues/1162).
|
|
23
|
+
Typechecking, lint, formatting and relevant product tests validate dependency changes. They do not require a second installation framework.
|
|
@@ -6,87 +6,34 @@ date: 2026-09-09
|
|
|
6
6
|
|
|
7
7
|
# Practical knowledge assistance with bounded work
|
|
8
8
|
|
|
9
|
-
The owner approved a new contract after a grill in [Hivex #17](https://github.com/H1V35/hivex/issues/17).
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
bounded
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
An update processes a bounded batch and makes one additional knowledge check against its documents
|
|
36
|
-
and affected relationships. Do not review every node separately or every possible source pair.
|
|
37
|
-
Do not automatically revise and retry until the model produces green output. Usable knowledge remains
|
|
38
|
-
available when another part is pending or uncertain, with those limits visible to the caller.
|
|
39
|
-
A wrong derived interpretation can be corrected against its source without changing doctrine.
|
|
40
|
-
|
|
41
|
-
Consultations and reviews detect added, changed and removed Markdown and update affected knowledge
|
|
42
|
-
within their work budget. Reuse unchanged knowledge. Working documents need no commit to be readable,
|
|
43
|
-
but their working state and exact contents must be identifiable. Results refer to the document and
|
|
44
|
-
implementation versions actually considered; subsequent changes are not silently covered.
|
|
45
|
-
|
|
46
|
-
A work budget spans the entire requested operation, its phases and any resumption or attempts.
|
|
47
|
-
Expose actual consumption and unknown usage, preserve progress at a limit and distinguish initial
|
|
48
|
-
indexing, maintenance, consultation and review. Small empirical checks establish useful defaults;
|
|
49
|
-
a cheap model does not justify unnecessary invocations or context.
|
|
50
|
-
|
|
51
|
-
Luna/max is the owner's selected knowledge model and the profile validated for this release, without
|
|
52
|
-
silent fallback. Keep model selection and invocation localized so another user can configure a
|
|
53
|
-
supported model later. Do not build a provider framework speculatively. The principal agent may use
|
|
54
|
-
a different model without moving project knowledge into its vendor's private memory.
|
|
55
|
-
|
|
56
|
-
Use TypeScript/Bun and practical domain-driven modules with small interfaces. There is no obligation
|
|
57
|
-
to retain the old code, Opus graph, gold suite or machinery as the architecture or acceptance target.
|
|
58
|
-
Historical evidence keeps its actual result and limits. This decision supersedes the mandatory
|
|
59
|
-
candidate/fidelity/pair-comparison/admission ceremony in ADRs 0004–0009 for the replacement workflow;
|
|
60
|
-
those ADRs describe the earlier implementation and remain historical records.
|
|
61
|
-
|
|
62
|
-
The portable skill is part of each functional delivery. It teaches the actual CLI, the agreed
|
|
63
|
-
workflow, good documentation practice and cost/uncertainty handling without requiring Compi's
|
|
64
|
-
private tools or skills. The first slice in #47 supplies explicit initial updates and task context;
|
|
65
|
-
#48 adds automatic incremental maintenance and interpretation repair; #19 supplies diff-review assistance. These are
|
|
66
|
-
implementation stages, not claims that the entire new contract is already shipped.
|
|
67
|
-
|
|
68
|
-
Validate with bounded real Compi cases covering a conflict, a valid exception, indirect dependency,
|
|
69
|
-
insufficient evidence and a document change, with explicit expected outcomes and measured cost.
|
|
70
|
-
Also use a differently organized Markdown project and an agent exercising the skill. Tests exercise
|
|
71
|
-
the public CLI and native protocol seam, not incidental representations.
|
|
72
|
-
|
|
73
|
-
Early use in Compi is desirable. Complete closure additionally requires recovering useful historical
|
|
74
|
-
knowledge and retiring the old active machinery and consumers after replacement is verified.
|
|
75
|
-
Keep Git history and necessary external evidence; a legacy evidence document can suffice. Do not
|
|
76
|
-
rebuild another fleet inside that archive or treat a successful package build as completed adoption.
|
|
9
|
+
The owner approved a new contract after a grill in [Hivex #17](https://github.com/H1V35/hivex/issues/17). The previous implementation spent disproportionate effort certifying intermediate model output. Hivex must provide a portable second brain that helps agents act autonomously, reduce hallucinations and contradictions, and recover settled decisions before asking the owner again.
|
|
10
|
+
|
|
11
|
+
Markdown remains documentary authority. Documents can live at monorepo, package or module level and use the project's own organization and format. Recommend clear domain language, decisions with their reasons, explicit conditions and replacements, and one authoritative home per fact. The [recommended Markdown convention](../../skills/hivex/references/markdown.md) is guidance, not an admission requirement.
|
|
12
|
+
|
|
13
|
+
Keep a semantic graph of meaningful decisions and relationships, including implicit cross-document connections. A document-summary index alone does not satisfy the contract. Recover the relevant transitive dependencies within an explicit context budget. Explain applicability when the sources support it; otherwise identify uncertainty and the remaining evidence needed.
|
|
14
|
+
|
|
15
|
+
The implementing agent consults Hivex before a coherent feature or behavior change. The principal reviewer consults it with the task and diff during review, checks its findings and keeps responsibility for accepting the implementation. A demonstrated contradiction must be corrected or resolved by an approved decision change. Hivex neither conducts every aspect of code review nor rewrites Markdown on its own. Genuine unanswered decisions go to the owner with sources, impact and a recommendation.
|
|
16
|
+
|
|
17
|
+
An update splits oversized Markdown into source-bound units with original line provenance, processes bounded rounds, and checkpoints progress so resumption never discards completed ingestion. Reuse retained extraction results when their source and processing context still match; do not require the whole corpus or a large document to fit in one invocation. Caches optimize work and carry no authority.
|
|
18
|
+
|
|
19
|
+
An update processes a bounded batch and makes one additional knowledge check against its documents and affected relationships. Do not review every node separately or every possible source pair. Do not automatically revise and retry until the model produces green output. Usable knowledge remains available when another part is pending or uncertain, with those limits visible to the caller. A wrong derived interpretation can be corrected against its source without changing doctrine.
|
|
20
|
+
|
|
21
|
+
Consultations and reviews detect added, changed and removed Markdown and update affected knowledge within their work budget. Reuse unchanged knowledge. Working documents need no commit to be readable, but their working state and exact contents must be identifiable. Results refer to the document and implementation versions actually considered; subsequent changes are not silently covered.
|
|
22
|
+
|
|
23
|
+
A work budget spans the entire requested operation, its phases and any resumption or attempts. Expose actual consumption and unknown usage, preserve progress at a limit and distinguish initial indexing, maintenance, consultation and review. Small empirical checks establish useful defaults; a cheap model does not justify unnecessary invocations or context.
|
|
24
|
+
|
|
25
|
+
Luna/max is the owner's selected knowledge model and the profile validated for this release, without silent fallback. Keep model selection and invocation localized so another user can configure a supported model later. Do not build a provider framework speculatively. The principal agent may use a different model without moving project knowledge into its vendor's private memory.
|
|
26
|
+
|
|
27
|
+
Use TypeScript/Bun and practical domain-driven modules with small interfaces. There is no obligation to retain the old code, Opus graph, gold suite or machinery as the architecture or acceptance target. Historical evidence keeps its actual result and limits. This decision supersedes the mandatory candidate/fidelity/pair-comparison/admission ceremony in ADRs 0004–0009 for the replacement workflow; those ADRs describe the earlier implementation and remain historical records.
|
|
28
|
+
|
|
29
|
+
The portable skill is part of each functional delivery. It teaches the actual CLI, the agreed workflow, good documentation practice and cost/uncertainty handling without requiring private tools or unrelated skills. The first slice in #47 supplies explicit initial updates and task context; #48 adds automatic incremental maintenance and interpretation repair; #19 supplies diff-review assistance. These are implementation stages, not claims that the entire new contract is already shipped.
|
|
30
|
+
|
|
31
|
+
Validate with bounded real cases covering a conflict, a valid exception, indirect dependency, insufficient evidence and a document change, with explicit expected outcomes and measured cost. Also use a differently organized Markdown project and an agent exercising the skill. Tests exercise the public CLI and native protocol seam, not incidental representations.
|
|
32
|
+
|
|
33
|
+
Early use can precede complete legacy recovery. Complete closure additionally requires recovering useful historical knowledge and retiring old active machinery after replacement is verified. Keep Git history and necessary external evidence; a legacy evidence document can suffice. Do not rebuild another fleet inside that archive or treat a successful package build as proof that the workflow is fully validated.
|
|
77
34
|
|
|
78
35
|
## Incremental consultation delivery (#48)
|
|
79
36
|
|
|
80
|
-
A consultation maintains at most one bounded pending batch before answering, prioritizing matching
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
updates can advance further rounds. Repeating a completed consultation reuses its result while its
|
|
84
|
-
supplied context remains unchanged.
|
|
85
|
-
|
|
86
|
-
Repair revisits selected source units with an explicit correction reason, without editing Markdown.
|
|
87
|
-
It replaces their derived decisions and relationships and preserves prior attempts. Check findings
|
|
88
|
-
carry source/version/range scope so an unrelated consultation does not inherit a local uncertainty.
|
|
89
|
-
Removed sources remain identifiable when a dependency can no longer be verified. A changed known
|
|
90
|
-
supporting source takes priority over unrelated pending documents. Endpoint updates include the
|
|
91
|
-
source passages supporting their previous relationships; if that evidence is missing or cannot fit
|
|
92
|
-
the context limit, retain pending work and report the limitation before spending a model call.
|
|
37
|
+
A consultation maintains at most one bounded pending batch before answering, prioritizing matching fragments and known affected neighbors. Update, check and answer share one work budget; context-limit increases do not reset an unfinished work item. Remaining corpus coverage is reported, and explicit updates can advance further rounds. Repeating a completed consultation reuses its result while its supplied context remains unchanged.
|
|
38
|
+
|
|
39
|
+
Repair revisits selected source units with an explicit correction reason, without editing Markdown. It replaces their derived decisions and relationships and preserves prior attempts. Check findings carry source/version/range scope so an unrelated consultation does not inherit a local uncertainty. Removed sources remain identifiable when a dependency can no longer be verified. A changed known supporting source takes priority over unrelated pending documents. Endpoint updates include the source passages supporting their previous relationships; if that evidence is missing or cannot fit the context limit, retain pending work and report the limitation before spending a model call.
|