Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/knowledge-sync.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<!-- A sidecar sync. The lines above this template are the sync's: the release, the files it changed and the pin. The workflow leaves the sidecar's checks to this pull request's own checks; a sync opened by hand with .lokf/scripts/knowledge-sync.sh --pr <tag> writes its check lines above too. -->
<!-- A sidecar sync. The lines above are the sync's report: the release, the files it changed and the pin. -->

## Reviewer checklist

- [ ] The diff touches only the sidecar's copies, the site's copies, `.lokf/pyproject.toml`, `.lokf/uv.lock` and `CHANGELOG.md`.
- [ ] `.lokf/pyproject.toml` changes on the `ktl` line alone, to the release, and `.lokf/uv.lock` on the `ktl` entry alone.
- [ ] Any workflow changes held above are read and applied on this branch, or left for the next sync on purpose.
- [ ] You read the [release notes of Knowledge Trust Ladder](https://w3id.org/ktl/changelog/) for a step the sync cannot do, such as setting a new variable or secret. If there is one, you do it in this pull request or straight after the merge.
- [ ] `CHANGELOG.md` has the entry under `## [Unreleased]` and `### Security`, and the title carries `security(sidecar):`, so the merge releases.
- [ ] The diff changes only the sidecar's copies, the site's copies, the `ktl` pin and its lock, and `CHANGELOG.md`.
- [ ] Any workflow changes held above are read and applied on this branch.
10 changes: 7 additions & 3 deletions .lokf/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ lokf-serve:
# outside base_iri alone, since `source` and `definedBy` take an external
# resource. --check-excerpts (lokf 0.9.0 or later) finds each
# `sources[].excerpt` in its local file, and counts an excerpt on a URL
# without fetching it.
# without fetching it. --shacl checks the projected graph against LOKF's
# SHACL shapes, such as a relation's target class and one excerpt per source
# node. It runs where uv.lock holds pyshacl, so a broken install fails
# rather than skipping the shapes; without it the recipe says so.
#
# Audit: every typed-relation target must resolve to a concept, and every local excerpt must match its file
# Audit: every typed-relation target must resolve to a concept, every local excerpt must match its file, and the graph must keep LOKF's shapes
lokf-check-refs:
uv run lokf validate {{ _schema }} --check-refs --check-excerpts {{ bundle }}
@grep -qx 'name = "pyshacl"' uv.lock 2>/dev/null || echo "SHACL shapes not checked: give lokf the shacl extra in pyproject.toml, then run uv lock"
uv run lokf validate {{ _schema }} --check-refs --check-excerpts $(grep -qx 'name = "pyshacl"' uv.lock 2>/dev/null && echo --shacl) {{ bundle }}

# The knowledge_bundle doorway shows the bundle under a visible name at the
# host root, for tools that hide dot-folders: folder pickers, file managers
Expand Down
6 changes: 3 additions & 3 deletions .lokf/m365/ktl-docent-m365.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is the Microsoft 365 Copilot build of the ktl-docent skill from [knowledge-
4. **Weigh what you found.** Derive each concept's trust label from its frontmatter (table below). Prefer *confirmed by a person*; treat *edited since a person last confirmed it* as unconfirmed, because the person confirmed an earlier text; use drafts and unchecked concepts, but say so; treat *retired* as history, not fact; treat *past its review date* as possibly stale.
5. **Say what you could not check.** Versions, endpoints, numbers and paths are summaries in the bundle; the concept's `resource` is authoritative, and this skill cannot open it. Where a `sources` entry carries an `excerpt`, give it as the passage the bundle quotes from that resource: it is the only part of the source the snapshot holds. State the value as the bundle gives it, say it was not checked at the source, and give the reader the source as a link (see [Source links](#source-links)). Give the link also when the question is about the present and the only concept is *nobody has checked this yet* or *edited since a person last confirmed it*. If the agent has another tool that can open that link, use it and say that you did.
6. **Answer with a footing.** Give the answer, then what it rests on: each concept (title, path) with its label, and the snapshot. Use plain words: the label names below, never RDF/IRI/tier.
7. **Stop at the edge of the bundle.** When no concept is relevant, or the only one is retired or stale and the question hinges on being current, say the bundle does not cover it. A retired concept's newest `**Deprecation**` line in `log.md` may link the concept that replaced it after "replaced by": answer from that concept first. Do not fill the gap from general knowledge as if it came from the repository. An answer from another knowledge source the agent has is fine when you name that source.
7. **Stop at the edge of the bundle.** When no concept is relevant, or the only one is retired or stale and the question hinges on being current, say the bundle does not cover it. A retired concept's `isReplacedBy` may name the concept that replaced it: answer from that concept first. Do not fill the gap from general knowledge as if it came from the repository. An answer from another knowledge source the agent has is fine when you name that source.
8. **Hand the gap back.** For a miss or a disagreement, end the answer with one entry the reader can paste into the repository's feedback (see [Reporting a gap](#reporting-a-gap)). Never claim the gap was recorded.

## Trust labels (the same words ktl-curator uses)
Expand All @@ -45,9 +45,9 @@ This is the Microsoft 365 Copilot build of the ktl-docent skill from [knowledge-

A bare `verified: { by, at }` counts as one event. Absent `status` means stable. Give each concept's labels on one line, in the order and form below. The repository's report script prints them the same way, so a reader sees the same words in Copilot and in the repository.

- Label a *retired* concept *retired*, and give it no other label. Add *replaced by* and the path when its newest `**Deprecation**` line in `log.md` links the concept that replaced it.
- Label a *retired* concept *retired*, and give it no other label. Add *replaced by* and the path of the concept that replaced it: the first that its `isReplacedBy` names.
- Otherwise, start with the first of *edited since a person last confirmed it*, *confirmed by a person*, *checked by automation only* and *nobody has checked this yet* that applies. Add *still a draft*, then *past its review date*, where they apply.
- After *confirmed by a person*, give the date of the latest `human:` event. When that event carries a `revision`, add "against" and the revision: a commit hash cut to its first seven characters, or an ETag or digest as written.
- After *confirmed by a person*, give the date of the latest `human:` event. When that event carries a `revision`, add "against" and the revision: a commit hash cut to its first seven characters, a `sha256:` digest cut to the seven after `sha256:`, or an ETag as written.
- *Edited since a person last confirmed it* takes the place of *confirmed by a person*, because the person confirmed an earlier text. Give both dates, as in "(confirmed 2026-09-01, edited 2026-09-20)", or both full times when they fall on one day. Compare `generated.at` with the latest `human:` `verified[].at` whole, as strings, never cut to the day: an edit at 14:00 follows a confirmation at 10:00 the same day. Use the v0.1 `timestamp` where `generated.at` is missing. A concept with neither cannot carry this label.
- After *past its review date*, give the `stale_after` date in brackets. Compare it with today's date, not the snapshot's: a concept can pass its review date after the snapshot was built.

Expand Down
2 changes: 1 addition & 1 deletion .lokf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description = "LOKF knowledge-bundle tooling for oscal."
# Keep in sync with the `lokf` toolkit's own requires-python floor.
requires-python = ">=3.11"
dependencies = [
"ktl==0.66.0",
"ktl==0.70.4",
"lokf[build]>=0.9.0",
# The recipe runner the workflows use, pinned here so uv.lock checks it
# by hash; keep the version in step with the workflows' uvx fallback.
Expand Down
Loading
Loading