@h1v35/hivex 0.2.0 → 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.
@@ -6,53 +6,22 @@ date: 2026-09-11
6
6
 
7
7
  # Shared knowledge snapshots and selective documentary history
8
8
 
9
- The owner accepted two changes while reviewing Compi's adoption under Hivex #17. Long ADRs mix
10
- current rules with replaced text, increasing ingestion cost and ambiguity. Keeping the derived graph
11
- only in a local store also makes each clone pay to rebuild knowledge and leaves no shared history of
12
- the interpretations used. Markdown remains authoritative; versioning a graph does not make its
13
- interpretations correct or its sources current.
9
+ The owner accepted two changes while reviewing the project under [Hivex #17](https://github.com/H1V35/hivex/issues/17). Long ADRs mix current rules with replaced text, increasing ingestion cost and ambiguity. Keeping the derived graph only in a local store also makes each clone pay to rebuild knowledge and leaves no shared history of the interpretations used. Markdown remains authoritative; versioning a graph does not make its interpretations correct or its sources current.
14
10
 
15
11
  ## Compact current decisions, preserve accessible history
16
12
 
17
- An author may move replaced decision text into a clearly historical Markdown archive, preserving the
18
- original text, dates and provenance. The current ADR retains the applicable decision, reasons,
19
- dependencies and exceptions, with links to its history and replacements. A completely superseded ADR
20
- may become a short pointer at its original path. Preserve referenced anchors or update their callers;
21
- age alone never makes a still-applicable condition obsolete.
13
+ An author may move replaced decision text into a clearly historical Markdown archive, preserving the original text, dates and provenance. The current ADR retains the applicable decision, reasons, dependencies and exceptions, with links to its history and replacements. A completely superseded ADR may become a short pointer at its original path. Preserve referenced anchors or update their callers; age alone never makes a still-applicable condition obsolete.
22
14
 
23
- `docs/archive/adr/` is Compi's chosen convention, not a required layout for every adopter. Historical
24
- sources remain explicitly available for bounded retrieval when needed. They do not become the normal
25
- ingestion backlog or enter every consultation simply because they are accessible. Hivex must respect
26
- the project's declared source scope and report unavailable necessary evidence rather than silently
27
- omitting a dependency or treating an old rule as current. The author performs documentary compaction;
28
- Hivex does not rewrite project decisions automatically.
15
+ `docs/archive/adr/` is one valid convention, not a required layout for every project. Historical sources remain explicitly available for bounded retrieval when needed. They do not become the normal ingestion backlog or enter every consultation simply because they are accessible. Hivex must respect the project's declared source scope and report unavailable necessary evidence rather than silently omitting a dependency or treating an old rule as current. The author performs documentary compaction; Hivex does not rewrite project decisions automatically.
29
16
 
30
17
  ## Share derived knowledge, keep execution state local
31
18
 
32
- The shared artifact is `.hivex/graph.json`: a portable knowledge snapshot suitable for Git, containing
33
- the reusable graph, source versions, evidence, provenance and coverage/uncertainty information. It
34
- allows inspection of what changed and reuse in another clone without regenerating an identical
35
- model output. Preserve known provenance and identify unavailable legacy metadata; do not invent it.
36
-
37
- `.hivex/knowledge.sqlite` remains the local working store for queries, incremental work, attempts,
38
- budgets and caches. `.hivex/knowledge.lock` remains local. The shared artifact does not carry process
39
- identities, locks, pending invocations or the model-response cache. Loading it must not overwrite
40
- unfinished work, erase failed attempts or reset an existing work budget.
41
-
42
- Use deterministic structural and source-version checks to distinguish reusable knowledge from stale
43
- or unavailable parts. A fresh clone should reuse matching knowledge; changed sources require only
44
- the necessary update. A snapshot may retain explicit partial or uncertain coverage. Serializing the
45
- same graph should produce a stable diff; normal read-only queries should not dirty the shared file.
46
- Snapshot operations must not trigger hidden model calls or source edits.
47
-
48
- This extends ADR 0010's portable second-brain contract and supersedes a blanket recommendation to
49
- ignore every artifact under `.hivex/`. The CLI supports explicit snapshot export/import and reuses
50
- the snapshot in a fresh clone. Configurable `history` globs keep historical sources available for
51
- focused retrieval while excluding them from ordinary ingestion.
52
- A saved snapshot alone does not complete Compi adoption; publication and process retirement follow
53
- the project's normal workflow.
54
-
55
- Delivery is tracked by [#53](https://github.com/H1V35/hivex/issues/53) (shared graph snapshot) and
56
- [#54](https://github.com/H1V35/hivex/issues/54) (selective historical sources), under
57
- [the approved extension to #17](https://github.com/H1V35/hivex/issues/17#issuecomment-5631587186).
58
- The CLI remains the existing behavioral test boundary for both independent deliveries.
19
+ The shared artifact is `.hivex/graph.json`: a portable knowledge snapshot suitable for Git, containing the reusable graph, source versions, evidence, provenance and coverage/uncertainty information. It allows inspection of what changed and reuse in another clone without regenerating an identical model output. Preserve known provenance and identify unavailable legacy metadata; do not invent it.
20
+
21
+ `.hivex/knowledge.sqlite` remains the local working store for queries, incremental work, attempts, budgets and caches. `.hivex/knowledge.lock` remains local. The shared artifact does not carry process identities, locks, pending invocations or the model-response cache. Loading it must not overwrite unfinished work, erase failed attempts or reset an existing work budget.
22
+
23
+ Use deterministic structural and source-version checks to distinguish reusable knowledge from stale or unavailable parts. A fresh clone should reuse matching knowledge; changed sources require only the necessary update. A snapshot may retain explicit partial or uncertain coverage. Serializing the same graph should produce a stable diff; normal read-only queries should not dirty the shared file. Snapshot operations must not trigger hidden model calls or source edits.
24
+
25
+ This extends ADR 0010's portable second-brain contract and supersedes a blanket recommendation to ignore every artifact under `.hivex/`. The CLI supports explicit snapshot export/import and reuses the snapshot in a fresh clone. Configurable `history` globs keep historical sources available for focused retrieval while excluding them from ordinary ingestion. A saved snapshot alone does not complete a project's rollout; publication and process retirement follow the project's normal workflow.
26
+
27
+ Delivery is tracked by [#53](https://github.com/H1V35/hivex/issues/53) (shared graph snapshot) and [#54](https://github.com/H1V35/hivex/issues/54) (selective historical sources), under [the approved extension to #17](https://github.com/H1V35/hivex/issues/17#issuecomment-5631587186). The CLI remains the existing behavioral test boundary for both independent deliveries.
@@ -5,170 +5,74 @@ status: accepted
5
5
 
6
6
  # Engineering workflow
7
7
 
8
- Hivex is a TypeScript/Bun product. Modules group behavior by domain responsibility and hide internal
9
- details behind small interfaces. Do not add a second development-session orchestrator or require
10
- an adopting project's layout, tracker or product packages. Codex, Git/GitHub and CI coordinate work.
8
+ Hivex is a TypeScript/Bun product. Modules group behavior by domain responsibility and hide internal details behind small interfaces. Do not add a second development-session orchestrator or require an adopting project's layout, tracker or product packages. Codex, Git/GitHub and CI coordinate work.
11
9
 
12
10
  ## Development and verification
13
11
 
14
- Work is issue-first in `H1V35/hivex`. New vertical work follows discovery where decisions remain open,
15
- then an agreed spec, verifiable execution tickets, implementation and code review. Reuse settled scope
16
- instead of reopening an interview. The owning repository carries the execution ticket; a cross-repository
17
- parent supplies context and coordination, not a substitute for native tracking.
18
-
19
- Resolve the existing spec/ticket before changing code and link the PR and verification to it. Absorb
20
- review findings into the appropriate existing ticket whenever its scope permits. Open a separate issue
21
- only when strictly necessary to preserve independently actionable work, and record why it cannot be
22
- absorbed. Read-only retrieval does not need a new ticket. Specs and tickets track work and acceptance;
23
- resulting durable decisions also enter their repository authority.
24
-
25
- Use an existing issue for an already tracked requirement. Create a branch from the current remote
26
- main, keep each PR to one coherent change and preserve commit history when merging. Never push
27
- directly to main or force-push a shared branch. Apply review findings before acceptance; an invalid
28
- review can be rerun, while an adverse finding must be resolved on its merits. Current explicit owner
29
- authorization governs whether the agent may merge.
30
-
31
- Independent code reviewers use the coordinating agent's current model and reasoning effort. Pass
32
- that profile explicitly when the subagent default differs, and verify the effective configuration
33
- after dispatch. Do not substitute the cheaper knowledge model for code review. Routine implementation subtasks may use an
34
- explicitly authorized cheaper model; Hivex's internal knowledge extraction/checking uses the user's
35
- knowledge-model configuration independently of the development and code-review model.
36
-
37
- Choose verification for the affected surfaces. Code changes require typechecking, lint, formatting
38
- and relevant behavior tests; documentation-only changes need formatting and checks of affected
39
- references or declared sources. Record the exact revision and the checks actually completed. A later
40
- change invalidates the affected results. Do not claim an omitted, interrupted or truncated check passed.
41
-
42
- GitHub Actions runs the quality workflow on the owner's Mac through an official self-hosted runner,
43
- using `[self-hosted, macOS, ARM64, hivex]`. GitHub retains secrets, logs and PR checks; no hosted
44
- runner fallback is configured. No speed benchmark is required. A queued, skipped or interrupted
45
- run is not a pass. Local verification remains required when the runner is unavailable.
46
-
47
- Runner installation is repository administration, outside Hivex's product. Register the admitted
48
- macOS ARM64 release from GitHub's runner settings in its own directory, verify the official checksum,
49
- and use the generated `svc.sh install/start/status/stop` commands. Keep automatic updates enabled,
50
- a stable Homebrew/system PATH and the Mac awake and connected under the logged-in user. The
51
- runner work directory must be separate from the developer checkout and other repository runners.
52
- Only trusted code may run on this persistent host; review that boundary before public contributions.
53
- See [GitHub's runner reference](https://docs.github.com/en/actions/reference/runners/self-hosted-runners).
54
-
55
- During a host migration, disable Actions, register and confirm the runner is online, and merge all
56
- workflow routes before re-enabling Actions. Then dispatch Quality on that exact revision and check
57
- the assigned runner and completed result. The route change alone is not functional verification.
58
-
59
- Use `bun install` for development and `bun ci` for frozen installation. Bun owns dependency
60
- installation through its native configuration and lockfile; Hivex has no custom installer or
61
- registry verifier. See the [installation decision](adr/0003-independent-bun-installation.md).
62
-
63
- The lint configuration owns executable syntax/complexity constraints: cyclomatic complexity 20,
64
- cognitive complexity 15, at most four parameters, nesting depth three and no nested/chained
65
- ternaries. Refactor around meaningful responsibilities rather than adding tiny wrappers merely to
66
- make a number pass. Changes to those limits require a documented decision.
12
+ Work is issue-first in `H1V35/hivex`. New vertical work follows discovery where decisions remain open, then an agreed spec, verifiable execution tickets, implementation and code review. Reuse settled scope instead of reopening an interview. The owning repository carries the execution ticket; a cross-repository parent supplies context and coordination, not a substitute for native tracking.
13
+
14
+ Resolve the existing spec/ticket before changing code and link the PR and verification to it. Absorb review findings into the appropriate existing ticket whenever its scope permits. Open a separate issue only when strictly necessary to preserve independently actionable work, and record why it cannot be absorbed. Read-only retrieval does not need a new ticket. Specs and tickets track work and acceptance; resulting durable decisions also enter their repository authority.
15
+
16
+ Use an existing issue for an already tracked requirement. Create a branch from the current remote main, keep each PR to one coherent change and preserve commit history when merging. Never push directly to main or force-push a shared branch. Apply review findings before acceptance; an invalid review can be rerun, while an adverse finding must be resolved on its merits. Current explicit owner authorization governs whether the agent may merge.
17
+
18
+ Independent code reviewers use the coordinating agent's current model and reasoning effort. Pass that profile explicitly when the subagent default differs, and verify the effective configuration after dispatch. Do not substitute the cheaper knowledge model for code review. Routine implementation subtasks may use an explicitly authorized cheaper model; Hivex's internal knowledge extraction/checking uses the user's knowledge-model configuration independently of the development and code-review model.
19
+
20
+ Choose verification for the affected surfaces. Code changes require typechecking, lint, formatting and relevant behavior tests; documentation-only changes need formatting and checks of affected references or declared sources. Record the exact revision and the checks actually completed. A later change invalidates the affected results. Do not claim an omitted, interrupted or truncated check passed.
21
+
22
+ GitHub Actions runs the quality workflow on the owner's Mac through an official self-hosted runner, using `[self-hosted, macOS, ARM64, hivex]`. GitHub retains secrets, logs and PR checks; no hosted runner fallback is configured. No speed benchmark is required. A queued, skipped or interrupted run is not a pass. Local verification remains required when the runner is unavailable.
23
+
24
+ Runner installation is repository administration, outside Hivex's product. Register the admitted macOS ARM64 release from GitHub's runner settings in its own directory, verify the official checksum, and use the generated `svc.sh install/start/status/stop` commands. Keep automatic updates enabled, a stable Homebrew/system PATH and the Mac awake and connected under the logged-in user. The runner work directory must be separate from the developer checkout and other repository runners. Only trusted code may run on this persistent host; review that boundary before public contributions. See [GitHub's runner reference](https://docs.github.com/en/actions/reference/runners/self-hosted-runners).
25
+
26
+ During a host migration, disable Actions, register and confirm the runner is online, and merge all workflow routes before re-enabling Actions. Then dispatch Quality on that exact revision and check the assigned runner and completed result. The route change alone is not functional verification.
27
+
28
+ Use `bun install` for development and `bun ci` for frozen installation. Bun owns dependency installation through its native configuration and lockfile; Hivex has no custom installer or registry verifier. See the [installation decision](adr/0003-independent-bun-installation.md).
29
+
30
+ Lint uses the published Ultracite ESLint/Prettier core presets with the owner's selected preferences: maximum cyclomatic complexity 20, cognitive complexity 15, nesting depth 3 and four parameters per function; print width 100 and single quotes; unused variables, arguments and caught errors may have a leading `_`, and loose equality is allowed when comparing with `null`. Keep the rest of the presets unchanged. Naming and unused-variable checks allow the leading `_` for unused bindings. The overlapping SonarJS unused-variable rule, `no-eq-null` and optional-catch-binding preference are disabled because they cannot express those exceptions; the configured unused-variable and equality rules still check ordinary names and comparisons. Use `eslint-plugin-boundaries` to enforce actual module responsibilities and keep additional policy minimal and tied to domain behavior. Configuration and dependency versions belong in the executable project configuration. Refactor around meaningful responsibilities instead of adding wrappers to satisfy arbitrary thresholds.
31
+
32
+ The dependency policy follows the current modules: document discovery and Markdown parsing do not import knowledge, review or model execution; knowledge storage and ingestion may use documents; review may use documents and knowledge. Model execution is self-contained, retrieval may use shared errors, and CLI commands compose these responsibilities. Tests may use production modules; production cannot import tests. New source files must be classified before they can participate in these dependencies.
33
+
34
+ Runtime settings identify Bun globals and Bun executables while keeping the preset rules enabled. The browser compatibility target is the server-side JavaScript environment, not a browser application. Runtime APIs used by the code must also be verified on the supported Bun version.
67
35
 
68
36
  ## Tests protect behavior
69
37
 
70
- TDD guides development through meaningful failing examples; it does not require a test for every
71
- function, component, wrapper or line. A test must identify a supported behavior, meaningful invariant
72
- or regression it protects. Prefer the caller's observable interface and results that survive an
73
- internal refactor.
38
+ TDD guides development through meaningful failing examples; it does not require a test for every function, component, wrapper or line. A test must identify a supported behavior, meaningful invariant or regression it protects. Prefer the caller's observable interface and results that survive an internal refactor.
74
39
 
75
- For UI, test visible content, accessibility, interactions and loading/error/empty-state behavior.
76
- Do not freeze arbitrary child arrays, wrapper counts or class/style arrangements. A visual dimension
77
- needs a test only when it is an intentional requirement worth maintaining. For example, displaying
78
- "2 of 4" is a behavior; representing it as exactly three React children is not.
40
+ For UI, test visible content, accessibility, interactions and loading/error/empty-state behavior. Do not freeze arbitrary child arrays, wrapper counts or class/style arrangements. A visual dimension needs a test only when it is an intentional requirement worth maintaining. For example, displaying "2 of 4" is a behavior; representing it as exactly three React children is not.
79
41
 
80
- Mocks, call counts, ordering and exact bytes are not automatically wrong. They can protect an
81
- external protocol, idempotency, a query budget or faithful source reproduction. Their justification
82
- must be the contract, not the current arrangement of internal helpers. Expected results must be
83
- independent examples, not the implementation's own calculation repeated in the test.
42
+ Mocks, call counts, ordering and exact bytes are not automatically wrong. They can protect an external protocol, idempotency, a query budget or faithful source reproduction. Their justification must be the contract, not the current arrangement of internal helpers. Expected results must be independent examples, not the implementation's own calculation repeated in the test.
84
43
 
85
- Review existing tests as retain, rewrite, consolidate or remove. Remove tests for retired behavior
86
- with that behavior; preserve still-needed guarantees at the replacement's actual interface. Do not
87
- port a legacy battery mechanically, chase a test-count target or retain duplicate suites indefinitely.
44
+ Review existing tests as retain, rewrite, consolidate or remove. Remove tests for retired behavior with that behavior; preserve still-needed guarantees at the replacement's actual interface. Do not port a legacy battery mechanically, chase a test-count target or retain duplicate suites indefinitely.
88
45
 
89
46
  ## Files and runtime data have a lifecycle
90
47
 
91
- Create a source file for a meaningful responsibility and a document for a distinct authoritative
92
- purpose. Do not create files for every helper, task, turn, attempt or handoff merely to satisfy a
93
- layout convention or a lint threshold.
48
+ Create a source file for a meaningful responsibility and a document for a distinct authoritative purpose. Do not create files for every helper, task, turn, attempt or handoff merely to satisfy a layout convention or a lint threshold.
94
49
 
95
- Before introducing persistent state, define its purpose, location, owner and retention. Prefer a small
96
- project-local data store to an unbounded tree of per-event files. A per-unit atomic checkpoint can be
97
- a database transaction; it does not require a separate file. Fewer filenames alone do not bound data
98
- growth: cached data, run history and diagnostics also need size/count/age limits and cleanup behavior.
50
+ Before introducing persistent state, define its purpose, location, owner and retention. Prefer a small project-local data store to an unbounded tree of per-event files. A per-unit atomic checkpoint can be a database transaction; it does not require a separate file. Fewer filenames alone do not bound data growth: cached data, run history and diagnostics also need size/count/age limits and cleanup behavior.
99
51
 
100
- Normal read-only queries should leave no per-query artifacts. Clean up owned temporary resources
101
- on ordinary completion and handled failures. Interrupted work must remain recoverable without being
102
- silently retried or discarded. Export diagnostic bundles when needed rather than automatically
103
- writing a new report for every successful step. Retention must preserve the accepted state and the
104
- evidence needed by supported historical/recovery operations; it must not invent a successful cleanup.
52
+ Normal read-only queries should leave no per-query artifacts. Clean up owned temporary resources on ordinary completion and handled failures. Interrupted work must remain recoverable without being silently retried or discarded. Export diagnostic bundles when needed rather than automatically writing a new report for every successful step. Retention must preserve the accepted state and the evidence needed by supported historical/recovery operations; it must not invent a successful cleanup.
105
53
 
106
54
  ## Documentation is maintained authority
107
55
 
108
- Code must be self-explanatory through clear names, structure and behavior. Repository Markdown is
109
- the source of truth for intent, constraints, decisions and reasons that code cannot explain. Do not
110
- write a parallel implementation manual or use documentation to compensate for unclear code.
111
- Accepted source history and Markdown retain authority; caches, model output and search hits do not.
112
- An accepted status alone does not settle amendments, exceptions or contradictions. Keep unresolved
113
- evidence explicit. Never promote a historical agent's description of an owner ruling without
114
- checking its provenance and applicability.
115
-
116
- Capture every decision worth preserving in its appropriate repository document as part of the work.
117
- Do not leave accepted knowledge only in a conversation, issue comment or runtime log. Update the
118
- existing canonical document when it already owns the topic and scope; create a new one only when
119
- it has a distinct purpose. An issue can track the work and preserve discussion, but it is not a
120
- substitute for incorporating the resulting doctrine into the documentation.
121
-
122
- Keep docs with the monorepo, workspace or module they describe. Link to common rules instead of
123
- copying them. Recommended new Markdown should state purpose/scope, use stable headings and suitable
124
- metadata, keep a rule with its conditions/exceptions, and link its sources and replacements. Accept
125
- compatible existing Markdown without forcing those authors to adopt our template. Do not generate
126
- empty documentation for every module or add non-Markdown readers to the current scope.
127
-
128
- Use repository decisions and review evidence for durable knowledge, not private agent memory.
129
- Checkpoints identify the exact commit, verified work and remaining work. Choose a context handoff
130
- when the task needs it; Hivex does not impose the retired machinery's fixed token thresholds.
131
- Knowledge-model operations use the admitted Luna/max profile and record actual usage, including
132
- failed or interrupted attempts. Deterministic retrieval and maintenance do not require a model.
133
-
134
- The replacement workflow follows [ADR 0010](adr/0010-practical-knowledge-assistance.md). It processes
135
- bounded document batches with one additional knowledge check, keeps partial knowledge usable and
136
- preserves a work budget across phases and resumption. A consultation maintains one pending batch
137
- before answering, and a source-based repair replaces interpretations without changing doctrine.
138
- Keep check warnings scoped and public evidence limited to source coordinates, version and text. Avoid a new abstraction or protocol unless it
139
- protects a concrete requirement. The owner-authorized implementation can replace the earlier
140
- cohort/admission pipeline; its historical evidence remains unchanged.
141
-
142
- Hivex assists the principal reviewer with decisions, dependencies, exceptions and possible conflicts.
143
- The reviewer verifies its findings. Missing context or uncertainty limits the conclusions it affects;
144
- a definitive finding must refer to the actual document and implementation versions reviewed.
56
+ Code must be self-explanatory through clear names, structure and behavior. Repository Markdown is the source of truth for intent, constraints, decisions and reasons that code cannot explain. Do not write a parallel implementation manual or use documentation to compensate for unclear code. Accepted source history and Markdown retain authority; caches, model output and search hits do not. An accepted status alone does not settle amendments, exceptions or contradictions. Keep unresolved evidence explicit. Never promote a historical agent's description of an owner ruling without checking its provenance and applicability.
145
57
 
146
- ## Retire mechanisms without losing knowledge
58
+ Capture every decision worth preserving in its appropriate repository document as part of the work. Do not leave accepted knowledge only in a conversation, issue comment or runtime log. Update the existing canonical document when it already owns the topic and scope; create a new one only when it has a distinct purpose. An issue can track the work and preserve discussion, but it is not a substitute for incorporating the resulting doctrine into the documentation.
59
+
60
+ Keep docs with the monorepo, workspace or module they describe. Link to common rules instead of copying them. Recommended new Markdown should state purpose/scope, use stable headings and suitable metadata, keep a rule with its conditions/exceptions, and link its sources and replacements. Accept compatible existing Markdown without forcing those authors to adopt our template. Do not generate empty documentation for every module or add non-Markdown readers to the current scope.
147
61
 
148
- Early use in Compi can support validation and recovery before full retirement. Necessary adoption
149
- and verification work belongs to Hivex completion. Alternative model integrations are evolutionary work;
150
- keep the current Codex/Luna route usable without spreading its assumptions into the knowledge model.
62
+ Use repository decisions and review evidence for durable knowledge, not private agent memory. Checkpoints identify the exact commit, verified work and remaining work. Choose a context handoff when the task needs it; Hivex does not impose the retired machinery's fixed token thresholds. Knowledge-model operations use the admitted Luna/max profile and record actual usage, including failed or interrupted attempts. Deterministic retrieval and maintenance do not require a model.
63
+
64
+ The replacement workflow follows [ADR 0010](adr/0010-practical-knowledge-assistance.md). It processes bounded document batches with one additional knowledge check, keeps partial knowledge usable and preserves a work budget across phases and resumption. A consultation maintains one pending batch before answering, and a source-based repair replaces interpretations without changing doctrine. Keep check warnings scoped and public evidence limited to source coordinates, version and text. Avoid a new abstraction or protocol unless it protects a concrete requirement. The owner-authorized implementation can replace the earlier cohort/admission pipeline; its historical evidence remains unchanged.
65
+
66
+ Hivex assists the principal reviewer with decisions, dependencies, exceptions and possible conflicts. The reviewer verifies its findings. Missing context or uncertainty limits the conclusions it affects; a definitive finding must refer to the actual document and implementation versions reviewed.
67
+
68
+ ## Retire mechanisms without losing knowledge
151
69
 
152
- After knowledge recovery, replacement validation and consumer migration, remove obsolete orchestration
153
- code, scripts, hooks, configuration, tests, dependencies and active instructions. Do not carry an unused
154
- legacy framework into Hivex under another name. Preserve useful decisions in their canonical docs and
155
- retain necessary historical evidence in Git or a bounded private archive outside the active worktree.
156
- Do not rewrite Git history or destroy the accepted Opus graph before its replacement is admitted.
70
+ After knowledge recovery and replacement validation, remove obsolete orchestration code, scripts, hooks, configuration, tests, dependencies and active instructions. Do not carry an unused legacy framework into Hivex under another name. Preserve useful decisions in their canonical docs and retain necessary historical evidence in Git or a bounded private archive outside the active worktree. Do not rewrite Git history or destroy the accepted Opus graph before its replacement is admitted.
157
71
 
158
- Early use can precede complete legacy recovery. Complete closure requires useful historical knowledge
159
- in Markdown, Hivex demonstrated in Compi and the old active machinery retired with its consumers.
160
- Validate the new workflow against bounded real cases, not identity with an old model's graph or an
161
- exhaustive replay prerequisite. Release packages exclude private project evidence and retired runtime.
72
+ A replacement workflow can be used before every historical artifact is retired when the remaining work is explicit. Complete closure requires useful historical knowledge in Markdown and obsolete active machinery retired wherever it is no longer needed. Validate the workflow against bounded real cases, not identity with an old model's graph or an exhaustive replay prerequisite. Release packages exclude private project evidence and retired runtime.
162
73
 
163
74
  ## Distribution
164
75
 
165
- The owner selected `@h1v35/hivex` for the npm package on 2026-09-08, retaining `hivex` as the installed
166
- command, and approved the MIT license. The scoped name avoids the unrelated existing unscoped npm
167
- package. Use an authenticated account authorized for that scope; do not infer npm ownership from a
168
- matching GitHub name. Release preparation must verify the packed contents and exclude private project
169
- evidence and runtime stores. Compi adopts a pinned published version after the complete cycle is
170
- validated; this decision alone does not mean a package has been published.
76
+ The owner selected `@h1v35/hivex` for the npm package on 2026-09-08, retaining `hivex` as the installed command, and approved the MIT license. The scoped name avoids the unrelated existing unscoped npm package. Use an authenticated account authorized for that scope; do not infer npm ownership from a matching GitHub name. Release preparation must verify the packed contents and exclude private project evidence and runtime stores. Project integration follows the normal release process after the complete cycle is validated; this decision alone does not mean a package has been published.
171
77
 
172
- Before publication, inspect and scan the exact package archive for secrets and unintended private
173
- content. Record its hash and the completed scan result; a repack requires a fresh check. Publish the
174
- same verified artifact, not an unchecked reconstruction from a changed working tree.
78
+ Before publication, inspect and scan the exact package archive for secrets and unintended private content. Record its hash and the completed scan result; a repack requires a fresh check. Publish the same verified artifact, not an unchecked reconstruction from a changed working tree.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@h1v35/hivex",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Versioned project knowledge for people and agents.",
6
6
  "scripts": {
7
7
  "hivex": "bun src/cli.ts",
8
8
  "test": "bun test --timeout 15000 ./src",
9
9
  "typecheck": "node_modules/typescript-native/bin/tsc --noEmit",
10
- "lint": "eslint src test tooling eslint.config.js eslint.base.config.js",
10
+ "lint": "eslint src test eslint.config.js prettier.config.js",
11
11
  "format:check": "prettier --check ."
12
12
  },
13
13
  "dependencies": {
@@ -23,14 +23,31 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@eslint/js": "10.0.1",
26
- "typescript-native": "npm:typescript@7.0.2",
27
- "@types/bun": "1.3.14",
28
- "eslint": "10.7.0",
29
- "eslint-plugin-sonarjs": "1.0.4",
30
- "globals": "16.5.0",
26
+ "@types/bun": "1.4.0",
27
+ "@typescript-eslint/eslint-plugin": "8.69.0",
28
+ "@typescript-eslint/parser": "8.69.0",
29
+ "eslint": "10.9.1",
30
+ "eslint-config-prettier": "10.1.8",
31
+ "eslint-import-resolver-typescript": "4.4.5",
32
+ "eslint-plugin-boundaries": "7.2.0",
33
+ "eslint-plugin-compat": "7.0.2",
34
+ "eslint-plugin-cypress": "7.0.1",
35
+ "eslint-plugin-github": "6.1.2",
36
+ "eslint-plugin-html": "8.2.0",
37
+ "eslint-plugin-import-x": "4.17.1",
38
+ "eslint-plugin-jsdoc": "64.3.5",
39
+ "eslint-plugin-n": "18.3.0",
40
+ "eslint-plugin-prettier": "5.5.6",
41
+ "eslint-plugin-promise": "7.3.0",
42
+ "eslint-plugin-sonarjs": "4.2.0",
43
+ "eslint-plugin-storybook": "10.6.0",
44
+ "eslint-plugin-unicorn": "74.0.0",
45
+ "eslint-plugin-unused-imports": "4.4.1",
46
+ "globals": "17.12.0",
47
+ "prettier": "3.8.4",
31
48
  "typescript": "npm:@typescript/typescript6@6.0.2",
32
- "typescript-eslint": "8.64.0",
33
- "prettier": "3.8.4"
49
+ "typescript-native": "npm:typescript@7.0.2",
50
+ "ultracite": "7.10.8"
34
51
  },
35
52
  "trustedDependencies": [],
36
53
  "packageManager": "bun@1.4.2",
@@ -61,5 +78,8 @@
61
78
  "publishConfig": {
62
79
  "access": "public",
63
80
  "registry": "https://registry.npmjs.org/"
64
- }
81
+ },
82
+ "browserslist": [
83
+ "node 25"
84
+ ]
65
85
  }
@@ -5,130 +5,62 @@ description: Retrieve project decisions and their dependencies and exceptions wi
5
5
 
6
6
  # Hivex
7
7
 
8
- Hivex gives the implementing and reviewing agents project context. Markdown is documentary
9
- authority; the graph is derived assistance. The principal agent remains responsible for the work.
10
- Recover settled decisions before asking the owner to decide them again.
8
+ Hivex gives the implementing and reviewing agents project context. Markdown is documentary authority; the graph is derived assistance. The principal agent remains responsible for the work. Recover settled decisions before asking the owner to decide them again.
11
9
 
12
10
  ## Start with the installed interface
13
11
 
14
- Read the project's agent instructions and source configuration. Run `hivex --help` when the installed
15
- interface is unfamiliar. In a Bun project, `bun hivex` resolves the installed CLI. The package is
16
- `@h1v35/hivex`; do not fetch the unrelated unscoped package.
12
+ Read the project's agent instructions and source configuration. Run `hivex --help` when the installed interface is unfamiliar. In a Bun project, `bun hivex` resolves the installed CLI. The package is `@h1v35/hivex`; do not fetch the unrelated unscoped package.
17
13
 
18
- Use the capabilities advertised by that version. Do not invent commands, silently switch models or
19
- pretend a planned capability exists. Hivex's current validated knowledge profile is Luna/max through
20
- native Codex; the principal agent's model is independent of that choice.
14
+ Use the capabilities advertised by that version. Do not invent commands, silently switch models or pretend a planned capability exists. Hivex's current validated knowledge profile is Luna/max through native Codex; the principal agent's model is independent of that choice.
21
15
 
22
- Projects may declare additional historical Markdown with `history` globs in `hivex.json`. Those
23
- sources are available to `sources` and `read`, but remain outside ordinary update and consultation
24
- selection. Use `--source <document>` with `ask` or `review` for a focused retrieval; a known graph
25
- relationship may bring back only the bounded evidence it needs. Explicit `exclude` globs still win,
26
- and the CLI continues to reject symlinks, protected directories and paths outside the project.
16
+ Projects may declare additional historical Markdown with `history` globs in `hivex.json`. Those sources are available to `sources` and `read`, but remain outside ordinary update and consultation selection. Use `--source <document>` with `ask` or `review` for a focused retrieval; a known graph relationship may bring back only the bounded evidence it needs. Explicit `exclude` globs still win, and the CLI continues to reject symlinks, protected directories and paths outside the project.
27
17
 
28
- Native Codex must be able to write its own local state. When the host sandbox prevents that,
29
- use its normal execution-approval mechanism within the existing authorized scope. Keep a failed
30
- launch in the same work history when resuming; an initialization failure is not a model verdict.
18
+ Native Codex must be able to write its own local state. When the host sandbox prevents that, use its normal execution-approval mechanism within the existing authorized scope. Keep a failed launch in the same work history when resuming; an initialization failure is not a model verdict.
31
19
 
32
20
  ## Before implementation
33
21
 
34
- For a coherent feature or behavior change, ask about the intended task and recover the relevant
35
- decisions. Read their evidence and follow relevant dependencies, exceptions and replacements,
36
- including indirect relationships. A search preview or accepted label alone does not settle scope.
22
+ For a coherent feature or behavior change, ask about the intended task and recover the relevant decisions. Read their evidence and follow relevant dependencies, exceptions and replacements, including indirect relationships. A search preview or accepted label alone does not settle scope.
37
23
 
38
- Use Hivex's source/version references. Keep conditions with their rules; a partial exception does
39
- not revoke an entire document. If the evidence answers the question, apply it without asking the
40
- owner again. Ask only when information is missing, sources cannot resolve a real ambiguity or a
41
- new decision requires the owner's involvement. Present the sources, impact and your recommendation.
24
+ Use Hivex's source/version references. Keep conditions with their rules; a partial exception does not revoke an entire document. If the evidence answers the question, apply it without asking the owner again. Ask only when information is missing, sources cannot resolve a real ambiguity or a new decision requires the owner's involvement. Present the sources, impact and your recommendation.
42
25
 
43
- Queries should be focused. Reuse context that remains current rather than asking again per file or
44
- implementation step. Respect declared incomplete exploration and unavailable evidence.
26
+ Queries should be focused. Reuse context that remains current rather than asking again per file or implementation step. Respect declared incomplete exploration and unavailable evidence.
45
27
 
46
28
  ## During review
47
29
 
48
- The principal reviewer directs the review. Run `hivex review "<task>" --base <git-ref>` from the
49
- Git project root. It examines tracked and untracked working changes, recovers relevant documentary
50
- context and makes one review call after at most one update/check batch. The default total budget is
51
- three calls; resume the same task/base with the intended total limit to continue retained work.
52
- Expanding a partial report keeps its work identity and consumed budget; a larger context does not
53
- create another allowance.
30
+ The principal reviewer directs the review. Run `hivex review "<task>" --base <git-ref>` from the Git project root. It examines tracked and untracked working changes, recovers relevant documentary context and makes one review call after at most one update/check batch. The default total budget is three calls; resume the same task/base with the intended total limit to continue retained work. Expanding a partial report keeps its work identity and consumed budget; a larger context does not create another allowance.
54
31
 
55
- Check each finding against its cited before/after code and Markdown versions, including dependencies,
56
- conditions and exceptions. Resolve a demonstrated contradiction before closing the change, by
57
- correcting the implementation or recording an approved decision change. Uncertainty calls for focused
58
- investigation; absence of a finding is not implementation approval. Missing context may be addressed
59
- with a focused task, explicit `--source` or an appropriate context limit, not automatic semantic retries.
32
+ Check each finding against its cited before/after code and Markdown versions, including dependencies, conditions and exceptions. Resolve a demonstrated contradiction before closing the change, by correcting the implementation or recording an approved decision change. Uncertainty calls for focused investigation; absence of a finding is not implementation approval. Missing context may be addressed with a focused task, explicit `--source` or an appropriate context limit, not automatic semantic retries.
60
33
 
61
- Save a report outside the reviewed project or in an ignored path when it must survive the session.
62
- `hivex review --check <saved-report.json> --root <project>` checks documentary and implementation
63
- freshness without a model. A current report is not proof of correct code; a stale report does not
64
- cover subsequent changes. Review output never replaces general code review, lint or tests.
34
+ Save a report outside the reviewed project or in an ignored path when it must survive the session. `hivex review --check <saved-report.json> --root <project>` checks documentary and implementation freshness without a model. A current report is not proof of correct code; a stale report does not cover subsequent changes. Review output never replaces general code review, lint or tests.
65
35
 
66
36
  ## Maintain knowledge
67
37
 
68
- The implementing agent maintains the documents as part of the change. Hivex may identify affected
69
- documents or suggest a correction, but does not rewrite project decisions on its own. Correct an
70
- incorrect graph interpretation against its source; do not alter doctrine to satisfy the model.
38
+ The implementing agent maintains the documents as part of the change. Hivex may identify affected documents or suggest a correction, but does not rewrite project decisions on its own. Correct an incorrect graph interpretation against its source; do not alter doctrine to satisfy the model.
71
39
 
72
- Keep documents at their monorepo, package or module authority. Follow the project's existing layout
73
- and format. When establishing or improving documentation, use the optional
74
- [Markdown convention](references/markdown.md); it is guidance, not an installation prerequisite.
40
+ Keep documents at their monorepo, package or module authority. Follow the project's existing layout and format. When establishing or improving documentation, use the optional [Markdown convention](references/markdown.md); it is guidance, not an installation prerequisite.
75
41
 
76
- Detect new, changed or removed documents before relying on the graph. Use the installed update
77
- workflow within the same work budget. Working documents may be queried without a commit, but that
78
- state is not approval; preserve the exact versions used by a review. Pending or uncertain knowledge
79
- limits the conclusions that depend on it, without making unrelated context unusable.
42
+ Detect new, changed or removed documents before relying on the graph. Use the installed update workflow within the same work budget. Working documents may be queried without a commit, but that state is not approval; preserve the exact versions used by a review. Pending or uncertain knowledge limits the conclusions that depend on it, without making unrelated context unusable.
80
43
 
81
- `ask` updates at most one relevant pending batch before answering, under the same total call/input
82
- budget. Its default is three calls. Omitted limits preserve a resumed work item's budget. Repeat the same task to resume; changing its budget changes the
83
- total ceiling, never the consumed count. Pending corpus coverage is explicit; use `update` when more
84
- rounds are needed, rather than issuing repeated identical questions to force indexing.
44
+ `ask` updates at most one relevant pending batch before answering, under the same total call/input budget. Its default is three calls. Omitted limits preserve a resumed work item's budget. Repeat the same task to resume; changing its budget changes the total ceiling, never the consumed count. Pending corpus coverage is explicit; use `update` when more rounds are needed, rather than issuing repeated identical questions to force indexing.
85
45
 
86
- An ordinary consultation does not ingest every declared historical source. A focused source is marked
87
- as historical in supplied packets, decisions and evidence, and its extracted decisions retain
88
- historical status with their conditions, exceptions, warnings and source ranges. If a required
89
- historical dependency is outside the declared scope, inspect `unavailableDocuments` and the reported
90
- coverage instead of treating the answer as complete.
46
+ An ordinary consultation does not ingest every declared historical source. A focused source is marked as historical in supplied packets, decisions and evidence, and its extracted decisions retain historical status with their conditions, exceptions, warnings and source ranges. If a required historical dependency is outside the declared scope, inspect `unavailableDocuments` and the reported coverage instead of treating the answer as complete.
91
47
 
92
- Repair a demonstrably wrong interpretation with `update --repair <document> --reason <correction>`.
93
- Check the Markdown first. This revises derived knowledge and its relationships without changing the
94
- document or authorizing new policy. Do not use it to suppress a genuine contradiction. Review source-local
95
- warnings in their stated scope and inspect `unavailableDocuments` for changed or removed dependencies.
48
+ Repair a demonstrably wrong interpretation with `update --repair <document> --reason <correction>`. Check the Markdown first. This revises derived knowledge and its relationships without changing the document or authorizing new policy. Do not use it to suppress a genuine contradiction. Review source-local warnings in their stated scope and inspect `unavailableDocuments` for changed or removed dependencies.
96
49
 
97
50
  ## Share reusable knowledge
98
51
 
99
- `hivex snapshot export` saves the current graph to `.hivex/graph.json`, suitable for Git alongside its
100
- Markdown sources. It retains source versions, evidence, available provenance and partial/uncertain
101
- coverage; it does not export local attempts, budgets, process locks or model caches. Snapshot commands
102
- make no model calls. Keep the SQLite store and locks ignored while allowing the shared JSON file.
52
+ `hivex snapshot export` saves the current graph to `.hivex/graph.json`, suitable for Git alongside its Markdown sources. It retains source versions, evidence, available provenance and partial/uncertain coverage; it does not export local attempts, budgets, process locks or model caches. Snapshot commands make no model calls. Keep the SQLite store and locks ignored while allowing the shared JSON file.
103
53
 
104
- A clone without local knowledge can read the snapshot directly and reuse its matching units on the
105
- first update. Existing local knowledge takes precedence; `hivex snapshot import` explicitly adopts
106
- the shared graph and refuses if work is unfinished. Preserve that work and its accounting rather than
107
- deleting the store to force import. Stale or unavailable source versions remain explicit, and source
108
- freshness is not semantic approval. Export when knowledge changes; ordinary reads do not dirty the
109
- shared artifact.
54
+ A clone without local knowledge can read the snapshot directly and reuse its matching units on the first update. Existing local knowledge takes precedence; `hivex snapshot import` explicitly adopts the shared graph and refuses if work is unfinished. Preserve that work and its accounting rather than deleting the store to force import. Stale or unavailable source versions remain explicit, and source freshness is not semantic approval. Export when knowledge changes; ordinary reads do not dirty the shared artifact.
110
55
 
111
56
  ## Control consumption
112
57
 
113
- Large Markdown is ingested in bounded rounds. Inspect pending units and coverage, and resume the
114
- same work; do not wipe the store or resend the whole corpus when only a later round remains.
58
+ Large Markdown is ingested in bounded rounds. Inspect pending units and coverage, and resume the same work; do not wipe the store or resend the whole corpus when only a later round remains.
115
59
 
116
- A budget covers the complete work item, its phases and attempts. Resume retained progress with its
117
- original accounting; do not start a fresh counter to bypass an exhausted limit. Separate initial
118
- indexing, maintenance, consultation and review costs and report actual usage and unknown consumption.
119
- Deterministic reads do not require another model call, although the caller consumes context tokens.
60
+ A budget covers the complete work item, its phases and attempts. Resume retained progress with its original accounting; do not start a fresh counter to bypass an exhausted limit. Separate initial indexing, maintenance, consultation and review costs and report actual usage and unknown consumption. Deterministic reads do not require another model call, although the caller consumes context tokens.
120
61
 
121
- Do not automatically retry semantic disagreements or keep correcting until the model says green.
122
- After a crash, use `recover` to inspect retained work. It must not alter live owners or processes.
123
- An explicit `--acknowledge-uncertain` preserves uncertainty and cost; it does not certify a remote
124
- outcome or authorize an automatic retry. Resume only the intended work with its existing budget.
125
- Use `prune` for obsolete completed work and cached responses when needed; keep unfinished work and
126
- export evidence that must outlive cache retention.
62
+ Do not automatically retry semantic disagreements or keep correcting until the model says green. After a crash, use `recover` to inspect retained work. It must not alter live owners or processes. An explicit `--acknowledge-uncertain` preserves uncertainty and cost; it does not certify a remote outcome or authorize an automatic retry. Resume only the intended work with its existing budget. Use `prune` for obsolete completed work and cached responses when needed; keep unfinished work and export evidence that must outlive cache retention.
127
63
 
128
- Preserve useful results and their limits. At a budget boundary, explain what remains and obtain an
129
- authorized extension before spending more. Existing user authorization remains valid; the skill does
130
- not require another permission question for already authorized work.
64
+ Preserve useful results and their limits. At a budget boundary, explain what remains and obtain an authorized extension before spending more. Existing user authorization remains valid; the skill does not require another permission question for already authorized work.
131
65
 
132
- If maintenance reports `context-limit`, inspect `work.contextLimit` for required documents and bytes.
133
- Restore missing evidence or adjust the context bound, then resume the same task. No extraction call
134
- is spent while its known relationship evidence is unavailable or exceeds that bound.
66
+ If maintenance reports `context-limit`, inspect `work.contextLimit` for required documents and bytes. Restore missing evidence or adjust the context bound, then resume the same task. No extraction call is spent while its known relationship evidence is unavailable or exceeds that bound.