OmegaWiki / runtime
skyllwt/OmegaWiki/runtime/CLAUDE.md
Single source of truth for what is structurally legal in the wiki. YAML in schema/ and policy/ is the contract; loader.py is the Python access API consumed by tools/lint.py and tools/research_wiki.py. No codegen step — edit YAML, restart the tool. Every change below is YAML-only, zero Python change. Edit, save, done. - New entity type — add a top-level block (<kind>: with dir, fields, optional lifecycle, optional terminal: true) and create templates/<kind>.md.tmpl with the body section skeleton. - New field…
What's in it
- runtime/ — Wiki Runtime Contract
- Folder layout
- How to add things
- Entity-related (schema/entities.yaml + templates/)
- Edge-related (schema/edges.yaml)
- Cross-reference (schema/xref.yaml)
- Access control (policy/writers.yaml)
- Conventions (schema/conventions.yaml)
- When Python changes ARE needed
- Out of scope
# runtime/ — Wiki Runtime Contract
Single source of truth for what is structurally legal in the wiki. YAML in
`schema/` and `policy/` is the contract; `loader.py` is the Python access API
consumed by `tools/lint.py` and `tools/research_wiki.py`. **No codegen step** —
edit YAML, restart the tool.
## Folder layout
```
runtime/
├── __init__.py marks runtime/ as a Python package
├── loader.py schema access API (imported by tools/lint.py + research_wiki.py)
├── schema/ data-shape contract (4 YAMLs)
├── policy/ access control (writers.yaml)
└── templates/ per-entity body skeletons used by /init and /ingest
```
## How to add things
Every change below is **YAML-only, zero Python change**. Edit, save, done.
### Entity-related (`schema/entities.yaml` + `templates/`)
- **New entity type** — add a top-level block (`<kind>:` with `dir`, `fields`,
optional `lifecycle`, optional `terminal: true`) and create
`templates/<kind>.md.tmpl` with the body section skeleton.
- **New field on an entity** — add it under that entity's `fields:` block with
`type` + optional `required` / `default` / `range` / `values` / `to`.
- **New conditional-required rule** — set `required_when: { other_field: value }`
on the field. `lint` auto-validates.
- **New lifecycle state or transition** — edit the entity's
`lifecycle.transitions:` map. `research_wiki.py transition` auto-validates.
### Edge-related (`schema/edges.yaml`)
- **New edge type** — add a top-level block with `endpoints`, `direction`
(`directed | symmetric`), `workflow`, `attributes`.
- **New attribute on an edge** — add it under that edge's `attributes:` block
with `type` + optional `required` / `values`. `add-edge` collects it,
`lint` validates it.
- **Different storage location** — list it under
`conventions.yaml::edge_storage::exceptions` (default is `wiki/graph/edges.jsonl`).
### Cross-reference (`schema/xref.yaml`)
- **New forward → reverse rule** — append to `rules:` with a `forward` block
(`kind` + one of `frontmatter_field` / `body_section` / `edge_type`, plus
`target`) and a `reverse` block (`kind` + `frontmatter_field` or
`body_section`, plus `action: append_slug | append_record`). `lint` auto-checks.
### Access control (`policy/writers.yaml`)
- **Restrict who writes a field** — add `<kind>.<field>: { writers: [skill1, skill2] }`
under `fields:`. Add `frozen_after_first_write: true` if it should not be
modified after creation.
- **Restrict who writes an edge type** — add `<edge_type>: [skill1, skill2]`
under `edges:`.
### Conventions (`schema/conventions.yaml`)
- **Change slug rule, log grammar, ownership zones** — edit the corresponding
top-level key.
## When Python changes ARE needed
Only when extending the **schema language itself**, not when adding more data:
- New field type (e.g. `list_date`, `tuple_str`) — extend `loader.py::_valid_values_for`
- New xref action (e.g. `replace_slug` vs `append_slug`) — extend `lint.py::_has_reverse`
- New cross-cutting helper (e.g. `edge_supports_evidence_search`) — add to `loader.py`
## Out of scope
- Skill prompts and workflow logic — `.claude/skills/<skill>/`
- Lint severity / auto-fix policy — derived from `required` / `default` in schema
- Migration history — git log + one-shot scripts; no `migrations/` folder
More agent context in skyllwt/OmegaWiki
30 other files this repository gives its agents.
CLAUDE.md
Skill
- ask.claude/skills/ask/SKILL.md
- check.claude/skills/check/SKILL.md
- daily-arxiv.claude/skills/daily-arxiv/SKILL.md
- discover.claude/skills/discover/SKILL.md
- edit.claude/skills/edit/SKILL.md
- exp-design.claude/skills/exp-design/SKILL.md
- exp-eval.claude/skills/exp-eval/SKILL.md
- exp-pilot-eval.claude/skills/exp-pilot-eval/SKILL.md
- exp-pilot-run.claude/skills/exp-pilot-run/SKILL.md
- exp-run.claude/skills/exp-run/SKILL.md
- exp-status.claude/skills/exp-status/SKILL.md
- hiera-experiment.claude/skills/hiera-experiment/SKILL.md
- ideate.claude/skills/ideate/SKILL.md
- ingest.claude/skills/ingest/SKILL.md
- init.claude/skills/init/SKILL.md
- novelty.claude/skills/novelty/SKILL.md
- paper-compile.claude/skills/paper-compile/SKILL.md
- paper-draft.claude/skills/paper-draft/SKILL.md
- paper-plan.claude/skills/paper-plan/SKILL.md
- poster.claude/skills/poster/SKILL.md
- prefill.claude/skills/prefill/SKILL.md
- rebuttal.claude/skills/rebuttal/SKILL.md
- refine.claude/skills/refine/SKILL.md
- research.claude/skills/research/SKILL.md
- reset.claude/skills/reset/SKILL.md
- review.claude/skills/review/SKILL.md
- setup.claude/skills/setup/SKILL.md
- survey.claude/skills/survey/SKILL.md
- visualize.claude/skills/visualize/SKILL.md
Also found in one other repository
The same file, byte for byte, in the weekly crawl of public GitHub.
- skyllwt/AutoSci1.7k
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

