wiki/concepts/ and saved query pages in wiki/queries/. A non-default profile
can add richer typed directories such as wiki/papers/, wiki/experiments/, or
wiki/articles/, but it still uses the same compile, review, lint, export,
viewer, context, SDK, and MCP surfaces.
Why CLP Exists
The original llmwiki model is intentionally simple: sources compile into concept pages. That is enough for many personal and team knowledge bases, but larger workflows need stronger contracts:- A research experiment should not become
completeunless it has a result artifact and a linked idea. - A manuscript should not be marked
submittedunless citation relations exist. - An article workflow should distinguish drafting, editing, filing, and publication stages.
- External metadata from a connector should enter review before it becomes live context.
.llmwiki/profile.json.
The profile is data. The enforcement machinery stays generic.
What a Profile Declares
Entities and fields
Entity types map to directories under
wiki/. Field contracts define the
required frontmatter and primitive types each entity page must satisfy.Relations
Relation types define valid edges between entity types. Writes and reads use
the same profile-valid relation filter, so invalid edges do not quietly gain
authority.
Lifecycles
Entity lifecycles are finite-state machines over one frontmatter field.
State changes are validated on every typed write surface.
Preconditions
Gated states can require evidence fields, relation counts, and healthy
hash-pinned artifact references.
Workflows and actions
Workflows declare stage order, reads, writes, gates, and artifact outputs.
Actions expose safe shortcuts over workflow operations.
Artifacts and connectors
Artifacts are typed files with manifest metadata and hash-pinned refs.
Connectors can stage typed review candidates, but profiles cannot ship code.
The Core Invariant
CLP’s core invariant is that domain behavior comes from profile data, not from hardcoded branches. The engine should not need logic like “if this is AutoSci, run the research path” or “if this is Newsroom, use a different reviewer.” It loads the active profile, validates the requested write or read surface against that profile, and either applies the generic operation or fails closed. That is why the same machinery can support:- the built-in
defaultprofile; - the built-in
autoscitemplate, a full research workflow profile; - the built-in
newsroomtemplate, a deliberately different editorial profile; - local profile templates authored by a team.
Write Surfaces
CLP does not only validate a page when you explicitly runllmwiki profile validate. It validates at the write surfaces where invalid state could enter
the wiki:
1
Typed page creation and update
Page writes check entity type, required fields, field types, lifecycle state,
relation preconditions, and artifact preconditions before a page becomes
live.
2
Lifecycle transitions
Lifecycle commands and workflow lifecycle outputs route through the same
gated-state validation used by page writes.
3
Relation writes
Relation writes validate relation type, endpoint roles, endpoint entity
types, endpoint existence, and required attributes.
4
Artifact writes
Artifact writes validate the declared artifact type, file contract, content
kind, byte cap, trust grant, and manifest integrity.
5
Review approval
Review candidates are not trusted just because they reached the queue.
Approval re-plans the write against the current profile before promoting it.
Trust and Review
Profiles describe desired authority, but they do not grant it by themselves. Operator-controlled surfaces still decide whether a write can apply live:- Trust-gated workflow writes and direct artifact writes require
LLMWIKI_TRUSTED_WRITE. - Connectors require
LLMWIKI_CONNECTORSand stage review candidates, never live pages. - OKF imports stage candidates by default. Trusted imports still route typed docs through the typed planner.
- Connector-fetched candidates require a
--draft-content-hashapproval pin so the approved body is the body the operator reviewed.
Default Compatibility
If a project has no.llmwiki/profile.json, it uses the built-in default
profile. The default profile preserves the original behavior and directory
layout. CLP adds new capabilities without requiring existing projects to opt in
or migrate.
When a profile is installed, it is project-defining. Template initialization
refuses to reinterpret a non-empty typed corpus, because switching profiles can
orphan or reinterpret existing wiki pages.
Where To Go Next
- Use Profiles for the configuration schema and examples.
- Use AutoSci Profile to see a complete research profile expressed as configuration.
- Use Profile Templates to install a built-in or local profile package.
- Use AutoSci Research Workflow for a practical end-to-end research walkthrough.