@codecell-germany/company-agent-wiki-skill 0.1.0
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/LICENSE +22 -0
- package/README.md +265 -0
- package/dist/index.js +12676 -0
- package/dist/installer.js +3682 -0
- package/knowledge/ARCHITECTURE.md +106 -0
- package/knowledge/KNOWN_LIMITATIONS.md +30 -0
- package/knowledge/RELEASE_CHECKLIST.md +145 -0
- package/package.json +46 -0
- package/skills/company-agent-wiki-cli/SKILL.md +252 -0
- package/skills/company-agent-wiki-cli/references/agent-onboarding.md +57 -0
- package/skills/company-agent-wiki-cli/references/authoring-workflow.md +167 -0
- package/skills/company-agent-wiki-cli/references/command-cheatsheet.md +48 -0
- package/skills/company-agent-wiki-cli/references/company-onboarding.md +94 -0
- package/skills/company-agent-wiki-cli/references/overview.md +41 -0
- package/skills/company-agent-wiki-cli/references/workspace-first-run.md +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CodeCell Germany
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# Company Agent Wiki Skill
|
|
2
|
+
|
|
3
|
+
> Context is king.
|
|
4
|
+
|
|
5
|
+
`company-agent-wiki-cli` is a local, agent-first company knowledge runtime:
|
|
6
|
+
|
|
7
|
+
- Markdown files stay the source of truth
|
|
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
|
|
12
|
+
|
|
13
|
+
It is also deliberately inspired by Anthropic's Markdown + YAML-frontmatter model for Claude Code subagents: [Anthropic Claude Code Subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents).
|
|
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.
|
|
15
|
+
|
|
16
|
+
## Core USP
|
|
17
|
+
|
|
18
|
+
The main product differentiator is a strict metadata-first retrieval model for agents.
|
|
19
|
+
|
|
20
|
+
Instead of throwing full Markdown files into context immediately, the intended flow is:
|
|
21
|
+
|
|
22
|
+
1. find candidate files via indexed search and routing
|
|
23
|
+
2. inspect descriptive filenames plus structured front matter
|
|
24
|
+
3. inspect the heading tree
|
|
25
|
+
4. only then load the full Markdown when the candidate is clearly relevant
|
|
26
|
+
|
|
27
|
+
That gives agents a local, deterministic and Git-friendly knowledge workflow that stays transparent for humans:
|
|
28
|
+
|
|
29
|
+
- context is king
|
|
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
|
|
35
|
+
|
|
36
|
+
Phase 1 is intentionally narrow:
|
|
37
|
+
|
|
38
|
+
- no connectors
|
|
39
|
+
- no GUI editing
|
|
40
|
+
- no silent sync magic
|
|
41
|
+
- no commits or pushes from this code repository
|
|
42
|
+
|
|
43
|
+
The private knowledge workspace lives outside this public code repository. It may still be the current dedicated private folder in which you want to build the wiki; the important point is only that it must not be the public skill/CLI repository itself.
|
|
44
|
+
|
|
45
|
+
## Product Surface
|
|
46
|
+
|
|
47
|
+
- npm package: `@codecell-germany/company-agent-wiki-skill`
|
|
48
|
+
- CLI binary: `company-agent-wiki-cli`
|
|
49
|
+
- installer binary: `company-agent-wiki-skill`
|
|
50
|
+
- Codex skill name: `company-agent-wiki-cli`
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
- Node.js `>= 20.10`
|
|
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.
|
|
61
|
+
|
|
62
|
+
## Install
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install
|
|
66
|
+
npm run build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Inside this implementation repo, the most reliable local install path is:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node dist/installer.js install --force
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Other valid operator paths:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
79
|
+
"$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
|
+
```
|
|
83
|
+
|
|
84
|
+
Important:
|
|
85
|
+
|
|
86
|
+
- the direct `~/.codex/bin` path is the most reliable fallback in Codex
|
|
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
|
|
90
|
+
|
|
91
|
+
To test the local build without a global install:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
node dist/index.js --help
|
|
95
|
+
node dist/installer.js install --force
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## First Run
|
|
99
|
+
|
|
100
|
+
1. Create or choose a private workspace folder outside this repository.
|
|
101
|
+
2. Run setup:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
company-agent-wiki-cli setup workspace \
|
|
105
|
+
--workspace /absolute/path/to/private-company-knowledge \
|
|
106
|
+
--git-init \
|
|
107
|
+
--git-remote git@github.com:your-org/private-company-knowledge.git
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Inspect the local state:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
company-agent-wiki-cli doctor --workspace /absolute/path/to/private-company-knowledge --json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
4. Rebuild the index:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
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
|
+
company-agent-wiki-cli verify --workspace /absolute/path/to/private-company-knowledge --json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
6. Query the workspace:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
company-agent-wiki-cli search "reverse charge aws invoice" --workspace /absolute/path/to/private-company-knowledge --type process --department buchhaltung --auto-rebuild --json
|
|
132
|
+
company-agent-wiki-cli route "KI-Telefonassistent" --workspace /absolute/path/to/private-company-knowledge --type project --project alpha --auto-rebuild --json
|
|
133
|
+
company-agent-wiki-cli read --doc-id process.example --workspace /absolute/path/to/private-company-knowledge --metadata --headings --auto-rebuild --json
|
|
134
|
+
company-agent-wiki-cli read --doc-id process.example --workspace /absolute/path/to/private-company-knowledge --auto-rebuild
|
|
135
|
+
company-agent-wiki-cli serve --workspace /absolute/path/to/private-company-knowledge --port 4187 --auto-rebuild
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The read-only web view is served by the installed CLI process. The private workspace itself contains Markdown, metadata and the local derived index, but no standalone frontend application.
|
|
139
|
+
|
|
140
|
+
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`.
|
|
141
|
+
|
|
142
|
+
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.
|
|
143
|
+
|
|
144
|
+
You can also start the optional company-profile onboarding for the agent:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
company-agent-wiki-cli onboarding company
|
|
148
|
+
company-agent-wiki-cli onboarding company --json
|
|
149
|
+
company-agent-wiki-cli onboarding company \
|
|
150
|
+
--workspace /absolute/path/to/private-company-knowledge \
|
|
151
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json
|
|
152
|
+
company-agent-wiki-cli onboarding company \
|
|
153
|
+
--workspace /absolute/path/to/private-company-knowledge \
|
|
154
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json \
|
|
155
|
+
--execute
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Without `--execute`, the CLI stays in preview mode and only reports which draft starter Markdown files would be written into the managed root.
|
|
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.
|
|
177
|
+
|
|
178
|
+
## Phase 1 Commands
|
|
179
|
+
|
|
180
|
+
- `setup workspace`: scaffold a private workspace and optionally initialize Git
|
|
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
|
|
193
|
+
|
|
194
|
+
## Retrieval Workflow
|
|
195
|
+
|
|
196
|
+
This is the core USP in practice. The intended agent workflow is:
|
|
197
|
+
|
|
198
|
+
1. Find candidate documents with `search` or `route`.
|
|
199
|
+
2. Narrow candidates with front-matter filters such as `--type`, `--project`, `--department`, `--tag`, `--owner` and `--system`.
|
|
200
|
+
3. Inspect only metadata and headings with `read --metadata --headings --auto-rebuild`.
|
|
201
|
+
4. Load the full Markdown only when the candidate is clearly relevant.
|
|
202
|
+
|
|
203
|
+
Example:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
company-agent-wiki-cli route "Projekt Alpha Budget" --workspace /absolute/path --type project --project alpha --auto-rebuild --json
|
|
207
|
+
company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projekt-alpha-roadmap --metadata --headings --auto-rebuild --json
|
|
208
|
+
company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projekt-alpha-roadmap --auto-rebuild
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Authoring Workflow
|
|
212
|
+
|
|
213
|
+
For new company knowledge, use a descriptive filename plus strong front matter.
|
|
214
|
+
|
|
215
|
+
Recommended filename examples:
|
|
216
|
+
|
|
217
|
+
- `projekt-alpha-roadmap.md`
|
|
218
|
+
- `buchhaltung-aws-eingangsrechnung.md`
|
|
219
|
+
- `vertrieb-lead-qualifizierung.md`
|
|
220
|
+
|
|
221
|
+
Recommended front matter:
|
|
222
|
+
|
|
223
|
+
```yaml
|
|
224
|
+
---
|
|
225
|
+
id: projects.alpha.roadmap
|
|
226
|
+
title: Projekt Alpha Roadmap
|
|
227
|
+
type: project
|
|
228
|
+
status: draft
|
|
229
|
+
tags:
|
|
230
|
+
- projekt
|
|
231
|
+
- alpha
|
|
232
|
+
summary: Roadmap und Entscheidungen für Projekt Alpha.
|
|
233
|
+
project: alpha
|
|
234
|
+
department: entwicklung
|
|
235
|
+
owners:
|
|
236
|
+
- nikolas-gottschol
|
|
237
|
+
systems:
|
|
238
|
+
- linear
|
|
239
|
+
---
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Then:
|
|
243
|
+
|
|
244
|
+
1. write the Markdown with a clean heading structure
|
|
245
|
+
2. rebuild the index
|
|
246
|
+
3. validate discoverability with `search --auto-rebuild`, `route --auto-rebuild` and `read --metadata --headings --auto-rebuild`
|
|
247
|
+
|
|
248
|
+
## Concurrency Note
|
|
249
|
+
|
|
250
|
+
The SQLite index is intentionally local and rebuildable. For the same workspace, avoid running multiple `search`, `route`, `read`, `history` and `diff` calls in parallel when possible. The CLI now uses a busy timeout and a lock-specific error, but agent-side serialization is still the safer Phase-1 operating mode.
|
|
251
|
+
|
|
252
|
+
## What Phase 1 Does Not Do
|
|
253
|
+
|
|
254
|
+
- it does not ingest e-mail, CRM, chat or meeting systems
|
|
255
|
+
- it does not write or edit knowledge through the web UI
|
|
256
|
+
- it does not push or publish Git commits automatically
|
|
257
|
+
- it does not treat the SQLite database as the truth
|
|
258
|
+
- it does not run an interactive prompt loop by itself; the agent still owns the conversation and answer-file creation
|
|
259
|
+
|
|
260
|
+
## Documentation
|
|
261
|
+
|
|
262
|
+
- Architecture: [knowledge/ARCHITECTURE.md](knowledge/ARCHITECTURE.md)
|
|
263
|
+
- Release checklist: [knowledge/RELEASE_CHECKLIST.md](knowledge/RELEASE_CHECKLIST.md)
|
|
264
|
+
- Known limitations: [knowledge/KNOWN_LIMITATIONS.md](knowledge/KNOWN_LIMITATIONS.md)
|
|
265
|
+
- Skill entrypoint: [skills/company-agent-wiki-cli/SKILL.md](skills/company-agent-wiki-cli/SKILL.md)
|