Skip to content

[Feature]: Adopt OKF v0.2 output (generated/sources frontmatter, okf_version bump) #580

Description

@JHSeo-git

Summary

Google's knowledge-catalog has published OKF v0.2 (SPEC.md). OpenWiki currently produces OKF v0.1 bundles: the bundle-root index.md declares okf_version: "0.1" (src/okf/index-sync.ts), the agent prompts instruct the v0.1 frontmatter schema (src/agent/prompts/code.ts), and the deterministic validator checks the v0.1 field set including timestamp (src/okf/frontmatter.ts).

This issue proposes updating OpenWiki's OKF output to target v0.2.

Motivation

OKF v0.2 supersedes v0.1 and makes provenance, trust, and lifecycle first-class — exactly the questions consumers ask of an agent-maintained corpus like an OpenWiki wiki: what was this generated from, by whom/what, and is it still fresh?

Changes in v0.2 that affect OpenWiki as a producer (SPEC §13):

  • Breaking: timestamp is superseded by generated: { by, at } (§5.2). OpenWiki currently recommends and validates timestamp.
  • Breaking: the body # Citations list is superseded by the sources frontmatter field (§5.1). (OpenWiki does not emit # Citations, so this is only an opportunity, not a migration.)
  • Additive: sources with per-source credibility signals, verified, status, stale_after, the actor convention (<producer>/<version>, §7), a new Attested Computation concept type (§10), and okf_version: "0.2" in the bundle-root index.md.

v0.2 is a minor bump: a v0.1 bundle remains consumable by v0.2 consumers via the documented fallbacks, so the migration is low-risk for existing wikis.

Proposed Solution

Phase 1 — core producer/validator update (this is the bulk of the change):

  1. Declare okf_version: "0.2" in the bundle-root index.md (src/okf/index-sync.ts).
  2. Replace timestamp with generated: { by, at } in the prompt frontmatter templates and the deterministic frontmatter pass, using the actor convention (e.g. by: openwiki/<version>). Keep tolerating a legacy timestamp when reading existing v0.1 pages, per the SPEC's consumer fallback.
  3. Update the deterministic validator (src/okf/frontmatter.ts) for the v0.2 field families, staying permissive per §11 (never reject on missing optional families or unknown keys).

Phase 2 — provenance (natural fit, could be same PR or follow-up):

  1. Emit sources on generated concepts. OpenWiki's existing openwiki.source_paths producer extension already tracks this evidence, so it can inform the standard sources field.

Out of scope for now (optional families a producer may omit): verified, status/stale_after, and the Attested Computation concept type. These can be follow-ups if there is interest.

I'm happy to submit a PR for this.

Alternatives Considered

  • Stay on v0.1: works, but v0.2 supersedes it and downstream consumers will increasingly expect generated/sources; the longer prompts and validator target v0.1, the more regenerated wikis accumulate superseded timestamp fields.
  • Jump straight to full v0.2 including verified/attestation: the trust and attestation families need product decisions (who verifies, what executor/attester means for a wiki), so keeping the first change to the mechanical producer/validator update seems safer.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions