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