feat: adopt OKF v0.2 output - #581
Open
JHSeo (JHSeo-git) wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: 9f78f3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
JHSeo (JHSeo-git)
force-pushed
the
feat/okf-v0.2
branch
from
August 4, 2026 02:44
c234e33 to
bd0f0f7
Compare
The bundle-root index now declares okf_version "0.2", agent prompts
instruct the generated {by, at} trust field (actor openwiki/<version>)
in place of the superseded timestamp field, and the front-matter
validator checks the v0.2 provenance, trust, and lifecycle families
(generated, verified, sources, status, stale_after) while still
tolerating the legacy timestamp on v0.1 pages (SPEC section 13.1
fallback).
Refs langchain-ai#580
JHSeo (JHSeo-git)
force-pushed
the
feat/okf-v0.2
branch
from
August 5, 2026 13:37
bd0f0f7 to
9f78f3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #580
Updates OpenWiki's OKF output from v0.1 to OKF v0.2. This is the Phase 1 (core producer/validator) scope from the issue; emitting the
sourcesprovenance field fromopenwiki.source_pathsis left as a follow-up.Changes
Producer
index.mdnow declaresokf_version: "0.2"(src/okf/index-sync.ts). The deterministic index sync rewrites existing root indexes on the next run, so existing wikis migrate automatically.generated: {by, at}in place of the supersededtimestamp(SPEC §13.1). The producer actor is injected deterministically asopenwiki/<version>via a new{OKF_PRODUCER_ACTOR}placeholder resolved increateSystemPromptfromOPENWIKI_VERSION, following the §7 actor convention.timestamponly when it meaningfully changes that page, so untouched pages are not churned.Validator (
src/okf/frontmatter.ts)generated(mapping with a required non-emptyby),verified(a{by, at}mapping or list of them — a bare mapping is read as a one-element list per §5.2),sources(list of mappings each with a non-emptyresource),status(draft|stable|deprecated), andstale_after(YYYY-MM-DD).timestampis still accepted as a non-empty string (v0.1 fallback).Docs
Notes for review
statusis now enum-validated because v0.2 §5.4 defines a closed set. A page usingstatusas a free-form producer extension (valid under v0.1) gets a correction warning the next time the agent writes it. If you prefer to keepstatusunvalidated for backward compatibility, I'm happy to relax that check.openwiki/index.mdstill says0.1; it is generated, so I left it for the scheduled refresh workflow rather than hand-editing.Testing
test/index-middleware.test.ts,test/prompt-okf.test.ts, andtest/frontmatter-validator.test.ts(v0.2 families accepted, malformed families reported, bareverifiedmapping accepted, legacytimestampstill accepted), watched them fail, then implemented.pnpm test(914 passed),pnpm typecheck,pnpm lint:check, andpnpm format:checkare all clean.