Skip to content

Spike: evaluate an OKF compatibility profile for product documentation #25

In review

Description

@prometheas

Summary

Run a bounded spike to test whether the product-development skill should support a local profile compatible with Google Cloud's Open Knowledge Format (OKF) for documentation under docs/product/.

The spike should test OKF as a thin discovery and interchange layer over the skill's existing product-documentation model. It must not replace the lifecycle, human gates, artifact taxonomy, traceability rules, evolution strategies, Gherkin specifications, or platform/app/code placement boundaries.

Background

OKF v0.1 Draft represents knowledge as Markdown concept files with YAML frontmatter, ordinary Markdown links, and optional index.md files for progressive disclosure. Its minimal contract fits the skill's Git-native Markdown artifacts, but deliberately does not define product-document semantics, approval workflows, typed relationships, lifecycle status, or cross-bundle behavior.

Initial research suggests a compatibility profile could improve agent navigation and metadata validation while preserving the current hierarchy. Important uncertainties remain:

  • docs/product/ is not the complete lifecycle graph: design and implementation plans, ADRs, surface-specific scenarios, and test automation live elsewhere.
  • .feature files are first-class executable specifications but are not OKF Markdown concepts.
  • OKF links are untyped, while the skill requires explicit FR/NFR, story, and scenario traceability.
  • Every non-reserved Markdown file in a conformant bundle needs frontmatter, which affects existing README.md, AGENTS.md, foundation documents, PRDs, TRDs, and stories.
  • index.md adds value only when it supplies meaningful selection context or is generated reliably; directory-only listings duplicate the filesystem.
  • The upstream specification is new and its reference tooling has unresolved interoperability defects.

Research note: plugins/product-development/skills/product-development/research/2026-07-16-google-okf-product-documentation.md

Spike hypothesis

A small, skill-owned OKF compatibility profile can make product artifacts easier for humans and agents to discover without changing their canonical locations, body schemas, lifecycle authority, or executable-specification boundaries.

The spike should reject this hypothesis if the profile creates duplicate sources of truth, requires broad path migration, weakens traceability, or needs substantial custom tooling merely to preserve current behavior.

Scope

Use one representative feature fixture or isolated example subtree containing:

  • a PRD;
  • a TRD;
  • multiple user stories;
  • platform-level Gherkin scenarios; and
  • links to foundation documents and at least one artifact outside the candidate bundle boundary.

Explore:

  1. A local profile version and closed artifact-type vocabulary.
  2. Minimal canonical frontmatter fields, including a stable ID independent of file path.
  3. Explicit relationship and traceability conventions layered above OKF's untyped links.
  4. Generated versus omitted indexes at:
    • the feature directory;
    • features/ as a portfolio view;
    • research, ADR, and version-archive directories where applicable.
  5. Treatment of README.md and AGENTS.md without breaking their existing human and harness roles.
  6. References to .feature files without Markdown wrappers or duplicated scenario content.
  7. Links from platform documentation to app-local scenarios, ADRs, research, and docs/plans/ artifacts.
  8. Validation behavior for metadata, stable IDs, internal links, trace targets, index freshness, and metadata drift.
  9. Compatibility with at least two consumers: direct agent file navigation and one independent OKF validator or viewer.
  10. Migration and rollback cost if upstream OKF changes.

Candidate profile boundaries

The spike should compare at least these options:

Feature-subtree profile

Treat one docs/product/features/{feature}/ subtree as the experimental scope. Preserve .feature files as executable assets and avoid claiming full-bundle conformance.

docs/product/ bundle

Treat docs/product/ as the bundle root. Document required exceptions or external references for docs/plans/, docs/adr/, app-local scenarios, and test code.

No OKF profile

Retain the current hierarchy and adopt only selected ideas, such as generated semantic indexes or stable metadata, without claiming OKF compatibility.

Repository-root bundling is out of scope unless evidence shows it is necessary; it would impose frontmatter requirements on unrelated Markdown files.

Deliverables

  • A small experimental fixture or isolated example demonstrating the candidate profile.
  • A documented profile draft covering types, fields, stable IDs, links, exemptions, and canonical metadata ownership.
  • Generated or hand-sketched indexes sufficient to test navigation value without committing to production generators.
  • Validation results from direct agent navigation and an independent OKF consumer.
  • A findings note covering usability, context-loading behavior, metadata drift risk, broken-link behavior, traceability preservation, and maintenance cost.
  • A recommendation: adopt, revise and re-spike, adopt selected ideas without OKF compatibility, or reject.
  • Follow-up issue proposals for any production implementation. The spike itself must not silently become that implementation.

Evaluation criteria

The experiment is promising only if it demonstrates that:

  • existing product-development lifecycle gates and artifact locations remain intact;
  • PRD, TRD, story, and scenario semantics remain owned by the skill;
  • .feature files remain the single source of truth for executable behavior;
  • agents can discover relevant artifacts with less broad file loading;
  • metadata has one canonical representation and does not drift between frontmatter and body;
  • stable product identities survive file moves and archival;
  • indexes add semantic navigation value and can be generated or reliably validated;
  • cross-boundary references remain understandable without proprietary infrastructure;
  • rollback consists primarily of removing optional metadata or generated navigation files; and
  • the maintenance burden is proportionate to the navigation and interoperability benefit.

Non-goals

  • Do not reorganize all existing product documentation.
  • Do not modify initialization templates or scripts/init.sh globally.
  • Do not replace the product-development methodology with OKF.
  • Do not move ADRs, plans, surface scenarios, or tests solely to fit a bundle.
  • Do not duplicate Gherkin scenarios in Markdown.
  • Do not make Google or third-party OKF tooling a correctness dependency.
  • Do not define production migration policy before spike evidence exists.
  • Do not claim broad ecosystem interoperability from a v0.1 Draft experiment.

Acceptance criteria

  • The spike evaluates all three candidate boundaries and records why one is preferred or why none should proceed.
  • One representative feature subtree is exercised end to end without changing canonical product semantics.
  • Profile-specific metadata and relationship meanings are documented separately from upstream OKF rules.
  • Index decisions distinguish semantic navigation from filesystem duplication.
  • Gherkin and cross-surface boundary handling are demonstrated without a second source of truth.
  • At least two consumption paths are tested and their failures recorded.
  • Risks from upstream draft status and known tooling gaps are included in the final recommendation.
  • Production skill, template, initialization, and migration work remains outside this issue.
  • Final output supports an explicit human go, revise, or no-go decision.

Key research references

Activity

  1. prometheas commented on Nov 29, 2026

    @prometheas
    ContributorAuthor

    Concluded for 0.2.0: adopt as the skill's OKF profile

    This spike is now part of the 0.2.0 release (#35). It did not run as a separate experiment. Its questions were answered while designing #23 (the feature-evolution pathway), with surveys of three real product-documentation trees as evidence. The recommendation is to adopt, and the production work happens under #35 rather than here, as this issue's non-goals require.

    Upstream moved to v0.3

    OKF is now at v0.3, maintained at open-knowledge-format/open-knowledge-format. The GoogleCloudPlatform copy linked above is deprecated. v0.3 settles several of the uncertainties listed in this issue:

    • A .md file without a type is not a concept, so README.md and AGENTS.md keep their roles with no front matter.
    • A file that does not end in .md is an asset, so .feature files stay as they are and can still be link targets.
    • index.md and log.md are reserved at any level. Only the bundle-root index.md has front matter.
    • Consumers accept unknown keys, and producer keys use an x- prefix.

    Boundary

    The docs/product/ bundle option wins. docs/product/index.md is the bundle root and declares okf_version: "0.3". The skill generates an index.md in every directory; below the root these are plain listings without front matter. Each feature directory is a self-contained subtree with its own log.md, and a feature's own metadata lives in the front matter of its feature spec overview, <feature-id>-spec.md. ADRs, engineering references and test code stay outside docs/product/, and links to them are external. Plans leave the repository.

    Answers to the questions in Scope

    1. Type vocabulary. A closed type list: constitution, vision, research-note, idea, shaping, feature-spec-overview, feature-spec-facet, prd, trd, delta, story, delivery-plan, open-questions. Values are lowercase kebab-case. What a facet spec covers goes in open tags, with a starter set: workflow, contract, policy, data, integration, permissions, entitlement, notification, screen, quality, user-type.
    2. Fields and stable IDs. type, title, description and status. Spec units carry stable IDs in the body, for example FR-12, so a unit keeps its identity when files move. Splits, merges and drops of whole features go in a lineage log, features/log.md.
    3. Relationships. Ordinary links, plus x-amends: <feature-id> on a change still in shaping. Deltas name the spec-unit IDs they add, modify or remove. Typed relationships wait for upstream.
    4. Indexes. Generated at the bundle root and in each feature directory.
    5. README.md and AGENTS.md. No type, so they are not concepts and keep their current roles.
    6. .feature files. Assets. A delta can name a whole scenario file as one spec unit, and no Markdown wrapper duplicates it.
    7. Cross-boundary links. External links, which consumers must accept even when broken.
    8. Validation. CI checks that type is in the closed list, that status matches the document's path, and that indexes are fresh.
    9. Consumers. Direct agent navigation, and the upstream v0.3 validator, skills/okf-generate/scripts/validate.py, pinned to that commit. This repository's okf-bundle skill targets v0.2, so it becomes a third consumer once its upgrade, okf-bundle: upgrade from OKF v0.2 to v0.3 #43 (okf-bundle v0.3 upgrade), lands. This issue's own pull request delivers the profile: the reference, the index generator, the profile checks, and a fixture that tests both consumers.
    10. Migration and rollback. product-development: modernization guide for specs written with 0.1.0 #46 (modernization guide), a sub-issue of product-development 0.2.0: feature specs that evolve through ratified changes #35, covers moving projects from 0.1.0. Rollback means removing the front matter and the generated indexes.

    Status

    OKF status follows from the path: draft in ideas/ and shaping/, stable for ratified changes and feature specs, and deprecated for archived changes.

    This issue closes with the final 0.2.0 pull request. The profile ships as a reference file in the skill, recorded in an ADR on product documents as one OKF bundle rooted at docs/product/, with a closed type list and open tags.

    The profile's fixture covers:

    • the bundle-root index.md keeping its front matter through regeneration;
    • reserved-file formats: no front matter below the root, and log.md without front matter;
    • type and status for the foundation documents, research notes, the delivery plan, the open-questions register and vision companions (type vision, tag companion).

    The profile's own checks stay separate from generic OKF conformance. A bundle can pass the upstream validator and still fail the profile.

  2. prometheas commented on Nov 29, 2026

    @prometheas
    ContributorAuthor

    Open decisions for the maintainer

    Recorded during the 0.2.0 implementation (PR #51, the OKF v0.3 profile). The PR ships the interim behavior below and leaves these open:

    1. Log order. OKF v0.3 says log.md lists the newest date first; the upstream validator only warns when it doesn't. The profile keeps product-development: add feature-evolution pathway with rationale provenance #23's oldest-first order for feature and lineage logs. Keep oldest-first, or switch to newest-first?
    2. Status outside the stage directories. The profile applies the same rule as for changes: archived constitution and vision versions are deprecated; the current constitution and vision, vision companions, roadmap.md, open-questions.md and research notes are stable. Confirm, or set a different rule (for example draft for research notes).

    Neither blocks the 0.2.0 work.

  3. 28 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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