sdtk-brain-kit 0.1.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 +66 -0
- package/assets/atlas/doc_atlas_viewer_template.html +4868 -0
- package/assets/atlas/vendor/mermaid.min.js +2029 -0
- package/bin/sdtk-brain.js +88 -0
- package/package.json +28 -0
- package/scripts/brain-smoke.test.js +19 -0
- package/scripts/sync-shared-assets.js +24 -0
- package/src/commands/enrich.js +55 -0
- package/src/commands/init.js +108 -0
- package/src/commands/lint.js +50 -0
- package/src/commands/open.js +59 -0
- package/src/commands/operations.js +357 -0
- package/src/commands/search.js +94 -0
- package/src/commands/status.js +56 -0
- package/src/lib/args.js +76 -0
- package/src/lib/browser-open.js +32 -0
- package/src/lib/errors.js +29 -0
- package/src/lib/wiki-build.js +1101 -0
- package/src/lib/wiki-compile.js +2108 -0
- package/src/lib/wiki-discover.js +271 -0
- package/src/lib/wiki-enrich.js +264 -0
- package/src/lib/wiki-extract.js +1313 -0
- package/src/lib/wiki-flags.js +97 -0
- package/src/lib/wiki-ingest.js +198 -0
- package/src/lib/wiki-lint.js +930 -0
- package/src/lib/wiki-paths.js +256 -0
- package/src/lib/wiki-score.js +64 -0
- package/src/lib/wiki-search.js +213 -0
- package/templates/VAULT_CLAUDE.md +39 -0
- package/templates/VAULT_README.md +18 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# sdtk-brain-kit
|
|
2
|
+
|
|
3
|
+
`sdtk-brain` is a **standalone, local-first second-brain vault CLI**. One job:
|
|
4
|
+
turn a folder of immutable sources (`raw/`) into a compiled markdown knowledge
|
|
5
|
+
layer (`wiki/`) that you — and your AI agent — can search, lint, and browse as
|
|
6
|
+
a graph. The agent reading the vault (per its `CLAUDE.md` contract) is the
|
|
7
|
+
knowledge engine; this CLI provides the deterministic rails only.
|
|
8
|
+
|
|
9
|
+
Package version in this source snapshot: `0.1.0`
|
|
10
|
+
CLI command: `sdtk-brain`
|
|
11
|
+
|
|
12
|
+
Standalone by design: not part of the `sdtk-kit` umbrella, installs no agent
|
|
13
|
+
skills, makes no network calls, needs no entitlement. It shares its graph
|
|
14
|
+
builder and viewer with SDTK-WIKI at build time (byte-identity is CI-guarded).
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g sdtk-brain-kit
|
|
20
|
+
sdtk-brain --version
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
mkdir my-vault && cd my-vault
|
|
27
|
+
sdtk-brain init # raw/ + wiki/ + workspace/ + CLAUDE.md
|
|
28
|
+
cp ~/some-article.md raw/inbox/
|
|
29
|
+
sdtk-brain ingest raw/inbox
|
|
30
|
+
sdtk-brain compile --mode safe --apply
|
|
31
|
+
sdtk-brain search "topic"
|
|
32
|
+
sdtk-brain open # docs view + graph view (self-contained HTML)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
sdtk-brain init [--vault <path>] scaffold a vault (refuses non-empty non-vault targets)
|
|
39
|
+
sdtk-brain ingest <file|dir> semantic extraction over raw sources (report-first)
|
|
40
|
+
sdtk-brain compile --mode safe [--apply] compile extraction into wiki/ pages
|
|
41
|
+
sdtk-brain search [--json] "<q>" deterministic search over the vault wiki
|
|
42
|
+
sdtk-brain lint | maintain report-first hygiene (orphans, links, stale, contradictions)
|
|
43
|
+
sdtk-brain discover --plan gap-analysis plan
|
|
44
|
+
sdtk-brain enrich --source github --mode review review-only external repo metadata
|
|
45
|
+
sdtk-brain open [--no-open] build + open the graph viewer
|
|
46
|
+
sdtk-brain status vault status
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
There is deliberately **no `ask` command**: open the vault in your agent (or
|
|
50
|
+
Obsidian) and ask there — grounded synthesis is the agent's job.
|
|
51
|
+
|
|
52
|
+
## Vault layout
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
raw/ immutable sources (inbox, articles, papers, repos, notes, meetings, archive)
|
|
56
|
+
wiki/ compiled knowledge (sources, concepts, entities, comparisons, syntheses, …)
|
|
57
|
+
workspace/ scratch
|
|
58
|
+
CLAUDE.md the agent operating contract
|
|
59
|
+
.brain/ machine state (reports, graph, provenance) — never edit by hand
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Boundaries
|
|
63
|
+
|
|
64
|
+
- 100% local: no LLM, no network, no telemetry, no entitlement
|
|
65
|
+
- never mutates `raw/` content; `.brain/` is CLI-owned machine state
|
|
66
|
+
- a vault is a standalone folder — `init` refuses non-empty non-vault targets
|