@bodhi-ventures/aiocs 0.1.2 → 0.3.0
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 +122 -3
- package/dist/chunk-GX6CZOO7.js +10429 -0
- package/dist/cli.js +352 -2
- package/dist/mcp-server.js +707 -4
- package/docs/README.md +1 -1
- package/docs/codex-integration.md +65 -18
- package/docs/json-contract.md +446 -3
- package/package.json +23 -20
- package/skills/aiocs/SKILL.md +46 -36
- package/skills/aiocs-curation/SKILL.md +145 -0
- package/sources/nktkas-hyperliquid.yaml +30 -0
- package/dist/chunk-CZ6C4YUX.js +0 -4601
- package/docs/2026-03-26-agent-json-and-daemon-design.md +0 -157
- package/docs/2026-03-28-hybrid-search-design.md +0 -423
- package/docs/superpowers/specs/2026-03-29-tag-driven-release-pipeline-design.md +0 -135
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Local-only documentation fetch, versioning, and search CLI for AI agents.
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
7
7
|
- fetches docs from websites with Playwright
|
|
8
|
+
- snapshots curated external git repositories as shared local reference sources
|
|
8
9
|
- supports authenticated sources via environment-backed headers and cookies
|
|
9
10
|
- runs lightweight canaries to detect source drift before full refreshes
|
|
10
11
|
- normalizes them into Markdown
|
|
@@ -12,6 +13,7 @@ Local-only documentation fetch, versioning, and search CLI for AI agents.
|
|
|
12
13
|
- diffs snapshots to show what changed between fetches
|
|
13
14
|
- indexes heading-aware chunks in SQLite FTS5
|
|
14
15
|
- adds optional hybrid retrieval with local Ollama embeddings and a dedicated Qdrant vector index
|
|
16
|
+
- compiles derived research workspaces into Markdown wiki artifacts with LM Studio
|
|
15
17
|
- links docs sources to local projects for scoped search
|
|
16
18
|
- exports and imports manifest-backed backups for `~/.aiocs`
|
|
17
19
|
|
|
@@ -110,10 +112,21 @@ GitHub Actions publishes `@bodhi-ventures/aiocs` publicly to npm and creates the
|
|
|
110
112
|
|
|
111
113
|
For Codex-first setup, automatic-use guidance, MCP recommendations, and agent definitions, see [docs/codex-integration.md](./docs/codex-integration.md).
|
|
112
114
|
|
|
115
|
+
Canonical Codex setup:
|
|
116
|
+
|
|
117
|
+
- register `aiocs-mcp` in `~/.codex/config.toml`
|
|
118
|
+
- link `skills/aiocs` into `~/.codex/skills/aiocs`
|
|
119
|
+
- link `skills/aiocs-curation` into `~/.codex/skills/aiocs-curation`
|
|
120
|
+
- keep the optional specialist subagent linked only as a fallback for heavier docs workflows
|
|
121
|
+
|
|
113
122
|
## Managed sources
|
|
114
123
|
|
|
115
|
-
The open-source repo bundles
|
|
116
|
-
|
|
124
|
+
The open-source repo bundles both web and git sources in `sources/`:
|
|
125
|
+
|
|
126
|
+
- `hyperliquid` for the public docs site
|
|
127
|
+
- `nktkas-hyperliquid` for the `nktkas/hyperliquid` GitHub repository
|
|
128
|
+
|
|
129
|
+
Additional machine-local source specs belong in `~/.aiocs/sources`.
|
|
117
130
|
|
|
118
131
|
`docs init` bootstraps both managed locations, so source behavior is the same regardless of
|
|
119
132
|
whether a spec lives in the repo or in `~/.aiocs/sources`.
|
|
@@ -170,6 +183,7 @@ Search and inspect results:
|
|
|
170
183
|
|
|
171
184
|
```bash
|
|
172
185
|
docs search "maker flow" --source hyperliquid
|
|
186
|
+
docs search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript
|
|
173
187
|
docs search "maker flow" --source hyperliquid --mode lexical
|
|
174
188
|
docs search "maker flow" --source hyperliquid --mode hybrid
|
|
175
189
|
docs search "maker flow" --source hyperliquid --mode semantic
|
|
@@ -187,6 +201,83 @@ docs verify coverage hyperliquid /absolute/path/to/reference.md
|
|
|
187
201
|
|
|
188
202
|
When `docs search` runs inside a linked project, it automatically scopes to that project's linked sources unless `--source` or `--all` is provided.
|
|
189
203
|
|
|
204
|
+
### Research workspaces
|
|
205
|
+
|
|
206
|
+
`aiocs` can compile a derived workspace wiki on top of canonical source snapshots. Workspace artifacts are stored separately from fetched sources under `~/.aiocs/data/workspaces/<workspace-id>/` and keep provenance links back to source chunks.
|
|
207
|
+
|
|
208
|
+
LM Studio is the v1 compiler runtime. Load `google/gemma-4-26b-a4b` in LM Studio, start the local API server, and make sure `doctor` can see it:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
docs --json doctor
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
If LM Studio is running on a non-default host or model, override:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
export AIOCS_LMSTUDIO_BASE_URL=ws://127.0.0.1:1234
|
|
218
|
+
export AIOCS_LMSTUDIO_MODEL=google/gemma-4-26b-a4b
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
These environment overrides apply at runtime, including for already-created workspaces.
|
|
222
|
+
|
|
223
|
+
Create, bind, compile, and search a workspace:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
docs workspace create market-structure --label "Market Structure" --auto-compile
|
|
227
|
+
docs workspace bind market-structure hyperliquid nktkas-hyperliquid
|
|
228
|
+
docs workspace compile market-structure
|
|
229
|
+
docs workspace status market-structure
|
|
230
|
+
docs workspace queue-run
|
|
231
|
+
docs workspace search market-structure "transport and websocket design" --scope mixed
|
|
232
|
+
docs workspace artifact list market-structure
|
|
233
|
+
docs workspace artifact show market-structure derived/index.md
|
|
234
|
+
docs workspace lint market-structure
|
|
235
|
+
docs workspace output market-structure report --name weekly-brief
|
|
236
|
+
docs workspace output market-structure slides --name weekly-brief
|
|
237
|
+
docs workspace answer market-structure note "What changed in websocket transport?" --name websocket-note
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Workspace compile and maintenance are incremental:
|
|
241
|
+
|
|
242
|
+
- canonical source snapshots remain the source of truth
|
|
243
|
+
- unchanged sources are skipped on later compiles
|
|
244
|
+
- changed sources regenerate only their derived summaries/concepts plus the shared index
|
|
245
|
+
- changed raw inputs regenerate only their derived summaries/concepts plus the shared index
|
|
246
|
+
- compiled artifacts get deterministic graph navigation with outgoing relations and backlinks
|
|
247
|
+
- workspace lint persists durable suggestion artifacts for duplicate concepts, missing articles, and follow-up questions
|
|
248
|
+
- generated reports/slides keep provenance to the bound source snapshots
|
|
249
|
+
- generated notes/reports/slides are marked stale when their inputs change
|
|
250
|
+
|
|
251
|
+
Opt-in automatic recompilation:
|
|
252
|
+
|
|
253
|
+
- set `--auto-compile` when creating the workspace, or later with `docs workspace configure <workspace-id> --auto-compile true`
|
|
254
|
+
- the daemon queues recompiles after bound source refreshes
|
|
255
|
+
- run `docs workspace queue-run` to process queued jobs outside the daemon
|
|
256
|
+
|
|
257
|
+
Workspace-scoped raw ingest:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
docs workspace ingest add market-structure markdown-dir /absolute/path/to/notes --label "Research notes"
|
|
261
|
+
docs workspace ingest add market-structure pdf /absolute/path/to/paper.pdf --label "Paper PDF"
|
|
262
|
+
docs workspace ingest add market-structure image /absolute/path/to/diagram.png --label "Market diagram"
|
|
263
|
+
docs workspace ingest add market-structure csv /absolute/path/to/fills.csv --label "Fills CSV"
|
|
264
|
+
docs workspace ingest add market-structure json /absolute/path/to/manifest.json --label "Research manifest"
|
|
265
|
+
docs workspace ingest add market-structure jsonl /absolute/path/to/events.jsonl --label "Events JSONL"
|
|
266
|
+
docs workspace ingest list market-structure
|
|
267
|
+
docs workspace ingest search market-structure "fee tier" --kind markdown-dir
|
|
268
|
+
docs workspace ingest show market-structure markdown-dir-notes-<hash>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Obsidian sync:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
docs workspace sync obsidian market-structure /absolute/path/to/obsidian-vault
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
The workspace is synced under `aiocs/<workspace-id>/` by default so the raw, derived, and output trees stay grouped inside the vault.
|
|
278
|
+
|
|
279
|
+
If any bound source snapshot changes, rerun `docs workspace compile <workspace-id>` before `docs workspace output ...`. Output generation fails closed when required derived artifacts are stale.
|
|
280
|
+
|
|
190
281
|
For agents, the intended decision order is:
|
|
191
282
|
|
|
192
283
|
1. check `source list` or scoped `search` first
|
|
@@ -194,6 +285,34 @@ For agents, the intended decision order is:
|
|
|
194
285
|
3. if the source is missing but worth reusing, add a spec under `~/.aiocs/sources`, then upsert and refresh only that source
|
|
195
286
|
4. avoid `fetch all` unless the user explicitly asks or the daemon is doing maintenance
|
|
196
287
|
|
|
288
|
+
### Git repo sources
|
|
289
|
+
|
|
290
|
+
`aiocs` supports first-class `kind: git` sources for curated external repositories that should be
|
|
291
|
+
reused across multiple local projects.
|
|
292
|
+
|
|
293
|
+
Example:
|
|
294
|
+
|
|
295
|
+
```yaml
|
|
296
|
+
kind: git
|
|
297
|
+
id: nktkas-hyperliquid
|
|
298
|
+
label: nktkas/hyperliquid Repo
|
|
299
|
+
repo:
|
|
300
|
+
url: https://github.com/nktkas/hyperliquid.git
|
|
301
|
+
ref: main
|
|
302
|
+
include:
|
|
303
|
+
- README.md
|
|
304
|
+
- docs/**
|
|
305
|
+
- src/**
|
|
306
|
+
exclude:
|
|
307
|
+
- .github/**
|
|
308
|
+
- dist/**
|
|
309
|
+
schedule:
|
|
310
|
+
everyHours: 24
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Git source snapshots are commit-based, stored under the shared local catalog, and searchable with
|
|
314
|
+
the same project linking, diffing, canary, and hybrid search flows as website docs.
|
|
315
|
+
|
|
197
316
|
### Hybrid search
|
|
198
317
|
|
|
199
318
|
`aiocs` keeps SQLite FTS5/BM25 as the canonical lexical index and adds an optional hybrid layer:
|
|
@@ -409,7 +528,7 @@ The repo ships two GitHub Actions workflows:
|
|
|
409
528
|
- [ci.yml](./.github/workflows/ci.yml): validation for lint, tests, build, pack, and Docker smoke coverage
|
|
410
529
|
- [release.yml](./.github/workflows/release.yml): tag-driven stable release flow that validates the tagged package state, publishes to npm, and creates a GitHub release
|
|
411
530
|
|
|
412
|
-
The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects
|
|
531
|
+
The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects an npm publish token in GitHub repository secrets. The release job is retryable: if `@bodhi-ventures/aiocs@X.Y.Z` already exists on npm or the GitHub release already exists for `vX.Y.Z`, the workflow skips the completed publication step and finishes the remaining one.
|
|
413
532
|
|
|
414
533
|
Successful MCP results use an envelope:
|
|
415
534
|
|