@zosmaai/pi-llm-wiki 0.4.0 โ 0.5.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/CHANGELOG.md +26 -0
- package/README.md +254 -34
- package/package.json +25 -3
- package/.coderabbit.yaml +0 -43
- package/.github/codeql/codeql-config.yml +0 -12
- package/.github/workflows/ci.yml +0 -45
- package/.github/workflows/codeql.yml +0 -39
- package/.github/workflows/release.yml +0 -86
- package/AGENTS.md +0 -57
- package/CONTRIBUTING.md +0 -43
- package/biome.json +0 -30
- package/scripts/release.js +0 -72
- package/test/llm-wiki.test.ts +0 -724
- package/tsconfig.json +0 -19
- package/vitest.config.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.5.0] - 2026-05-11
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Overhauled README**: npm downloads badge, slash commands table, guardrails section, skill behavior, vault layout, source packet format, integration flow, linking style guide
|
|
9
|
+
- **Better npm discoverability**: 19 keywords (was 10), expanded description with search terms, `files` field to slim package
|
|
10
|
+
- **GitHub topics**: pi, llm-wiki, knowledge-base, wiki, markdown, obsidian, karpathy, second-brain, pkm, memory
|
|
11
|
+
|
|
12
|
+
## [0.4.0] - 2026-05-11
|
|
13
|
+
|
|
14
|
+
- JSON file support (PR #15 by jfraser)
|
|
15
|
+
- Extractor strategy pattern refactor
|
|
16
|
+
|
|
17
|
+
## [0.3.0] - 2026-05-07
|
|
18
|
+
|
|
19
|
+
- Release
|
|
20
|
+
|
|
21
|
+
## [0.2.2] - 2026-05-03
|
|
22
|
+
|
|
23
|
+
- Fix: CodeQL alerts for safe tag stripping and entity decoding
|
|
24
|
+
- Fix: README contributors via contrib.rocks
|
|
25
|
+
- Added: Features section and env var documentation
|
|
26
|
+
|
|
27
|
+
## [0.2.1] - 2026-04-29
|
|
28
|
+
|
|
29
|
+
- Minor fixes
|
|
30
|
+
|
|
5
31
|
## [0.2.0] - 2026-04-28
|
|
6
32
|
|
|
7
33
|
### Added
|
package/README.md
CHANGED
|
@@ -2,53 +2,264 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
|
|
5
|
+
[](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
|
|
5
6
|
[](https://codecov.io/gh/zosmaai/pi-llm-wiki)
|
|
6
7
|
[](LICENSE)
|
|
7
8
|
[](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
|
|
8
9
|
|
|
9
|
-
Self-maintaining, Obsidian-compatible knowledge base for [pi](https://pi.dev)
|
|
10
|
+
**Self-maintaining, Obsidian-compatible knowledge base for [pi](https://pi.dev).**
|
|
11
|
+
Follows Andrej Karpathy's [LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f).
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Turn raw sources (URLs, PDFs, markdown, JSON, XML) into a durable, interlinked, LLM-maintained wiki that compounds over time.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
20
|
pi install npm:@zosmaai/pi-llm-wiki
|
|
15
21
|
```
|
|
16
22
|
|
|
17
|
-
## Quick Start
|
|
18
|
-
|
|
19
23
|
```
|
|
20
24
|
/wiki-init "AI Engineering"
|
|
25
|
+
/wiki-ingest
|
|
26
|
+
/wiki-query What are the key patterns?
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Why This Package?
|
|
32
|
+
|
|
33
|
+
Most file-based LLM workflows behave like one-shot RAG: the model searches raw documents every time you ask a question. Synthesis is ephemeral.
|
|
34
|
+
|
|
35
|
+
**pi-llm-wiki** creates a middle layer:
|
|
36
|
+
|
|
37
|
+
- **Raw source packets** preserve source-of-truth inputs
|
|
38
|
+
- **Source pages** summarize what each source says
|
|
39
|
+
- **Canonical wiki pages** track what the wiki currently believes
|
|
40
|
+
- **Generated metadata** keeps everything searchable and navigable
|
|
24
41
|
|
|
42
|
+
The result is a wiki that **compounds** as you capture sources, ask questions, and file durable analyses.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
| Capability | Description |
|
|
49
|
+
|------------|-------------|
|
|
50
|
+
| ๐ **Immutable source capture** | URLs, local files (PDF/md/txt/html/XML/JSON), or pasted text โ structured source packets |
|
|
51
|
+
| ๐ง **Automated ingestion** | `wiki_ingest` batch-processes sources into concept, entity, synthesis & analysis pages |
|
|
52
|
+
| ๐ **Full-text search** | Generated registry with keyword lookup across all pages and sources |
|
|
53
|
+
| ๐ฉบ **Mechanical linting** | Orphans, broken links, duplicate aliases, coverage gaps, stale captures |
|
|
54
|
+
| ๐ **Dashboard** | `wiki_status` โ counts, source states, recent activity |
|
|
55
|
+
| ๐ค **Auto-update watch** | `wiki_watch` โ schedule periodic discovery + ingest |
|
|
56
|
+
| ๐ **Obsidian-friendly** | Folder-qualified wikilinks, stable source-ID citations, compatible vault |
|
|
57
|
+
| ๐ก๏ธ **Guardrails** | Blocks direct edits to raw sources and generated metadata |
|
|
58
|
+
| ๐ง **Configurable PDF extraction** | MarkItDown timeout via `WIKI_MARKITDOWN_TIMEOUT_MS` env var |
|
|
59
|
+
| ๐งช **38+ tests, CI, CodeQL** | TypeScript, Vitest, Biome, Codecov |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Tools
|
|
64
|
+
|
|
65
|
+
| Tool | Description |
|
|
66
|
+
|------|-------------|
|
|
67
|
+
| `wiki_bootstrap` | Initialize a new wiki vault with config, templates, schema, and metadata |
|
|
68
|
+
| `wiki_capture_source` | Capture a URL, local file, or pasted text into an immutable source packet |
|
|
69
|
+
| `wiki_ingest` | Process uningested source packets into wiki pages (batch) |
|
|
70
|
+
| `wiki_ensure_page` | Resolve or safely create entity / concept / synthesis / analysis pages |
|
|
71
|
+
| `wiki_search` | Search the generated wiki registry |
|
|
72
|
+
| `wiki_lint` | Deterministic health checks (orphans, gaps, contradictions, auto-fix) |
|
|
73
|
+
| `wiki_status` | Show counts, source states, and recent activity |
|
|
74
|
+
| `wiki_rebuild_meta` | Force a full metadata rebuild (registry, backlinks, index, log) |
|
|
75
|
+
| `wiki_log_event` | Append a structured event to the wiki activity log |
|
|
76
|
+
| `wiki_watch` | Schedule automatic wiki updates (daily / weekly / hourly) |
|
|
77
|
+
|
|
78
|
+
### Slash Commands
|
|
79
|
+
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| `/wiki-status` | Show a concise operational summary |
|
|
83
|
+
| `/wiki-lint [mode]` | Run mechanical lint (`all`, `links`, `orphans`, `frontmatter`, `duplicates`, `coverage`, `staleness`) |
|
|
84
|
+
| `/wiki-rebuild` | Force a full metadata rebuild |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Quick Start (Detailed)
|
|
89
|
+
|
|
90
|
+
### 1) Create a new wiki
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
mkdir my-wiki
|
|
94
|
+
cd my-wiki
|
|
95
|
+
pi
|
|
25
96
|
```
|
|
26
|
-
|
|
27
|
-
|
|
97
|
+
|
|
98
|
+
Ask pi:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Initialize an llm wiki here for AI research.
|
|
28
102
|
```
|
|
29
103
|
|
|
30
|
-
|
|
104
|
+
This calls `wiki_bootstrap` and creates:
|
|
31
105
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| `wiki_lint` | Health check (orphans, gaps, contradictions) |
|
|
40
|
-
| `wiki_status` | Stats dashboard |
|
|
41
|
-
| `wiki_rebuild_meta` | Force metadata rebuild |
|
|
42
|
-
| `wiki_log_event` | Record custom event |
|
|
43
|
-
| `wiki_watch` | Schedule auto-updates |
|
|
106
|
+
```
|
|
107
|
+
raw/
|
|
108
|
+
wiki/
|
|
109
|
+
meta/
|
|
110
|
+
.wiki/
|
|
111
|
+
WIKI_SCHEMA.md
|
|
112
|
+
```
|
|
44
113
|
|
|
45
|
-
|
|
114
|
+
### 2) Capture a source
|
|
46
115
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
116
|
+
```
|
|
117
|
+
Capture this article into the wiki: https://example.com/some-article
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Capture this PDF into the wiki: ./papers/context-windows.pdf
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Capture these notes into the wiki: ...pasted text...
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 3) Integrate the source
|
|
129
|
+
|
|
130
|
+
1. Capture the source
|
|
131
|
+
2. Read `wiki/sources/SRC-*.md`
|
|
132
|
+
3. Update that source page
|
|
133
|
+
4. Search for impacted canonical pages with `wiki_search`
|
|
134
|
+
5. Create missing pages with `wiki_ensure_page`
|
|
135
|
+
6. Update concept / entity / synthesis pages with citations
|
|
136
|
+
7. Mark the integration with `wiki_log_event kind=integrate`
|
|
137
|
+
|
|
138
|
+
### 4) Query the wiki
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Based on the wiki, what are the main tradeoffs between long-context models and RAG?
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
By default, query mode is **read-only**. To file a durable answer:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Answer the question and file the result as an analysis page.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Vault Layout
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
my-wiki/
|
|
156
|
+
โโ raw/
|
|
157
|
+
โ โโ sources/
|
|
158
|
+
โ โโ SRC-2026-05-11-001/
|
|
159
|
+
โ โโ manifest.json
|
|
160
|
+
โ โโ original/ # Original artifact
|
|
161
|
+
โ โโ extracted.md # Normalized text
|
|
162
|
+
โ โโ attachments/
|
|
163
|
+
โโ wiki/
|
|
164
|
+
โ โโ sources/ # Source pages (what each source says)
|
|
165
|
+
โ โโ concepts/ # Concepts and recurring ideas
|
|
166
|
+
โ โโ entities/ # People, orgs, products, papers, systems
|
|
167
|
+
โ โโ syntheses/ # Cross-source theses and tensions
|
|
168
|
+
โ โโ analyses/ # Durable filed answers from queries
|
|
169
|
+
โโ meta/
|
|
170
|
+
โ โโ registry.json # Auto-generated search index
|
|
171
|
+
โ โโ backlinks.json
|
|
172
|
+
โ โโ index.md
|
|
173
|
+
โ โโ events.jsonl # Append-only event log
|
|
174
|
+
โ โโ log.md
|
|
175
|
+
โ โโ lint-report.md
|
|
176
|
+
โโ .wiki/
|
|
177
|
+
โ โโ config.json
|
|
178
|
+
โ โโ templates/
|
|
179
|
+
โโ WIKI_SCHEMA.md
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Ownership Model
|
|
183
|
+
|
|
184
|
+
| Path | Owner | Rule |
|
|
185
|
+
|------|-------|------|
|
|
186
|
+
| `raw/**` | Extension tools | Immutable after capture |
|
|
187
|
+
| `wiki/**` | Model + user | Editable knowledge pages |
|
|
188
|
+
| `meta/registry.json` | Extension | Generated |
|
|
189
|
+
| `meta/backlinks.json` | Extension | Generated |
|
|
190
|
+
| `meta/index.md` | Extension | Generated |
|
|
191
|
+
| `meta/events.jsonl` | Extension / tool | Append-only |
|
|
192
|
+
| `meta/log.md` | Extension | Generated from events |
|
|
193
|
+
| `meta/lint-report.md` | Extension | Generated |
|
|
194
|
+
| `WIKI_SCHEMA.md` | Human + explicit request | Operating manual |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Linking & Citation Style
|
|
199
|
+
|
|
200
|
+
### Internal Navigation
|
|
201
|
+
|
|
202
|
+
```markdown
|
|
203
|
+
[[concepts/retrieval-augmented-generation]]
|
|
204
|
+
[[entities/openai|OpenAI]]
|
|
205
|
+
[[syntheses/long-context-vs-rag]]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Factual Citations
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
[[sources/SRC-2026-04-04-001|SRC-2026-04-04-001]]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Stable source-page IDs keep provenance stable even if titles change.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Guardrails
|
|
219
|
+
|
|
220
|
+
The extension **blocks** direct tool-call edits to:
|
|
221
|
+
|
|
222
|
+
- `raw/**` โ immutable source artifacts
|
|
223
|
+
- `meta/registry.json`
|
|
224
|
+
- `meta/backlinks.json`
|
|
225
|
+
- `meta/events.jsonl`
|
|
226
|
+
- `meta/index.md`
|
|
227
|
+
- `meta/log.md`
|
|
228
|
+
- `meta/lint-report.md`
|
|
229
|
+
|
|
230
|
+
If the model directly edits `wiki/**` using Pi's built-in `write` or `edit` tools, the extension **automatically rebuilds** generated metadata at the end of the agent turn.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Source Packet Format
|
|
235
|
+
|
|
236
|
+
Each captured source is stored as a structured packet:
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
raw/sources/SRC-YYYY-MM-DD-NNN/
|
|
240
|
+
โโ manifest.json # Capture metadata (title, URL, format, timestamp)
|
|
241
|
+
โโ original/ # Original artifact (preserved as-is)
|
|
242
|
+
โโ extracted.md # Normalized text (PDFโmd, XMLโmd, JSONโmd, etc.)
|
|
243
|
+
โโ attachments/ # Future attachment downloads
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
This preserves both the **original artifact** and a **normalized extracted view** for reading.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Skill Behavior
|
|
251
|
+
|
|
252
|
+
The bundled `llm-wiki` skill teaches the model to:
|
|
253
|
+
|
|
254
|
+
- โ Never edit raw sources directly
|
|
255
|
+
- โ Never edit generated metadata files
|
|
256
|
+
- โ
Capture first, integrate second
|
|
257
|
+
- โ
Search before creating new canonical pages
|
|
258
|
+
- โ
Cite facts using source-page IDs
|
|
259
|
+
- โ
Keep query mode read-only by default
|
|
260
|
+
- โ
Use "Tensions / caveats" and "Open questions" when evidence is mixed
|
|
261
|
+
|
|
262
|
+
---
|
|
52
263
|
|
|
53
264
|
## Architecture
|
|
54
265
|
|
|
@@ -61,19 +272,27 @@ meta/ # Auto-generated registry, backlinks, index, log
|
|
|
61
272
|
.wiki/ # Config and templates
|
|
62
273
|
```
|
|
63
274
|
|
|
64
|
-
Read [docs/architecture.md](docs/architecture.md) for
|
|
275
|
+
Read [docs/architecture.md](docs/architecture.md) for the full design document.
|
|
276
|
+
|
|
277
|
+
---
|
|
65
278
|
|
|
66
279
|
## Documentation
|
|
67
280
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
281
|
+
| Document | What it covers |
|
|
282
|
+
|----------|---------------|
|
|
283
|
+
| [Architecture](docs/architecture.md) | How the four layers work, ownership model |
|
|
284
|
+
| [Commands](docs/commands.md) | All slash commands and tool reference |
|
|
285
|
+
| [Obsidian Integration](docs/obsidian.md) | Vault setup and recommended plugins |
|
|
286
|
+
| [Configuration](docs/configuration.md) | Wiki modes, topics, environment variables |
|
|
287
|
+
| [API](docs/api.md) | Extension tool parameter reference |
|
|
288
|
+
|
|
289
|
+
---
|
|
73
290
|
|
|
74
291
|
## Contributing
|
|
75
292
|
|
|
76
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
293
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, test patterns, and PR workflow.
|
|
294
|
+
|
|
295
|
+
---
|
|
77
296
|
|
|
78
297
|
## Star History
|
|
79
298
|
|
|
@@ -88,7 +307,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
88
307
|
---
|
|
89
308
|
|
|
90
309
|
<div align="center">
|
|
91
|
-
<sub>Built with โค๏ธ by <a href="https://github.com/zosmaai">zosmaai</a
|
|
310
|
+
<sub>Built with โค๏ธ by <a href="https://github.com/zosmaai">zosmaai</a> ยท </sub>
|
|
311
|
+
<a href="https://pi.dev">pi.dev</a> ยท <a href="https://github.com/zosmaai/pi-llm-wiki/issues">Issues</a>
|
|
92
312
|
</div>
|
|
93
313
|
|
|
94
314
|
## License
|
package/package.json
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zosmaai/pi-llm-wiki",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "LLM Wiki for Pi โ
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Self-maintaining LLM Wiki for Pi โ Karpathy-pattern knowledge base with immutable source capture, automated ingestion, search, linting, and Obsidian-compatible vault. auto-updating personal & company wiki.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"pi",
|
|
6
7
|
"pi-package",
|
|
7
|
-
"pi-skill",
|
|
8
8
|
"pi-extension",
|
|
9
|
+
"pi-skill",
|
|
9
10
|
"llm-wiki",
|
|
10
11
|
"karpathy",
|
|
11
12
|
"knowledge-base",
|
|
12
13
|
"obsidian",
|
|
13
14
|
"second-brain",
|
|
14
15
|
"wiki",
|
|
16
|
+
"memory",
|
|
17
|
+
"markdown",
|
|
18
|
+
"pkm",
|
|
19
|
+
"personal-knowledge-management",
|
|
20
|
+
"research",
|
|
21
|
+
"vault",
|
|
22
|
+
"zettelkasten",
|
|
23
|
+
"rag",
|
|
15
24
|
"zosmaai"
|
|
16
25
|
],
|
|
17
26
|
"license": "MIT",
|
|
@@ -24,6 +33,19 @@
|
|
|
24
33
|
"url": "https://github.com/zosmaai/pi-llm-wiki/issues"
|
|
25
34
|
},
|
|
26
35
|
"homepage": "https://github.com/zosmaai/pi-llm-wiki#readme",
|
|
36
|
+
"files": [
|
|
37
|
+
"extensions",
|
|
38
|
+
"skills",
|
|
39
|
+
"prompts",
|
|
40
|
+
"docs",
|
|
41
|
+
"assets",
|
|
42
|
+
"README.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
27
49
|
"scripts": {
|
|
28
50
|
"test": "vitest run",
|
|
29
51
|
"test:watch": "vitest",
|
package/.coderabbit.yaml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# CodeRabbit AI Code Review Configuration
|
|
2
|
-
# Docs: https://docs.coderabbit.ai/guides/configure-coderabbit
|
|
3
|
-
|
|
4
|
-
language: en-US
|
|
5
|
-
early_access: false
|
|
6
|
-
reviews:
|
|
7
|
-
profile: assertive
|
|
8
|
-
request_changes_workflow: true
|
|
9
|
-
high_level_summary: true
|
|
10
|
-
poem: false
|
|
11
|
-
review_status: true
|
|
12
|
-
collapse_walkthrough: false
|
|
13
|
-
auto_review:
|
|
14
|
-
enabled: true
|
|
15
|
-
ignore_title_keywords:
|
|
16
|
-
- "chore"
|
|
17
|
-
- "WIP"
|
|
18
|
-
- "wip"
|
|
19
|
-
drafts: false
|
|
20
|
-
base_branches:
|
|
21
|
-
- main
|
|
22
|
-
path_instructions:
|
|
23
|
-
- path: "extensions/**/*.ts"
|
|
24
|
-
instructions: |
|
|
25
|
-
Review TypeScript extension files for pi coding agent. Check that:
|
|
26
|
-
1. Tools use pi.registerTool() with TypeBox schemas
|
|
27
|
-
2. Error handling uses try/catch with proper messages
|
|
28
|
-
3. Unused parameters use underscore prefix or are removed
|
|
29
|
-
4. File exports a default function receiving ExtensionAPI
|
|
30
|
-
- path: "skills/**/SKILL.md"
|
|
31
|
-
instructions: |
|
|
32
|
-
Review SKILL.md for pi. Verify:
|
|
33
|
-
1. Frontmatter follows Agent Skills spec (name, description)
|
|
34
|
-
2. Workflows are clearly documented with steps
|
|
35
|
-
3. Golden rules and conventions are explicit
|
|
36
|
-
- path: "prompts/**/*.md"
|
|
37
|
-
instructions: |
|
|
38
|
-
Review prompt templates. Verify:
|
|
39
|
-
1. Frontmatter has description, args, section, topLevelCli
|
|
40
|
-
2. Instructions are actionable and clear
|
|
41
|
-
|
|
42
|
-
chat:
|
|
43
|
-
auto_reply: true
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
name: "CodeQL Config"
|
|
2
|
-
|
|
3
|
-
queries:
|
|
4
|
-
- uses: security-and-quality
|
|
5
|
-
|
|
6
|
-
# Suppress false positives for temporary file creation.
|
|
7
|
-
# This is a single-user CLI tool โ TOCTOU race conditions on temp directories
|
|
8
|
-
# are not a valid threat model. The alerts only fire because tests pass
|
|
9
|
-
# os.tmpdir() paths into production capture functions.
|
|
10
|
-
query-filters:
|
|
11
|
-
- exclude:
|
|
12
|
-
id: js/insecure-temporary-file
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
concurrency:
|
|
10
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
-
cancel-in-progress: true
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
quality:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
strategy:
|
|
17
|
-
matrix:
|
|
18
|
-
node-version: [20, 22, 23, 24, 25]
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@v4
|
|
22
|
-
|
|
23
|
-
- uses: actions/setup-node@v4
|
|
24
|
-
with:
|
|
25
|
-
node-version: ${{ matrix.node-version }}
|
|
26
|
-
cache: npm
|
|
27
|
-
|
|
28
|
-
- run: npm ci
|
|
29
|
-
|
|
30
|
-
- name: Type Check
|
|
31
|
-
run: npm run typecheck
|
|
32
|
-
|
|
33
|
-
- name: Lint
|
|
34
|
-
run: npm run lint
|
|
35
|
-
|
|
36
|
-
- name: Run Tests with Coverage
|
|
37
|
-
run: npm run test:coverage
|
|
38
|
-
|
|
39
|
-
- name: Upload Coverage to Codecov
|
|
40
|
-
if: ${{ matrix.node-version == 22 && github.event_name == 'push' }}
|
|
41
|
-
uses: codecov/codecov-action@v5
|
|
42
|
-
with:
|
|
43
|
-
files: ./coverage/lcov.info
|
|
44
|
-
fail_ci_if_error: false
|
|
45
|
-
verbose: true
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: "CodeQL"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
schedule:
|
|
9
|
-
- cron: "0 6 * * 1" # Every Monday at 6 AM
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
analyze:
|
|
13
|
-
name: Analyze (${{ matrix.language }})
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
permissions:
|
|
16
|
-
security-events: write
|
|
17
|
-
packages: read
|
|
18
|
-
actions: read
|
|
19
|
-
contents: read
|
|
20
|
-
|
|
21
|
-
strategy:
|
|
22
|
-
fail-fast: false
|
|
23
|
-
matrix:
|
|
24
|
-
include:
|
|
25
|
-
- language: javascript-typescript
|
|
26
|
-
build-mode: none
|
|
27
|
-
|
|
28
|
-
steps:
|
|
29
|
-
- uses: actions/checkout@v4
|
|
30
|
-
|
|
31
|
-
- uses: github/codeql-action/init@v3
|
|
32
|
-
with:
|
|
33
|
-
languages: ${{ matrix.language }}
|
|
34
|
-
build-mode: ${{ matrix.build-mode }}
|
|
35
|
-
config-file: ./.github/codeql/codeql-config.yml
|
|
36
|
-
|
|
37
|
-
- uses: github/codeql-action/analyze@v3
|
|
38
|
-
with:
|
|
39
|
-
category: "/language:${{ matrix.language }}"
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "v*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
permissions:
|
|
12
|
-
contents: write
|
|
13
|
-
id-token: write
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
with:
|
|
18
|
-
fetch-depth: 0
|
|
19
|
-
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: 22
|
|
23
|
-
registry-url: https://registry.npmjs.org
|
|
24
|
-
cache: npm
|
|
25
|
-
|
|
26
|
-
- run: npm ci
|
|
27
|
-
|
|
28
|
-
- name: Type Check
|
|
29
|
-
run: npm run typecheck
|
|
30
|
-
|
|
31
|
-
- name: Lint
|
|
32
|
-
run: npm run lint
|
|
33
|
-
|
|
34
|
-
- name: Run Tests
|
|
35
|
-
run: npm test
|
|
36
|
-
|
|
37
|
-
- name: Extract Version from Tag
|
|
38
|
-
id: version
|
|
39
|
-
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
|
40
|
-
|
|
41
|
-
- name: Update package.json version
|
|
42
|
-
run: |
|
|
43
|
-
node -e "const p=require('./package.json'); p.version='${{ steps.version.outputs.VERSION }}'; require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)+'\n')"
|
|
44
|
-
npx biome check --fix package.json 2>&1
|
|
45
|
-
|
|
46
|
-
- name: Commit version bump back to main
|
|
47
|
-
run: |
|
|
48
|
-
git config user.name "github-actions[bot]"
|
|
49
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
50
|
-
git add package.json
|
|
51
|
-
git commit -m "chore(release): v${{ steps.version.outputs.VERSION }}"
|
|
52
|
-
git push origin HEAD:main
|
|
53
|
-
|
|
54
|
-
- name: Generate Release Notes
|
|
55
|
-
id: notes
|
|
56
|
-
run: |
|
|
57
|
-
CHANGELOG=$(git log --pretty=format:"- %s (%h)" $(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD -- . 2>/dev/null || echo "- Initial release")
|
|
58
|
-
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
|
|
59
|
-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
|
60
|
-
echo "EOF" >> $GITHUB_OUTPUT
|
|
61
|
-
|
|
62
|
-
- name: Publish to npm
|
|
63
|
-
run: npm publish --provenance --access public
|
|
64
|
-
env:
|
|
65
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
66
|
-
|
|
67
|
-
- name: Create GitHub Release
|
|
68
|
-
uses: softprops/action-gh-release@v2
|
|
69
|
-
with:
|
|
70
|
-
name: "v${{ steps.version.outputs.VERSION }}"
|
|
71
|
-
body: |
|
|
72
|
-
## ๐ฆ @zosmaai/pi-llm-wiki v${{ steps.version.outputs.VERSION }}
|
|
73
|
-
|
|
74
|
-
${{ steps.notes.outputs.NOTES }}
|
|
75
|
-
|
|
76
|
-
### Install
|
|
77
|
-
\`\`\`bash
|
|
78
|
-
pi install npm:@zosmaai/pi-llm-wiki@${{ steps.version.outputs.VERSION }}
|
|
79
|
-
\`\`\`
|
|
80
|
-
|
|
81
|
-
### What's Included
|
|
82
|
-
- **Skill**: Self-maintaining wiki schema (SKILL.md)
|
|
83
|
-
- **Extension**: 10 TypeScript tools (wiki_bootstrap, wiki_capture_source, wiki_ingest, wiki_ensure_page, wiki_search, wiki_lint, wiki_status, wiki_rebuild_meta, wiki_log_event, wiki_watch)
|
|
84
|
-
- **Prompt Templates**: 8 slash commands (/wiki:init, :ingest, :query, :lint, :discover, :run, :status, :digest)
|
|
85
|
-
- **Templates**: INDEX.md, LOG.md, DASHBOARD.md, config.yaml, 5 page templates
|
|
86
|
-
generate_release_notes: false
|