This project has been archived by its maintainers, and is no longer receiving any updates.
wiki-framework
An opinionated, engine-agnostic, and agent-friendly wiki framework with SHACL validation and SPARQL querying.
Overview
This framework provides the core architecture, rules, and skills for maintaining a structured knowledge base (Second Brain). It is designed to be used as a template or a shared core for personal wiki instances.
Architecture
The framework follows a three-layer stack:
raw/: Immutable primary sources and atomic captures.wiki/: Curated, evergreen knowledge records.RULES.md: The "Operating System" — guidelines for human and AI collaboration.
Core Features
- Semantic Integrity: Standardized JSON-LD frontmatter rooted in Schema.org.
- SHACL Validation: Enforces canonical schemas for Person, Project, Action, and CreativeWork types.
- SPARQL Querying: Query your wiki as an RDF graph with OWL-RL inference.
- Agent-Ready: Explicit guidelines and workflows for AI coding assistants.
- Portable Skills: Automations for dailies, ingestion, and link auditing.
- Template System: Scaffold new wiki instances with
wiki init.
Installation
As a CLI tool
pip install wiki-framework
# or with uv
uv tool install wiki-framework
As a project dependency
uv add wiki-framework
Quickstart
1. Initialize a new wiki
python -m wiki init my-wiki
cd my-wiki
This creates:
wiki/— Your knowledge baseshapes/— SHACL shapes for validation.github/workflows/shacl-validation.yml— CI pipelinepyproject.toml— Project configuration
2. Create your first page
cat > wiki/hello.md << 'EOF'
---
"@context":
"@vocab": "https://schema.org/"
"@type": Person
givenName: John
familyName: Doe
context: A friendly neighbor.
status: permanent
dateCreated: "2026-04-30"
---
# John Doe
Welcome to my wiki page!
EOF
3. Validate your wiki
python -m wiki shacl validate
# With detailed report:
python -m wiki shacl validate --verbose
# Summary view:
python -m wiki shacl validate --summary
4. Query your wiki
python -m wiki sparql "PREFIX schema: <https://schema.org/> SELECT ?name WHERE { ?s a schema:Person ; schema:givenName ?name }"
CLI Reference
wiki init
Initialize a new wiki from a template.
python -m wiki init [-t template-id] [-d target-dir]
-t, --template: Template to use (default:default)-d, --dir: Target directory (default: current directory)
wiki shacl validate
Validate wiki pages against SHACL shapes.
python -m wiki shacl validate [file] [--summary] [--verbose]
file: Validate a single file (by name or path)--summary: Print per-file conformance summary--verbose: Print full validation report
wiki sparql
Run SPARQL SELECT or CONSTRUCT queries.
python -m wiki sparql "query" [-f format] [-o output] [--construct] [--no-inference]
-f, --format: Output format (table, json, csv, tsv, turtle, nt)-o, --output: Write output to file--construct: Shorthand for-f turtle--no-inference: Skip OWL-RL inference--dry-run: Load graph and print stats without querying
wiki frontmatter
Frontmatter conversion and normalization.
python -m wiki frontmatter normalize [--dry-run]
python -m wiki frontmatter convert
SHACL Shapes
The framework includes SHACL shapes for:
- Person (
schema:Person): givenName, familyName, context, status, dateCreated - Project (
schema:Project): name, description, status, dateCreated - Action (
schema:Action): name, actionStatus, priority, dateCreated - CreativeWork/Zet (
schema:CreativeWork): name, keywords, dateCreated
Customize shapes/*.ttl to enforce your own schemas.
Rules & Guidelines
See RULES.md for detailed guidelines on:
- Single Source of Truth (SSoT) principles
- Vault organization rules
- Semantic inference with OWL-RL
- Self-healing and link auditing
- Task management with Actions
Examples
See the examples/ directory for sample wiki pages:
- person.md — Person record template
- project.md — Project record template
Development
git clone https://github.com/EthanThatOneKid/wiki.git
cd wiki
uv sync
uv run python -m wiki --help
Run tests:
uv run pytest
License
MIT License — see LICENSE for details.
Managed by EthanThatOneKid
Metadata
Release files for wiki-framework 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wiki_framework-0.1.0.tar.gz | 89.6 kB | Without provenance | Details for wiki_framework-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wiki_framework-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wiki_framework-0.1.0-py3-none-any.whl |
Total release size: 128.3 kB
Release files / wiki_framework-0.1.0.tar.gz
| Download URL | wiki_framework-0.1.0.tar.gz |
|---|---|
| Size | 89.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cafbab94f080fb6989afe750655309a814ae9383936abc26f739173c559d3ab
|
|
BLAKE2b-256 checksum How to use checksums |
ed3b223f78649a813fb15866ae105702565a5568d8787892061fa73127823e9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wiki_framework-0.1.0-py3-none-any.whl
| Download URL | wiki_framework-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dc016ee6ec93b9ebfce5c0f68e9427e28169113f2018088e3014562e9264f87
|
|
BLAKE2b-256 checksum How to use checksums |
492600cebf49268c797b7ecd79967e1e932d01bf1a103ca67938644e9445dcb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for wiki-framework 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.