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.
@@ -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 discovery (no registry)
18
+ ## Vault model one fixed dir per project
19
19
 
20
- There is **no global registry**. The active vault is resolved by walking up from the current working directory looking for a `.rig/config.yml`. The directory that contains that file IS the vault.
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 <subdir>` (see "Setup" below).
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
- purpose.md human-authored, never write
47
- schema.md ← human-authored, never write
48
- index.md LLM-writable
49
- overview.md ← LLM-writable
50
- log.md append-only LLM log
51
- reviews.md LLM-writable backlog of human-review items
52
- raw/ immutable source files (never edit existing)
53
- sources/ one .md per ingested source page tree at vault root
54
- entities/
55
- concepts/
56
- synthesis/
57
- queries/
58
- .rig/config.yml ← per-vault settings (name, root, include, exclude, …)
59
- .gitignore
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: there is no `<vault>/wiki/` subdirectory. Page directories (`sources/`, `entities/`, `concepts/`, `synthesis/`, `queries/`) live directly under the vault root.
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
- - **Default vault dir name** when the user says "init a vault / make a wiki here" without specifying: suggest `rig-wiki` at the project root. Never default silentlyconfirm the name once.
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** (don't list multiple defaults; pick one suggestion and confirm):
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. Want me to init one as `rig-wiki/` at the project root? (or pick another path)"
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
- rig wiki init rig-wiki # creates <project>/rig-wiki/ with templates + .rig/config.yml
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 `<vault>/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.
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 describes a scan scope that differs from the defaults (e.g. "include every md file in `personal/` but ignore zip files"), translate that into edits to `<vault>/.rig/config.yml`. Fields: `name`, optional `root` (relative scan base, default `..`), `include[]`, `exclude[]`, `schedule`, `ingestRules`. The vault is self-contained nothing about its identity or scope lives outside its own directory.
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 discovery (no registry)
18
+ ## Vault model one fixed dir per project
19
19
 
20
- There is **no global registry**. The active vault is resolved by walking up from the current working directory looking for a `.rig/config.yml`. The directory that contains that file IS the vault.
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 <subdir>` (see "Setup" below).
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
- purpose.md human-authored, never write
47
- schema.md ← human-authored, never write
48
- index.md LLM-writable
49
- overview.md ← LLM-writable
50
- log.md append-only LLM log
51
- reviews.md LLM-writable backlog of human-review items
52
- raw/ immutable source files (never edit existing)
53
- sources/ one .md per ingested source page tree at vault root
54
- entities/
55
- concepts/
56
- synthesis/
57
- queries/
58
- .rig/config.yml ← per-vault settings (name, root, include, exclude, …)
59
- .gitignore
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: there is no `<vault>/wiki/` subdirectory. Page directories (`sources/`, `entities/`, `concepts/`, `synthesis/`, `queries/`) live directly under the vault root.
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
- - **Default vault dir name** when the user says "init a vault / make a wiki here" without specifying: suggest `rig-wiki` at the project root. Never default silentlyconfirm the name once.
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** (don't list multiple defaults; pick one suggestion and confirm):
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. Want me to init one as `rig-wiki/` at the project root? (or pick another path)"
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
- rig wiki init rig-wiki # creates <project>/rig-wiki/ with templates + .rig/config.yml
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 `<vault>/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.
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 describes a scan scope that differs from the defaults (e.g. "include every md file in `personal/` but ignore zip files"), translate that into edits to `<vault>/.rig/config.yml`. Fields: `name`, optional `root` (relative scan base, default `..`), `include[]`, `exclude[]`, `schedule`, `ingestRules`. The vault is self-contained nothing about its identity or scope lives outside its own directory.
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