@codecell-germany/company-agent-wiki-skill 0.1.0 → 0.1.2
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 +130 -135
- package/dist/index.js +507 -91
- package/dist/installer.js +2 -1
- package/knowledge/ARCHITECTURE.md +19 -1
- package/knowledge/KNOWN_LIMITATIONS.md +3 -1
- package/knowledge/RELEASE_CHECKLIST.md +19 -0
- package/package.json +1 -1
- package/skills/company-agent-wiki-cli/SKILL.md +22 -7
- package/skills/company-agent-wiki-cli/references/agent-onboarding.md +7 -0
- package/skills/company-agent-wiki-cli/references/command-cheatsheet.md +6 -0
- package/skills/company-agent-wiki-cli/references/overview.md +11 -7
- package/skills/company-agent-wiki-cli/references/workspace-first-run.md +12 -1
package/dist/installer.js
CHANGED
|
@@ -3473,7 +3473,7 @@ var {
|
|
|
3473
3473
|
var CLI_NAME = "company-agent-wiki-cli";
|
|
3474
3474
|
var INSTALLER_NAME = "company-agent-wiki-skill";
|
|
3475
3475
|
var SKILL_NAME = "company-agent-wiki-cli";
|
|
3476
|
-
var CLI_SCHEMA_VERSION = "2026-04-
|
|
3476
|
+
var CLI_SCHEMA_VERSION = "2026-04-13";
|
|
3477
3477
|
var EXIT_CODES = {
|
|
3478
3478
|
ok: 0,
|
|
3479
3479
|
usage: 1,
|
|
@@ -3484,6 +3484,7 @@ var EXIT_CODES = {
|
|
|
3484
3484
|
notFound: 6,
|
|
3485
3485
|
git: 7,
|
|
3486
3486
|
sqliteLocked: 8,
|
|
3487
|
+
workspaceBusy: 9,
|
|
3487
3488
|
runtime: 10
|
|
3488
3489
|
};
|
|
3489
3490
|
|
|
@@ -45,7 +45,8 @@ The index and manifest are derived artifacts and should stay ignored in the priv
|
|
|
45
45
|
7. `read --metadata --headings` supports a metadata-first retrieval pass before the full Markdown is loaded.
|
|
46
46
|
8. `search`, `route` and `read` either enforce a fresh index or can explicitly auto-rebuild when `--auto-rebuild` is set.
|
|
47
47
|
9. Runtime commands may detect the current workspace automatically when the shell is already inside a private workspace.
|
|
48
|
-
10.
|
|
48
|
+
10. A global per-user workspace registry stores known workspace paths and a default workspace so other agents can resolve the knowledge location automatically on macOS, Windows and Linux.
|
|
49
|
+
11. `serve` exposes the same read-only data through a local web view and now distinguishes `missing`, `stale` and `ok` states with a rebuild action.
|
|
49
50
|
|
|
50
51
|
## Onboarding Model
|
|
51
52
|
|
|
@@ -73,6 +74,8 @@ Reads are pinned to the latest successful `build_id`. If current root snapshots
|
|
|
73
74
|
|
|
74
75
|
The SQLite runtime also uses a busy timeout and returns a specific `SQLITE_LOCKED` error for transient contention instead of surfacing a generic runtime failure.
|
|
75
76
|
|
|
77
|
+
Phase 1 now also adds a workspace-local write lock. The lock serializes rebuilds and other write flows per workspace, while parallel readers continue against the current derived index.
|
|
78
|
+
|
|
76
79
|
## Metadata-First Retrieval
|
|
77
80
|
|
|
78
81
|
Phase 1 now explicitly supports a two-step retrieval model:
|
|
@@ -82,6 +85,21 @@ Phase 1 now explicitly supports a two-step retrieval model:
|
|
|
82
85
|
|
|
83
86
|
This keeps the agent loop lighter and encourages stronger filenames plus front matter without forcing a rigid folder taxonomy.
|
|
84
87
|
|
|
88
|
+
## Global Workspace Discovery
|
|
89
|
+
|
|
90
|
+
Phase 1 now persists workspace discovery outside the private workspace itself:
|
|
91
|
+
|
|
92
|
+
- macOS: `~/Library/Application Support/company-agent-wiki/workspaces.json`
|
|
93
|
+
- Windows: `%APPDATA%\\company-agent-wiki\\workspaces.json`
|
|
94
|
+
- Linux: `${XDG_CONFIG_HOME:-~/.config}/company-agent-wiki/workspaces.json`
|
|
95
|
+
|
|
96
|
+
The registry stores known workspace paths plus a default workspace. `setup workspace` registers the workspace automatically. Runtime commands prefer:
|
|
97
|
+
|
|
98
|
+
1. explicit `--workspace`
|
|
99
|
+
2. current-directory detection
|
|
100
|
+
3. global default workspace
|
|
101
|
+
4. the single registered workspace, if exactly one exists
|
|
102
|
+
|
|
85
103
|
## Git Model
|
|
86
104
|
|
|
87
105
|
Phase 1 uses Git for:
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
- Auto-rebuild is opt-in. Without `--auto-rebuild`, stale or missing indexes still block retrieval on purpose.
|
|
16
16
|
- Search quality depends on document structure and heading hygiene in the source Markdown.
|
|
17
17
|
- Front-matter filters are currently focused on common fields such as `type`, `status`, `tags`, `project`, `department`, `owners` and `systems`; there is not yet a generic arbitrary-field query language.
|
|
18
|
-
-
|
|
18
|
+
- Parallel reads are supported, but there is still only one active write path per workspace at a time.
|
|
19
|
+
- Long-running rebuilds can delay later auto-rebuild requests because they queue behind the same workspace lock.
|
|
19
20
|
- Search JSON now exposes a normalized `score` plus `rawScore`; the normalized value is better for agents, but it is still only a ranking aid, not a calibrated relevance percentage.
|
|
20
21
|
|
|
21
22
|
## Git Model
|
|
@@ -28,3 +29,4 @@
|
|
|
28
29
|
|
|
29
30
|
- The CLI can initialize a private Git remote URL, but it does not validate remote policy or access controls.
|
|
30
31
|
- The package does not enforce OS-level filesystem permissions; the workspace owner must place the private workspace in a properly protected location.
|
|
32
|
+
- The global workspace registry is only a discovery layer, not an access-control boundary. Any agent running as the same local user can read the registered workspace path.
|
|
@@ -118,6 +118,25 @@ npm_config_cache="$CACHE" npx -y @codecell-germany/company-agent-wiki-skill@0.1.
|
|
|
118
118
|
"$TMP/codex/bin/company-agent-wiki-cli" --help
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
+
Falls `npm view` direkt nach dem Publish kurzfristig noch `404` liefert, zusätzlich die Registry-Tarball-URL prüfen und daraus den Install-Smoke fahren:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
curl -I https://registry.npmjs.org/@codecell-germany/company-agent-wiki-skill/-/company-agent-wiki-skill-0.1.0.tgz
|
|
125
|
+
TMP="$(mktemp -d)"
|
|
126
|
+
cd "$TMP"
|
|
127
|
+
npx -y -p https://registry.npmjs.org/@codecell-germany/company-agent-wiki-skill/-/company-agent-wiki-skill-0.1.0.tgz company-agent-wiki-cli --help
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Praktisches Learning aus diesem Release:
|
|
131
|
+
|
|
132
|
+
- `npm dist-tag ls` und die direkte Tarball-URL können bereits korrekt funktionieren, während `npm view` bzw. die Packument-Auflösung noch kurz hinterherhinkt.
|
|
133
|
+
- Für die Veröffentlichungsfreigabe reicht deshalb im Zweifel:
|
|
134
|
+
- erfolgreicher `npm publish`
|
|
135
|
+
- `npm access get status <package>` = `public`
|
|
136
|
+
- `npm dist-tag ls <package>` zeigt `latest`
|
|
137
|
+
- Tarball-URL liefert `200`
|
|
138
|
+
- CLI-/Installer-Smoke direkt von der Tarball-URL funktioniert
|
|
139
|
+
|
|
121
140
|
## skills.sh Verification
|
|
122
141
|
|
|
123
142
|
Nach GitHub-Publish:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecell-germany/company-agent-wiki-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Context is king: agent-first local company knowledge workspace with metadata-first retrieval, Markdown as truth, SQLite-indexed front matter, Git-aware verification, and a Codex skill installer.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,17 +17,18 @@ Use this skill when the task is about a private company knowledge workspace buil
|
|
|
17
17
|
- The public CLI binary is `company-agent-wiki-cli`.
|
|
18
18
|
- The actual company knowledge workspace is private and lives outside the public code repository.
|
|
19
19
|
- The private workspace may be the current dedicated local folder; it just must not be the public skill/CLI repo.
|
|
20
|
-
- The human should provide the workspace path and, if desired, the private Git remote URL.
|
|
20
|
+
- The human should provide the workspace path at least once and, if desired, the private Git remote URL. After setup or manual registration, the CLI stores the workspace path in a global per-user registry so later agents can resolve it automatically.
|
|
21
21
|
- Runtime discovery matters. Before relying on the CLI, verify which path is actually available.
|
|
22
22
|
- In Codex, the most reliable fallback is usually the installed shim under `$CODEX_HOME/bin` or `~/.codex/bin`.
|
|
23
|
-
- The `npx -p @codecell-germany/company-agent-wiki-skill
|
|
23
|
+
- The preferred one-command installer path is `npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force`. This only works after the npm package is really published.
|
|
24
24
|
- `node dist/index.js` only works inside the public implementation repo after `npm run build`, not inside an arbitrary private workspace.
|
|
25
25
|
- If the binary is not already installed in PATH, use these fallbacks in this order:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
29
29
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
30
|
-
|
|
30
|
+
company-agent-wiki-cli --help
|
|
31
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
31
32
|
node dist/index.js --help
|
|
32
33
|
```
|
|
33
34
|
|
|
@@ -46,10 +47,10 @@ If that fails, try the PATH binary as a convenience fallback:
|
|
|
46
47
|
company-agent-wiki-cli --help
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
If the CLI is not installed yet and the package is already published, install it with one command:
|
|
50
51
|
|
|
51
52
|
```bash
|
|
52
|
-
npx -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-
|
|
53
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
2. If no private workspace exists yet, create one:
|
|
@@ -58,7 +59,15 @@ npx -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-cli --help
|
|
|
58
59
|
company-agent-wiki-cli setup workspace --workspace /absolute/path/to/private-company-knowledge --git-init
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
This creates starter Markdown documents by default. Use `--no-starter-docs` only when you explicitly want a nearly empty workspace.
|
|
62
|
+
This creates starter Markdown documents by default and registers the workspace globally for future agents. Use `--no-starter-docs` only when you explicitly want a nearly empty workspace.
|
|
63
|
+
|
|
64
|
+
If the workspace already exists, inspect or register it explicitly:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
company-agent-wiki-cli workspace current --json
|
|
68
|
+
company-agent-wiki-cli workspace list --json
|
|
69
|
+
company-agent-wiki-cli workspace register --workspace /absolute/path/to/private-company-knowledge --default --json
|
|
70
|
+
```
|
|
62
71
|
|
|
63
72
|
3. Run health checks:
|
|
64
73
|
|
|
@@ -234,13 +243,19 @@ company-agent-wiki-cli onboarding company \
|
|
|
234
243
|
- The local SQLite file lives in the workspace, but should stay out of Git by default.
|
|
235
244
|
- If the CLI reports `INDEX_STALE`, do not ignore it. Run `index rebuild` or use an explicit `--auto-rebuild` path.
|
|
236
245
|
- For agent workflows, prefer `--auto-rebuild` on `search`, `route`, `read` and `serve` unless you explicitly want strict stale-index failures.
|
|
237
|
-
-
|
|
246
|
+
- Parallel `search`, `route`, `read`, `history` and `diff` calls against the same workspace are now intended to work.
|
|
247
|
+
- Write paths are serialized per workspace. If one agent is rebuilding the index or applying onboarding writes, other write paths wait behind that workspace lock instead of colliding.
|
|
238
248
|
- Do not put private company knowledge into the public code repository.
|
|
239
249
|
- Use the read-only web view only for browsing, not editing.
|
|
240
250
|
- The company onboarding questionnaire is optional. Every answer may be skipped, answered with “nein” or marked as unknown.
|
|
241
251
|
- Onboarding writes are explicit. Do not assume preview mode changes files; only `--execute` writes draft onboarding Markdown and rebuilds the derived index.
|
|
242
252
|
- If CLI discovery fails, do not pretend the documented command works. First resolve a real executable path.
|
|
243
253
|
- If the current folder already contains `.company-agent-wiki/workspace.json`, you may omit `--workspace` and let the CLI detect the workspace root automatically.
|
|
254
|
+
- If the current folder is not inside the workspace, the CLI may still resolve the globally registered default workspace.
|
|
255
|
+
- The global workspace registry lives per user:
|
|
256
|
+
- macOS: `~/Library/Application Support/company-agent-wiki/workspaces.json`
|
|
257
|
+
- Windows: `%APPDATA%\\company-agent-wiki\\workspaces.json`
|
|
258
|
+
- Linux: `${XDG_CONFIG_HOME:-~/.config}/company-agent-wiki/workspaces.json`
|
|
244
259
|
|
|
245
260
|
## References
|
|
246
261
|
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
## Use This Sequence
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
6
7
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
7
8
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
8
9
|
company-agent-wiki-cli --help
|
|
9
10
|
company-agent-wiki-cli setup workspace --workspace /absolute/path --git-init
|
|
11
|
+
company-agent-wiki-cli workspace current --json
|
|
12
|
+
company-agent-wiki-cli workspace list --json
|
|
10
13
|
company-agent-wiki-cli onboarding company
|
|
11
14
|
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json
|
|
12
15
|
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json --execute
|
|
@@ -24,6 +27,8 @@ Only after the company profile is clear enough and these checks succeed should y
|
|
|
24
27
|
company-agent-wiki-cli setup workspace --workspace /absolute/path --git-init
|
|
25
28
|
```
|
|
26
29
|
|
|
30
|
+
This setup step also registers the workspace globally so later agents can find it without asking for the same path again.
|
|
31
|
+
|
|
27
32
|
If the human has a private Git remote ready:
|
|
28
33
|
|
|
29
34
|
```bash
|
|
@@ -49,6 +54,8 @@ For frequent edits, the authoring loop can also use the guarded auto-rebuild pat
|
|
|
49
54
|
company-agent-wiki-cli search "KI-Telefonassistent" --workspace /absolute/path --auto-rebuild --json
|
|
50
55
|
```
|
|
51
56
|
|
|
57
|
+
Parallel reads are allowed. If a write path such as `index rebuild` is already running, later writes wait behind the same workspace lock.
|
|
58
|
+
|
|
52
59
|
After candidate routing, prefer metadata-first reading:
|
|
53
60
|
|
|
54
61
|
```bash
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
## Workspace
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
6
7
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
7
8
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
8
9
|
company-agent-wiki-cli about --json
|
|
9
10
|
company-agent-wiki-cli setup workspace --workspace /absolute/path --git-init
|
|
11
|
+
company-agent-wiki-cli workspace current --json
|
|
12
|
+
company-agent-wiki-cli workspace list --json
|
|
13
|
+
company-agent-wiki-cli workspace register --workspace /absolute/path --default --json
|
|
14
|
+
company-agent-wiki-cli workspace use --workspace /absolute/path --json
|
|
10
15
|
company-agent-wiki-cli onboarding company
|
|
11
16
|
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json
|
|
12
17
|
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json --execute
|
|
@@ -23,6 +28,7 @@ company-agent-wiki-cli verify --workspace /absolute/path --json
|
|
|
23
28
|
```
|
|
24
29
|
|
|
25
30
|
If you are already inside the private workspace, `doctor`, `verify`, `search`, `route`, `read`, `history`, `diff` and `serve` may omit `--workspace`.
|
|
31
|
+
If not, the CLI can also use the globally registered default workspace.
|
|
26
32
|
|
|
27
33
|
## Retrieval
|
|
28
34
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
## Main Commands
|
|
17
17
|
|
|
18
18
|
- `setup workspace`
|
|
19
|
+
- `workspace current|list|register|use`
|
|
19
20
|
- `onboarding company`
|
|
20
21
|
- `doctor`
|
|
21
22
|
- `verify`
|
|
@@ -32,10 +33,13 @@
|
|
|
32
33
|
## Expected Workflow
|
|
33
34
|
|
|
34
35
|
1. Set up the private workspace.
|
|
35
|
-
2.
|
|
36
|
-
3.
|
|
37
|
-
4.
|
|
38
|
-
5.
|
|
39
|
-
6.
|
|
40
|
-
7.
|
|
41
|
-
8.
|
|
36
|
+
2. The workspace is registered globally so other agents can discover it automatically.
|
|
37
|
+
3. Use the starter documents or run `onboarding company`, then preview or apply the generated onboarding Markdown from an answers file.
|
|
38
|
+
4. Register any additional Markdown roots.
|
|
39
|
+
5. Rebuild the index.
|
|
40
|
+
6. Verify that the snapshot is fresh. On a brand-new workspace `verify` reports `missing` instead of failing hard.
|
|
41
|
+
7. Search or route to the right document. For active authoring loops, prefer `--auto-rebuild` and front-matter filters such as `--type`, `--project` or `--department`.
|
|
42
|
+
8. Inspect metadata and headings with `read --metadata --headings --auto-rebuild`.
|
|
43
|
+
9. Read the full source document or use the read-only web view.
|
|
44
|
+
|
|
45
|
+
Parallel reads are supported. Writes are serialized per workspace.
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
- a private workspace folder path
|
|
6
6
|
- if desired, a private Git remote URL
|
|
7
7
|
|
|
8
|
+
The workspace path only has to be provided once. After setup or manual registration, the CLI stores it in a per-user global registry for later agents.
|
|
9
|
+
|
|
8
10
|
## What the Agent Can Safely Do
|
|
9
11
|
|
|
10
12
|
- scaffold the local workspace
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
- create the default starter documents for the first useful company knowledge
|
|
14
16
|
- preview or apply onboarding-generated starter Markdown from an answers file
|
|
15
17
|
- register Markdown roots
|
|
18
|
+
- register the workspace globally for later agents
|
|
16
19
|
- rebuild the derived index
|
|
17
20
|
- verify freshness or a still-missing first index
|
|
18
21
|
- run the read-only web view via `company-agent-wiki-cli serve --workspace /absolute/path --port 4187`
|
|
@@ -22,14 +25,22 @@
|
|
|
22
25
|
Before relying on the CLI, verify a real executable path:
|
|
23
26
|
|
|
24
27
|
```bash
|
|
28
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
25
29
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
26
30
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
27
31
|
company-agent-wiki-cli --help
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
The package-based `npx` path is only valid once the npm package is published.
|
|
34
|
+
The package-based `npx` installer path is only valid once the npm package is published.
|
|
31
35
|
|
|
32
36
|
If the current folder is already inside a private workspace, runtime commands may omit `--workspace`.
|
|
37
|
+
If not, inspect or update the global registry:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
company-agent-wiki-cli workspace current --json
|
|
41
|
+
company-agent-wiki-cli workspace list --json
|
|
42
|
+
company-agent-wiki-cli workspace register --workspace /absolute/path --default --json
|
|
43
|
+
```
|
|
33
44
|
|
|
34
45
|
## What Must Stay Out of This Public Repo
|
|
35
46
|
|