11 Who Can Read Documentation

Who Can Read Documentation

Every repository's documentation is published on docs.klok.dev. Klok keeps it open by default: every member of a tenant reads all of the tenant's documentation, whatever domain owns it, because reuse needs people to find and read what is built. Documentation is narrowed only when its owners ask, and it can also be opened to every tenant, or to everyone without a login.

The Five Levels

Each documentation has one visibility:

Visibility Who reads it
public Everyone, without signing in: its pages, its files and its llm.txt
global Everyone signed in to Klok with a role in some tenant: the users of every tenant
tenant (the default) Every member of the tenant, through any of its tenant or domain groups
members For a project of a business domain: that domain's owners, admins and developers, and the tenant's owners, admins and developers. For any other project: the tenant's owners, admins and developers
admins The owners and admins of the project's business domain and of the tenant; for any other project, the tenant's owners and admins

Klok Framework Owners and Admins read everything. Klok Framework Developers read like a developer of every tenant: up to members, never another tenant's admins documentation. The roles are described in Access: Roles, Groups, And Tenants.

The Default

A documentation that sets nothing gets the default of its repository's path:

The repository is in Default
a public group: <tenant>/datamodel/public/…, <tenant>/integration/public/…, <tenant>/application/public/… public
tenant klok's global group, the platform services of every tenant: klok/integration/global/… global
anywhere else, a business domain's group and tenant klok's own projects included tenant

So a public datamodel or integration is readable by anyone from the moment it is published, and nothing else leaves its tenant unless someone decides it should. Tenant klok marks the platform guides, the framework and the services other tenants use as global explicitly.

Sharing With Named Tenants

A project can also be shared with named tenants, for instance a product that one tenant builds and others fork. Every member of a listed tenant then reads the documentation, whatever its level. It adds readers and takes none away, so a project at admins shared with konvoj is read by its admins and by all of konvoj. Only a role in a listed tenant counts: a Klok Framework Developer is not thereby a member of the tenants a project is shared with.

The project itself stays private. Sharing it, the way Share with a tenant on its Overview and klok project share <path> --with <tenant> do, makes three things:

What Where it is What the tenant gets
A share with the tenant's root group, as Reporter The project's Members in GitLab Its people read the code and the packages, and fork
The tenant's root group on the job token allowlist The project's CI/CD settings in GitLab Its pipelines read them too
sharedWith klok-documentation-settings.json of the documentation project Its people read the documentation

The first two happen at once, and the third is a merge request the owners merge. All three can be done by hand in GitLab, and klok.dev shows what is so; Environment doctor reports what is out of step between them. Sharing is for the tenant's owners and admins. Taking a share back stops reading and builds, and a fork someone already made stays theirs.

To share only the documentation, set sharedWith alone: Also shared with on Documentation → Visibility, or klok docs visibility <doc-id> --share <tenant>. A shared project's agent skill stays in the owner's catalog, so the other tenant reads the documentation on docs.klok.dev and gets no skill of it.

What You See On docs.klok.dev

  • Without signing in you see the public documentation, with a note on the front page that there is more behind Sign in, and Sign in in the side panel of every documentation page. Any other page asks you to sign in.
  • Signed in, the front page shows who you are and your roles, and every card says who reads it: Public, Global, Tenant, Members or Admins, and Shared when named tenants read it too. Before you share what you read, the card tells you who else can see it.
  • A documentation you may not read says who reads it, that it is shared where it is but not with whom, and links to Ask for access on klok.dev, which reaches the owners of its domain or tenant. They give you a role on klok.dev's Tenant → People, or change who reads it.

An agent or a script reads the same documentation with a GitLab personal access token (klok docs read, klok docs list); without a token it reads public documentation only. The portal's own documentation, Agent access, has the details.

Changing Who Reads A Documentation

The visibility lives in the documentation project, the repository under <tenant>/documentation/… that the platform publishes from, in a file of its own:

{ "visibility": "global", "sharedWith": ["konvoj"] }

The file is klok-documentation-settings.json, at the root of the documentation project. It is the one file people edit there; everything else is written by KlokDocumentationEgress. Without the file the documentation gets the default.

Who may change it:

Who Where Up to
The tenant's owners and admins In Git: they alone reach the generated documentation projects, and they merge to the hand written guides' main any level
The tenant's owners and admins klok.dev, Documentation → Visibility any level
A domain's owners and admins klok.dev, Documentation → Visibility, for the domain's projects global
Anyone with one of these roles klok docs visibility <doc-id> --set <level> in a terminal, which asks klok.dev as on klok.dev

klok.dev writes the same file with one commit that names you and your reason. The documentation project's pipeline then publishes the documentation again with its new visibility, usually within a few minutes. When someone other than an owner changes it, the owners get a message in their mailbox.

Narrow a documentation only for a reason that holds up: everyone you leave out loses the chance to find and reuse what it describes. To make a documentation public is the tenant's owners' and admins' call.

Why Only The Documentation Project Decides

A documentation reaches docs.klok.dev only from its documentation project's pipeline on a protected branch: that is the only pipeline that can get the tenant's upload credential, and docs.klok.dev accepts no other. A developer cannot publish a documentation wider than its owners chose from a source repository, and the visibility a documentation has is always the one its documentation project's history shows.

Related