rigjs 4.0.6 → 4.0.7
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/.claude/skills/rig-wiki/SKILL.md +33 -26
- package/RIG_WIKI_SKILL.md +33 -26
- package/built/index.js +159 -159
- package/lib/wiki/index.ts +2 -2
- package/lib/wiki/init.ts +103 -50
- package/package.json +2 -2
|
@@ -15,15 +15,17 @@ metadata:
|
|
|
15
15
|
|
|
16
16
|
**Positioning.** rig wiki is an **agent-facing tool**. Humans don't memorise the CLI; they tell their agent (you) what they want, and you orchestrate `rig wiki *`. Treat any direct user-typed `rig wiki ...` invocation as a fallback — your job is to make raw CLI use unnecessary. Never just hand the user a command and walk away; run it, observe, report.
|
|
17
17
|
|
|
18
|
-
## Vault
|
|
18
|
+
## Vault model — one fixed dir per project
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
A vault is **a single `rig-wiki/` dir at the project root** holding metadata (purpose.md, schema.md, page tree, `.rig/config.yml`). The project root itself is the conceptual "vault" — `rig-wiki/` is just the metadata subdir living inside it, named `rig-wiki/` by convention. User-authored data (`personal/`, `research/`, etc.) lives in sibling dirs and is NEVER touched.
|
|
21
|
+
|
|
22
|
+
- **The scope** — which sibling data dir(s) the wiki actually ingests — is recorded in `<rig-wiki>/.rig/config.yml` (`name`, `root`, `include`).
|
|
23
|
+
- **Discovery is automatic.** Any `rig wiki *` command walks up from CWD; at each level it checks both `<dir>/.rig/config.yml` (you're inside the vault) and `<dir>/rig-wiki/.rig/config.yml` (you're at the project root). So `cd` anywhere inside the project works.
|
|
21
24
|
|
|
22
25
|
This means:
|
|
23
|
-
- **Always `cd` into the project first.** If the user is in some other CWD, change directory before running any `rig wiki *` command.
|
|
24
26
|
- **No `--wiki <name>` flag exists.** Don't try to pass one.
|
|
25
27
|
- **No `rig wiki list`, `register`, or `unregister` commands.** They've been removed.
|
|
26
|
-
- If the user is in a project that has no vault, the next step is `rig wiki init <
|
|
28
|
+
- If the user is in a project that has no vault, the next step is `rig wiki init <scope>` (see "Setup" below).
|
|
27
29
|
|
|
28
30
|
## Intent → command map
|
|
29
31
|
|
|
@@ -42,31 +44,35 @@ This means:
|
|
|
42
44
|
## Vault layout (flat — no inner `wiki/` subdir)
|
|
43
45
|
|
|
44
46
|
```
|
|
45
|
-
<vault
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
<project>/ ← the conceptual vault (e.g. overmind/)
|
|
48
|
+
rig-wiki/ ← fixed metadata-dir name; created by `rig wiki init`
|
|
49
|
+
purpose.md ← human-authored, never write
|
|
50
|
+
schema.md ← human-authored, never write
|
|
51
|
+
index.md ← LLM-writable
|
|
52
|
+
overview.md ← LLM-writable
|
|
53
|
+
log.md ← append-only LLM log
|
|
54
|
+
reviews.md ← LLM-writable backlog of human-review items
|
|
55
|
+
raw/ ← immutable source files (never edit existing)
|
|
56
|
+
sources/ ← one .md per ingested source — page tree at vault root
|
|
57
|
+
entities/
|
|
58
|
+
concepts/
|
|
59
|
+
synthesis/
|
|
60
|
+
queries/
|
|
61
|
+
.rig/config.yml ← per-vault settings (name, root, include, exclude, …)
|
|
62
|
+
.gitignore
|
|
63
|
+
personal/ ← user-authored data — scope target (NEVER touched)
|
|
64
|
+
research/ ← (other sibling data dirs)
|
|
65
|
+
...
|
|
60
66
|
```
|
|
61
67
|
|
|
62
|
-
Note:
|
|
68
|
+
Note: page directories (`sources/`, `entities/`, `concepts/`, `synthesis/`, `queries/`) live directly under `rig-wiki/` — no nested `wiki/` subdir.
|
|
63
69
|
|
|
64
70
|
## Argument inference rules
|
|
65
71
|
|
|
66
72
|
- **slug** = kebab-case, no dates in page filenames; dates only on `raw/YYYY-MM-DD-*` prefix.
|
|
67
73
|
- **raw filename** = `YYYY-MM-DD-<slug>.md`. Pick today's local date; if filename collides, append `-2`, `-3`.
|
|
68
74
|
- **URL → slug**: last path segment, drop extension, lowercase, replace non-`[a-z0-9-]` with `-`, max 64 chars.
|
|
69
|
-
-
|
|
75
|
+
- **`rig wiki init <scope>` arg** is a data subdir NAME, not a path to create. Examples: `rig wiki init personal` (scopes to `./personal/`), `rig wiki init research`. The vault metadata dir is always `./rig-wiki/`. Never pass a path like `rig-wiki` — that's the metadata dir, not the scope.
|
|
70
76
|
|
|
71
77
|
## Hard rules — refuse and explain if violated
|
|
72
78
|
|
|
@@ -113,19 +119,20 @@ What you DO need to put in `exclude` are content-type filters the user cares abo
|
|
|
113
119
|
|
|
114
120
|
## Setup — if no vault is found
|
|
115
121
|
|
|
116
|
-
`rig wiki scan` (or any command) reports `No rig wiki vault found.` → ask the user **once**
|
|
122
|
+
`rig wiki scan` (or any command) reports `No rig wiki vault found.` → ask the user **once** which sibling data dir to scope this wiki to (don't guess silently):
|
|
117
123
|
|
|
118
|
-
> "No vault here.
|
|
124
|
+
> "No vault here. Which subdir should this wiki ingest from — `personal/`, `research/`, …?"
|
|
119
125
|
|
|
120
126
|
Then orchestrate without further prompting:
|
|
121
127
|
|
|
122
128
|
```bash
|
|
123
|
-
|
|
129
|
+
cd <project> # the root that contains the scope dir
|
|
130
|
+
rig wiki init <scope> # e.g. `rig wiki init personal` → creates ./rig-wiki/, scope = ./personal/
|
|
124
131
|
```
|
|
125
132
|
|
|
126
|
-
After init, **pause and ask the user to edit `<
|
|
133
|
+
After init, **pause and ask the user to edit `<project>/rig-wiki/purpose.md`** (one-time human scoping — define what this wiki is for, in/out of scope). Don't write purpose.md yourself; it's the only human-authored anchor for everything downstream.
|
|
127
134
|
|
|
128
|
-
If the user
|
|
135
|
+
If the user wants finer scoping than a single subdir (e.g. "ingest `personal/` but ignore zip files"), translate that into edits to `<project>/rig-wiki/.rig/config.yml`. Fields: `name`, `root` (relative scan base, default `../<scope>`), `include[]`, `exclude[]`, `schedule`, `ingestRules`. Everything about the vault lives in that dir — nothing leaks outside.
|
|
129
136
|
|
|
130
137
|
## Configuration files
|
|
131
138
|
|
package/RIG_WIKI_SKILL.md
CHANGED
|
@@ -15,15 +15,17 @@ metadata:
|
|
|
15
15
|
|
|
16
16
|
**Positioning.** rig wiki is an **agent-facing tool**. Humans don't memorise the CLI; they tell their agent (you) what they want, and you orchestrate `rig wiki *`. Treat any direct user-typed `rig wiki ...` invocation as a fallback — your job is to make raw CLI use unnecessary. Never just hand the user a command and walk away; run it, observe, report.
|
|
17
17
|
|
|
18
|
-
## Vault
|
|
18
|
+
## Vault model — one fixed dir per project
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
A vault is **a single `rig-wiki/` dir at the project root** holding metadata (purpose.md, schema.md, page tree, `.rig/config.yml`). The project root itself is the conceptual "vault" — `rig-wiki/` is just the metadata subdir living inside it, named `rig-wiki/` by convention. User-authored data (`personal/`, `research/`, etc.) lives in sibling dirs and is NEVER touched.
|
|
21
|
+
|
|
22
|
+
- **The scope** — which sibling data dir(s) the wiki actually ingests — is recorded in `<rig-wiki>/.rig/config.yml` (`name`, `root`, `include`).
|
|
23
|
+
- **Discovery is automatic.** Any `rig wiki *` command walks up from CWD; at each level it checks both `<dir>/.rig/config.yml` (you're inside the vault) and `<dir>/rig-wiki/.rig/config.yml` (you're at the project root). So `cd` anywhere inside the project works.
|
|
21
24
|
|
|
22
25
|
This means:
|
|
23
|
-
- **Always `cd` into the project first.** If the user is in some other CWD, change directory before running any `rig wiki *` command.
|
|
24
26
|
- **No `--wiki <name>` flag exists.** Don't try to pass one.
|
|
25
27
|
- **No `rig wiki list`, `register`, or `unregister` commands.** They've been removed.
|
|
26
|
-
- If the user is in a project that has no vault, the next step is `rig wiki init <
|
|
28
|
+
- If the user is in a project that has no vault, the next step is `rig wiki init <scope>` (see "Setup" below).
|
|
27
29
|
|
|
28
30
|
## Intent → command map
|
|
29
31
|
|
|
@@ -42,31 +44,35 @@ This means:
|
|
|
42
44
|
## Vault layout (flat — no inner `wiki/` subdir)
|
|
43
45
|
|
|
44
46
|
```
|
|
45
|
-
<vault
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
<project>/ ← the conceptual vault (e.g. overmind/)
|
|
48
|
+
rig-wiki/ ← fixed metadata-dir name; created by `rig wiki init`
|
|
49
|
+
purpose.md ← human-authored, never write
|
|
50
|
+
schema.md ← human-authored, never write
|
|
51
|
+
index.md ← LLM-writable
|
|
52
|
+
overview.md ← LLM-writable
|
|
53
|
+
log.md ← append-only LLM log
|
|
54
|
+
reviews.md ← LLM-writable backlog of human-review items
|
|
55
|
+
raw/ ← immutable source files (never edit existing)
|
|
56
|
+
sources/ ← one .md per ingested source — page tree at vault root
|
|
57
|
+
entities/
|
|
58
|
+
concepts/
|
|
59
|
+
synthesis/
|
|
60
|
+
queries/
|
|
61
|
+
.rig/config.yml ← per-vault settings (name, root, include, exclude, …)
|
|
62
|
+
.gitignore
|
|
63
|
+
personal/ ← user-authored data — scope target (NEVER touched)
|
|
64
|
+
research/ ← (other sibling data dirs)
|
|
65
|
+
...
|
|
60
66
|
```
|
|
61
67
|
|
|
62
|
-
Note:
|
|
68
|
+
Note: page directories (`sources/`, `entities/`, `concepts/`, `synthesis/`, `queries/`) live directly under `rig-wiki/` — no nested `wiki/` subdir.
|
|
63
69
|
|
|
64
70
|
## Argument inference rules
|
|
65
71
|
|
|
66
72
|
- **slug** = kebab-case, no dates in page filenames; dates only on `raw/YYYY-MM-DD-*` prefix.
|
|
67
73
|
- **raw filename** = `YYYY-MM-DD-<slug>.md`. Pick today's local date; if filename collides, append `-2`, `-3`.
|
|
68
74
|
- **URL → slug**: last path segment, drop extension, lowercase, replace non-`[a-z0-9-]` with `-`, max 64 chars.
|
|
69
|
-
-
|
|
75
|
+
- **`rig wiki init <scope>` arg** is a data subdir NAME, not a path to create. Examples: `rig wiki init personal` (scopes to `./personal/`), `rig wiki init research`. The vault metadata dir is always `./rig-wiki/`. Never pass a path like `rig-wiki` — that's the metadata dir, not the scope.
|
|
70
76
|
|
|
71
77
|
## Hard rules — refuse and explain if violated
|
|
72
78
|
|
|
@@ -113,19 +119,20 @@ What you DO need to put in `exclude` are content-type filters the user cares abo
|
|
|
113
119
|
|
|
114
120
|
## Setup — if no vault is found
|
|
115
121
|
|
|
116
|
-
`rig wiki scan` (or any command) reports `No rig wiki vault found.` → ask the user **once**
|
|
122
|
+
`rig wiki scan` (or any command) reports `No rig wiki vault found.` → ask the user **once** which sibling data dir to scope this wiki to (don't guess silently):
|
|
117
123
|
|
|
118
|
-
> "No vault here.
|
|
124
|
+
> "No vault here. Which subdir should this wiki ingest from — `personal/`, `research/`, …?"
|
|
119
125
|
|
|
120
126
|
Then orchestrate without further prompting:
|
|
121
127
|
|
|
122
128
|
```bash
|
|
123
|
-
|
|
129
|
+
cd <project> # the root that contains the scope dir
|
|
130
|
+
rig wiki init <scope> # e.g. `rig wiki init personal` → creates ./rig-wiki/, scope = ./personal/
|
|
124
131
|
```
|
|
125
132
|
|
|
126
|
-
After init, **pause and ask the user to edit `<
|
|
133
|
+
After init, **pause and ask the user to edit `<project>/rig-wiki/purpose.md`** (one-time human scoping — define what this wiki is for, in/out of scope). Don't write purpose.md yourself; it's the only human-authored anchor for everything downstream.
|
|
127
134
|
|
|
128
|
-
If the user
|
|
135
|
+
If the user wants finer scoping than a single subdir (e.g. "ingest `personal/` but ignore zip files"), translate that into edits to `<project>/rig-wiki/.rig/config.yml`. Fields: `name`, `root` (relative scan base, default `../<scope>`), `include[]`, `exclude[]`, `schedule`, `ingestRules`. Everything about the vault lives in that dir — nothing leaks outside.
|
|
129
136
|
|
|
130
137
|
## Configuration files
|
|
131
138
|
|