Typed atoms, edge graph, lazy projection — a protocol layer for AI knowledge.
English · 中文 · Protocol Spec · Architecture · Philosophy · Docs
Skill Wiki treats domain knowledge — design rules, security checks, writing voice, taxonomies — as typed atoms with a declared edge graph, retrieved on demand. Agents see a ~3 KB index of what exists. Specific atoms load only when the brief needs them.
Existence ≠ content. This is the load-bearing line of the whole design.
Requires Node 22+.
git clone https://github.com/skill-wiki/prime-system.git
cd prime-system
bun install
bun run buildbun run packages/cli/src/index.ts --version
# prime 0.1.0cd examples/hello-world
bun ../../scripts/build-atom-dirs.ts --src primes/sources --out primes/compiled
prime list
PRIME_DIR=primes/compiled bun ../../packages/mcp-server-core/src/index.tsWire into Claude Code (see docs/mcp.md):
{
"mcpServers": {
"skill-wiki": {
"command": "bunx",
"args": ["@skill-wiki/mcp-server-core"],
"env": { "PRIME_DIR": "/abs/path/to/compiled" }
}
}
}fact WaterBoilsAt100C {
id: "@example/fact-water-boils-at-100c"
version: "1.0.0"
statement: "Pure water boils at 100°C (212°F) at 1 atmosphere of pressure."
confidence: 0.99
domain: physics
related: [
@example/term-celsius,
@example/rule-altitude-affects-boiling,
]
validates-with: [
@example/source-nist-water-properties,
]
}
The kinds split into a small core set that any corpus uses, and a larger pool that fits some domains better than others. Pick what's useful; ignore the rest.
| Layer | Kinds |
|---|---|
| Data | fact term value category example counter-example source metric |
| Behavior | step check transform tool method |
| Composition | rule taxonomy pattern anti-pattern type constraint |
| Meta | collection scope tradeoff principle feedback |
| Voice & style (design / content / brand corpora) | persona voice template provocation |
The voice-and-style row is where the bundled frontend-design corpus
spends most of its mass — persona-stripe-fintech, voice-magazine- editorial, template-card-hover-lift. A security or compliance corpus
typically uses the first three rows and skips this one entirely.
14 typed edge verbs: requires enhances validates-with contradicts
specializes conflicts extends derived-from compatible supplies-to
see-also includes related relationships.
The 28 + 14 set is fixed in the parser today. Adding a new kind or verb
takes a parser-level patch and a Tier-2 RFC (see docs/community/governance.md).
The path is documented in docs/dsl-quickref.md —
edit packages/types/src/ast.ts, add a token in packages/parser/src/lexer.ts,
add a chunker case, write a fixture, ship the PR. The same path covers
new edge verbs.
A YAML-declared custom-kind form that bypasses the parser patch is on
the roadmap.
Five /prime-* commands ship in .claude/commands/ so Claude Code users can drive Prime workflows in one keystroke.
/prime-resolve <brief>— resolve a brief into concrete typed atoms via theprime_resolveMCP tool./prime-compile <src>— compile a source directory and report atoms, edges, and build errors./prime-validate <artifact> <brief>— validate a built artifact against a Prime brief contract./prime-author <kind> <name>— scaffold a new.primesource file with the right fields for the kind./prime-publish <src>— compile a corpus and prep a draft PR againstskill-wiki.github.io.
Use them at the project level out of the box, or copy globally with cp -r .claude/commands/prime-*.md ~/.claude/commands/. See .claude/commands/README.md for details.
| EN | 中文 | |
|---|---|---|
| Getting started | getting-started | 入门 |
| Architecture | architecture | 架构 |
| Philosophy | philosophy | 设计哲学 |
| DSL quick reference | dsl-quickref | DSL 速查 |
| CLI reference | cli | CLI |
| MCP server | mcp | MCP |
| Registry | registry | Registry |
| Corpus authoring | corpus-authoring | 写 corpus |
| Comparison | comparison | 对比 |
| FAQ | faq | FAQ |
| Known issues | known-issues | 已知问题 |
| Protocol Spec | PRIME-PROTOCOL-v1.md | — |
- Spec: v1.0, frozen as of 2026-05-07.
- Implementation: ~75% of v1 spec. Parser, compiler L1+L3, runtime, registry, CLI, generic MCP server — all built and tested.
- Optional: L2 semantic checker (DeepSeek, ~$0.0001/atom) — gated by
DEEPSEEK_API_KEY. - Honest gaps: lifecycle /
deprecatedwarning enforcement, structured AST for type expressions, formal domain plugin protocol. See ROADMAP.md.
Read .github/CONTRIBUTING.md before opening a pull request and follow the PR template. For questions and ideas, use Discussions; for defects or proposals, file an issue.
Apache License 2.0. Patent grant included; redistribution must keep NOTICE intact.
