@codecell-germany/company-agent-wiki-skill 0.1.1 → 0.1.3
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 +137 -153
- package/dist/index.js +142 -95
- package/dist/installer.js +51 -16
- package/knowledge/ARCHITECTURE.md +3 -2
- package/knowledge/KNOWN_LIMITATIONS.md +1 -0
- package/knowledge/RELEASE_CHECKLIST.md +6 -2
- package/package.json +2 -2
- package/skills/company-agent-wiki-cli/SKILL.md +25 -7
- package/skills/company-agent-wiki-cli/references/agent-onboarding.md +3 -0
- package/skills/company-agent-wiki-cli/references/command-cheatsheet.md +3 -0
- package/skills/company-agent-wiki-cli/references/company-onboarding.md +1 -1
- package/skills/company-agent-wiki-cli/references/overview.md +1 -0
- package/skills/company-agent-wiki-cli/references/workspace-first-run.md +4 -1
package/README.md
CHANGED
|
@@ -1,110 +1,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# company-agent-wiki-skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# English
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- a local SQLite index accelerates routing and section search
|
|
9
|
-
- metadata-first retrieval lets agents inspect filenames, front matter and headings before loading full documents
|
|
10
|
-
- Git remains the audit and history layer
|
|
11
|
-
- the optional web view is read-only and shows index state, documents, diffs and history
|
|
7
|
+
## Purpose
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
The difference here is the retrieval layer: the metadata does not just sit in front matter, it is additionally indexed and filterable through a local SQLite search layer.
|
|
9
|
+
> Context is king.
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
`company-agent-wiki-skill` is an agent-first local company knowledge toolkit.
|
|
12
|
+
It ships as a real CLI plus a shared agent skill payload, so an agent can set up a private company wiki, verify the index state, search knowledge, inspect metadata and headings first, and only then load full Markdown when needed.
|
|
17
13
|
|
|
18
|
-
The
|
|
14
|
+
The shared install layout is meant to work across agent environments that understand the common `~/.agents` skill home, including Codex through its compatibility mirror and other skills.sh-style runtimes such as Claude Code or OpenClaw.
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
The product surface is the public CLI:
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
3. inspect the heading tree
|
|
25
|
-
4. only then load the full Markdown when the candidate is clearly relevant
|
|
18
|
+
- `company-agent-wiki-cli`
|
|
19
|
+
- `company-agent-wiki-skill`
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
The skill explains how an agent should use that CLI safely.
|
|
22
|
+
It is not a substitute implementation.
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
- filenames still matter
|
|
31
|
-
- Markdown stays readable
|
|
32
|
-
- front matter becomes the routing layer
|
|
33
|
-
- headings become the low-cost structure preview
|
|
34
|
-
- full document reads happen last, not first
|
|
24
|
+
## Current scope
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
- private local knowledge workspaces with Markdown as the source of truth
|
|
27
|
+
- a rebuildable local SQLite index for routing and section search
|
|
28
|
+
- metadata-first retrieval over filename, front matter and headings
|
|
29
|
+
- Git-backed history and diff workflows
|
|
30
|
+
- global per-user workspace discovery for later agents
|
|
31
|
+
- company-profile onboarding blueprints
|
|
32
|
+
- a read-only local web view
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
- no GUI editing
|
|
40
|
-
- no silent sync magic
|
|
41
|
-
- no commits or pushes from this code repository
|
|
34
|
+
## Product model
|
|
42
35
|
|
|
43
|
-
The
|
|
36
|
+
The core design is simple:
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
- Markdown stays human-readable and remains the source of truth
|
|
39
|
+
- SQLite is derived and rebuildable
|
|
40
|
+
- Git stays the audit and history layer
|
|
41
|
+
- the CLI is the real product surface for agents
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- installer binary: `company-agent-wiki-skill`
|
|
50
|
-
- Codex skill name: `company-agent-wiki-cli`
|
|
43
|
+
The retrieval model is deliberately inspired by Anthropic's Agent Skills model with YAML front matter, progressive disclosure and filesystem-based loading:
|
|
44
|
+
[Anthropic Agent Skills Overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
|
|
51
45
|
|
|
52
|
-
|
|
46
|
+
The difference is the retrieval layer.
|
|
47
|
+
Here, front matter is not only stored in Markdown files, but also indexed and filterable through a local SQLite search layer.
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
- Git available in `PATH`
|
|
56
|
-
- a private local folder for the actual knowledge workspace
|
|
57
|
-
- optionally a private Git remote URL for that workspace
|
|
58
|
-
|
|
59
|
-
The SQLite index is local and derived. It is rebuilt by the CLI and must not be treated as the source of truth.
|
|
60
|
-
It lives inside the private workspace under `.company-agent-wiki/index.sqlite`, but it is intentionally kept out of Git by default because it is rebuildable, binary and noisy in diffs.
|
|
49
|
+
## Installation
|
|
61
50
|
|
|
62
|
-
|
|
51
|
+
### 1. Install with one command
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
- Windows: `%APPDATA%\\company-agent-wiki\\workspaces.json`
|
|
66
|
-
- Linux: `${XDG_CONFIG_HOME:-~/.config}/company-agent-wiki/workspaces.json`
|
|
67
|
-
|
|
68
|
-
## Install
|
|
53
|
+
The preferred install path is:
|
|
69
54
|
|
|
70
55
|
```bash
|
|
71
|
-
|
|
72
|
-
npm run build
|
|
56
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
73
57
|
```
|
|
74
58
|
|
|
75
|
-
|
|
59
|
+
That installs:
|
|
76
60
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
61
|
+
- the shared skill payload into `~/.agents/skills/company-agent-wiki-cli`
|
|
62
|
+
- the shared runtime into `~/.agents/tools/company-agent-wiki-cli`
|
|
63
|
+
- the shared CLI shim into `~/.agents/bin/company-agent-wiki-cli`
|
|
64
|
+
- the skill payload into `~/.codex/skills/company-agent-wiki-cli`
|
|
65
|
+
- the runtime into `~/.codex/tools/company-agent-wiki-cli`
|
|
66
|
+
- the Codex compatibility shim into `~/.codex/bin/company-agent-wiki-cli`
|
|
80
67
|
|
|
81
|
-
|
|
68
|
+
### 2. Verify the CLI
|
|
82
69
|
|
|
83
70
|
```bash
|
|
71
|
+
company-agent-wiki-cli --help
|
|
72
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
84
73
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
85
74
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
86
|
-
npx -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-cli --help
|
|
87
|
-
node dist/index.js --help
|
|
88
75
|
```
|
|
89
76
|
|
|
90
|
-
|
|
77
|
+
For agent environments that use the shared `~/.agents` home, the direct shim path is often the most reliable fallback.
|
|
78
|
+
In Codex, the compatibility shim under `~/.codex/bin` also works.
|
|
91
79
|
|
|
92
|
-
|
|
93
|
-
- `node dist/installer.js install --force` is the most reliable local install path while working from this repo
|
|
94
|
-
- the `npx -p @codecell-germany/company-agent-wiki-skill ...` path only works after the package is actually published
|
|
95
|
-
- `node dist/index.js` only works inside the public implementation repo after `npm run build`, not inside a private knowledge workspace
|
|
80
|
+
### 3. Optional local repo workflow
|
|
96
81
|
|
|
97
|
-
|
|
82
|
+
If you are working inside this public implementation repo itself:
|
|
98
83
|
|
|
99
84
|
```bash
|
|
100
|
-
|
|
85
|
+
npm install
|
|
86
|
+
npm run build
|
|
101
87
|
node dist/installer.js install --force
|
|
102
88
|
```
|
|
103
89
|
|
|
104
|
-
##
|
|
90
|
+
## Requirements
|
|
105
91
|
|
|
106
|
-
|
|
107
|
-
|
|
92
|
+
- Node.js `>= 20.10`
|
|
93
|
+
- Git available in `PATH`
|
|
94
|
+
- a private local folder for the actual knowledge workspace
|
|
95
|
+
- optionally a private Git remote URL for that workspace
|
|
96
|
+
|
|
97
|
+
The private knowledge workspace must not be this public code repository.
|
|
98
|
+
It may still be the current dedicated private folder in which you want to build the wiki.
|
|
99
|
+
|
|
100
|
+
The SQLite index lives inside the private workspace under `.company-agent-wiki/index.sqlite`.
|
|
101
|
+
It is intentionally kept out of Git by default because it is rebuildable, binary and noisy in diffs.
|
|
102
|
+
|
|
103
|
+
The workspace path can also be stored globally for other agents:
|
|
104
|
+
|
|
105
|
+
- macOS: `~/Library/Application Support/company-agent-wiki/workspaces.json`
|
|
106
|
+
- Windows: `%APPDATA%\company-agent-wiki\workspaces.json`
|
|
107
|
+
- Linux: `${XDG_CONFIG_HOME:-~/.config}/company-agent-wiki/workspaces.json`
|
|
108
|
+
|
|
109
|
+
## Quick start
|
|
110
|
+
|
|
111
|
+
Create or choose a private workspace and run:
|
|
108
112
|
|
|
109
113
|
```bash
|
|
110
114
|
company-agent-wiki-cli setup workspace \
|
|
@@ -113,27 +117,15 @@ company-agent-wiki-cli setup workspace \
|
|
|
113
117
|
--git-remote git@github.com:your-org/private-company-knowledge.git
|
|
114
118
|
```
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
3. Inspect the local state:
|
|
120
|
+
Then:
|
|
119
121
|
|
|
120
122
|
```bash
|
|
121
123
|
company-agent-wiki-cli doctor --workspace /absolute/path/to/private-company-knowledge --json
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
4. Rebuild the index:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
124
|
company-agent-wiki-cli index rebuild --workspace /absolute/path/to/private-company-knowledge --json
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
5. Verify the indexed snapshot:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
125
|
company-agent-wiki-cli verify --workspace /absolute/path/to/private-company-knowledge --json
|
|
134
126
|
```
|
|
135
127
|
|
|
136
|
-
|
|
128
|
+
After that, start retrieval:
|
|
137
129
|
|
|
138
130
|
```bash
|
|
139
131
|
company-agent-wiki-cli search "reverse charge aws invoice" --workspace /absolute/path/to/private-company-knowledge --type process --department buchhaltung --auto-rebuild --json
|
|
@@ -143,76 +135,41 @@ company-agent-wiki-cli read --doc-id process.example --workspace /absolute/path/
|
|
|
143
135
|
company-agent-wiki-cli serve --workspace /absolute/path/to/private-company-knowledge --port 4187 --auto-rebuild
|
|
144
136
|
```
|
|
145
137
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
If the current shell is already inside a private workspace, runtime commands such as `doctor`, `verify`, `search`, `route`, `read`, `history`, `diff` and `serve` may omit `--workspace`.
|
|
149
|
-
If not, the CLI can now also fall back to the globally registered default workspace.
|
|
150
|
-
|
|
151
|
-
Useful discovery commands:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
company-agent-wiki-cli workspace current --json
|
|
155
|
-
company-agent-wiki-cli workspace list --json
|
|
156
|
-
company-agent-wiki-cli workspace register --workspace /absolute/path/to/private-company-knowledge --default --json
|
|
157
|
-
company-agent-wiki-cli workspace use --workspace /absolute/path/to/private-company-knowledge --json
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
By default `setup workspace` also creates starter Markdown documents such as `wiki-start-here.md`, `company-profile.md`, `organisation-und-rollen.md`, `systeme-und-tools.md`, `kernprozesse.md`, `projekte-und-roadmap.md` and `glossar.md`. Use `--no-starter-docs` only if you intentionally want an almost empty scaffold.
|
|
161
|
-
|
|
162
|
-
You can also start the optional company-profile onboarding for the agent:
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
company-agent-wiki-cli onboarding company
|
|
166
|
-
company-agent-wiki-cli onboarding company --json
|
|
167
|
-
company-agent-wiki-cli onboarding company \
|
|
168
|
-
--workspace /absolute/path/to/private-company-knowledge \
|
|
169
|
-
--answers-file /absolute/path/to/company-onboarding-answers.json
|
|
170
|
-
company-agent-wiki-cli onboarding company \
|
|
171
|
-
--workspace /absolute/path/to/private-company-knowledge \
|
|
172
|
-
--answers-file /absolute/path/to/company-onboarding-answers.json \
|
|
173
|
-
--execute
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Without `--execute`, the CLI stays in preview mode and only reports which draft starter Markdown files would be written into the managed root.
|
|
177
|
-
`--execute` requires `--answers-file`, and `--force` is only valid together with `--execute`.
|
|
138
|
+
By default `setup workspace` also creates starter Markdown files such as:
|
|
178
139
|
|
|
179
|
-
|
|
140
|
+
- `wiki-start-here.md`
|
|
141
|
+
- `company-profile.md`
|
|
142
|
+
- `organisation-und-rollen.md`
|
|
143
|
+
- `systeme-und-tools.md`
|
|
144
|
+
- `kernprozesse.md`
|
|
145
|
+
- `projekte-und-roadmap.md`
|
|
146
|
+
- `glossar.md`
|
|
180
147
|
|
|
181
|
-
|
|
148
|
+
## Deterministic first-run order for agents
|
|
182
149
|
|
|
183
|
-
|
|
184
|
-
- exported business data
|
|
185
|
-
- private OAuth or API credentials
|
|
186
|
-
- live SQLite index files from customer workspaces
|
|
150
|
+
If a fresh agent receives this skill, the correct order is:
|
|
187
151
|
|
|
188
|
-
|
|
152
|
+
1. Verify the CLI path:
|
|
153
|
+
- `company-agent-wiki-cli --help`
|
|
154
|
+
- `"$HOME/.agents/bin/company-agent-wiki-cli" --help`
|
|
155
|
+
- `"$CODEX_HOME/bin/company-agent-wiki-cli" --help`
|
|
156
|
+
- `"$HOME/.codex/bin/company-agent-wiki-cli" --help`
|
|
157
|
+
2. If no workspace exists yet, create one with `setup workspace`.
|
|
158
|
+
3. If a workspace already exists, inspect or register it:
|
|
159
|
+
- `workspace current --json`
|
|
160
|
+
- `workspace list --json`
|
|
161
|
+
- `workspace register --workspace /absolute/path --default --json`
|
|
162
|
+
4. Run `doctor --json`.
|
|
163
|
+
5. Run `index rebuild --json`.
|
|
164
|
+
6. Run `verify --json`.
|
|
165
|
+
7. Only then use `search`, `route`, `read`, `history`, `diff` or `serve`.
|
|
189
166
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- access rights to that remote
|
|
167
|
+
If the current shell is already inside a private workspace, runtime commands may omit `--workspace`.
|
|
168
|
+
If not, the CLI can fall back to the globally registered default workspace.
|
|
193
169
|
|
|
194
|
-
|
|
170
|
+
## Retrieval workflow
|
|
195
171
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- `setup workspace`: scaffold a private workspace and optionally initialize Git
|
|
199
|
-
- `workspace current|list|register|use`: inspect or manage the global workspace registry for other agents
|
|
200
|
-
- `doctor`: inspect the local runtime and workspace state
|
|
201
|
-
- `verify`: check whether the current roots still match the indexed snapshot
|
|
202
|
-
- `roots add`: register another local Markdown root
|
|
203
|
-
- `roots list`: show registered roots
|
|
204
|
-
- `onboarding company`: emit the default German company-profile questionnaire or materialize draft onboarding Markdown from an answers file
|
|
205
|
-
- `index rebuild`: rebuild the derived SQLite index and manifest
|
|
206
|
-
- `search`: section-level search over Markdown knowledge, with safer free-text handling
|
|
207
|
-
- `route`: grouped search results for agent routing
|
|
208
|
-
- `read`: inspect metadata or headings first, then load a full document from the source files
|
|
209
|
-
- `history`: show Git history for a tracked document
|
|
210
|
-
- `diff`: show Git diff for a tracked document
|
|
211
|
-
- `serve`: run a local read-only web view
|
|
212
|
-
|
|
213
|
-
## Retrieval Workflow
|
|
214
|
-
|
|
215
|
-
This is the core USP in practice. The intended agent workflow is:
|
|
172
|
+
This is the core agent workflow:
|
|
216
173
|
|
|
217
174
|
1. Find candidate documents with `search` or `route`.
|
|
218
175
|
2. Narrow candidates with front-matter filters such as `--type`, `--project`, `--department`, `--tag`, `--owner` and `--system`.
|
|
@@ -227,7 +184,7 @@ company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projek
|
|
|
227
184
|
company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projekt-alpha-roadmap --auto-rebuild
|
|
228
185
|
```
|
|
229
186
|
|
|
230
|
-
## Authoring
|
|
187
|
+
## Authoring workflow
|
|
231
188
|
|
|
232
189
|
For new company knowledge, use a descriptive filename plus strong front matter.
|
|
233
190
|
|
|
@@ -258,17 +215,44 @@ systems:
|
|
|
258
215
|
---
|
|
259
216
|
```
|
|
260
217
|
|
|
261
|
-
|
|
218
|
+
Recommended authoring order:
|
|
219
|
+
|
|
220
|
+
1. Create the Markdown file inside `knowledge/canonical/` or another registered managed root.
|
|
221
|
+
2. Use a filename that roughly describes the real content.
|
|
222
|
+
3. Set front matter including `id`, `summary` and the routing fields that matter.
|
|
223
|
+
4. If the content depends on external sources, document provenance, date and source type.
|
|
224
|
+
5. Structure the file with clear `#`, `##` and `###` headings.
|
|
225
|
+
6. Rebuild the index or use an `--auto-rebuild` retrieval path.
|
|
226
|
+
7. Validate discoverability with `search`, `route` and `read --metadata --headings --auto-rebuild`.
|
|
227
|
+
8. If the document is structurally important, update the start page or thematic overview pages as well.
|
|
228
|
+
|
|
229
|
+
## Company onboarding
|
|
230
|
+
|
|
231
|
+
You can also start the optional company-profile onboarding:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
company-agent-wiki-cli onboarding company
|
|
235
|
+
company-agent-wiki-cli onboarding company --json
|
|
236
|
+
company-agent-wiki-cli onboarding company \
|
|
237
|
+
--workspace /absolute/path/to/private-company-knowledge \
|
|
238
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json
|
|
239
|
+
company-agent-wiki-cli onboarding company \
|
|
240
|
+
--workspace /absolute/path/to/private-company-knowledge \
|
|
241
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json \
|
|
242
|
+
--execute
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Without `--execute`, the CLI stays in preview mode.
|
|
246
|
+
With `--execute`, it writes draft starter Markdown into the managed root and rebuilds the index.
|
|
262
247
|
|
|
263
|
-
|
|
264
|
-
2. rebuild the index
|
|
265
|
-
3. validate discoverability with `search --auto-rebuild`, `route --auto-rebuild` and `read --metadata --headings --auto-rebuild`
|
|
248
|
+
## Concurrency
|
|
266
249
|
|
|
267
|
-
|
|
250
|
+
The SQLite index is intentionally local and rebuildable.
|
|
251
|
+
Parallel reads such as `search`, `route`, `read`, `history` and `diff` are a supported Phase-1 goal and should work across multiple agents.
|
|
268
252
|
|
|
269
|
-
|
|
253
|
+
Write paths such as `index rebuild` and onboarding apply are serialized per workspace through a local write lock, so concurrent writes queue behind the active writer instead of colliding.
|
|
270
254
|
|
|
271
|
-
## What Phase 1
|
|
255
|
+
## What Phase 1 does not do
|
|
272
256
|
|
|
273
257
|
- it does not ingest e-mail, CRM, chat or meeting systems
|
|
274
258
|
- it does not write or edit knowledge through the web UI
|