@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
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Authoring Workflow
|
|
2
|
+
|
|
3
|
+
## Ziel
|
|
4
|
+
|
|
5
|
+
Agenten sollen neues Wissen so anlegen, dass der Retrieval-Pfad sauber bleibt:
|
|
6
|
+
|
|
7
|
+
1. sprechender Dateiname
|
|
8
|
+
2. starkes Front Matter
|
|
9
|
+
3. gute Überschriften
|
|
10
|
+
4. danach Index aktualisieren
|
|
11
|
+
|
|
12
|
+
## Dateiname
|
|
13
|
+
|
|
14
|
+
Der Dateiname soll grob widerspiegeln, was im Dokument steht. Bevorzuge:
|
|
15
|
+
|
|
16
|
+
- `projekt-alpha-roadmap.md`
|
|
17
|
+
- `buchhaltung-aws-eingangsrechnung.md`
|
|
18
|
+
- `vertrieb-lead-qualifizierung.md`
|
|
19
|
+
|
|
20
|
+
Vermeide:
|
|
21
|
+
|
|
22
|
+
- `notizen-final-neu.md`
|
|
23
|
+
- `dokument1.md`
|
|
24
|
+
- `misc.md`
|
|
25
|
+
|
|
26
|
+
## Minimales Front Matter
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
id: projects.alpha.roadmap
|
|
31
|
+
title: Projekt Alpha Roadmap
|
|
32
|
+
type: project
|
|
33
|
+
status: draft
|
|
34
|
+
tags:
|
|
35
|
+
- projekt
|
|
36
|
+
- alpha
|
|
37
|
+
summary: Roadmap und Entscheidungen für Projekt Alpha.
|
|
38
|
+
project: alpha
|
|
39
|
+
department: entwicklung
|
|
40
|
+
owners:
|
|
41
|
+
- nikolas-gottschol
|
|
42
|
+
systems:
|
|
43
|
+
- linear
|
|
44
|
+
---
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`id` ist für neues Wissen ausdrücklich empfohlen, auch wenn der Parser technisch noch eine ID aus dem Pfad ableiten kann.
|
|
48
|
+
|
|
49
|
+
## Empfohlene Felder
|
|
50
|
+
|
|
51
|
+
- `title`: menschenlesbarer Titel
|
|
52
|
+
- `type`: z. B. `project`, `process`, `policy`, `guide`, `note`
|
|
53
|
+
- `status`: z. B. `draft`, `active`, `archived`
|
|
54
|
+
- `tags`: freie Schlagwörter
|
|
55
|
+
- `summary`: kurze 1-Zeilen-Zusammenfassung für Agenten-Routing
|
|
56
|
+
- `project`: Projektkennung oder Projektslug
|
|
57
|
+
- `department`: Abteilung oder Verantwortungsbereich
|
|
58
|
+
- `owners`: verantwortliche Personen oder Teams
|
|
59
|
+
- `systems`: beteiligte Systeme oder Tools
|
|
60
|
+
- `id`: stark empfohlen für stabile Referenzen und sauberes Routing
|
|
61
|
+
|
|
62
|
+
## Provenienz Bei Externem Wissen
|
|
63
|
+
|
|
64
|
+
Wenn Wissen aus Webrecherche, Nutzerangaben, E-Mails oder anderen externen Quellen stammt, dokumentiere die Herkunft explizit.
|
|
65
|
+
|
|
66
|
+
Empfohlen:
|
|
67
|
+
|
|
68
|
+
- `summary` im Front Matter für die Kurzbeschreibung
|
|
69
|
+
- im Dokument ein Abschnitt `## Quellenstand`
|
|
70
|
+
- Prüfdaten oder Prüfdatum
|
|
71
|
+
- Quelle oder URL
|
|
72
|
+
- Einordnung wie `Primärquelle`, `Sekundärquelle` oder `Nutzerangabe`
|
|
73
|
+
|
|
74
|
+
Beispiel:
|
|
75
|
+
|
|
76
|
+
```md
|
|
77
|
+
## Quellenstand
|
|
78
|
+
|
|
79
|
+
- Geprüft am: 2026-04-12
|
|
80
|
+
- Quelle: https://example.com/partner
|
|
81
|
+
- Einordnung: Sekundärquelle
|
|
82
|
+
- Hinweis: Firmenname und Leistungsbeschreibung wurden zusätzlich durch Nutzerangabe bestätigt.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Struktur im Dokument
|
|
86
|
+
|
|
87
|
+
- Verwende eine klare `#`-Hauptüberschrift.
|
|
88
|
+
- Zerlege Inhalte in sinnvolle `##`- und `###`-Abschnitte.
|
|
89
|
+
- Trenne Regeln, Ausnahmen, Beispiele und offene Punkte.
|
|
90
|
+
|
|
91
|
+
## Empfohlener Anlageprozess Für Neue Dokumente
|
|
92
|
+
|
|
93
|
+
1. Dokument im passenden Managed Root anlegen, meist unter `knowledge/canonical/`.
|
|
94
|
+
2. Dateinamen so wählen, dass er `title` und Inhalt grob repräsentiert.
|
|
95
|
+
3. Front Matter setzen, idealerweise inklusive `id`.
|
|
96
|
+
4. Bei externem Wissen Provenienz ergänzen.
|
|
97
|
+
5. Abschnitte schreiben.
|
|
98
|
+
6. `company-agent-wiki-cli index rebuild --workspace /absolute/path --json` ausführen.
|
|
99
|
+
7. Optional mit `search --auto-rebuild`, `route --auto-rebuild` und `read --metadata --headings --auto-rebuild` prüfen.
|
|
100
|
+
8. Wenn das Dokument strukturell wichtig ist, Navigation oder README ergänzen.
|
|
101
|
+
|
|
102
|
+
## Integrations-Checkliste
|
|
103
|
+
|
|
104
|
+
- Datei angelegt
|
|
105
|
+
- Dateiname sprechend
|
|
106
|
+
- Front Matter vollständig
|
|
107
|
+
- Provenienz dokumentiert, wenn externes Wissen eingeflossen ist
|
|
108
|
+
- Navigation oder Startseite ergänzt, wenn relevant
|
|
109
|
+
- Index aktualisiert
|
|
110
|
+
- `read --metadata --headings --auto-rebuild` geprüft
|
|
111
|
+
|
|
112
|
+
## Bestehendes Wissen Erweitern
|
|
113
|
+
|
|
114
|
+
Wenn bereits ein passendes Dokument existiert:
|
|
115
|
+
|
|
116
|
+
1. erst Kandidaten mit `route` oder `search` finden
|
|
117
|
+
2. mit `read --metadata --headings --auto-rebuild` Struktur prüfen
|
|
118
|
+
3. bestehendes Dokument nur dann erweitern, wenn Thema und Typ sauber passen
|
|
119
|
+
4. sonst neues Dokument anlegen und den Einstiegspunkt verlinken
|
|
120
|
+
|
|
121
|
+
## Retrieval-Prozess für Agenten
|
|
122
|
+
|
|
123
|
+
1. Mit `search` oder `route` Kandidaten finden.
|
|
124
|
+
2. Wenn sinnvoll, direkt mit Filtern wie `--type`, `--project`, `--department`, `--tag`, `--owner`, `--system` eingrenzen.
|
|
125
|
+
3. Kandidaten mit `read --metadata --headings --auto-rebuild` prüfen.
|
|
126
|
+
4. Nur bei ausreichend passender Metadatenlage den Volltext mit `read --auto-rebuild` laden.
|
|
127
|
+
|
|
128
|
+
Beispiel:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
company-agent-wiki-cli route "Projekt Alpha Budget" --workspace /absolute/path --type project --project alpha --auto-rebuild --json
|
|
132
|
+
company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projekt-alpha-roadmap --metadata --headings --auto-rebuild --json
|
|
133
|
+
company-agent-wiki-cli read --workspace /absolute/path --doc-id canonical.projekt-alpha-roadmap --auto-rebuild
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Muster Für Beziehungswissen
|
|
137
|
+
|
|
138
|
+
Für Partner-, Netzwerk- oder CRM-Wissen ist dieses Muster oft passend:
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
---
|
|
142
|
+
id: crm.partner.beispiel-partner
|
|
143
|
+
title: Beispiel Partner
|
|
144
|
+
type: relationship
|
|
145
|
+
status: draft
|
|
146
|
+
tags:
|
|
147
|
+
- crm
|
|
148
|
+
- partner
|
|
149
|
+
- netzwerk
|
|
150
|
+
summary: Rolle, Status und Relevanz des Partners im CodeCell-Netzwerk.
|
|
151
|
+
department: vertrieb
|
|
152
|
+
owners:
|
|
153
|
+
- nikolas-gottschol
|
|
154
|
+
---
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Typische Dokumentabschnitte:
|
|
158
|
+
|
|
159
|
+
- `## Rolle`
|
|
160
|
+
- `## Beziehung und Kontext`
|
|
161
|
+
- `## Aktueller Stand`
|
|
162
|
+
- `## Nächste Schritte`
|
|
163
|
+
- `## Quellenstand`
|
|
164
|
+
|
|
165
|
+
## Parallelität
|
|
166
|
+
|
|
167
|
+
Wenn mehrere Agenten dasselbe Workspace verwenden, serialisiere `search`, `route`, `read`, `history` und `diff` möglichst pro Workspace. Der SQLite-Index ist rebuildbar, aber Phase 1 ist nicht für aggressiv parallele Leser ausgelegt.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Command Cheatsheet
|
|
2
|
+
|
|
3
|
+
## Workspace
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
7
|
+
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
8
|
+
company-agent-wiki-cli about --json
|
|
9
|
+
company-agent-wiki-cli setup workspace --workspace /absolute/path --git-init
|
|
10
|
+
company-agent-wiki-cli onboarding company
|
|
11
|
+
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json
|
|
12
|
+
company-agent-wiki-cli onboarding company --workspace /absolute/path --answers-file /absolute/path/to/answers.json --execute
|
|
13
|
+
company-agent-wiki-cli roots add --workspace /absolute/path --id accounting --path /absolute/path/to/root
|
|
14
|
+
company-agent-wiki-cli roots list --workspace /absolute/path --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Health
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
company-agent-wiki-cli doctor --workspace /absolute/path --json
|
|
21
|
+
company-agent-wiki-cli index rebuild --workspace /absolute/path --json
|
|
22
|
+
company-agent-wiki-cli verify --workspace /absolute/path --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If you are already inside the private workspace, `doctor`, `verify`, `search`, `route`, `read`, `history`, `diff` and `serve` may omit `--workspace`.
|
|
26
|
+
|
|
27
|
+
## Retrieval
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
company-agent-wiki-cli search "KI-Telefonassistent" --workspace /absolute/path --auto-rebuild --json
|
|
31
|
+
company-agent-wiki-cli search "AWS Rechnung" --workspace /absolute/path --type process --department buchhaltung --auto-rebuild --json
|
|
32
|
+
company-agent-wiki-cli route "vermieter rechnung buchen" --workspace /absolute/path --type process --project finance-ops --auto-rebuild --json
|
|
33
|
+
company-agent-wiki-cli read --doc-id process.example --workspace /absolute/path --metadata --headings --auto-rebuild --json
|
|
34
|
+
company-agent-wiki-cli read --doc-id process.example --workspace /absolute/path --auto-rebuild
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Git Views
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
company-agent-wiki-cli history --workspace /absolute/path --doc-id process.example --json
|
|
41
|
+
company-agent-wiki-cli diff --workspace /absolute/path --doc-id process.example --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Web View
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
company-agent-wiki-cli serve --workspace /absolute/path --port 4187 --auto-rebuild
|
|
48
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Company Onboarding Questions
|
|
2
|
+
|
|
3
|
+
Use this when the workspace exists, but the company profile is still incomplete.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
The agent should gather the most useful company master data first, without forcing the human to answer everything.
|
|
8
|
+
|
|
9
|
+
The questionnaire is source-backed. The current model draws especially from:
|
|
10
|
+
|
|
11
|
+
- IHK guidance on firmierung, Rechtsform, Sitz and Unternehmensgegenstand
|
|
12
|
+
- Existenzgründungsportal material on legal forms
|
|
13
|
+
- BZSt and tax-office information on tax registration, USt-IdNr and W-IdNr
|
|
14
|
+
- Bundesagentur für Arbeit information on Betriebsnummer and Unternehmensnummer
|
|
15
|
+
- Transparenzregister guidance on wirtschaftlich Berechtigte
|
|
16
|
+
|
|
17
|
+
Rules:
|
|
18
|
+
|
|
19
|
+
- every question is optional
|
|
20
|
+
- “nein”, “unbekannt” and “später” are valid answers
|
|
21
|
+
- ask only the sections that are relevant
|
|
22
|
+
- do not pressure the user into sharing sensitive data
|
|
23
|
+
|
|
24
|
+
## Start Command
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
company-agent-wiki-cli onboarding company
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For structured agent workflows:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
company-agent-wiki-cli onboarding company --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Preview and Apply
|
|
37
|
+
|
|
38
|
+
If the agent has already collected answers, store them in a JSON file and preview the generated draft starter Markdown:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
company-agent-wiki-cli onboarding company \
|
|
42
|
+
--workspace /absolute/path \
|
|
43
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Write the generated files only with an explicit apply step:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
company-agent-wiki-cli onboarding company \
|
|
50
|
+
--workspace /absolute/path \
|
|
51
|
+
--answers-file /absolute/path/to/company-onboarding-answers.json \
|
|
52
|
+
--execute
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If target files already exist, the CLI refuses the write unless `--force` is added.
|
|
56
|
+
`--execute` requires `--answers-file`, and `--force` is only valid together with `--execute`.
|
|
57
|
+
|
|
58
|
+
## Answer File Shape
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"answeredBy": "Codex Agent",
|
|
63
|
+
"notes": ["Buchhaltung zuerst priorisieren"],
|
|
64
|
+
"answers": {
|
|
65
|
+
"official_legal_name": "Beispiel GmbH",
|
|
66
|
+
"legal_form": "GmbH",
|
|
67
|
+
"managing_directors": [
|
|
68
|
+
{
|
|
69
|
+
"name": "Max Beispiel",
|
|
70
|
+
"role": "Geschäftsführer",
|
|
71
|
+
"email": "max@example.com"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"vat_regime": "Regelbesteuerung"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Supported shapes:
|
|
80
|
+
|
|
81
|
+
- nested metadata plus `answers`
|
|
82
|
+
- flat top-level question IDs plus optional metadata such as `profileId`, `answeredAt`, `answeredBy` and `notes`
|
|
83
|
+
|
|
84
|
+
## Section Logic
|
|
85
|
+
|
|
86
|
+
- Ask `Rechtlicher Kern` first.
|
|
87
|
+
- Then ask `Geschäftsführung, Vertretung und Eigentum`.
|
|
88
|
+
- Ask `Steuern und Finanzbasis` if accounting, invoicing or tax workflows matter.
|
|
89
|
+
- Ask `Mitarbeitende und Arbeitgeberstatus` only if employees are relevant.
|
|
90
|
+
- Ask `Organisations- und Wissensbasis` to map the first domains and roots.
|
|
91
|
+
|
|
92
|
+
## Important Note
|
|
93
|
+
|
|
94
|
+
The current Phase-1 CLI can materialize only the onboarding-specific draft starter documents. It does not yet run a fully interactive prompt loop and it does not auto-commit the resulting files.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
`company-agent-wiki-cli` is the public interface for a private, local company knowledge workspace.
|
|
4
|
+
|
|
5
|
+
## Source of Truth
|
|
6
|
+
|
|
7
|
+
- Markdown files in registered roots
|
|
8
|
+
- tracked workspace metadata in `.company-agent-wiki/workspace.json`
|
|
9
|
+
- descriptive filenames plus Front Matter carry the first routing signal
|
|
10
|
+
|
|
11
|
+
## Derived State
|
|
12
|
+
|
|
13
|
+
- `.company-agent-wiki/index.sqlite`
|
|
14
|
+
- `.company-agent-wiki/index-manifest.json`
|
|
15
|
+
|
|
16
|
+
## Main Commands
|
|
17
|
+
|
|
18
|
+
- `setup workspace`
|
|
19
|
+
- `onboarding company`
|
|
20
|
+
- `doctor`
|
|
21
|
+
- `verify`
|
|
22
|
+
- `roots add`
|
|
23
|
+
- `roots list`
|
|
24
|
+
- `index rebuild`
|
|
25
|
+
- `search`
|
|
26
|
+
- `route`
|
|
27
|
+
- `read`
|
|
28
|
+
- `history`
|
|
29
|
+
- `diff`
|
|
30
|
+
- `serve`
|
|
31
|
+
|
|
32
|
+
## Expected Workflow
|
|
33
|
+
|
|
34
|
+
1. Set up the private workspace.
|
|
35
|
+
2. Use the starter documents or run `onboarding company`, then preview or apply the generated onboarding Markdown from an answers file.
|
|
36
|
+
3. Register any additional Markdown roots.
|
|
37
|
+
4. Rebuild the index.
|
|
38
|
+
5. Verify that the snapshot is fresh. On a brand-new workspace `verify` reports `missing` instead of failing hard.
|
|
39
|
+
6. Search or route to the right document. For active authoring loops, prefer `--auto-rebuild` and front-matter filters such as `--type`, `--project` or `--department`.
|
|
40
|
+
7. Inspect metadata and headings with `read --metadata --headings --auto-rebuild`.
|
|
41
|
+
8. Read the full source document or use the read-only web view.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Workspace First Run
|
|
2
|
+
|
|
3
|
+
## Human Inputs Required
|
|
4
|
+
|
|
5
|
+
- a private workspace folder path
|
|
6
|
+
- if desired, a private Git remote URL
|
|
7
|
+
|
|
8
|
+
## What the Agent Can Safely Do
|
|
9
|
+
|
|
10
|
+
- scaffold the local workspace
|
|
11
|
+
- initialize a local Git repository
|
|
12
|
+
- attach a provided remote URL
|
|
13
|
+
- create the default starter documents for the first useful company knowledge
|
|
14
|
+
- preview or apply onboarding-generated starter Markdown from an answers file
|
|
15
|
+
- register Markdown roots
|
|
16
|
+
- rebuild the derived index
|
|
17
|
+
- verify freshness or a still-missing first index
|
|
18
|
+
- run the read-only web view via `company-agent-wiki-cli serve --workspace /absolute/path --port 4187`
|
|
19
|
+
|
|
20
|
+
## Runtime Discovery
|
|
21
|
+
|
|
22
|
+
Before relying on the CLI, verify a real executable path:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
26
|
+
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
27
|
+
company-agent-wiki-cli --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The package-based `npx` path is only valid once the npm package is published.
|
|
31
|
+
|
|
32
|
+
If the current folder is already inside a private workspace, runtime commands may omit `--workspace`.
|
|
33
|
+
|
|
34
|
+
## What Must Stay Out of This Public Repo
|
|
35
|
+
|
|
36
|
+
- real business documents
|
|
37
|
+
- exported customer data
|
|
38
|
+
- local workspace indexes
|
|
39
|
+
- private tokens or environment files
|