feat: add llmwiki skill for pi
Encodes wiki operations (ingest, query, lint) as a project-level skill so they load on-demand instead of always in context.
This commit is contained in:
@@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
name: llmwiki
|
||||||
|
description: >
|
||||||
|
Maintain the LLM Wiki knowledge base in this repo. Use for ingesting source
|
||||||
|
documents into wiki pages (llmwiki-ingest), answering questions from existing
|
||||||
|
wiki content (llmwiki-query), and auditing wiki consistency (llmwiki-lint).
|
||||||
|
Always use when the user asks to add a document to the wiki, look up something
|
||||||
|
in the wiki, or check wiki health.
|
||||||
|
---
|
||||||
|
|
||||||
|
# LLM Wiki Skill
|
||||||
|
|
||||||
|
You are a wiki maintainer for the LLM Wiki knowledge base located in the current
|
||||||
|
working directory (`G:/dev/ml/llmwiki`). You never modify files in `raw/`. You
|
||||||
|
own everything in `wiki/`.
|
||||||
|
|
||||||
|
## Directory Layout
|
||||||
|
|
||||||
|
```
|
||||||
|
raw/ Source documents (immutable — read only)
|
||||||
|
raw/assets/ Images, PDFs, attachments
|
||||||
|
wiki/ Wiki pages you create, edit, and maintain
|
||||||
|
wiki/index.md Catalog of all wiki pages
|
||||||
|
wiki/log.md Append-only operation log
|
||||||
|
```
|
||||||
|
|
||||||
|
## Page Schema
|
||||||
|
|
||||||
|
Every wiki page must have YAML frontmatter:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
type: concept | entity | source | synthesis | comparison
|
||||||
|
title: ""
|
||||||
|
tags: []
|
||||||
|
sources: [] # filenames from raw/ that support this page
|
||||||
|
related: [] # wiki page filenames this page links to
|
||||||
|
updated: YYYY-MM-DD
|
||||||
|
confidence: high | medium | low
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
For `updated`, always use a tool to get the current date. For any measurement or
|
||||||
|
metric field, always use a tool to retrieve or compute the value.
|
||||||
|
|
||||||
|
Follow the frontmatter with a one-paragraph summary, then the body.
|
||||||
|
|
||||||
|
## Conventions
|
||||||
|
|
||||||
|
- Filenames: lowercase hyphenated slugs — `transformer-architecture.md`
|
||||||
|
- Source summaries: prefix `src-` — `src-attention-is-all-you-need.md`
|
||||||
|
- Never delete a wiki page without user confirmation
|
||||||
|
- When a concept lacks a source, create a stub and mark `confidence: low`
|
||||||
|
- `wiki/index.md` is sorted by type, then alphabetically within each type
|
||||||
|
- `wiki/log.md` entries start with `## [YYYY-MM-DD]`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Operation: ingest
|
||||||
|
|
||||||
|
Triggered when the user provides a source filename to ingest.
|
||||||
|
|
||||||
|
1. Read the source file in `raw/`.
|
||||||
|
2. Discuss key takeaways with the user.
|
||||||
|
3. Write `wiki/src-<slug>.md` (type: source) summarizing the source.
|
||||||
|
4. For each significant entity or concept: find or create its wiki page, update
|
||||||
|
it with new information, update `sources:` and `related:` frontmatter.
|
||||||
|
5. Note contradictions with existing pages explicitly in the relevant pages.
|
||||||
|
6. Update `wiki/index.md` — add new pages, update summaries of changed pages.
|
||||||
|
7. Append to `wiki/log.md`:
|
||||||
|
```
|
||||||
|
## [YYYY-MM-DD] ingest | <source filename>
|
||||||
|
Pages created: ...
|
||||||
|
Pages updated: ...
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Operation: query
|
||||||
|
|
||||||
|
Triggered when the user asks a question the wiki might answer.
|
||||||
|
|
||||||
|
1. Read `wiki/index.md` to identify relevant pages.
|
||||||
|
2. Read those pages.
|
||||||
|
3. Synthesize an answer with citations linking to wiki pages.
|
||||||
|
4. Ask the user: "File this as a new wiki page?" If yes, write it as type:
|
||||||
|
synthesis and update the index.
|
||||||
|
5. Append to `wiki/log.md`:
|
||||||
|
```
|
||||||
|
## [YYYY-MM-DD] query | <question summary>
|
||||||
|
Pages read: ...
|
||||||
|
Filed: yes/no
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Operation: lint
|
||||||
|
|
||||||
|
Triggered when the user asks to audit or check wiki health.
|
||||||
|
|
||||||
|
1. Read all pages in `wiki/`.
|
||||||
|
2. Report:
|
||||||
|
- Contradictions between pages
|
||||||
|
- Orphan pages with no inbound links
|
||||||
|
- Concepts mentioned but lacking their own page
|
||||||
|
- Missing `related:` cross-references
|
||||||
|
- Low-confidence claims without a source
|
||||||
|
3. For each issue, propose a fix. Apply fixes the user approves.
|
||||||
|
4. Append to `wiki/log.md`:
|
||||||
|
```
|
||||||
|
## [YYYY-MM-DD] lint
|
||||||
|
Issues found: ...
|
||||||
|
Fixed: ...
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user